/* Hallmark · custom · paper: cool grey, tinted toward the accent · accent: one wine-berry hue for actions and meters · display: Fraunces 600, body: system · surface: tinted, no absolutes */
/* Hallmark · pre-emit critique: P3 H4 E4 S3 R4 V3 · weakest: S, the page could be any quiz; the result screen and the two-type check carry the product, not decoration */
:root {
  --bg: #f6f5f7;
  --surface: #fdfcfd;
  --ink: #1b171b;
  --muted: #5e5760;
  --line: #e5e0e5;
  --accent: #8c2a4f;
  --accent-ink: #fdf8fa;
  --accent-soft: #f4e6ec;
  --display: "Fraunces", Georgia, serif;
  --radius: 12px;
  --gap: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141114;
    --surface: #1c181c;
    --ink: #efeaee;
    --muted: #aca2aa;
    --line: #322b31;
    --accent: #e48aaa;
    --accent-ink: #1b1219;
    --accent-soft: #34222b;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; overflow-wrap: break-word; min-width: 0; }
h1, .rname, .more h2 { font-family: var(--display); font-weight: 600; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); letter-spacing: -.02em; }
[hidden] { display: none !important; }

.bar, main, .foot { max-width: 680px; margin: 0 auto; padding: 0 var(--gap); }
.bar { padding-top: 14px; padding-bottom: 14px; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }

.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 5vw, 36px); margin: 8px 0 40px; scroll-margin-top: 12px; }
.lede { font-size: 1.1rem; color: var(--muted); margin: 0 0 24px; }
.fine { font-size: .85rem; color: var(--muted); margin: 16px 0 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:hover { filter: brightness(.96); }
.link { background: none; border: 0; padding: 8px 0; color: var(--muted); font: inherit; cursor: pointer; }
.link:hover { color: var(--ink); }
.row { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.row.wrap { flex-wrap: wrap; justify-content: flex-start; margin-top: 24px; }

.progress { display: flex; flex-direction: column; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 20px; }
.track { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
#pBar { height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform .2s; }
#qText { font-size: 1.35rem; outline: none; }
.opts { display: grid; gap: 10px; margin-top: 16px; }
.opt { text-align: left; min-height: 52px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.opt:hover { border-color: var(--accent); }
.opt.on { border-color: var(--accent); background: var(--accent-soft); }

.rname { font-size: clamp(2rem, 6vw, 2.8rem); letter-spacing: -.01em; margin: 0 0 4px; outline: none; }
.rmeta { margin: 0 0 16px; color: var(--muted); }
.why { margin: 0 0 16px; padding-left: 1.2em; }
.check { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; margin: 16px 0; }
.check h3 { font-size: 1.05rem; }
.check p { margin: 0; }
.bars { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: 9.5rem 1fr 3rem; align-items: center; gap: 10px; font-size: .95rem; }
.bars a { color: var(--ink); }
.meter { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); }
.num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.more { margin-bottom: 48px; }
.more h2 { font-size: 1.3rem; margin-top: 32px; }
.types { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.types a { display: block; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.types a:hover { border-color: var(--accent); }
details { border-top: 1px solid var(--line); padding: 12px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; color: var(--muted); }

.foot { padding-bottom: 32px; color: var(--muted); font-size: .85rem; }

/* 类型页 */
.guide { padding-bottom: 32px; }
.guide h1 { font-size: clamp(2.2rem, 6vw, 3rem); margin-top: 8px; }
.guide h2 { font-family: var(--display); font-weight: 600; font-size: 1.35rem; margin-top: 36px; }
.guide p { max-width: 65ch; }
.traits { list-style: none; padding: 0; margin: 8px 0 24px; display: grid; gap: 10px; }
.traits li { display: grid; grid-template-columns: 7.5rem 4.5rem 1fr 4.5rem; align-items: center; gap: 10px; font-size: .9rem; }
.tlabel { font-weight: 600; }
.tend { color: var(--muted); text-align: right; }
.tend.hi { text-align: left; }
.ttrack { position: relative; height: 8px; background: var(--line); border-radius: 8px; }
.ttrack::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--muted); }
.tdot { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); transform: translate(-50%, -50%); }
.facts { margin: 0; display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 6rem 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }
.formulas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 20px; }
.formula h3 { font-size: 1rem; margin-bottom: 6px; }
.formula ul { margin: 0; padding-left: 1.1em; }
.formula li { margin: 4px 0; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 36px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta p { margin: 0; font-weight: 600; }

@media (max-width: 420px) {
  .bars li { grid-template-columns: 7.5rem 1fr 2.6rem; font-size: .9rem; }
  .traits li { grid-template-columns: 1fr 1fr; row-gap: 4px; }
  .traits .tlabel { grid-column: 1 / -1; }
  .traits .ttrack { grid-column: 1 / -1; order: 3; }
  .traits .tend { order: 2; text-align: left; }
  .traits .tend.hi { text-align: right; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
