/* 钩玄 · 高考散文 AI 考点雷达 — aligned with flx.bdfz.net */
:root {
  --paper: #f4f0e7;
  --paper-2: #efe9dc;
  --ink: #2a2533;
  --ink-soft: #5b5468;
  --ink-faint: #8b8398;
  --rose: #c85f73;
  --teal: #5fa9a3;
  --gold: #d9a957;
  --lavender: #9384c0;
  --sky: #7c9cc8;
  --line: rgba(42, 37, 51, 0.12);
  --line-strong: rgba(42, 37, 51, 0.22);
  --card: rgba(255, 253, 248, 0.66);
  --card-solid: #fdfbf6;
  --shadow: 0 10px 40px -18px rgba(42, 37, 51, 0.45);
  --serif: "Noto Serif SC", Georgia, "Songti SC", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --r: 8px;
  --grad: linear-gradient(120deg, var(--rose), var(--lavender) 40%, var(--teal) 78%, var(--gold));
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.75; -webkit-font-smoothing: antialiased; overflow-x: hidden; }

.light-field { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 90% at 50% -10%, #fbf7ef, var(--paper) 55%, var(--paper-2)); }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5; mix-blend-mode: multiply; animation: drift 26s ease-in-out infinite; }
.b1 { width: 46vw; height: 46vw; left: -8vw; top: -6vw; background: var(--rose); }
.b2 { width: 40vw; height: 40vw; right: -6vw; top: 4vw; background: var(--teal); animation-delay: -6s; }
.b3 { width: 34vw; height: 34vw; left: 18vw; bottom: -10vw; background: var(--gold); animation-delay: -12s; }
.b4 { width: 30vw; height: 30vw; right: 10vw; bottom: -6vw; background: var(--lavender); animation-delay: -3s; }
.b5 { width: 24vw; height: 24vw; left: 44vw; top: 28vw; background: var(--sky); opacity: 0.35; animation-delay: -16s; }
@keyframes drift { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(4vw,3vh) scale(1.08); } 66% { transform: translate(-3vw,-2vh) scale(.95); } }
.grain { position: absolute; inset: -50%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E"); opacity: .05; }
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 18px; padding: 12px clamp(16px, 4vw, 48px); background: rgba(244,240,231,.78); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark { position: relative; width: 30px; height: 26px; display: inline-block; }
.brand-mark i { position: absolute; width: 17px; height: 17px; border-radius: 50%; mix-blend-mode: multiply; }
.brand-mark i:nth-child(1) { left: 0; top: 4px; background: var(--rose); }
.brand-mark i:nth-child(2) { left: 9px; top: 0; background: var(--teal); }
.brand-mark i:nth-child(3) { left: 6px; top: 9px; background: var(--gold); }
.brand-text { font-family: var(--serif); font-weight: 900; font-size: 19px; letter-spacing: .04em; }
.brand-text em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--ink-faint); font-family: var(--mono); margin-left: 6px; letter-spacing: 0; }
.topnav { display: flex; gap: 6px; }
.topnav a { font-size: 14.5px; color: var(--ink-soft); text-decoration: none; padding: 7px 14px; border-radius: 8px; transition: .18s; font-weight: 500; }
.topnav a:hover { color: var(--ink); background: rgba(255,255,255,.55); }
.topnav a.active { color: #fff; background: var(--ink); }
.navtoggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 20px; width: 40px; height: 38px; cursor: pointer; color: var(--ink); }

main { max-width: 1180px; margin: 0 auto; padding: clamp(20px, 3vw, 34px) clamp(16px, 4vw, 40px) 80px; }
.loading { text-align: center; color: var(--ink-faint); padding: 100px 0; font-family: var(--mono); }
.section-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }
.section-eyebrow::before { content: "// "; opacity: .6; }
h1,h2,h3 { font-family: var(--serif); line-height: 1.3; letter-spacing: .01em; }

.card { background: var(--card); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: clamp(16px, 2.5vw, 26px); }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cols-2,.cols-4 { grid-template-columns: 1fr; } }

.tag { display: inline-block; font-family: var(--mono); font-size: 11.5px; padding: 2px 9px; border-radius: 20px; background: rgba(255,255,255,.6); border: 1px solid var(--line); color: var(--ink-soft); }
.tag.teal { color: #2f6f6a; border-color: rgba(95,169,163,.5); background: rgba(95,169,163,.12); }
.tag.rose { color: #9c4663; border-color: rgba(200,95,115,.5); background: rgba(200,95,115,.13); }
.btn { font-family: var(--sans); font-size: 14.5px; font-weight: 600; border-radius: 8px; padding: 10px 18px; cursor: pointer; transition: .18s; color: var(--ink); background: rgba(255,255,255,.7); border: 1px solid var(--line-strong); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.primary { color: #fff; background: var(--ink); border-color: var(--ink); }
.btn.accent { color: #fff; background: linear-gradient(120deg, var(--rose), var(--lavender)); border: none; }
.btn.sm { padding: 7px 13px; font-size: 13px; }

.hero { text-align: center; padding: clamp(18px, 4vw, 38px) 0 12px; }
.compact-hero h1 { font-size: clamp(34px, 6vw, 58px); font-weight: 900; margin: 0 0 12px; }
.hero h1 .glow { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(15px, 2vw, 18px); color: var(--ink-soft); max-width: 720px; margin: 0 auto 22px; }
.lead.small { max-width: 760px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta.left { justify-content: flex-start; margin-top: 10px; }
.statbar { display: flex; gap: clamp(14px, 4vw, 42px); justify-content: center; flex-wrap: wrap; margin: 24px 0 4px; }
.statbar.tight { margin-top: 22px; }
.statbar .s { text-align: center; }
.statbar .n { font-family: var(--mono); font-weight: 700; font-size: clamp(25px, 4vw, 36px); color: var(--ink); display: block; }
.statbar .l { font-size: 12.5px; color: var(--ink-faint); letter-spacing: .04em; }

.home-lab { display: grid; grid-template-columns: 1fr 1.28fr 1fr; gap: 16px; align-items: stretch; margin-top: 16px; }
.home-lab h2 { margin: 0 0 8px; font-size: 22px; }
.radar-plot { display: grid; place-items: center; margin: 8px 0 12px; }
.radar-svg { width: min(100%, 278px); aspect-ratio: 1; overflow: visible; }
.radar-ring { fill: rgba(255,255,255,.28); stroke: rgba(42,37,51,.13); stroke-width: 1; }
.radar-ring.strong { stroke: rgba(42,37,51,.22); }
.radar-axis { stroke: rgba(42,37,51,.14); stroke-width: 1; }
.radar-area { fill: rgba(95,169,163,.22); stroke: none; }
.radar-line { fill: none; stroke: #c05b83; stroke-width: 2.2; stroke-linejoin: round; }
.radar-dot { fill: #c05b83; stroke: #fff; stroke-width: 1.4; }
.radar-label { font-family: var(--sans); font-size: 10.5px; fill: var(--ink-soft); text-anchor: middle; dominant-baseline: middle; }
.radar-count { font-family: var(--mono); font-size: 9.5px; fill: var(--teal); text-anchor: middle; dominant-baseline: middle; }
.radar-legend { display: flex; align-items: center; justify-content: center; gap: 7px; font-family: var(--mono); font-size: 11px; color: var(--ink-faint); margin-top: -4px; }
.radar-legend span { width: 24px; height: 8px; border-radius: 999px; background: var(--grad); display: inline-block; }
.radar-bars { display: grid; gap: 9px; margin: 16px 0; }
.radar-row { display: grid; grid-template-columns: 52px 1fr 30px; gap: 8px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.radar-row i { height: 8px; background: rgba(42,37,51,.1); border-radius: 8px; overflow: hidden; }
.radar-row b { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.paper-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.paper-head h1,.paper-head h2 { margin: 0; }
.dim { color: var(--ink-faint); }
.mini-passage { max-height: 255px; overflow: auto; font-family: var(--serif); font-size: 15px; line-height: 1.95; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 4px; margin: 10px 0; }
.mini-q { margin-top: 10px; }
.q-pill { width: 100%; display: grid; grid-template-columns: 42px 72px 44px 1fr; gap: 8px; align-items: center; text-align: left; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: var(--ink); color: #fff; cursor: pointer; }
.q-pill span,.q-pill em { font-family: var(--mono); font-style: normal; }
.q-pill small { opacity: .82; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-answer { opacity: .82; }

.modcard { display: block; text-decoration: none; color: inherit; position: relative; overflow: hidden; transition: .2s; }
.modcard:hover { transform: translateY(-3px); }
.modcard .ic { font-family: var(--mono); font-size: 12px; color: var(--teal); }
.modcard h3 { margin: 8px 0 6px; font-size: 20px; }
.modcard p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.modcard .arrow { position: absolute; right: 20px; bottom: 16px; font-size: 20px; color: var(--ink-faint); transition: .2s; }
.modcard:hover .arrow { color: var(--rose); transform: translateX(3px); }
.modcard .stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--grad); }

.guide-layout { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; }
.guide-toc { position: sticky; top: 70px; }
.guide-toc a { display: block; padding: 5px 10px; font-size: 13.5px; color: var(--ink-soft); text-decoration: none; border-left: 2px solid transparent; border-radius: 0 6px 6px 0; }
.guide-toc a:hover { color: var(--ink); border-left-color: var(--rose); background: rgba(255,255,255,.5); }
.prose h1 { margin: 4px 0 12px; font-size: clamp(28px, 4vw, 42px); }
.prose h2 { font-size: 25px; margin: 6px 0 14px; }
.prose p { margin: 0 0 12px; }
.knowledge-stack { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
.trap-item { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: rgba(255,255,255,.5); }
.trap-item .tt { font-family: var(--serif); font-weight: 700; font-size: 16px; color: #9c4663; display: flex; justify-content: space-between; gap: 8px; }
.trap-item .radar { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.trap-item .radar b { color: var(--teal); font-family: var(--mono); font-size: 11px; }
.step { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.step .num { font-family: var(--mono); font-weight: 700; color: #fff; background: var(--ink); min-width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; }
.lede { font-size: 14px; color: var(--ink-soft); border-left: 3px solid var(--gold); background: rgba(217,169,87,.06); border-radius: 0 8px 8px 0; padding: 12px 16px; }

.corpus-shell,.diagnose-layout { display: grid; grid-template-columns: 235px 1fr; gap: 18px; align-items: start; }
.diagnose-layout { grid-template-columns: 1fr 370px; }
.corpus-side { position: sticky; top: 70px; }
.year-list,.cat-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--mono); font-size: 13px; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.6); cursor: pointer; color: var(--ink-soft); transition: .15s; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.reading { max-height: 58vh; overflow-y: auto; padding-right: 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 14px 0; }
.reading.short { max-height: 44vh; }
.reading::-webkit-scrollbar,.mini-passage::-webkit-scrollbar { width: 8px; }
.reading::-webkit-scrollbar-thumb,.mini-passage::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }
.material { font-size: 15.5px; line-height: 1.95; white-space: pre-wrap; font-family: var(--serif); padding: 12px 0; }
.material .mlabel { font-family: var(--serif); font-weight: 700; color: var(--teal); display: block; margin-bottom: 4px; }
mark { background: rgba(217,169,87,.2); padding: 0 2px; border-radius: 3px; }
.reveal { border-left: 3px solid var(--teal); background: rgba(95,169,163,.08); padding: 12px 15px; border-radius: 0 8px 8px 0; margin-top: 10px; font-size: 14.5px; }
.question-bank { display: grid; gap: 12px; margin-top: 16px; }
.q-card { border-top: 1px solid var(--line); padding: 16px 0 6px; }
.q-card.selected { border: 0; padding: 0; }
.qhead { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qno { font-family: var(--mono); font-weight: 700; color: var(--rose); }
.stem { font-weight: 600; font-size: 15.5px; margin: 8px 0 12px; }
.q-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.q-actions details { flex: 1 1 260px; font-size: 14px; color: var(--ink-soft); }
.q-actions summary { cursor: pointer; color: var(--teal); font-family: var(--mono); }
textarea.answer { width: 100%; min-height: 96px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 12px 14px; font-family: var(--sans); font-size: 15px; line-height: 1.7; resize: vertical; background: rgba(255,255,255,.7); color: var(--ink); }
textarea.answer:focus,input:focus { outline: 2px solid var(--lavender); border-color: transparent; }
.ai-workbench { position: sticky; top: 70px; }
.tmpl { border-radius: 8px; border: 1px solid var(--line); overflow: hidden; margin-top: 12px; }
.tmpl summary { cursor: pointer; padding: 11px 14px; font-family: var(--serif); font-weight: 700; background: rgba(255,255,255,.55); list-style: none; }
.tmpl summary::-webkit-details-marker { display: none; }
.tmpl summary::before { content: "▸ "; color: var(--rose); }
.tmpl[open] summary::before { content: "▾ "; }
.tmpl .body { padding: 4px 14px 14px; color: var(--ink-soft); font-size: 14px; }
.grade-box { border-radius: 8px; border: 1px solid var(--line); padding: 14px 16px; margin-top: 10px; background: rgba(255,255,255,.55); }
.grade-box.error { color: #9c4663; }
.grade-box .sc { font-family: var(--mono); font-weight: 700; font-size: 17px; }
.grade-box .row { margin: 6px 0; font-size: 14px; }
.pts { list-style: none; padding: 0; margin: 4px 0; }
.pts li { font-size: 13.5px; padding: 2px 0 2px 18px; position: relative; }
.pts li::before { position: absolute; left: 0; }
.pts.win li::before { content: "✓"; color: var(--teal); }
.pts.lose li::before { content: "✗"; color: var(--rose); }
.chat { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.chat-log { display: flex; flex-direction: column; gap: 9px; margin-bottom: 10px; max-height: 300px; overflow-y: auto; }
.msg { max-width: 86%; padding: 9px 13px; border-radius: 8px; font-size: 14px; line-height: 1.65; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--ink); color: #fff; }
.msg.ai { align-self: flex-start; background: rgba(255,255,255,.75); border: 1px solid var(--line); }
.chat-input { display: flex; gap: 8px; }
.chat-input input { flex: 1; border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 13px; font-size: 14px; background: rgba(255,255,255,.7); color: var(--ink); }

.matrix-head { text-align: center; margin-bottom: 16px; }
.matrix { display: grid; gap: 10px; }
.matrix-row { display: grid; grid-template-columns: minmax(210px,.72fr) 1fr 1fr; gap: 16px; }
.matrix-row h3,.ability-card h3,.verify-card h3 { margin: 8px 0 6px; }
.matrix-row p,.ability-card p,.verify-card p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.matrix-row b { display: block; font-family: var(--mono); font-size: 12px; margin-bottom: 5px; }
.empty { text-align: center; color: var(--ink-faint); padding: 40px 0; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -2px; }
.spin.dark { border-color: var(--line-strong); border-top-color: var(--ink); }
@keyframes sp { to { transform: rotate(360deg); } }
.sitefoot { text-align: center; padding: 30px 20px 40px; color: var(--ink-faint); font-size: 12.5px; display: flex; flex-direction: column; gap: 5px; border-top: 1px solid var(--line); }
.sitefoot .mono { font-family: var(--mono); }

@media (max-width: 960px) {
  .home-lab,.corpus-shell,.diagnose-layout { grid-template-columns: 1fr; }
  .corpus-side,.ai-workbench { position: static; }
  .knowledge-stack { grid-template-columns: 1fr; }
  .matrix-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topnav { display: none; position: absolute; top: 60px; right: 12px; flex-direction: column; background: var(--card-solid); padding: 8px; border-radius: 8px; box-shadow: var(--shadow); border: 1px solid var(--line); }
  .topnav.open { display: flex; }
  .navtoggle { display: block; }
  .guide-toc { display: none; }
  .guide-layout { grid-template-columns: 1fr; }
  .q-pill { grid-template-columns: 42px 72px 44px; }
  .q-pill small { grid-column: 1 / -1; white-space: normal; }
}
@media (max-width: 520px) {
  main { padding-inline: 12px; }
  .brand-text em { display: none; }
  .statbar { gap: 12px 22px; }
  .statbar .s { min-width: 124px; }
}
