/* =========================================================
   KovAPI — Design System  ·  「青黛靛」Indigo + Jade
   Chinese traditional palette: 靛青 indigo, 竹青 jade, 黛 ink-blue,
   on warm rice-paper. Calm & premium, with lively micro-motion.
   ========================================================= */

:root{
  --bg:#FAF8F4;            /* 米纸 warm rice-paper — kept */
  --bg-2:#F1EEE7;          /* slightly deeper panel */
  --surface:#FFFFFF;
  --ink:#1C2226;           /* 黛 cool ink for text */
  --ink-panel:#1C2226;     /* 黛 dark surface (hero / sidebar / toast) */
  --ink-panel-2:#262F35;   /* hover / elevated */
  --ink-2:#3C474E;
  --muted:#6E767C;         /* cool grey */
  --soft:#9AA1A6;
  --line:#E8E4DC;          /* warm hairline */
  --line-2:#D9D3C8;
  --accent:#1F6F8B;        /* 靛青 indigo — brand / interactive */
  --accent-ink:#17566B;    /* 黛蓝 deep indigo */
  --accent-soft:rgba(31,111,139,.10);
  --accent-line:rgba(31,111,139,.26);
  --jade:#5E8C6A;          /* 竹青 jade — positive / success */
  --jade-ink:#48715A;
  --jade-soft:rgba(94,140,106,.12);
  --danger:#B23A3A;
  --ok:#5E8C6A;
  --shadow-sm:0 1px 2px rgba(20,28,34,.03),0 2px 6px rgba(20,28,34,.04);
  --shadow:0 16px 36px -26px rgba(20,28,34,.24),0 6px 16px -16px rgba(20,28,34,.12);
  --radius:14px;
  --radius-lg:22px;
  --radius-sm:9px;
  --sans:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,'PingFang SC','Microsoft YaHei',sans-serif;
  --mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --maxw:1440px;   /* widened from 1320 to tighten the empty L/R gutters (topbar+content stay aligned) */
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;font-family:var(--sans);color:var(--ink);background:var(--bg);
  font-size:15px;line-height:1.6;-webkit-font-smoothing:antialiased;
  font-feature-settings:'cv02','cv03','cv11';min-height:100vh;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
h1,h2,h3,h4{margin:0;letter-spacing:-.02em;font-weight:800;line-height:1.1}
p{margin:0}
::selection{background:var(--accent-soft)}

/* paper grain backdrop */
body:before{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.5;
  background-image:radial-gradient(circle at 1px 1px,rgba(20,18,12,.025) 1px,transparent 0);
  background-size:22px 22px;
}

.wrap{width:min(var(--maxw),100%);margin:0 auto;padding:0 40px}
.muted{color:var(--muted)}
.mono{font-family:var(--mono)}
.hidden{display:none!important}
.center{text-align:center}
.eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:700;
  letter-spacing:.14em;text-transform:uppercase;color:var(--accent);
  background:var(--accent-soft);border:1px solid var(--accent-line);border-radius:999px;padding:6px 12px}

/* ---------------- Top bar + nav ---------------- */
.topbar{position:sticky;top:0;z-index:50;background:rgba(250,248,244,.82);
  backdrop-filter:blur(16px) saturate(1.2);border-bottom:1px solid var(--line)}
.topbar-inner{display:flex;align-items:center;gap:28px;height:70px;width:min(var(--maxw),100%);margin:0 auto;padding:0}  /* no h-padding: topbar content aligns with the hero block's left/right edges */
/* claude-annanchor-20261114: a #fragment target lands below the 70px sticky top bar (+14px air) instead of under it.
   Rules that set their own scroll-margin-top (docs, model pages 2.0, status rows, terms) are as specific and come
   later, so they keep theirs. Not html{scroll-padding-top}: that would ADD to those. */
:target{scroll-margin-top:calc(70px + 14px)}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:19px;letter-spacing:-.03em}
.brand .mark{width:30px;height:30px;object-fit:cover;border-radius:7px}
.brand small{display:block;font-size:10px;font-weight:700;letter-spacing:.22em;color:var(--muted);margin-top:-3px}
.nav{display:flex;align-items:center;gap:4px;margin-left:6px}
.nav-link,.nav-trigger{display:inline-flex;align-items:center;gap:5px;padding:8px 12px;border-radius:9px;
  font-weight:600;font-size:14px;color:var(--ink-2);background:none;border:0;cursor:pointer;font-family:inherit}
.nav-link:hover,.nav-trigger:hover,.nav-link.active{color:var(--ink);background:var(--bg-2)}
.nav-spacer{flex:1}
.nav-right{display:flex;align-items:center;gap:8px}
.nav-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:9px;color:var(--muted);cursor:pointer}
.nav-icon:hover{background:var(--bg-2);color:var(--ink)}
.nav-user{font-size:13px;color:var(--muted);max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  display:inline-flex;align-items:center;gap:7px;padding:6px 12px;border:1px solid var(--line);border-radius:999px;background:var(--surface)}
.nav-user:before{content:'';width:7px;height:7px;border-radius:50%;background:var(--accent)}

/* dropdown */
.dropdown{position:relative}
.dropdown-menu{position:absolute;top:calc(100% + 10px);left:0;min-width:230px;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:8px;
  opacity:0;visibility:hidden;transform:translateY(-6px);transition:.16s;z-index:60}
.dropdown.open .dropdown-menu{opacity:1;visibility:visible;transform:none}
.dropdown-menu a{display:flex;flex-direction:column;gap:2px;padding:9px 11px;border-radius:9px}
.dropdown-menu a:hover{background:var(--bg-2)}
.dropdown-menu a b{font-size:14px}
.dropdown-menu a span{font-size:12px;color:var(--muted)}
.caret{width:14px;height:14px;transition:transform .16s}
.dropdown.open .caret{transform:rotate(180deg)}

/* ---------------- Buttons ---------------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;border:1px solid transparent;
  font-family:inherit;font-weight:700;font-size:14px;padding:11px 18px;border-radius:11px;transition:.15s;white-space:nowrap;line-height:1}
.btn:hover{transform:translateY(-1px)}
.btn:active{transform:none}
.btn-primary{background:var(--ink-panel);color:#fff}
.btn-primary:hover{background:var(--ink-panel-2)}
.btn-accent{background:var(--accent);color:#fff;box-shadow:0 12px 26px -14px var(--accent)}
.btn-accent:hover{background:var(--accent-ink)}
.btn-ghost{background:var(--surface);color:var(--ink);border-color:var(--line-2)}
.btn-ghost:hover{border-color:var(--ink);background:var(--surface)}
.btn-block{width:100%}
.btn-sm{padding:8px 13px;font-size:13px;border-radius:9px}
.btn-lg{padding:14px 24px;font-size:15px}
.btn[disabled],button[disabled]{opacity:.55;pointer-events:none}
/* Loading state: calm 3-dot pulse (one pseudo-element + box-shadow draws the two side dots). */
button.loading{position:relative;color:transparent!important;pointer-events:none}
button.loading:after{content:"";position:absolute;top:50%;left:50%;width:5px;height:5px;margin:-2.5px 0 0 -2.5px;
  border-radius:50%;color:#fff;background:currentColor;box-shadow:-8px 0 0 currentColor,8px 0 0 currentColor;
  animation:nzpulse 1.1s ease-in-out infinite}
.btn-ghost.loading:after,.mini-btn.loading:after{color:var(--ink-2)}
@keyframes nzpulse{0%,100%{opacity:.28}50%{opacity:1}}
@keyframes spin{to{transform:rotate(360deg)}}

/* link button (for google etc) */
.oauth-btn{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 16px;border:1px solid var(--line-2);
  background:var(--surface);border-radius:11px;font-weight:600;cursor:pointer;font-family:inherit;font-size:14px;color:var(--ink)}
.oauth-btn:hover{border-color:var(--ink)}
.oauth-btn svg{width:18px;height:18px}
.oauth-btn + .oauth-btn{margin-top:10px}   /* gap between stacked Google / GitHub buttons */

/* ---------------- Cards ---------------- */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);padding:26px;box-shadow:var(--shadow-sm)}
.card-kicker{display:inline-flex;font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;
  color:var(--accent);margin-bottom:10px}
.card h2{font-size:22px;margin-bottom:6px}

/* ---------------- Segmented control (category tabs) ---------------- */
.seg{display:inline-flex;background:var(--bg-2);border:1px solid var(--line);border-radius:999px;padding:4px;gap:2px}
.seg button{border:0;background:none;font-family:inherit;font-weight:700;font-size:13px;color:var(--muted);
  padding:8px 18px;border-radius:999px;cursor:pointer;transition:.15s;display:inline-flex;align-items:center;gap:7px}
.seg button:hover{color:var(--ink)}
.seg button.active{background:var(--surface);color:var(--ink);box-shadow:var(--shadow-sm)}
.seg button .count{font-size:11px;color:var(--soft);font-weight:600}
.seg button .soon{font-size:10px;background:var(--accent-soft);color:var(--accent);padding:1px 6px;border-radius:999px}

/* ---------------- Tabs (code/doc) ---------------- */
.tabgroup .tabs{display:flex;gap:6px;border-bottom:1px solid var(--line);margin:8px 0 14px}
.tab{cursor:pointer;border:0;background:none;font-family:inherit;font-weight:700;font-size:13px;color:var(--muted);
  padding:9px 14px;border-bottom:2px solid transparent;transition:.15s}
.tab:hover{color:var(--ink)}
.tab.active{color:var(--accent);border-bottom-color:var(--accent)}
.tab-panel.hidden{display:none}

/* ---------------- Pills / tags / status ---------------- */
.pill{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px;
  background:var(--bg-2);border:1px solid var(--line);color:var(--ink-2)}
.tag{font-family:var(--mono);font-size:12px;background:var(--surface);border:1px solid var(--line);border-radius:7px;padding:3px 8px;color:var(--ink-2)}
.status{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;padding:3px 9px;border-radius:999px}
.status.ok{background:var(--jade-soft);color:var(--jade-ink)}
.status.off{background:#F0EEE8;color:var(--soft)}
.dot{width:9px;height:9px;border-radius:50%;flex:none}
.dot.on{background:var(--jade);box-shadow:0 0 0 4px var(--jade-soft)}
.dot.off{background:#C9C4B8;box-shadow:0 0 0 4px rgba(150,145,130,.12)}
.kbd{font-family:var(--mono);font-size:12px;background:var(--bg-2);border:1px solid var(--line);border-radius:6px;padding:2px 7px}

/* ---------------- Forms ---------------- */
label{display:block;font-weight:700;font-size:13px;color:var(--ink-2);margin:14px 0 6px}
.input,textarea.input,select.input{width:100%;border:1px solid var(--line-2);border-radius:11px;padding:11px 13px;
  font:inherit;font-size:14px;color:var(--ink);background:var(--surface);outline:none;transition:.15s}
.input:focus{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
textarea.input{resize:vertical;min-height:96px}
.input.compact{padding:8px 10px;border-radius:8px}
.input.mini{width:84px;padding:7px 9px}
.field-hint{font-size:12px;color:var(--soft);margin-top:5px}

/* ---------------- Alerts ---------------- */
.alert{border:1px solid var(--line);background:var(--surface);border-radius:14px;padding:15px 16px;margin:14px 0;font-size:14px}
.alert.error{border-color:#E9C9C9;background:#FBF1F1;color:#8E2F2F}
.alert.accent{border-color:var(--accent-line);background:var(--accent-soft)}
.alert.elevated{box-shadow:var(--shadow)}

/* ---------------- Tables ---------------- */
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.table{width:100%;border-collapse:collapse;min-width:680px}
.table th{text-align:left;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--soft);
  font-weight:700;background:var(--bg-2);padding:12px 14px;border-bottom:1px solid var(--line)}
.table td{padding:13px 14px;border-bottom:1px solid var(--line);font-size:14px;vertical-align:middle}
.table tr:last-child td{border-bottom:0}
.mini-btn{border:1px solid var(--line-2);background:var(--surface);color:var(--ink-2);border-radius:8px;
  padding:6px 11px;font-weight:700;font-size:13px;cursor:pointer;font-family:inherit}
.mini-btn:hover{border-color:var(--ink);color:var(--ink)}
.mini-btn.danger{color:var(--danger);border-color:#E9C9C9}
.mini-btn.danger:hover{background:#FBF1F1;border-color:var(--danger)}
.mini-btn.accent{color:var(--accent);border-color:var(--accent-line)}
.mini-btn.accent:hover{background:var(--accent-soft);border-color:var(--accent)}
.inline-form,.actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.empty{text-align:center;color:var(--soft);padding:34px!important}
.empty b{display:block;color:var(--ink);font-size:15px;margin-bottom:3px}

/* ---------------- Code blocks ---------------- */
.codebox{background:#15140F;border:1px solid #262318;border-radius:14px;overflow:hidden;margin:12px 0}
.codebar{display:flex;justify-content:space-between;align-items:center;padding:9px 13px;background:#1C1A12;
  color:#B8B3A4;font-family:var(--mono);font-size:12px;border-bottom:1px solid #262318}
.codebox pre{margin:0;padding:15px;overflow:auto;color:#EAE6DA;font-family:var(--mono);font-size:13px;line-height:1.7;white-space:pre-wrap}
.copy-btn{border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.06);color:#fff;border-radius:8px;
  padding:5px 10px;font-weight:700;font-size:12px;cursor:pointer;font-family:inherit;display:inline-flex;align-items:center;gap:6px}
.copy-btn:hover{background:rgba(255,255,255,.12)}
.copy-btn.copied{background:var(--accent);border-color:var(--accent)}

/* ---------------- Modal ---------------- */
.modal-overlay{position:fixed;inset:0;z-index:100;background:rgba(14,14,12,.42);backdrop-filter:blur(4px);
  display:flex;align-items:flex-start;justify-content:center;padding:20px;overflow-y:auto;opacity:0;visibility:hidden;transition:.2s}
.modal-overlay.open{opacity:1;visibility:visible}
.modal{width:100%;max-width:420px;margin:auto;background:var(--surface);border:1px solid var(--line);border-radius:20px;
  box-shadow:var(--shadow);padding:30px;transform:translateY(14px) scale(.98);transition:.2s}
.modal-overlay.open .modal{transform:none}
.modal-close{position:absolute;top:16px;right:18px;background:none;border:0;cursor:pointer;color:var(--muted);font-size:20px;line-height:1}
.modal h2{font-size:25px;text-align:center;margin-bottom:4px}
.modal .sub{text-align:center;color:var(--muted);font-size:14px;margin-bottom:20px}
.modal .divider{display:flex;align-items:center;gap:12px;color:var(--soft);font-size:12px;margin:18px 0}
.modal .divider:before,.modal .divider:after{content:"";flex:1;height:1px;background:var(--line)}
.modal-switch{text-align:center;font-size:13px;color:var(--muted);margin-top:16px}
.modal-switch a{color:var(--accent);font-weight:700;cursor:pointer}
.input-reveal{position:relative}
.input-reveal .eye{position:absolute;right:10px;top:50%;transform:translateY(-50%);background:none;border:0;cursor:pointer;color:var(--soft);padding:4px}

/* ---------------- Footer ---------------- */
.footer{border-top:1px solid var(--line);margin-top:80px;padding:46px 0 60px}
.footer-inner{display:flex;flex-wrap:wrap;gap:30px;justify-content:space-between;align-items:flex-start}
.footer .brand small{color:var(--soft)}
.footer-cols{display:flex;gap:60px;flex-wrap:wrap}
.footer-col h4{font-size:13px;text-transform:uppercase;letter-spacing:.1em;color:var(--soft);margin-bottom:12px}
.footer-col a{display:block;color:var(--muted);font-size:14px;padding:4px 0}
.footer-col a:hover{color:var(--ink)}

/* ---------------- Toast ---------------- */
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(20px);background:var(--ink-panel);color:#fff;
  padding:12px 20px;border-radius:12px;font-weight:600;font-size:14px;box-shadow:var(--shadow);opacity:0;visibility:hidden;
  transition:.2s;z-index:200}
.toast.show{opacity:1;visibility:visible;transform:translateX(-50%)}

/* ================= Page sections ================= */

/* hero — fills the first screen; content TOP-aligned so the title, buttons and the feature checks all
   stay in view on shorter screens (centering pushed the buttons below the fold) */
.hero{position:relative;display:grid;grid-template-columns:1.15fr .85fr;gap:60px;align-items:start;
  min-height:calc(100svh - 70px);padding:34px 0 40px}
.hero-copy{position:relative;z-index:1}
.hero h1{font-size:clamp(44px,5.6vw,76px);font-weight:900;letter-spacing:-.042em;line-height:1.04;margin:18px 0 18px}
.hero-title{display:flex;flex-direction:column;gap:.12em}   /* slightly looser gap between the two lines */
.hero .lead{font-size:19px;color:var(--muted);max-width:580px;line-height:1.75}
.hero-actions{display:flex;gap:14px;flex-wrap:wrap;margin-top:34px}
.hero-checks{display:flex;gap:20px;flex-wrap:wrap;margin-top:26px}
.hero-checks span{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--ink-2)}
.hero-checks span:before{content:"";width:16px;height:16px;border-radius:50%;background:var(--accent-soft);
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235E8C6A' stroke-width='3'><path d='M5 12l5 5L20 7'/></svg>");background-size:11px;background-repeat:no-repeat;background-position:center}

/* art collage */
.collage{columns:2;column-gap:18px}
.collage figure{margin:0 0 18px;break-inside:avoid;border-radius:18px;overflow:hidden;border:1px solid var(--line);
  background:var(--bg-2);box-shadow:var(--shadow-sm)}
.collage img{width:100%;height:auto;display:block;transition:transform .5s}
.collage figure:hover img{transform:scale(1.04)}
/* desktop: collage becomes a height-bounded bento that always fills the first
   screen (no overflow, all 5 images visible) and scales with the viewport.
   columns:2 masonry above is kept for <=980px (stacked below the copy). */
@media(min-width:981px){
  .hero{align-items:stretch}
  .hero-copy{align-self:center}
  .collage{
    columns:auto;
    display:grid;
    grid-template-columns:1fr 1fr;
    grid-template-rows:repeat(6,1fr);
    gap:16px;
    height:calc(100svh - 70px - 74px);   /* viewport - topbar(70) - hero padding(34+40) */
    min-height:0;
  }
  .collage figure{margin:0;width:100%;height:100%;min-height:0}
  .collage img{width:100%;height:100%;object-fit:cover;object-position:center}
  .collage figure:nth-child(1){grid-area:1/1/4/2}              /* bust  — tall, left-top    */
  .collage figure:nth-child(1) img{object-position:center 22%}/* bias to keep the face     */
  .collage figure:nth-child(4){grid-area:4/1/7/2}              /* drape — tall, left-bottom  */
  .collage figure:nth-child(3){grid-area:1/2/3/3}             /* crane — right-top          */
  .collage figure:nth-child(2){grid-area:3/2/5/3}             /* cloud — right-middle       */
  .collage figure:nth-child(5){grid-area:5/2/7/3}             /* peak  — right-bottom       */
}
.ph{aspect-ratio:1;background:linear-gradient(135deg,#EDEAE2,#E0DCD1)}
.ph.tall{aspect-ratio:2/3}
.ph.wide{aspect-ratio:3/2}

/* section heading */
.section{padding:58px 0}
.section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:24px}
.section-head h2{font-size:clamp(26px,3vw,38px);font-weight:900;letter-spacing:-.03em}
.section-head p{color:var(--muted);margin-top:6px}

/* stats strip */
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:var(--line);border:1px solid var(--line);
  border-radius:var(--radius-lg);overflow:hidden}
.stats div{background:var(--surface);padding:30px 26px}
.stats b{display:block;font-size:38px;font-weight:900;letter-spacing:-.04em}
.stats b em{font-size:16px;font-style:normal;color:var(--accent)}
.stats span{color:var(--muted);font-size:13px;font-weight:600}

/* model card grid */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px}
.mcard{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);
  overflow:hidden;box-shadow:var(--shadow-sm);transition:.18s}
.mcard:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:var(--line-2)}
.mcard .thumb{aspect-ratio:3/2;overflow:hidden;background:var(--bg-2);position:relative}
.mcard .thumb img{width:100%;height:100%;object-fit:cover;transition:transform .5s}
.mcard:hover .thumb img{transform:scale(1.05)}
.mcard .thumb .cat{position:absolute;top:12px;left:12px}
.mcard .body{padding:18px 18px 20px;display:flex;flex-direction:column;flex:1}
.mcard .body h3{font-size:18px;display:flex;align-items:center;gap:8px}
.mcard .body .mid{font-family:var(--mono);font-size:12px;color:var(--soft);margin-top:2px}
.mcard .body p{color:var(--muted);font-size:13.5px;margin:10px 0 14px;flex:1;line-height:1.6}
.mcard .foot{display:flex;align-items:center;justify-content:space-between;gap:10px}
.mcard .price{font-weight:800;font-size:14px}
.mcard .price s{color:var(--soft);font-weight:500;margin-left:6px}

/* coming soon panel */
.soon-panel{border:1.5px dashed var(--line-2);border-radius:var(--radius-lg);padding:60px 30px;text-align:center;color:var(--muted)}
.soon-panel .big{font-size:22px;font-weight:800;color:var(--ink);margin:10px 0 6px}

/* model detail */
.model-hero{display:grid;grid-template-columns:1.2fr .8fr;gap:36px;padding:38px 0 12px;align-items:start}
.model-hero .title{display:flex;align-items:center;gap:12px}
.model-hero h1{font-size:clamp(30px,4vw,46px);font-weight:900}
.model-hero .copyid{cursor:pointer;color:var(--soft)}
.model-hero .lead{color:var(--muted);font-size:16px;line-height:1.7;margin:16px 0 18px;max-width:600px}
.model-tags{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:22px}
.highlights{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);padding:22px;box-shadow:var(--shadow-sm)}
.highlights h4{font-size:13px;text-transform:uppercase;letter-spacing:.1em;color:var(--soft);margin-bottom:14px}
.highlights ul{list-style:none;margin:0;padding:0;display:grid;gap:13px}
.highlights li{display:flex;align-items:flex-start;gap:10px;font-size:14px;color:var(--ink-2)}
.highlights li:before{content:"";width:18px;height:18px;flex:none;margin-top:1px;border-radius:50%;background:var(--accent-soft);
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235E8C6A' stroke-width='3'><path d='M5 12l5 5L20 7'/></svg>");background-size:12px;background-repeat:no-repeat;background-position:center}

/* playground */
.pg{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:8px}
.pg .pane{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);padding:20px}
.pg .pane-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.pg .pane-head h3{font-size:16px}
.pg .out{background:var(--bg);border:1px solid var(--line);border-radius:12px;min-height:240px;max-height:60vh;
  padding:16px;color:var(--ink);font-family:var(--mono);font-size:13px;white-space:pre-wrap;overflow:auto;
  user-select:text;-webkit-user-select:text}
.pg .out img{border-radius:10px;max-width:100%}
.pg .out .placeholder{color:var(--soft)}
/* claude-sd25flash-live-20261119 (Lei 11-19): a video result shows whole, controls included -- at most 70vh tall at its own
   aspect ratio, centred -- and the box grows with it instead of scrolling inside (a 9:16 clip hid its controls) */
.pg .out:has(>video),.pg .out:has(>[data-pg-sample-out]){max-height:none;overflow:visible}
.pg .out>video,.pg .out>[data-pg-sample-out]>video{display:block;width:auto;height:auto;max-width:100%;max-height:70vh;margin:0 auto;border-radius:12px;background:#000}

/* ===== Chat Playground (conversational test bench for chat models) ===== */
.pg-chat{grid-template-columns:312px minmax(0,1fr)}
.seg-sm button{padding:6px 14px;font-size:13px}
.pg-side label{margin-top:0}
.pg-adv{margin-top:16px;border-top:1px solid var(--line);padding-top:14px}
.pg-adv summary{display:flex;align-items:center;gap:8px;cursor:pointer;color:var(--muted);font-size:13px;font-weight:700;list-style:none}
.pg-adv summary::-webkit-details-marker{display:none}
.pg-adv summary svg{width:15px;height:15px}
.pg-adv-body{margin-top:14px;display:flex;flex-direction:column;gap:6px}
.pg-rangelabel{display:flex;justify-content:space-between;align-items:baseline;font-size:12.5px;color:var(--muted);margin:6px 0 0}
.pg-rangelabel b{font-family:var(--mono);color:var(--ink);font-weight:700}
.pg-range{width:100%;accent-color:var(--accent);cursor:pointer}
.pg-switchrow{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:var(--muted);margin-top:12px}
.switch{position:relative;display:inline-block;width:40px;height:22px;flex:none}
.switch input{opacity:0;width:0;height:0}
.switch .slider{position:absolute;inset:0;background:var(--line);border-radius:22px;transition:background .2s ease;cursor:pointer}
.switch .slider:before{content:"";position:absolute;width:16px;height:16px;left:3px;top:3px;background:#fff;border-radius:50%;transition:transform .2s ease;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.switch input:checked + .slider{background:var(--accent)}
.switch input:checked + .slider:before{transform:translateX(18px)}
.pg-jsonbox{min-height:340px;font-size:12.5px;line-height:1.6;white-space:pre;overflow:auto}
.pg-convo{display:flex;flex-direction:column}
.chatlog{flex:1;display:flex;flex-direction:column;gap:12px;padding:16px;background:var(--bg);border:1px solid var(--line);
  border-radius:14px;height:50vh;min-height:300px;max-height:560px;overflow-y:auto}
.chat-empty{margin:auto;display:flex;flex-direction:column;align-items:center;gap:7px;color:var(--soft);text-align:center;padding:24px}
.chat-empty svg{width:40px;height:40px;color:var(--accent-line)}
.chat-empty b{color:var(--muted);font-size:15px;font-weight:800}
.chat-empty span{font-size:13px}
.chat-msg{max-width:84%;padding:10px 14px;border-radius:15px;font-size:14px;line-height:1.6;white-space:pre-wrap;word-break:break-word;user-select:text}
.chat-msg.user{align-self:flex-end;background:var(--accent);color:#fff;border-bottom-right-radius:5px}
.chat-msg.assistant{align-self:flex-start;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-bottom-left-radius:5px;box-shadow:var(--shadow-sm)}
.chat-msg.pending{color:var(--soft)}
.chat-think{align-self:flex-start;max-width:84%;border:1px solid var(--line);border-radius:12px;background:var(--bg-2);font-size:13px;overflow:hidden}
.chat-think>summary{cursor:pointer;padding:8px 13px;color:var(--muted);font-weight:600;list-style:none;user-select:none}
.chat-think>summary::-webkit-details-marker{display:none}
.chat-think>summary::before{content:'\25B8';display:inline-block;margin-right:7px;transition:transform .15s}
.chat-think[open]>summary::before{transform:rotate(90deg)}
.chat-think-body{padding:2px 13px 11px;white-space:pre-wrap;word-break:break-word;color:var(--muted);line-height:1.6;border-top:1px solid var(--line);margin-top:2px;padding-top:9px}
.chat-input{display:flex;align-items:flex-end;gap:8px;margin-top:12px;border:1px solid var(--line);border-radius:14px;
  padding:8px 8px 8px 14px;background:var(--surface);transition:border-color .15s ease,box-shadow .15s ease}
.chat-input:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.chat-ta{flex:1;border:0;outline:0;resize:none;background:transparent;font:inherit;font-size:14px;line-height:1.5;color:var(--ink);max-height:160px;padding:6px 0}
.chat-send{flex:none;width:38px;height:38px;border-radius:11px;border:0;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s ease,opacity .15s ease}
.chat-send svg{width:18px;height:18px}
.chat-send:hover{background:var(--accent-ink)}
.chat-send:disabled{opacity:.5;cursor:default}
.chat-attach{flex:none;width:38px;height:38px;border-radius:11px;border:0;background:transparent;color:var(--soft);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s ease,color .15s ease}
.chat-attach svg{width:18px;height:18px}
.chat-attach:hover{background:var(--accent-soft);color:var(--accent)}
.chat-attach:disabled{opacity:.5;cursor:default}
.chat-attach-preview{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.chat-attach-preview .thumb{position:relative;width:64px;height:64px;border-radius:10px;overflow:hidden;border:1px solid var(--line)}
.chat-attach-preview .thumb img{width:100%;height:100%;object-fit:cover}
.chat-attach-preview .thumb button{position:absolute;top:2px;right:2px;width:18px;height:18px;border:0;border-radius:50%;background:rgba(0,0,0,.55);color:#fff;font-size:12px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center}
.chat-msg img.chat-img{max-width:220px;max-height:220px;border-radius:10px;margin-top:6px;display:block}
@media(max-width:980px){.pg-chat{grid-template-columns:1fr}.chatlog{height:46vh}}

/* docs layout */
.doc-shell{display:grid;grid-template-columns:210px minmax(0,1fr);gap:38px;padding:34px 0}
.doc-toc{position:sticky;top:84px;align-self:start;display:flex;flex-direction:column;gap:2px}
.doc-toc a{padding:7px 11px;border-radius:8px;font-size:14px;color:var(--muted)}
.doc-toc a:hover,.doc-toc a.active{background:var(--bg-2);color:var(--ink)}
.doc-toc .toc-group{font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:var(--soft);font-weight:800;margin:16px 0 4px;padding:0 11px}
.lang-dd .dropdown-menu a b{font-weight:600}
.doc-content{min-width:0}
.doc-content section{margin-bottom:26px;scroll-margin-top:80px}
.doc-content h2{font-size:24px;margin-bottom:6px}
.doc-content h3{font-size:16px;margin:18px 0 6px}
.doc-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:10px}
.copy-page .dropdown-menu{left:auto;right:0;min-width:250px}
.copy-page .dropdown-menu a{flex-direction:row;align-items:center;gap:10px}
.copy-page .dropdown-menu .ic{width:18px;text-align:center}

/* dashboard / console shell */
.shell{display:grid;grid-template-columns:232px minmax(0,1fr);gap:28px;padding:30px 0}
/* claude-gutter-20261114: console pages and /admin skip fx-gutter, and .shell{padding:30px 0} zeroes .wrap's 40px
   side padding, so from 981px to ~1520px the rail, the content and the top-bar logo sat on the screen edge.
   Narrow the box (as fx-gutter does for public pages) instead of padding it: 1920px stays exactly as it was. */
@media(min-width:981px){html:not(.fx-gutter) .topbar-inner,.wrap.shell{width:min(var(--maxw),calc(100% - 2*clamp(20px,2.5vw,40px)))}}
/* Full-height left rail: pinned at its natural top (70px topbar + 30px shell pad = 100px) so it does
   NOT shift on the first scroll, and fills to the viewport bottom. Stays put while content scrolls;
   future nav items scroll inside it (overflow-y:auto). */
.side{position:sticky;top:100px;align-self:start;display:flex;flex-direction:column;gap:2px;
  background:linear-gradient(160deg,#103f3c 0%,#0f3a47 46%,#122e49 100%);color:#fff;
  border-radius:var(--radius-lg);padding:18px 14px 16px;
  height:calc(100vh - 116px);overflow-y:auto;will-change:transform}
.side a{display:flex;align-items:center;padding:11px 13px;border-radius:10px;color:rgba(255,255,255,.64);
  font-weight:600;font-size:14px;transition:background .15s ease,color .15s ease}
.side a:hover{background:rgba(255,255,255,.06);color:#fff}
.side a.active{background:rgba(255,255,255,.12);color:#fff}
.work{min-width:0}
.page-hero{background:linear-gradient(135deg,var(--accent-soft),var(--surface));color:var(--ink);
  border:1px solid var(--line);border-radius:var(--radius-lg);padding:26px 30px;margin-bottom:20px;box-shadow:var(--shadow-sm)}
.page-hero h1{font-size:28px;font-weight:900;letter-spacing:-.02em}
.page-hero p{color:var(--muted);margin-top:8px}
.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px}
.metric-grid.cols-3{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.metric{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px;box-shadow:var(--shadow-sm)}
.metric span{color:var(--muted);font-size:13px;font-weight:600}
.metric b{display:block;font-size:28px;font-weight:900;letter-spacing:-.03em;margin:6px 0 2px}
.metric small{color:var(--soft);font-size:12px}
.dash-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:18px;margin-bottom:20px}
.status-list{display:grid;gap:12px}
.status-row{display:flex;align-items:center;gap:10px}
.status-row b{flex:1;font-weight:700;font-size:14px}
.section-title{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px}
.section-title h2{font-size:19px}
.model-list{display:grid;gap:10px}
.model-list a{display:flex;justify-content:space-between;align-items:center;padding:13px 15px;border:1px solid var(--line);border-radius:12px;background:var(--bg);}
.model-list a:hover{border-color:var(--line-2)}
.model-list b{font-size:15px}
.model-list span{color:var(--muted);font-size:13px}
.checklist{display:grid;gap:11px}
.checklist .c{display:flex;gap:10px;align-items:flex-start;font-size:14px;color:var(--ink-2)}
.checklist .c:before{content:"";width:18px;height:18px;flex:none;border-radius:50%;background:var(--accent-soft);
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235E8C6A' stroke-width='3'><path d='M5 12l5 5L20 7'/></svg>");background-size:11px;background-repeat:no-repeat;background-position:center}

/* ---- status warn + nav badge ---- */
.status.warn{background:#FBF1D9;color:#8A6D1B}
.nav-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;
  border-radius:999px;background:#E0574A;color:#fff;font-size:11px;font-weight:800;margin-left:4px}

/* ---- billing ---- */
.pkg-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.pkg{position:relative;text-align:center;padding:18px 12px;border:1.5px solid var(--line);border-radius:14px;
  background:var(--surface);cursor:pointer;transition:.15s;font:inherit}
.pkg:hover{border-color:var(--accent)}
.pkg.active{border-color:var(--accent);background:var(--accent-soft);box-shadow:0 0 0 3px var(--accent-soft)}
.pkg b{display:block;font-size:24px;font-weight:900;letter-spacing:-.02em;color:var(--ink)}
.pkg b span{font-size:12px;font-weight:700;color:var(--muted)}
.pkg .pkg-price{display:block;margin-top:6px;font-size:15px;font-weight:800;color:var(--accent-ink)}
.pkg .pkg-tag{position:absolute;top:-9px;right:8px;background:var(--accent);color:#fff;font-size:10px;font-weight:800;padding:2px 8px;border-radius:999px}
.pay-qr{display:block;width:200px;height:200px;object-fit:contain;margin:14px auto 0;border-radius:12px;border:1px solid var(--line);background:#fff}
.pay-qr.placeholder{display:flex;align-items:center;justify-content:center;padding:14px;text-align:center;color:var(--soft);font-size:13px}
.pay-amount{margin-top:14px;font-size:15px;color:var(--muted)}
.pay-amount b{font-size:22px;font-weight:900;color:var(--ink);margin-left:6px}

@media(max-width:980px){
  .hero,.model-hero,.pg,.dash-grid{grid-template-columns:1fr}
  .hero{padding:56px 0 36px;gap:36px}
  .stats,.metric-grid{grid-template-columns:repeat(2,1fr)}
  .collage{margin-top:8px}
  .shell{grid-template-columns:1fr}
  .side{position:relative;top:0;height:auto;overflow:visible;min-height:auto;flex-direction:row;flex-wrap:wrap}
  .keyname-edit-btn{opacity:.55}
  .wrap,.topbar-inner{padding-left:20px;padding-right:20px}
}
@media(max-width:860px){
  .nav{display:none}
  .footer-cols{gap:34px}
}

/* ================= Motion layer (青黛靛) ================= */
@keyframes floatUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.hero,.page-hero,.model-hero{animation:floatUp .55s cubic-bezier(.2,.7,.2,1) both}
.metric{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.metric:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:var(--accent-line)}
.mcard,.model-list a,.pkg{will-change:transform}
.side a{position:relative}
.side a.active:before{content:"";position:absolute;left:3px;top:50%;transform:translateY(-50%);
  width:3px;height:15px;border-radius:3px;background:var(--jade)}
/* sheen sweep on the primary CTA */
.btn-accent{position:relative;overflow:hidden}
.btn-accent:after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(120deg,transparent 35%,rgba(255,255,255,.22) 50%,transparent 65%);
  transform:translateX(-130%)}
.btn-accent:hover:after{transform:translateX(130%);transition:transform .6s ease}
@media (prefers-reduced-motion: reduce){
  *,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* ================= RTL (Arabic) ================= */
[dir=rtl] body{direction:rtl}
[dir=rtl] .nav{margin-left:0;margin-right:6px}
[dir=rtl] .side a.active:before{left:auto;right:3px}
[dir=rtl] .dropdown-menu{left:auto;right:0;text-align:right}
[dir=rtl] .copy-page .dropdown-menu{right:auto;left:0}
[dir=rtl] .lang-dd .dropdown-menu{right:auto;left:0}
[dir=rtl] label,[dir=rtl] .doc-toc,[dir=rtl] .section-head{text-align:right}
[dir=rtl] .hero-checks span,[dir=rtl] .checklist .c,[dir=rtl] .highlights li{flex-direction:row-reverse;text-align:right}
/* code / identifiers stay LTR even on RTL pages */
[dir=rtl] .codebox,[dir=rtl] .codebox pre,[dir=rtl] .mono,[dir=rtl] .kbd,[dir=rtl] .tag,[dir=rtl] code{direction:ltr;text-align:left;unicode-bidi:embed}

/* ================= Call-log input/output detail + playground billing line ================= */
.log-detail > td{background:var(--accent-soft);padding:14px 16px}
.log-io{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.log-io-label{display:block;font-size:12px;font-weight:700;color:var(--accent-ink);margin-bottom:5px;letter-spacing:.04em}
.log-io-body{margin:0;white-space:pre-wrap;word-break:break-word;max-height:260px;overflow:auto;
  font-size:13px;line-height:1.55;background:var(--surface);border:1px solid var(--line);
  border-radius:10px;padding:10px 12px;font-family:var(--mono)}
[data-log-toggle].active{color:var(--accent-ink);font-weight:700}
@media (max-width:720px){.log-io{grid-template-columns:1fr}}
.pg-bill{margin-top:10px;font-size:13px;font-weight:600;color:var(--jade-ink)}
[dir=rtl] .log-io-body{direction:ltr;text-align:left;unicode-bidi:embed}

/* Call-log input/output: a 2-line preview is always visible; click to expand to the full content. */
.log-detail .log-io-body{max-height:3.4em;overflow:hidden;cursor:pointer;transition:max-height .2s ease}
.log-detail.open .log-io-body{max-height:360px;overflow:auto;cursor:auto}
/* Clean wrapped chip row (docs quick-start model list) */
.chip-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
/* Reveal-on-button panel (e.g. the create-API-key form) */
.key-create{margin:14px 0 4px;padding:16px;border:1px dashed var(--line);border-radius:14px;background:var(--bg)}

/* API-key inline rename: click the pencil to edit the name in place (text -> input + check/cancel).
   Editing toggles `td.editing` (a class, not the `hidden` attr, which .keyname's display would override). */
.keyname{display:inline-flex;align-items:center;gap:7px}
.keyname-text{font-weight:500}
.keyname-edit-btn{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;padding:0;
  border:none;background:transparent;color:var(--soft);border-radius:7px;cursor:pointer;opacity:0;
  transition:opacity .15s ease,background .15s ease,color .15s ease}
tr:hover .keyname-edit-btn{opacity:1}
.keyname-edit-btn:hover{background:var(--bg-2);color:var(--accent)}
.keyname-edit-btn svg{width:14px;height:14px}
.keyname-form{display:none;align-items:center;gap:6px}
.keyname-input{width:148px;padding:6px 10px;margin:0;font:inherit;font-size:14px;line-height:1.3;
  border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);outline:none;
  transition:border-color .15s ease,box-shadow .15s ease}
.keyname-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.keyname-act{display:inline-flex;align-items:center;justify-content:center;width:29px;height:29px;padding:0;
  border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--soft);cursor:pointer;
  transition:background .15s ease,border-color .15s ease,color .15s ease}
.keyname-act svg{width:15px;height:15px}
.keyname-act.save{color:var(--accent);border-color:var(--accent-line)}
.keyname-act.save:hover{background:var(--accent);border-color:var(--accent);color:#fff}
.keyname-act.cancel:hover{background:var(--bg-2);color:var(--ink)}
td.editing .keyname{display:none}
td.editing .keyname-form{display:inline-flex}

/* Usage-trend table (call logs): mute zero-activity days so the active ones read first */
.trend-table{min-width:0}
.trend-table td{font-variant-numeric:tabular-nums}
.trend-table tr.trend-zero td{color:var(--soft)}

/* ================= Dark mode (opt-in via topbar toggle; choice saved to localStorage) =================
   The whole system is var-driven, so dark mode mostly re-defines the :root tokens; the rest of these
   rules patch the few surfaces that hardcode a light colour. */
:root[data-theme="dark"]{
  --bg:#0F1417; --bg-2:#161D21; --surface:#181F23;
  --ink:#E8EAE7; --ink-panel:#0B1013; --ink-panel-2:#151C20; --ink-2:#BBC2C4;
  --muted:#8A9296; --soft:#69716F;
  --line:#28302F; --line-2:#343D3C;
  --accent:#46A6C6; --accent-ink:#62B8D6; --accent-soft:rgba(70,166,198,.15); --accent-line:rgba(70,166,198,.34);
  --jade:#6FA47C; --jade-ink:#90C89D; --jade-soft:rgba(111,164,124,.16);
  --danger:#D86A6A; --ok:#6FA47C;
  --shadow-sm:0 1px 2px rgba(0,0,0,.35),0 2px 6px rgba(0,0,0,.35);
  --shadow:0 18px 40px -22px rgba(0,0,0,.75),0 8px 18px -14px rgba(0,0,0,.55);
}
:root[data-theme="dark"] body:before{opacity:.22}
:root[data-theme="dark"] .topbar{background:rgba(15,20,23,.82);border-bottom-color:var(--line)}
:root[data-theme="dark"] .alert.error{border-color:#5e2b2b;background:#241616;color:#e6a9a9}
:root[data-theme="dark"] .status.off{background:#262d2c;color:var(--soft)}
:root[data-theme="dark"] .dot.off{background:#3a4341;box-shadow:0 0 0 4px rgba(255,255,255,.05)}
:root[data-theme="dark"] .mini-btn.danger{border-color:#5e2b2b}
:root[data-theme="dark"] .mini-btn.danger:hover{background:#241616;border-color:var(--danger)}
:root[data-theme="dark"] .ph,:root[data-theme="dark"] .ph.tall,:root[data-theme="dark"] .ph.wide{background:linear-gradient(135deg,#1a2125,#11171a)}
/* topbar theme-toggle: borderless icon button; show moon in light mode, sun in dark */
.theme-toggle{border:0;background:none;padding:0}
.theme-toggle .ic-sun{display:none}
:root[data-theme="dark"] .theme-toggle .ic-moon{display:none}
:root[data-theme="dark"] .theme-toggle .ic-sun{display:block}

/* Smooth cross-document page transitions — no white flash when switching console pages. The fixed
   topbar + sidebar are named so they stay put (morph) while only the content area crossfades. */
@view-transition{navigation:auto}
.topbar{view-transition-name:nz-topbar}
.side{view-transition-name:nz-side}

/* ================= Hero animated background (ink wash + drifting aurora, behind the title) ======= */
.hero-band{position:relative}   /* full-width band so the hero bg can fill the screen edge-to-edge (no boxed gutters / no h-overflow) */
.hero-bg{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;
  -webkit-mask-image:radial-gradient(128% 108% at 32% 42%,#000 48%,transparent 100%);
  mask-image:radial-gradient(128% 108% at 32% 42%,#000 48%,transparent 100%)}
.aurora{position:absolute;border-radius:50%;filter:blur(66px);opacity:.55;mix-blend-mode:multiply;will-change:transform}
.aurora.a1{width:42vw;height:42vw;left:-4%;top:-8%;background:radial-gradient(circle at 35% 35%,var(--accent),transparent 68%);animation:aur1 17s ease-in-out infinite alternate}
.aurora.a2{width:38vw;height:38vw;left:30%;top:0;background:radial-gradient(circle at 50% 50%,var(--jade),transparent 68%);animation:aur2 21s ease-in-out infinite alternate}
.aurora.a3{width:34vw;height:34vw;left:8%;top:34%;background:radial-gradient(circle at 50% 50%,#7C6BBE,transparent 70%);animation:aur3 25s ease-in-out infinite alternate}
/* fractal-noise ink wash overlay (static texture; the aurora supplies the motion) */
.hero-bg:after{content:"";position:absolute;inset:0;opacity:.05;mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.011' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");background-size:320px}
@keyframes aur1{from{transform:translate(0,0) scale(1)}to{transform:translate(7%,5%) scale(1.16)}}
@keyframes aur2{from{transform:translate(0,0) scale(1.05)}to{transform:translate(-6%,4%) scale(.92)}}
@keyframes aur3{from{transform:translate(0,0) scale(.95)}to{transform:translate(5%,-6%) scale(1.18)}}
:root[data-theme="dark"] .aurora{mix-blend-mode:screen;opacity:.42}
:root[data-theme="dark"] .hero-bg:after{mix-blend-mode:screen;opacity:.07}
@media(max-width:980px){.hero{min-height:auto}}  /* hero-bg stays inset:0 — no negative h-bleed (avoids mobile h-overflow) */
@media (prefers-reduced-motion: reduce){.aurora{animation:none!important}}

/* ================= FAQ accordion ================= */
.faq{display:flex;flex-direction:column;gap:12px;max-width:880px}
.faq-item{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;transition:border-color .15s}
.faq-item[open]{border-color:var(--accent-line)}
.faq-item summary{display:flex;justify-content:space-between;align-items:center;gap:16px;cursor:pointer;
  padding:18px 22px;font-weight:700;font-size:16px;list-style:none}
.faq-item summary::-webkit-details-marker{display:none}
.faq-ico{font-size:24px;line-height:1;color:var(--accent);transition:transform .2s;flex:none}
.faq-item[open] .faq-ico{transform:rotate(45deg)}
.faq-a{padding:0 22px 20px;color:var(--muted);font-size:14.5px;line-height:1.75}

/* ===== Admin console rebuild (2026-07-04): health bar, charts, drawer, sortable tables ===== */
.adm-hero{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.adm-hero h1{font-size:22px;margin:0}
.adm-hero p{color:var(--muted);font-size:13px;margin:4px 0 0}
.adm-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
/* health status bar */
.healthbar{display:flex;align-items:center;gap:12px;padding:14px 18px;border-radius:14px;margin-bottom:20px;font-size:14px;font-weight:600;border:1px solid}
.healthbar.ok{background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent)}
.healthbar.red{background:#fef2f2;border-color:#fecaca;color:#b91c1c}
.healthbar.amber{background:#fffbeb;border-color:#fde68a;color:#b45309}
.healthbar .hb-ico{font-size:18px;line-height:1}
.healthbar .hb-list{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}
.healthbar a.hb-jump{margin-left:auto;font-size:12px;font-weight:700;white-space:nowrap;text-decoration:none;padding:5px 12px;border-radius:999px;border:1px solid currentColor;opacity:.9}
.healthbar a.hb-jump:hover{opacity:1}
/* metric group titles + window chips */
.mgroup-title{font-size:12px;font-weight:800;letter-spacing:.04em;color:var(--soft);text-transform:uppercase;margin:8px 2px 10px}
.metric .win{float:right;font-size:10px;font-weight:800;letter-spacing:.03em;color:var(--soft);background:var(--bg-2);border:1px solid var(--line);border-radius:999px;padding:1px 8px}
/* 30d bar charts */
.nz-charts{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:20px;margin-top:12px}
.nz-chart h4{margin:0 0 8px;font-size:13px;color:var(--muted);font-weight:600}
.nz-bars{display:flex;align-items:flex-end;gap:2px;height:92px;border-bottom:1px solid var(--line);padding-bottom:1px}
.nz-bar{flex:1;min-width:2px;background:var(--accent);opacity:.78;border-radius:2px 2px 0 0}
.nz-bar:hover{opacity:1}
.nz-rev .nz-bar{background:#b45309}
.nz-nu .nz-bar{background:#3b5bdb}
.nz-axis{display:flex;justify-content:space-between;font-size:11px;color:var(--soft);margin-top:5px}
.nz-mini{height:4px;background:var(--line);border-radius:2px;margin-top:5px;min-width:60px}
.nz-mini i{display:block;height:100%;background:var(--accent);border-radius:2px}
/* sortable headers */
.table th[data-sort]{cursor:pointer;user-select:none;white-space:nowrap}
.table th[data-sort]:hover{color:var(--accent)}
.table th[data-sort].nz-asc::after{content:' ↑'}
.table th[data-sort].nz-desc::after{content:' ↓'}
/* success-rate pill */
.rate-pill{display:inline-block;font-weight:800;font-size:12px;padding:2px 9px;border-radius:999px}
.rate-pill.g{background:var(--accent-soft);color:var(--accent)}
.rate-pill.y{background:#fffbeb;color:#b45309;border:1px solid #fde68a}
.rate-pill.r{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}
.rate-pill.n{background:var(--bg-2);color:var(--soft)}
.mapbadge{display:inline-block;font-size:10px;font-weight:800;padding:1px 6px;border-radius:999px;background:#fffbeb;color:#b45309;border:1px solid #fde68a;margin-left:6px;cursor:help}
.warnbox{background:#fffbeb;border:1px solid #fde68a;color:#b45309;border-radius:12px;padding:10px 14px;font-size:13px;margin-bottom:14px}
/* right-side drawer */
.drawer-scrim{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:1300;opacity:0;pointer-events:none;transition:opacity .2s}
.drawer-scrim.open{opacity:1;pointer-events:auto}
.drawer{position:fixed;top:0;right:0;height:100vh;width:min(460px,94vw);background:var(--surface);border-left:1px solid var(--line);
  box-shadow:-20px 0 60px rgba(2,6,23,.28);z-index:1301;transform:translateX(100%);transition:transform .24s ease;
  display:flex;flex-direction:column}
.drawer.open{transform:none}
.drawer-top{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid var(--line)}
.drawer-top b{font-size:16px}
.drawer-x{border:0;background:none;font-size:24px;line-height:1;cursor:pointer;color:var(--soft)}
.drawer-x:hover{color:var(--ink)}
.drawer-body{padding:16px 20px;overflow:auto;flex:1}
.drawer-field{margin-bottom:14px}
.drawer-field label{display:block;font-size:12px;font-weight:700;color:var(--muted);margin-bottom:5px}
.drawer-field .hint{font-weight:400;color:var(--soft);font-size:11px}
.drawer-field input,.drawer-field select{width:100%;box-sizing:border-box}
.drawer-field .keymono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}
.drawer-row{display:flex;gap:10px}
.drawer-row>div{flex:1}
.drawer-foot{padding:14px 20px;border-top:1px solid var(--line);display:flex;gap:10px;justify-content:flex-end}
.copyline{display:flex;gap:6px;align-items:center}
.copyline input{flex:1}
.rowclick{cursor:pointer}
.rowclick:hover{background:var(--bg-2)}

/* ===== 2026-07-04d fixes: width overflow, health dot, sparkline trend cards ===== */
/* Root cause of page-level horizontal scroll: flexible grid tracks not allowed to shrink below their
   table's min-width. minmax(0,..)+min-width:0 lets the .table-wrap scroll internally instead. */
.shell{max-width:100%}
.dash-grid{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)}
.dash-grid>*{min-width:0}
.metric-grid>*{min-width:0}
.card{overflow:hidden}
.hdot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:7px;vertical-align:middle}
/* sparkline trend cards (clearer than thin bars: headline number + area line + period delta) */
.trend-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin-top:12px}
.trend-card{border:1px solid var(--line);border-radius:14px;padding:16px 16px 8px;background:var(--surface);min-width:0}
.trend-card .tc-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:2px}
.trend-card .tc-title{font-size:13px;color:var(--muted);font-weight:700}
.trend-card .tc-delta{font-size:12px;font-weight:800;padding:1px 8px;border-radius:999px}
.trend-card .tc-delta.up{background:var(--accent-soft);color:var(--accent)}
.trend-card .tc-delta.down{background:#fef2f2;color:#b91c1c}
.trend-card .tc-delta.flat{background:var(--bg-2);color:var(--soft)}
.trend-card .tc-big{font-size:30px;font-weight:900;letter-spacing:-.03em;line-height:1.1}
.trend-card .tc-sub{font-size:11px;color:var(--soft);margin-bottom:8px}
.trend-card svg{display:block;width:100%;height:70px;overflow:visible}
.trend-card .tc-axis{display:flex;justify-content:space-between;font-size:11px;color:var(--soft);margin-top:4px}

/* ---- mobile topbar + hero (2026-09-10). At 390px the topbar overflowed by 41-50px (two 28px gaps + 20px paddings
   + a login link that duplicates Get-API-Key), which made the whole page scroll sideways; and both hero CTAs sat
   below the fold (zh 625 / en 745 vs ~667 visible). Owner decision: hide the login link on phones. ---- */
@media(max-width:600px){
  .topbar-inner{gap:12px;padding-left:14px;padding-right:14px}
  .nav-right{gap:6px}
  .nav-right a[data-auth="login"]{display:none}
  .hero{padding:26px 0 22px;gap:22px}
  .hero h1{font-size:clamp(34px,9.5vw,44px);margin:8px 0 10px}
  .hero .lead{font-size:16px;line-height:1.55}
  .hero-actions{margin-top:18px;gap:10px}
  .hero-checks{margin-top:18px;gap:12px}
}

/* 2026-09-25 header: items never wrap. ja/ko/es labels used to fold into vertical stacks between the
   860px hamburger breakpoint and ~1290px; now spacing tightens and flowith.js fitNav() hides the
   optional items (Resources, Contact, FAQ: all also in the footer) while the row would overflow. */
.topbar .nav-link,.topbar .nav-trigger,.topbar .nav-right .btn{white-space:nowrap}
.topbar .nav > *{flex-shrink:0}
.topbar [data-nav-opt].nav-opt-off{display:none!important}
@media(max-width:1320px){
  .topbar-inner{gap:18px}
  .topbar .nav-link,.topbar .nav-trigger{padding:8px 9px}
}

/* claude-cnav-20261114: console nav on phones / tablets (<=980px) is one swipeable row with the current page in view
   (it was a ~230px block of wrapped links on top of every console page). flowith.js centres the current item and
   fades whichever edge still has items behind it. Desktop rail untouched. */
@media(max-width:980px){
  .shell{row-gap:16px}
  .side{flex-wrap:nowrap;gap:4px;padding:6px;border-radius:14px;overflow-x:auto;overflow-y:hidden;will-change:auto;
    scrollbar-width:none;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scroll-padding-inline:6px}
  .side::-webkit-scrollbar{display:none}
  .side a{flex:none;white-space:nowrap;padding:9px 14px;scroll-snap-align:start}
  .side a.active{background:rgba(255,255,255,.16)}
  .side a.active:before{display:none}
  .side a.side-out{margin-left:4px;padding-top:9px;border-radius:10px;opacity:.72}
  .side.can-l{-webkit-mask-image:linear-gradient(90deg,transparent,#000 32px);mask-image:linear-gradient(90deg,transparent,#000 32px)}
  .side.can-r{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 32px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 32px),transparent)}
  .side.can-l.can-r{-webkit-mask-image:linear-gradient(90deg,transparent,#000 32px,#000 calc(100% - 32px),transparent);
    mask-image:linear-gradient(90deg,transparent,#000 32px,#000 calc(100% - 32px),transparent)}
}

/* claude-mnav-20261114: phones / tablets (<=860px, where .nav is hidden) get a menu button and a right-hand drawer.
   flowith.js builds the drawer from the desktop header itself (.nav2 menus, the language menu, the sign-in / console
   buttons) the first time it opens, so it cannot drift from the desktop menus. The language menu moves into the
   drawer, so the header keeps the same number of icons (:has(); a browser without it just shows both). Console pages
   have their own nav strip and no menu button. The <header class="topbar"> tag itself stays as is (tests split on it). */
.m-burger{display:none}
.m-burger,.m-dr-x{padding:0;border:0;background:none;color:var(--muted)}
.m-burger:hover,.m-dr-x:hover{background:var(--bg-2);color:var(--ink)}
.m-burger:focus-visible,.m-dr-x:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
@media(max-width:860px){
  .m-burger{display:grid}
  .topbar:has(.m-burger) .nav-right .lang-dd{display:none}
}
html.m-dr-lock{overflow:hidden}
.m-drawer{position:fixed;inset:0;z-index:1250}
.m-drawer[hidden]{display:none}
.m-dr-scrim{position:absolute;inset:0;background:rgba(14,14,12,.42);opacity:0;transition:opacity .22s ease}
.m-dr-panel{position:absolute;top:0;right:0;bottom:0;width:min(88vw,380px);display:flex;flex-direction:column;
  background:var(--bg);border-left:1px solid var(--line);box-shadow:-24px 0 60px rgba(2,6,23,.22);
  transform:translateX(100%);transition:transform .26s cubic-bezier(.2,.8,.2,1)}
.m-drawer.open .m-dr-scrim{opacity:1}
.m-drawer.open .m-dr-panel{transform:none}
.m-dr-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:64px;
  padding:env(safe-area-inset-top,0px) 12px 0 18px;border-bottom:1px solid var(--line)}
.m-dr-head .brand{font-size:18px}
.m-dr-body{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:10px 10px 18px}
.m-dr-link,.m-dr-sec>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:50px;
  padding:0 12px;border-radius:12px;color:var(--ink);font-size:16px;font-weight:700;text-decoration:none;cursor:pointer;list-style:none}
.m-dr-sec>summary::-webkit-details-marker{display:none}
.m-dr-sec>summary::after{content:"";flex:none;width:7px;height:7px;margin:0 4px 3px 0;border-right:2px solid var(--muted);
  border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:transform .2s ease}
.m-dr-sec[open]>summary::after{margin-bottom:-3px;transform:rotate(-135deg)}
.m-dr-sec>summary small{margin-left:auto;font-size:13px;font-weight:600;color:var(--muted)}
.m-dr-link:hover,.m-dr-sec>summary:hover{background:var(--bg-2)}
.m-dr-link.active{color:var(--accent)}
.m-dr-sub{display:flex;flex-direction:column;gap:2px;padding:2px 2px 10px 8px}
.m-dr-sub a,.m-dr-sub button.hd-it{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:10px;
  border:0;border-radius:10px;background:none;color:var(--ink);font:inherit;font-size:14.5px;text-align:left;text-decoration:none;cursor:pointer}
.m-dr-sub a:hover,.m-dr-sub button.hd-it:hover{background:var(--bg-2)}
.m-dr-sub small{flex:none;color:var(--muted);font-size:12.5px}
.m-dr-sub hr{border:0;border-top:1px solid var(--line);margin:6px 10px}
.m-dr-sub a.hd-mm-row{display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px}
.m-dr-sub .hd-mm-th{width:44px;height:44px;border-radius:10px;background-size:cover;background-position:center}
.m-dr-sub .hd-mm-row b{display:block;font-size:14.5px}
.m-dr-sub .hd-mm-d{display:block;margin-top:2px;color:var(--muted);font-size:12.5px;line-height:1.45}
.m-dr-sub .hd-mm-ft{display:flex;justify-content:space-between;gap:12px;margin-top:4px;padding:8px 10px 2px;border-top:1px solid var(--line)}
.m-dr-sub .hd-mm-ft a{width:auto;padding:4px 0;color:var(--accent);font-size:14px;font-weight:700}
.m-dr-sub .hd-res-k{display:none!important}
.m-dr-langs a b{font-weight:600}
.m-dr-foot{flex:none;display:flex;gap:10px;padding:12px 14px calc(12px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line)}
.m-dr-foot .btn{flex:1;justify-content:center}
[data-theme="dark"] .m-dr-scrim{background:rgba(0,0,0,.55)}
@media (prefers-reduced-motion:reduce){.m-dr-scrim,.m-dr-panel{transition:none}}
