/* ==========================================================================
   权量 POWER ATLAS — visual system
   Minimal geometric archive · Pakistan green/gold · China red/gold
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --font-sans: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --bezel: #ebe7dc;
  --bezel-rgb: 235, 231, 220;
  --panel: #f7f4eb;
  --panel-rgb: 247, 244, 235;
  --panel-2: #fcfaf4;
  --well: #e1ddd0;
  --well-strong: #d7d1c1;
  --ink: #161810;
  --ink-rgb: 22, 24, 16;
  --muted: #5f6257;
  --faint: #8b8d82;
  --line: rgba(22, 24, 16, .14);
  --line-strong: rgba(22, 24, 16, .3);
  --white: #fffdf7;

  --pk: #0a6b3a;
  --pk-rgb: 10, 107, 58;
  --pk-gold: #c6a02a;
  --pk-gold-rgb: 198, 160, 42;
  --cn: #b01e2e;
  --cn-rgb: 176, 30, 46;
  --cn-gold: #d2a52b;
  --cn-gold-rgb: 210, 165, 43;

  --accent: var(--pk);
  --accent-rgb: var(--pk-rgb);
  --accent-2: var(--pk-gold);
  --accent-2-rgb: var(--pk-gold-rgb);
  --accent-ink: #fffdf7;

  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --ease-arrive: cubic-bezier(.23, 1, .32, 1);
  --ease-leave: cubic-bezier(.23, 1, .32, 1);
  --ease-feedback: cubic-bezier(.2, .8, .2, 1);
  --motion-arrive: 260ms;
  --motion-leave: 150ms;

  --shadow-panel: 0 1px 0 rgba(255, 255, 255, .46), 0 18px 44px -34px rgba(var(--ink-rgb), .5);
  --shadow-float: 0 24px 80px -38px rgba(var(--ink-rgb), .55), 0 2px 0 rgba(255, 255, 255, .4);
  --shadow-glow: 0 0 0 1px rgba(var(--accent-rgb), .45), 0 18px 50px -22px rgba(var(--accent-rgb), .44);

  --header-h: 70px;
  --content: 1220px;
}

html[data-theme="dark"] {
  --bezel: #0c0f0c;
  --bezel-rgb: 12, 15, 12;
  --panel: #141814;
  --panel-rgb: 20, 24, 20;
  --panel-2: #191e18;
  --well: #1f251e;
  --well-strong: #293027;
  --ink: #f3f0e6;
  --ink-rgb: 243, 240, 230;
  --muted: #b2b5a9;
  --faint: #82877a;
  --line: rgba(243, 240, 230, .15);
  --line-strong: rgba(243, 240, 230, .32);
  --white: #faf7ed;
  --shadow-panel: 0 1px 0 rgba(255, 255, 255, .04), 0 22px 50px -36px rgba(0, 0, 0, .9);
  --shadow-float: 0 30px 90px -34px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .06);
}

html[data-theme="dark"] .theme-sun,
html[data-theme="light"] .theme-moon { display: none; }

::selection { background: rgba(var(--accent-rgb), .24); color: var(--ink); }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bezel);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -.012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .38;
  -webkit-mask-image: radial-gradient(ellipse 90% 72% at 50% 35%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 72% at 50% 35%, #000 0%, transparent 78%);
}

html[data-theme="dark"] body::before { opacity: .3; }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 38% at 50% 0%, rgba(var(--accent-rgb), .07), transparent 70%),
    radial-gradient(ellipse 42% 34% at 100% 100%, rgba(var(--accent-2-rgb), .055), transparent 70%);
}

body[data-route="home"]::after {
  background:
    radial-gradient(ellipse 38% 50% at 0% 45%, rgba(var(--pk-rgb), .11), transparent 70%),
    radial-gradient(ellipse 38% 50% at 100% 45%, rgba(var(--cn-rgb), .09), transparent 70%),
    radial-gradient(ellipse 40% 40% at 50% 100%, rgba(198, 160, 42, .06), transparent 70%);
}

body[data-system="pk"] { --accent: var(--pk); --accent-rgb: var(--pk-rgb); --accent-2: var(--pk-gold); --accent-2-rgb: var(--pk-gold-rgb); }
body[data-system="cn"] { --accent: var(--cn); --accent-rgb: var(--cn-rgb); --accent-2: var(--cn-gold); --accent-2-rgb: var(--cn-gold-rgb); }

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--bezel);
  font-family: var(--font-mono);
  font-size: 12px;
}
.skip-link:focus { top: 12px; }

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-5);
  padding: 10px clamp(16px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bezel) 86%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .site-header { background: var(--bezel); }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 2px 4px;
  color: var(--ink);
}

.brand__mark { width: 38px; height: 38px; flex: none; overflow: visible; }
.brand__frame { fill: none; stroke: currentColor; stroke-width: 1; opacity: .48; }
.brand__arc { fill: none; stroke: var(--accent); stroke-width: 3.4; stroke-linecap: square; }
.brand__tail { fill: none; stroke: var(--accent-2); stroke-width: 2.4; stroke-linecap: square; }
.brand__dot { fill: var(--accent-2); }
.brand__ticks { fill: none; stroke: currentColor; stroke-width: 1; opacity: .55; }

.brand__text { display: grid; gap: 0; line-height: 1; }
.brand__text strong { font-family: var(--font-display); font-size: 23px; letter-spacing: .12em; font-weight: 700; }
.brand__text span { margin-top: 5px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .22em; color: var(--muted); }

.top-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.top-nav::-webkit-scrollbar { display: none; }

.top-nav a, .top-nav button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: .03em;
  transition: color var(--motion-arrive) var(--ease-arrive);
}
.top-nav a::before, .top-nav button::before {
  content: "";
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: .55;
}
.top-nav a:hover, .top-nav button:hover, .top-nav a.is-active, .top-nav button.is-active { color: var(--ink); text-shadow: 0 0 18px rgba(var(--accent-rgb), .42); }
.top-nav a[href="#/cn"]:hover, .top-nav a[href="#/cn"]:focus-visible { color: var(--cn); text-shadow: 0 0 18px rgba(var(--cn-rgb), .55); }
.top-nav a[href="#/cn"].glow::after { background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--cn-rgb), .24), transparent 70%); }
.top-nav a.is-active::before, .top-nav button.is-active::before { background: var(--accent); border-color: var(--accent); opacity: 1; }
.top-nav .nav-system { font-family: var(--font-mono); font-size: 9px; letter-spacing: .14em; color: var(--accent); }

.header-tools { display: flex; align-items: center; gap: 4px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  transition: color var(--motion-feedback), border-color var(--motion-feedback), background var(--motion-feedback);
}
.icon-btn:hover { color: var(--ink); border-color: var(--line); background: rgba(var(--panel-rgb), .44); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: square; }
.icon-btn__label { display: inline; }
.icon-btn kbd { margin-left: 2px; padding: 1px 4px; border: 1px solid var(--line); font-size: 9px; color: var(--faint); }
#langBtn { font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .1em; }

/* --------------------------------------------------------------------------
   Shared primitives
   -------------------------------------------------------------------------- */

.glow { position: relative; isolation: isolate; }
.glow::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), .16), transparent 68%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease-feedback);
}
.glow:hover::after, .glow:focus-visible::after { opacity: 1; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--accent); flex: none; }
.eyebrow--plain::before { display: none; }

.mono { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.accent { color: var(--accent); }
.nowrap { white-space: nowrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: transform 140ms var(--ease-feedback), background 180ms, color 180ms, border-color 180ms, box-shadow 180ms;
}
.btn:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { color: var(--accent-ink); filter: brightness(1.05); }
.btn--ghost { background: rgba(var(--accent-rgb), .06); border-color: rgba(var(--accent-rgb), .32); color: var(--accent); }
.btn--quiet { border-color: transparent; color: var(--muted); }
.btn--small { min-height: 36px; padding: 0 12px; font-size: 9px; }
.btn[disabled] { opacity: .5; cursor: wait; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.chip--accent { border-color: rgba(var(--accent-rgb), .4); color: var(--accent); background: rgba(var(--accent-rgb), .06); }
.chip--gold { border-color: rgba(var(--accent-2-rgb), .5); color: var(--accent-2); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 2px 7px;
  border: 1px solid rgba(var(--accent-rgb), .35);
  background: rgba(var(--accent-rgb), .07);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .08em;
  white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; background: currentColor; transform: rotate(45deg); }
.badge--s { border-color: rgba(198, 160, 42, .55); color: #9a7510; background: rgba(198, 160, 42, .09); }
html[data-theme="dark"] .badge--s { color: #e7c45a; }
.badge--a { border-color: rgba(var(--accent-rgb), .5); color: var(--accent); }
.badge--b { color: var(--muted); border-color: var(--line-strong); background: transparent; }
.badge--c, .badge--d { color: var(--faint); border-color: var(--line); background: transparent; }
.badge--c::before, .badge--d::before { width: 4px; height: 4px; background: transparent; border: 1px solid currentColor; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.corner-frame { position: relative; }
.corner-frame::before, .corner-frame::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  pointer-events: none;
  border-color: var(--accent);
  border-style: solid;
  opacity: .8;
}
.corner-frame::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.corner-frame::after { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

main { flex: 1; outline: none; }
.wrap { width: min(100% - clamp(32px, 6vw, 84px), var(--content)); margin-inline: auto; }
.page { padding: clamp(26px, 4vw, 52px) 0 80px; }

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-6);
  align-items: end;
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(34px, 5.2vw, 72px);
  line-height: .94;
  letter-spacing: -.045em;
  font-weight: 650;
}
.page-head h1 .accent { font-weight: 350; }
.page-head__copy { max-width: 640px; margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.page-head__meta { display: grid; gap: 8px; justify-items: end; text-align: right; }

.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 20px;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--muted);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tabs a::after, .tabs button::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease-arrive);
}
.tabs a:hover, .tabs button:hover { color: var(--ink); text-shadow: 0 0 18px rgba(var(--accent-rgb), .45); }
.tabs a.is-active, .tabs button.is-active { color: var(--ink); }
.tabs a.is-active::after, .tabs button.is-active::after { transform: scaleX(1); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  min-height: 62px;
  padding: 15px clamp(16px, 3vw, 32px);
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   Home
   -------------------------------------------------------------------------- */

.home { min-height: calc(100vh - var(--header-h)); padding: clamp(18px, 3vw, 34px); display: flex; flex-direction: column; }

.home__head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  padding: clamp(18px, 3vw, 38px) 0 clamp(22px, 3vw, 34px);
  border-bottom: 1px solid var(--line-strong);
}

.home__title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: clamp(16px, 2.4vw, 34px);
  margin-top: 22px;
}
.home__title h1 {
  font-family: var(--font-display);
  font-size: clamp(76px, 13vw, 188px);
  line-height: .78;
  letter-spacing: -.07em;
  font-weight: 700;
  margin-left: -.04em;
}
.home__title h1 .zh { display: block; }
.home__title-block { display: grid; gap: 10px; padding-bottom: 8px; min-width: 0; }
.home__title-block strong {
  font-family: var(--font-mono);
  font-size: clamp(9px, 1vw, 11px);
  font-weight: 600;
  letter-spacing: .27em;
  line-height: 1.7;
  color: var(--muted);
  text-transform: uppercase;
}
.home__title-block span { max-width: 250px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.home__lede { max-width: 520px; justify-self: end; display: grid; gap: 18px; }
.home__lede p { color: var(--muted); font-size: 14px; line-height: 1.75; }
.home__lede .rule { width: 100%; }
.home__metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.home__metric { display: grid; gap: 2px; }
.home__metric strong { font-family: var(--font-display); font-size: 27px; font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.home__metric span { font-family: var(--font-mono); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

.portals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  min-height: min(60vh, 620px);
  border-bottom: 1px solid var(--line-strong);
}

.portal {
  --portal: var(--pk);
  --portal-rgb: var(--pk-rgb);
  --portal-gold: var(--pk-gold);
  --portal-gold-rgb: var(--pk-gold-rgb);
  --accent: var(--portal);
  --accent-rgb: var(--portal-rgb);
  --accent-2: var(--portal-gold);
  --accent-2-rgb: var(--portal-gold-rgb);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: clamp(24px, 4vw, 48px);
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(var(--portal-rgb), .085), transparent 45%),
    linear-gradient(0deg, rgba(var(--panel-rgb), .34), rgba(var(--panel-rgb), .34));
  transition: background 380ms var(--ease-arrive), flex 400ms var(--ease-arrive), box-shadow 300ms;
  isolation: isolate;
}
.portal + .portal { border-left: 1px solid var(--line-strong); }
.portal--cn { --portal: var(--cn); --portal-rgb: var(--cn-rgb); --portal-gold: var(--cn-gold); --portal-gold-rgb: var(--cn-gold-rgb); --accent: var(--cn); --accent-rgb: var(--cn-rgb); --accent-2: var(--cn-gold); --accent-2-rgb: var(--cn-gold-rgb); }
.portal--cn.glow:hover::after, .portal--cn.glow:focus-visible::after {
  background:
    radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--cn-rgb), .34), rgba(var(--cn-rgb), .1) 42%, transparent 72%);
}
.portal.portal--cn:hover, .portal.portal--cn:focus-visible {
  box-shadow:
    inset 0 0 0 1px rgba(var(--cn-rgb), .55),
    inset 0 0 70px -28px rgba(var(--cn-rgb), .55),
    0 0 90px -18px rgba(var(--cn-rgb), .52),
    0 30px 110px -46px rgba(var(--cn-rgb), .75);
}
.portal--cn:hover .portal__mark, .portal--cn:focus-visible .portal__mark { filter: drop-shadow(0 0 24px rgba(var(--cn-gold-rgb), .42)); }
.portal:hover, .portal:focus-visible {
  background:
    linear-gradient(140deg, rgba(var(--portal-rgb), .16), transparent 55%),
    linear-gradient(0deg, rgba(var(--panel-rgb), .72), rgba(var(--panel-rgb), .72));
  box-shadow: inset 0 0 0 1px rgba(var(--portal-rgb), .4), 0 24px 80px -46px rgba(var(--portal-rgb), .6);
}
.portal:focus-visible { outline-offset: -4px; }

.portal__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .55;
  background-image:
    linear-gradient(to right, rgba(var(--portal-rgb), .16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(var(--portal-rgb), .16) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 80% 20%, #000, transparent 74%);
  mask-image: radial-gradient(ellipse 80% 70% at 80% 20%, #000, transparent 74%);
  transition: transform 600ms var(--ease-arrive), opacity 400ms;
}
.portal:hover .portal__grid { transform: scale(1.05); opacity: .8; }

.portal__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.portal__index { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; color: var(--portal); }
.portal__mark { width: clamp(74px, 10vw, 126px); height: clamp(74px, 10vw, 126px); color: var(--portal); transition: transform 600ms var(--ease-arrive); }
.portal:hover .portal__mark { transform: rotate(-8deg) scale(1.04); }
.portal__mark .m-line { fill: none; stroke: currentColor; stroke-width: 1.1; opacity: .55; }
.portal__mark .m-fill { fill: var(--portal-gold); opacity: .95; }
.portal__mark .m-green { fill: var(--portal); }
.portal__mark .m-star { fill: var(--portal-gold); }
.portal__mark .m-stroke { fill: none; stroke: var(--portal-gold); stroke-width: 1.2; }

.portal__body { display: grid; gap: 14px; max-width: 540px; margin-top: auto; padding-top: 42px; }
.portal__body h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 560;
  line-height: .96;
  letter-spacing: -.045em;
}
.portal__body h2 span { display: block; font-size: .38em; font-weight: 400; letter-spacing: .02em; color: var(--portal); margin-top: 8px; }
.portal__body p { color: var(--muted); font-size: 13px; line-height: 1.7; max-width: 430px; }
.portal__stats { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.portal__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(var(--portal-rgb), .28);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--portal);
}
.portal__cta svg { width: 30px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.2; transition: transform 260ms var(--ease-arrive); }
.portal:hover .portal__cta svg { transform: translateX(8px); }

.portal__scan {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--portal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 380ms var(--ease-arrive);
}
.portal:hover .portal__scan { transform: scaleX(1); }

.home__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding-top: 16px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.home__foot .dot { width: 5px; height: 5px; border: 1px solid currentColor; transform: rotate(45deg); }
.home__foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.home__foot a:hover { color: var(--accent); }

.home__enter { animation: homeEnter 700ms var(--ease-arrive) both; }
.home__enter--2 { animation-delay: 80ms; }
.home__enter--3 { animation-delay: 160ms; }
.home__enter--4 { animation-delay: 240ms; }

/* --------------------------------------------------------------------------
   System / network
   -------------------------------------------------------------------------- */

.system-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 30px; align-items: end; }
.system-head h1 { font-size: clamp(38px, 6vw, 84px); }
.system-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }
.system-stat { display: grid; gap: 1px; padding: 10px 0; border-top: 1px solid var(--line); }
.system-stat strong { font-family: var(--font-display); font-size: 26px; font-weight: 480; line-height: 1; }
.system-stat span { font-family: var(--font-mono); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

.network-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  margin-top: 22px;
  align-items: stretch;
}

.network-stage {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #0e120e;
  color: #f4f1e6;
  box-shadow: var(--shadow-float);
  isolation: isolate;
}
.network-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(244, 241, 230, .075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 241, 230, .075) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 36%, transparent 85%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 36%, transparent 85%);
}
.network-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 55% 50% at 50% 44%, rgba(var(--accent-rgb), .18), transparent 70%),
    radial-gradient(ellipse 30% 30% at 88% 90%, rgba(var(--accent-2-rgb), .1), transparent 70%);
}

.network-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(244, 241, 230, .16);
  color: rgba(244, 241, 230, .62);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.network-bar strong { color: #f4f1e6; font-weight: 500; }
.network-bar .live { display: inline-flex; align-items: center; gap: 6px; }
.network-bar .live i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); animation: pulse 2.8s infinite; }

.network-svg { width: 100%; height: auto; display: block; touch-action: manipulation; }
.network-canvas { overflow: hidden; }
.network-pan { display: none; color: var(--accent-2); }
.network-svg text { font-family: var(--font-sans); }
.net-link { stroke: rgba(244, 241, 230, .22); stroke-width: 1; stroke-dasharray: 3 7; transition: stroke 220ms, opacity 220ms; }
.net-link.is-hot { stroke: var(--accent-2); stroke-width: 1.4; opacity: 1; animation: dashFlow 1.6s linear infinite; }
.net-link.is-dim { opacity: .14; }
.net-node { cursor: pointer; outline: none; }
.net-node .node-hit { fill: transparent; }
.net-node .node-shape { fill: rgba(14, 18, 14, .86); stroke: rgba(244, 241, 230, .62); stroke-width: 1; transition: fill 220ms, stroke 220ms, filter 220ms, transform 220ms; transform-box: fill-box; transform-origin: center; }
.net-node .node-glow { fill: none; stroke: var(--accent-2); stroke-width: 1; opacity: 0; transition: opacity 220ms; }
.net-node .node-index { fill: rgba(244, 241, 230, .46); font-family: var(--font-mono); font-size: 8px; letter-spacing: .08em; }
.net-node .node-label { fill: rgba(244, 241, 230, .74); font-size: 11px; letter-spacing: .01em; transition: fill 220ms; }
.net-node .node-label-en { fill: rgba(244, 241, 230, .36); font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .08em; text-transform: uppercase; }
.net-node:hover .node-shape, .net-node:focus-visible .node-shape, .net-node.is-active .node-shape {
  fill: rgba(var(--accent-rgb), .24);
  stroke: var(--accent-2);
  filter: drop-shadow(0 0 12px rgba(var(--accent-2-rgb), .55));
}
.net-node:hover .node-glow, .net-node:focus-visible .node-glow, .net-node.is-active .node-glow { opacity: .9; }
.net-node:hover .node-label, .net-node:focus-visible .node-label, .net-node.is-active .node-label { fill: #fffdf7; }
.net-node.is-dim { opacity: .28; }
.net-node .node-core { fill: var(--accent-2); }
.net-node.is-active .node-core { filter: drop-shadow(0 0 8px var(--accent-2)); }

.network-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  padding: 12px 16px;
  border-top: 1px solid rgba(244, 241, 230, .16);
  color: rgba(244, 241, 230, .46);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.network-legend span { display: inline-flex; align-items: center; gap: 6px; }
.network-legend i { width: 6px; height: 6px; border: 1px solid currentColor; transform: rotate(45deg); }

.network-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  background: rgba(var(--panel-rgb), .62);
  box-shadow: var(--shadow-panel);
}
.network-panel__head { padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.network-panel__head .eyebrow { margin-bottom: 10px; }
.network-panel__head h2 { font-family: var(--font-display); font-size: 25px; line-height: 1.02; letter-spacing: -.03em; }
.network-panel__body { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; flex: 1; }
.network-panel__body p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.network-panel__list { display: grid; gap: 1px; border-top: 1px solid var(--line); }
.network-panel__list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.network-panel__list a span:last-child { font-family: var(--font-mono); font-size: 9px; color: var(--accent); }
.network-panel__list a:hover { color: var(--accent); text-shadow: 0 0 16px rgba(var(--accent-rgb), .45); }
.network-panel__foot { margin-top: auto; padding: 16px 18px 18px; border-top: 1px solid var(--line); }
.network-panel__foot .btn { width: 100%; }

.cluster-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.cluster-strip button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .04em;
  transition: border-color 160ms, color 160ms, background 160ms;
}
.cluster-strip button:hover, .cluster-strip button.is-active { color: var(--ink); border-color: rgba(var(--accent-rgb), .5); background: rgba(var(--accent-rgb), .06); }
.cluster-strip button b { font-weight: 500; color: var(--accent); }

/* --------------------------------------------------------------------------
   Org
   -------------------------------------------------------------------------- */

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 16px; color: var(--faint); font-family: var(--font-mono); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
.breadcrumb a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 4px; color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); text-shadow: 0 0 18px rgba(var(--accent-rgb), .5); }
.breadcrumb i { width: 4px; height: 4px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); margin: 0 4px; opacity: .6; }
.breadcrumb .current { color: var(--ink); }

.org-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 340px); gap: 26px; align-items: end; padding-bottom: 18px; border-bottom: 1px solid var(--line-strong); }
.org-head h1 { margin-top: 8px; font-family: var(--font-display); font-size: clamp(34px, 5vw, 66px); line-height: .96; letter-spacing: -.045em; }
.org-head h1 small { display: block; margin-top: 8px; font-family: var(--font-mono); font-size: 10px; font-weight: 400; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.org-head__side { display: grid; gap: 8px; justify-items: end; text-align: right; }
.org-head__side > a { display: inline-flex; align-items: center; min-height: 44px; }

.org-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 28px; margin-top: 24px; align-items: start; }
.org-tree { position: sticky; top: calc(var(--header-h) + 18px); max-height: calc(100vh - var(--header-h) - 36px); overflow: auto; padding: 12px; border: 1px solid var(--line); background: rgba(var(--panel-rgb), .52); scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.org-tree__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 6px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.org-tree__head strong { font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tree ul { display: grid; gap: 1px; }
.tree li { min-width: 0; }
.tree-row { display: flex; align-items: stretch; min-height: 44px; }
.tree-toggle { width: 44px; min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--faint); font-size: 10px; display: flex; align-items: center; justify-content: center; }
.tree-toggle:hover { color: var(--accent); }
.tree-toggle span { display: inline-block; transition: transform 180ms var(--ease-arrive); }
.tree-node { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; min-height: 44px; padding: 4px 6px; border-left: 1px solid var(--line); color: var(--muted); font-size: 11px; text-align: left; }
.tree-node:hover { color: var(--ink); background: rgba(var(--accent-rgb), .06); text-shadow: 0 0 16px rgba(var(--accent-rgb), .4); }
.tree-node.is-active { color: var(--accent); font-weight: 600; border-left-color: var(--accent); background: rgba(var(--accent-rgb), .07); }
.tree-node span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-node i { width: 5px; height: 5px; border: 1px solid currentColor; flex: none; transform: rotate(45deg); opacity: .55; }
.tree-children { margin-left: 13px; border-left: 1px dashed var(--line); padding-left: 2px; }
.tree-children.is-collapsed { display: none; }

.org-main { min-width: 0; display: grid; gap: 19px; }
.org-summary { position: relative; padding: 22px; border: 1px solid var(--line); background: rgba(var(--panel-rgb), .64); box-shadow: var(--shadow-panel); }
.org-summary::before { content: ""; position: absolute; top: -1px; left: -1px; width: 38px; height: 3px; background: var(--accent); }
.org-summary p { max-width: 780px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.org-summary .org-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

.power-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 17px; border-top: 1px solid var(--line); }
.power-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.55; }
.power-list li:nth-child(2n) { padding-left: 14px; border-left: 1px solid var(--line); }
.power-list b { font-family: var(--font-mono); font-size: 8px; color: var(--accent); font-weight: 500; }

.org-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: rgba(var(--panel-rgb), .4); }
.org-metric { padding: 14px 16px; border-left: 1px solid var(--line); }
.org-metric:first-child { border-left: 0; }
.org-metric strong { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 480; line-height: 1; }
.org-metric span { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line-strong); }
.section-head h2 { font-family: var(--font-display); font-size: 23px; line-height: 1; letter-spacing: -.02em; font-weight: 560; }
.section-head .mono { color: var(--faint); }

.children-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.child-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 136px;
  padding: 16px;
  background: var(--panel);
  transition: background 180ms, box-shadow 180ms;
}
.child-card:hover { background: var(--panel-2); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .36); z-index: 1; }
.child-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.child-card__kind { font-family: var(--font-mono); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.child-card__arrow { width: 18px; height: 18px; fill: none; stroke: var(--faint); stroke-width: 1.2; transition: transform 180ms, stroke 180ms; }
.child-card:hover .child-card__arrow { transform: translate(3px, -3px); stroke: var(--accent); }
.child-card h3 { font-size: 15px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; }
.child-card h3 small { display: block; margin-top: 3px; font-family: var(--font-mono); font-size: 8px; color: var(--faint); font-weight: 400; letter-spacing: .03em; }
.child-card p { margin-top: auto; color: var(--muted); font-size: 11px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.people-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.person-card {
  position: relative;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 104px;
  padding: 13px;
  background: var(--panel);
  transition: background 180ms, box-shadow 180ms;
}
.person-card:hover { background: var(--panel-2); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .36); z-index: 1; }
.person-card__avatar { width: 60px; height: 68px; }
.person-card__body { min-width: 0; display: grid; gap: 3px; }
.person-card__name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; font-weight: 600; letter-spacing: -.015em; }
.person-card__name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-card__title { color: var(--muted); font-size: 10.5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-card__meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.person-card__score { display: grid; justify-items: end; gap: 3px; min-width: 54px; }
.person-card__score strong { font-family: var(--font-display); font-size: 25px; line-height: .9; font-weight: 500; letter-spacing: -.04em; }
.person-card__score span { font-family: var(--font-mono); font-size: 7px; letter-spacing: .1em; color: var(--faint); text-transform: uppercase; }
.person-card__bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); width: calc(var(--pct) * 1%); opacity: .55; transition: width 600ms var(--ease-arrive); }
.person-card--hidden { opacity: .72; }

.avatar { position: relative; overflow: hidden; border: 1px solid var(--line-strong); background: var(--well); flex: none; }
.avatar::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(var(--accent-rgb), .18), transparent 60%); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: contrast(1.03) saturate(1.05); z-index: 1; transition: filter 220ms var(--ease-feedback); }
.avatar:hover img { filter: contrast(1.05) saturate(1.12); }
.avatar__fallback { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 20px; letter-spacing: -.03em; color: var(--accent); }
.avatar__fallback::before { content: ""; position: absolute; width: 46%; height: 46%; border: 1px solid rgba(var(--accent-rgb), .4); transform: rotate(45deg); }
.avatar__fallback span { position: relative; z-index: 1; }
.avatar--hidden .avatar__fallback { font-family: var(--font-mono); font-size: 14px; color: var(--faint); }
.avatar--hidden .avatar__fallback::before { border-style: dashed; opacity: .55; }

.empty-state { display: grid; place-items: center; gap: 10px; min-height: 180px; padding: 24px; border: 1px dashed var(--line-strong); color: var(--muted); text-align: center; }
.empty-state strong { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }

/* --------------------------------------------------------------------------
   Person
   -------------------------------------------------------------------------- */

.person-page { padding-top: 26px; }
.person-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.back-link:hover { color: var(--accent); text-shadow: 0 0 18px rgba(var(--accent-rgb), .5); }
.back-link svg { width: 22px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.2; }

.person-hero { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 28px; align-items: start; padding-bottom: 24px; border-bottom: 1px solid var(--line-strong); }
.person-id { position: sticky; top: calc(var(--header-h) + 18px); display: grid; gap: 15px; }
.person-portrait { position: relative; aspect-ratio: 4 / 5; border: 1px solid var(--line-strong); background: var(--well); overflow: hidden; }
.person-portrait::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(160deg, transparent 45%, rgba(var(--accent-rgb), .12)); pointer-events: none; }
.person-portrait::after { content: ""; position: absolute; inset: 12px; z-index: 2; border: 1px solid rgba(255, 253, 247, .18); pointer-events: none; }
.person-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: contrast(1.03) saturate(1.05); transition: filter 260ms var(--ease-feedback), transform 600ms var(--ease-arrive); }
.person-portrait:hover img { filter: contrast(1.05) saturate(1.12); transform: scale(1.015); }
.person-portrait .avatar { position: absolute; inset: 0; border: 0; }
.person-portrait .avatar__fallback { font-size: 82px; }
.person-portrait .avatar__fallback::before { width: 45%; height: 45%; }
.person-portrait__tag { position: absolute; left: 12px; bottom: 12px; z-index: 3; display: flex; gap: 5px; flex-wrap: wrap; }
.person-portrait__tag span { padding: 3px 6px; background: rgba(14, 18, 14, .72); color: #f4f1e6; font-family: var(--font-mono); font-size: 7.5px; letter-spacing: .07em; text-transform: uppercase; backdrop-filter: blur(8px); }

.q-card { padding: 15px; border: 1px solid var(--line); background: rgba(var(--panel-rgb), .6); }
.q-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.q-card__score { display: flex; align-items: baseline; gap: 4px; }
.q-card__score strong { font-family: var(--font-display); font-size: 44px; line-height: .9; font-weight: 520; letter-spacing: -.055em; }
.q-card__score span { font-family: var(--font-mono); font-size: 9px; color: var(--faint); }
.q-dial { width: 72px; height: 72px; transform: rotate(-90deg); }
.q-dial circle { fill: none; stroke-width: 3; }
.q-dial .track { stroke: var(--line); }
.q-dial .fill { stroke: var(--accent); stroke-linecap: square; stroke-dasharray: 188.5; stroke-dashoffset: 188.5; transition: stroke-dashoffset 900ms var(--ease-arrive); }
.q-card__labels { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.q-card__note { margin-top: 9px; color: var(--faint); font-size: 10px; line-height: 1.5; }

.person-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.person-title { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.person-title h1 { font-family: var(--font-display); font-size: clamp(40px, 6.5vw, 92px); line-height: .88; letter-spacing: -.06em; font-weight: 620; overflow-wrap: anywhere; }
.person-title h1 .latin { display: block; margin-top: 10px; font-family: var(--font-mono); font-size: clamp(10px, 1.3vw, 13px); font-weight: 400; letter-spacing: .08em; line-height: 1.4; color: var(--muted); text-transform: uppercase; }
.person-title .role-line { font-size: clamp(15px, 2vw, 21px); line-height: 1.35; color: var(--accent); }
.person-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.person-facts a.chip { min-height: 44px; padding-inline: 11px; }
.person-summary { max-width: 800px; font-size: 15px; line-height: 1.8; color: var(--muted); overflow-wrap: anywhere; }

.person-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.info-block { padding: 18px; border: 1px solid var(--line); background: rgba(var(--panel-rgb), .48); min-width: 0; }
.info-block h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.info-block h2::before { content: ""; width: 5px; height: 5px; background: var(--accent); transform: rotate(45deg); }
.info-list { display: grid; gap: 0; }
.info-list li { position: relative; padding: 9px 0 9px 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.info-list li:first-child { border-top: 0; padding-top: 0; }
.info-list li::before { content: ""; position: absolute; left: 0; top: 16px; width: 5px; height: 5px; border: 1px solid var(--accent); transform: rotate(45deg); }
.info-list li:first-child::before { top: 7px; }
.info-list li strong { color: var(--ink); font-weight: 600; }

.lever-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.lever { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 9px; border: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: .04em; }
.lever::before { content: ""; width: 5px; height: 5px; background: var(--accent-2); transform: rotate(45deg); }

.formula-card { position: relative; padding: 22px; border: 1px solid var(--line-strong); background: #0e120e; color: #f4f1e6; overflow: hidden; }
.formula-card::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(to right, rgba(244,241,230,.06) 1px, transparent 1px), linear-gradient(to bottom, rgba(244,241,230,.06) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(ellipse at 80% 20%, #000, transparent 70%); }
.formula-card > * { position: relative; }
.formula-card .eyebrow { color: rgba(244, 241, 230, .52); }
.formula { margin: 18px 0 6px; font-family: var(--font-mono); font-size: clamp(22px, 3.6vw, 42px); letter-spacing: -.03em; color: var(--accent-2); white-space: nowrap; overflow-x: auto; }
.formula sub { font-size: .55em; }
.formula-note { color: rgba(244, 241, 230, .5); font-size: 11px; line-height: 1.6; }
.q-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 18px; background: rgba(244, 241, 230, .14); border: 1px solid rgba(244, 241, 230, .14); }
.q-input { padding: 11px 12px; background: #0e120e; }
.q-input span { display: block; font-family: var(--font-mono); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: rgba(244, 241, 230, .42); }
.q-input strong { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 21px; font-weight: 450; color: #f4f1e6; }
.q-input small { display: block; margin-top: 1px; color: rgba(244, 241, 230, .38); font-size: 8.5px; }
.q-equation { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-family: var(--font-mono); font-size: 10px; color: rgba(244, 241, 230, .6); }
.q-equation b { color: var(--accent-2); font-weight: 500; }

.confidence { display: flex; align-items: center; gap: 4px; }
.confidence i { width: 15px; height: 4px; background: var(--line); }
.confidence i.on { background: var(--accent); }
.confidence span { margin-left: 5px; font-family: var(--font-mono); font-size: 8px; color: var(--muted); text-transform: uppercase; }
.confidence-row { display: grid; gap: 8px; }
.confidence-row p { color: var(--muted); font-size: 11.5px; line-height: 1.65; overflow-wrap: anywhere; }

.source-list { display: grid; gap: 0; }
.source-list a { display: flex; align-items: flex-start; gap: 8px; min-height: 44px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; }
.source-list a:first-child { border-top: 0; }
.source-list a::before { content: "↗"; color: var(--accent); font-family: var(--font-mono); font-size: 10px; line-height: 1.6; }
.source-list a:hover { color: var(--accent); text-shadow: 0 0 16px rgba(var(--accent-rgb), .4); }

.peer-list { display: grid; gap: 0; }
.peer-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 12px; }
.peer-list a:first-child { border-top: 0; }
.peer-list a:hover { color: var(--accent); }
.peer-list span:last-child { font-family: var(--font-mono); font-size: 10px; color: var(--faint); }

.note { padding: 14px 16px; border-left: 2px solid var(--accent-2); background: rgba(var(--accent-2-rgb), .06); color: var(--muted); font-size: 11px; line-height: 1.65; }

/* --------------------------------------------------------------------------
   Ranking
   -------------------------------------------------------------------------- */

.rank-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; margin-top: 22px; align-items: start; }
.rank-list { border-top: 1px solid var(--line-strong); }
.rank-row {
  position: relative;
  display: grid;
  grid-template-columns: 42px 46px minmax(0, 1fr) minmax(120px, 190px) 54px 50px;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 9px 10px 9px 0;
  border-bottom: 1px solid var(--line);
  transition: background 180ms, box-shadow 180ms;
}
.rank-row:hover { background: rgba(var(--accent-rgb), .055); box-shadow: inset 2px 0 0 var(--accent); }
.rank-row__rank { font-family: var(--font-display); font-size: 23px; font-weight: 460; color: var(--faint); text-align: center; }
.rank-row:nth-child(-n+3) .rank-row__rank { color: var(--accent); }
.rank-row__avatar .avatar { width: 42px; height: 48px; }
.rank-row__avatar .avatar__fallback { font-size: 14px; }
.rank-row__body { min-width: 0; display: grid; gap: 2px; }
.rank-row__name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; font-weight: 600; }
.rank-row__name span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row__meta { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row__bar { height: 4px; background: var(--well); overflow: hidden; }
.rank-row__bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 700ms var(--ease-arrive); }
.rank-row__score { text-align: right; font-family: var(--font-display); font-size: 22px; font-weight: 500; letter-spacing: -.04em; }
.rank-row__badge { text-align: right; }
.rank-row__system { font-family: var(--font-mono); font-size: 7px; letter-spacing: .1em; color: var(--faint); text-transform: uppercase; }
.rank-note { position: sticky; top: calc(var(--header-h) + 18px); display: grid; gap: 16px; }
.rank-note__card { padding: 17px; border: 1px solid var(--line); background: rgba(var(--panel-rgb), .52); }
.rank-note__card h2 { margin-bottom: 8px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rank-note__card p { color: var(--muted); font-size: 11.5px; line-height: 1.65; }
.rank-note__stat { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.rank-note__stat strong { font-family: var(--font-display); font-size: 25px; font-weight: 480; }
.rank-note__stat span { font-family: var(--font-mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; }
.filter-bar button { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.filter-bar button:hover { border-color: var(--accent); color: var(--ink); }
.filter-bar button.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* --------------------------------------------------------------------------
   Method
   -------------------------------------------------------------------------- */

.method-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 26px; margin-top: 24px; align-items: start; }
.method-main { display: grid; gap: 22px; }
.method-section { padding: 20px; border: 1px solid var(--line); background: rgba(var(--panel-rgb), .5); }
.method-section h2 { margin-bottom: 10px; font-family: var(--font-display); font-size: 25px; line-height: 1.05; letter-spacing: -.03em; }
.method-section h3 { margin: 16px 0 6px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.method-section p, .method-section li { color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.method-section ul { display: grid; gap: 7px; margin-top: 8px; }
.method-section ul li { position: relative; padding-left: 15px; }
.method-section ul li::before { content: ""; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border: 1px solid var(--accent); transform: rotate(45deg); }
.coef-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.coef-table th, .coef-table td { padding: 9px 8px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 11px; }
.coef-table th { font-family: var(--font-mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
.coef-table td:last-child { font-family: var(--font-mono); color: var(--accent); white-space: nowrap; }
.coef-table tr:hover td { background: rgba(var(--accent-rgb), .04); }

.method-side { display: grid; gap: 14px; position: sticky; top: calc(var(--header-h) + 18px); }
.method-side .formula-card { padding: 20px; }
.method-side .formula { font-size: 31px; }

.source-table { display: grid; gap: 0; }
.source-table a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 46px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.source-table a:hover { color: var(--accent); text-shadow: 0 0 16px rgba(var(--accent-rgb), .4); }
.source-table a span:last-child { font-family: var(--font-mono); font-size: 8px; color: var(--faint); }

.update-box { display: grid; gap: 12px; }
.update-box .field { margin: 0; }
.update-box .btn { width: fit-content; }

/* --------------------------------------------------------------------------
   Search
   -------------------------------------------------------------------------- */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: start center;
  padding: min(12vh, 110px) 18px 18px;
  background: rgba(8, 10, 8, .55);
  backdrop-filter: blur(12px);
}
.search-overlay[hidden] { display: none; }
.search-panel { width: min(680px, 100%); max-height: min(74vh, 720px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-strong); box-shadow: var(--shadow-float); animation: searchIn 240ms var(--ease-arrive) both; }
.search-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.search-panel__head h2 { font-family: var(--font-display); font-size: 21px; font-weight: 560; letter-spacing: -.02em; }
.close-btn { min-width: 44px; min-height: 44px; padding: 0 9px; border: 1px solid var(--line); background: transparent; color: var(--faint); font-family: var(--font-mono); font-size: 8px; letter-spacing: .06em; }
.close-btn:hover { color: var(--ink); border-color: var(--accent); }
.search-field { display: flex; align-items: center; gap: 10px; margin: 14px 17px 0; padding: 0 12px; border: 1px solid var(--line-strong); background: var(--well); }
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .1); }
.search-field:hover { border-color: rgba(var(--accent-rgb), .5); box-shadow: 0 0 22px -10px rgba(var(--accent-rgb), .55); }
.search-field svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.35; }
.search-field input { width: 100%; min-height: 48px; border: 0; background: transparent; outline: none; font-size: 14px; }
.search-field input::placeholder { color: var(--faint); }
.search-hint { display: flex; flex-wrap: wrap; gap: 10px 16px; padding: 9px 17px 11px; color: var(--faint); font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; letter-spacing: .04em; }
.search-hint kbd { display: inline-block; min-width: 15px; margin-right: 2px; padding: 1px 3px; border: 1px solid var(--line); text-align: center; }
.search-results { overflow: auto; border-top: 1px solid var(--line); }
.search-result { display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; gap: 11px; align-items: center; min-height: 58px; padding: 9px 17px; border-bottom: 1px solid var(--line); cursor: pointer; }
.search-result:hover, .search-result.is-selected { background: rgba(var(--accent-rgb), .07); }
.search-result__mark { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 8px; color: var(--accent); }
.search-result__body { min-width: 0; display: grid; gap: 1px; }
.search-result__name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result__meta { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result__type { font-family: var(--font-mono); font-size: 8px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.search-empty { padding: 34px 18px; text-align: center; color: var(--muted); font-size: 12px; }

/* --------------------------------------------------------------------------
   Dialog / toast
   -------------------------------------------------------------------------- */

.update-dialog {
  width: min(640px, calc(100vw - 28px));
  max-height: 88vh;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-float);
}
.update-dialog::backdrop { background: rgba(8, 10, 8, .58); backdrop-filter: blur(10px); }
.update-dialog__inner { padding: 20px; display: grid; gap: 14px; overflow: auto; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-head h2 { margin-top: 5px; font-family: var(--font-display); font-size: 28px; line-height: 1; letter-spacing: -.03em; }
.dialog-copy { color: var(--muted); font-size: 12px; line-height: 1.7; }
.field { display: grid; gap: 5px; }
.field__label { font-family: var(--font-mono); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.field input { min-height: 44px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 0; background: var(--well); color: var(--ink); outline: none; font-size: 12px; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .1); }
.field input:hover { border-color: rgba(var(--accent-rgb), .5); box-shadow: 0 0 22px -10px rgba(var(--accent-rgb), .55); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.file-btn { position: relative; overflow: hidden; }
.update-status { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); background: var(--well); color: var(--muted); font-size: 11px; line-height: 1.5; }
.status-dot { flex: none; width: 6px; height: 6px; margin-top: 5px; border-radius: 50%; background: var(--faint); }
.update-status[data-state="pending"] .status-dot { background: var(--accent-2); animation: pulse 1.2s infinite; }
.update-status[data-state="success"] .status-dot { background: #3d7a4e; }
.update-status[data-state="error"] .status-dot { background: #c0442f; }
.dialog-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 4px; color: var(--faint); font-family: var(--font-mono); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.dialog-meta a { color: var(--muted); }
.dialog-meta a:hover { color: var(--accent); }

.toast { position: fixed; left: 50%; bottom: 22px; z-index: 140; transform: translate(-50%, 20px); max-width: min(540px, calc(100vw - 32px)); padding: 11px 16px; border: 1px solid var(--line-strong); background: var(--ink); color: var(--bezel); font-size: 11px; line-height: 1.4; opacity: 0; pointer-events: none; transition: opacity 220ms, transform 220ms var(--ease-arrive); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   Route transition / motion
   -------------------------------------------------------------------------- */

.route-curtain { position: fixed; inset: 0; z-index: 110; display: grid; grid-template-columns: repeat(5, 1fr); pointer-events: none; }
.route-curtain i { display: block; background: var(--accent); transform: scaleY(0); transform-origin: top; }
.route-curtain.is-active i { animation: curtain 560ms var(--ease-arrive) both; }
.route-curtain.is-active i:nth-child(2) { animation-delay: 35ms; }
.route-curtain.is-active i:nth-child(3) { animation-delay: 70ms; }
.route-curtain.is-active i:nth-child(4) { animation-delay: 105ms; }
.route-curtain.is-active i:nth-child(5) { animation-delay: 140ms; }

#view.is-entering { animation: viewIn 360ms var(--ease-arrive) both; }
#view.is-leaving { opacity: 0; transform: translateY(5px); transition: opacity 150ms var(--ease-leave), transform 150ms var(--ease-leave); }

@keyframes homeEnter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px) scale(.997); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes searchIn { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes curtain { 0% { transform: scaleY(0); } 42% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }
@keyframes dashFlow { to { stroke-dashoffset: -20; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .32; } }
@keyframes drawLine { to { stroke-dashoffset: 0; } }

.net-link { stroke-dashoffset: 0; }
.network-svg.is-drawing .net-link { stroke-dasharray: 900; animation: drawLine 1200ms var(--ease-arrive) both; }
.network-svg.is-drawing .net-node { animation: nodeIn 500ms var(--ease-arrive) both; animation-delay: calc(var(--node-i) * 45ms + 200ms); }
@keyframes nodeIn { from { opacity: 0; } to { opacity: 1; } }

.q-dial.is-live .fill { stroke-dashoffset: var(--offset); }
.reveal { animation: homeEnter 500ms var(--ease-arrive) both; animation-delay: calc(var(--i, 0) * 34ms); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1120px) {
  .home__head { grid-template-columns: 1fr; gap: 24px; }
  .home__lede { justify-self: start; max-width: 680px; }
  .network-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .children-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rank-wrap { grid-template-columns: minmax(0, 1fr) 260px; }
}

@media (max-width: 980px) {
  .network-layout { grid-template-columns: 1fr; }
  .network-stage { min-height: 500px; }
  .network-panel { min-height: auto; }
  .network-panel__body { display: grid; grid-template-columns: 1fr 1fr; }
  .network-panel__list { border-top: 0; }
  .network-panel__foot { margin-top: 0; }
  .org-layout { grid-template-columns: 1fr; }
  .org-tree { position: static; max-height: 330px; }
  .org-head { grid-template-columns: 1fr; }
  .org-head__side { justify-items: start; text-align: left; }
  .person-hero { grid-template-columns: 270px minmax(0, 1fr); }
  .rank-wrap { grid-template-columns: 1fr; }
  .rank-note { position: static; grid-template-columns: 1fr 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .method-side { position: static; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  :root { --header-h: 62px; }
  .site-header { gap: 8px; }
  .brand__text span { display: none; }
  .brand__text strong { font-size: 20px; }
  .top-nav { gap: 0; }
  .top-nav a, .top-nav button { padding: 0 8px; font-size: 11px; }
  .top-nav a::before, .top-nav button::before { display: none; }
  .icon-btn__label, .icon-btn kbd { display: none; }
  .home { min-height: auto; }
  .home__head { grid-template-columns: 1fr; }
  .home__title { grid-template-columns: 1fr; gap: 8px; margin-top: 18px; }
  .home__title h1 { font-size: clamp(72px, 21vw, 140px); line-height: .94; padding-bottom: 8px; }
  .home__title-block { padding-bottom: 0; }
  .portals { grid-template-columns: 1fr; min-height: 0; }
  .portal { min-height: 390px; padding: 26px; }
  .portal + .portal { border-left: 0; border-top: 1px solid var(--line-strong); }
  .portal__mark { width: 90px; height: 90px; }
  .portal__body { padding-top: 32px; }
  .portal__body h2 { font-size: clamp(32px, 8vw, 54px); }
  .home__foot { gap: 8px 18px; }
  .system-head { grid-template-columns: 1fr; }
  .page-head { grid-template-columns: 1fr; }
  .page-head__meta { justify-items: start; text-align: left; }
  .children-grid { grid-template-columns: 1fr; }
  .people-grid { grid-template-columns: 1fr; }
  .power-list { grid-template-columns: 1fr; }
  .power-list li:nth-child(2n) { padding-left: 0; border-left: 0; }
  .org-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .org-metric:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .org-metric:nth-child(4) { border-top: 1px solid var(--line); }
  .person-hero { grid-template-columns: minmax(0, 1fr); }
  .person-id { position: static; grid-template-columns: 150px minmax(0, 1fr); align-items: start; }
  .person-id, .person-main, .q-card { min-width: 0; }
  .person-portrait { aspect-ratio: 4 / 5; }
  .q-card { height: 100%; }
  .person-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .method-side { grid-template-columns: 1fr; }
  .rank-row { grid-template-columns: 32px 40px minmax(0, 1fr) 45px; gap: 8px; }
  .rank-row__bar, .rank-row__badge { display: none; }
  .rank-row__score { font-size: 20px; }
  .rank-row__avatar .avatar { width: 38px; height: 43px; }
  .rank-row__system { display: none; }
  .search-overlay { padding-top: 40px; }
}

@media (max-width: 620px) {
  .site-header { grid-template-columns: auto 1fr auto; }
  .top-nav { display: none; }
  .header-tools { gap: 0; }
  .home { padding: 14px; }
  .home__title { gap: 10px; }
  .home__title h1 { font-size: clamp(62px, 23vw, 108px); }
  .home__title-block strong { font-size: 8px; letter-spacing: .18em; }
  .home__title-block span { font-size: 11px; }
  .home__metrics { gap: 8px; }
  .home__metric strong { font-size: 22px; }
  .portal { min-height: 340px; padding: 20px; }
  .portal__mark { width: 68px; height: 68px; }
  .portal__body { gap: 10px; padding-top: 24px; }
  .portal__body h2 { font-size: 34px; }
  .portal__body h2 span { font-size: .42em; }
  .portal__body p { font-size: 12px; }
  .network-stage { min-height: 390px; }
  .network-bar { padding: 11px 12px; font-size: 8px; }
  .network-pan { display: inline; }
  .network-canvas { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: rgba(244,241,230,.28) transparent; }
  .network-canvas::-webkit-scrollbar { height: 5px; }
  .network-canvas::-webkit-scrollbar-thumb { background: rgba(244, 241, 230, .28); }
  .network-svg { min-width: 720px; }
  .network-panel__body { grid-template-columns: 1fr; }
  .network-legend { font-size: 7.5px; }
  .page { padding-top: 22px; }
  .page-head h1 { font-size: clamp(32px, 10vw, 54px); }
  .org-summary { padding: 16px; }
  .org-head h1 { font-size: 34px; }
  .org-metrics { grid-template-columns: 1fr 1fr; }
  .person-card { grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 10px; min-height: 88px; padding: 10px; }
  .person-card__avatar { width: 48px; height: 55px; }
  .person-card__score strong { font-size: 21px; }
  .person-id { grid-template-columns: 105px minmax(0, 1fr); gap: 12px; }
  .person-portrait__tag { left: 7px; bottom: 7px; }
  .person-portrait__tag span { font-size: 6.5px; padding: 2px 4px; }
  .person-portrait__tag span:nth-child(2) { display: none; }
  .person-title h1 { font-size: clamp(38px, 13vw, 62px); }
  .person-summary { font-size: 13.5px; }
  .q-card { padding: 11px; }
  .q-card__score strong { font-size: 35px; }
  .q-dial { width: 56px; height: 56px; }
  .q-inputs { grid-template-columns: 1fr 1fr; }
  .q-input:last-child { grid-column: span 2; }
  .formula { font-size: 21px; }
  .rank-row { grid-template-columns: 27px 36px minmax(0, 1fr) 42px; gap: 7px; }
  .rank-row__rank { font-size: 18px; }
  .rank-row__avatar .avatar { width: 34px; height: 39px; }
  .rank-note { grid-template-columns: 1fr; }
  .dialog-actions .btn { flex: 1 1 auto; }
  .site-footer { font-size: 8px; }
  .site-footer a { margin-left: 0; }
  .search-panel__head h2 { font-size: 18px; }
}

@media (max-width: 380px) {
  .brand__mark { width: 32px; height: 32px; }
  .brand__text strong { font-size: 18px; }
  .portal__stats .chip { font-size: 8px; padding: 2px 6px; }
  .home__title h1 { font-size: 60px; }
  .person-card { grid-template-columns: 42px minmax(0, 1fr) 42px; }
  .person-card__avatar { width: 42px; height: 49px; }
  .person-card__meta .chip:nth-child(2) { display: none; }
  .person-id { grid-template-columns: 88px minmax(0, 1fr); }
  .q-card__score strong { font-size: 31px; }
  .q-dial { width: 48px; height: 48px; }
  .rank-row { grid-template-columns: 24px 32px minmax(0, 1fr) 38px; }
  .rank-row__avatar .avatar { width: 30px; height: 34px; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  .net-link { stroke-dasharray: none; }
  .network-svg.is-drawing .net-link { animation: none; stroke-dasharray: 3 7; }
  .network-svg.is-drawing .net-node { animation: none; }
  .glow::after { display: none; }
  .portal:hover .portal__grid { transform: none; }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header, .site-footer, .route-curtain, .search-overlay, .update-dialog, .toast, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  body::before, body::after { display: none; }
  .page { padding: 0; }
}
