:root {
  color-scheme: light;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: #f4f7fa;
  color: #182838;
  --accent: #155d67;
  --accent-strong: #104951;
  --tint: #e8f4f2;
  --muted: #526476;
  --line: #d8e2e9;
  --surface: #fff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.6; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid #137a86; outline-offset: 3px; }
.page-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1080px; padding: 25px 24px; margin: auto; display: flex; align-items: center; gap: 14px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.35rem, 3vw, 1.875rem); line-height: 1.35; letter-spacing: -.025em; }
h2 { font-size: 1.23rem; line-height: 1.4; }
h3 { font-size: 1.02rem; }
.header-mark { display: grid; align-content: center; gap: 4px; justify-items: start; width: 36px; height: 36px; padding: 9px; border-radius: 10px; background: var(--accent); flex: none; }
.header-mark i { height: 2px; width: 100%; border-radius: 2px; background: #fff; }
.header-mark i:last-child { width: 65%; }

.layout { display: grid; grid-template-columns: 188px minmax(0, 1fr); align-items: start; gap: 36px; max-width: 1080px; margin: 32px auto 56px; padding: 0 24px; }
.section-nav { display: grid; gap: 4px; position: sticky; top: 24px; }
.section-nav a { padding: 10px 15px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: .9rem; }
.section-nav a:hover { background: #eaf0f4; }
.section-nav a[aria-current] { background: #e1efed; color: var(--accent-strong); font-weight: 700; }
form { min-width: 0; }
.card { padding: 25px 30px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 16px; scroll-margin-top: 20px; }
.card > h2 { padding-bottom: 15px; border-bottom: 1px solid #e8edf1; margin-bottom: 20px; }
.question { margin: 0 0 18px; min-inline-size: 0; }
.question:last-child { margin-bottom: 0; }
fieldset.question { border: 0; padding: 0; }
.question > label, legend { display: block; font-size: .96rem; font-weight: 650; padding: 0; }
.question > label { margin-bottom: 7px; }
.hint { color: var(--muted); font-size: .875rem; margin: 4px 0 9px; }
.card > .hint { margin-top: -5px; margin-bottom: 16px; }
.question input[type="text"] { display: block; width: 100%; height: 43px; border: 1px solid #cbd8e2; border-radius: 8px; padding: 8px 12px; background: #fff; color: inherit; }
.question input::placeholder { color: #617385; font-size: .88rem; opacity: 1; }
.product-inputs { display: grid; gap: 8px; }
.text-button { color: var(--accent-strong); background: none; border: 0; padding: 5px 0; margin-top: 7px; font-size: .875rem; font-weight: 650; }
.text-button:hover { text-decoration: underline; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.choice { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 11px; border: 1px solid #d2dde5; border-radius: 8px; background: #fff; font-size: .875rem; cursor: pointer; overflow-wrap: anywhere; }
.choice:hover { border-color: var(--accent); }
.choice:has(:checked) { color: var(--accent-strong); border-color: var(--accent); background: var(--tint); }
.choice input { margin: 0; width: 15px; height: 15px; flex: none; accent-color: var(--accent); }
.clear { margin: 0 3px; align-self: center; }
.branch { border-inline-start: 2px solid #c3e1dc; margin-top: 17px; padding-left: 16px; }
.market-details { display: grid; gap: 12px; }
.market-card { background: #f6f9fb; padding: 15px 16px 18px; border: 1px solid #e1e9ef; border-radius: 10px; min-width: 0; }
.market-card h3 { margin-bottom: 13px; color: var(--accent-strong); }
.market-card .question { margin-bottom: 13px; }
.market-card .question:last-child { margin-bottom: 0; }

.file-question input { width: 100%; color: var(--muted); padding: 10px; border: 1px dashed #b0c4d1; border-radius: 8px; font-size: .875rem; background: #f9fbfc; }
input::file-selector-button { background: var(--tint); color: var(--accent-strong); font: inherit; font-weight: 650; border: 1px solid #bdd8d5; border-radius: 6px; padding: 7px 11px; margin-right: 10px; cursor: pointer; }
.file-list { padding-left: 20px; margin: 7px 0 0; font-size: .875rem; overflow-wrap: anywhere; }
.form-actions { display: flex; justify-content: end; padding-top: 4px; }
.primary { color: #fff; background: var(--accent); border: 1px solid var(--accent); border-radius: 9px; min-height: 44px; font-weight: 650; padding: 9px 20px; }
.primary:hover { background: var(--accent-strong); }

dialog { padding: 0; color: inherit; width: min(640px, calc(100% - 24px)); max-height: min(85dvh, 760px); border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 20px 50px #18374532; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #152f4480; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.dialog-body { overflow: auto; padding: 12px 22px 22px; }
.dialog-actions { padding: 13px 22px; display: flex; justify-content: end; border-top: 1px solid var(--line); }
.close { border: none; border-radius: 8px; background: #eef3f6; min-width: 36px; min-height: 36px; font-size: 1.35rem; line-height: 1; color: inherit; }
.review-section { margin-top: 18px; }
.review-section dl { margin: 5px 0 0; }
.review-section dl div { display: grid; grid-template-columns: minmax(90px, 28%) minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px solid #edf1f4; font-size: .9rem; }
.review-section dt { color: var(--muted); }
.review-section dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .layout { display: block; margin: 20px auto 38px; padding: 0 14px; }
  .header-inner { padding: 18px 16px; }
  .section-nav { position: static; display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 13px; }
  .section-nav a { padding: 6px 8px; }
  .card { padding: 18px 16px 20px; margin-bottom: 12px; }
  .card > h2 { padding-bottom: 12px; margin-bottom: 15px; }
  .branch { padding-left: 10px; }
  .market-card { padding: 12px 10px; }
  .form-actions .primary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
