/* ============================================================
   SHIPYARD — Apple-style design system
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-dark: #000000;
  --bg-dark-alt: #0b0b0f;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: #d2d2d7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --teal: #30b0c7;
  --green: #34c759;
  --orange: #ff9500;
  --red: #ff3b30;
  --violet: #af52de;
  --radius-l: 28px;
  --radius-m: 18px;
  --radius-s: 12px;
  --nav-h: 52px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", "Segoe UI", Inter, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", Consolas, Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

::selection { background: rgba(0,113,227,.18); }

/* ---------- typography ---------- */

.display {
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1.03;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.headline {
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.07;
  font-weight: 700;
  letter-spacing: -0.018em;
}

.title {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -0.014em;
}

.sub {
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.35;
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: -0.012em;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.gradient-text {
  background: linear-gradient(100deg, #0090f7 0%, #30b0c7 55%, #34c759 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 980px;
  padding: 12px 24px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  text-decoration: none !important;
  white-space: nowrap;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); }

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-ghost:hover { background: var(--accent); color: #fff; }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #333; }

.btn-sm { padding: 8px 18px; font-size: 14px; }
.btn-lg { padding: 16px 34px; font-size: 19px; }

.link-arrow { font-size: 17px; font-weight: 500; }
.link-arrow::after { content: " ›"; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(251,251,253,.82);
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.nav-inner {
  max-width: 1024px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 22px;
}

.nav-logo {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .anchor { font-size: 19px; }

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  align-items: center;
}

.nav-links a {
  color: rgba(0,0,0,.8);
  font-size: 13px;
  letter-spacing: -0.01em;
  text-decoration: none !important;
  transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 6px 14px;
  border-radius: 980px;
  font-size: 13px;
}
.nav-cta:hover { background: var(--accent-hover); color: #fff !important; }

/* ---------- landing sections ---------- */

.section { padding: 110px 22px; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); color: #f5f5f7; }
.section-dark .sub { color: #a1a1a6; }

.wrap { max-width: 1024px; margin: 0 auto; }
.wrap-narrow { max-width: 780px; margin: 0 auto; }
.center { text-align: center; }

/* hero */

.hero {
  padding: 140px 22px 100px;
  text-align: center;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(0,144,247,.08), transparent 70%),
    var(--bg);
}

.hero .sub { max-width: 640px; margin: 26px auto 0; }

.hero-cta { margin-top: 38px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-note { margin-top: 22px; font-size: 14px; color: var(--ink-3); }

/* stat strip */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  background: var(--bg);
  padding: 40px 24px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat span { color: var(--ink-2); font-size: 15px; }

/* cards */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--bg);
  border-radius: var(--radius-l);
  padding: 36px 32px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 30px rgba(0,0,0,.05);
}

.section-alt .card { box-shadow: 0 2px 12px rgba(0,0,0,.06); }

.card .icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
  background: var(--bg-alt);
}

.card h3 { font-size: 21px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.012em; }
.card p { color: var(--ink-2); font-size: 16px; }

.card-dark {
  background: #1c1c1e;
  color: #f5f5f7;
  box-shadow: none;
}
.card-dark p { color: #a1a1a6; }
.card-dark .icon { background: #2c2c2e; }

/* compare (не курс / команда) */

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; }
.compare-row { display: contents; }

.compare-cell {
  padding: 20px 24px;
  border-radius: var(--radius-m);
  font-size: 16px;
}

.compare-no { background: #1c1c1e; color: #86868b; text-decoration: line-through; text-decoration-color: rgba(255,59,48,.6); }
.compare-yes { background: #1c1c1e; color: #f5f5f7; font-weight: 500; }
.compare-yes b { color: var(--teal); }

/* timeline (8 weeks) */

.timeline { margin-top: 60px; position: relative; }

.tl-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.tl-item:last-child { border-bottom: none; }

.tl-week {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-3);
  padding-top: 4px;
}

.tl-week b { display: block; font-size: 34px; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; }

.tl-body h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.012em; }
.tl-body .phase { color: var(--accent); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.tl-body p { color: var(--ink-2); margin-top: 8px; font-size: 16px; }

.tl-artifact {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  background: var(--bg-alt);
  padding: 7px 14px;
  border-radius: 980px;
}

.gate-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 6px 112px;
  background: linear-gradient(90deg, #0071e3, #30b0c7);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 980px;
  letter-spacing: .02em;
}

/* rhythm strip */

.rhythm { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 48px; }

.rhythm-day {
  background: var(--bg);
  border-radius: var(--radius-m);
  padding: 26px 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.rhythm-day b { display: block; font-size: 13px; color: var(--accent); letter-spacing: .1em; margin-bottom: 8px; }
.rhythm-day h4 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.rhythm-day p { font-size: 14px; color: var(--ink-2); }

/* levels rail */

.levels-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 48px 22px 28px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.levels-rail::-webkit-scrollbar { height: 0; }

.level-card {
  flex: 0 0 250px;
  scroll-snap-align: start;
  background: #16161a;
  border: 1px solid #2c2c2e;
  border-radius: var(--radius-l);
  padding: 30px 26px;
  color: #f5f5f7;
}

.level-card .lv-num { font-size: 13px; color: var(--teal); font-weight: 600; letter-spacing: .1em; }
.level-card .lv-emoji { font-size: 40px; margin: 16px 0 12px; }
.level-card h4 { font-size: 20px; font-weight: 600; }
.level-card small { color: #a1a1a6; font-size: 14px; display: block; margin-top: 8px; line-height: 1.4; }

/* pricing */

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; margin-top: 56px; align-items: stretch; }

.price-card {
  background: var(--bg);
  border-radius: var(--radius-l);
  padding: 40px 34px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  position: relative;
}

.price-card.featured {
  box-shadow: 0 0 0 2px var(--accent), 0 16px 44px rgba(0,113,227,.18);
}

.price-badge {
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 980px;
  letter-spacing: .04em;
  white-space: nowrap;
}

.price-card h3 { font-size: 26px; font-weight: 700; letter-spacing: -0.015em; }
.price-card .who { color: var(--ink-2); font-size: 15px; margin: 8px 0 22px; min-height: 42px; }
.price-card .amount { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.price-card .amount small { font-size: 15px; color: var(--ink-3); font-weight: 400; }

.price-card ul { list-style: none; margin: 26px 0 30px; flex: 1; }
.price-card li { padding: 9px 0; font-size: 15px; display: flex; gap: 10px; align-items: flex-start; border-bottom: 1px solid var(--bg-alt); }
.price-card li:last-child { border-bottom: none; }
.price-card li .tick { color: var(--green); font-weight: 700; flex: 0 0 auto; }
.price-card li .no { color: var(--line); flex: 0 0 auto; }
.price-card li.off { color: var(--ink-3); }

/* faq */

.faq { max-width: 780px; margin: 48px auto 0; }

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 40px 22px 4px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.012em;
  position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  font-weight: 300;
  color: var(--ink-3);
  transition: transform .25s;
}

.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq .faq-body { padding: 0 4px 24px; color: var(--ink-2); font-size: 16px; max-width: 680px; }

/* footer */

.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 44px 22px;
  font-size: 13px;
  color: var(--ink-3);
}

.footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
.footer a { color: var(--ink-2); }

/* reveal animation */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.25,.1,.25,1), transform .7s cubic-bezier(.25,.1,.25,1); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   APP (platform)
   ============================================================ */

.app-body { background: var(--bg-alt); min-height: 100vh; }

.app-shell { display: flex; min-height: 100vh; }

/* sidebar */

.sidebar {
  width: 264px;
  flex: 0 0 264px;
  background: rgba(246,246,248,.9);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(0,0,0,.07);
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar .brand {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .04em;
  padding: 6px 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none !important;
}

.side-group { margin-bottom: 18px; }

.side-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-3);
  padding: 0 12px 8px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-align: left;
  transition: background .15s;
}

.side-link:hover { background: rgba(0,0,0,.05); }
.side-link.active { background: var(--accent); color: #fff; }
.side-link .em { width: 22px; text-align: center; font-size: 16px; }
.side-link .pill {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  background: rgba(0,0,0,.08);
  border-radius: 980px;
  padding: 2px 8px;
}
.side-link.active .pill { background: rgba(255,255,255,.25); }

.side-user {
  margin-top: auto;
  padding: 14px 12px;
  border-top: 1px solid rgba(0,0,0,.08);
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0090f7, #30b0c7);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 15px;
  flex: 0 0 auto;
}

.side-user b { display: block; font-size: 14px; }
.side-user small { color: var(--ink-3); font-size: 12px; }

/* main */

.main { flex: 1; min-width: 0; padding: 34px 38px 80px; }
.main-inner { max-width: 1060px; margin: 0 auto; }

.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
.page-head p { color: var(--ink-2); margin-top: 6px; font-size: 16px; }

/* panels */

.panel {
  background: var(--bg);
  border-radius: var(--radius-m);
  padding: 26px 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  margin-bottom: 20px;
}

.panel h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.012em; margin-bottom: 6px; }
.panel .muted { color: var(--ink-2); font-size: 14.5px; }

.panel-row { display: grid; gap: 20px; margin-bottom: 20px; }
.panel-row.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.panel-row.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.panel-row .panel { margin-bottom: 0; }

/* hero card on dashboard */

.hero-card {
  background: linear-gradient(120deg, #06283d 0%, #0b3a55 55%, #10505f 100%);
  color: #fff;
  border-radius: var(--radius-l);
  padding: 34px 36px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "⚓";
  position: absolute;
  right: -10px; bottom: -34px;
  font-size: 180px;
  opacity: .07;
}

.hero-card .hc-label { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #7fd4e4; font-weight: 600; }
.hero-card h1 { font-size: 30px; font-weight: 700; margin: 10px 0 6px; letter-spacing: -0.018em; }
.hero-card p { color: rgba(255,255,255,.75); font-size: 15.5px; max-width: 560px; }

.hc-stats { display: flex; gap: 34px; margin-top: 24px; flex-wrap: wrap; }
.hc-stats b { display: block; font-size: 26px; font-weight: 700; }
.hc-stats span { font-size: 13px; color: rgba(255,255,255,.65); }

/* progress bar */

.bar { height: 8px; background: var(--bg-alt); border-radius: 980px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #0071e3, #30b0c7); border-radius: 980px; transition: width .5s cubic-bezier(.4,0,.2,1); }

.hero-card .bar { background: rgba(255,255,255,.15); margin-top: 22px; }
.hero-card .bar > i { background: linear-gradient(90deg, #4cc2ff, #7fffd4); }

/* stat tiles */

.tile { text-align: left; }
.tile .t-num { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
.tile .t-cap { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.tile .t-icon { font-size: 22px; margin-bottom: 10px; }

/* track phases */

.phase-card {
  background: var(--bg);
  border-radius: var(--radius-m);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  margin-bottom: 16px;
  overflow: hidden;
}

.phase-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  cursor: pointer;
  user-select: none;
}

.phase-head:hover { background: #fafafa; }

.phase-num {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex: 0 0 auto;
}

.phase-card.done .phase-num { background: var(--green); color: #fff; }
.phase-card.current .phase-num { background: var(--accent); color: #fff; }
.phase-card.locked { opacity: .55; }

.phase-title { flex: 1; min-width: 0; }
.phase-title b { display: block; font-size: 17px; letter-spacing: -0.01em; }
.phase-title small { color: var(--ink-2); font-size: 13px; }

.phase-state { font-size: 13px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.phase-card.done .phase-state { color: var(--green); }
.phase-card.current .phase-state { color: var(--accent); }

.phase-body { border-top: 1px solid var(--bg-alt); padding: 20px 24px 24px; display: none; }
.phase-card.open .phase-body { display: block; }

.task {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-alt);
  font-size: 15px;
}
.task:last-of-type { border-bottom: none; }

.task input[type="checkbox"] {
  appearance: none;
  width: 22px; height: 22px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  flex: 0 0 auto;
  position: relative;
  transition: all .2s;
  margin-top: 1px;
}

.task input[type="checkbox"]:checked { background: var(--green); border-color: var(--green); }
.task input[type="checkbox"]:checked::after {
  content: "✓";
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
}

.task label { cursor: pointer; flex: 1; }
.task.done-task label { color: var(--ink-3); text-decoration: line-through; }
.task .pts { font-size: 12px; font-weight: 600; color: var(--teal); white-space: nowrap; margin-top: 3px; }

.artifact-box {
  margin-top: 16px;
  background: var(--bg-alt);
  border-radius: var(--radius-s);
  padding: 14px 18px;
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.gate-banner {
  margin: 6px 0 16px;
  border-radius: var(--radius-m);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14.5px;
  background: linear-gradient(90deg, rgba(0,113,227,.08), rgba(48,176,199,.08));
  border: 1px dashed rgba(0,113,227,.4);
}

.gate-banner.passed { background: rgba(52,199,89,.08); border-color: rgba(52,199,89,.5); }
.gate-banner b { font-weight: 700; }
.gate-banner .g-badge {
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 980px;
  flex: 0 0 auto;
}
.gate-banner.passed .g-badge { background: var(--green); }

/* demo wall */

.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }

.demo-card {
  background: var(--bg);
  border-radius: var(--radius-m);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demo-card .d-head { display: flex; align-items: center; gap: 12px; }
.demo-card .d-head b { font-size: 15px; display: block; }
.demo-card .d-head small { color: var(--ink-3); font-size: 12.5px; }
.demo-card .d-week { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--accent); background: rgba(0,113,227,.09); padding: 4px 10px; border-radius: 980px; white-space: nowrap; }
.demo-card p { font-size: 14.5px; color: var(--ink-2); flex: 1; }

.d-actions { display: flex; align-items: center; gap: 12px; }

.vote-btn {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 980px;
  padding: 6px 16px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all .2s;
}
.vote-btn:hover { border-color: var(--accent); color: var(--accent); }
.vote-btn.voted { background: var(--accent); border-color: var(--accent); color: #fff; }

/* league table */

.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.table td { padding: 14px; border-bottom: 1px solid var(--bg-alt); }
.table tr:last-child td { border-bottom: none; }
.table tr.me td { background: rgba(0,113,227,.06); }
.table tr.me td:first-child { border-radius: 10px 0 0 10px; }
.table tr.me td:last-child { border-radius: 0 10px 10px 0; }

.rank-medal { font-size: 18px; }

.lvl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--bg-alt);
  padding: 4px 12px;
  border-radius: 980px;
  white-space: nowrap;
}

/* knowledge base */

.kb-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }

.kb-tab {
  border: none;
  background: var(--bg);
  border-radius: 980px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  transition: all .2s;
}
.kb-tab.active { background: var(--ink); color: #fff; }

.kb-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--bg-alt);
}
.kb-item:last-child { border-bottom: none; }
.kb-item .k-icon { font-size: 22px; width: 40px; height: 40px; background: var(--bg-alt); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.kb-item b { display: block; font-size: 15.5px; }
.kb-item small { color: var(--ink-2); font-size: 13.5px; }
.kb-item .k-type { margin-left: auto; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); white-space: nowrap; padding-top: 4px; }

pre.code {
  background: #0b0b0f;
  color: #e6e6eb;
  border-radius: var(--radius-s);
  padding: 20px 22px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  overflow-x: auto;
  margin-top: 14px;
}

pre.code .c { color: #6e7681; }
pre.code .h { color: #7fd4e4; font-weight: 600; }

/* материал базы знаний — режим чтения */

.kb-item.kb-open { cursor: pointer; border-radius: 10px; transition: background .15s ease; }
.kb-item.kb-open:hover { background: var(--bg-alt); }

.doc { max-width: 760px; font-size: 16px; line-height: 1.62; color: var(--ink); }
.doc .lead { font-size: 18px; line-height: 1.55; color: var(--ink-2); margin-bottom: 26px; }
.doc h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; margin: 30px 0 10px; }
.doc h3:first-child { margin-top: 0; }
.doc p { margin-bottom: 14px; }
.doc ul, .doc ol { margin: 0 0 16px 22px; }
.doc li { margin-bottom: 8px; }
.doc b { font-weight: 600; }
.doc i { color: var(--ink-2); font-style: normal; border-bottom: 1px dashed var(--line); }
.doc pre.code { margin: 6px 0 18px; white-space: pre-wrap; }
.doc blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  color: var(--ink-2);
}

/* security */

.sec-ring-wrap { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; }

.ring { position: relative; width: 130px; height: 130px; flex: 0 0 auto; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-bg { stroke: var(--bg-alt); }
.ring .ring-fg { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(.4,0,.2,1); }
.ring .ring-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ring .ring-label b { font-size: 26px; font-weight: 700; }
.ring .ring-label small { font-size: 11px; color: var(--ink-3); }

.sec-level-tag {
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 980px;
  margin-bottom: 10px;
}
.sec-level-tag.l1 { background: rgba(52,199,89,.12); color: #1d9d46; }
.sec-level-tag.l2 { background: rgba(0,113,227,.1); color: var(--accent); }
.sec-level-tag.l3 { background: rgba(175,82,222,.1); color: var(--violet); }

/* legal */

.legal-step {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--bg-alt);
}
.legal-step:last-child { border-bottom: none; }
.legal-step .wk { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.legal-step b { display: block; font-size: 15.5px; }
.legal-step small { color: var(--ink-2); font-size: 13.5px; }

.status-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 980px;
  white-space: nowrap;
}
.status-chip.done { background: rgba(52,199,89,.13); color: #1d9d46; }
.status-chip.now { background: rgba(0,113,227,.1); color: var(--accent); }
.status-chip.wait { background: var(--bg-alt); color: var(--ink-3); }

/* badges */

.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }

.badge-card {
  background: var(--bg);
  border-radius: var(--radius-m);
  padding: 24px 18px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.badge-card .b-emoji { font-size: 38px; }
.badge-card b { display: block; font-size: 14px; margin-top: 10px; }
.badge-card small { color: var(--ink-3); font-size: 12px; display: block; margin-top: 4px; line-height: 1.35; }
.badge-card.locked { opacity: .38; filter: grayscale(1); }
.badge-card.earned { box-shadow: 0 0 0 1.5px var(--green), 0 6px 18px rgba(52,199,89,.15); }

/* demo day */

.dd-count { display: flex; gap: 18px; margin: 22px 0; flex-wrap: wrap; }
.dd-unit {
  background: var(--bg);
  border-radius: var(--radius-m);
  padding: 20px 26px;
  min-width: 96px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.dd-unit b { display: block; font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.dd-unit span { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }

.req { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--bg-alt); font-size: 15px; }
.req:last-child { border-bottom: none; }
.req .r-ic { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.req.ok .r-ic { background: rgba(52,199,89,.15); color: #1d9d46; }
.req.no .r-ic { background: var(--bg-alt); color: var(--ink-3); }

/* forms */

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,113,227,.12);
}
.field textarea { resize: vertical; min-height: 80px; }

/* форма заявки на лендинге */

.apply-form {
  background: var(--bg);
  border-radius: var(--radius-l);
  padding: 34px 36px;
  margin-top: 36px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.apply-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 20px; }
.apply-form .btn { width: 100%; margin-top: 8px; }
.apply-note { margin-top: 14px; font-size: 13.5px; color: var(--ink-3); text-align: center; }
.apply-note.err { color: #d70015; font-weight: 500; }

/* поле-ловушка: скрыто от людей, доступно ботам */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.apply-done {
  background: var(--bg);
  border-radius: var(--radius-l);
  padding: 34px 36px;
  margin-top: 36px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.apply-done h3 { font-size: 22px; font-weight: 600; letter-spacing: -.015em; margin-bottom: 10px; }
.apply-done p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.apply-copy {
  margin-top: 18px;
  padding: 18px 20px;
  background: var(--bg-alt);
  border-radius: var(--radius-s);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 320px;
  overflow-y: auto;
}
.apply-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* toast */

.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(29,29,31,.92);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 13px 26px;
  border-radius: 980px;
  font-size: 14.5px;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  transition: all .35s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* misc */

.empty {
  text-align: center;
  color: var(--ink-3);
  padding: 40px 20px;
  font-size: 15px;
}

.divider { height: 1px; background: var(--bg-alt); margin: 18px 0; }

.mobile-nav-toggle { display: none; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    z-index: 150;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 0 60px rgba(0,0,0,.15);
    background: #f6f6f8;
  }
  .sidebar.open { transform: none; }
  .main { padding: 74px 18px 60px; }

  .mobile-nav-toggle {
    display: flex;
    position: fixed;
    top: 14px; left: 14px;
    z-index: 160;
    width: 42px; height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(14px);
    align-items: center;
    justify-content: center;
    font-size: 18px;
  }

  .tl-item { grid-template-columns: 58px 1fr; gap: 16px; }
  .gate-chip { margin-left: 74px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .compare { grid-template-columns: 1fr; }
}

/* ============================================================
   Карта пути — игровой экран кабинета
   ============================================================ */

.avatar { overflow: hidden; }
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.avatar.sm { width: 28px; height: 28px; }
.who { display: flex; align-items: center; gap: 10px; }

.notice {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(120deg, #fff8e6, #fffdf5);
  border: 1px solid #f0dca8;
  border-radius: var(--radius-m);
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 14.5px;
  color: #6b5518;
}
.notice b { color: #4a3a06; }

/* шапка карты */

.map-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 22px; flex-wrap: wrap; margin-bottom: 16px;
}
.map-head h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.mh-label { font-size: 12.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.mh-stats { display: flex; gap: 26px; flex-wrap: wrap; }
.mh-stats b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.mh-stats span { font-size: 12.5px; color: var(--ink-3); }

/* сцена */

.map-stage {
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0,0,0,.08);
  margin-bottom: 18px;
  background: #cfeaf9;
  position: relative;
}
.map-stage canvas { display: block; width: 100%; image-rendering: pixelated; }
.map-hint {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 8px 16px;
  font-size: 12.5px;
  color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,.45), transparent);
}

/* полка инструментов */

.tool-shelf {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  background: var(--bg);
  border-radius: var(--radius-m);
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  margin-bottom: 20px;
}
.tool-slot {
  text-align: center;
  padding: 10px 4px 8px;
  border-radius: var(--radius-s);
  background: var(--bg-alt);
  opacity: .4;
  filter: grayscale(1);
  transition: all .3s cubic-bezier(.4,0,.2,1);
}
.tool-slot.has { opacity: 1; filter: none; background: rgba(52,199,89,.12); }
.tool-slot canvas, .tool-slot .door-ic { image-rendering: pixelated; margin: 0 auto; display: block; }
.tool-slot .door-ic { font-size: 26px; line-height: 32px; }
.tool-slot small { display: block; font-size: 10.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.2; }
.tool-slot.door.has { background: rgba(255,204,0,.18); }

/* панель станции */

.station-panel { border-left: 4px solid var(--line); }
.station-panel.is-current { border-left-color: var(--accent); }
.station-panel.is-done { border-left-color: var(--green); }
.station-panel.is-locked { border-left-color: var(--line); }

.sp-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.sp-head b { display: block; font-size: 19px; letter-spacing: -0.012em; }
.sp-head small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.sp-num {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; flex: 0 0 auto;
}
.station-panel.is-current .sp-num { background: var(--accent); color: #fff; }
.station-panel.is-done .sp-num { background: var(--green); color: #fff; }
.sp-nav { margin-left: auto; display: flex; gap: 6px; }
.sp-nav .btn[disabled] { opacity: .35; pointer-events: none; }

.sp-story {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg-alt);
  border-radius: var(--radius-s);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.reward-box {
  display: flex; align-items: center; gap: 14px;
  margin-top: 14px; padding: 14px 16px;
  border-radius: var(--radius-s);
  background: rgba(52,199,89,.1);
}
.reward-box b { display: block; font-size: 15px; }
.reward-box small { color: var(--ink-2); font-size: 13px; }
.reward-box canvas { image-rendering: pixelated; flex: 0 0 auto; }

/* поток: кто где идёт */

.flow-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bg-alt);
}
.flow-row:last-child { border-bottom: none; }
.flow-row.me { background: rgba(0,113,227,.04); border-radius: var(--radius-s); padding-left: 10px; padding-right: 10px; }
.fr-main { flex: 1; min-width: 0; }
.fr-main b { font-size: 14.5px; }
.fr-main small { display: block; color: var(--ink-3); font-size: 12.5px; margin-bottom: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-track { position: relative; height: 6px; background: var(--bg-alt); border-radius: 980px; }
.fr-track > i { display: block; height: 100%; border-radius: 980px; background: linear-gradient(90deg, #0071e3, #34c759); }
.fr-dot {
  position: absolute; top: -3px; width: 12px; height: 12px;
  margin-left: -6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 2px var(--accent);
}
.fr-meta { text-align: right; flex: 0 0 auto; }
.fr-meta small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 3px; }

.dock-chip {
  display: inline-block; padding: 3px 9px; border-radius: 980px;
  font-size: 11.5px; font-weight: 600; background: var(--bg-alt); color: var(--ink-2);
}
.dock-chip.dA { background: rgba(52,199,89,.14); color: #1f7a37; }
.dock-chip.dB { background: rgba(0,113,227,.12); color: #0a5bb5; }
.dock-chip.dC { background: rgba(175,82,222,.14); color: #7a34a8; }

/* скрининг */

.screen-q b { font-size: 16px; }
.screen-opts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.screen-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 980px;
  border: 1px solid var(--line); cursor: pointer;
  font-size: 14px; transition: all .2s;
}
.screen-opt:has(input:checked) { border-color: var(--accent); background: rgba(0,113,227,.07); color: var(--accent); font-weight: 500; }
.screen-opt input { accent-color: var(--accent); }

.disclaimer {
  font-size: 12.5px; color: var(--ink-2);
  background: var(--bg-alt); border-radius: var(--radius-s);
  padding: 12px 14px; margin-bottom: 16px; line-height: 1.45;
}

.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14.5px; margin-top: 8px; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }

/* редактор персонажа */

.avatar-editor { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.avatar-preview {
  width: 96px; height: 96px; border-radius: 22px;
  background: linear-gradient(160deg, #8fd0f5, #cfeaf9);
  padding: 8px; flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.avatar-preview img { width: 100%; height: 100%; image-rendering: pixelated; }
.avatar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.avatar-actions label.btn { cursor: pointer; }

/* GitHub */

.gh-box {
  display: flex; gap: 26px; flex-wrap: wrap; align-items: center;
  background: var(--bg-alt); border-radius: var(--radius-s);
  padding: 16px 18px; margin-bottom: 14px;
}
.gh-stat b { display: block; font-size: 20px; font-weight: 700; }
.gh-stat span { font-size: 12px; color: var(--ink-3); }
.gh-last { flex: 1 1 220px; font-size: 13px; color: var(--ink-2); font-family: var(--mono); }

/* сертификат */

.cert {
  border-radius: var(--radius-l);
  padding: 6px;
  background: linear-gradient(135deg, #d9c383, #f7edcd 40%, #cbb26a);
  margin-bottom: 20px;
}
.cert.locked { filter: grayscale(.75); opacity: .75; }
.cert-inner {
  background: #fffdf7;
  border-radius: 24px;
  padding: 40px 34px;
  text-align: center;
  border: 1px solid rgba(0,0,0,.06);
}
.cert-top { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: #a98b3c; font-weight: 600; }
.cert-name { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin: 18px 0 6px; }
.cert-sub { color: var(--ink-2); font-size: 15px; }
.cert-project { font-size: 20px; font-weight: 600; margin-top: 14px; }
.cert-row { display: flex; justify-content: center; gap: 34px; flex-wrap: wrap; margin: 26px 0 18px; }
.cert-row b { display: block; font-size: 18px; font-weight: 700; }
.cert-row span { font-size: 12px; color: var(--ink-3); }
.cert-num { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }
.cert-lock { margin-top: 18px; font-size: 13.5px; color: var(--ink-2); }

/* ============================================================
   Лендинг: раскрывающиеся пункты, направления, проекты, команда
   ============================================================ */

.acc { margin-top: 46px; }
.acc-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg);
}
.acc-item > summary {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
}
.acc-item > summary::-webkit-details-marker { display: none; }
.acc-item > summary::after {
  content: "+";
  margin-left: auto;
  font-size: 22px;
  color: var(--ink-3);
  transition: transform .25s;
}
.acc-item[open] > summary::after { transform: rotate(45deg); }
.acc-item[open] > summary { background: var(--bg-alt); }
.acc-num {
  width: 52px; height: 52px; border-radius: 15px;
  background: var(--bg-alt); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 0 0 auto; line-height: 1;
}
.acc-num small { font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.acc-num b { font-size: 20px; font-weight: 700; }
.acc-item[open] .acc-num { background: var(--accent); color: #fff; }
.acc-item[open] .acc-num small { color: rgba(255,255,255,.75); }
.acc-title { display: block; }
.acc-title b { display: block; font-size: 18px; letter-spacing: -0.012em; }
.acc-title span { font-size: 13.5px; color: var(--ink-3); }
.acc-body { padding: 4px 24px 24px 94px; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.acc-body .tl-artifact { margin-top: 14px; }

.cp-chip {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px 94px;
  font-size: 13.5px; font-weight: 500;
  color: #8a6b12;
}
.cp-chip::before {
  content: "";
  width: 26px; height: 3px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, #e0a33a 0 6px, #fff 6px 10px);
}

.dirs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 48px; }
.dir-card {
  background: var(--bg); border-radius: var(--radius-m);
  padding: 22px 22px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  border-top: 3px solid var(--accent);
}
.dir-card .d-ic { font-size: 26px; }
.dir-card h4 { font-size: 17px; font-weight: 600; margin: 10px 0 6px; }
.dir-card p { font-size: 14px; color: var(--ink-2); }
.dir-card small { display: block; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.dir-card:nth-child(2) { border-top-color: var(--teal); }
.dir-card:nth-child(3) { border-top-color: var(--green); }
.dir-card:nth-child(4) { border-top-color: var(--orange); }
.dir-card:nth-child(5) { border-top-color: var(--violet); }
.dir-card:nth-child(6) { border-top-color: #ff2d55; }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 46px; }
.proj-card {
  background: var(--bg); border-radius: var(--radius-m);
  padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
  display: flex; flex-direction: column; gap: 8px;
}
.proj-card .p-tag {
  align-self: flex-start;
  font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent); background: rgba(0,113,227,.1);
  padding: 4px 10px; border-radius: 980px;
}
.proj-card h4 { font-size: 18px; font-weight: 600; }
.proj-card p { font-size: 14.5px; color: var(--ink-2); }
.proj-card .p-stack { font-size: 12.5px; color: var(--ink-3); font-family: var(--mono); margin-top: auto; padding-top: 10px; }

.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 44px; }
.team-card { text-align: left; }
.team-card .t-role { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); font-weight: 600; }
.team-card h4 { font-size: 17px; font-weight: 600; margin: 8px 0 6px; }
.team-card p { font-size: 14px; color: var(--ink-2); }

@media (max-width: 900px) {
  .tool-shelf { grid-template-columns: repeat(5, 1fr); }
  .map-stage { overflow-x: auto; }
  .acc-body { padding-left: 24px; }
  .cp-chip { margin-left: 24px; }
  .flow-row { flex-wrap: wrap; }
  .fr-meta { text-align: left; }
}

/* ---------- телефоны: ничего не должно вылезать за экран ---------- */

@media (max-width: 640px) {
  /* крупная типографика на 390px шире экрана — сжимаем нижнюю границу clamp */
  .display { font-size: clamp(30px, 8.5vw, 88px); }
  .headline { font-size: clamp(25px, 7vw, 56px); }
  .sub { font-size: 17px; }
  .section { padding: 64px 18px; }
  .nav-inner { padding: 0 14px; }
  .nav-cta { padding: 8px 14px; font-size: 14px; }
  .hero { padding: 120px 18px 70px; }
  .stat { padding: 28px 18px; }

  /* сетки с minmax шире телефона — разворачиваем в одну колонку */
  .grid-2, .grid-3, .pricing, .dirs, .proj-grid, .team,
  .demo-grid, .badge-grid,
  .panel-row.cols-2, .panel-row.cols-3 { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }

  .main { padding: 70px 12px 60px; }
  .panel { padding: 20px 16px; overflow-x: auto; }
  .page-head h1 { font-size: 26px; }
  .map-head h1 { font-size: 23px; }
  .mh-stats { gap: 14px; }
  .mh-stats b { font-size: 16px; }
  .tool-shelf { grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 10px; }
  .tool-slot small { font-size: 9.5px; }
  .sp-head { flex-wrap: wrap; }
  .sp-nav { margin-left: 0; }
  .table { font-size: 13px; }
  .cert-inner { padding: 28px 18px; }
  .cert-name { font-size: 26px; }
  .cert-row { gap: 20px; }
  .avatar-editor { gap: 14px; }
  .dd-count { gap: 12px; }
  .map-hint { font-size: 10.5px; padding: 6px 10px; }
}

/* ===== праздник перехода между этапами ===== */
.cele { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 24, 32, .45); backdrop-filter: blur(3px); animation: cele-in .25s ease; }
.cele.out { opacity: 0; transition: opacity .3s ease; }
.cele-card { background: var(--bg); border-radius: var(--radius-m); padding: 34px 40px 28px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.3); max-width: 340px; animation: cele-pop .35s cubic-bezier(.34,1.56,.64,1); }
.cele-card b { display: block; font-size: 20px; letter-spacing: -.01em; margin-top: 14px; }
.cele-card small { display: block; color: var(--ink-2); font-size: 14px; margin: 6px 0 18px; }
.cele-confetti { font-size: 18px; letter-spacing: 6px; }
.cele-confetti i { display: inline-block; font-style: normal; animation: cele-fall 1.6s ease-in-out infinite; }
.cele-avatar { width: 96px; height: 96px; margin-top: 14px; image-rendering: pixelated;
  border-radius: var(--radius-s); animation: cele-jump .7s ease-in-out infinite; }
.cele-emoji { font-size: 64px; margin-top: 10px; animation: cele-jump .7s ease-in-out infinite; }
@keyframes cele-in { from { opacity: 0; } }
@keyframes cele-pop { from { transform: scale(.7); opacity: 0; } }
@keyframes cele-jump { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(2deg); } }
@keyframes cele-fall { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ===== судовой журнал ===== */
.log-box { margin-top: 14px; background: var(--bg-alt); border-radius: var(--radius-s); padding: 14px 18px; font-size: 14px; }
.log-box b { display: block; margin-bottom: 6px; }
.log-box p { color: var(--ink-2); line-height: 1.55; font-style: italic; }
.log-box.locked { color: var(--ink-3); }
.cele-log { margin: 4px 0 14px; background: var(--bg-alt); border-radius: var(--radius-s); padding: 12px 14px;
  font-size: 13px; text-align: left; max-height: 150px; overflow-y: auto; }
.cele-log p { color: var(--ink-2); font-style: italic; margin-top: 4px; line-height: 1.5; }
.cele-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ===== лайфтаймер потока ===== */
.time-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
  background: var(--bg); border-radius: var(--radius-s); padding: 10px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.time-bar .tb-track { flex: 1; height: 8px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; }
.time-bar .tb-track i { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.time-bar.ok .tb-track i { background: #34c759; }
.time-bar.warn .tb-track i { background: #ff9f0a; }
.time-bar.low .tb-track i { background: #ff3b30; }
.time-bar span { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.time-bar.low span { color: #ff3b30; font-weight: 600; }

/* ===== лотерея верфи ===== */
.lottery-strip { display: flex; align-items: center; gap: 16px; margin-bottom: 18px;
  background: var(--bg); border-radius: var(--radius-m); padding: 14px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.lottery-strip .ls-main { flex: 1; min-width: 0; }
.lottery-strip b { display: block; font-size: 15px; }
.lottery-strip small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.lottery-strip .ls-won { color: var(--ink-2); }
.wheel-ticker { margin-top: 14px; font-size: 17px; font-weight: 700; min-height: 44px; display: flex;
  align-items: center; justify-content: center; background: var(--bg-alt); border-radius: var(--radius-s); padding: 10px 14px; }

/* ===== полоса игры «Вайб-чек» на лендинге ===== */
.vibe-strip { display: flex; align-items: center; gap: 20px; margin-top: 34px;
  background: var(--bg); border-radius: var(--radius-m); padding: 20px 26px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.vibe-strip b { display: block; font-size: 16px; margin-bottom: 4px; }
.vibe-strip span { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.vibe-strip > div { flex: 1; min-width: 0; }
@media (max-width: 640px) { .vibe-strip { flex-direction: column; align-items: stretch; text-align: center; } }

/* ===== баттлы ===== */
.battle-new { display: flex; gap: 10px; flex-wrap: wrap; }
.battle-new select { flex: 1; min-width: 220px; }
.battle-q { font-size: 17px; font-weight: 600; line-height: 1.45; margin-bottom: 16px; }
.battle-opt { display: block; width: 100%; text-align: left; font-family: inherit; font-size: 15px; line-height: 1.4;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius-s);
  padding: 13px 16px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s; }
.battle-opt:hover { border-color: var(--accent); }
.battle-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.battle-row:last-child { border-bottom: none; }
.battle-row > div { flex: 1; min-width: 0; }
.battle-row b { display: block; font-size: 15px; }
.battle-row small { color: var(--ink-3); font-size: 13px; }
.battle-rev { padding: 12px 0; border-bottom: 1px solid var(--line); }
.battle-rev:last-of-type { border-bottom: none; }
.battle-rev b { display: block; font-size: 14px; line-height: 1.4; }
.battle-rev small { display: block; font-size: 13px; margin-top: 4px; color: var(--ink-2); }
.battle-rev small.why { color: var(--ink-3); font-style: italic; }

/* ===== пофазовые сцены карты ===== */
.scene-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.85); color: var(--ink); font-size: 20px; line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); font-family: inherit; }
.scene-nav:hover { background: #fff; }
.scene-nav:disabled { opacity: .35; cursor: default; }
.scene-nav.prev { left: 10px; }
.scene-nav.next { right: 10px; }
.scene-title { position: absolute; top: 10px; left: 12px; z-index: 2;
  background: rgba(255,255,255,.85); border-radius: 999px; padding: 5px 12px;
  font-size: 12.5px; font-weight: 600; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.scene-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; flex-wrap: wrap; }
.scene-dot { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line);
  background: var(--bg); color: var(--ink-3); font-size: 12px; font-family: inherit; cursor: pointer; }
.scene-dot.done { background: #eafaf0; border-color: #34c759; color: #17703a; }
.scene-dot.cur { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.scene-dot.sel { background: var(--ink); border-color: var(--ink); color: var(--bg); }
@media (max-width: 640px) {
  .scene-nav { width: 30px; height: 30px; }
  .scene-title { font-size: 11px; }
}

/* ===== навыки персонажа ===== */
.skill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
@media (max-width: 640px) { .skill-grid { grid-template-columns: 1fr; } }
.skill { display: flex; align-items: center; gap: 12px; }
.skill .sk-icon { font-size: 24px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt); border-radius: var(--radius-s); }
.skill .sk-main { flex: 1; min-width: 0; }
.skill b { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; margin-bottom: 5px; }
.skill .sk-lvl { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.skill.on .sk-lvl { color: var(--accent); }
.skill.max .sk-lvl { color: #b8860b; }
.sk-bar { height: 8px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; position: relative; }
.sk-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .5s ease; }
.skill.max .sk-bar i { background: linear-gradient(90deg, #f2c14e, #e8a020); }
.sk-bar::after { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 19.4%, var(--bg) 19.4% 20.6%); }

/* ===== слот-машина лотереи ===== */
.slot-card { max-width: 320px; }
.slot-frame { position: relative; margin: 16px 0 6px; padding: 22px 14px 14px;
  background: linear-gradient(160deg, #8a1f2d, #5d1620); border-radius: 16px;
  border: 3px solid #f2c14e; box-shadow: 0 6px 22px rgba(0,0,0,.35); }
.slot-frame.win { animation: slot-win .5s ease infinite alternate; }
.slot-lights { position: absolute; top: 6px; left: 12px; right: 12px; display: flex; justify-content: space-between; }
.slot-lights i { width: 7px; height: 7px; border-radius: 50%; background: #ffdf7e; animation: slot-blink 1s steps(2) infinite; }
.slot-window { display: flex; gap: 8px; justify-content: center; }
.reel { width: 62px; height: 58px; overflow: hidden; background: #fdf9ef; border-radius: 8px;
  box-shadow: inset 0 6px 10px rgba(0,0,0,.22), inset 0 -6px 10px rgba(0,0,0,.22); position: relative; }
.reel-strip { will-change: transform; }
.reel-strip span { display: block; height: 58px; line-height: 58px; font-size: 32px; text-align: center; }
.slot-status { display: block; margin-top: 10px; font-weight: 600; color: var(--ink-2); min-height: 18px; }
@keyframes slot-blink { 50% { opacity: .25; } }
@keyframes slot-win { from { box-shadow: 0 0 10px 2px rgba(242,193,78,.55); } to { box-shadow: 0 0 26px 8px rgba(242,193,78,.85); } }

/* ===== анимации из UX-паттернов ===== */
.btn-breathe { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.view-anim > * { animation: rise-in .3s ease both; }
.view-anim > *:nth-child(2) { animation-delay: .05s; }
.view-anim > *:nth-child(3) { animation-delay: .1s; }
.view-anim > *:nth-child(4) { animation-delay: .15s; }
.view-anim > *:nth-child(5) { animation-delay: .2s; }
.view-anim > *:nth-child(n+6) { animation-delay: .25s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  .btn-breathe, .view-anim > *, .cele-avatar, .cele-emoji, .slot-lights i { animation: none !important; }
}

/* ===== конструктор персонажа ===== */
.av-builder { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.av-builder > small { display: block; margin-bottom: 10px; }
.sw-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sw-row > span { width: 74px; font-size: 13px; color: var(--ink-2); flex-shrink: 0; }
.sw-list { display: flex; gap: 6px; flex-wrap: wrap; }
.sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer;
  padding: 0; transition: transform .12s ease, border-color .12s; }
.sw:hover { transform: scale(1.15); }
.sw.sel { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0,113,227,.25); transform: scale(1.1); }

/* ===== жёсткий гейт КТ ===== */
.gate-banner.pending { background: #fff4e0; border-color: #e0a33a; }
.gate-banner.pending .g-badge { background: #e0a33a; }
.task-blocked { opacity: .5; }
.task-blocked label { cursor: not-allowed; }
