/* 深帧 · 判读台 —— 仪表盘式深色版式，栅格 + 细发丝线 + 等宽读数 */

:root {
  --ink: #06080b;
  --ink-2: #0a0e13;
  --panel: #0e141b;
  --panel-2: #131c25;
  --line: #1d2630;
  --line-2: #2b3a47;
  --txt: #e4ebf2;
  --txt-2: #94a3b2;
  --txt-3: #63717e;
  --amber: #ffb24d;
  --cyan: #3ad8c9;
  --red: #ff6f5e;
  --violet: #9a8cff;
  --ok: #7ee081;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --rad: 3px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(58, 216, 201, .07), transparent 62%),
    radial-gradient(760px 480px at 6% 4%, rgba(255, 178, 77, .06), transparent 60%),
    var(--ink);
  color: var(--txt);
  font: 400 16px/1.78 var(--sans);
  letter-spacing: .01em;
  overflow-x: hidden;
}

.wrap { width: min(1160px, calc(100% - 2rem)); margin-inline: auto; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.3; margin: 0; font-weight: 600; letter-spacing: -.005em; }

p { margin: 0 0 1.05em; color: #cfd9e3; }

ul, ol { margin: 0 0 1.05em; padding-left: 1.2em; color: #cfd9e3; }
li { margin-bottom: .45em; }

strong { color: #fff; font-weight: 600; }

code, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(6, 8, 11, .9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: .9rem; min-height: 54px; }
.mark { display: flex; align-items: center; gap: .55rem; flex: none; color: var(--txt); }
.mark:hover { text-decoration: none; }
.mark svg { width: 24px; height: 24px; flex: none; }
.mark b { font-size: 16px; letter-spacing: .14em; white-space: nowrap; }
.navscroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin-left: auto; }
.navscroll::-webkit-scrollbar { display: none; }
.navscroll ul { display: flex; gap: .3rem; list-style: none; margin: 0; padding: 0; white-space: nowrap; }
.navscroll a {
  display: inline-block; padding: .3rem .6rem; font-size: 12.5px;
  font-family: var(--mono); color: var(--txt-2); border: 1px solid transparent; border-radius: var(--rad);
}
.navscroll a:hover { color: var(--amber); border-color: var(--line-2); text-decoration: none; }

/* ---------- 头图 ---------- */
.hero { padding: 3.2rem 0 2.4rem; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: 2.2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 2.8rem; } }

.kicker {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .26em;
  color: var(--amber); text-transform: uppercase; margin-bottom: 1.1rem;
}
.kicker span { color: var(--txt-3); }

h1 {
  font-size: clamp(30px, 7.4vw, 56px);
  line-height: 1.16; letter-spacing: -.02em; margin-bottom: 1rem;
}
h1 .kw { white-space: nowrap; color: #fff; }
h1 .tail { color: var(--txt-2); font-weight: 400; display: block; font-size: .46em; letter-spacing: .04em; margin-top: .7rem; }

.lede { font-size: clamp(15px, 2.6vw, 17.5px); color: var(--txt-2); max-width: 44ch; }

.statrow { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.stat {
  border: 1px solid var(--line); border-radius: var(--rad); padding: .5rem .75rem;
  background: var(--panel); min-width: 0;
}
.stat b { display: block; font-family: var(--mono); font-size: 18px; color: var(--amber); }
.stat span { font-size: 11.5px; color: var(--txt-3); letter-spacing: .06em; }

.scope { border: 1px solid var(--line); border-radius: var(--rad); background: var(--ink-2); padding: .85rem; }
.scope svg { display: block; width: 100%; height: auto; }
figcaption { font-size: 12.5px; color: var(--txt-3); margin-top: .6rem; font-family: var(--mono); }

/* ---------- 区块 ---------- */
section { padding: 3rem 0; border-bottom: 1px solid var(--line); }
.sechead { margin-bottom: 1.8rem; }
.sechead .num {
  font-family: var(--mono); font-size: 12px; color: var(--amber);
  letter-spacing: .2em; display: block; margin-bottom: .5rem;
}
.sechead h2 { font-size: clamp(21px, 4vw, 29px); }
.sechead p { margin: .8rem 0 0; color: var(--txt-2); max-width: 66ch; }

/* ---------- 工具面板 ---------- */
.tool {
  border: 1px solid var(--line-2); border-radius: var(--rad);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}
.tool-hd {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline;
  padding: .7rem 1rem; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--txt-3);
}
.tool-hd b { color: var(--cyan); letter-spacing: .18em; font-weight: 500; }
.tool-bd { padding: 1.1rem 1rem 1.3rem; }

.fields { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.f { min-width: 0; }
.f > label, .f .lab {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  color: var(--txt-3); text-transform: uppercase; margin-bottom: .32rem;
}
input[type="number"], select {
  width: 100%; min-width: 0; appearance: none;
  background: var(--ink); color: var(--txt);
  border: 1px solid var(--line-2); border-radius: var(--rad);
  padding: .5rem .6rem; font: 500 15px/1.4 var(--mono);
  font-variant-numeric: tabular-nums;
}
select {
  font-family: var(--sans); font-size: 14px; font-weight: 400;
  background-image: linear-gradient(45deg, transparent 50%, var(--txt-3) 50%), linear-gradient(135deg, var(--txt-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  padding-right: 1.9rem;
}
input:focus, select:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: var(--cyan); }

.hint { font-size: 12.5px; color: var(--txt-3); margin: .75rem 0 0; }

.segs { display: flex; flex-wrap: wrap; gap: .35rem; }
.seg {
  font: 500 12.5px/1 var(--mono); color: var(--txt-2); cursor: pointer;
  background: var(--ink); border: 1px solid var(--line-2); border-radius: var(--rad);
  padding: .48rem .62rem;
}
.seg:hover { border-color: var(--txt-3); color: var(--txt); }
.seg[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: #1a1205; }

.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.15rem; }
.btn {
  font: 600 14px/1 var(--sans); cursor: pointer; border-radius: var(--rad);
  padding: .72rem 1.15rem; border: 1px solid var(--cyan); background: var(--cyan); color: #04211e;
}
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--txt-2); border-color: var(--line-2); }
.btn.ghost:hover { color: var(--txt); border-color: var(--txt-3); }
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- 读数区 ---------- */
.readout { margin-top: 1.3rem; border-top: 1px dashed var(--line-2); padding-top: 1.2rem; }
.verdict {
  display: flex; flex-wrap: wrap; align-items: center; gap: .7rem;
  border-left: 3px solid var(--txt-3); padding: .55rem 0 .55rem .85rem; margin-bottom: 1.05rem;
}
.verdict .tag {
  font: 600 12px/1 var(--mono); letter-spacing: .1em; padding: .4rem .55rem;
  border-radius: var(--rad); background: var(--panel-2); border: 1px solid var(--line-2); color: var(--txt);
}
.verdict .say { font-size: 15.5px; color: #fff; font-weight: 600; flex: 1 1 14rem; min-width: 0; }
.v-good { border-left-color: var(--ok); }
.v-good .tag { color: var(--ok); border-color: rgba(126, 224, 129, .4); }
.v-mid { border-left-color: var(--amber); }
.v-mid .tag { color: var(--amber); border-color: rgba(255, 178, 77, .4); }
.v-bad { border-left-color: var(--red); }
.v-bad .tag { color: var(--red); border-color: rgba(255, 111, 94, .4); }

.cells { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--rad); grid-template-columns: repeat(auto-fit, minmax(min(132px, 100%), 1fr)); overflow: hidden; }
.cell { background: var(--ink-2); padding: .7rem .8rem; min-width: 0; }
.cell em { display: block; font-style: normal; font-family: var(--mono); font-size: 10.5px; letter-spacing: .11em; color: var(--txt-3); text-transform: uppercase; }
.cell b { display: block; font-family: var(--mono); font-size: clamp(15.5px, 4.1vw, 19px); color: var(--txt); margin-top: .2rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cell b small { font-size: .62em; color: var(--txt-3); font-weight: 400; white-space: nowrap; }

.whys { list-style: none; margin: 1.1rem 0 0; padding: 0; }
.whys li {
  display: grid; gap: .3rem .65rem; grid-template-columns: auto 1fr;
  padding: .6rem 0; border-top: 1px solid var(--line); font-size: 14.5px; color: #cdd7e1;
}
.whys li:first-child { border-top: 0; }
.whys .k {
  font: 500 10.5px/1.7 var(--mono); letter-spacing: .1em; color: var(--txt-3);
  border: 1px solid var(--line-2); border-radius: var(--rad); padding: 0 .36rem; height: fit-content; white-space: nowrap;
}
.whys .k-spec { color: var(--cyan); border-color: rgba(58, 216, 201, .4); }
.whys .k-emp { color: var(--amber); border-color: rgba(255, 178, 77, .4); }
.whys .k-calc { color: var(--violet); border-color: rgba(154, 140, 255, .4); }
.whys .k-warn { color: var(--red); border-color: rgba(255, 111, 94, .45); }

.bar { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; margin-top: .9rem; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--amber) 48%, var(--ok)); }
.barlabels { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: var(--txt-3); margin-top: .35rem; }

/* ---------- 表格 ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--rad); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 14px; }
caption { text-align: left; font-size: 12.5px; color: var(--txt-3); padding: .7rem .85rem; font-family: var(--mono); border-bottom: 1px solid var(--line); }
th, td { text-align: left; padding: .62rem .85rem; border-top: 1px solid var(--line); vertical-align: top; color: #cdd7e1; }
thead th { background: var(--panel-2); color: var(--txt); font-weight: 600; font-size: 13px; border-top: 0; }
tbody th { font-weight: 500; color: var(--txt-2); white-space: nowrap; font-size: 13px; }
tbody tr:nth-child(2n) td, tbody tr:nth-child(2n) th { background: rgba(255, 255, 255, .013); }

/* ---------- 文章版式 ---------- */
.cols { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 880px) { .cols { grid-template-columns: 1fr 1fr; gap: 2.6rem; } }

.note {
  border: 1px solid var(--line); border-left: 2px solid var(--amber);
  background: var(--panel); border-radius: var(--rad); padding: 1rem 1.1rem; margin: 1.4rem 0;
}
.note h3 { font-size: 15px; color: var(--amber); margin-bottom: .5rem; }
.note p:last-child { margin-bottom: 0; }

.figbox { border: 1px solid var(--line); border-radius: var(--rad); background: var(--ink-2); padding: 1rem; margin: 1.6rem 0; }
.figbox svg { display: block; width: 100%; height: auto; }
.figbox.narrow svg { max-width: 540px; margin-inline: auto; }
.figbox.wide svg { max-width: 680px; margin-inline: auto; }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.card { border: 1px solid var(--line); border-radius: var(--rad); background: var(--panel); padding: 1.05rem 1.1rem; min-width: 0; }
.card h3 { font-size: 15.5px; margin-bottom: .55rem; }
.card h3 i { font-style: normal; font-family: var(--mono); color: var(--amber); font-size: 12px; margin-right: .45rem; }
.card p { font-size: 14px; margin-bottom: 0; color: var(--txt-2); }

.myths { list-style: none; padding: 0; margin: 0; }
.myths li { border-top: 1px solid var(--line); padding: 1.05rem 0; }
.myths li:first-child { border-top: 0; padding-top: 0; }
.myths .wrong { display: block; color: var(--red); font-weight: 600; font-size: 15px; margin-bottom: .4rem; }
.myths .wrong::before { content: "✕"; font-family: var(--mono); margin-right: .45rem; opacity: .75; }
.myths p { margin: 0; font-size: 14.5px; color: var(--txt-2); }

.faq details {
  border: 1px solid var(--line); border-radius: var(--rad); background: var(--panel);
  padding: .85rem 1rem; margin-bottom: .6rem;
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--txt); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; font-family: var(--mono); color: var(--amber); margin-right: .55rem; }
.faq details[open] summary::before { content: "−"; }
.faq details[open] summary { margin-bottom: .7rem; }
.faq p { font-size: 14.5px; margin-bottom: 0; color: var(--txt-2); }

/* ---------- 页脚 ---------- */
footer { padding: 2.6rem 0 3.4rem; }
.foot-top { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot-top { grid-template-columns: 1.4fr 1fr; gap: 2.4rem; } }
footer p { font-size: 13.5px; color: var(--txt-3); }
footer .rule { border: 0; border-top: 1px solid var(--line); margin: 1.8rem 0 1.3rem; }
.policy { font-family: var(--mono); font-size: 12px; color: var(--txt-3); letter-spacing: .03em; }
.policy b { color: var(--amber); font-weight: 500; }

/* ---------- 404 ---------- */
.err { min-height: 76vh; display: flex; align-items: center; padding: 3rem 0; }
.err h1 { font-size: clamp(25px, 5.6vw, 42px); }
.err .code { font-family: var(--mono); font-size: clamp(60px, 18vw, 130px); line-height: .9; color: var(--panel-2); letter-spacing: -.04em; }
.err .code span { color: var(--amber); }
.errlinks { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.6rem; }
.errlinks a {
  font: 500 13.5px/1 var(--mono); padding: .62rem .8rem; border-radius: var(--rad);
  border: 1px solid var(--line-2); color: var(--txt-2);
}
.errlinks a:hover { color: var(--amber); border-color: var(--amber); text-decoration: none; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
