/* Qo'qon MIL — tokens */
:root {
  --ink: #14204A;        /* lapis ink: text, dark surfaces */
  --lapis: #2346A8;      /* Kokand tile blue */
  --tile: #138A86;       /* turquoise glaze — "verified" */
  --paper: #EEF2F6;      /* cool tile-white background */
  --surface: #FFFFFF;
  --saffron: #E9A93A;    /* warm accent */
  --pom: #B5333F;        /* pomegranate — "check this" */
  --muted: #55607F;
  --line: #CED6E3;
  --fog: rgba(20, 32, 74, .28);
  --deep: #14204A;       /* fixed dark surface (panel, footer) */
  --on-deep: #E8EDF7;

  --f-display: "Unbounded", "Onest", system-ui, sans-serif;
  --f-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;

  --s-1: clamp(2.6rem, 7.4vw, 6.4rem);  /* hero */
  --s-2: clamp(1.8rem, 3.6vw, 2.9rem);  /* h2 */
  --s-3: 1.2rem;                         /* h3 */
  --s-body: 1.0625rem;
  --s-small: .875rem;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --r-sm: 6px;
  --r-lg: 22px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E8EDF7; --paper: #0D1430; --surface: #151E42; --muted: #A3AECB;
    --line: #2A3666; --lapis: #7D9BF0; --tile: #3FC2BC; --pom: #EF6B75; --fog: rgba(232,237,247,.3); --deep: #1C2756;
  }
}
:root[data-theme="dark"] {
  --ink: #E8EDF7; --paper: #0D1430; --surface: #151E42; --muted: #A3AECB;
  --line: #2A3666; --lapis: #7D9BF0; --tile: #3FC2BC; --pom: #EF6B75; --fog: rgba(232,237,247,.3); --deep: #1C2756;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--s-body)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -.01em; }
h2 { font-size: var(--s-2); max-width: 18ch; }
h3 { font-size: var(--s-3); }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 99; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }
section { padding: clamp(72px, 10vw, 128px) 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 1rem/1 var(--f-body); padding: 15px 24px; border-radius: 999px;
  text-decoration: none; cursor: pointer; border: 2px solid var(--ink);
  transition: background .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--lapis); border-color: var(--lapis); color: #fff; }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }

/* Header */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand__txt b { font-family: var(--f-display); font-size: 1.05rem; }
.brand__txt small { font-size: .75rem; color: var(--muted); max-width: 22ch; }
.nav { display: flex; gap: 22px; }
.nav a { text-decoration: none; font-weight: 500; font-size: .95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--tile); }
.lang { display: flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.lang button { font: 600 .78rem/1 var(--f-body); background: none; border: 0; color: var(--muted); padding: 7px 10px; border-radius: 999px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.theme { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.theme:hover { border-color: var(--tile); }
.theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: none; }
.theme[data-mode="auto"] .theme__auto, .theme[data-mode="light"] .theme__light, .theme[data-mode="dark"] .theme__dark, .theme:not([data-mode]) .theme__auto { display: block; }
.burger { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.burger span:not(.sr) { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); transition: transform .2s; }
.burger span:nth-child(1) { top: 17px; } .burger span:nth-child(2) { top: 25px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* HERO — the lens */
.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(96px, 12vw, 152px); overflow: hidden; }
.hero__pattern {
  position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23138A86' stroke-opacity='.22' stroke-width='1.2'%3E%3Cpath d='M60 18l12 18 21-3-3 21 18 12-18 12 3 21-21-3-12 18-12-18-21 3 3-21-18-12 18-12-3-21 21 3z'/%3E%3Ccircle cx='60' cy='66' r='14'/%3E%3Cpath d='M0 0l18 12M120 0l-18 12M0 120l18-12M120 120l-18-12'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%); mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}
.hero__grid { position: relative; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; font-size: var(--s-small); font-weight: 500; padding: 7px 14px 7px 10px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); margin-bottom: clamp(28px, 4vw, 48px); }

.lens { position: relative; --x: 30%; --y: 50%; --r: clamp(90px, 13vw, 170px); cursor: crosshair; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.lens h1, .lens__fog { font-family: var(--f-display); font-size: var(--s-1); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; max-width: 14ch; }
.lens__fog {
  position: absolute; inset: 0; margin: 0; pointer-events: none;
  color: var(--fog); filter: blur(7px); user-select: none;
}
.lens__clear {
  position: relative; z-index: 1; color: var(--ink);
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 96%, transparent 100%);
  mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 96%, transparent 100%);
}
.lens__ring {
  position: absolute; z-index: 2; left: var(--x); top: var(--y); width: calc(var(--r) * 2); height: calc(var(--r) * 2);
  translate: -50% -50%; border-radius: 50%; pointer-events: none;
  border: 3px solid var(--tile);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--tile) 14%, transparent);
}
.lens__ring::after { /* handle */
  content: ""; position: absolute; width: 16px; height: calc(var(--r) * .7); background: var(--tile);
  border-radius: 8px; left: 86%; top: 86%; rotate: -45deg; transform-origin: top center;
}
.lens.is-revealed .lens__clear { -webkit-mask-image: none; mask-image: none; }
.lens.is-revealed .lens__fog, .lens.is-revealed .lens__ring { opacity: 0; transition: opacity .6s; }

.hero__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 56px; align-items: end; margin-top: clamp(36px, 5vw, 64px); }
.hero__lead { font-size: 1.15rem; max-width: 56ch; color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__hint { position: absolute; right: var(--gutter); top: 24px; font-size: var(--s-small); color: var(--muted); }
.hero__hint--touch { display: none; }
@media (hover: none) { .hero__hint--mouse { display: none; } .hero__hint--touch { display: block; } .lens { --r: clamp(62px, 17vw, 110px); } }

/* Facts — a panel that overlaps the hero edge */
.facts { padding: 0; position: relative; z-index: 3; margin-top: calc(-1 * clamp(56px, 7vw, 88px)); }
.facts__grid {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 24px 48px -32px rgba(20, 32, 74, .35);
}
.fact { display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; padding: clamp(22px, 2.4vw, 32px); }
.fact + .fact { border-left: 1px solid var(--line); }
.fact svg { width: 30px; height: 30px; fill: none; stroke: var(--tile); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.fact__num { font-family: var(--f-display); font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.fact p { font-size: .95rem; color: var(--muted); }
.fact__src { font-size: .8rem; color: var(--muted); text-decoration: none; justify-self: start; border-bottom: 1px solid var(--line); padding-bottom: 1px; margin-top: 6px; }
.fact__src span { color: var(--tile); font-weight: 600; margin-right: 4px; }
.fact__src:hover { color: var(--ink); border-color: var(--tile); }

/* MIL */
.mil__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); }
.mil__head { display: flex; flex-direction: column; gap: 20px; }
.mil__head p { color: var(--muted); max-width: 46ch; }
.mil__note { padding-left: 16px; border-left: 3px solid var(--saffron); font-size: .97rem; }
.skills { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.skill { display: grid; grid-template-columns: 64px 1fr; gap: 6px 24px; padding: 28px 0; border-top: 1.5px solid var(--line); }
.skill:last-child { border-bottom: 1.5px solid var(--line); }
.skill svg { grid-row: span 2; width: 52px; height: 52px; fill: none; stroke: var(--tile); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.skill h3 { font-size: 1.5rem; }
.skill p { color: var(--muted); max-width: 52ch; }

/* City spaces */
.city { background: var(--surface); border-block: 1px solid var(--line); }
.city__head { display: grid; grid-template-columns: 5fr 7fr; gap: 32px clamp(32px, 6vw, 96px); align-items: end; margin-bottom: 48px; }
.city__head p { color: var(--muted); max-width: 56ch; }
.spaces { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.spaces__tabs { display: flex; flex-direction: column; }
.space-tab {
  display: flex; align-items: center; gap: 16px; text-align: left; width: 100%;
  font: 500 1.08rem/1.3 var(--f-body); color: var(--ink); background: none; cursor: pointer;
  border: 0; border-top: 1px solid var(--line); padding: 16px 8px;
}
.space-tab:last-child { border-bottom: 1px solid var(--line); }
.space-tab svg { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.space-tab[aria-selected="true"] { color: var(--lapis); font-weight: 600; }
.space-tab[aria-selected="true"] svg { stroke: var(--tile); }
.space-tab:hover { background: var(--paper); }
.spaces__panel {
  position: sticky; top: 100px; background: var(--deep); color: var(--on-deep);
  border-radius: var(--r-lg); overflow: hidden;
}
.panel__photo { position: relative; margin: 0; aspect-ratio: 16 / 10; background: #0A1230; }
.panel__photo img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s; }
.panel__photo img.is-loading { opacity: 0; }
.panel__photo::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(to bottom, transparent, rgba(8, 14, 38, .82)); pointer-events: none; }
.panel__photo figcaption { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 18px clamp(20px, 3vw, 32px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 4px 16px; color: #fff; }
.panel__cap { font-weight: 600; font-size: 1rem; }
.panel__credit { font-size: .75rem; opacity: .75; text-decoration: none; }
.panel__credit:hover { opacity: 1; text-decoration: underline; }
.panel__body { padding: clamp(24px, 3vw, 36px) clamp(20px, 3vw, 36px) clamp(28px, 3.4vw, 40px); }
.panel__title { display: flex; align-items: center; gap: 14px; font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 12px; }
.panel__icon svg { width: 34px; height: 34px; fill: none; stroke: var(--saffron); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.panel__lead { opacity: .82; max-width: 52ch; margin-bottom: 22px; }
.panel__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.panel__list li { padding-left: 28px; position: relative; max-width: 56ch; }
.panel__list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 11px; height: 11px; background: #3FC2BC; rotate: 45deg; border-radius: 2px; }

/* Path */
.path h2 { margin-bottom: 56px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; counter-reset: s; }
.step { position: relative; padding: 36px 20px 0 0; }
.step::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--line); }
.step::after { content: ""; position: absolute; top: -7px; left: 0; width: 17px; height: 17px; border-radius: 50%; background: var(--paper); border: 3px solid var(--line); }
.step.is-done::before { background: var(--tile); }
.step.is-done::after { background: var(--tile); border-color: var(--tile); }
.step.is-now::before { background: linear-gradient(to right, var(--saffron) 40%, var(--line) 40%); }
.step.is-now::after { background: var(--saffron); border-color: var(--saffron); box-shadow: 0 0 0 6px color-mix(in srgb, var(--saffron) 30%, transparent); }
.step time { display: block; font-family: var(--f-display); font-size: .92rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { font-size: .93rem; color: var(--muted); }

/* Check / quiz */
.check { background: var(--tile); color: #fff; }
.check__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.check__head { display: flex; flex-direction: column; gap: 20px; }
.check__head p { opacity: .9; max-width: 44ch; }
.check__score { font-family: var(--f-display); font-size: 1.1rem; }
.quiz { display: flex; flex-direction: column; gap: 20px; }
.msg {
  background: #fff; color: #14204A; border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 6px;
  padding: 24px 28px 28px; box-shadow: 0 18px 40px -18px rgba(10, 30, 60, .45);
  max-width: 560px; transition: transform .25s;
}
.msg__meta { display: flex; justify-content: space-between; gap: 16px; font-size: var(--s-small); color: #55607F; margin-bottom: 10px; }
.msg__src { font-weight: 600; color: #2346A8; }
.msg__body { font-size: 1.2rem; line-height: 1.45; }
.quiz__btns { display: flex; gap: 12px; flex-wrap: wrap; }
.check .btn--solid { background: #14204A; border-color: #14204A; color: #fff; }
.check .btn--solid:hover { background: #fff; color: #14204A; border-color: #fff; }
.check .btn--line { border-color: #fff; color: #fff; }
.check .btn--line:hover { background: #fff; color: #14204A; }
.verdict { background: rgba(10, 30, 60, .22); border-radius: var(--r-lg); padding: 24px 28px; max-width: 560px; display: grid; gap: 12px; justify-items: start; }
.verdict__tag { font-family: var(--f-display); font-size: 1.25rem; font-weight: 600; }
.verdict__tag.is-right { color: #FFE2A6; }
.verdict__tag.is-wrong { color: #FFD0D4; }
.verdict__why { opacity: .95; }
.msg.is-shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* Network */
.network__head { display: grid; grid-template-columns: 5fr 7fr; gap: 32px clamp(32px, 6vw, 96px); align-items: end; margin-bottom: 48px; }
.network__head p { color: var(--muted); max-width: 56ch; }
.netmap { position: relative; margin: 0 0 clamp(32px, 4vw, 56px); }
.netmap svg { width: 100%; height: auto; overflow: visible; }
.net__land { fill: color-mix(in srgb, var(--ink) 16%, transparent); }
.net__arc { fill: none; stroke: var(--tile); stroke-width: 1.4; stroke-linecap: round; opacity: .6; transition: opacity .2s, stroke .2s, stroke-width .2s; }
.net__city circle { fill: var(--lapis); stroke: var(--paper); stroke-width: 2; transition: r .2s; }
.net__city.is-home circle { fill: var(--saffron); }
.net__city .net__pulse { fill: none; stroke: var(--saffron); stroke-width: 2; opacity: .6; transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { from { transform: scale(.7); opacity: .7; } to { transform: scale(2.6); opacity: 0; } }
.net__city { cursor: pointer; }
.netmap.has-focus .net__arc { opacity: .12; }
.netmap.has-focus .net__arc.is-active { opacity: 1; stroke: var(--saffron); stroke-width: 2.4; }
.net__city.is-active:not(.is-home) circle { fill: var(--saffron); r: 6; }
.netmap.is-waiting .net__arc { stroke-dasharray: 1; stroke-dashoffset: 1; }
.netmap.is-drawn .net__arc { stroke-dasharray: 1; animation: draw 1.4s cubic-bezier(.3,.6,.3,1) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.netmap__tip {
  position: absolute; z-index: 2; translate: -50% calc(-100% - 14px); pointer-events: none; white-space: nowrap;
  background: var(--deep); color: var(--on-deep); font-size: .9rem; padding: 8px 12px; border-radius: 10px;
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.5);
}
.netmap__tip b { margin-right: 6px; }
.netmap__tip.is-left { translate: calc(-100% + 18px) calc(-100% - 14px); }

.regions { display: grid; }
.region { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: 12px 32px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--line); }
.region:last-child { border-bottom: 1px solid var(--line); }
.region h3 { font-family: var(--f-body); font-size: .95rem; font-weight: 600; color: var(--muted); }
.region ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font: 500 .95rem/1.2 var(--f-body); color: var(--ink); background: var(--surface); cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; display: inline-flex; gap: 8px; align-items: baseline;
  transition: background .15s, border-color .15s, color .15s;
}
.pill small { font-size: .8rem; color: var(--muted); }
.pill:hover, .pill.is-active { border-color: var(--tile); }
.pill[aria-pressed="true"] { background: var(--deep); color: var(--on-deep); border-color: var(--deep); }
.pill[aria-pressed="true"] small { color: inherit; opacity: .75; }
.pill.is-home { border-color: var(--saffron); background: color-mix(in srgb, var(--saffron) 16%, var(--surface)); font-weight: 700; }
.network__src { margin-top: 40px; font-size: var(--s-small); color: var(--muted); }

/* Join */
.join { background: var(--surface); border-top: 1px solid var(--line); }
.join__grid { display: grid; grid-template-columns: 6fr 5fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.join__grid > div > p { color: var(--muted); margin: 20px 0 28px; max-width: 52ch; }
.roles { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.roles li { padding: 14px 0; border-top: 1px solid var(--line); }
.form { display: grid; gap: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 36px); }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
.form input, .form select {
  font: 400 1rem var(--f-body); color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 14px; width: 100%;
}
.form input:focus, .form select:focus { outline: none; border-color: var(--tile); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tile) 25%, transparent); }
.form input[aria-invalid="true"] { border-color: var(--pom); }
.form__msg { font-size: .95rem; min-height: 1.5em; }
.form__msg.is-ok { color: var(--tile); } .form__msg.is-err { color: var(--pom); }

/* Footer — fixed deep surface, readable in both themes */
.foot { background: var(--deep); color: var(--on-deep); padding: 64px 0 28px; }
.foot__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.foot__name { font-family: var(--f-display); font-size: 1.1rem; margin: 16px 0 8px; max-width: 24ch; }
.foot__small { color: rgba(232, 237, 247, .7); font-size: var(--s-small); max-width: 44ch; }
.foot h3 { font-size: .95rem; margin-bottom: 14px; color: rgba(232, 237, 247, .6); font-family: var(--f-body); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; } .foot a:hover { text-decoration: underline; text-decoration-color: var(--saffron); }
.foot__copy { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(232, 237, 247, .14); font-size: .8rem; color: rgba(232, 237, 247, .62); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }
.foot__copy p:last-child { max-width: 72ch; }

/* Responsive */
@media (max-width: 1180px) {
  .nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .burger { display: block; }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 44px; }
}
@media (max-width: 860px) {
  .mil__grid, .city__head, .spaces, .check__grid, .network__head, .join__grid { grid-template-columns: 1fr; }
  .spaces__panel { position: relative; top: 0; min-height: 0; }
  .spaces__tabs { flex-direction: row; overflow-x: auto; gap: 8px; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .space-tab { flex: none; width: auto; border: 1.5px solid var(--line) !important; border-radius: 999px; padding: 10px 16px; font-size: .95rem; }
  .space-tab svg { width: 20px; height: 20px; }
  .space-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink) !important; }
  .space-tab[aria-selected="true"] svg { stroke: var(--saffron); }
  .facts__grid { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .region { grid-template-columns: 1fr; gap: 10px; }
  .hero__foot { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .brand__txt small { display: none; }
  .top__in { gap: 10px; }
  .steps { grid-template-columns: 1fr; row-gap: 0; }
  .step { padding: 0 0 32px 36px; }
  .step::before { top: 0; bottom: 0; left: 7px; right: auto; width: 3px; height: auto; }
  .step::after { top: 2px; left: 0; }
  .step.is-now::before { background: linear-gradient(to bottom, var(--saffron) 40%, var(--line) 40%); }
  .fact { padding: 18px 16px; }
  .fact__num { font-size: 1.3rem; }
  .fact svg { width: 26px; height: 26px; }
  .theme { width: 36px; height: 36px; }
  .lang button { padding: 7px 7px; }
  .lens h1, .lens__fog { font-size: clamp(2.3rem, 11vw, 3rem); }
  .msg__body { font-size: 1.08rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

[hidden] { display: none !important; }
.check { background: #0E716E; }
.spaces > *, .mil__grid > *, .check__grid > *, .join__grid > *, .city__head > *, .network__head > * { min-width: 0; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .foot { background: #070C20; } }
:root[data-theme="dark"] .foot { background: #070C20; }

/* ---------- Works: counters, cards, page, dialog ---------- */
.works__head { display: flex; justify-content: space-between; align-items: end; gap: 24px 48px; flex-wrap: wrap; margin-bottom: 36px; }
.works__head p { color: var(--muted); max-width: 56ch; margin-top: 18px; }
.wstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); margin-bottom: 36px; }
.wstat { padding: 20px 20px 20px 0; display: grid; gap: 4px; }
.wstat + .wstat { padding-left: 20px; border-left: 1px solid var(--line); }
.wstat b { font-family: var(--f-display); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; line-height: 1; color: var(--lapis); }
.wstat span { font-size: .92rem; color: var(--muted); }
.works__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.work { min-width: 0; }
.work__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color .15s, transform .15s; }
.work__link:hover { border-color: var(--tile); transform: translateY(-2px); }
.work__media { position: relative; aspect-ratio: 3 / 2; background: var(--deep); overflow: hidden; }
.work__media img { width: 100%; height: 100%; object-fit: cover; }
.work__ph { display: grid; place-items: center; width: 100%; height: 100%; background-color: var(--deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%233FC2BC' stroke-opacity='.22' stroke-width='1.4'%3E%3Cpath d='M60 18l12 18 21-3-3 21 18 12-18 12 3 21-21-3-12 18-12-18-21 3 3-21-18-12 18-12-3-21 21 3z'/%3E%3Ccircle cx='60' cy='66' r='14'/%3E%3C/g%3E%3C/svg%3E"); }
.work__ph svg { width: 64px; height: 64px; fill: none; stroke: var(--saffron); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.work__badge { position: absolute; top: 12px; left: 12px; background: var(--saffron); color: #14204A; font-size: .78rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.work__badge--inline { position: static; }
.work__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.work__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .85rem; color: var(--muted); }
.work__type { display: inline-flex; align-items: center; gap: 6px; color: var(--tile); font-weight: 600; }
.work__type svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.work__title { font-size: 1.12rem; line-height: 1.3; }
.work__stats { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .9rem; color: var(--muted); }
.work__stats b { color: var(--ink); font-weight: 700; }
.work.is-sample .work__link { border-style: dashed; }

.wpage-hero { padding: clamp(40px, 6vw, 72px) 0 0; }
.wpage-hero h1 { font-size: clamp(2.2rem, 5.4vw, 4.2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.02; margin: 18px 0 18px; max-width: 16ch; }
.wpage-hero p { color: var(--muted); max-width: 60ch; margin-bottom: 36px; font-size: 1.1rem; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 500; }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.back:hover { color: var(--ink); }
.wpage { padding-top: 8px; }
.wpage__filters { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.wfilter { display: flex; flex-wrap: wrap; gap: 8px; }
.wyear { display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--muted); }
.wyear select { font: 500 .95rem var(--f-body); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; }
.wpage__note { font-size: .9rem; color: var(--muted); padding: 10px 14px; border-left: 3px solid var(--saffron); background: var(--surface); border-radius: 0 10px 10px 0; margin-bottom: 24px; }
.works__empty { grid-column: 1 / -1; color: var(--muted); padding: 40px 0; }
.nav a[aria-current="page"] { border-color: var(--tile); }

.wdlg { width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--ink); overflow: auto; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
.wdlg::backdrop { background: rgba(8, 14, 38, .62); backdrop-filter: blur(3px); }
.wdlg__close { position: sticky; top: 12px; float: right; margin: 12px 12px -56px 0; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(8, 14, 38, .7); color: #fff; cursor: pointer; display: grid; place-items: center; }
.wdlg__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.wdlg__img, .wdlg__ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: grid; }
.wdlg__body { padding: clamp(22px, 4vw, 40px); display: grid; gap: 16px; }
.wdlg__title { font-size: clamp(1.5rem, 3vw, 2.1rem); max-width: none; }
.wdlg__place { color: var(--muted); }
.wdlg__stats { display: flex; flex-wrap: wrap; gap: 12px 32px; padding: 14px 0; border-block: 1px solid var(--line); }
.wdlg__stats div { display: grid; }
.wdlg__stats b { font-family: var(--f-display); font-size: 1.6rem; color: var(--lapis); line-height: 1.1; }
.wdlg__stats span { font-size: .88rem; color: var(--muted); }
.wdlg__text { display: grid; gap: 12px; max-width: 64ch; }
.wdlg__gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.wdlg__gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.wdlg__src a { color: var(--tile); font-weight: 600; }

@media (max-width: 1240px) { .nav { gap: 16px; } .nav a { font-size: .9rem; } }
@media (max-width: 960px) { .works__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .wstats { grid-template-columns: 1fr 1fr; }
  .wstat:nth-child(3) { padding-left: 0; border-left: 0; }
  .wstat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 600px) { .works__grid { grid-template-columns: 1fr; } }
