/* ============================================================
   申论智评 · 纸感批改工作台
   ============================================================ */
:root {
  --paper: #f4efe4;
  --paper-2: #fbf8f0;
  --paper-3: #fffdf7;
  --ink: #20251f;
  --ink-soft: #4c544b;
  --muted: #7d847a;
  --faint: #a7ac9f;
  --line: #ded6c5;
  --line-strong: #c9bfab;
  --green: #265c45;
  --green-2: #2f7357;
  --green-soft: #e7efe8;
  --green-wash: #f0f6f0;
  --red: #a3483a;
  --red-soft: #f7e7e2;
  --amber: #9a6418;
  --amber-soft: #f8efdc;
  --blue: #405f73;
  --serif: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  --shadow-sm: 0 1px 2px rgba(42, 36, 24, .06);
  --shadow-md: 0 12px 34px rgba(52, 43, 28, .09);
  --shadow-lg: 0 28px 70px rgba(52, 43, 28, .13);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  background:
    radial-gradient(1100px 560px at 8% -8%, rgba(47, 115, 87, .085), transparent 62%),
    radial-gradient(900px 520px at 102% 2%, rgba(176, 137, 78, .10), transparent 58%),
    var(--paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(38, 92, 69, .18); }
a { color: var(--green); text-decoration: none; }
button, input, textarea, select { font-family: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.1em; height: 1.1em;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .92em; background: rgba(38, 92, 69, .07); padding: 1px 5px; border-radius: 4px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 28px;
  height: 68px; padding: 0 clamp(18px, 4vw, 48px);
  background: rgba(246, 241, 231, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201, 191, 171, .65);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); margin-right: auto; }
.brand-seal {
  width: 37px; height: 37px; display: grid; place-items: center;
  background: var(--green); color: #fffdf5;
  font-family: var(--serif); font-size: 21px; font-weight: 700;
  border-radius: 5px; transform: rotate(-2deg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 4px 10px rgba(38, 92, 69, .22);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 19px; letter-spacing: .1em; }
.brand-text small { font-size: 10px; color: var(--muted); letter-spacing: .12em; margin-top: 3px; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 7px 12px; border-radius: 7px; font-size: 13.5px;
  color: var(--ink-soft); transition: background .18s, color .18s;
}
.main-nav a:hover { background: rgba(255, 253, 247, .7); color: var(--ink); }
.main-nav a.is-active { color: var(--green); font-weight: 600; background: rgba(38, 92, 69, .07); }
.top-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--muted); white-space: nowrap;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px;
  background: rgba(255, 253, 247, .6);
}
.top-status:hover { border-color: var(--line-strong); color: var(--ink-soft); }
.top-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #b9b1a0; box-shadow: 0 0 0 3px rgba(185, 177, 160, .16); }
.top-status.is-ok .dot { background: var(--green-2); box-shadow: 0 0 0 3px rgba(47, 115, 87, .16); }
.top-status.is-warn .dot { background: #b4832e; box-shadow: 0 0 0 3px rgba(180, 131, 46, .16); }
.top-status.is-bad .dot { background: var(--red); box-shadow: 0 0 0 3px rgba(163, 72, 58, .14); }

/* ---------- 布局 ---------- */
.view { max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 44px) 80px; animation: viewIn .42s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.eyebrow {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 14px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--green-2);
}
.eyebrow-line { width: 26px; height: 1px; background: var(--green-2); display: inline-block; }
.eyebrow span { letter-spacing: .04em; text-transform: none; color: var(--muted); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.3; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }

/* ---------- 首页 ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .72fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center; padding: clamp(48px, 8vw, 88px) 0 clamp(34px, 5vw, 58px);
}
.hero-copy h1 {
  font-size: clamp(38px, 5.4vw, 64px); line-height: 1.16; letter-spacing: -.02em;
  margin: 0 0 22px;
}
.hero-copy h1 em {
  font-style: normal; color: var(--green);
  background: linear-gradient(transparent 64%, rgba(47, 115, 87, .16) 64%);
  padding: 0 4px;
}
.lede { max-width: 600px; color: var(--ink-soft); font-size: 15.5px; line-height: 1.95; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 30px; }
.hero-points div { display: flex; align-items: baseline; gap: 7px; font-size: 13px; color: var(--muted); }
.hero-points b { font-family: var(--serif); font-size: 12px; color: var(--green-2); letter-spacing: .05em; }
.hero-note {
  position: relative; padding: 34px 30px 26px;
  background: linear-gradient(155deg, #fdf8ea, #f6efdf);
  border: 1px solid var(--line); border-radius: 4px;
  box-shadow: var(--shadow-md);
  transform: rotate(1.1deg);
}
.hero-note::before {
  content: ""; position: absolute; top: -9px; left: 44px; width: 58px; height: 18px;
  background: rgba(207, 190, 156, .55); transform: rotate(-3deg);
  border-left: 1px dashed rgba(120, 102, 70, .18); border-right: 1px dashed rgba(120, 102, 70, .18);
}
.quote-mark { font-family: var(--serif); font-size: 55px; line-height: .7; color: rgba(38, 92, 69, .35); height: 30px; }
.hero-note > p { font-family: var(--serif); font-size: 21px; line-height: 1.65; color: #3a4038; }
.hero-note > p strong { color: var(--green); border-bottom: 2px solid rgba(38, 92, 69, .25); }
.hero-note-foot { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.hero-note-foot span { flex: 1; height: 1px; background: rgba(120, 108, 82, .22); }
.hero-note-foot small { font-size: 10.5px; letter-spacing: .08em; color: var(--muted); }

/* ---------- 批改表单 ---------- */
.composer {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  padding: clamp(22px, 3.4vw, 36px);
}
.composer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.composer-top .eyebrow { margin-bottom: 7px; }
.composer-top h2 { font-size: clamp(22px, 2.6vw, 28px); }
.composer-actions { display: flex; align-items: center; gap: 14px; padding-top: 4px; }
.draft-hint {
  margin-top: 16px; padding: 9px 13px; border-radius: 8px;
  background: var(--amber-soft); color: #7b5318; font-size: 12.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.draft-hint button { border: 0; background: none; color: #7b5318; text-decoration: underline; cursor: pointer; font-size: 12px; }

.input-block { padding: 26px 0 20px; border-bottom: 1px dashed var(--line-strong); }
.block-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.step-no {
  width: 38px; height: 30px; display: grid; place-items: center;
  font-family: var(--serif); font-size: 12px; color: var(--green);
  border: 1px solid rgba(38, 92, 69, .3); border-radius: 4px;
  background: rgba(255, 253, 247, .6); letter-spacing: .05em;
}
.block-title h3 { font-size: 19px; margin-top: 1px; }
.block-title p { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 1.6; }
.block-state {
  font-size: 11.5px; padding: 4px 10px; border-radius: 99px;
  color: var(--muted); background: #efe9dc; border: 1px solid transparent;
  white-space: nowrap; margin-top: 3px;
}
.block-state.is-ready { color: var(--green); background: var(--green-soft); }
.block-state.is-working { color: var(--amber); background: var(--amber-soft); }
.block-state.is-error { color: var(--red); background: var(--red-soft); }

.tabs { display: inline-flex; gap: 2px; padding: 3px; margin: 16px 0 12px 56px; background: #ece5d6; border-radius: 8px; }
.tab {
  border: 0; background: transparent; cursor: pointer;
  padding: 5px 14px; border-radius: 6px; font-size: 12.5px; color: var(--muted);
  transition: background .16s, color .16s, box-shadow .16s;
}
.tab:hover { color: var(--ink-soft); }
.tab.active { background: var(--paper-3); color: var(--ink); font-weight: 600; box-shadow: 0 1px 4px rgba(50, 42, 28, .09); }
.tab-panel { margin-left: 56px; }

.prose-input {
  width: 100%; min-height: 158px; resize: vertical;
  padding: 15px 17px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper-3); color: var(--ink);
  font-size: 14.5px; line-height: 1.9;
  transition: border-color .18s, box-shadow .18s, background .18s;
  outline: none;
}
.prose-input::placeholder { color: #a9a596; }
.prose-input:focus { border-color: rgba(38, 92, 69, .55); box-shadow: 0 0 0 3px rgba(38, 92, 69, .09); background: #fffefb; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 142px; padding: 22px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--line-strong); border-radius: 12px;
  background: rgba(255, 253, 247, .55);
  transition: border-color .18s, background .18s, transform .18s;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--green-2); background: var(--green-wash); }
.dropzone.is-drag { transform: scale(1.005); }
.dz-icon { width: 27px; height: 27px; color: var(--green-2); margin-bottom: 7px; }
.dropzone p { font-size: 13.5px; color: var(--ink-soft); }
.dropzone p strong { color: var(--green); }
.dropzone small { margin-top: 4px; font-size: 11.5px; color: var(--faint); }

.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumb {
  position: relative; width: 88px; height: 88px; border-radius: 9px;
  overflow: hidden; border: 1px solid var(--line-strong); background: #eee7d8;
  box-shadow: var(--shadow-sm);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-index {
  position: absolute; left: 5px; bottom: 5px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px;
  display: grid; place-items: center; font-size: 10px; color: #fff;
  background: rgba(24, 31, 26, .68); backdrop-filter: blur(4px);
}
.thumb-x {
  position: absolute; top: 4px; right: 4px; width: 21px; height: 21px;
  border: 0; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: rgba(24, 31, 26, .62); cursor: pointer;
}
.thumb-x:hover { background: var(--red); }
.thumb-x .icon { width: 12px; height: 12px; stroke-width: 2.4; }
.ocr-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.ocr-status { font-size: 12px; color: var(--muted); }
.ocr-status.is-working { color: var(--amber); }
.ocr-status.is-ok { color: var(--green); }
.ocr-status.is-error { color: var(--red); }

.block-foot { display: flex; align-items: center; gap: 14px; margin: 12px 0 0 56px; min-height: 24px; }
.count { font-size: 11.5px; color: var(--faint); letter-spacing: .02em; }
.block-foot .text-btn { margin-left: auto; }
.inline-alert { font-size: 11.5px; color: var(--amber); }
.inline-alert.is-bad { color: var(--red); }

.meta-block {
  margin-top: 26px; padding: 22px 24px; border-radius: 12px;
  background: rgba(236, 229, 214, .55); border: 1px solid rgba(201, 191, 171, .6);
}
.meta-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 15px; }
.meta-head h3 { font-size: 18px; }
.meta-head p { font-size: 12px; color: var(--muted); }
.meta-grid { display: grid; grid-template-columns: 1.2fr .7fr 1.1fr; gap: 12px; margin-top: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field > span, .field-label { font-size: 12px; font-weight: 600; color: var(--ink-soft); display: flex; align-items: baseline; gap: 6px; }
.field > span small { font-weight: 400; color: var(--faint); font-size: 10.5px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  background: var(--paper-3); padding: 9px 11px; font-size: 13.5px;
  outline: none; transition: border-color .18s, box-shadow .18s;
}
.field textarea { resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(38, 92, 69, .55); box-shadow: 0 0 0 3px rgba(38, 92, 69, .08); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 28px; }
.input-suffix i { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; color: var(--muted); }

.submit-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  flex-wrap: wrap; padding-top: 24px;
}
.submit-note { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--faint); max-width: 480px; }
.submit-note .icon { color: var(--green-2); }
.submit-actions { display: flex; align-items: center; gap: 14px; }
.estimate { font-size: 11.5px; color: var(--faint); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 9px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s;
}
.btn .icon { width: 16px; height: 16px; }
.btn.primary { background: var(--green); color: #fffdf6; box-shadow: 0 7px 18px rgba(38, 92, 69, .18); }
.btn.primary:hover { background: #1d4b37; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(38, 92, 69, .23); }
.btn.primary:disabled { background: #8a9a8e; box-shadow: none; transform: none; cursor: not-allowed; }
.btn.ghost { background: rgba(255, 253, 247, .6); border-color: var(--line-strong); color: var(--ink-soft); }
.btn.ghost:hover { background: var(--paper-3); border-color: var(--green-2); color: var(--green); }
.btn.danger { background: transparent; border-color: rgba(163, 72, 58, .4); color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn.small { height: 34px; padding: 0 12px; font-size: 12px; border-radius: 7px; }
.btn.small .icon { width: 14px; height: 14px; }
.btn.wide { width: 100%; }
.btn:focus-visible, .tab:focus-visible, .chip:focus-visible, .text-btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--green-2); outline-offset: 2px; }
.text-btn {
  border: 0; background: none; padding: 2px; cursor: pointer;
  font-size: 12px; color: var(--muted); text-decoration: underline;
  text-decoration-color: rgba(125, 132, 122, .35); text-underline-offset: 3px;
}
.text-btn:hover { color: var(--green); }
.icon-btn { border: 0; background: transparent; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.icon-btn:hover { color: var(--green); }

.home-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 22px; padding: 0 6px; font-size: 12px; color: var(--muted);
}
.home-foot strong { color: var(--ink-soft); }
.home-foot .text-btn { color: var(--green); }

/* ---------- 批改中 ---------- */
.run-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 50px 0; }
.run-card {
  width: min(680px, 100%); text-align: center;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: clamp(30px, 5vw, 52px);
}
.run-visual { position: relative; width: 132px; height: 132px; margin: 0 auto 24px; }
.run-ring { width: 132px; height: 132px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #e8e1d2; stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--green); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; transition: stroke-dashoffset .55s var(--ease); }
.run-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 1px; }
.run-pct b { font-family: var(--serif); font-size: 31px; font-weight: 700; color: var(--green); }
.run-pct span { font-size: 11px; color: var(--muted); margin-top: 8px; }
.run-card > .eyebrow { justify-content: center; margin-bottom: 8px; }
.run-card h1 { font-size: clamp(24px, 3vw, 31px); }
.run-msg { color: var(--muted); font-size: 13.5px; margin: 9px 0 27px; min-height: 22px; }
.run-steps { list-style: none; margin: 0; padding: 0; text-align: left; border-top: 1px dashed var(--line-strong); }
.run-steps li {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px;
  align-items: start; padding: 15px 4px; border-bottom: 1px dashed var(--line);
  opacity: .52; transition: opacity .3s;
}
.run-steps li.is-active, .run-steps li.is-done { opacity: 1; }
.step-dot {
  width: 9px; height: 9px; margin-top: 7px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: transparent;
  transition: background .3s, border-color .3s;
}
.run-steps li.is-active .step-dot { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 4px rgba(38, 92, 69, .12); animation: pulse 1.8s infinite; }
.run-steps li.is-done .step-dot { border-color: var(--green); background: var(--green); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(38, 92, 69, .10); } 50% { box-shadow: 0 0 0 8px rgba(38, 92, 69, .03); } }
.run-steps b { font-size: 13.5px; font-weight: 600; display: block; }
.run-steps small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.step-state { font-size: 10.5px; color: var(--faint); padding-top: 3px; white-space: nowrap; }
.run-steps li.is-active .step-state { color: var(--green); }
.run-steps li.is-done .step-state { color: var(--green); }
.run-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; }
.run-elapsed { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.run-elapsed b { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.run-error {
  margin-top: 22px; padding: 15px 17px; text-align: left;
  border: 1px solid rgba(163, 72, 58, .3); background: var(--red-soft);
  border-radius: 10px; color: #7b342a; font-size: 12.5px;
}
.run-error b { display: block; margin-bottom: 4px; }
.run-error-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.run-error pre { white-space: pre-wrap; word-break: break-word; font-size: 11px; margin: 8px 0 0; opacity: .8; }

/* ---------- 结果 ---------- */
.result-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; flex-wrap: wrap; padding: clamp(34px, 5vw, 54px) 0 20px; }
.result-title h1 { font-size: clamp(25px, 3.4vw, 37px); margin: 2px 0 8px; }
.result-sub { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.result-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.demo-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--amber); background: var(--amber-soft); border: 1px solid rgba(154, 100, 24, .2); padding: 2px 8px; border-radius: 99px; }

.score-panel {
  display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: center;
  padding: clamp(22px, 3.5vw, 32px); border-radius: 16px;
  background: linear-gradient(140deg, #fbf8ee, #f4eee0);
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.score-ring {
  --pct: 0; width: 150px; height: 150px; border-radius: 50%; margin: 0 auto;
  background: conic-gradient(var(--green) calc(var(--pct) * 1%), #e5ddcc 0);
  display: grid; place-items: center; position: relative;
  transition: background .6s;
}
.score-ring::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); }
.score-ring > div {
  width: 116px; height: 116px; border-radius: 50%; background: var(--paper-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(201, 191, 171, .25);
}
.score-ring b { font-family: var(--serif); font-size: 35px; line-height: 1; color: var(--green); }
.score-ring span { font-size: 11px; color: var(--muted); margin-top: 5px; }
.score-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.score-line h2 { font-size: clamp(20px, 2.5vw, 26px); }
.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 99px; }
.status-pill.hit { color: var(--green); background: var(--green-soft); }
.status-pill.partial { color: var(--amber); background: var(--amber-soft); }
.status-pill.miss { color: var(--red); background: var(--red-soft); }
.score-stats { display: flex; flex-wrap: wrap; gap: 20px 34px; margin-top: 16px; }
.score-stats div { display: flex; align-items: baseline; gap: 6px; }
.score-stats b { font-family: var(--serif); font-size: 22px; color: var(--ink); }
.score-stats span { font-size: 11.5px; color: var(--muted); }
.score-note { margin-top: 15px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.75; max-width: 720px; }

.stat-strip {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px;
  margin: 16px 0; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.stat-strip > div { background: rgba(251, 248, 240, .92); padding: 13px 15px; }
.stat-strip b { display: block; font-family: var(--serif); font-size: 18px; line-height: 1.3; }
.stat-strip span { font-size: 10.5px; color: var(--muted); }
.stat-strip b.is-bad { color: var(--red); }
.stat-strip b.is-ok { color: var(--green); }

.warn-banner {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 15px; margin: 14px 0; border-radius: 9px;
  background: var(--amber-soft); border: 1px solid rgba(154, 100, 24, .22);
  color: #74501a; font-size: 12px; line-height: 1.65;
}
.warn-banner .icon { color: var(--amber); margin-top: 2px; }
.warn-banner ul { margin: 0; padding-left: 16px; }

.result-tabs {
  display: flex; gap: 4px; margin: 26px 0 22px; padding-bottom: 0;
  border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none;
}
.result-tabs::-webkit-scrollbar { display: none; }
.result-tab {
  position: relative; border: 0; background: none; cursor: pointer; white-space: nowrap;
  padding: 10px 14px 12px; font-size: 13px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.result-tab:hover { color: var(--ink); }
.result-tab.is-active { color: var(--green); font-weight: 600; border-bottom-color: var(--green); }
.result-tab .badge { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px; margin-left: 5px; border-radius: 99px; background: #e9e2d4; color: var(--muted); font-size: 10px; font-weight: 600; }
.result-tab.is-active .badge { background: var(--green-soft); color: var(--green); }

.report-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 13px;
  padding: clamp(18px, 2.6vw, 26px); box-shadow: var(--shadow-sm);
}
.report-card + .report-card { margin-top: 15px; }
.report-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.report-card-head .icon { color: var(--green-2); width: 18px; height: 18px; }
.report-card-head h2 { font-size: 18px; }
.report-card-head .hint { margin-left: auto; font-size: 11px; color: var(--faint); }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.overview-grid .report-card { margin-top: 0; }
.overview-grid .span-2 { grid-column: 1 / -1; }
.summary-quote { font-family: var(--serif); font-size: 16.5px; line-height: 1.85; color: #343b34; border-left: 3px solid rgba(38, 92, 69, .4); padding-left: 17px; }

.report-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.report-list li { display: grid; grid-template-columns: 17px minmax(0, 1fr); gap: 9px; align-items: start; font-size: 13px; line-height: 1.75; }
.report-list li .icon { margin-top: 3px; width: 15px; height: 15px; }
.report-list li b { font-weight: 600; }
.report-list .strength .icon { color: var(--green-2); }
.report-list .weakness .icon { color: var(--red); }
.report-list .quote { display: block; margin-top: 5px; padding: 6px 9px; border-left: 2px solid var(--line-strong); background: rgba(255, 253, 247, .65); color: var(--ink-soft); font-size: 12px; }
.severity { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 4px; margin-right: 5px; vertical-align: 1px; }
.severity.high { color: var(--red); background: var(--red-soft); }
.severity.medium { color: var(--amber); background: var(--amber-soft); }
.severity.low { color: var(--blue); background: #e8eef1; }

.priority-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.priority-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.priority-no { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-family: var(--serif); font-size: 12px; }
.priority-item h3 { font-size: 14.5px; font-family: var(--sans); font-weight: 600; }
.priority-item p { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.priority-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.priority-meta b { color: var(--ink-soft); font-weight: 600; }

.next-steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.next-steps li { counter-increment: step; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 9px; font-size: 13px; line-height: 1.7; }
.next-steps li::before { content: counter(step); font-family: var(--serif); font-size: 11px; color: var(--green); border: 1px solid rgba(38, 92, 69, .3); width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; margin-top: 2px; }

.dimension-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.dimension { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 253, 247, .65); }
.dimension-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.dimension-head b { font-family: var(--serif); font-size: 18px; }
.dimension-head span { font-size: 10.5px; color: var(--muted); }
.dimension-bar { height: 4px; border-radius: 99px; background: #e6dfd0; margin: 8px 0 7px; overflow: hidden; }
.dimension-bar i { display: block; height: 100%; background: var(--green-2); border-radius: inherit; }
.dimension p { font-size: 11px; color: var(--muted); line-height: 1.6; }
.dimension-score { font-size: 10px; color: var(--faint); }

/* 得分点 */
.filter-bar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  border: 1px solid var(--line); background: rgba(255, 253, 247, .55);
  border-radius: 99px; padding: 5px 12px; font-size: 11.5px; color: var(--ink-soft);
  cursor: pointer; transition: background .16s, border-color .16s, color .16s;
}
.chip:hover { border-color: var(--line-strong); background: var(--paper-3); }
.chip.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.chip .n { margin-left: 4px; opacity: .65; font-size: 10px; }
.point-card {
  position: relative; background: var(--paper-2); border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong); border-radius: 11px;
  padding: 16px 18px; margin-bottom: 11px; transition: box-shadow .18s, transform .18s;
}
.point-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.point-card.hit { border-left-color: var(--green-2); }
.point-card.partial { border-left-color: #c08a35; }
.point-card.miss { border-left-color: var(--red); }
.point-head { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.point-index { font-family: var(--serif); font-size: 13px; color: var(--faint); padding-top: 3px; letter-spacing: .04em; }
.point-title h3 { font-family: var(--sans); font-size: 14.5px; font-weight: 600; line-height: 1.55; }
.point-kw { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.kw { font-size: 10px; color: var(--muted); background: #eee8da; padding: 1px 7px; border-radius: 99px; }
.point-score { text-align: right; white-space: nowrap; }
.point-score b { font-family: var(--serif); font-size: 21px; color: var(--ink); }
.point-score span { font-size: 10.5px; color: var(--faint); }
.point-score .status-pill { margin-top: 4px; font-size: 9.5px; padding: 2px 7px; }
.point-reason { margin: 10px 0 0 44px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.75; }
.point-quote { margin: 9px 0 0 44px; padding: 8px 11px; border-left: 2px solid var(--line-strong); background: rgba(255, 253, 247, .6); font-size: 12px; color: var(--ink-soft); line-height: 1.7; }
.point-quote b { font-weight: 600; color: var(--ink); }
.point-source { margin: 9px 0 0 44px; font-size: 11.5px; color: var(--muted); }
.point-source summary { cursor: pointer; color: var(--green-2); font-size: 11.5px; }
.point-source p { margin-top: 5px; padding: 8px 10px; background: rgba(231, 239, 232, .5); border-radius: 6px; line-height: 1.7; }
.extra-points { margin-top: 18px; }
.extra-points h3 { font-size: 14px; margin-bottom: 8px; }
.extra-points ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.8; }

/* 材料溯源 */
.trace-intro { font-size: 12.5px; color: var(--muted); margin-bottom: 15px; line-height: 1.8; }
.trace-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 12px; }
.trace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.trace-head h3 { font-family: var(--sans); font-size: 14.5px; font-weight: 600; }
.trace-head .trace-no { font-family: var(--serif); color: var(--faint); font-size: 12px; margin-right: 7px; }
.confidence { font-size: 9.5px; padding: 2px 7px; border-radius: 99px; white-space: nowrap; }
.confidence.high { color: var(--green); background: var(--green-soft); }
.confidence.medium { color: var(--amber); background: var(--amber-soft); }
.confidence.low { color: var(--red); background: var(--red-soft); }
.trace-derivation { margin-top: 9px; font-size: 12.5px; line-height: 1.8; color: var(--ink-soft); }
.trace-quotes { margin-top: 11px; display: flex; flex-direction: column; gap: 8px; }
.trace-quote { position: relative; padding: 9px 12px 9px 38px; background: rgba(255, 253, 247, .72); border: 1px solid rgba(222, 214, 197, .8); border-radius: 7px; font-size: 12px; line-height: 1.75; }
.trace-quote::before { content: "“"; position: absolute; left: 12px; top: 5px; font-family: var(--serif); font-size: 23px; color: rgba(38, 92, 69, .28); }
.para-tag { display: inline-block; font-size: 9.5px; color: var(--green); background: var(--green-soft); border-radius: 3px; padding: 0 5px; margin-right: 5px; vertical-align: 1px; }
.verified { display: inline-flex; align-items: center; gap: 3px; font-size: 9.5px; color: var(--green-2); margin-left: 6px; }
.verified .icon { width: 11px; height: 11px; }
.unverified { color: var(--amber); font-size: 9.5px; margin-left: 6px; }
.trace-empty { margin-top: 9px; padding: 9px 12px; border-radius: 7px; background: var(--amber-soft); color: #74501a; font-size: 11.5px; }

/* 表达升级 */
.rewrite-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 12px; }
.rewrite-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rewrite-head h3 { font-family: var(--sans); font-size: 13.5px; font-weight: 600; }
.rewrite-head .icon { color: var(--green-2); width: 16px; height: 16px; }
.rewrite-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rewrite-side { padding: 11px 13px; border-radius: 8px; font-size: 12.5px; line-height: 1.8; }
.rewrite-side small { display: block; font-size: 9.5px; letter-spacing: .08em; margin-bottom: 4px; text-transform: uppercase; }
.rewrite-old { background: rgba(163, 72, 58, .055); border: 1px solid rgba(163, 72, 58, .14); color: #704b44; }
.rewrite-old small { color: var(--red); }
.rewrite-new { background: var(--green-wash); border: 1px solid rgba(38, 92, 69, .16); color: #2f4c3b; }
.rewrite-new small { color: var(--green); }
.rewrite-why { margin-top: 10px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.rewrite-why b { color: var(--ink-soft); }

/* ---------- 历史 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: clamp(38px, 6vw, 64px) 0 28px; }
.page-head h1 { font-size: clamp(27px, 3.6vw, 40px); margin: 2px 0 10px; }
.page-sub { font-size: 13px; color: var(--muted); max-width: 610px; line-height: 1.8; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-box { position: relative; }
.search-box .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); }
.search-box input { height: 36px; width: 210px; padding: 0 12px 0 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-3); font-size: 12.5px; outline: none; }
.search-box input:focus { border-color: rgba(38, 92, 69, .5); box-shadow: 0 0 0 3px rgba(38, 92, 69, .07); }
.history-list { display: flex; flex-direction: column; gap: 9px; }
.history-row {
  display: grid; grid-template-columns: 78px minmax(0, 1fr) 120px 34px; gap: 16px; align-items: center;
  padding: 15px 18px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 11px;
  cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .18s;
}
.history-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.history-date { font-size: 10.5px; color: var(--faint); line-height: 1.5; }
.history-date b { display: block; font-family: var(--serif); font-size: 19px; color: var(--ink-soft); font-weight: 700; }
.history-main { min-width: 0; }
.history-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 5px; font-size: 10.5px; color: var(--muted); }
.type-badge { color: var(--green); background: var(--green-soft); padding: 1px 6px; border-radius: 4px; font-size: 9.5px; }
.history-score { text-align: right; }
.history-score b { font-family: var(--serif); font-size: 20px; }
.history-score span { font-size: 10px; color: var(--faint); }
.rate-bar { height: 3px; background: #e7e0d1; border-radius: 99px; margin-top: 5px; overflow: hidden; }
.rate-bar i { display: block; height: 100%; background: var(--green-2); border-radius: inherit; }
.history-del { width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--faint); cursor: pointer; display: grid; place-items: center; }
.history-del:hover { background: var(--red-soft); color: var(--red); }
.empty-state { text-align: center; padding: 70px 20px; border: 1px dashed var(--line-strong); border-radius: 14px; background: rgba(251, 248, 240, .5); }
.empty-icon { width: 54px; height: 54px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-family: var(--serif); font-size: 21px; }
.empty-state h3 { font-size: 19px; margin-bottom: 6px; }
.empty-state p { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }

/* ---------- 设置 ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.panel { background: var(--paper-2); border: 1px solid var(--line); border-radius: 13px; padding: clamp(18px, 2.6vw, 25px); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.panel-head h2 { display: flex; align-items: center; gap: 8px; font-size: 19px; }
.panel-head h2 .icon { width: 18px; height: 18px; color: var(--green-2); }
.panel-head p { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.65; max-width: 430px; }
.config-state { font-size: 10px; color: var(--faint); background: #eee8da; border-radius: 99px; padding: 3px 8px; white-space: nowrap; }
.config-state.is-ok { color: var(--green); background: var(--green-soft); }
.config-state.is-warn { color: var(--amber); background: var(--amber-soft); }
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.field-row { display: flex; align-items: flex-end; gap: 10px; margin-top: 12px; }
.field-row .field { flex: 1; }
.key-input { position: relative; }
.key-input input { padding-right: 38px; }
.key-input .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 6px; }
.key-input .icon-btn:hover { background: var(--green-soft); }
.panel-note { margin-top: 12px; font-size: 11.5px; padding: 8px 10px; border-radius: 7px; background: var(--green-wash); color: var(--green); line-height: 1.6; }
.panel-note.is-error { background: var(--red-soft); color: #7b342a; }
.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 17px; padding-top: 14px; border-top: 1px dashed var(--line); }
.panel-foot .muted { font-size: 10.5px; line-height: 1.6; max-width: 380px; }
.panel .field + .field { margin-top: 12px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 2px; }
.radio-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); cursor: pointer; }
.radio-row input { accent-color: var(--green); }
.radio-row input[type="radio"], .radio-row input[type="checkbox"] {
  width: auto; height: auto; flex: 0 0 auto; margin: 0; padding: 0;
}
.radio-row label span { white-space: nowrap; }
.ocr-local-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 253, 247, .55); }
.ocr-local-box b { font-size: 12.5px; }
.ocr-local-box p { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.6; }
.ocr-badge { font-size: 10px; padding: 3px 8px; border-radius: 99px; background: #eee8da; color: var(--faint); white-space: nowrap; }
.ocr-badge.is-ok { background: var(--green-soft); color: var(--green); }
.ocr-badge.is-bad { background: var(--red-soft); color: var(--red); }
.data-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.data-row code { font-size: 10.5px; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.data-row b { font-family: var(--serif); font-size: 18px; color: var(--ink); }
.about-list { margin: 0; padding-left: 17px; font-size: 11.5px; color: var(--ink-soft); line-height: 1.8; display: flex; flex-direction: column; gap: 7px; }
.version-line { margin-top: 15px; font-size: 10px; color: var(--faint); letter-spacing: .03em; }

/* ---------- 使用说明 ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.guide-step { position: relative; padding: 21px 18px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; }
.guide-step > span { font-family: var(--serif); font-size: 12px; color: var(--green-2); border: 1px solid rgba(38, 92, 69, .28); padding: 2px 7px; border-radius: 4px; }
.guide-step h3 { font-size: 17px; margin: 12px 0 7px; }
.guide-step p { font-size: 11.5px; color: var(--ink-soft); line-height: 1.8; }
.guide-step a { display: inline-block; margin-top: 10px; font-size: 11px; }
.guide-faq { margin-top: 30px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 13px; padding: clamp(18px, 3vw, 28px); }
.guide-faq h2 { font-size: 22px; margin-bottom: 10px; }
.guide-faq details { border-bottom: 1px dashed var(--line); padding: 12px 2px; }
.guide-faq details:last-child { border-bottom: 0; }
.guide-faq summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-soft); list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary::after { content: "+"; font-family: var(--serif); font-size: 19px; color: var(--green-2); font-weight: 400; }
.guide-faq details[open] summary::after { content: "−"; }
.guide-faq details p { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.85; max-width: 900px; }
.guide-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 18px; padding: 22px 25px; border-radius: 13px; background: var(--green); color: #f8f5ea; }
.guide-cta h3 { font-size: 20px; }
.guide-cta p { font-size: 11.5px; opacity: .72; margin-top: 3px; }
.guide-cta .btn.primary { background: #f8f5ea; color: var(--green); box-shadow: none; }
.guide-cta .btn.primary:hover { background: #fffdf6; }

/* ---------- 页脚 ---------- */
.site-foot { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 22px 20px 30px; font-size: 10.5px; color: var(--faint); border-top: 1px solid rgba(201, 191, 171, .5); }
.site-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.foot-sep { opacity: .5; }

/* ---------- Toast / Modal ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 18px);
  z-index: 80; padding: 10px 16px; border-radius: 8px;
  background: #25322a; color: #fbf8ef; font-size: 12.5px;
  box-shadow: 0 12px 32px rgba(20, 27, 22, .24);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  max-width: min(560px, calc(100vw - 40px)); text-align: center; line-height: 1.6;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: #7b342a; }
.modal-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(28, 34, 28, .45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; }
.modal { position: relative; width: min(520px, 100%); max-height: 86vh; overflow-y: auto; background: var(--paper-2); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-lg); padding: 26px 26px 20px; animation: modalIn .22s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal h2 { font-size: 22px; padding-right: 30px; }
.modal-body { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.8; }
.modal-body p + p { margin-top: 8px; }
.modal-body ul { margin: 8px 0; padding-left: 18px; }
.modal-close { position: absolute; right: 14px; top: 14px; width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.modal-close:hover { background: #ece5d6; color: var(--ink); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; margin-top: 20px; }

/* ---------- 打印 ---------- */
.print-area { display: none; }
@media print {
  @page { size: A4; margin: 14mm 15mm; }
  body { background: #fff; color: #1b1b1b; font-size: 10.5pt; }
  .topbar, .view, .site-foot, .toast, .modal-backdrop { display: none !important; }
  .print-area { display: block !important; }
  .print-head { border-bottom: 1.5pt solid #265c45; padding-bottom: 8pt; margin-bottom: 12pt; }
  .print-head .print-brand { font-family: var(--serif); font-size: 10pt; letter-spacing: .18em; color: #265c45; }
  .print-head h1 { font-family: var(--serif); font-size: 20pt; margin: 5pt 0 3pt; }
  .print-meta { font-size: 8.5pt; color: #666; }
  .print-score { display: flex; gap: 18pt; align-items: baseline; margin: 10pt 0 6pt; }
  .print-score b { font-family: var(--serif); font-size: 28pt; color: #265c45; }
  .print-section { margin-top: 13pt; page-break-inside: avoid; }
  .print-section h2 { font-family: var(--serif); font-size: 13pt; border-left: 3pt solid #265c45; padding-left: 7pt; margin: 0 0 6pt; }
  .print-point { border: .5pt solid #d8d0bf; border-left: 2.5pt solid #999; padding: 6pt 8pt; margin-bottom: 6pt; page-break-inside: avoid; }
  .print-point.hit { border-left-color: #2f7357; }
  .print-point.partial { border-left-color: #b4832e; }
  .print-point.miss { border-left-color: #a3483a; }
  .print-point-head { display: flex; justify-content: space-between; gap: 12pt; font-size: 10pt; font-weight: 600; }
  .print-point p { font-size: 9pt; color: #444; margin-top: 3pt; }
  .print-quote { font-size: 8.5pt; color: #555; background: #f7f4ec; padding: 4pt 6pt; margin-top: 3pt; border-left: 1.5pt solid #ccc; }
  .print-list { margin: 0; padding-left: 14pt; font-size: 9pt; color: #333; }
  .print-list li { margin-bottom: 3pt; }
  .print-footer { margin-top: 16pt; border-top: .5pt solid #ccc; padding-top: 6pt; font-size: 7.5pt; color: #888; display: flex; justify-content: space-between; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 34px; }
  .hero-note { max-width: 430px; transform: rotate(.8deg); }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-grid { grid-template-columns: 1fr 1fr; }
  .stat-strip { grid-template-columns: repeat(3, 1fr); }
  .dimension-grid { grid-template-columns: repeat(3, 1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .score-panel { grid-template-columns: 140px minmax(0, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .topbar { height: 60px; gap: 10px; }
  .brand-text small { display: none; }
  .main-nav { gap: 0; }
  .main-nav a { padding: 6px 8px; font-size: 12px; }
  .top-status { display: none; }
  .hero { padding-top: 38px; }
  .hero-copy h1 { font-size: clamp(34px, 9vw, 46px); }
  .hero-points { gap: 7px 16px; }
  .composer { padding: 18px; border-radius: 14px; }
  .composer-top { flex-direction: column; }
  .composer-actions { padding-top: 0; }
  .input-block { padding: 22px 0 17px; }
  .block-head { grid-template-columns: 36px minmax(0, 1fr); }
  .step-no { width: 32px; height: 27px; }
  .block-state { grid-column: 2; justify-self: start; margin-top: -2px; }
  .tabs, .tab-panel, .block-foot { margin-left: 0; }
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .meta-grid .field:last-child { grid-column: 1 / -1; }
  .submit-bar { align-items: stretch; }
  .submit-actions { justify-content: space-between; }
  .submit-actions .btn { flex: 1; }
  .score-panel { grid-template-columns: 1fr; text-align: center; }
  .score-ring { width: 132px; height: 132px; }
  .score-ring > div { width: 102px; height: 102px; }
  .score-stats { justify-content: center; }
  .score-line { justify-content: center; }
  .result-head { align-items: flex-start; }
  .result-actions { width: 100%; }
  .result-actions .btn { flex: 1; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .dimension-grid { grid-template-columns: 1fr 1fr; }
  .rewrite-grid { grid-template-columns: 1fr; }
  .history-row { grid-template-columns: 62px minmax(0, 1fr) 34px; gap: 10px; }
  .history-score { grid-column: 2; text-align: left; display: flex; align-items: center; gap: 9px; }
  .history-score .rate-bar { flex: 1; margin: 0; }
  .history-del { grid-column: 3; grid-row: 1; }
  .history-date { grid-row: 1 / span 2; }
  .history-main { grid-column: 2; }
  .history-meta { font-size: 10px; }
  .page-actions { width: 100%; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-cta { align-items: flex-start; }
  .score-stats { gap: 12px 20px; }
  .result-tabs { margin-top: 18px; }
  .run-card { padding: 26px 18px; }
  .run-steps li { grid-template-columns: 16px minmax(0, 1fr); }
  .step-state { display: none; }
  .modal { padding: 22px 18px 16px; }
  .site-foot { font-size: 9.5px; }
}
@media (max-width: 460px) {
  .hero-note { padding: 28px 22px 22px; }
  .hero-note > p { font-size: 18px; }
  .meta-grid { grid-template-columns: 1fr; }
  .meta-grid .field:last-child { grid-column: auto; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .result-tab { padding: 9px 10px 11px; font-size: 12px; }
  .score-stats b { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 报告内的补充区块（动态渲染） ---------- */
.req-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.req-row .kw { font-size: 10.5px; padding: 2px 8px; }

.material-details {
  margin: 0 0 16px; padding: 12px 15px;
  background: rgba(255, 253, 247, .62); border: 1px solid var(--line);
  border-radius: 10px;
}
.material-details summary {
  cursor: pointer; font-size: 12.5px; color: var(--green-2);
  font-weight: 600; list-style: none; display: flex; align-items: center; gap: 7px;
}
.material-details summary::-webkit-details-marker { display: none; }
.material-details summary::before {
  content: "＋"; font-family: var(--sans); font-size: 13px; color: var(--faint);
  width: 16px; display: inline-block; transition: transform .16s;
}
.material-details[open] summary::before { content: "－"; }
.material-text {
  margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--line);
  max-height: 380px; overflow: auto; white-space: pre-wrap;
  font-size: 12.5px; line-height: 1.95; color: var(--ink-soft);
}

.diagnosis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.diagnosis-item {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px;
  background: rgba(255, 253, 247, .65);
}
.diagnosis-item b {
  display: block; font-family: var(--serif); font-size: 13px; color: var(--green);
  margin-bottom: 5px;
}
.diagnosis-item p { font-size: 12px; color: var(--ink-soft); line-height: 1.75; }

.modal pre {
  margin-top: 8px; padding: 10px 12px; max-height: 240px; overflow: auto;
  background: #f1ebde; border: 1px solid var(--line); border-radius: 7px;
  font-family: "Cascadia Mono", Consolas, monospace; font-size: 10.5px;
  line-height: 1.6; color: #655c4e; white-space: pre-wrap; word-break: break-word;
}

.print-score span { font-size: 11px; color: var(--muted); margin-left: 8px; }

@media (max-width: 760px) {
  .diagnosis-grid { grid-template-columns: 1fr; }
  .material-text { max-height: 280px; }
}

/* ============================================================
   开场页 · 学习档案 · 多端适配
   ============================================================ */
.btn.large { padding: 12px 21px; font-size: 14px; border-radius: 9px; }
.btn.large .icon { width: 16px; height: 16px; }

.welcome-view { padding-top: clamp(26px, 4vw, 54px); }
.welcome-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(370px, .9fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
  min-height: 520px;
  padding: 10px 0 44px;
}
.welcome-copy h1 {
  font-size: clamp(42px, 4.9vw, 60px);
  line-height: 1.16;
  letter-spacing: -.025em;
  margin: 0;
  text-wrap: balance;
}
.welcome-copy h1 em {
  font-style: normal;
  color: var(--green);
  background: linear-gradient(transparent 64%, rgba(47, 115, 87, .14) 64%);
  padding: 0 .04em;
}
.welcome-lede {
  max-width: 540px;
  margin-top: 23px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.95;
}
.welcome-actions { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin-top: 29px; }
.welcome-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 17px; font-size: 11px; color: var(--muted);
}
.mini-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-2); box-shadow: 0 0 0 4px rgba(47, 115, 87, .1);
}
.welcome-art { position: relative; min-height: 470px; }
.art-sheet {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%) rotate(-1.6deg);
  width: min(355px, 88%); padding: 20px;
  background: var(--paper-3); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg);
}
.art-sheet-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.art-sheet-head span { font-family: var(--serif); font-size: 17px; font-weight: 700; }
.art-sheet-head i { font-style: normal; font-size: 9px; letter-spacing: .12em; color: var(--amber); background: var(--amber-soft); padding: 2px 6px; border-radius: 4px; }
.art-score-row { display: flex; align-items: center; gap: 14px; padding: 15px 0 13px; }
.art-ring {
  width: 88px; height: 88px; flex: none; display: grid; place-items: center; align-content: center;
  border-radius: 50%; border: 8px solid #e5ddcd; border-top-color: var(--green-2);
  border-right-color: var(--green-2); transform: rotate(-20deg);
  background: #fbf8f0;
}
.art-ring b, .art-ring small { transform: rotate(20deg); display: block; line-height: 1.1; }
.art-ring b { font-family: var(--serif); font-size: 26px; color: var(--green); }
.art-ring small { font-size: 9px; color: var(--faint); margin-top: 2px; }
.art-score-row strong { display: block; font-family: var(--serif); font-size: 18px; }
.art-score-row p { margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.art-points { display: flex; flex-direction: column; gap: 9px; padding-top: 4px; }
.art-points div { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 7px; font-size: 11px; }
.art-points b { font-weight: 500; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-points em { font-style: normal; font-size: 10px; color: var(--faint); }
.art-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-2); }
.art-dot.partial { background: #b4832e; }
.art-dot.miss { background: var(--red); }
.art-sheet-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 15px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 9.5px; color: var(--faint); }
.art-note {
  position: absolute; right: -1%; bottom: 67px; width: min(235px, 48%);
  padding: 13px 15px; background: var(--paper-2); border: 1px solid var(--line);
  border-left: 3px solid var(--amber); border-radius: 7px; box-shadow: var(--shadow-md);
  transform: rotate(1.8deg);
}
.art-note span { font-size: 9px; letter-spacing: .08em; color: var(--amber); }
.art-note p { margin-top: 5px; font-family: var(--serif); font-size: 12px; line-height: 1.7; color: var(--ink-soft); }
.art-note small { display: inline-block; margin-top: 7px; font-size: 9px; color: var(--green-2); border: 1px solid rgba(47, 115, 87, .25); border-radius: 99px; padding: 1px 6px; }
.art-trend {
  position: absolute; left: -1%; bottom: 12px; width: min(215px, 46%);
  padding: 12px 14px 8px; background: var(--paper-3); border: 1px solid var(--line);
  border-radius: 9px; box-shadow: var(--shadow-md); transform: rotate(-1.2deg);
}
.art-trend > span { font-size: 9.5px; color: var(--muted); letter-spacing: .08em; }
.art-trend svg { width: 100%; height: 58px; margin-top: 2px; color: var(--green-2); }
.art-trend b { position: absolute; right: 12px; top: 10px; font-family: var(--serif); font-size: 13px; color: var(--green); }
.welcome-strip {
  display: flex; align-items: center; justify-content: center; gap: clamp(9px, 2vw, 22px);
  padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 10.5px; letter-spacing: .14em; color: var(--muted);
}
.welcome-strip i { width: 20px; height: 1px; background: var(--line-strong); }
.welcome-section { margin-top: clamp(48px, 7vw, 82px); }
.welcome-section-head { max-width: 720px; }
.welcome-section-head h2 { font-size: clamp(27px, 3.8vw, 40px); line-height: 1.35; margin: 2px 0 12px; }
.welcome-section-head > p:last-child { color: var(--muted); font-size: 13px; line-height: 1.9; max-width: 590px; }
.welcome-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 27px; }
.welcome-features article {
  padding: 21px 18px; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 11px; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.welcome-features article:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.welcome-features article > span { font-family: var(--serif); font-size: 11px; color: var(--green-2); letter-spacing: .05em; }
.welcome-features h3 { font-size: 17px; margin: 9px 0 7px; }
.welcome-features p { font-size: 11.5px; line-height: 1.8; color: var(--muted); }
.welcome-flow { border-top: 1px solid var(--line); padding-top: clamp(32px, 5vw, 48px); }
.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 25px; }
.flow-grid article { position: relative; padding: 4px 18px 4px 0; border-right: 1px dashed var(--line); }
.flow-grid article:last-child { border-right: 0; }
.flow-grid b { font-family: var(--serif); font-size: 12px; color: var(--green-2); border: 1px solid rgba(38, 92, 69, .25); border-radius: 4px; padding: 2px 7px; }
.flow-grid h3 { font-size: 18px; margin: 12px 0 7px; }
.flow-grid p { font-size: 11.5px; color: var(--muted); line-height: 1.8; max-width: 260px; }
.welcome-memory {
  display: grid; grid-template-columns: 1.04fr .96fr; gap: clamp(26px, 4vw, 50px);
  align-items: center; margin-top: clamp(48px, 7vw, 82px);
  padding: clamp(25px, 4vw, 45px); border-radius: 18px;
  background: var(--green); color: #f8f5ea; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.welcome-memory .eyebrow { color: #b9d6c1; }
.welcome-memory .eyebrow-line { background: #b9d6c1; }
.welcome-memory h2 { font-size: clamp(27px, 3.5vw, 38px); line-height: 1.4; }
.welcome-memory .memory-copy > p:not(.eyebrow) { margin-top: 13px; font-size: 12px; line-height: 1.9; color: rgba(248, 245, 234, .72); max-width: 440px; }
.welcome-memory .btn.primary { margin-top: 22px; background: #f8f5ea; color: var(--green); box-shadow: none; }
.welcome-memory .btn.primary:hover { background: #fffdf6; }
.memory-mock { background: var(--paper-2); color: var(--ink); border-radius: 13px; padding: 18px; box-shadow: var(--shadow-md); }
.memory-mock header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.memory-mock header span { display: block; font-size: 9.5px; letter-spacing: .12em; color: var(--faint); }
.memory-mock header b { display: block; margin-top: 2px; font-family: var(--serif); font-size: 16px; }
.memory-mock header em { font-style: normal; font-size: 11px; color: var(--green); background: var(--green-soft); border-radius: 99px; padding: 3px 8px; }
.memory-chart { display: flex; align-items: flex-end; gap: 7px; height: 128px; margin-top: 18px; padding-bottom: 1px; border-bottom: 1px solid var(--line); }
.memory-chart i { flex: 1; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, rgba(47, 115, 87, .9), rgba(47, 115, 87, .35)); }
.memory-mock footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; font-size: 9.5px; color: var(--faint); }
.memory-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.memory-tags span { font-size: 9.5px; color: var(--ink-soft); background: #f0ebdf; border-radius: 4px; padding: 2px 7px; }
.welcome-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: 18px; padding: clamp(24px, 3.5vw, 36px); border: 1px solid var(--line);
  border-radius: 15px; background: rgba(255, 253, 247, .55);
}
.welcome-cta h2 { font-size: clamp(25px, 3.2vw, 34px); line-height: 1.45; }
.welcome-cta-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.welcome-cta .text-btn { font-size: 12px; }

/* ---------- 学习档案 ---------- */
.progress-head { align-items: flex-end; }
.progress-head h1 em { font-style: normal; color: var(--green); }
.profile-card {
  width: min(360px, 100%); padding: 14px 16px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.profile-top { display: flex; align-items: center; gap: 10px; }
.profile-avatar { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fffdf6; font-family: var(--serif); font-size: 16px; }
.profile-name-wrap { min-width: 0; flex: 1; }
.profile-name-wrap small { display: block; font-size: 9px; letter-spacing: .1em; color: var(--faint); }
.profile-name-wrap input {
  width: 100%; padding: 0; border: 0; background: transparent; outline: none;
  font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--ink);
  border-bottom: 1px dashed transparent;
}
.profile-name-wrap input:focus { border-bottom-color: var(--line-strong); }
.profile-code-row { display: flex; align-items: center; gap: 7px; margin-top: 11px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 10.5px; color: var(--muted); }
.profile-code-row code { margin-left: auto; letter-spacing: .12em; color: var(--ink-soft); font-size: 10.5px; }
.profile-code-row .text-btn { font-size: 10.5px; color: var(--green-2); }
.profile-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; font-size: 9.5px; color: var(--faint); }
.profile-foot .text-btn { font-size: 10px; color: var(--green-2); }
.progress-empty { margin-top: 8px; }
.progress-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pstat { padding: 15px 16px 13px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 11px; }
.pstat > span { display: block; font-size: 10px; letter-spacing: .06em; color: var(--muted); }
.pstat b { display: block; margin-top: 5px; font-family: var(--serif); font-size: 32px; line-height: 1.1; color: var(--green); }
.pstat b small { font-family: var(--sans); font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.pstat em { display: block; margin-top: 6px; font-style: normal; font-size: 9.5px; color: var(--faint); line-height: 1.5; }
.progress-improve { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 11px; padding: 10px 13px; border-radius: 8px; background: var(--green-wash); border: 1px solid rgba(38, 92, 69, .13); font-size: 11px; color: var(--ink-soft); }
.progress-improve b { font-family: var(--serif); font-size: 15px; color: var(--green); }
.progress-improve.is-down { background: var(--amber-soft); border-color: rgba(154, 100, 24, .18); }
.progress-improve.is-down b { color: var(--amber); }
.progress-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 14px; }
.progress-grid .panel { margin: 0; }
.progress-grid .panel.wide { grid-column: 1 / -1; }
.trend-delta { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.trend-delta.is-up { color: var(--green); }
.trend-delta.is-down { color: var(--red); }
.trend-chart { min-height: 228px; }
.trend-svg { width: 100%; height: auto; display: block; overflow: visible; }
.trend-grid { stroke: rgba(201, 191, 171, .55); stroke-width: 1; stroke-dasharray: 3 4; }
.trend-axis { font-family: var(--sans); font-size: 9px; fill: var(--faint); }
.trend-line { fill: none; stroke: var(--green-2); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.trend-area { fill: var(--green-2); opacity: .07; }
.trend-point circle { fill: var(--paper-3); stroke: var(--green-2); stroke-width: 2; }
.chart-empty { padding: 42px 12px; text-align: center; font-size: 11.5px; color: var(--faint); border: 1px dashed var(--line); border-radius: 8px; }
.type-list { display: flex; flex-direction: column; gap: 14px; padding-top: 2px; }
.type-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--ink-soft); }
.type-row-head b { font-weight: 500; }
.type-row-head span { font-size: 9.5px; color: var(--faint); white-space: nowrap; }
.type-track { height: 5px; margin-top: 6px; border-radius: 99px; background: #e8e1d2; overflow: hidden; }
.type-track i { display: block; height: 100%; border-radius: inherit; background: var(--green-2); }
.weak-list, .recent-list { display: flex; flex-direction: column; gap: 1px; }
.weak-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 62px; align-items: center; gap: 12px;
  padding: 11px 2px; border-bottom: 1px dashed var(--line);
}
.weak-row:last-child { border-bottom: 0; }
.weak-main { min-width: 0; }
.weak-main b { display: block; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weak-main span { display: block; margin-top: 3px; font-size: 9.5px; color: var(--faint); }
.weak-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.weak-tag { font-size: 9px; padding: 1px 6px; border-radius: 99px; white-space: nowrap; }
.weak-tag.miss { color: var(--red); background: var(--red-soft); }
.weak-tag.partial { color: var(--amber); background: var(--amber-soft); }
.weak-lost { text-align: right; font-family: var(--serif); font-size: 17px; color: var(--red); }
.weak-lost small { font-family: var(--sans); font-size: 9px; color: var(--faint); margin-left: 1px; }
.recent-row {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 11px 2px; border-bottom: 1px dashed var(--line); cursor: pointer;
  transition: background .16s;
}
.recent-row:last-child { border-bottom: 0; }
.recent-row:hover { background: rgba(38, 92, 69, .035); }
.recent-date { font-size: 10px; color: var(--faint); }
.recent-main { min-width: 0; }
.recent-main b { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-main span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--faint); }
.recent-score { text-align: right; white-space: nowrap; }
.recent-score b { font-family: var(--serif); font-size: 17px; color: var(--green); }
.recent-score span { font-size: 9px; color: var(--faint); margin-left: 2px; }
.recent-score em { display: block; font-style: normal; font-size: 9px; color: var(--muted); }
.progress-note { margin-top: 14px; font-size: 10px; line-height: 1.7; color: var(--faint); }
.progress-note code { font-size: 9.5px; }

@media (max-width: 1100px) {
  .welcome-hero { grid-template-columns: 1fr; gap: 30px; min-height: 0; padding-bottom: 24px; }

  .welcome-copy { max-width: 680px; }
  .welcome-art { width: min(540px, 100%); margin: 0 auto; min-height: 470px; }
  .welcome-features { grid-template-columns: 1fr 1fr; }
  .welcome-memory { grid-template-columns: 1fr; }
  .memory-mock { max-width: 560px; }
  .progress-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar {
    height: auto; min-height: 58px; flex-wrap: wrap;
    padding: 9px 15px 7px; gap: 6px 10px;
  }
  .brand { margin-right: 0; }
  .brand-text small { display: none; }
  .brand-seal { width: 33px; height: 33px; font-size: 19px; }
  .brand-text strong { font-size: 17px; }
  .top-status { display: inline-flex; margin-left: auto; font-size: 10px; padding: 5px 8px; }
  .top-status .dot { width: 6px; height: 6px; }
  .main-nav {
    order: 5; width: 100%; display: flex; gap: 2px;
    overflow-x: auto; padding: 1px 0 2px; scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { flex: 0 0 auto; padding: 6px 9px; font-size: 12px; }
  .view { padding-left: 16px; padding-right: 16px; }
  .welcome-view { padding-top: 20px; }
  .welcome-copy h1 { font-size: clamp(37px, 9.5vw, 52px); }
  .welcome-lede { margin-top: 17px; font-size: 13px; line-height: 1.85; }
  .welcome-actions { margin-top: 22px; }
  .welcome-art { min-height: 420px; }
  .art-sheet { width: min(330px, 88%); }
  .art-note { right: 0; bottom: 58px; width: 205px; }
  .art-trend { left: 0; bottom: 6px; width: 190px; }
  .welcome-strip { justify-content: flex-start; overflow-x: auto; white-space: nowrap; font-size: 9.5px; gap: 10px; }
  .welcome-strip i { flex: 0 0 14px; height: 1px; }
  .welcome-section { margin-top: 48px; }
  .welcome-section-head h2 { font-size: clamp(25px, 7vw, 32px); }
  .welcome-features { gap: 9px; }
  .welcome-features article { padding: 17px 14px; }
  .welcome-features h3 { font-size: 15.5px; }
  .flow-grid { grid-template-columns: 1fr; gap: 0; }
  .flow-grid article { border-right: 0; border-bottom: 1px dashed var(--line); padding: 15px 0; }
  .flow-grid article:last-child { border-bottom: 0; padding-bottom: 0; }
  .flow-grid p { max-width: 100%; }
  .welcome-memory { padding: 23px 18px; border-radius: 14px; }
  .welcome-memory .btn.primary { width: 100%; justify-content: center; }
  .welcome-cta { align-items: flex-start; }
  .welcome-cta-actions { width: 100%; justify-content: space-between; }
  .progress-head { padding-top: 34px; }
  .profile-card { width: 100%; }
  .progress-stats { grid-template-columns: 1fr 1fr; }
  .progress-grid { gap: 11px; }
  .weak-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; }
  .weak-tags { grid-column: 1; justify-content: flex-start; }
  .weak-lost { grid-column: 2; grid-row: 1 / span 2; }
  .recent-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; }
  .trend-chart { min-height: 190px; }
}

@media (max-width: 520px) {
  .welcome-copy h1 { font-size: clamp(31px, 8.4vw, 40px); }
  .welcome-actions { align-items: stretch; }
  .welcome-actions .btn { flex: 1; justify-content: center; }
  .welcome-art { min-height: 350px; }
  .art-sheet { width: calc(100% - 20px); padding: 16px; }
  .art-score-row { padding: 11px 0; }
  .art-ring { width: 76px; height: 76px; border-width: 7px; }
  .art-ring b { font-size: 23px; }
  .art-note { display: none; }
  .art-trend { width: 172px; left: 0; bottom: 0; padding: 9px 11px 5px; }
  .art-trend svg { height: 45px; }
  .art-trend b { font-size: 11px; }
  .welcome-features { grid-template-columns: 1fr; }
  .welcome-memory { padding: 20px 15px; }
  .memory-chart { height: 100px; }
  .welcome-cta { padding: 20px 17px; }
  .welcome-cta-actions { align-items: flex-start; flex-direction: column; gap: 12px; }
  .welcome-cta-actions .btn { width: 100%; justify-content: center; }
  .progress-stats { gap: 8px; }
  .pstat { padding: 12px 12px 10px; }
  .pstat b { font-size: 27px; }
  .pstat em { font-size: 9px; }
  .profile-code-row code { font-size: 9.5px; letter-spacing: .08em; }
  .profile-foot span { display: none; }
  .weak-row { padding: 9px 0; }
  .recent-row { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .recent-score em { display: none; }
  .recent-main b { font-size: 11.5px; }
  .trend-chart { min-height: 170px; }
  .trend-axis { font-size: 8px; }
}

