/* 福建中考考情 (kaoqing.html). Tokens, header and footer come from portal.css; the look matches estimate.css. */
.kq { background: var(--canvas); padding-bottom: 56px; }
.kq-wrap { max-width: 1080px; }
.kq .crumb { padding-top: 20px; font-size: 15px; }
.kq-head { margin-top: 12px; }
.kq-kicker { color: var(--blue); font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.kq-title { margin-top: 6px; font-size: 34px; font-weight: 700; letter-spacing: -.03em; }
.kq-lede { margin-top: 8px; color: var(--muted); font-size: 17px; }
.kq-seg { --n: 2; position: relative; display: grid; grid-template-columns: repeat(2, 1fr); max-width: 320px; margin-top: 20px; padding: 3px; border-radius: 12px; background: #e9edf3; }
.kq-seg button { position: relative; z-index: 1; min-height: 44px; border: 0; background: none; color: var(--ink); font-size: 17px; font-weight: 400; }
.kq-seg button[aria-selected="true"] { font-weight: 600; color: var(--blue); }
.kq-seg button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: 9px; }
.kq-seg-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 9px; background: #fff; box-shadow: 0 3px 8px #0000001f; transform: translateX(calc(var(--seg-i, 0) * 100%)); transition: transform 380ms cubic-bezier(.3, 1.1, .4, 1); }

.kq-paper { margin-top: 20px; padding: 12px 16px; border-radius: 14px; background: #fff; color: var(--muted); font-size: 15px; line-height: 1.6; box-shadow: 0 0 0 1px var(--line); }
.kq-paper b:first-child { margin-right: 8px; padding: 1px 8px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); font-size: 13px; font-weight: 600; }
.kq-paper b:last-child { color: var(--ink); font-weight: 600; }

.kq-card { margin-top: 16px; padding: 20px; border-radius: 20px; background: #fff; box-shadow: 0 1px 2px #0000000a, 0 8px 24px #18263d0d; }
.kq-card-head h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.kq-card-head p { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.kq-card-head--row { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; }
.kq-mini-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #e9edf3; }
.kq-mini-seg button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.kq-mini-seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px #0000001a; }
.kq-note { margin-top: 12px; color: var(--muted); font-size: 13px; }

/* heatmap */
.hm { margin-top: 16px; }
.hm-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(5, 52px) 128px; align-items: center; gap: 4px; padding: 3px 0; }
.hm-row:not(.hm-head):hover { background: #f6f8fc; border-radius: 10px; }
.hm-head span { color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
.hm-head span:first-child { text-align: start; padding-left: 4px; }
.hm-name { display: grid; grid-template-columns: 10px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: center; min-width: 0; padding: 4px; }
.hm-name i { grid-row: 1 / 3; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.hm-name b { font-size: 15px; font-weight: 600; line-height: 1.35; }
.hm-name small { color: var(--muted); font-size: 12px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-cell { display: grid; place-items: center; height: 40px; border-radius: 8px; background: rgba(40, 84, 163, var(--a)); color: var(--ink); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hm-cell.dark { color: #fff; }
.hm-cell.zero { background: #f3f5f9; color: var(--muted); font-weight: 400; }
.hm-avg { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 8px; padding-left: 10px; }
.hm-avg b { font-size: 15px; font-weight: 700; text-align: end; font-variant-numeric: tabular-nums; }
.hm-bar { height: 8px; border-radius: 99px; background: #eef1f6; overflow: hidden; }
.hm-bar span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--c); }

/* area bars */
.ab { display: grid; gap: 8px; margin-top: 16px; }
.ab-row { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 10px; }
.ab-year { color: var(--muted); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ab-track { display: flex; height: 32px; border-radius: 10px; overflow: hidden; background: #eef1f6; }
.ab-seg { display: grid; place-items: center; width: var(--w); background: var(--c); color: #fff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: inset -1px 0 0 #ffffff59; }
.ab-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.ab-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ab-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.ab-legend b { color: var(--ink); font-weight: 600; }

/* biggest changes */
.ch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.ch-card { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px; border-radius: 14px; background: #f6f8fc; }
.ch-arrow { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; font-weight: 700; }
.ch-card.up .ch-arrow { background: #e6f6ec; color: #1b7a43; }
.ch-card.down .ch-arrow { background: #fff1e0; color: #a64b05; }
.ch-card h4 { font-size: 15px; font-weight: 600; }
.ch-card p { margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* must-test list */
.mt { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin-top: 12px; }
.mt li { display: grid; grid-template-columns: minmax(0, 1fr) auto 36px; align-items: center; gap: 12px; min-height: 44px; border-bottom: 1px solid #eef1f6; }
.mt-name { font-size: 15px; }
.mt-dots { display: inline-flex; gap: 5px; }
.mt-dots i, .mt-legend i { width: 12px; height: 12px; border-radius: 50%; background: #e3e8f0; }
.mt-dots i.on, .mt-legend i.on { background: var(--blue); }
.mt li b { color: var(--muted); font-size: 13px; font-weight: 600; text-align: end; font-variant-numeric: tabular-nums; }
.mt li b.all { color: var(--blue); }
.mt-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.mt-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* physics: experiments + calculations */
.ex { margin-top: 14px; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px #eef1f6; }
.ex-row { display: grid; grid-template-columns: 64px repeat(4, minmax(0, 1fr)); }
.ex-row > span { padding: 12px 12px; font-size: 13px; line-height: 1.55; border-top: 1px solid #eef1f6; }
.ex-row > span + span { border-left: 1px solid #eef1f6; }
.ex-head > span { border-top: 0; background: #f6f8fc; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.ex-head i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.ex-year { font-weight: 700; font-variant-numeric: tabular-nums; background: #f6f8fc; }
.calc { list-style: none; margin-top: 14px; }
.calc li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid #eef1f6; }
.calc li:first-child { border-top: 0; }
.calc-year { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.calc p { font-size: 15px; line-height: 1.6; }
.calc p.final { margin-top: 4px; }
.calc em { display: inline-block; min-width: 6.5em; margin-right: 8px; color: var(--muted); font-size: 13px; font-style: normal; }
.calc p.final em { color: var(--blue); font-weight: 600; }

/* chemistry: trends */
.tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.tr article { padding: 16px; border-radius: 14px; background: #f6f8fc; }
.tr h4 { font-size: 15px; font-weight: 600; }
.tr p { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.7; }

.kq-cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; margin-top: 24px; padding: 22px; border-radius: 20px; background: var(--blue-soft); }
.kq-cta h2 { font-size: 20px; font-weight: 700; }
.kq-cta p { margin-top: 4px; color: var(--muted); font-size: 15px; }
.kq-cta .button { min-height: 48px; border-radius: 999px; padding-inline: 20px; }
.kq-source { margin-top: 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }

@media (max-width: 760px) {
  .hm-row { grid-template-columns: minmax(0, 1fr) repeat(5, 36px) 40px; gap: 3px; }
  .hm-name small { display: none; }
  .hm-name b { font-size: 13px; }
  .hm-cell { height: 36px; border-radius: 7px; font-size: 13px; }
  .hm-avg { display: block; padding-left: 4px; text-align: end; }
  .hm-avg b { font-size: 13px; }
  .hm-bar { display: none; }
  .hm-head span { font-size: 12px; }
  .ch, .mt, .tr { grid-template-columns: minmax(0, 1fr); }
  .ex-head { display: none; }
  .ex-row { grid-template-columns: minmax(0, 1fr); border-top: 1px solid #eef1f6; }
  .ex-row > span { border: 0; padding: 6px 12px; }
  .ex-row > span + span { border-left: 0; }
  .ex-row > span[data-label]::before { content: attr(data-label) "　"; color: var(--muted); font-weight: 600; }
  .ex-year { padding-top: 10px !important; background: none; font-size: 15px; }
  .calc li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .calc em { display: block; margin: 0; }
}
@media (max-width: 640px) {
  .kq-title { font-size: 34px; }
  .kq-lede { font-size: 15px; }
  .kq-seg { max-width: none; }
  .kq-card { padding: 16px 14px; border-radius: 18px; }
  .kq-card-head h3 { font-size: 17px; }
}
@media (max-width: 380px) {
  .hm-row { grid-template-columns: minmax(0, 1fr) repeat(5, 32px) 34px; }
}

/* motion: cells and bars build in when the subject changes */
@keyframes kq-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes kq-grow-x { from { transform: scaleX(0); } }
@keyframes kq-pop { from { transform: scale(0); } }
@media (prefers-reduced-motion: no-preference) {
  .enter .kq-card, .enter .kq-paper { animation: kq-rise 500ms cubic-bezier(.2, .8, .2, 1) both; }
  .enter .hm-row { animation: kq-rise 420ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 25ms + 80ms); }
  .enter .hm-bar span { transform-origin: left; animation: kq-grow-x 800ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 25ms + 200ms); }
  .enter .ab-track { transform-origin: left; animation: kq-grow-x 900ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 80ms + 150ms); }
  .enter .mt-dots i.on { animation: kq-pop 360ms cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i, 0) * 20ms + 200ms); }
}


/* ================= v2: more polished (2026-11-13) ================= */
/* 1. conclusion first */
.kq-hero { margin-top: 20px; }
.kq-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kq-stat { padding: 18px 18px 16px; border-radius: 20px; background: #fff; box-shadow: 0 1px 2px #0000000a, 0 8px 24px #18263d0d; }
.kq-stat:first-child { background: linear-gradient(135deg, #1d3f86, #2854a3); color: #fff; }
.kq-stat-num { display: flex; align-items: baseline; gap: 4px; color: var(--blue); }
.kq-stat:first-child .kq-stat-num { color: #fff; }
.kq-stat-num b { font-size: 56px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.kq-stat-num span { font-size: 17px; font-weight: 600; }
.kq-stat-label { margin-top: 10px; font-size: 17px; font-weight: 600; }
.kq-stat-sub { margin-top: 2px; color: var(--muted); font-size: 13px; }
.kq-stat:first-child .kq-stat-sub { color: #d5e1f7; }
.kq-line { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; padding: 14px 18px; border-radius: 16px; background: #fff; font-size: 17px; font-weight: 600; line-height: 1.6; box-shadow: 0 0 0 1px var(--line); }
.kq-line span { flex: none; padding: 1px 8px; border-radius: 6px; background: #fff3e0; color: #a64b05; font-size: 13px; }
.kq-paper { margin-top: 12px; }
.kq-paper strong { color: var(--ink); font-weight: 600; }

/* 2. sticky table of contents */
.kq-toc { position: sticky; top: calc(var(--header) + env(safe-area-inset-top)); z-index: 4; display: flex; gap: 4px; margin: 16px -8px 0; padding: 8px; overflow-x: auto; background: #f6f8fcf0; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); scrollbar-width: none; }
.kq-toc::-webkit-scrollbar { display: none; }
.kq-toc a { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; color: var(--muted); font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color 200ms, color 200ms; }
.kq-toc a:hover { color: var(--ink); background: #e9edf3; }
.kq-toc a.on { background: var(--ink); color: #fff; }
.kq-card { scroll-margin-top: 130px; }

/* 3. heatmap: legend, trend arrows, wider cells */
.hm-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.hm-scale { width: 140px; height: 10px; border-radius: 99px; background: linear-gradient(90deg, rgba(40, 84, 163, .1), rgba(40, 84, 163, .95)); }
.hm-legend em { margin-left: auto; font-style: normal; }
.hm-legend em b { margin: 0 2px 0 8px; font-weight: 700; }
.tr-up { color: #1b7a43; }
.tr-down { color: #a64b05; }
.hm-row { grid-template-columns: minmax(170px, 260px) repeat(5, minmax(44px, 1fr)) 160px; gap: 5px; }
.hm-cell { height: 42px; }
.hm-avg { grid-template-columns: 32px 1fr 18px; }
.hm-avg em { font-style: normal; font-size: 17px; font-weight: 700; text-align: center; }

/* 5. change cards with a five-year line */
.ch-card { display: block; padding: 16px; }
.ch-card header { display: flex; align-items: center; gap: 10px; }
.ch-card .ch-arrow { width: 28px; height: 28px; font-size: 15px; }
.ch-card h4 { font-size: 17px; }
.ch-card > p { margin-top: 6px; }
.spark { display: block; width: 100%; max-width: 220px; height: 56px; margin-top: 10px; overflow: visible; }
.spark path { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke: var(--c, #64748b); }
.spark.up { --c: #1b7a43; }
.spark.down { --c: #a64b05; }
.spark circle { fill: #fff; stroke: var(--c); stroke-width: 2; }
.spark circle.last { fill: var(--c); }
.spark text { fill: var(--muted); font-size: 11px; font-weight: 600; }
.spark text.last { fill: var(--c); font-size: 12px; font-weight: 700; }
.ch-big { margin-top: 10px; color: #1b7a43; font-size: 34px; font-weight: 700; letter-spacing: -.02em; }

/* 4. must-test, grouped */
.mt-sub { margin-top: 14px; color: var(--muted); font-size: 15px; }
.mt-sub b { color: var(--ink); font-size: 20px; font-weight: 700; margin-right: 2px; }
.mt-group { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid #eef1f6; }
.mt-area { display: inline-flex; align-items: center; gap: 6px; padding-top: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.mt-area i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.mt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--blue-soft); color: var(--ink); font-size: 15px; }
.mt-some { margin-top: 8px; }
.mt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 10px; }
.mt-card { padding: 14px; border-radius: 14px; background: #fff8ee; box-shadow: inset 0 0 0 1px #f6dfbd; }
.mt-card h4 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.mt-card h4 i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.mt-years { display: flex; gap: 6px; margin-top: 10px; }
.mt-years span { display: grid; justify-items: center; gap: 3px; color: var(--muted); font-size: 12px; }
.mt-years i { width: 14px; height: 14px; border-radius: 50%; background: #ead9c2; }
.mt-years span.on i { background: var(--blue); }
.mt-years span:not(.on) { color: #a64b05; font-weight: 600; }
.mt-card p { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.mt, .mt-legend { display: none; }

/* 6. experiments & calculations: patterns marked */
.kq-card-head p b { color: var(--ink); font-weight: 600; }
.inline-project, .ex-item em { display: inline-flex; align-items: center; margin-left: 4px; padding: 0 6px; border-radius: 5px; background: #fff3e0; color: #a64b05; font-size: 12px; font-style: normal; font-weight: 600; vertical-align: 1px; }
.ex-keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ex-keys span { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: #f1f4f8; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); font-size: 13px; font-weight: 600; }
.ex-keys span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ex-cell { display: flex; flex-wrap: wrap; gap: 4px 6px; align-content: flex-start; }
.ex-item { display: inline-flex; align-items: center; font-size: 13px; line-height: 1.5; }
.ex-item.rep { padding: 2px 8px; border-radius: 6px; background: #f1f4f8; background: color-mix(in srgb, var(--c) 13%, #fff); color: var(--c); font-weight: 600; box-shadow: inset 3px 0 0 var(--c); }
.calc-body { display: grid; gap: 8px; }
.calc-line { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 8px; align-items: baseline; }
.calc-line em { color: var(--muted); font-size: 13px; font-style: normal; }
.calc-line.final em { color: var(--blue); font-weight: 600; }
.calc-line > div { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.calc-q { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 15px; }
.calc-line.final .calc-q { font-weight: 600; }
.tag, .tag-key { display: inline-flex; align-items: center; padding: 0 7px; border-radius: 5px; background: #f1f4f8; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); font-size: 12px; font-style: normal; font-weight: 600; line-height: 1.7; }
.tag-key { margin: 0 4px; }
.calc li { grid-template-columns: 64px 1fr; padding: 14px 0; }
.tr article { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.tr-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 13px; font-weight: 700; }

@media (max-width: 760px) {
  .kq-stats { grid-template-columns: minmax(0, 1fr); }
  .kq-stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 14px 16px; }
  .kq-stat-num { grid-row: 1 / 3; }
  .kq-stat-num b { font-size: 34px; }
  .kq-stat-label { margin-top: 0; font-size: 15px; }
  .kq-line { font-size: 15px; }
  .kq-toc { margin-inline: -16px; padding-inline: 12px; }
  .hm-row { grid-template-columns: minmax(0, 1fr) repeat(5, 36px) 46px; gap: 3px; }
  .hm-avg { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
  .hm-avg em { font-size: 13px; }
  .hm-legend em { margin-left: 0; flex-basis: 100%; }
  .mt-group { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .mt-area { padding-top: 0; }
  .calc-line { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ex-cell { padding: 6px 12px !important; }
  .ex-cell::before { flex-basis: 100%; }
}
@media (max-width: 380px) { .hm-row { grid-template-columns: minmax(0, 1fr) repeat(5, 32px) 40px; } }
@media (prefers-reduced-motion: no-preference) {
  .enter .kq-stat { animation: kq-rise 520ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
  .enter .spark path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: kq-draw 1100ms 300ms cubic-bezier(.4, 0, .2, 1) forwards; }
  .enter .mt-chip { animation: kq-rise 360ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 25ms + 150ms); }
}
@keyframes kq-draw { to { stroke-dashoffset: 0; } }
