:root {
  --ink: #18191b;
  --body: #3c404b;
  --muted: #5e6575;
  --blue: #3439e8;
  --blue-text: #292fca;
  --line: #c7c8dd;
  --tint: #f5f5fb;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
  font-weight: 600;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.72; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, label, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.frame { width: min(1320px, calc(100% - 112px)); margin-inline: auto; }
.topbar { height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { color: var(--ink); text-decoration: none; font-size: 1.125rem; font-weight: 800; }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: clamp(12px, 2.1vw, 30px); flex-wrap: wrap; }
.site-nav > a { display: inline-flex; align-items: center; min-height: 44px; color: var(--body); text-decoration: none; font-size: .9375rem; white-space: nowrap; }
.site-nav > a:hover, .site-nav > a[aria-current="page"] { color: var(--blue-text); text-decoration: underline; text-underline-offset: 6px; }
.brand span, .accent { color: var(--blue); }
.skip { position: fixed; transform: translateY(-110%); padding: 8px 16px; color: #fff; background: var(--blue); z-index: 2; }
.skip:focus { transform: translateY(0); }
.pill {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: .9375rem;
  text-decoration: none;
  text-align: center;
  line-height: 1.5;
}
.pill:hover { border-color: var(--blue); color: var(--blue-text); }
.pill.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.pill.primary:hover { background: #292dce; }
.pill.quiet { font-size: .875rem; }
.pill[disabled] { cursor: default; opacity: .65; color: var(--muted); }
.home { min-height: min(650px, calc(100svh - 130px)); display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(40px, 7vw, 104px); align-items: center; padding: 48px 0 64px; }
.context { font-size: .875rem; color: var(--muted); margin-bottom: 16px; }
.home h1 { font-size: clamp(2.65rem, 5vw, 5rem); line-height: 1.16; letter-spacing: -.05em; font-weight: 800; }
.home .intro { margin-top: 23px; max-width: 530px; font-size: clamp(1rem, 1.4vw, 1.25rem); color: var(--body); }
.home .routes { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.home .sequence { margin-top: 23px; max-width: 530px; color: var(--muted); font-size: .9375rem; line-height: 1.8; }
.case-photo { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 0; aspect-ratio: 1.22; background: #f5f5f7; }
.case-photo img { max-width: 90%; max-height: 88%; width: 86%; height: 88%; object-fit: contain; filter: drop-shadow(0 0 1px white) drop-shadow(0 0 2px white); }
.case-figure figcaption { padding-top: 10px; color: var(--muted); font-size: .875rem; }
.footer { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0 23px; color: var(--muted); font-size: .875rem; }
.flow { width: min(100%, 720px); margin-inline: auto; padding: 42px 0 54px; min-height: 67vh; }
.flow.wide { width: min(100%, 1060px); }
.flow-progress { display: flex; gap: 14px; align-items: center; margin: 0 0 27px; color: var(--muted); font-size: .875rem; }
.flow-progress progress { width: min(34vw, 150px); height: 4px; background: #e3e4f6; border: 0; border-radius: 999px; overflow: hidden; appearance: none; }
progress::-webkit-progress-bar { background: #e3e4f6; border-radius: 999px; }
progress::-webkit-progress-value { background: var(--blue); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--blue); border-radius: 999px; }
.flow h1 { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 800; line-height: 1.3; letter-spacing: -.045em; overflow-wrap: anywhere; }
.flow h1:focus { outline: none; }
.lead { margin-top: 17px; max-width: 65ch; font-size: 1.0625rem; color: var(--body); }
.question-body.with-art { display: grid; grid-template-columns: 1.34fr .86fr; gap: 43px; align-items: start; }
.question-body .case-figure { margin-top: 7px; }
.question-body .case-figure img { width: 90%; }
.options { padding: 0; border: 0; margin: 22px 0 0; min-inline-size: 0; display: grid; gap: 9px; }
.option { position: relative; width: fit-content; max-width: 100%; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option .pill { font-size: 1rem; text-align: left; justify-content: flex-start; font-weight: 600; }
.option input:checked + .pill { border-color: var(--blue); color: #fff; background: var(--blue); }
.option input:focus-visible + .pill { outline: 3px solid var(--blue); outline-offset: 4px; }
.option:hover .pill { border-color: var(--blue); }
.option-detail { display: block; margin: 5px 10px 0; color: var(--muted); font-size: .875rem; }
.fields { margin-top: 24px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; color: var(--body); max-width: 610px; }
.field span { font-size: .9375rem; }
.field input, .field textarea, .field select {
  min-width: 0; width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid var(--line);
  border-radius: 6px; background-color: #fff; font-weight: 600;
}
.field select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%233c404b' stroke-width='1.5' d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.field textarea { min-height: 104px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.error { color: #922d22; font-size: .9375rem; margin-top: 12px; }
.error:empty { display: none; }
.result-top .lead { margin-top: 19px; }
.result-block { margin-top: 31px; padding-top: 19px; border-top: 1px solid #e6e6ee; }
.result-block h2, .market-note h2 { font-size: 1.25rem; line-height: 1.55; font-weight: 800; margin-bottom: 9px; }
.result-block p, .market-note p { color: var(--body); overflow-wrap: anywhere; }
.result-block p + p, .market-note p + p { margin-top: 8px; }
.result-block .highlight { color: var(--blue-text); }
.result-block ol, .result-block ul { padding-inline-start: 22px; margin: 9px 0 0; color: var(--body); }
.result-block li + li { margin-top: 8px; }
.sidebar-note { margin-top: 14px; color: var(--muted); font-size: .9375rem; overflow-wrap: anywhere; }
.detail { margin-top: 23px; color: var(--muted); }
.detail summary { cursor: pointer; width: fit-content; min-height: 44px; padding-block: 8px; text-decoration: underline; text-underline-offset: 4px; font-size: .9375rem; }
.detail p { margin-top: 7px; font-size: .9375rem; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 27px 34px; margin-top: 24px; }
.market-note { padding: 16px 0 0; border-top: 2px solid var(--blue); }
.market-note strong { color: var(--blue-text); }
.market-note .level { font-size: .9375rem; margin-bottom: 12px; }
dialog { width: min(580px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); }
dialog::backdrop { background: rgb(20 21 36 / 45%); }
.about-inner { padding: 15px 19px 19px; }
.about-inner p { margin: 13px 0; color: var(--body); }
.about-inner button { margin-top: 8px; }
.site-home { min-height: 0; padding-block: clamp(40px, 7vw, 100px) 60px; }
.site-index { padding: 26px 0 64px; border-top: 1px solid var(--line); }
.site-index h2 { font-size: 1.25rem; }
.index-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 18px; }
.index-rows > div { border-top: 1px solid #e6e6ee; padding-top: 14px; }
.index-rows a { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.125rem; font-weight: 800; color: var(--ink); text-underline-offset: 5px; }
.index-rows a:hover { color: var(--blue-text); }
.index-rows p { color: var(--body); }
.site-footer { border-top: 1px solid #e6e6ee; }
.site-footer a { color: var(--muted); text-underline-offset: 4px; }
.reading { width: min(100%, 760px); padding: clamp(34px, 7vw, 82px) 0 64px; min-height: 65vh; }
.reading h1 { font-size: clamp(2rem, 5vw, 4rem); font-weight: 800; line-height: 1.17; letter-spacing: -.04em; }
.reading-section { margin-top: 38px; padding-top: 22px; border-top: 1px solid #e6e6ee; scroll-margin-top: 18px; }
.reading-section h2 { margin-bottom: 10px; font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.4; }
.reading-section p, .plain-list { color: var(--body); }
.reading-section .actions { margin-top: 14px; }
.plain-list { margin: 10px 0 0; padding-inline-start: 1.45rem; }
.plain-list li + li { margin-top: 6px; }
.lesson-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lesson-controls label { min-width: 0; display: grid; gap: 5px; }
.lesson-controls select { width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.lesson-output { background: var(--tint); border-left: 3px solid var(--blue); padding: 12px 15px; margin-top: 14px; }
.range-field { display: grid; grid-template-columns: 1fr auto; margin-block: 14px; }
.range-field output { color: var(--blue-text); }
.range-field input { width: 100%; margin: 0; min-height: 44px; grid-column: 1 / -1; accent-color: var(--blue); }
@media (max-width: 760px) {
  .frame { width: calc(100% - 40px); }
  .topbar { height: auto; min-height: 64px; padding: 7px 0; flex-wrap: wrap; gap: 0 15px; }
  .site-nav { justify-content: flex-start; gap: 0 16px; }
  .topbar .brand { min-height: 44px; display: inline-flex; align-items: center; }
  .home { grid-template-columns: 1fr; gap: 26px; align-items: start; min-height: 0; padding: 33px 0 22px; }
  .home h1 { font-size: clamp(2.2rem, 8.8vw, 3.4rem); }
  .home .intro { margin-top: 16px; }
  .home .routes { margin-top: 22px; }
  .home .sequence { margin-top: 14px; }
  .home .case-photo { aspect-ratio: 1.75; }
  .home .case-photo img { height: 90%; width: 75%; }
  .site-index { margin-top: 10px; padding: 19px 0 34px; }
  .index-rows { grid-template-columns: 1fr; gap: 10px; margin-top: 8px; }
  .index-rows > div { padding-top: 4px; }
  .flow { padding: 29px 0 32px; }
  .flow-progress { margin-bottom: 19px; }
  .flow h1 { font-size: clamp(1.85rem, 7vw, 2.65rem); }
  .question-body.with-art { display: flex; flex-direction: column-reverse; gap: 13px; }
  .question-body .case-figure { width: 100%; }
  .question-body .case-photo { aspect-ratio: 2.3; }
  .option .pill { padding: 9px 15px; }
  .footer { flex-wrap: wrap; row-gap: 4px; }
}
@media print {
  .topbar button, .flow .actions, .skip, .footer, dialog { display: none !important; }
  .frame, .flow { width: 100%; min-height: 0; }
  .result-block, .market-note { break-inside: avoid; }
}
