:root {
  color-scheme: light;
  --paper: #f5f5ef;
  --surface: #fffefa;
  --ink: #193447;
  --muted: #596b72;
  --teal: #176b65;
  --soft: #eaf2ee;
  --line: #d9dfd9;
  --warm: #8c6036;
  --error: #a13c31;
  --mono: "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 16px; line-height: 1.7; }
button, input, textarea { font: inherit; }
a { color: var(--teal); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
button, summary { cursor: pointer; }
button { min-height: 46px; border: 0; border-radius: 7px; font-weight: 600; transition: background-color 160ms, box-shadow 160ms; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 4px; }
[hidden] { display: none !important; }
.skip-link { position: absolute; top: -100px; left: 16px; padding: 12px 20px; background: var(--ink); color: white; z-index: 5; }
.skip-link:focus { top: 12px; }
.site-shell { width: min(1120px, calc(100% - 64px)); margin: auto; }
.masthead { min-height: 106px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { flex-shrink: 0; }
.brand b { font-family: Georgia, "Songti SC", serif; font-size: 21px; letter-spacing: 1px; }
.brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; gap: 8px; }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 42px 0 28px; }
.eyebrow { margin: 0 0 12px; font-family: var(--mono); letter-spacing: 1.8px; font-size: 10px; font-weight: 600; color: var(--muted); }
h1 { margin: 0 0 16px; font-family: Georgia, "Songti SC", "SimSun", serif; font-size: clamp(32px, 3.6vw, 44px); font-weight: 600; line-height: 1.4; letter-spacing: -.8px; }
.accent { color: var(--teal); }
.hero-description { color: var(--muted); font-size: 14px; margin: 0; }
.hero-note { border-left: 1px solid var(--line); padding: 8px 0 8px 28px; display: flex; align-items: flex-start; gap: 20px; }
.note-index { font-family: var(--mono); color: var(--teal); white-space: nowrap; font-size: 12px; }
.hero-note p { margin: 0; font-size: 13px; color: var(--muted); }
.service-note { border-left: 3px solid var(--teal); background: var(--soft); padding: 10px 16px; margin-bottom: 24px; font-size: 13px; color: var(--ink); }
.workspace { display: grid; grid-template-columns: 1.08fr 1fr; gap: 26px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px; box-shadow: 0 12px 28px #19344704, 0 2px 4px #19344703; min-width: 0; }
.submission-panel { border-top: 3px solid var(--ink); }
.progress-panel { border-top: 3px solid var(--teal); }
.section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.step-number { font: 12px var(--mono); color: var(--teal); border: 1px solid var(--line); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; }
h2 { margin: 0; font-size: 20px; font-weight: 600; }
h3 { margin: 0 0 10px; font-size: 18px; }
.section-tag { margin-left: auto; color: var(--muted); font: 10px var(--mono); letter-spacing: 1px; }
.section-description { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; }
input, textarea { width: 100%; min-width: 0; color: var(--ink); background: #fdfdf9; border: 1px solid #becbc7; border-radius: 6px; padding: 12px 14px; font-size: 16px; }
input { min-height: 48px; }
textarea { resize: vertical; min-height: 116px; line-height: 1.65; }
input::placeholder, textarea::placeholder { color: #6a797c; opacity: 1; }
input:focus, textarea:focus { border-color: var(--teal); }
.field-hint { color: var(--muted); font-size: 12px; margin: 8px 0 16px; }
.help { margin-top: 18px; background: #f3f5ef; border-radius: 6px; padding: 0 14px; font-size: 13px; }
summary { min-height: 44px; padding: 11px 0; font-weight: 500; }
.help ol { padding-left: 20px; margin: 8px 0; }
.help li { padding-bottom: 9px; }
.help p { padding-bottom: 14px; color: var(--muted); }
.form-divider { height: 1px; background: var(--line); margin: 26px 0; }
.primary-button { display: flex; align-items: center; justify-content: space-between; width: 100%; background: var(--ink); color: #fff; padding: 12px 18px; margin-top: 20px; }
.primary-button:hover:not(:disabled) { background: #254d61; }
.secondary-button { background: var(--soft); border: 1px solid #bfcec7; color: var(--teal); padding: 10px 20px; }
.secondary-button:hover:not(:disabled) { background: #dcebe3; }
.privacy-note { font-size: 11px; color: var(--muted); margin: 16px 0 0; }
.right-column { display: grid; gap: 26px; min-width: 0; }
.lookup-row { display: flex; gap: 10px; }
.lookup-row button { flex-shrink: 0; }
.status-pill { margin-left: auto; font-size: 11px; padding: 4px 9px; border-radius: 4px; background: #eef1ee; color: var(--muted); }
.status-pill.success { background: #e5f1e8; color: #25603d; }
.status-pill.failed { background: #faeae5; color: var(--error); }
.status-pill.review { background: #f6eddb; color: #79521d; }
.status-pill.queued, .status-pill.sending, .status-pill.processing { background: var(--soft); color: var(--teal); }
.result-placeholder { padding: 30px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.large-index { display: block; font: italic 64px Georgia, serif; line-height: 1.2; color: #c1d1ca; margin-bottom: 14px; }
.result-placeholder p { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.result-placeholder .eyebrow { font-size: 9px; }
.order-result { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.order-advice { font-size: 14px; color: var(--teal); }
.server-message { font-size: 13px; padding: 12px; border-left: 2px solid var(--line); background: #f5f6f1; white-space: pre-wrap; }
.order-meta { margin: 20px 0; font-size: 12px; }
.order-meta div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 6px 0; }
dt { color: var(--muted); } dd { margin: 0; }
.feedback { padding: 12px 14px; margin: 16px 0; background: var(--soft); border-left: 3px solid var(--teal); color: #20554d; font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.feedback.error { background: #fbefea; border-color: var(--error); color: #81382f; }
.notes-panel { padding: 0 14px; }
.notes-panel h2 { font-size: 18px; margin-bottom: 12px; }
.notes-panel details { border-bottom: 1px solid var(--line); font-size: 13px; }
.notes-panel p:not(.eyebrow) { color: var(--muted); margin-top: 0; }
footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 22px 0 30px; display: flex; justify-content: space-between; gap: 24px; font-size: 10px; color: var(--muted); }
footer p { max-width: 520px; margin: 0; }
.footer-divider { padding: 0 9px; }
.admin-shell { max-width: 1040px; }
.admin-hero { padding-bottom: 28px; }
.admin-hero h1 { font-size: 34px; }
.token-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0; }
.admin-grid .section-description { margin: 12px 0 18px; }
.code-output { margin-top: 20px; }
.code-output textarea { min-height: 150px; font-family: var(--mono); font-size: 13px; }
.table-wrap { overflow-x: auto; margin-top: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
th { color: var(--muted); font-weight: 500; white-space: nowrap; }
td { min-width: 90px; max-width: 260px; }
.table-caption { text-align: left; padding: 8px 0; color: var(--muted); }
@media (max-width: 900px) { .site-shell { width: calc(100% - 40px); } .workspace { gap: 18px; } .panel { padding: 22px; } .section-tag { display: none; } .hero-note { gap: 12px; padding-left: 18px; } }
@media (max-width: 680px) {
  .site-shell { width: calc(100% - 32px); }
  .masthead { min-height: 90px; flex-wrap: wrap; padding: 16px 0; gap: 8px 16px; }
  .brand b { font-size: 18px; } .brand small { font-size: 10px; }
  .hero { padding: 28px 0 24px; } .hero-note { display: none; }
  .hero-description { font-size: 13px; }
  .workspace, .admin-grid { grid-template-columns: 1fr; gap: 20px; }
  .panel { padding: 22px 18px; } .section-heading { gap: 8px; }
  h2 { font-size: 18px; } .result-placeholder { padding: 24px 0 18px; }
  .notes-panel { padding: 0 8px; } footer { display: block; } footer p { margin-top: 12px; }
  .token-row { grid-template-columns: 1fr 1fr; } .token-row input { grid-column: 1 / -1; }
  .lookup-row { gap: 8px; } .lookup-row button { padding: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
