/* ==========================================================================
   懒鱼 API · 答疑站 — shared styles
   Palette from new-api web/src/styles/brand.css
   ========================================================================== */

:root{
  --bg:#F7FAFF;
  --bg-2:#EEF5FD;
  --card:#FFFFFF;
  --ink:#1F3556;
  --ink-2:#2E4A7B;
  --muted:#5F7799;
  --muted-2:#8FA3C7;
  --brand:#5BA7F5;
  --brand-600:#2E6DB4;
  --brand-700:#24507F;
  --brand-300:#8FC7F8;
  --brand-200:#AEDDFF;
  --brand-100:#DCEBFA;
  --brand-50:#EEF5FD;
  --line:#DCEBFA;
  --line-soft:#E6F0FB;
  --ok:#23896A;
  --danger:#C0392B;
  --shadow-sm:0 2px 8px rgba(46,74,123,.06);
  --shadow:0 18px 44px -24px rgba(46,74,123,.28);
  --shadow-lg:0 40px 90px -44px rgba(31,53,86,.35);
  --radius:22px;
  --nav-h:72px;
  --font:"PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei",system-ui,-apple-system,"Segoe UI",sans-serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:calc(var(--nav-h) + 22px);-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:var(--font); font-size:15px; line-height:1.75;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  -webkit-tap-highlight-color:rgba(91,167,245,.16);
}
body::before{
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(ellipse 52% 38% at 88% -6%, #E3F2FF 0%, rgba(227,242,255,0) 62%),
    radial-gradient(ellipse 42% 36% at 0% 6%, #EEF5FD 0%, rgba(238,245,253,0) 60%),
    linear-gradient(180deg,#F4FAFF 0%,#F7FAFF 38%,#F7FAFF 100%);
}
body::after{
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background-image:radial-gradient(#C9E0F7 1px, transparent 1.2px);
  background-size:26px 26px; opacity:.35;
  -webkit-mask-image:linear-gradient(180deg, rgba(0,0,0,.7), rgba(0,0,0,0) 42%);
  mask-image:linear-gradient(180deg, rgba(0,0,0,.7), rgba(0,0,0,0) 42%);
}
a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}
button,input{font-family:inherit}
button{touch-action:manipulation}
::selection{background:#AEDDFF; color:#1F3556}
a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid rgba(46,109,180,.4); outline-offset:2px}
[hidden]{display:none !important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

.container{width:min(1180px,100%); margin:0 auto; padding:0 24px}

/* ---------- header ---------- */
.site-header{
  position:sticky; top:0; z-index:50; height:var(--nav-h);
  background:rgba(247,250,255,.82); border-bottom:1px solid rgba(220,235,250,0);
  -webkit-backdrop-filter:blur(16px) saturate(1.2); backdrop-filter:blur(16px) saturate(1.2);
  transition:border-color .22s ease, box-shadow .22s ease, background .22s ease;
}
.site-header.scrolled{background:rgba(247,250,255,.94); border-bottom-color:var(--line); box-shadow:0 10px 30px -26px rgba(31,53,86,.5)}
.header-in{height:100%; display:flex; align-items:center; gap:24px}
.brand{display:flex; align-items:center; gap:10px; flex:none}
.brand-mark{
  width:40px; height:40px; border-radius:12px; display:block; object-fit:cover; flex:none;
  border:2px solid #fff;
  box-shadow:0 0 0 1px rgba(46,74,123,.07), 0 8px 18px -8px rgba(31,83,134,.55);
}
.brand-text{display:flex; align-items:baseline; gap:7px; line-height:1}
.brand-text b{font-size:16px; font-weight:800; letter-spacing:.01em}
.brand-text small{font-size:11px; font-weight:600; color:var(--brand-700); background:var(--brand-100); padding:3px 7px; border-radius:99px; letter-spacing:.04em}
.nav-links{display:flex; align-items:center; gap:2px; margin-left:6px}
.nav-links a{
  padding:8px 12px; border-radius:9px; color:var(--muted);
  font-size:13.5px; font-weight:600; white-space:nowrap;
  transition:color .16s ease, background .16s ease;
}
.nav-links a:hover{color:var(--ink); background:var(--brand-50)}
.nav-links a.on{color:var(--brand-700); background:var(--brand-100)}
.header-actions{margin-left:auto; display:flex; align-items:center; gap:10px}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  height:44px; padding:0 20px; border-radius:12px; border:1.5px solid transparent;
  font-size:14px; font-weight:700; cursor:pointer; white-space:nowrap;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.btn svg{flex:none}
.btn-primary{background:linear-gradient(135deg,#2E6DB4,#24507F); color:#fff; box-shadow:0 12px 24px -12px rgba(36,80,127,.55)}
.btn-primary:hover{transform:translateY(-1px); box-shadow:0 16px 30px -12px rgba(36,80,127,.65)}
.btn-ghost{background:#fff; border-color:var(--line); color:var(--ink-2)}
.btn-ghost:hover{border-color:var(--brand-200); background:#F8FBFF; transform:translateY(-1px)}
.btn-sm{height:38px; padding:0 15px; border-radius:10px; font-size:13px}

.menu{position:relative; display:none}
.menu summary{list-style:none; width:44px; height:44px; border-radius:11px; border:1.5px solid var(--line); background:#fff; display:grid; place-items:center; cursor:pointer; color:var(--ink-2)}
.menu summary::-webkit-details-marker{display:none}
.menu summary svg{width:18px; height:18px}
.menu-panel{
  position:absolute; right:0; top:52px; width:200px; padding:8px;
  background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow);
  display:flex; flex-direction:column; gap:2px;
}
.menu-panel a{padding:10px 12px; border-radius:9px; font-size:14px; font-weight:600; color:var(--ink-2)}
.menu-panel a:hover{background:var(--brand-50)}
.menu-panel a.on{color:var(--brand-700); background:var(--brand-100)}
.menu-panel a.cta{margin-top:4px; background:var(--brand-600); color:#fff; text-align:center}

/* ---------- page hero ---------- */
.page-hero{padding:6px 0 18px}
.crumbs{display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--muted-2); margin-bottom:16px}
.crumbs a{color:var(--muted)}
.crumbs a:hover{color:var(--brand-700)}
.crumbs span{color:var(--ink-2); font-weight:600}
.eyebrow{
  display:inline-flex; align-items:center; gap:7px; padding:5px 11px;
  border-radius:99px; background:#fff; border:1px solid var(--line);
  color:var(--brand-700); font-size:11.5px; font-weight:700; letter-spacing:.06em;
  font-family:var(--mono);
}
.page-hero h1{margin:14px 0 10px; font-size:clamp(30px,4vw,44px); line-height:1.22; font-weight:850; letter-spacing:-.02em; color:var(--ink)}
.page-lede{margin:0; max-width:750px; color:var(--muted); font-size:15px; line-height:1.85}
.page-meta{display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:16px 0 0; font-size:12px; color:var(--muted-2)}
.page-meta i{width:3px; height:3px; border-radius:50%; background:#C6D8EE}
.page-meta b{color:var(--ink-2); font-weight:700}

/* ---------- doc layout / sidebar ---------- */
.doc-layout{display:grid; grid-template-columns:216px minmax(0,1fr); gap:42px; padding:28px 0 66px}
.doc-main{min-width:0}
.sidebar{position:sticky; top:calc(var(--nav-h) + 22px); align-self:start; font-size:13px}
.side-block{margin-bottom:26px}
.side-label{margin:0 0 9px; font-size:10.5px; font-weight:800; letter-spacing:.12em; color:var(--muted-2); text-transform:uppercase}
.side-links{display:flex; flex-direction:column; gap:1px}
.side-links a{padding:6px 10px; border-radius:8px; color:var(--muted); font-weight:600}
.side-links a:hover{color:var(--ink); background:var(--brand-50)}
.side-links a.on{color:var(--brand-700); background:var(--brand-100)}
.toc{display:flex; flex-direction:column; border-left:1px solid var(--line); margin-left:4px}
.toc a{padding:5px 0 5px 12px; margin-left:-1px; border-left:2px solid transparent; color:var(--muted-2); font-size:12.5px}
.toc a:hover{color:var(--brand-700)}
.toc a.on{color:var(--brand-700); border-left-color:var(--brand); font-weight:650}
.side-help{margin-top:32px; padding:14px; border:1px solid var(--line); border-radius:14px; background:linear-gradient(180deg,#fff,#F5FAFF)}
.side-help p{margin:0 0 8px; font-size:12px; color:var(--muted)}
.side-help a{font-size:12.5px; font-weight:700; color:var(--brand-700); display:inline-flex; align-items:center; gap:5px}
.side-help a:hover{color:var(--brand-600)}

/* ---------- generic ---------- */
.block{margin:0 0 38px; scroll-margin-top:calc(var(--nav-h) + 26px); min-width:0}
.block:last-child{margin-bottom:0}
.block h2{margin:0 0 10px; font-size:25px; line-height:1.35; font-weight:820; letter-spacing:-.015em; color:var(--ink)}
.block .block-sub{margin:0 0 22px; color:var(--muted); font-size:14px; line-height:1.8; max-width:760px}
.block h3{margin:0 0 8px; font-size:17px; font-weight:750; color:var(--ink)}
.block h4{margin:18px 0 7px; font-size:14px; font-weight:750; color:var(--ink-2)}
.block p{margin:0 0 12px; color:var(--ink-2); line-height:1.85}
.block p.muted{color:var(--muted)}
.block a.inline{color:var(--brand-700); font-weight:650; text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1px}
.block a.inline:hover{color:var(--brand-600)}
.card{background:#fff; border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow-sm)}
.grid-2{display:grid; grid-template-columns:1fr 1fr; gap:16px}
.grid-3{display:grid; grid-template-columns:repeat(3,1fr); gap:14px}
.note{
  display:flex; gap:10px; align-items:flex-start; padding:13px 15px;
  background:var(--brand-50); border:1px solid var(--line-soft); border-radius:13px;
  font-size:12.5px; color:var(--muted); line-height:1.75;
}
.note svg{flex:none; margin-top:2px; color:var(--brand-700)}
.note b{color:var(--ink-2)}
.warn-note{background:#FFF8E8; border-color:#F4DFB4; color:#7A5A24}
.warn-note svg{color:#B7791F}
.tag{display:inline-flex; align-items:center; gap:5px; padding:3px 8px; border-radius:999px; background:var(--brand-50); border:1px solid var(--line-soft); color:var(--brand-700); font-size:10.5px; font-weight:700; letter-spacing:.03em}
.pill-18{background:#FFF0F3; border-color:#F4C9D3; color:#A33A55}
.kbd{font-family:var(--mono); font-size:11px; padding:1px 5px; border:1px solid var(--line); border-bottom-width:2px; border-radius:5px; background:#fff; color:var(--ink-2)}

/* ---------- home ---------- */
.home-hero{position:relative; padding:52px 0 54px; overflow:hidden}
.home-hero .container{display:grid; grid-template-columns:1.02fr .98fr; gap:48px; align-items:center}
.home-pill{
  display:inline-flex; align-items:center; gap:8px; padding:6px 12px 6px 9px;
  background:#fff; border:1px solid var(--line); border-radius:99px;
  color:var(--brand-700); font-size:12.5px; font-weight:650; box-shadow:var(--shadow-sm);
}
.home-pill .dot{width:6px; height:6px; border-radius:50%; background:var(--brand); box-shadow:0 0 0 3px rgba(91,167,245,.16)}
.home-hero h1{margin:20px 0 15px; font-size:clamp(38px,5vw,60px); line-height:1.13; font-weight:850; letter-spacing:-.03em; color:var(--ink); text-wrap:balance}
.home-hero h1 .hl{position:relative; display:inline-block; color:var(--brand-600); white-space:nowrap}
.home-hero h1 .hl svg{position:absolute; left:-2%; bottom:-9px; width:104%; height:13px; overflow:visible}
.home-lede{margin:0 0 24px; max-width:500px; color:var(--muted); font-size:15px; line-height:1.85; text-wrap:balance}
.home-lede b{color:var(--ink-2)}
.home-search{
  display:flex; align-items:center; gap:10px; padding:8px 8px 8px 16px;
  background:#fff; border:1.5px solid var(--line); border-radius:17px;
  box-shadow:0 18px 36px -26px rgba(31,53,86,.5); max-width:520px;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.home-search:focus-within{border-color:var(--brand-300); box-shadow:0 0 0 4px rgba(91,167,245,.12), 0 18px 36px -26px rgba(31,53,86,.5)}
.home-search > svg{color:var(--brand-700); flex:none}
.home-search input{flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--ink); font-size:14.5px; padding:10px 0}
.home-search input::placeholder{color:var(--muted-2)}
.home-search button{flex:none; height:42px; padding:0 18px; border:0; border-radius:11px; background:var(--brand-600); color:#fff; font-size:13.5px; font-weight:700; cursor:pointer}
.home-search button:hover{background:var(--brand-700)}
.home-quick{display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin-top:13px; font-size:12.5px; color:var(--muted-2)}
.home-quick b{font-weight:600; color:var(--muted)}
.home-quick a{border:1px solid var(--line); background:#fff; color:var(--ink-2); border-radius:8px; padding:4px 9px; font-size:12px; font-weight:650; font-variant-numeric:tabular-nums}
.home-quick a:hover{background:var(--brand-600); border-color:var(--brand-600); color:#fff; transform:translateY(-1px)}
.home-relay{margin:18px 0 0; font-size:13px}
.home-relay a{display:inline-flex; align-items:center; gap:6px; color:var(--brand-700); font-weight:700; border-bottom:1px dashed rgba(46,109,180,.35); padding-bottom:2px}
.home-relay a:hover{color:var(--brand-600); border-bottom-color:currentColor}
.home-meta{display:flex; flex-wrap:wrap; gap:10px; margin:22px 0 0; color:var(--muted-2); font-size:12px}
.home-meta i{width:3px; height:3px; border-radius:50%; background:#C6D8EE; align-self:center}

.home-art{position:relative; min-height:420px; display:flex; align-items:center; justify-content:center}
.diag{position:relative; width:min(400px,100%); background:#fff; border:1px solid var(--line); border-radius:22px; padding:20px 22px 18px; box-shadow:var(--shadow-lg); transform:rotate(1.2deg)}
.diag.ghost{position:absolute; width:320px; padding:16px 18px; box-shadow:var(--shadow); opacity:.75; display:flex; align-items:center; gap:10px; font-size:13px; font-weight:700; color:var(--muted)}
.diag.ghost .g-code{font-family:var(--mono); font-size:13px; font-weight:700; color:#fff; background:var(--brand-200); border-radius:8px; padding:3px 7px}
.diag.g1{top:20px; left:-8px; transform:rotate(-6deg); z-index:0}
.diag.main{z-index:2}
.diag-top{display:flex; align-items:center; gap:8px; font-size:11px; color:var(--muted); letter-spacing:.04em; padding-bottom:13px; border-bottom:1px dashed var(--line-soft)}
.tdots{display:flex; gap:4px; margin-right:2px}
.tdots i{width:7px; height:7px; border-radius:50%; background:#AEDDFF}
.tdots i:nth-child(2){background:#FFD9B8}
.tdots i:nth-child(3){background:#CBE9D8}
.diag-status{display:flex; align-items:center; gap:14px; padding:17px 0 15px}
.diag-code{font-family:var(--mono); font-size:25px; font-weight:800; color:#fff; background:linear-gradient(135deg,#3F8FEB,#2E6DB4); border-radius:13px; padding:7px 12px; box-shadow:0 10px 20px -10px rgba(46,109,180,.65)}
.diag-status b{display:block; font-size:16px; font-weight:800; line-height:1.35}
.diag-status small{display:block; font-size:11.5px; color:var(--muted); margin-top:2px}
.diag-row{display:flex; gap:12px; padding:9px 0; border-top:1px solid var(--line-soft); font-size:13px; line-height:1.6}
.diag-row > span{flex:none; width:32px; color:var(--brand-700); font-weight:700; font-size:12px; padding-top:1px}
.diag-row p{margin:0; color:var(--ink-2)}
.diag-foot{display:flex; align-items:center; gap:7px; margin-top:9px; padding-top:11px; border-top:1px dashed var(--line-soft); font-size:11.5px; color:var(--muted)}
.live{width:6px; height:6px; border-radius:50%; background:#39B98A; box-shadow:0 0 0 3px rgba(57,185,138,.16)}
.home-art .mascot{position:absolute; width:104px; height:104px; right:0; bottom:-2px; z-index:3; border-radius:24px; border:4px solid #fff; transform:rotate(6deg); box-shadow:0 18px 34px -18px rgba(31,53,86,.5)}
.float-tag{position:absolute; z-index:4; background:#fff; border:1px solid var(--line); border-radius:10px; padding:6px 10px; font-size:11.5px; font-weight:700; color:var(--brand-700); box-shadow:var(--shadow-sm); top:-12px; right:12px; transform:rotate(4deg)}

.section-intro{padding:18px 0 22px}
.section-intro .sec-h{display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:18px}
.section-intro h2{margin:0; font-size:30px; font-weight:850; letter-spacing:-.02em}
.section-intro p{margin:6px 0 0; color:var(--muted); font-size:14px}
.section-intro .all-link{font-size:13px; font-weight:700; color:var(--brand-700); white-space:nowrap}
.home-cards{display:grid; grid-template-columns:repeat(3,1fr); gap:14px; padding-bottom:12px}
.home-card{position:relative; display:flex; flex-direction:column; padding:22px; background:#fff; border:1px solid var(--line); border-radius:19px; box-shadow:var(--shadow-sm); transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease}
.home-card:hover{transform:translateY(-3px); border-color:var(--brand-200); box-shadow:var(--shadow)}
.home-card .num{font-family:var(--mono); font-size:10.5px; letter-spacing:.1em; color:var(--brand-700); background:var(--brand-50); border:1px solid var(--line-soft); align-self:flex-start; padding:2px 6px; border-radius:5px}
.home-card h3{margin:14px 0 7px; font-size:18px; font-weight:800; letter-spacing:-.01em}
.home-card p{margin:0; color:var(--muted); font-size:13px; line-height:1.75; flex:1}
.home-card .hc-body{display:flex; flex-direction:column; flex:1; min-width:0}
.home-card .go{display:inline-flex; align-items:center; gap:5px; margin-top:14px; font-size:12.5px; font-weight:700; color:var(--brand-700)}
.home-card.help{flex-direction:row; align-items:center; justify-content:space-between; gap:20px}
.home-card .hc-mascot{width:92px; height:92px; border-radius:22px; border:4px solid #fff; flex:none; box-shadow:0 16px 30px -18px rgba(31,53,86,.5); transform:rotate(-4deg)}
.home-card:hover .go{color:var(--brand-600)}
.home-card.wide{grid-column:span 2}
.home-steps{display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:26px 0 68px}
.home-step{display:flex; gap:12px; padding:18px; background:linear-gradient(180deg,#fff,#F6FAFF); border:1px solid var(--line); border-radius:16px}
.home-step .n{flex:none; width:26px; height:26px; border-radius:50%; display:grid; place-items:center; background:var(--brand-100); color:var(--brand-700); font-family:var(--mono); font-size:11px; font-weight:800}
.home-step b{display:block; font-size:13.5px; color:var(--ink); line-height:1.5}
.home-step p{margin:3px 0 0; font-size:12px; color:var(--muted); line-height:1.7}

/* ---------- access ---------- */
.trio .card{padding:20px}
.trio .t-ico{width:36px; height:36px; border-radius:11px; display:grid; place-items:center; background:var(--brand-50); color:var(--brand-700); border:1px solid var(--line-soft); margin-bottom:12px}
.trio .t-ico svg{width:18px; height:18px}
.trio h3{font-size:15px; margin-bottom:5px}
.trio p{margin:0; font-size:12.5px; color:var(--muted); line-height:1.75}
.url-grid{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:4px}
.url-card{
  position:relative; display:flex; flex-direction:column; gap:7px; align-items:flex-start;
  padding:16px 18px; border:1.5px solid var(--line); border-radius:14px; background:#fff; cursor:pointer; text-align:left;
  box-shadow:var(--shadow-sm); transition:border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.url-card:hover{border-color:var(--brand-200); transform:translateY(-2px); box-shadow:var(--shadow)}
.url-card .u-tag{display:flex; align-items:center; gap:6px; font-size:11px; font-weight:700; color:var(--brand-700); letter-spacing:.03em}
.url-card .u-tag i{width:5px; height:5px; border-radius:50%; background:var(--brand-300)}
.url-card code{font-family:var(--mono); font-size:14px; color:var(--ink); word-break:break-all}
.url-card .u-copy{position:absolute; right:12px; top:12px; font-size:10.5px; color:var(--muted-2); display:flex; align-items:center; gap:4px; opacity:.7}
.url-card:hover .u-copy{opacity:1; color:var(--brand-700)}
.url-card:hover code{color:var(--brand-700)}
.url-card.recommended{
  border:1.5px solid var(--brand);
  background:linear-gradient(180deg,#EAF6FF,#FFFFFF);
  box-shadow:0 0 0 3px rgba(91,167,245,.1), 0 14px 30px -22px rgba(46,109,180,.65);
}
.url-card.recommended::before{
  content:""; position:absolute; left:0; top:10px; bottom:10px; width:3px; border-radius:99px;
  background:linear-gradient(180deg,#5BA7F5,#2E6DB4);
}
.url-card.recommended:hover{border-color:var(--brand-600)}
.url-card.recommended code{color:var(--brand-700)}
.rec{
  font-style:normal; font-size:9.5px; font-weight:800; letter-spacing:.04em;
  color:#fff; background:linear-gradient(135deg,#5BA7F5,#2E6DB4);
  border-radius:5px; padding:1px 5px; margin-left:2px;
}
.compare .card{padding:20px}
.compare h3{font-size:14.5px; margin-bottom:7px}
.compare code{font-family:var(--mono); font-size:12px; background:var(--brand-50); padding:2px 6px; border-radius:5px; color:var(--brand-700)}
.compare p{font-size:12.5px; color:var(--muted); margin:0}
.code-card{margin-top:4px; border:1px solid var(--line); border-radius:16px; overflow:hidden; background:#0F2236; box-shadow:var(--shadow-sm); min-width:0; max-width:100%}
.code-head{display:flex; align-items:center; gap:8px; padding:8px 12px; background:#142A42; border-bottom:1px solid rgba(255,255,255,.08)}
.code-tabs{display:flex; gap:2px; flex:1}
.code-tabs button{border:0; background:none; color:#9FB4CD; font-size:12px; font-weight:650; padding:6px 10px; border-radius:7px; cursor:pointer; font-family:var(--mono)}
.code-tabs button:hover{color:#DCEBFA}
.code-tabs button.on{background:rgba(255,255,255,.1); color:#fff}
.code-head .copy-btn{background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.16); color:#DCEBFA}
.code-head .copy-btn:hover{background:var(--brand-600); border-color:var(--brand-600)}
.code-panel{display:none; margin:0; padding:16px 18px; overflow:auto; font-family:var(--mono); font-size:12px; line-height:1.8; color:#D6E6F7; white-space:pre; max-height:420px; max-width:100%; min-width:0}
.code-panel.on{display:block}
.code-panel .c-key{color:#9CC7F8}
.code-panel .c-str{color:#9FE0C4}
.code-panel .c-com{color:#7E97B6}
.checklist{counter-reset:ck; display:flex; flex-direction:column; gap:10px; margin:0; padding:0; list-style:none}
.checklist li{position:relative; padding-left:34px; font-size:13.5px; line-height:1.8; color:var(--ink-2)}
.checklist li::before{counter-increment:ck; content:counter(ck); position:absolute; left:0; top:1px; width:22px; height:22px; border-radius:50%; display:grid; place-items:center; background:var(--brand-100); color:var(--brand-700); font-size:10.5px; font-weight:800}
.checklist li b{color:var(--ink)}
.mistakes{display:flex; flex-direction:column; gap:9px}
.mistake{display:flex; gap:11px; padding:13px 15px; background:#fff; border:1px solid var(--line); border-radius:12px}
.mistake .x{flex:none; width:20px; height:20px; border-radius:50%; display:grid; place-items:center; background:#FFF0F3; color:#A33A55; font-size:11px; font-weight:800; margin-top:2px}
.mistake b{display:block; font-size:13px; color:var(--ink)}
.mistake p{margin:2px 0 0; font-size:12.5px; color:var(--muted); line-height:1.7}
.copy-btn{
  display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:#fff;
  color:var(--ink-2); border-radius:8px; padding:5px 9px; font-size:11.5px; font-weight:650; cursor:pointer;
  transition:all .16s ease; white-space:nowrap;
}
.copy-btn:hover{background:var(--brand-600); border-color:var(--brand-600); color:#fff}
.copy-btn:disabled{opacity:.5; cursor:default}

/* ---------- errors ---------- */
.err-toolbar{
  position:sticky; top:calc(var(--nav-h) + 8px); z-index:20;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  padding:9px; margin-bottom:14px; border:1px solid var(--line); border-radius:16px;
  background:rgba(255,255,255,.9); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
  box-shadow:0 12px 30px -28px rgba(31,53,86,.55);
}
.search-box{flex:1; min-width:210px; display:flex; align-items:center; gap:8px; padding:0 11px; height:38px; border:1px solid var(--line-soft); background:#F8FBFF; border-radius:10px}
.search-box svg{flex:none; color:var(--brand-700)}
.search-box input{flex:1; min-width:0; border:0; outline:0; background:transparent; font-size:13px; color:var(--ink)}
.search-box input::placeholder{color:var(--muted-2)}
.seg{display:flex; gap:3px; padding:3px; background:var(--brand-50); border:1px solid var(--line-soft); border-radius:10px}
.seg button{display:inline-flex; align-items:center; gap:5px; border:0; background:transparent; cursor:pointer; padding:6px 11px; border-radius:7px; font-size:12.5px; font-weight:650; color:var(--muted)}
.seg button em{font-style:normal; font-size:10px; opacity:.7; font-variant-numeric:tabular-nums}
.seg button:hover{color:var(--ink)}
.seg button[aria-pressed="true"]{background:#fff; color:var(--brand-700); box-shadow:0 2px 6px rgba(31,53,86,.08)}
.err-count{margin-left:auto; padding-right:4px; font-size:11.5px; color:var(--muted); white-space:nowrap}
.err-count b{color:var(--ink-2); font-variant-numeric:tabular-nums}
.jump-row{display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:0 0 16px; font-size:12px; color:var(--muted-2)}
.jump-row b{font-weight:600; color:var(--muted)}
.jump-row a{font-family:var(--mono); font-size:11.5px; padding:3px 7px; border:1px solid var(--line); border-radius:6px; background:#fff; color:var(--ink-2)}
.jump-row a:hover{border-color:var(--brand-300); color:var(--brand-700)}
.err-list{display:flex; flex-direction:column; gap:12px}
.err-item{padding:19px 20px; background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow-sm); scroll-margin-top:calc(var(--nav-h) + 90px)}
.err-item.flash{animation:flashRing 1.5s ease}
@keyframes flashRing{0%,100%{box-shadow:var(--shadow-sm)}25%,65%{box-shadow:0 0 0 4px rgba(91,167,245,.2),var(--shadow)}}
.err-head{display:flex; align-items:flex-start; gap:12px}
.err-code{
  flex:none; font-family:var(--mono); font-size:16px; font-weight:800; color:#fff;
  background:linear-gradient(135deg,#2E6DB4,#24507F); border-radius:9px; padding:4px 8px;
  box-shadow:0 8px 16px -10px rgba(36,80,127,.7); margin-top:2px;
}
.err-item[data-side="up"] .err-code{background:linear-gradient(135deg,#1F3556,#16283F); box-shadow:0 8px 16px -10px rgba(22,40,63,.7)}
.err-title{flex:1; min-width:0}
.err-title h3{margin:0; font-size:16px; font-weight:780; line-height:1.45; color:var(--ink)}
.err-summary{margin:3px 0 0; font-size:12.5px; color:var(--muted); line-height:1.65}
.err-side{flex:none; font-size:10.5px; font-weight:700; color:var(--brand-700); background:var(--brand-50); border:1px solid var(--line-soft); border-radius:99px; padding:3px 7px; margin-top:3px}
.err-item[data-side="up"] .err-side{color:#44597A; background:#F1F5FA}
.err-item[data-side="client"] .err-code{background:linear-gradient(135deg,#2FA37A,#1F7A5A); box-shadow:0 8px 16px -10px rgba(31,122,90,.7)}
.err-item[data-side="client"] .err-side{color:#1F7A5A; background:#EEFAF5; border-color:#CDEBDD}
.err-quick{display:grid; grid-template-columns:1fr 1fr; gap:14px 18px; margin:13px 0 0; padding-top:12px; border-top:1px dashed var(--line-soft)}
.err-quick b{display:block; font-size:10.5px; letter-spacing:.06em; color:var(--brand-700); margin-bottom:2px}
.err-quick p{margin:0; font-size:12.5px; color:var(--muted); line-height:1.7}
.err-more{margin-top:12px; border-top:1px dashed var(--line-soft); padding-top:10px}
.err-more summary{display:flex; align-items:center; gap:6px; cursor:pointer; list-style:none; font-size:12px; font-weight:700; color:var(--brand-700)}
.err-more summary::-webkit-details-marker{display:none}
.err-more summary::after{content:"展开"; margin-left:auto; font-size:11px; color:var(--muted-2); font-weight:600}
.err-more[open] summary::after{content:"收起"}
.err-detail{padding-top:10px; font-size:13px; color:var(--ink-2)}
.err-detail h4{font-size:12px; letter-spacing:.04em; color:var(--ink); margin:14px 0 5px}
.err-detail h4:first-child{margin-top:6px}
.err-detail p{margin:0 0 8px; font-size:12.5px; color:var(--muted); line-height:1.8}
.err-detail ol{margin:0 0 8px; padding-left:18px; font-size:12.5px; color:var(--muted); line-height:1.85}
.err-detail li{margin-bottom:3px}
.err-when{margin:10px 0 0; padding:9px 11px; border-radius:9px; background:var(--brand-50); font-size:12px; color:var(--ink-2); line-height:1.75}
.err-empty{padding:50px 20px; text-align:center; background:#fff; border:1px dashed var(--brand-200); border-radius:18px; color:var(--muted)}
.err-empty b{display:block; color:var(--ink); font-size:17px; margin-bottom:5px}
.err-empty p{margin:0 0 15px; font-size:13px}
.err-empty .btn{height:40px; font-size:13px}
.err-tip{margin:16px 0 0; font-size:12px; color:var(--muted-2); text-align:center}
.err-tip a{color:var(--brand-700); font-weight:650; text-decoration:underline; text-underline-offset:3px}

/* ---------- guides ---------- */
.judge{padding:22px; margin-bottom:22px; display:grid; grid-template-columns:1fr 1fr; gap:0}
.judge .j-col{padding:0 22px}
.judge .j-col:first-child{padding-left:0; border-right:1px solid var(--line)}
.judge .j-col:last-child{padding-right:0}
.judge h3{margin:0 0 4px; font-size:15px}
.judge .j-big{font-family:var(--mono); font-size:12px; color:var(--brand-700); font-weight:700; letter-spacing:.06em}
.judge p{margin:8px 0 0; font-size:12.5px; color:var(--muted); line-height:1.8}
.article{padding:24px 26px; margin-bottom:18px; background:#fff; border:1px solid var(--line); border-radius:20px; box-shadow:var(--shadow-sm); scroll-margin-top:calc(var(--nav-h) + 26px)}
.article-head{display:flex; align-items:center; gap:10px; margin-bottom:14px}
.article-ico{width:38px; height:38px; border-radius:12px; display:grid; place-items:center; flex:none; background:var(--brand-50); border:1px solid var(--line-soft); color:var(--brand-700)}
.article-ico svg{width:19px; height:19px}
.article-tag{font-family:var(--mono); font-size:10px; letter-spacing:.08em; color:var(--brand-700); background:var(--brand-100); padding:3px 7px; border-radius:5px}
.article h2{margin:0; font-size:21px; font-weight:800; letter-spacing:-.01em}
.symptom{margin:0 0 18px; padding:12px 14px; background:#F3F9FF; border-left:3px solid var(--brand-200); border-radius:0 10px 10px 0; font-size:12.5px; color:var(--muted); line-height:1.8; word-break:break-word}
.symptom.mono{font-family:var(--mono); font-size:11.5px}
.symptom .s-label{display:block; font-family:var(--font); font-size:10px; font-weight:700; letter-spacing:.08em; color:var(--brand-700); margin-bottom:3px}
.article h3{font-size:14px; margin:18px 0 7px; color:var(--ink)}
.article p{margin:0 0 10px; font-size:13px; color:var(--muted); line-height:1.85}
.article ul,.article ol{margin:0 0 10px; padding-left:19px; font-size:13px; color:var(--muted); line-height:1.85}
.article li{margin-bottom:4px}
.article b{color:var(--ink)}
.article code{font-family:var(--mono); font-size:11.5px; background:var(--brand-50); border:1px solid var(--line-soft); padding:1px 5px; border-radius:5px; color:var(--brand-700)}
.article .callout{margin:14px 0 0; padding:11px 13px; border:1px solid var(--line-soft); background:#FAFCFF; border-radius:10px; font-size:12px; color:var(--muted); line-height:1.75}
.article .callout b{color:var(--ink-2)}

/* ---------- jailbreak ---------- */
.jb-steps{display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:20px}
.jb-step{padding:18px; background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow-sm)}
.jb-step .n{font-family:var(--mono); font-size:11px; font-weight:800; color:var(--brand-700); background:var(--brand-100); border-radius:6px; padding:2px 6px}
.jb-step h3{margin:10px 0 4px; font-size:14.5px}
.jb-step p{margin:0; font-size:12.5px; color:var(--muted); line-height:1.75}
.place-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:22px}
.place{padding:16px; background:linear-gradient(180deg,#fff,#F6FAFF); border:1px solid var(--line); border-radius:14px}
.place b{display:block; font-size:13px; color:var(--ink)}
.place p{margin:4px 0 0; font-size:12px; color:var(--muted); line-height:1.7}
.prompt-card{margin-bottom:14px; padding:18px 20px; background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow-sm)}
.prompt-head{display:flex; align-items:center; gap:9px; flex-wrap:wrap}
.prompt-title{display:flex; align-items:center; gap:8px; flex:1; min-width:0; flex-wrap:wrap}
.prompt-tag{font-family:var(--mono); font-size:10px; font-weight:800; color:#fff; background:var(--brand-600); border-radius:5px; padding:2px 6px; letter-spacing:.04em}
.prompt-title b{font-size:14.5px; color:var(--ink)}
.prompt-title small{font-size:11px; color:var(--muted-2)}
.prompt-head .copy-btn{margin-left:auto; flex:none}
.prompt-details{margin-top:10px; border-top:1px dashed var(--line-soft); padding-top:9px}
.prompt-details summary{display:flex; align-items:center; gap:7px; cursor:pointer; list-style:none; font-size:12px; font-weight:650; color:var(--brand-700)}
.prompt-details summary::-webkit-details-marker{display:none}
.prompt-details summary::after{content:"＋"; margin-left:auto; color:var(--brand-600); font-weight:800}
.prompt-details[open] summary::after{content:"－"}
.prompt-details summary span{font-size:10px; font-weight:700; color:var(--brand-700); background:var(--brand-50); border:1px solid var(--line-soft); border-radius:5px; padding:1px 5px}
.prompt-details pre{margin:10px 0 0; padding:13px 14px; max-height:360px; overflow:auto; white-space:pre-wrap; word-break:break-word; overscroll-behavior:contain; font-family:var(--mono); font-size:11px; line-height:1.8; color:var(--ink-2); background:#F8FBFF; border:1px solid var(--line-soft); border-radius:10px}
.jb-copyall{display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:4px 0 22px}
.jb-copyall p{margin:0; font-size:12px; color:var(--muted-2)}
.fail-list{display:flex; flex-direction:column; gap:8px}
.fail{display:flex; gap:10px; padding:12px 14px; background:#fff; border:1px solid var(--line); border-radius:11px}
.fail b{flex:none; width:20px; height:20px; border-radius:50%; display:grid; place-items:center; background:var(--brand-100); color:var(--brand-700); font-size:10.5px; font-weight:800; margin-top:2px}
.fail div{font-size:12.5px; color:var(--muted); line-height:1.75}
.fail strong{color:var(--ink); font-weight:700}

/* ---------- help ---------- */
.help-list{display:flex; flex-direction:column; gap:12px}
.help-item{padding:18px 20px; background:#fff; border:1px solid var(--line); border-radius:15px}
.help-item .h-head{display:flex; gap:10px; align-items:flex-start}
.help-item .h-num{flex:none; font-family:var(--mono); font-size:10.5px; font-weight:800; color:var(--brand-700); background:var(--brand-100); border-radius:6px; padding:2px 6px; margin-top:2px}
.help-item h3{margin:0; font-size:14.5px}
.help-item p{margin:5px 0 0; font-size:12.5px; color:var(--muted); line-height:1.8}
.example{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.example .card{padding:16px}
.example h4{margin:0 0 7px; font-size:12px; letter-spacing:.04em}
.example .good h4{color:var(--ok)}
.example .bad h4{color:#A33A55}
.example p{margin:0; font-size:12px; color:var(--muted); line-height:1.8}
.example .good{border-color:#CBE9DC; background:#F6FCF9}
.example .bad{border-color:#F4CDD5; background:#FFF8FA}
.template{margin-top:6px; background:#0F2236; border:1px solid var(--line); border-radius:14px; overflow:hidden}
.template-head{display:flex; align-items:center; gap:8px; padding:8px 12px; background:#142A42; color:#BFD8F5; font-size:11px; font-family:var(--mono)}
.template-head .copy-btn{margin-left:auto; background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.16); color:#DCEBFA}
.template pre{margin:0; padding:14px 16px; font-family:var(--mono); font-size:12px; line-height:1.85; color:#D6E6F7; white-space:pre-wrap}
.contact{padding:24px; background:linear-gradient(135deg,#EAF5FF,#F7FAFF 60%,#E3F2FF); border:1px solid #C7E1F8; border-radius:20px; display:grid; grid-template-columns:1fr auto; gap:20px; align-items:center; margin-top:6px}
.contact h3{margin:0 0 5px; font-size:18px}
.contact p{margin:0; font-size:13px; color:var(--muted); line-height:1.8}
.contact img{width:96px; height:96px; border-radius:24px; border:4px solid #fff; transform:rotate(-4deg); box-shadow:0 16px 30px -18px rgba(31,53,86,.5)}
.selfcheck{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:22px}
.selfcheck a{padding:13px; background:#fff; border:1px solid var(--line); border-radius:12px; font-size:12px; color:var(--muted); line-height:1.6; transition:border-color .16s ease, transform .16s ease}
.selfcheck a:hover{border-color:var(--brand-200); transform:translateY(-2px)}
.selfcheck b{display:block; color:var(--ink); font-size:12.5px; margin-bottom:2px}

/* ---------- page nav ---------- */
.page-nav{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:10px}
.page-nav a{display:flex; flex-direction:column; gap:3px; padding:15px 17px; background:#fff; border:1px solid var(--line); border-radius:14px; transition:border-color .16s ease, transform .16s ease}
.page-nav a:hover{border-color:var(--brand-200); transform:translateY(-2px)}
.page-nav span{font-size:10.5px; letter-spacing:.08em; color:var(--muted-2); font-weight:700}
.page-nav b{font-size:13px; color:var(--ink)}
.page-nav .next{text-align:right}

/* ---------- footer ---------- */
.site-footer{margin-top:20px; background:#15263D; color:#E8F1FB}
.footer-in{width:min(1180px,100%); margin:0 auto; padding:44px 24px 28px; display:flex; justify-content:space-between; gap:34px; flex-wrap:wrap}
.footer-brand p{margin:12px 0 0; max-width:340px; font-size:12.5px; color:#9FB4CD; line-height:1.8}
.site-footer .brand-text b{color:#fff}
.site-footer .brand-text small{background:rgba(255,255,255,.1); color:#AEDDFF}
.site-footer .brand-mark{border-color:rgba(255,255,255,.9); box-shadow:none}
.footer-cols{display:flex; gap:52px; flex-wrap:wrap}
.footer-cols div{display:flex; flex-direction:column; gap:8px}
.footer-cols b{font-size:10.5px; letter-spacing:.1em; color:#7E97B6; font-weight:700; text-transform:uppercase}
.footer-cols a{font-size:13px; color:#D6E6F7}
.footer-cols a:hover{color:#8FC7F8}
.footer-bottom{width:min(1180px,100%); margin:0 auto; padding:14px 24px calc(24px + env(safe-area-inset-bottom)); border-top:1px solid rgba(255,255,255,.08); display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; font-size:11.5px; color:#7E97B6}

/* ---------- toast / to top ---------- */
.toast{position:fixed; left:50%; bottom:calc(28px + env(safe-area-inset-bottom)); z-index:90; transform:translate(-50%,14px); background:#1F3556; color:#E8F1FB; font-size:13px; font-weight:600; padding:11px 18px; border-radius:99px; box-shadow:0 18px 36px -18px rgba(31,53,86,.7); opacity:0; pointer-events:none; transition:opacity .2s ease, transform .2s ease; max-width:90vw; text-align:center}
.toast.show{opacity:1; transform:translate(-50%,0)}
.to-top{position:fixed; right:16px; bottom:calc(18px + env(safe-area-inset-bottom)); z-index:60; width:44px; height:44px; border-radius:50%; border:1px solid var(--line); background:rgba(255,255,255,.92); color:var(--brand-700); display:none; place-items:center; box-shadow:0 10px 26px -14px rgba(31,53,86,.5); cursor:pointer; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px)}
@media (max-width:860px){.to-top{display:grid}}
.to-top:active{transform:scale(.96)}
body:has(.prompt-details[open]) .to-top{display:none !important}

/* ---------- responsive ---------- */
@media (max-width:1080px){
  .nav-links a{padding:8px 9px; font-size:13px}
  .doc-layout{grid-template-columns:196px minmax(0,1fr); gap:30px}
  .home-hero .container{gap:30px}
}
@media (max-width:940px){
  .nav-links{display:none}
  .menu{display:block}
  .header-actions .btn-ghost{display:none}
  .home-hero .container{grid-template-columns:1fr; gap:38px}
  .home-art{max-width:520px; margin:0 auto; width:100%; min-height:390px}
  .home-hero{padding:38px 0 42px}
  .home-cards{grid-template-columns:repeat(2,1fr)}
  .home-card.wide{grid-column:span 2}
  .home-steps{grid-template-columns:1fr; gap:10px}
  .doc-layout{grid-template-columns:1fr; gap:0; padding-top:0}
  .sidebar{display:none}
  .judge{grid-template-columns:1fr; gap:16px}
  .judge .j-col{padding:0!important; border:0!important}
}
@media (max-width:680px){
  :root{--nav-h:64px}
  .container{padding:0 18px}
  .page-hero{padding:24px 0 12px}
  .page-hero h1{font-size:clamp(28px,7.4vw,36px)}
  .page-lede{font-size:14px}
  .page-meta{font-size:11.5px; gap:8px}
  .home-hero h1{font-size:clamp(34px,9vw,44px)}
  .home-lede{font-size:14.5px}
  .home-cards{grid-template-columns:1fr}
  .home-card.wide{grid-column:span 1}
  .home-card.help{flex-direction:row; align-items:center}
  .home-card .hc-mascot{width:76px; height:76px; border-radius:18px}
  .home-step{padding:15px}
  .grid-2,.grid-3,.url-grid,.example,.selfcheck,.jb-steps,.place-grid{grid-template-columns:1fr}
  .err-quick{grid-template-columns:1fr}
  .err-toolbar{top:var(--nav-h); margin:0 -18px 14px; padding:8px 18px; border-radius:0; border-left:0; border-right:0; background:rgba(247,250,255,.96)}
  .search-box{min-width:100%; height:40px; font-size:16px}
  .search-box input{font-size:16px}
  .seg{flex:1}
  .seg button{flex:1; justify-content:center; padding:7px 6px}
  .err-count{display:none}
  .jump-row{font-size:11px}
  .err-item{padding:16px}
  .err-head{gap:9px}
  .err-code{font-size:14px; padding:3px 7px}
  .err-title h3{font-size:15px}
  .err-summary{font-size:12px}
  .page-nav{grid-template-columns:1fr}
  .contact{grid-template-columns:1fr; text-align:left}
  .contact img{width:80px; height:80px}
  .footer-in{padding:36px 18px 24px; gap:26px}
  .footer-cols{width:100%; justify-content:space-between; gap:24px}
  .footer-bottom{padding:14px 18px calc(20px + env(safe-area-inset-bottom))}
  .home-search{padding:6px 6px 6px 13px}
  .home-search button{height:44px; padding:0 15px; font-size:16px}
  .home-search input{font-size:16px}
  .home-relay{margin:14px 0 0}
  .home-meta{margin-top:18px}
  .diag{width:min(360px,calc(100% - 16px))}
  .diag.ghost{display:none}
  .home-art{min-height:350px}
  .home-art .mascot{width:88px; height:88px; right:-2px}
  .article{padding:19px 18px}
  .prompt-card{padding:15px}
  .prompt-head .copy-btn{margin-left:0; width:100%; justify-content:center; margin-top:3px}
  .prompt-title{flex:1 1 100%}
  .prompt-details pre{font-size:10.8px; max-height:300px}
  .jb-copyall .btn{width:100%}
  .checklist li{font-size:13px}
  .selfcheck a{padding:12px}
  .code-panel{font-size:11.5px; white-space:pre-wrap; word-break:break-word; overflow-x:hidden}
}
@media (max-width:380px){
  .header-in{gap:12px}
  .brand-text small{display:none}
  .home-quick a{padding:4px 8px}
  .home-card{padding:18px}
  .err-toolbar{padding:8px 14px; margin-left:-18px; margin-right:-18px}
  .page-hero h1{font-size:28px}
}
@media (hover:none){
  .home-card:hover,.url-card:hover,.page-nav a:hover,.selfcheck a:hover{transform:none}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important}
}
