/* ==========================================================================
   安澜 ANLAN · 海上应急语言服务 — 全站设计系统
   夜航（默认）/ 白昼 双主题；移动优先；打印友好
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #060d15;
  --bg-grad-1: #0a1725;
  --bg-grad-2: #060d15;
  --surface: #0c1724;
  --surface-2: #101f2f;
  --surface-3: #14273a;
  --ink: #eaf2fa;
  --ink-2: #a8bacc;
  --ink-3: #6f849a;
  --ink-4: #4a5d71;
  --line: rgba(150, 184, 214, .13);
  --line-2: rgba(150, 184, 214, .26);
  --accent: #ff6b3d;
  --accent-ink: #fff;
  --accent-soft: rgba(255, 107, 61, .12);
  --gold: #ffc24b;
  --sea: #45b8dd;
  --sea-soft: rgba(69, 184, 221, .12);
  --ok: #2fbf87;
  --ok-soft: rgba(47, 191, 135, .13);
  --warn: #ffb020;
  --warn-soft: rgba(255, 176, 32, .13);
  --danger: #ff5566;
  --danger-soft: rgba(255, 85, 102, .13);
  --shadow-1: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 30px -18px rgba(0, 0, 0, .9);
  --shadow-2: 0 24px 60px -30px rgba(0, 0, 0, .95);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --maxw: 1240px;
  --nav-h: 62px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Mono", Consolas, "Courier New", monospace;
}

html[data-theme="day"] {
  --bg: #f2f6fa;
  --bg-grad-1: #ffffff;
  --bg-grad-2: #eef3f8;
  --surface: #ffffff;
  --surface-2: #f7fafc;
  --surface-3: #eef4f9;
  --ink: #0a1a2a;
  --ink-2: #3f566c;
  --ink-3: #6c8199;
  --ink-4: #93a6b9;
  --line: rgba(10, 26, 42, .1);
  --line-2: rgba(10, 26, 42, .2);
  --accent: #e04e21;
  --accent-soft: rgba(224, 78, 33, .09);
  --gold: #b07b00;
  --sea: #147d9c;
  --sea-soft: rgba(20, 125, 156, .09);
  --ok: #10815c;
  --ok-soft: rgba(16, 129, 92, .09);
  --warn: #9a6200;
  --warn-soft: rgba(154, 98, 0, .1);
  --danger: #c62a3d;
  --danger-soft: rgba(198, 42, 61, .08);
  --shadow-1: 0 1px 2px rgba(10, 26, 42, .06), 0 10px 24px -18px rgba(10, 26, 42, .35);
  --shadow-2: 0 24px 60px -32px rgba(10, 26, 42, .35);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 620px at 82% -8%, rgba(69, 184, 221, .10), transparent 62%),
    radial-gradient(900px 520px at 6% 8%, rgba(255, 107, 61, .07), transparent 60%),
    linear-gradient(180deg, var(--bg-grad-1), var(--bg-grad-2));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(1200px 700px at 50% 0%, #000 8%, transparent 72%);
  -webkit-mask-image: radial-gradient(1200px 700px at 50% 0%, #000 8%, transparent 72%);
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; border-radius: 4px; }

/* ---------- 2. Typography ---------- */
h1, h2, h3, h4, h5 { margin: 0; font-weight: 650; letter-spacing: -.015em; line-height: 1.22; }
h1 { font-size: clamp(34px, 5.4vw, 60px); letter-spacing: -.03em; }
h2 { font-size: clamp(24px, 2.8vw, 34px); }
h3 { font-size: clamp(18px, 1.6vw, 21px); }
p { margin: 0 0 .8em; }
small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.big-num { font-size: clamp(26px, 3.4vw, 40px); font-weight: 660; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.eyebrow {
  font-size: 11px; font-weight: 640; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3); display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
.eyebrow.plain::before { display: none; }
.lead { font-size: clamp(15px, 1.35vw, 18px); color: var(--ink-2); line-height: 1.7; }
.dim { color: var(--ink-3); }
.hl { color: var(--accent); }
.hl-sea { color: var(--sea); }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

/* language glyph fallbacks */
[lang="ja"], .lang-ja { font-family: "Yu Gothic", "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", "Meiryo", var(--font); }
[lang="ko"], .lang-ko { font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", var(--font); }
[lang="th"], .lang-th { font-family: "Leelawadee UI", "Tahoma", "Noto Sans Thai", var(--font); }
[lang="vi"], .lang-vi { font-family: var(--font); }

/* ---------- 3. Layout ---------- */
.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: min(100% - 28px, var(--maxw)); } }
.section { padding: clamp(46px, 6vw, 84px) 0; position: relative; }
.section.tight { padding: clamp(30px, 3.4vw, 46px) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head .t { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.hair { height: 1px; background: var(--line); border: 0; margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap-y { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mt0 { margin-top: 0 } .mt8 { margin-top: 8px } .mt16 { margin-top: 16px }
.mt24 { margin-top: 24px } .mt36 { margin-top: 36px } .mb0 { margin-bottom: 0 }

/* ---------- 4. Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60; height: var(--nav-h);
  backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-in { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; min-width: 0; }
.brand > span:last-child { min-width: 0; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(150deg, var(--accent), #b8360f);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px;
  box-shadow: 0 6px 16px -8px var(--accent);
}
.brand-name { font-weight: 700; letter-spacing: .02em; font-size: 15.5px; line-height: 1.15; }
.brand-sub { font-size: 9.5px; letter-spacing: .16em; color: var(--ink-3); text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 8px; flex: 1 1 auto; overflow: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  padding: 8px 11px; border-radius: 9px; font-size: 13.5px; color: var(--ink-2);
  white-space: nowrap; transition: .16s; display: flex; flex-direction: column; line-height: 1.15;
}
.nav-links a em { font-style: normal; font-size: 8.5px; letter-spacing: .1em; color: var(--ink-4); text-transform: uppercase; }
.nav-links a:hover { background: var(--surface-2); color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
  transition: .16s;
}
.icon-btn:hover { border-color: var(--line-2); color: var(--ink); }
.badge-drill {
  font-size: 10.5px; letter-spacing: .08em; padding: 4px 9px; border-radius: 999px;
  color: var(--warn); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 32%, transparent);
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.badge-drill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); animation: blink 2.4s infinite; }
@keyframes blink { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }

.nav-toggle { display: none; }
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .nav-open .nav-links {
    display: grid; position: fixed; inset: var(--nav-h) 0 auto 0; background: var(--surface);
    padding: 12px 20px 20px; gap: 4px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-2); max-height: calc(100vh - var(--nav-h)); overflow: auto;
  }
  .nav-open .nav-links a { padding: 12px 10px; font-size: 15px; }
}

/* SOS 工具台 */
.sos-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px;
  border-radius: 9px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: .18s;
}
.sos-btn:hover { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 560px) { .sos-btn span { display: none } }

/* 手机端导航：隐藏长副标题，压缩间距，保证品牌 + 状态 + 三个按钮在 390px 内排下 */
@media (max-width: 720px) {
  .brand-sub { display: none; }
  .brand { gap: 8px; }
  .brand-name { font-size: 14.5px; white-space: nowrap; }
  .brand-mark { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }
  .nav-in { gap: 8px; }
  .nav-actions { gap: 6px; }
  .icon-btn, .sos-btn { width: 32px; height: 32px; padding: 0; justify-content: center; }
  .badge-drill { font-size: 9.5px; padding: 3px 7px; }
  .nav-links a { font-size: 15px; }
}

/* ---------- 5. Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 11px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--ink); font-size: 14px; font-weight: 560;
  cursor: pointer; transition: .18s; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--ink-4); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 10px 26px -14px var(--accent); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: transparent; }
.btn-sea { background: var(--sea-soft); border-color: color-mix(in srgb, var(--sea) 40%, transparent); color: var(--sea); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 15.5px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-size: 12.5px; cursor: pointer; transition: .16s; white-space: nowrap;
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip[aria-pressed="true"], .chip.on {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.chip-sm { padding: 4px 9px; font-size: 11.5px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px;
  font-size: 11.5px; font-weight: 560; letter-spacing: .02em; border: 1px solid transparent;
}
.pill.ok { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.pill.warn { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }
.pill.danger { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 28%, transparent); }
.pill.sea { color: var(--sea); background: var(--sea-soft); border-color: color-mix(in srgb, var(--sea) 28%, transparent); }
.pill.mute { color: var(--ink-3); background: var(--surface-2); border-color: var(--line); }

/* ---------- 6. Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-1); position: relative;
}
.card.hover { transition: .2s; }
.card.hover:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.card.flat { background: var(--surface); }
.card.pad-lg { padding: 26px; }
.card.pad-sm { padding: 14px; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: var(--surface-3); color: var(--sea); border: 1px solid var(--line);
}
.card-ico.accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.card h3 { margin-bottom: 6px; }
.card p:last-child { margin-bottom: 0; }
.card-kicker { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-4); }

.feature-link { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.feature-link .arrow { margin-top: auto; font-size: 12.5px; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.feature-link:hover .arrow { gap: 10px; }

/* 大动作块 */
.tile {
  display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--line); background: linear-gradient(165deg, var(--surface-2), var(--surface));
  transition: .2s; position: relative; overflow: hidden;
}
.tile::after {
  content: ""; position: absolute; inset: auto -30% -60% auto; width: 240px; height: 240px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%); opacity: 0; transition: .3s;
}
.tile:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow-2); }
.tile:hover::after { opacity: 1; }
.tile.primary { background: linear-gradient(150deg, #ff7a4d, #e04a1c); border-color: transparent; color: #fff; }
.tile.primary .dim, .tile.primary .card-kicker { color: rgba(255, 255, 255, .72); }
.tile.primary .card-ico { background: rgba(255, 255, 255, .16); color: #fff; border-color: transparent; }
.tile-title { font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.tile-desc { font-size: 13px; color: var(--ink-2); }

/* ---------- 7. Stat / meter ---------- */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-4); }
.meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--sea), var(--accent)); }

.kpi-strip { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.kpi-strip > div { padding: 16px 18px; border-right: 1px solid var(--line); }
.kpi-strip > div:last-child { border-right: 0; }
@media (max-width: 900px) { .kpi-strip { grid-template-columns: repeat(2, 1fr); } .kpi-strip > div { border-bottom: 1px solid var(--line); } }

/* ---------- 8. Table / list ---------- */
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4);
  padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; z-index: 2;
  font-weight: 600; white-space: nowrap;
}
table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr { cursor: pointer; transition: background .14s; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl tbody tr.sel { background: var(--accent-soft); }
.tbl-empty { padding: 40px; text-align: center; color: var(--ink-3); }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.list-item:last-child { border-bottom: 0; }

/* ---------- 9. Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; font-size: 14px; color: var(--ink); transition: .16s; min-height: 42px;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--sea); outline: none; box-shadow: 0 0 0 3px var(--sea-soft); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.search { position: relative; }
.search .input { padding-left: 38px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-4); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; padding: 7px 13px; border-radius: 7px; font-size: 13px;
  color: var(--ink-2); cursor: pointer; transition: .14s; white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); box-shadow: var(--shadow-1); font-weight: 560; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 999px; background: var(--surface-3); position: relative; cursor: pointer; transition: .18s; border: 1px solid var(--line); margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink-3); transition: .18s; }
.switch input:checked { background: var(--accent-soft); border-color: var(--accent); }
.switch input:checked::after { left: 18px; background: var(--accent); }

/* ---------- 10. Modal / drawer / toast ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 100; background: rgba(3, 8, 13, .66);
  backdrop-filter: blur(6px); display: none; padding: 24px; overflow: auto;
}
.modal-back.on { display: flex; align-items: flex-start; justify-content: center; }
.modal {
  width: min(920px, 100%); margin: auto; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-2); overflow: hidden;
  animation: pop .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes pop { from { transform: translateY(14px) scale(.985); opacity: 0 } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface-2); }

.toast-host { position: fixed; z-index: 200; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast {
  background: var(--surface-3); border: 1px solid var(--line-2); color: var(--ink);
  padding: 10px 16px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow-2);
  animation: rise .24s ease-out;
}
@keyframes rise { from { transform: translateY(10px); opacity: 0 } }

/* ---------- 11. Special: waveform, stepper, timeline ---------- */
.wave { display: inline-flex; align-items: center; gap: 3px; height: 18px; }
.wave i { width: 3px; border-radius: 2px; background: currentColor; height: 30%; animation: wave 1s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: .12s } .wave i:nth-child(3) { animation-delay: .24s }
.wave i:nth-child(4) { animation-delay: .36s } .wave i:nth-child(5) { animation-delay: .48s }
.wave i:nth-child(6) { animation-delay: .6s }
@keyframes wave { 0%, 100% { height: 25% } 50% { height: 100% } }
.wave.idle i { animation: none; height: 22%; }

.steps { display: flex; gap: 0; counter-reset: s; }
.steps > div { flex: 1; padding: 0 12px 0 0; position: relative; }
.steps .n {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center;
  font-size: 12px; color: var(--ink-2); margin-bottom: 10px; background: var(--surface);
}
.steps > div.on .n { background: var(--accent); border-color: transparent; color: #fff; }
.steps .t { font-size: 13px; font-weight: 600; margin-bottom: 4px; }

.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 26px; height: 1px; background: var(--line-2); }
.tl-item { position: relative; padding-top: 54px; }
.tl-item::before {
  content: ""; position: absolute; top: 21px; left: 0; width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--bg);
}
.tl-item .when { font-size: 11px; letter-spacing: .12em; color: var(--accent); font-weight: 640; margin-bottom: 6px; }
.tl-item .what { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.tl-item .tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
@media (max-width: 860px) {
  .timeline { grid-template-columns: 1fr; }
  .timeline::before { display: none; }
  .tl-item { padding-top: 0; padding-left: 26px; }
  .tl-item::before { top: 6px; }
}

/* ---------- 12. Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 46px 0 30px; margin-top: 20px; background: color-mix(in srgb, var(--bg) 60%, transparent); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 30px; }
.footer h5 { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 12px; }
.footer a { color: var(--ink-2); font-size: 13.5px; display: block; padding: 4px 0; }
.footer a:hover { color: var(--accent); }
.footer-note { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-4); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- 13. Page: home ---------- */
.hero { padding: clamp(46px, 7vw, 84px) 0 clamp(30px, 4vw, 54px); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(26px, 4vw, 54px); align-items: center; }
.hero h1 { margin: 16px 0 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { max-width: 560px; font-size: clamp(14.5px, 1.3vw, 17px); color: var(--ink-2); line-height: 1.75; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero-meta { display: flex; gap: 20px; margin-top: 26px; flex-wrap: wrap; }
.hero-meta .stat .v { font-size: 19px; font-weight: 650; }

.radar {
  position: relative; aspect-ratio: 1; max-width: 460px; margin-inline: auto; width: 100%;
  border-radius: 50%; border: 1px solid var(--line);
  background:
    radial-gradient(circle, transparent 58%, var(--surface) 58.4%, transparent 59%),
    radial-gradient(circle, transparent 74%, var(--surface) 74.4%, transparent 75%),
    radial-gradient(circle at 50% 50%, rgba(69, 184, 221, .10), transparent 62%);
  display: grid; place-items: center;
}
.radar::before, .radar::after {
  content: ""; position: absolute; background: var(--line);
}
.radar::before { left: 50%; top: 6%; bottom: 6%; width: 1px; }
.radar::after { top: 50%; left: 6%; right: 6%; height: 1px; }
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(69, 184, 221, .18) 26deg, transparent 46deg);
  animation: sweep 7s linear infinite;
}
@keyframes sweep { to { transform: rotate(360deg) } }
.radar-core {
  position: relative; z-index: 2; text-align: center; padding: 26px;
}
.radar-core .t1 { font-size: 11px; letter-spacing: .2em; color: var(--ink-3); text-transform: uppercase; }
.radar-core .t2 { font-size: clamp(20px, 2.4vw, 27px); font-weight: 660; margin: 8px 0 6px; letter-spacing: -.01em; }
.radar-core .t3 { font-size: 12px; color: var(--ink-3); }
.blip { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: ping 2.8s infinite; }
.blip.b1 { top: 27%; left: 62% } .blip.b2 { top: 62%; left: 33%; animation-delay: .9s; background: var(--sea) }
.blip.b3 { top: 70%; left: 68%; animation-delay: 1.7s }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 107, 61, .5) } 70% { box-shadow: 0 0 0 14px rgba(255, 107, 61, 0) } 100% { box-shadow: 0 0 0 0 rgba(255, 107, 61, 0) } }
.radar-tag { position: absolute; font-size: 10px; color: var(--ink-3); font-family: var(--mono); }
.radar-tag.a { top: 22%; left: 66% } .radar-tag.b { top: 58%; left: 37% } .radar-tag.c { top: 66%; left: 72% }

/* 场景条 */
.scene-bar { display: flex; gap: 8px; overflow: auto; padding-bottom: 4px; scrollbar-width: none; }
.scene-bar::-webkit-scrollbar { display: none; }

/* 核心功能卡 */
.core-card { display: flex; flex-direction: column; gap: 12px; }
.core-card .hn { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: .1em; }
.core-card .metric { display: flex; align-items: baseline; gap: 6px; }
.core-card .metric b { font-size: 24px; letter-spacing: -.02em; }
.core-card .metric span { font-size: 12px; color: var(--ink-3); }

/* ---------- 14. Page: broadcast ---------- */
.bc-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.bc-side { position: sticky; top: calc(var(--nav-h) + 16px); display: flex; flex-direction: column; gap: 10px; }
.bc-scn {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: .16s; text-align: left; width: 100%;
}
.bc-scn:hover { border-color: var(--line-2); }
.bc-scn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.bc-scn .ico { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-3); display: grid; place-items: center; color: var(--accent); flex: none; }
.bc-scn .tt { display: block; font-size: 13.5px; font-weight: 600; }
.bc-scn .ss { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }

.bc-main { display: flex; flex-direction: column; gap: 16px; }
.bc-stage {
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(18px, 2.4vw, 30px);
  background: linear-gradient(165deg, var(--surface-2), var(--surface)); position: relative; overflow: hidden;
}
.bc-langs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.bc-line {
  display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px dashed var(--line);
  align-items: start;
}
.bc-line:last-child { border-bottom: 0; }
.bc-line .role {
  font-size: 10.5px; letter-spacing: .06em; text-align: center; padding: 6px 0; border-radius: 6px;
  background: var(--surface-3); color: var(--ink-3); line-height: 1.2; align-self: start;
}
.bc-line .zh { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.bc-line .tx { font-size: clamp(19px, 2.2vw, 25px); font-weight: 600; line-height: 1.45; letter-spacing: -.01em; }
.bc-line .tx.small { font-size: clamp(16px, 1.7vw, 20px); }
.bc-line .meta { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bc-line .speak { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; height: 30px; padding: 0 10px; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.bc-line .speak:hover { border-color: var(--accent); color: var(--accent); }
.bc-line .speak.playing { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.bc-console { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.bc-act {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: .16s;
}
.bc-act:hover { border-color: var(--line-2); background: var(--surface-2); }
.bc-act b { font-size: 13px; font-weight: 600; }
.bc-act small { font-size: 10.5px; color: var(--ink-3); }
.bc-act.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.picto-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.picto {
  aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; padding: 10px; color: var(--ink);
}
.picto svg { width: 100%; height: 100%; }
.picto-cap { font-size: 10.5px; text-align: center; color: var(--ink-3); margin-top: 6px; }

.lifecard { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.lifecard > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface); text-align: center; }
.lifecard svg { height: 74px; margin: 0 auto 8px; }
.lifecard b { display: block; font-size: 11.5px; margin-bottom: 2px; }
.lifecard small { font-size: 10px; color: var(--ink-3); line-height: 1.35; display: block; }

@media (max-width: 1000px) {
  .bc-layout { grid-template-columns: 1fr; }
  .bc-side { position: static; flex-direction: row; overflow: auto; padding-bottom: 4px; }
  .bc-scn { flex: none; width: 200px; }
  .picto-strip { grid-template-columns: repeat(3, 1fr); }
  .lifecard { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .bc-console { grid-template-columns: repeat(2, 1fr); }
  .lifecard { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 15. Page: translate ---------- */
.tr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.tr-pane { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; min-height: 380px; }
.tr-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tr-pane textarea, .tr-pane .out, .tr-pane .tr-input {
  border: 0; background: transparent; padding: 16px; font-size: 17px; line-height: 1.6; min-height: 250px;
  resize: none; outline: none; width: 100%; flex: 1;
}
.tr-pane .out { white-space: pre-wrap; }
/* 原文可编辑区：用 contenteditable 才能把命中的术语就地标出来（textarea 里画不了高亮） */
.tr-input { white-space: pre-wrap; word-break: break-word; overflow: auto; caret-color: var(--ink); cursor: text; }
.tr-input:empty::before { content: attr(data-ph); color: var(--ink-3); pointer-events: none; }
.tr-input:focus { box-shadow: none; }
/* 图例：原文橙、译文青，两栏颜色与标记语义一一对应 */
.tr-legend { display: flex; align-items: center; gap: 14px; font-size: 11.5px; color: var(--ink-3); }
.tr-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tr-legend .k-src { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.tr-legend .k-tgt { background: var(--sea-soft); border: 1px solid color-mix(in srgb, var(--sea) 55%, transparent); }
.tr-pane-foot { padding: 10px 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 12px; color: var(--ink-3); }
mark.term { background: var(--accent-soft); color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); padding: 0 2px; border-radius: 3px; font-weight: 560; }
mark.term.sea { background: var(--sea-soft); color: var(--sea); border-bottom-color: color-mix(in srgb, var(--sea) 50%, transparent); }
.tr-refs { display: flex; flex-direction: column; gap: 8px; }

/* ---------- 16. Page: terms / corpus / intel lists ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.detail-panel { position: sticky; top: calc(var(--nav-h) + 16px); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); font-size: 12px; }
.kv dd { margin: 0; }
.lang-rows { display: flex; flex-direction: column; gap: 0; }
.lang-row { display: grid; grid-template-columns: 68px 1fr auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.lang-row:last-child { border-bottom: 0; }
.lang-row .lang-tag { font-size: 11px; color: var(--ink-3); letter-spacing: .06em; }
.lang-row .val { font-size: 15px; }

.intel-item { display: grid; grid-template-columns: 1fr 120px; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.intel-item:last-child { border-bottom: 0; }
.intel-item .ttl { font-size: 16px; font-weight: 600; line-height: 1.5; margin-bottom: 6px; }
.intel-item .orig { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; line-height: 1.5; }
.intel-item .sum { font-size: 13.5px; color: var(--ink-2); line-height: 1.65; }
.intel-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; font-size: 11.5px; color: var(--ink-3); }
@media (max-width: 900px) { .intel-item { grid-template-columns: 1fr; } .split { grid-template-columns: 1fr; } .detail-panel { position: static; } }

/* ---------- 17. Page: ask ---------- */
.answer { font-size: 15.2px; line-height: 1.8; }
.answer p { margin-bottom: .9em; }
.cite {
  display: inline-block; min-width: 18px; text-align: center; font-size: 11px; font-weight: 700;
  color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 0 4px; margin: 0 2px;
  cursor: pointer; vertical-align: super; line-height: 1.5; text-decoration: none;
}
.cite:hover { background: var(--accent); color: #fff; }
.src-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.src-card .n { font-size: 11px; color: var(--accent); font-weight: 700; margin-right: 8px; }
.src-card .doc { font-size: 13.5px; font-weight: 600; }
.src-card .loc { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.src-card .snip { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.6; border-left: 2px solid var(--line-2); padding-left: 10px; }
.ask-log { display: flex; flex-direction: column; gap: 18px; }
.ask-q { display: flex; gap: 10px; align-items: flex-start; }
.ask-q .you { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; font-size: 11px; flex: none; color: var(--ink-3); }
.ask-a { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: var(--surface); }
.ask-refuse { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); }

/* ---------- 18. Page: roster / triage / smcp / interpreter ---------- */
.big-input { font-size: 24px; letter-spacing: .16em; font-family: var(--mono); text-align: center; height: 62px; }
.spell-out { display: flex; flex-wrap: wrap; gap: 8px; }
.spell-out .cell {
  min-width: 62px; padding: 10px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line);
  text-align: center;
}
.spell-out .cell b { display: block; font-family: var(--mono); font-size: 19px; letter-spacing: .04em; }
.spell-out .cell span { font-size: 10.5px; color: var(--ink-3); display: block; margin-top: 3px; letter-spacing: .04em; }
.check-list { display: flex; flex-direction: column; gap: 2px; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; }
.check-row:hover { background: var(--surface-2); }
.check-row input { appearance: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); flex: none; position: relative; margin: 0; cursor: pointer; }
.check-row input:checked { background: var(--ok); border-color: var(--ok); }
.check-row input:checked::after { content: ""; position: absolute; inset: 4px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check-row span { font-size: 13.5px; }
.check-row small { color: var(--ink-3); font-size: 11.5px; display: block; }

.triage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tcolor { border-radius: 12px; padding: 14px; border: 1px solid var(--line); cursor: pointer; transition: .16s; text-align: left; }
.tcolor b { display: block; font-size: 14px; margin-bottom: 4px; }
.tcolor small { font-size: 11px; color: var(--ink-3); line-height: 1.4; display: block; }
.tcolor .bar { height: 4px; border-radius: 3px; margin-bottom: 10px; }
.tcolor[aria-pressed="true"] { border-color: currentColor; }
.tcolor.red { color: #ff5a64 } .tcolor.red .bar { background: #ff5a64 }
.tcolor.yellow { color: #ffc24b } .tcolor.yellow .bar { background: #ffc24b }
.tcolor.green { color: #3fd08a } .tcolor.green .bar { background: #3fd08a }
.tcolor.black { color: #8b9bb0 } .tcolor.black .bar { background: #8b9bb0 }
.tcolor[aria-pressed="true"] { background: color-mix(in srgb, currentColor 10%, transparent); }
@media (max-width: 720px) { .triage-grid { grid-template-columns: repeat(2, 1fr); } }

.smcp-card { border-left: 3px solid var(--sea); padding: 14px 16px; background: var(--surface); border-radius: 0 12px 12px 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.smcp-card .en { font-size: 15.5px; font-weight: 600; color: var(--sea); font-family: var(--mono); line-height: 1.5; }
.smcp-card .zh { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.smcp-card .note { font-size: 11.5px; color: var(--ink-4); margin-top: 6px; }

.link-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.msg-list { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow: auto; padding-right: 4px; }
.msg { max-width: 86%; padding: 9px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.6; }
.msg.them { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); }
.msg.me { align-self: flex-end; background: var(--sea-soft); border: 1px solid color-mix(in srgb, var(--sea) 30%, transparent); }
.msg .t { font-size: 10px; color: var(--ink-4); margin-top: 4px; }
.code-big { font-family: var(--mono); font-size: 40px; letter-spacing: .3em; color: var(--accent); }

/* ---------- 19. About / misc ---------- */
.arch { display: grid; gap: 10px; }
.arch-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.arch-row:last-child { border-bottom: 0; }
.arch-row .lbl { font-size: 11.5px; letter-spacing: .08em; color: var(--ink-3); text-transform: uppercase; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tags .tg { font-size: 11.5px; padding: 4px 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-family: var(--mono); }
.note-box { border: 1px solid var(--line); border-left: 3px solid var(--warn); background: var(--warn-soft); border-radius: 0 12px 12px 0; padding: 14px 16px; font-size: 13px; color: var(--ink-2); }
.quote { border-left: 2px solid var(--accent); padding-left: 16px; font-size: 15px; color: var(--ink-2); font-style: normal; }

/* skeleton */
.sk { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 6px; color: transparent; }
@keyframes sk { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }

/* ---------- 20. Responsive ---------- */
@media (max-width: 1080px) {
  .g5, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; }
  .radar { max-width: 340px; order: -1; }
}
@media (max-width: 860px) {
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-grid { grid-template-columns: 1fr; }
  .link-panel { grid-template-columns: 1fr; }
  .steps { flex-direction: column; gap: 14px; }
}
@media (max-width: 640px) {
  .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; }
  .kpi-strip { grid-template-columns: 1fr 1fr; }
  .hero-meta { gap: 14px; }
  .footer-grid { grid-template-columns: 1fr; }
  .tbl-wrap { font-size: 12.5px; }
  h1 { font-size: clamp(30px, 9vw, 40px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- 21. Print ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --surface-3: #f2f2f2; --ink: #000; --ink-2: #222; --ink-3: #555; --line: #ccc; }
  body::before, body::after, .nav, .footer, .no-print, .bc-side, .sos-btn, .toast-host { display: none !important; }
  .card, .bc-stage, .tr-pane { border: 1px solid #999 !important; box-shadow: none !important; break-inside: avoid; }
  .section { padding: 12px 0 !important; }
  h1 { font-size: 22pt !important; }
  .bc-line .tx { font-size: 15pt !important; }
  a { text-decoration: none; }
}
