:root {
  --paper: #f4f1e9;
  --surface: #fffdf7;
  --ink: #233e32;
  --muted: #566354;
  --accent: #98462f;
  --line: #c9cfc0;
  --light: #e7eadf;
  --display: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --text:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 30px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.75;
}
::selection {
  background: #d4dfca;
  color: var(--ink);
}
a {
  color: inherit;
  text-underline-offset: 5px;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
button,
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 11px 22px;
  background: var(--ink);
  border: 1px solid var(--ink);
  color: var(--surface);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s;
}
button:hover,
.button:hover {
  background: #355a45;
}
button.secondary,
.button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
button.secondary:hover,
.button.secondary:hover {
  background: var(--light);
}
.text-link {
  color: var(--accent);
  font-weight: 600;
}
.site-header {
  max-width: 1240px;
  margin: auto;
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.brand {
  font: 700 28px var(--display);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand span {
  font: 400 13px var(--text);
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
nav {
  display: flex;
  gap: 30px;
}
nav a {
  text-decoration: none;
  font-size: 14px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
}
main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 60px 40px 90px;
  min-height: 68vh;
}
h1,
h2,
h3 {
  line-height: 1.3;
  text-wrap: balance;
}
h1,
h2 {
  font-family: var(--display);
  font-weight: 600;
}
h1 {
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.025em;
  margin: 0 0 24px;
}
h2 {
  font-size: 32px;
  margin: 0 0 20px;
}
h3 {
  font-size: 20px;
  margin: 0 0 12px;
}
p {
  margin: 0 0 18px;
  max-width: 72ch;
}
.muted,
.small {
  color: var(--muted);
}
.small {
  font-size: 14px;
}
.accent {
  color: var(--accent);
}
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 70px;
  align-items: center;
  padding: 25px 0 65px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero p {
  max-width: 32em;
  font-size: 18px;
}
.hero .actions {
  margin-top: 28px;
}
.role-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.role-map article {
  padding: 28px 20px;
}
.role-map article:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}
.role-map article:nth-child(odd) {
  border-right: 1px solid var(--line);
}
.role-map h3 {
  font-family: var(--display);
  font-size: 26px;
}
.role-map p {
  font-size: 14px;
  margin: 0;
  color: var(--muted);
}
.section {
  padding-top: 52px;
  margin-top: 30px;
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}
.test-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 30px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.test-row .meta {
  font-size: 14px;
  color: var(--muted);
}
.test-row h3 {
  font: 600 29px var(--display);
}
.test-row p {
  margin-bottom: 0;
}
.status {
  font-size: 13px;
  display: inline-block;
  color: var(--accent);
  margin-bottom: 8px;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.price {
  font: 500 36px var(--display);
  font-variant-numeric: tabular-nums;
  margin: 6px 0 20px;
}
.price span {
  font: 400 13px var(--text);
  color: var(--muted);
  display: block;
  margin-top: 5px;
}

.sample {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.sample h3 {
  font-family: var(--display);
  font-size: 25px;
}
.sample-label {
  font-size: 13px;
  color: var(--accent);
}
.narrow {
  max-width: 720px;
  margin: 0 auto;
}
.back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--muted);
}
.form-panel {
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.form-panel label {
  display: block;
  font-weight: 600;
  margin: 20px 0 8px;
}
input,
select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px 14px;
  caret-color: var(--accent);
}
input::placeholder {
  color: var(--muted);
}
.form-panel button {
  margin-top: 24px;
}
.error {
  color: #9d3327;
  margin: 16px 0 0;
}
.success {
  padding: 24px 0;
}
.quiz {
  max-width: 760px;
  margin: 0 auto;
}
.quiz-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.progress {
  height: 4px;
  background: var(--line);
  margin: 18px 0 38px;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: none;
}
.quiz h1 {
  font-size: 34px;
  line-height: 1.55;
  margin-bottom: 30px;
}
.options {
  display: grid;
  gap: 12px;
}
.option {
  display: flex;
  text-align: left;
  justify-content: flex-start;
  gap: 18px;
  min-height: 70px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 400;
  padding: 17px 20px;
  border-radius: 8px;
}
.option:hover {
  background: var(--light);
}
.option[aria-pressed="true"] {
  border: 2px solid var(--ink);
  padding: 16px 19px;
  background: var(--light);
}
.option .letter {
  font: 500 17px var(--display);
  color: var(--muted);
}
.option .chosen {
  margin-left: auto;
  font-size: 12px;
  white-space: nowrap;
}
.quiz-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  gap: 16px;
}
.save-state {
  min-height: 24px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}
.report-head {
  max-width: 760px;
  margin: 0 auto 45px;
}
.report-head h1 {
  font-size: 48px;
}
.report-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 45px;
}
.report-nav {
  position: sticky;
  top: 28px;
  align-self: start;
  display: grid;
  gap: 12px;
  font-size: 14px;
}
.report-content section {
  margin-bottom: 42px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.report-content h2 {
  font-size: 28px;
}
.report-content h3 {
  font-family: var(--display);
  font-size: 24px;
}
.report-content dl {
  margin: 20px 0;
}
.report-content dt {
  font-weight: 600;
  margin: 18px 0 6px;
}
.report-content dd {
  margin: 0;
  color: var(--muted);
}
.score-row {
  display: grid;
  grid-template-columns: 75px 1fr 48px;
  gap: 14px;
  align-items: center;
  margin: 12px 0;
  font-size: 14px;
}
.track {
  height: 8px;
  background: var(--light);
}
.track span {
  display: block;
  height: 100%;
  background: var(--ink);
}
.score-row strong {
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.report-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 25px 0;
}
.report-tabs .active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}
.locked {
  padding: 24px;
  background: var(--light);
  border-radius: 8px;
}
.locked h3 {
  font-family: var(--display);
}
.exercise {
  padding-left: 24px;
}
.exercise li {
  padding: 10px 0 10px 8px;
}
.history {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}
.demo-bar {
  background: var(--ink);
  color: var(--surface);
  padding: 12px 30px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-wrap: wrap;
}
.demo-bar select {
  width: auto;
  min-height: 36px;
  padding: 4px 10px;
  font-size: 13px;
}
.demo-bar button {
  min-height: 36px;
  font-size: 13px;
  padding: 5px 12px;
  background: var(--surface);
  color: var(--ink);
}
footer {
  border-top: 1px solid var(--line);
  padding: 26px 40px;
  max-width: 1240px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
footer .icp,
footer .police {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  text-decoration: none;
}
footer .icp:hover,
footer .police:hover {
  text-decoration: underline;
}
details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
summary {
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}
details p {
  margin: 16px 0;
}
#message:not(:empty) {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--surface);
  padding: 12px 22px;
  border-radius: 6px;
  max-width: 90%;
  z-index: 20;
}
.skip {
  position: absolute;
  top: -100px;
  background: var(--surface);
  padding: 12px;
  z-index: 30;
}
.skip:focus {
  top: 10px;
}
.loading {
  padding: 60px 0;
}
.empty {
  padding: 42px 0;
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--muted) var(--paper);
}
@media (max-width: 900px) {
  .hero {
    gap: 30px;
  }

  .test-row {
    grid-template-columns: 90px 1fr;
    gap: 20px;
  }
  .test-row .actions {
    grid-column: 2;
  }
  .report-layout {
    grid-template-columns: 1fr;
  }
  .report-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
  }
}
@media (max-width: 600px) {
  .site-header {
    padding: 20px;
    display: block;
  }
  .brand {
    font-size: 26px;
  }
  nav {
    margin-top: 16px;
    justify-content: space-between;
    gap: 10px;
  }
  nav a {
    font-size: 13px;
  }
  main {
    padding: 36px 20px 65px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 8px 0 34px;
    gap: 32px;
  }
  .hero p {
    font-size: 16px;
  }
  .hero h1 {
    font-size: 42px;
  }
  .role-map article {
    padding: 20px 16px;
  }
  .role-map h3 {
    font-size: 23px;
  }
  .section {
    padding-top: 32px;
    margin-top: 20px;
  }
  .section-head {
    display: block;
  }
  .section-head h2 {
    font-size: 28px;
  }
  .test-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 25px 0;
  }
  .test-row .actions {
    grid-column: 1;
  }
  .test-row h3 {
    font-size: 26px;
  }

  .form-panel,
  .sample {
    padding: 24px 20px;
  }
  .quiz h1 {
    font-size: 27px;
  }
  .quiz-head {
    font-size: 13px;
  }
  .option {
    gap: 12px;
    padding: 16px 14px;
  }
  .option[aria-pressed="true"] {
    padding: 15px 13px;
  }
  .option .chosen {
    display: none;
  }
  .report-head h1 {
    font-size: 36px;
  }
  .report-tabs a {
    font-size: 13px;
    padding: 10px 14px;
  }
  .score-row {
    grid-template-columns: 66px 1fr 48px;
    gap: 10px;
  }
  .demo-bar {
    padding: 12px 18px;
    justify-content: flex-start;
  }
  .demo-bar select {
    max-width: 160px;
  }
  footer {
    padding: 24px 20px;
    display: grid;
    gap: 10px;
  }
  .section-head .small {
    margin-bottom: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

main:focus {
  outline: none;
}
.test-row .meta {
  white-space: pre-line;
}

/* Account, final submission and share-card surfaces. */
button,
.button {
  min-height: 52px;
}

.account-summary {
  margin-top: 20px;
}
.account-email {
  font-family: var(--display);
  font-size: 24px;
  overflow-wrap: anywhere;
}
.archive-panel {
  margin: 28px 0;
}
.verification-note {
  background: var(--light);
  padding: 16px;
  margin-top: 20px;
  border-radius: 6px;
}
.challenge-id {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.redeem-rules {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.redeem-confirm {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.submit-confirm {
  padding: 28px;
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.submit-confirm h2 {
  font-size: 27px;
}
.result-disclaimer {
  margin-top: 32px;
  font-size: 14px;
  color: var(--muted);
}
.history-panel {
  margin: 10px 0 20px;
}
.history-panel a {
  display: inline-block;
  margin: 8px 14px 8px 0;
}
.card-layout {
  display: grid;
  grid-template-columns: minmax(0, 540px) minmax(0, 1fr);
  gap: 55px;
  align-items: start;
  margin-top: 40px;
}
.card-preview {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.card-preview canvas {
  width: 100%;
  height: auto;
  display: block;
}
.card-controls {
  padding-top: 12px;
}
.card-controls .button,
.card-controls button {
  margin: 12px 10px 12px 0;
}
.card-controls .text-link {
  display: block;
  margin: 20px 0;
}
.card-controls ul {
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}
.form-panel input[readonly] {
  background: var(--light);
}
@media (max-width: 600px) {
  nav {
    flex-wrap: wrap;
    gap: 4px 15px;
  }
  .card-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .card-controls {
    padding: 0;
  }
  .submit-confirm {
    padding: 22px 18px;
  }
  .account-email {
    font-size: 20px;
  }
  .history-panel summary {
    font-size: 13px;
  }
}

.verification-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.verification-actions button {
  margin-top: 0;
  font-size: 14px;
}
[hidden] {
  display: none !important;
}
/* Introduce first, offer the selected content only at the start step. */
.intro-meta {
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 26px;
}
.intro-page h1 {
  white-space: pre-line;
  font-size: clamp(36px, 5vw, 54px);
}
.intro-page ul {
  padding-left: 20px;
}
.intro-page li {
  padding: 5px 0;
}
.intro-start .text-link {
  display: inline-block;
  margin: 16px 20px;
}
.related-intro {
  display: block;
  margin-top: 36px;
  font-size: 14px;
  color: var(--muted);
}
.selected-product {
  margin: 32px 0;
  padding: 30px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.selected-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.selected-head h2 {
  margin: 0;
  font-size: 28px;
}
.selected-price {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}
.selected-product ul {
  padding-left: 20px;
}
.selected-product .button {
  margin-top: 20px;
}
.optional-depth {
  margin-bottom: 28px;
}
.start-page h1 {
  font-size: clamp(34px, 4vw, 48px);
}
@media (max-width: 600px) {
  .selected-head {
    align-items: flex-start;
    gap: 14px;
  }
  .selected-head h2 {
    font-size: 24px;
  }
  .selected-price {
    font-size: 30px;
  }
  .intro-start .text-link {
    margin-left: 0;
    display: block;
  }
  .intro-overview h2 {
    font-size: 28px;
  }
}

/* Multi-bank forms inherit the existing paper/ink system. */
.platform-fieldset {border:0;padding:0;margin:24px 0;min-width:0}
.platform-fieldset legend {font-family:'Songti SC','STSong',serif;font-size:clamp(23px,3.5vw,30px);line-height:1.6;margin-bottom:20px;padding:0}
.platform-fieldset label.choice {display:flex;align-items:flex-start;gap:12px;cursor:pointer;margin:12px 0}
.platform-fieldset input[type=radio] {flex:none;width:18px;height:18px;margin-top:6px;accent-color:#233e32}
.platform-fieldset label:has(input:checked) {background:#e7eadf;border-color:#233e32}

/* Operational confirmation uses a compact native checkbox, not a text field. */
.form-panel input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; margin: 0 10px 0 0; vertical-align: middle; accent-color: var(--ink, #233e32); }

.password-dialog { width: min(540px, calc(100vw - 40px)); max-height: calc(100vh - 40px); overflow: auto; padding: 30px; border: 1px solid var(--line, #c9cfc0); border-radius: 12px; background: var(--surface, #fffdf7); color: var(--ink, #233e32); }
.password-dialog::backdrop { background: rgba(35, 62, 50, .5); }
.password-dialog input { width: 100%; margin-bottom: 18px; }
.password-dialog label { display: block; margin: 12px 0 8px; }
