/* Landing shell for OpenPrim — blue / cyan / white Primorye sky */
:root {
  --sea-deep: #0B4F8C;
  --sea-mid: #1A7ABF;
  --ocean: #2B9DE0;
  --foam: #B8E8FF;
  --sky: #E8F6FF;
  --ink: #0F2F4A;
  --muted: #4A6F8A;
  --line: rgba(11, 79, 140, 0.12);
  --bg: #F5FBFF;
  --white: #FFFFFF;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --wrap: min(1100px, calc(100% - 2.5rem));
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 8% -8%, rgba(184, 232, 255, 0.55), transparent 58%),
    radial-gradient(900px 480px at 92% 12%, rgba(43, 157, 224, 0.12), transparent 55%),
    linear-gradient(180deg, #FFFFFF 0%, var(--sky) 38%, var(--bg) 72%, #EEF7FF 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 28px rgba(11, 79, 140, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--sea-deep);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 1.1rem;
  margin-left: auto;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}

.nav a {
  position: relative;
  transition: color 0.25s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -0.25rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ocean), var(--foam));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}
.nav a:hover { color: var(--sea-deep); }
.nav a:hover::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-admin {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.84rem;
  white-space: nowrap;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}
.header-admin:hover {
  color: var(--sea-deep);
  background: rgba(184, 232, 255, 0.35);
}

.header-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(11, 79, 140, 0.22);
  color: var(--sea-deep);
  font-weight: 700;
  font-size: 0.84rem;
  white-space: nowrap;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.header-link:hover {
  background: rgba(184, 232, 255, 0.45);
  border-color: var(--ocean);
  transform: translateY(-1px);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sea-deep), var(--ocean));
  color: var(--white);
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(43, 157, 224, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.header-cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(43, 157, 224, 0.36);
}

/* Hero — sky / sea / foam */
.hero {
  position: relative;
  /* room for full-width photo (aspect 1024×341) + text above it */
  min-height: max(min(92vh, 760px), calc(100vw * 341 / 1024 + 13rem));
  display: flex;
  align-items: flex-end;
  padding: 6rem 0 5.5rem;
  color: var(--white);
  overflow: hidden;
  background:
    linear-gradient(165deg,
      #074A8C 0%,
      #0B5FA8 28%,
      #1A7ABF 58%,
      #3AA8E8 82%,
      #7FD0F5 100%);
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.hero-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 70% 18%, rgba(255, 255, 255, 0.35), transparent 70%),
    radial-gradient(ellipse 50% 35% at 15% 30%, rgba(184, 232, 255, 0.25), transparent 65%);
  animation: skyPulse 14s ease-in-out infinite alternate;
}

.hero-sun {
  position: absolute;
  width: min(28vw, 220px);
  height: min(28vw, 220px);
  top: 8%;
  right: 12%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 40%, #fff 0%, #FFF6D6 28%, rgba(255, 220, 120, 0.55) 48%, transparent 72%);
  filter: blur(2px);
  animation: sunGlow 8s ease-in-out infinite alternate;
  opacity: 0.85;
}

.hero-glow {
  position: absolute;
  width: 55vw;
  height: 55vw;
  top: -15%;
  right: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 232, 255, 0.35), transparent 68%);
  animation: drift 12s ease-in-out infinite alternate;
}
.hero-glow-2 {
  width: 40vw;
  height: 40vw;
  top: 35%;
  left: -12%;
  right: auto;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 70%);
  animation-duration: 16s;
  animation-direction: alternate-reverse;
}

/* City collage: full-width, bottom-aligned, no crop — between blue sky and text */
.hero-photo {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  z-index: 0;
  pointer-events: none;
  line-height: 0;
}
/* Black plate under dark/transparent holes in the collage (not the top sky cutout) */
.hero-photo-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52%;
  background: #000;
  z-index: 0;
}
.hero-photo picture {
  position: relative;
  z-index: 1;
  display: block;
  line-height: 0;
}
.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
}

/* Seagulls — V checkmarks: thick at base, thin at upper tips */
.seagulls {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 78%;
  overflow: visible;
  z-index: 1;
}

.seagull {
  fill: #fff;
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 3px 5px rgba(7, 40, 90, 0.2));
}

.seagull .wing {
  transform-box: fill-box;
}
.seagull .wing-l {
  transform-origin: 100% 100%;
  animation: flapL 0.85s ease-in-out infinite;
}
.seagull .wing-r {
  transform-origin: 0% 100%;
  animation: flapR 0.85s ease-in-out infinite;
}

.seagull-b .wing-l,
.seagull-b .wing-r { animation-duration: 0.95s; animation-delay: -0.28s; }
.seagull-c .wing-l,
.seagull-c .wing-r { animation-duration: 0.72s; animation-delay: -0.12s; }
.seagull-d .wing-l,
.seagull-d .wing-r { animation-duration: 1.05s; animation-delay: -0.46s; }
.seagull-e .wing-l,
.seagull-e .wing-r { animation-duration: 0.8s; animation-delay: -0.2s; }

.seagull-a { animation: flyA 26s linear infinite; }
.seagull-b { opacity: 0.9; animation: flyB 34s linear infinite; }
.seagull-c { animation: flyC 22s linear infinite; }
.seagull-d { opacity: 0.75; animation: flyD 38s linear infinite; }
.seagull-e { opacity: 0.88; animation: flyE 30s linear infinite; }

/* Flap toward base: open then close the V (±12…18°) */
@keyframes flapL {
  0%, 100% { transform: rotate(6deg); }
  50% { transform: rotate(-14deg); }
}
@keyframes flapR {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(14deg); }
}

@keyframes flyA {
  0%   { transform: translate(-80px, 70px) scale(1.15); }
  30%  { transform: translate(360px, 36px) scale(1.15); }
  60%  { transform: translate(760px, 80px) scale(1.1); }
  100% { transform: translate(1280px, 44px) scale(1.15); }
}
@keyframes flyB {
  0%   { transform: translate(1260px, 120px) scale(0.78) scaleX(-1); }
  40%  { transform: translate(680px, 70px) scale(0.78) scaleX(-1); }
  100% { transform: translate(-100px, 140px) scale(0.78) scaleX(-1); }
}
@keyframes flyC {
  0%   { transform: translate(-100px, 160px) scale(1.35); }
  50%  { transform: translate(540px, 100px) scale(1.35); }
  100% { transform: translate(1300px, 170px) scale(1.3); }
}
@keyframes flyD {
  0%   { transform: translate(1300px, 40px) scale(0.55) scaleX(-1); }
  100% { transform: translate(-80px, 100px) scale(0.55) scaleX(-1); }
}
@keyframes flyE {
  0%   { transform: translate(-90px, 210px) scale(0.9); }
  35%  { transform: translate(400px, 160px) scale(0.9); }
  70%  { transform: translate(820px, 220px) scale(0.88); }
  100% { transform: translate(1280px, 180px) scale(0.9); }
}

.waves {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  width: 100%;
  height: clamp(72px, 12vw, 140px);
  z-index: 1;
}

.wave { fill: rgba(184, 232, 255, 0.28); }
.wave-1 { animation: waveShift 10s ease-in-out infinite alternate; }
.wave-2 { fill: rgba(255, 255, 255, 0.45); animation: waveShift 14s ease-in-out infinite alternate-reverse; }
.wave-3 { fill: rgba(245, 251, 255, 0.97); animation: waveShift 18s ease-in-out infinite alternate; }

@keyframes waveShift {
  from { transform: translateX(-2.5%); }
  to { transform: translateX(2.5%); }
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-4%, 6%) scale(1.08); }
}
@keyframes skyPulse {
  from { opacity: 0.85; }
  to { opacity: 1; }
}
@keyframes sunGlow {
  from { transform: scale(1); opacity: 0.75; }
  to { transform: scale(1.08); opacity: 0.95; }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  text-shadow: 0 1px 2px rgba(7, 40, 90, 0.25), 0 8px 28px rgba(7, 40, 90, 0.2);
}

.hero-anim {
  opacity: 0;
  transform: translateY(18px);
  animation: heroIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-org.hero-anim { animation-delay: 0.08s; }
.hero-brand.hero-anim { animation-delay: 0.2s; }
.hero-lead.hero-anim { animation-delay: 0.34s; }
.hero-dates.hero-anim { animation-delay: 0.46s; }
.hero-actions.hero-anim { animation-delay: 0.58s; }

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

.hero-org {
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(0.78rem, 1.6vw, 0.92rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--foam);
}
.hero-org::before,
.hero-org::after {
  content: "";
  display: block;
  width: 1.6rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 232, 255, 0.9), transparent);
}
.hero-org::before {
  background: linear-gradient(90deg, transparent, rgba(184, 232, 255, 0.95));
}
.hero-org::after {
  background: linear-gradient(90deg, rgba(184, 232, 255, 0.95), transparent);
}

.hero-brand {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 7vw, 4.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-shadow: 0 8px 40px rgba(7, 50, 100, 0.25);
}

.hero-lead {
  margin: 0 0 1rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 500;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.94);
}

.hero-dates {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--foam);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.55rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn-primary {
  background: var(--white);
  color: var(--sea-deep);
  box-shadow: 0 12px 32px rgba(255, 255, 255, 0.28);
}
.btn-primary:hover {
  background: var(--foam);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(184, 232, 255, 0.4);
}

.btn-ghost {
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  color: var(--white);
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.08);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.btn-foam {
  background: linear-gradient(135deg, var(--foam), #fff);
  color: var(--sea-deep);
  box-shadow: 0 10px 30px rgba(43, 157, 224, 0.22);
}
.btn-foam:hover { filter: brightness(1.05); transform: translateY(-2px); }
.btn-foam svg { width: 20px; height: 20px; fill: currentColor; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Sections — always visible (no opacity:0) */
.section { padding: clamp(3.2rem, 6vw, 5rem) 0; }

.section-eyebrow {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ocean);
}

.section-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--sea-deep);
  line-height: 1.2;
  max-width: 18ch;
}

.section-lead {
  margin: 0 0 2rem;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat {
  padding: 1.2rem 0;
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--ocean), var(--foam)) 1;
  transition: transform 0.35s ease;
}
.reveal.is-visible .stat:nth-child(1) { transition-delay: 0.05s; }
.reveal.is-visible .stat:nth-child(2) { transition-delay: 0.15s; }
.reveal.is-visible .stat:nth-child(3) { transition-delay: 0.25s; }
.stat:hover { transform: translateY(-3px); }

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 600;
  color: var(--sea-deep);
}

.stat-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}

.about-copy {
  display: grid;
  gap: 1rem;
  max-width: 42rem;
}
.about-copy p { margin: 0; font-size: 1.02rem; }

.track-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.track-link {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "index name" "index desc";
  column-gap: 1.25rem;
  row-gap: 0.35rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.35s ease, background 0.35s ease;
}
.track-link:hover {
  padding-left: 0.6rem;
  background: linear-gradient(90deg, rgba(184, 232, 255, 0.45), transparent 55%);
}
.track-index {
  grid-area: index;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ocean);
  padding-top: 0.2rem;
}
.track-name {
  grid-area: name;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.3vw, 1.4rem);
  font-weight: 600;
  color: var(--sea-deep);
}
.track-desc {
  grid-area: desc;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 36rem;
}

.rules {
  background: linear-gradient(180deg, transparent, rgba(184, 232, 255, 0.22) 30%, transparent);
}

.rules-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.rules-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.35rem 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  transition: transform 0.3s ease;
}
.rules-steps li:hover { transform: translateX(4px); }
.rules-steps li::before {
  content: counter(step, decimal-leading-zero);
  grid-row: 1 / span 2;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ocean);
  padding-top: 0.15rem;
}
.rules-steps strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--sea-deep);
}
.rules-steps span { color: var(--muted); font-size: 0.98rem; }

.cups-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-top: 1.75rem;
  justify-content: flex-start;
}
.cup-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--sea-deep);
}
.cup-chip svg {
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
  flex-shrink: 0;
}
.cup-chip.bronze span { color: #8a4a22; }
.cup-chip.silver span { color: #5a6b78; }
.cup-chip.gold span { color: #9a7a18; }

/* How-to journey */
.howto {
  background:
    radial-gradient(700px 280px at 90% 10%, rgba(184, 232, 255, 0.4), transparent 60%),
    linear-gradient(180deg, rgba(184, 232, 255, 0.18), transparent 72%);
  overflow: hidden;
}

.howto-journey {
  position: relative;
  margin-top: 0.5rem;
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.howto-journey.is-inview {
  opacity: 1;
  transform: none;
}

.howto-counter {
  margin: 0 0 1.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ocean);
}

.howto-track {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 3.15rem;
  height: 3px;
  pointer-events: none;
}
.howto-track-line,
.howto-track-fill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
}
.howto-track-line {
  background: rgba(11, 79, 140, 0.12);
}
.howto-track-fill {
  right: auto;
  background: linear-gradient(90deg, var(--foam), var(--ocean));
  transition: width 0.45s ease;
  width: var(--howto-progress, 0%);
}

.howto-nodes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  position: relative;
  z-index: 1;
  margin-bottom: 1.4rem;
}

.howto-node {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 0.2rem;
  color: var(--muted);
  font: inherit;
  transition: color 0.25s ease, transform 0.25s ease;
}
.howto-node:hover { color: var(--sea-deep); }
.howto-node:focus-visible {
  outline: 2px solid var(--ocean);
  outline-offset: 4px;
  border-radius: 12px;
}

.howto-node-num {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.howto-node-icon {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid rgba(11, 79, 140, 0.12);
  box-shadow: 0 8px 22px rgba(11, 79, 140, 0.06);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.howto-node-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.howto-node-label {
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
}

.howto-node.is-done .howto-node-icon {
  border-color: rgba(43, 157, 224, 0.4);
  background: rgba(184, 232, 255, 0.35);
  color: var(--ocean);
}
.howto-node.is-active {
  color: var(--sea-deep);
  transform: translateY(-2px);
}
.howto-node.is-active .howto-node-icon {
  background: linear-gradient(145deg, var(--sea-deep), var(--ocean));
  border-color: var(--sea-deep);
  color: #fff;
  box-shadow:
    0 0 0 5px rgba(184, 232, 255, 0.45),
    0 12px 28px rgba(11, 79, 140, 0.2);
  transform: scale(1.08);
}
.howto-node.is-active .howto-node-num {
  opacity: 1;
  color: var(--ocean);
}

.howto-panel {
  position: relative;
  min-height: 9.5rem;
  padding: 1.35rem 1.4rem 1.45rem;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(232, 246, 255, 0.95));
  border: 1px solid rgba(11, 79, 140, 0.1);
  box-shadow: 0 16px 40px rgba(11, 79, 140, 0.08);
}
.howto-panel::before {
  content: "";
  position: absolute;
  left: 1.2rem;
  top: -8px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-left: 1px solid rgba(11, 79, 140, 0.1);
  border-top: 1px solid rgba(11, 79, 140, 0.1);
  transform: rotate(45deg);
}

.howto-panel-inner {
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.howto-panel-inner.is-switching {
  opacity: 0;
  transform: translateY(6px);
}

.howto-panel-title {
  display: block;
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 600;
  color: var(--sea-deep);
  letter-spacing: -0.01em;
}

.howto-panel-text {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.howto-panel-actions {
  margin-top: 1rem;
}

.howto-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  background: var(--sea-deep);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.howto-cta:hover {
  background: var(--ocean);
  transform: translateY(-1px);
}
.howto-cta-survey {
  background: var(--ocean);
}
.howto-cta-survey:hover {
  background: var(--sea-deep);
}

@media (max-width: 800px) {
  .howto-track {
    left: 1.45rem;
    right: auto;
    top: 0.6rem;
    bottom: auto;
    width: 3px;
    height: calc(100% - 11rem);
  }
  .howto-track-line,
  .howto-track-fill {
    width: 100%;
  }
  .howto-track-fill {
    height: var(--howto-progress, 0%);
    width: 100% !important;
    bottom: auto;
    transition: height 0.45s ease;
  }

  .howto-nodes {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    padding-left: 0.15rem;
    margin-bottom: 1rem;
  }
  .howto-node {
    grid-template-columns: 3.1rem 1fr;
    grid-template-rows: auto auto;
    justify-items: start;
    column-gap: 0.85rem;
    row-gap: 0.1rem;
    text-align: left;
    padding: 0.35rem 0.2rem;
  }
  .howto-node-icon {
    grid-row: 1 / span 2;
    width: 2.7rem;
    height: 2.7rem;
  }
  .howto-node-num { grid-column: 2; }
  .howto-node-label {
    grid-column: 2;
    text-align: left;
    font-size: 0.95rem;
  }
  .howto-panel::before { display: none; }
  .howto-panel { min-height: 0; }
}

.activities-shell {
  padding: 1rem 0 2rem;
}

.cta-section { padding-top: 1rem; padding-bottom: clamp(3rem, 6vw, 4.5rem); }

.cta-panel {
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem) 1.4rem;
  border-radius: 24px;
  background:
    radial-gradient(600px 200px at 80% 0%, rgba(184, 232, 255, 0.35), transparent 60%),
    linear-gradient(135deg, #074A8C 0%, var(--sea-mid) 48%, #3AA8E8 100%);
  color: var(--white);
  box-shadow: 0 20px 50px rgba(11, 79, 140, 0.18);
  position: relative;
  overflow: hidden;
}
.cta-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,0.12) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: ctaShine 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ctaShine {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}

.cta-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 600;
}

.cta-text {
  margin: 0 0 1.4rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.02rem;
}

.site-footer {
  padding: 2.5rem 0 2.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  background: linear-gradient(180deg, rgba(11, 79, 140, 0.03), transparent 40%);
}
.footer-inner {
  display: grid;
  gap: 1.5rem;
}
.footer-brand {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  justify-content: space-between;
  align-items: baseline;
}
.footer-inner p { margin: 0; }
.footer-project { color: var(--ink); font-weight: 700; }
.footer-note { font-weight: 600; color: var(--sea-deep); }

.footer-ministries {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.footer-ministry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 0.75rem 0.5rem;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.footer-ministry:hover {
  color: var(--sea-deep);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
}
.footer-ministry img {
  display: block;
  width: auto;
  height: 48px;
  object-fit: contain;
}

.footer-contacts {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: rgba(11, 79, 140, 0.05);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.45;
}
.footer-contacts a {
  color: var(--sea-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-contacts a:hover { color: var(--sea-mid); }

.footer-legal {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--line);
}
.footer-copy {
  color: var(--ink);
  line-height: 1.5;
}
.footer-copy a {
  color: var(--sea-deep);
  font-weight: 600;
  text-decoration: none;
}
.footer-copy a:hover { text-decoration: underline; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: center;
}
.footer-links a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-links a:hover { color: var(--sea-deep); }
.footer-sep { color: var(--line); }

@media (max-width: 860px) {
  .footer-ministries { grid-template-columns: 1fr; }
  .footer-ministry { flex-direction: row; text-align: left; justify-content: flex-start; }
  .footer-ministry img { height: 42px; flex-shrink: 0; }
  .nav { display: none; }
  .logo { margin-right: auto; }
  .header-link { padding: 0.42rem 0.75rem; font-size: 0.72rem; }
  .header-admin { padding: 0.4rem 0.55rem; font-size: 0.72rem; }
  .hero {
    min-height: calc(100vw * 341 / 1024 + 11rem);
    padding: 5.5rem 0 4.5rem;
    align-items: center;
  }
  .about-stats { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 640px) {
  :root { --wrap: min(1100px, calc(100% - 1.5rem)); }
  .header-inner { min-height: 3.5rem; gap: 0.5rem; }
  .logo { font-size: 0.72rem; max-width: 38%; overflow: hidden; text-overflow: ellipsis; }
  .header-cta { padding: 0.45rem 0.75rem; font-size: 0.75rem; }
  .btn { width: 100%; }
  .hero-actions { width: 100%; }
  .track-link {
    grid-template-columns: 1fr;
    grid-template-areas: "index" "name" "desc";
  }
  .rules-steps li { grid-template-columns: 2.4rem 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .wave-1, .wave-2, .wave-3,
  .hero-glow, .hero-glow-2, .hero-sun, .hero-sky,
  .seagull, .seagull .wing,
  .cta-panel::before,
  .hero-anim {
    animation: none !important;
  }
  .hero-anim {
    opacity: 1;
    transform: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none !important;
  }
  .howto-journey,
  .howto-track-fill,
  .howto-node,
  .howto-node-icon,
  .howto-panel-inner,
  .howto-cta {
    transition: none !important;
  }
  .howto-journey {
    opacity: 1;
    transform: none;
  }
}


/* Apply modal */
.apply-modal[hidden] { display: none !important; }
.apply-modal {
  position: fixed !important;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.apply-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 40, 80, 0.55);
}
.apply-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(90vh, 760px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  padding: 1.4rem 1.35rem 1.5rem;
  box-shadow: 0 24px 60px rgba(11, 79, 140, 0.28);
}
.apply-modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.apply-modal-title {
  margin: 0 1.5rem 0.35rem 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--sea-deep);
}
.apply-modal-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.apply-form {
  display: grid;
  gap: 0.75rem;
}
.apply-label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.apply-optional { text-transform: none; font-weight: 600; letter-spacing: 0; }
.apply-label input,
.apply-label select {
  border: 1.5px solid rgba(11, 79, 140, 0.18);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--sea-deep);
  text-transform: none;
  letter-spacing: 0;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.apply-label input[readonly] {
  background: #F5FBFF;
  color: #3d5a6f;
}
.apply-error {
  margin: 0;
  color: #b42318;
  font-weight: 700;
  font-size: 0.9rem;
}
.apply-success {
  margin: 0;
  color: #1a8a5a;
  font-weight: 700;
  font-size: 0.9rem;
}
.apply-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 0.4rem;
}
.apply-btn {
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1.5px solid transparent;
}
.apply-btn-primary {
  background: linear-gradient(135deg, var(--sea-deep), var(--ocean));
  color: #fff;
}
.apply-btn-primary:hover { filter: brightness(1.06); }
.apply-btn-primary:disabled { opacity: 0.6; cursor: wait; }
.apply-btn-ghost {
  background: #fff;
  border-color: rgba(11, 79, 140, 0.18);
  color: var(--sea-deep);
}
button.join-participate {
  border: 0;
  cursor: pointer;
}

/* Fullscreen activities timeline modal */
body.timeline-modal-open {
  overflow: hidden;
  touch-action: none;
}

.timeline-modal[hidden] { display: none !important; }
.timeline-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
  font-family: var(--font-body);
  color: var(--ink);
}
.timeline-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 32, 64, 0.58);
}
.timeline-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100dvh;
  min-width: 0;
  box-sizing: border-box;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(184, 232, 255, 0.45), transparent 55%),
    linear-gradient(180deg, #FFFFFF 0%, #F5FBFF 55%, #EEF7FF 100%);
  overflow: hidden;
}
.timeline-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  min-width: 0;
  box-sizing: border-box;
}
.timeline-modal-heading {
  min-width: 0;
  flex: 1;
}
.timeline-modal-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  font-weight: 600;
  color: var(--sea-deep);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.timeline-modal-lead {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 42rem;
  overflow-wrap: anywhere;
}
.timeline-modal-close {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 79, 140, 0.08);
  color: var(--sea-deep);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.timeline-modal-close:hover,
.timeline-modal-close:focus-visible {
  background: rgba(11, 79, 140, 0.16);
  outline: none;
}

.timeline-track-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.72);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.timeline-filter-btn {
  border: 1.5px solid rgba(11, 79, 140, 0.16);
  background: #fff;
  color: var(--sea-deep);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.timeline-filter-btn:hover {
  border-color: var(--sea-deep);
}
.timeline-filter-btn.is-active {
  background: var(--sea-deep);
  border-color: var(--sea-deep);
  color: #fff;
}
.timeline-filter-btn[data-track="vladivostok"].is-active { background: #0077be; border-color: #0077be; }
.timeline-filter-btn[data-track="kray"].is-active { background: #1a8a5a; border-color: #1a8a5a; }
.timeline-filter-btn[data-track="sebya"].is-active { background: #a14fa0; border-color: #a14fa0; }
.timeline-filter-btn[data-track="karyera"].is-active { background: #e07b1a; border-color: #e07b1a; }

.timeline-modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 1.25rem 1.25rem;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  box-sizing: border-box;
}
.timeline-empty {
  margin: 2rem auto;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

/* Horizontal Gantt */
.timeline-gantt {
  --gantt-label-w: 200px;
  --gantt-row-h: 38px;
  --track-color: #0077be;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  border: 1.5px solid rgba(11, 79, 140, 0.12);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.timeline-gantt-scroll {
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.timeline-gantt-inner {
  min-width: calc(var(--gantt-label-w) + var(--gantt-min, 960px));
  width: max-content;
  max-width: none;
}
.timeline-gantt-header,
.timeline-gantt-footer,
.timeline-gantt-row {
  display: grid;
  grid-template-columns: var(--gantt-label-w) minmax(0, 1fr);
  min-width: 100%;
}
.timeline-gantt-corner,
.timeline-gantt-label {
  position: sticky;
  left: 0;
  z-index: 3;
  width: var(--gantt-label-w);
  box-sizing: border-box;
  background: #fff;
  border-right: 1px solid rgba(11, 79, 140, 0.12);
}
.timeline-gantt-corner {
  z-index: 4;
  padding: 0.55rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid rgba(11, 79, 140, 0.12);
  display: flex;
  align-items: center;
}
.timeline-gantt-corner-axis {
  border-bottom: 0;
  border-top: 1px solid rgba(11, 79, 140, 0.12);
  min-height: 2rem;
}
.timeline-gantt-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
}
.timeline-gantt-scale,
.timeline-gantt-lane,
.timeline-gantt-axis {
  position: relative;
  min-width: var(--gantt-min, 960px);
  box-sizing: border-box;
}
.timeline-gantt-scale {
  height: 2.6rem;
  border-bottom: 1px solid rgba(11, 79, 140, 0.12);
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent calc(100% / 7 - 1px),
      rgba(11, 79, 140, 0.05) calc(100% / 7 - 1px),
      rgba(11, 79, 140, 0.05) calc(100% / 7)
    );
}
.timeline-gantt-month {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  padding: 0 0.45rem;
  border-right: 1px solid rgba(11, 79, 140, 0.1);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sea-deep);
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
}
.timeline-gantt-row {
  --track-color: #0077be;
  --track-soft: rgba(0, 119, 190, 0.14);
  height: var(--gantt-row-h);
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
}
.timeline-gantt-row.track-vladivostok { --track-color: #0077be; --track-soft: rgba(0, 119, 190, 0.14); }
.timeline-gantt-row.track-kray { --track-color: #1a8a5a; --track-soft: rgba(26, 138, 90, 0.14); }
.timeline-gantt-row.track-sebya { --track-color: #a14fa0; --track-soft: rgba(161, 79, 160, 0.14); }
.timeline-gantt-row.track-karyera { --track-color: #e07b1a; --track-soft: rgba(224, 123, 26, 0.14); }
.timeline-gantt-row:nth-child(even) .timeline-gantt-lane {
  background: rgba(11, 79, 140, 0.025);
}
.timeline-gantt-row:hover .timeline-gantt-label,
.timeline-gantt-row:focus-visible .timeline-gantt-label {
  background: #F5FBFF;
}
.timeline-gantt-row:focus-visible {
  outline: none;
}
.timeline-gantt-row:focus-visible .timeline-gantt-bar,
.timeline-gantt-row.is-flash .timeline-gantt-bar {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--track-color) 35%, transparent);
  filter: brightness(1.05);
}
.timeline-gantt-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.65rem;
  height: var(--gantt-row-h);
  border-bottom: 1px solid rgba(11, 79, 140, 0.06);
  overflow: hidden;
}
.timeline-gantt-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--track-color);
  flex-shrink: 0;
}
.timeline-gantt-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.timeline-gantt-lane {
  height: var(--gantt-row-h);
  border-bottom: 1px solid rgba(11, 79, 140, 0.06);
}
.timeline-gantt-bar {
  position: absolute;
  top: 8px;
  height: calc(var(--gantt-row-h) - 16px);
  min-width: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--track-color), color-mix(in srgb, var(--track-color) 75%, #fff));
  box-shadow: 0 2px 8px color-mix(in srgb, var(--track-color) 28%, transparent);
  display: flex;
  align-items: center;
  padding: 0 0.55rem;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 1;
}
.timeline-gantt-bar-text {
  font-size: 0.68rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}
.timeline-gantt-past {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: rgba(15, 47, 74, 0.05);
  pointer-events: none;
  z-index: 0;
}
.timeline-gantt-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #e23d3d;
  pointer-events: none;
  z-index: 2;
}
.timeline-gantt-today-head {
  top: auto;
  bottom: 0;
  height: 100%;
}
.timeline-gantt-today-label {
  position: absolute;
  top: 0.2rem;
  left: 0.35rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c62828;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
.timeline-gantt-footer {
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: #fff;
}
.timeline-gantt-axis {
  height: 2.1rem;
  border-top: 1px solid rgba(11, 79, 140, 0.12);
  background: #F8FCFF;
}
.timeline-gantt-tick {
  position: absolute;
  top: 0.35rem;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  pointer-events: none;
}

.timeline-gantt-undated {
  flex: 0 0 auto;
  max-height: 28vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.25rem;
}
.timeline-gantt-undated-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}
.timeline-gantt-undated-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.timeline-gantt-undated-item {
  --track-color: #0077be;
  display: grid;
  grid-template-columns: 0.55rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  background: #fff;
  border: 1.5px solid rgba(11, 79, 140, 0.12);
  border-radius: 12px;
  cursor: pointer;
}
.timeline-gantt-undated-item.track-vladivostok { --track-color: #0077be; }
.timeline-gantt-undated-item.track-kray { --track-color: #1a8a5a; }
.timeline-gantt-undated-item.track-sebya { --track-color: #a14fa0; }
.timeline-gantt-undated-item.track-karyera { --track-color: #e07b1a; }
.timeline-gantt-undated-item.is-flash {
  border-color: var(--track-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--track-color) 25%, transparent);
}
.timeline-gantt-undated-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.timeline-gantt-undated-dates {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.activity-card.is-timeline-flash {
  outline: 3px solid var(--track-color, #0B4F8C);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--track-color, #0B4F8C) 22%, transparent);
  transition: outline-color 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 640px) {
  .timeline-modal-header {
    padding: 0.9rem 0.9rem 0.65rem;
  }
  .timeline-modal-lead {
    font-size: 0.85rem;
  }
  .timeline-track-filters {
    padding: 0.7rem 0.9rem;
    gap: 0.35rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .timeline-track-filters::-webkit-scrollbar { display: none; }
  .timeline-filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.78rem;
    padding: 0.38rem 0.75rem;
  }
  .timeline-modal-body {
    padding: 0.35rem 0.5rem 2rem;
  }
  .timeline-gantt {
    --gantt-label-w: 118px;
    --gantt-row-h: 34px;
    border-radius: 10px;
  }
  .timeline-gantt-name {
    font-size: 0.7rem;
  }
  .timeline-gantt-bar-text {
    font-size: 0.62rem;
  }
  .timeline-gantt-month {
    font-size: 0.68rem;
    padding: 0 0.3rem;
  }
  .timeline-gantt-undated-item {
    grid-template-columns: 0.55rem minmax(0, 1fr);
  }
  .timeline-gantt-undated-dates {
    grid-column: 2;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-modal-close,
  .timeline-filter-btn,
  .timeline-gantt-bar,
  .activity-card.is-timeline-flash {
    transition: none;
  }
}
