:root {
  --paper: #fff; --ink: #202d40; --muted: #68778a; --line: #dfe5ee; --soft: #f5f7fb;
  --accent-blue: #285f9d; --accent-soft: #edf3fb; --rust: #974a31; --rust-soft: #fcf5f1;
  --header: 68px; --rail: 216px; --radius: 6px; --journey-height: 60px;
  font-family: "Avenir Next", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-synthesis: none; letter-spacing: 0; color: var(--ink); background: #fff; color-scheme: light;
  scroll-padding-top: 145px;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.8; font-size: 15px; background: #fff; }
button, input, textarea, select { font: inherit; }
button, a, summary, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button, a { touch-action: manipulation; }
a { color: var(--accent-blue); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent-blue); outline-offset: 4px; }
[hidden] { display: none !important; }
svg { width: 18px; height: 18px; stroke-width: 1.7; flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, h4, p, li, dd, label { overflow-wrap: anywhere; }
h1, h2, h3, h4 { line-height: 1.4; font-weight: 600; }
h1 { font-size: 34px; margin: 8px 0 16px; }
h2 { font-size: 25px; margin: 8px 0 14px; }
h3 { font-size: 18px; margin: 8px 0 12px; }
h4 { font-size: 14px; margin: 16px 0 6px; }
p { margin: 10px 0; }
.skip { position: fixed; left: 16px; top: 8px; transform: translateY(-160%); z-index: 100; background: #fff; padding: 10px 16px; }
.skip:focus { transform: translateY(0); }
.topbar { height: var(--header); display: flex; align-items: center; gap: 18px; padding: 0 28px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; background: #fff; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 650; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 5px; color: #fff; background: var(--accent-blue); }
.header-divider { height: 18px; border-left: 1px solid var(--line); }
.header-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.header-status { margin-left: auto; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; text-align: right; }
.external-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; text-decoration: none; white-space: nowrap; min-height: 44px; }
.layout { max-width: 1600px; min-height: calc(100dvh - var(--header)); display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); margin: auto; }
.rail { position: sticky; top: var(--header); height: calc(100dvh - var(--header)); display: flex; flex-direction: column; border-right: 1px solid var(--line); padding: 30px 18px 22px; overflow-y: auto; background: #fff; }
.rail-label { font-size: 10px; color: var(--muted); font-weight: 650; margin: 0 10px 20px; }
.rail nav ol { list-style: none; padding: 0; margin: 0; }
.rail nav li { margin: 2px 0; }
.journey-button { border: 0; border-left: 2px solid transparent; border-radius: 0 4px 4px 0; background: none; color: var(--muted); width: 100%; text-align: left; padding: 10px; display: flex; align-items: center; gap: 12px; }
.journey-number { width: 24px; height: 24px; display: grid; place-items: center; font-size: 11px; border: 1px solid var(--line); border-radius: 50%; flex-shrink: 0; }
.journey-number svg { width: 14px; height: 14px; }
.journey-button strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.5; }
.journey-button small { display: block; font-size: 11px; line-height: 1.6; }
.journey-button:disabled { opacity: .5; }
.journey-button[aria-current="step"] { background: var(--accent-soft); border-left-color: var(--accent-blue); color: var(--accent-blue); }
.journey-button[aria-current="step"] .journey-number { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }
.journey-button:not(:disabled):hover { background: var(--soft); }
.journey-button[data-complete="true"] .journey-number { color: var(--accent-blue); border-color: var(--accent-blue); }
.journey-button[aria-current="step"][data-complete="true"] .journey-number { color: #fff; }
.rail-bottom { margin-top: auto; padding: 40px 10px 0; }
.rail-bottom a, .rail-bottom button { display: flex; align-items: center; gap: 8px; font-size: 12px; text-decoration: none; }
.rail-bottom p { color: var(--muted); font-size: 11px; margin-top: 24px; }
main { padding: 40px 46px 0; min-width: 0; max-width: 1180px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; }
#stage { flex: 1; min-width: 0; }
.stage-view { animation: reveal .24s ease-out both; }
.stage-back { margin: -8px 0 18px; }
.stage-back .text-button { color: var(--accent-blue); }
.stage-back span { border-left: 1px solid var(--line); padding-left: 10px; margin-left: 4px; color: var(--muted); font-size: 11px; }
.stage-heading { margin-bottom: 30px; max-width: 760px; }
.stage-heading > p:not(.eyebrow) { color: var(--muted); font-size: 14px; }
.mode-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 960px; }
.mode-option { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 26px; background: #fff; }
.mode-option.selected { border-color: var(--accent-blue); background: #f7faff; }
.mode-heading { display: flex; align-items: center; gap: 10px; color: var(--accent-blue); font-size: 11px; }
.mode-heading small { margin-left: auto; font-size: 11px; }
.mode-option h2 { margin-top: 18px; font-size: 24px; }
.mode-option > p:not(.mode-path) { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.mode-option ul { flex: 1; padding-left: 18px; margin: 4px 0 24px; font-size: 13px; }
.mode-option li + li { margin-top: 8px; }
.mode-path { color: var(--muted); font-size: 11px; border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 18px; }
.mode-option .primary { align-self: flex-start; max-width: 100%; }
.mode-note { margin-top: 22px; }
.eyebrow { color: var(--accent-blue); font-size: 11px; font-weight: 650; display: flex; gap: 9px; align-items: center; margin: 0 0 10px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--accent-blue); }
.intro { max-width: 800px; margin-bottom: 34px; }
.intro .lead { font-size: 19px; color: var(--ink); margin-bottom: 8px; }
.intro p { font-size: 14px; color: var(--muted); }
.intro .actions { margin-top: 20px; }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; padding-top: 26px; border-top: 1px solid var(--line); margin: 30px 0 18px; }
.section-heading h2 { font-size: 19px; margin: 0; }
.section-heading p { color: var(--muted); font-size: 12px; margin: 0; }
.primary, .secondary, .danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius); padding: 9px 16px; min-height: 44px; font-size: 13px; font-weight: 600; text-decoration: none; line-height: 1.5; }
.primary { background: var(--accent-blue); color: #fff; border: 1px solid var(--accent-blue); }
.primary:hover { background: #204c7e; }
.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.secondary:hover { background: var(--soft); border-color: #b7c9df; }
.danger { background: var(--rust); color: #fff; border: 1px solid var(--rust); }
.primary:disabled, .secondary:disabled { opacity: .45; }
.text-button { display: inline-flex; align-items: center; gap: 7px; border: 0; padding: 8px 0; min-height: 40px; color: var(--muted); background: none; font-size: 12px; text-decoration: none; }
.text-button:hover { color: var(--accent-blue); }
.icon-button { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 5px; flex-shrink: 0; }
.icon-button:hover { color: var(--accent-blue); background: var(--accent-soft); }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 26px; }
.actions .helper { margin: 0; }
.helper { color: var(--muted); font-size: 12px; }
.scenarios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.scenario { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 22px; transition: transform .18s, border-color .18s, background .18s; min-width: 0; }
.scenario:hover { border-color: #88a6ca; transform: translateY(-2px); }
.scenario.selected { border: 2px solid var(--accent-blue); padding: 21px; background: #fcfdff; }
.scenario-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 100px; margin-bottom: 18px; }
.scenario-letter { font-size: 30px; line-height: 1; font-weight: 500; color: var(--accent-blue); }
.scenario-english { color: var(--muted); font-size: 11px; margin: 10px 0 0; }
.document-thumb { width: 67px; height: 94px; object-fit: cover; object-position: top; border: 1px solid var(--line); transform: rotate(3deg); }
.scenario h3 { font-size: 20px; margin-bottom: 14px; }
.scenario p { font-size: 13px; margin: 0 0 14px; }
.scenario .card-hook { font-size: 18px; line-height: 1.65; color: var(--accent-blue); font-weight: 500; margin: 4px 0 18px; }
.scenario .card-context { color: var(--muted); flex: 1; }
.scenario .choose-button { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 16px; }
.scenario .problem { color: var(--muted); }
.scenario .mission { border-top: 1px solid var(--line); padding-top: 14px; flex: 1; }
.mission strong { display: block; color: var(--accent-blue); font-size: 10px; margin-bottom: 5px; }
.choose-button { border: 0; background: none; display: flex; justify-content: space-between; align-items: center; padding: 10px 0 0; color: var(--accent-blue); width: 100%; font-size: 13px; font-weight: 600; min-height: 44px; }
.choose-button::after { position: absolute; content: ""; inset: 0; border-radius: var(--radius); }
.choose-button:focus-visible { outline: none; }
.scenario:has(.choose-button:focus-visible) { outline: 3px solid var(--accent-blue); outline-offset: 4px; }
.challenge-banner { position: sticky; top: var(--header); z-index: 15; margin: -40px 0 30px; padding: 12px 0; background: #fff; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.challenge-banner small { font-size: 10px; color: var(--muted); margin-right: 12px; }
.challenge-banner strong { font-size: 13px; font-weight: 600; }
.banner-actions { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; max-width: 100%; }
.banner-actions .secondary { padding: 8px 12px; font-size: 12px; }
.conversation { max-width: 760px; }
.answer-summary { display: grid; grid-template-columns: 27px minmax(0, 1fr) 44px; gap: 12px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.answer-summary > svg { color: var(--accent-blue); margin-top: 5px; }
.answer-summary small { color: var(--accent-blue); font-size: 10px; font-weight: 650; }
.answer-summary p { margin: 3px 0 0; font-size: 13px; white-space: pre-wrap; }
.question { padding: 30px 0 10px; animation: reveal .24s ease-out both; }
.question-number { color: var(--accent-blue); font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; }
.question .english { color: var(--muted); font-size: 12px; margin: 12px 0 4px; }
.question label.question-title { font-size: 23px; font-weight: 600; display: block; line-height: 1.5; margin: 0 0 20px; }
input[type="text"], input[type="url"], textarea { width: 100%; min-width: 0; background: #fff; color: var(--ink); border: 1px solid #cbd6e5; border-radius: var(--radius); padding: 12px 14px; font-size: 16px; line-height: 1.7; }
textarea { resize: vertical; min-height: 136px; }
input::placeholder, textarea::placeholder { color: #788596; }
.question textarea { min-height: 172px; background: #fcfdff; }
.field-hint { margin: 10px 0 16px; font-weight: 400; }
.field-hint > summary { width: fit-content; max-width: 100%; color: var(--accent-blue); font-size: 12px; padding: 8px 0; }
.field-hint > summary svg { width: 14px; height: 14px; margin: 0 5px 2px 2px; }
.hint-content { border-left: 2px solid var(--line); padding: 4px 0 4px 16px; max-width: 720px; }
.hint-content p, .hint-content li { color: var(--muted); font-size: 13px; line-height: 1.85; }
.hint-content p { margin: 4px 0 12px; }
.hint-content .hint-context, .hint-content .hint-caption { color: var(--accent-blue); font-size: 11px; font-weight: 600; }
.hint-content ul { list-style: none; padding: 0; margin: 0; }
.hint-content li { white-space: pre-wrap; color: var(--ink); padding: 7px 0; overflow-wrap: anywhere; }
.field + .field-hint { margin-top: -12px; margin-bottom: 24px; }
.boundary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0; align-items: start; }
.boundary-zone { border-top: 2px solid #9cacc2; padding-top: 14px; min-width: 0; }
.boundary-zone.agentCanDo { border-color: var(--accent-blue); }
.boundary-zone.humanDecides { border-color: var(--rust); }
.boundary-zone-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.boundary-zone-heading h3 { font-size: 15px; margin: 0; }
.boundary-zone-heading > span { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.boundary-zone > p { margin: 6px 0; }
.boundary-zone .field-hint { margin: 0 0 10px; }
.action-list { position: relative; list-style: none; padding: 10px; margin: 0; background: var(--soft); min-height: 120px; display: grid; gap: 10px; align-content: start; border: 1px dashed #cbd6e5; border-radius: 6px; }
.pendingActions .action-list { grid-template-columns: 1fr 1fr; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.action-list:empty::before { content: attr(data-empty); color: var(--muted); font-size: 12px; display: grid; place-items: center; height: 96px; grid-column: 1 / -1; pointer-events: none; }
.action-card { min-width: 0; border: 1px solid var(--line); border-radius: 5px; background: #fff; padding: 8px; list-style: none; }
.action-card-main { display: flex; align-items: center; gap: 6px; min-height: 44px; cursor: grab; touch-action: none; }
.action-text { font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; flex: 1; min-width: 0; }
.action-grip { display: grid; place-items: center; width: 30px; align-self: stretch; min-height: 44px; flex-shrink: 0; cursor: grab; touch-action: none; user-select: none; color: #718199; border: 0; background: transparent; padding: 0; }
.action-grip:active { cursor: grabbing; }
.action-dismiss { border: 0; background: none; color: var(--muted); display: grid; place-items: center; width: 32px; height: 40px; flex-shrink: 0; }
.action-dismiss svg { width: 14px; height: 14px; }
.action-ghost { opacity: .35; border-color: var(--accent-blue); }
.action-chosen { border-color: var(--accent-blue); }
.action-dragging { box-shadow: 0 6px 20px #202d4022; pointer-events: none; z-index: 100 !important; }
.sorting-actions .action-list { border-color: var(--accent-blue); }
.new-action { margin: 14px 0 24px; }
.new-action > label { display: block; font-size: 13px; margin-bottom: 8px; }
.action-input { display: flex; gap: 10px; align-items: center; }
.action-input .secondary { flex-shrink: 0; }
.preferences { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.preference { display: inline-flex; gap: 8px; align-items: center; background: var(--soft); border: 1px solid var(--line); border-radius: 5px; padding: 9px 12px; font-size: 12px; cursor: pointer; min-height: 44px; }
.preference:has(input:checked) { border-color: var(--accent-blue); background: var(--accent-soft); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--accent-blue); flex-shrink: 0; }
.snapshot { max-width: 760px; }
.snapshot-row { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); animation: reveal .25s ease-out both; }
.snapshot-row .icon-button { margin-left: auto; }
.snapshot-row small { color: var(--accent-blue); font-size: 10px; font-weight: 650; }
.snapshot-row p { white-space: pre-wrap; font-size: 14px; margin: 6px 0 0; }
.knowledge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.knowledge-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: background .16s, border-color .16s; }
.knowledge-card.selected { background: #f7faff; border-color: var(--accent-blue); }
.file-heading { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; }
.knowledge-card h3 { font-size: 15px; margin: 12px 0 2px; }
.filename { font-family: "SFMono-Regular", Consolas, monospace; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.knowledge-card p { font-size: 12px; margin: 12px 0 0; }
.knowledge-card ul { font-size: 12px; color: var(--muted); padding-left: 18px; margin: 10px 0 20px; flex: 1; }
.resource-actions { display: flex; gap: 6px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.resource-actions .text-button { font-size: 12px; margin-right: auto; }
.resource-actions .icon-button { width: 36px; height: 40px; }
.add-resource { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 8px; background: #fff; color: var(--muted); min-height: 40px; }
.add-resource[aria-pressed="true"] { color: var(--accent-blue); background: var(--accent-soft); border-color: var(--accent-blue); }
.add-resource svg { width: 14px; height: 14px; }
.default-tools { border: 0; padding: 0; margin: 40px 0 24px; }
.default-tools legend { font-size: 19px; font-weight: 600; padding: 0 0 12px; }
.default-tools legend span { font-size: 13px; color: var(--muted); font-weight: 400; }
.default-tool-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.default-tool { display: flex; align-items: flex-start; gap: 12px; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; cursor: pointer; }
.default-tool:has(input:checked) { border-color: var(--accent-blue); background: var(--accent-soft); }
.default-tool > span { min-width: 0; }
.default-tool strong { font-size: 14px; }
.default-tool svg { width: 18px; height: 18px; margin-right: 7px; vertical-align: middle; color: var(--accent-blue); }
.default-tool small { display: block; color: var(--muted); font-size: 12px; margin-top: 8px; }
.default-tool input { margin-top: 5px; }
.tool-recommendation { display: block; font-size: 11px; color: var(--accent-blue); margin-top: 6px; }
.resource-summary { border-top: 1px solid var(--line); padding-top: 18px; font-size: 13px; }
.selection-bar { position: fixed; bottom: 18px; left: calc(var(--rail) + 24px); right: 24px; z-index: 25; max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 12px 18px; border: 1px solid #cbd8e8; border-radius: var(--radius); background: #fff; box-shadow: 0 4px 20px #202d4012; }
.selection-bar strong { font-size: 13px; display: block; }
.selection-bar small { display: block; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.selection-bar > div { min-width: 0; }
.selection-bar button { flex-shrink: 0; }
body[data-stage="resources"] main { padding-bottom: 94px; }
.notice { padding: 14px 18px; border-left: 2px solid var(--accent-blue); background: var(--accent-soft); margin: 20px 0; font-size: 13px; border-radius: 0 4px 4px 0; }
.notice p { margin: 4px 0; }
.notice.warning { border-color: var(--rust); background: var(--rust-soft); color: #703f2d; }
.prompt-panel { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 24px 0; background: var(--soft); }
.prompt-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 5px 12px 5px 18px; border-bottom: 1px solid var(--line); background: #fff; gap: 16px; }
.prompt-toolbar strong { font-size: 11px; color: var(--accent-blue); }
.copy-button { border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: none; color: var(--accent-blue); border-radius: 4px; padding: 10px; min-width: 80px; min-height: 44px; font-size: 12px; }
.copy-button:hover { background: var(--accent-soft); }
pre { margin: 0; padding: 20px; white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; line-height: 1.9; font-size: 13px; }
code { font-family: "SFMono-Regular", Consolas, "PingFang TC", monospace; }
.generated-prompt { max-height: 440px; }
.mini-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 26px 0; }
.mini-steps li { font-size: 13px; }
.mini-steps span { display: block; color: var(--accent-blue); font-size: 11px; margin-bottom: 8px; }
.quick-check { border-top: 1px solid var(--line); padding-top: 18px; margin: 26px 0; }
.quick-check ul { columns: 2; font-size: 13px; padding-left: 20px; }
.quick-check li { margin: 5px 0; }
.confirmation { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.confirmation input { margin-top: 5px; }
.build-steps { list-style: none; padding: 0; max-width: 740px; }
.build-steps li { display: flex; gap: 20px; border-bottom: 1px solid var(--line); padding: 18px 0; }
.build-steps .number { font-size: 12px; color: var(--accent-blue); margin-top: 4px; width: 22px; flex-shrink: 0; }
.build-steps strong { font-size: 15px; }
.build-steps p { font-size: 13px; color: var(--muted); margin: 4px 0; }
.build-files { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; }
.build-files a { font-size: 12px; display: flex; align-items: center; gap: 5px; min-height: 36px; }
.build-files svg { width: 14px; height: 14px; }
body[data-stage="test"] .layout { display: block; }
body[data-stage="test"] .rail { position: sticky; top: var(--header); height: var(--journey-height); z-index: 20; padding: 8px 28px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
body[data-stage="test"] .rail-label, body[data-stage="test"] .rail-bottom { display: none; }
body[data-stage="test"] .rail ol { display: flex; justify-content: center; gap: 12px; width: max-content; margin: 0 auto; }
body[data-stage="test"] .journey-button small { display: none; }
body[data-stage="test"] .journey-button { border-left: 0; border-radius: 4px; padding: 6px 10px; }
body[data-stage="test"] main { padding-top: 32px; }
body[data-stage="test"] .challenge-banner { top: calc(var(--header) + var(--journey-height)); margin-top: -32px; flex-wrap: wrap; }
.test-layout { display: grid; grid-template-columns: 222px minmax(0, 1fr); gap: 36px; }
.test-nav { border-right: 1px solid var(--line); padding-right: 22px; }
.test-nav > p { font-size: 11px; color: var(--muted); margin-top: 0; }
.test-tab { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 10px; border: 0; border-left: 2px solid transparent; border-radius: 0 4px 4px 0; background: none; text-align: left; margin: 5px 0; }
.test-tab[aria-current="true"] { border-color: var(--accent-blue); background: var(--accent-soft); }
.test-tab strong { display: block; font-size: 13px; font-weight: 600; }
.test-tab small { display: block; color: var(--muted); font-size: 10px; }
.rating-icon { display: grid; place-items: center; width: 22px; flex-shrink: 0; color: var(--muted); }
.rating-icon.works { color: var(--accent-blue); }
.rating-icon.mostly, .rating-icon.needs { color: var(--rust); }
.test-legend { margin-top: 22px; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.test-legend span { display: flex; align-items: center; gap: 8px; }
.test-legend svg { width: 14px; height: 14px; }
.test-content { min-width: 0; }
.test-content .scenario-description { color: var(--muted); font-size: 14px; }
.watch-list { font-size: 13px; padding-left: 20px; }
.expected-answer { border-top: 1px solid var(--line); padding-top: 20px; margin: 26px 0; }
.expected-answer h3 { font-size: 17px; margin: 0 0 8px; }
.expected-reply { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.95; padding-left: 18px; border-left: 2px solid var(--accent-blue); margin: 20px 0; }
.expected-caution, .expected-artifact, .expected-fallback { font-size: 12px; line-height: 1.85; color: var(--muted); }
.expected-caution { color: var(--accent-blue); }
.expected-sources ul { list-style: none; padding: 0; margin: 0 0 8px; }
.expected-sources a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; min-height: 36px; overflow-wrap: anywhere; }
.expected-sources svg { width: 14px; height: 14px; flex-shrink: 0; }
.test-checkpoints, .expected-sources { border-top: 1px solid var(--line); }
.rating-fieldset { border: 0; border-top: 1px solid var(--line); padding: 22px 0 0; margin-top: 24px; }
.rating-fieldset legend { float: left; width: 100%; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.rating-options { clear: both; display: flex; gap: 0; flex-wrap: wrap; }
.rating-option { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); padding: 10px 15px; min-height: 46px; font-size: 13px; cursor: pointer; }
.rating-option:first-child { border-radius: 5px 0 0 5px; }
.rating-option:last-child { border-radius: 0 5px 5px 0; }
.rating-option:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-blue); color: var(--accent-blue); }
.rating-option input { margin: 0; }
.review-details { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 20px; }
summary { cursor: pointer; font-size: 13px; padding: 10px 0; }
.optional-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 14px 0; }
.optional-checks label { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.notes-label { font-size: 12px; display: block; margin-bottom: 8px; }
.review-details textarea { min-height: 90px; }
.test-complete { margin: 24px 0; padding: 20px 0; border-top: 2px solid var(--accent-blue); animation: reveal .25s ease-out; }
.test-complete strong { display: flex; align-items: center; gap: 8px; color: var(--accent-blue); }
.test-complete p { font-size: 13px; color: var(--muted); }
.share-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.field { display: block; font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.field > input, .field > textarea { display: block; font-weight: 400; margin-top: 8px; }
.field > textarea.instructions { min-height: 270px; font-family: "SFMono-Regular", Consolas, "PingFang TC", monospace; font-size: 16px; }
.field small { color: var(--muted); font-weight: 400; }
.gallery-side { position: sticky; top: 100px; }
.gallery-side > p { font-size: 10px; color: var(--muted); margin-top: 0; }
.gallery-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery-cover { height: 130px; background: var(--soft); border-bottom: 1px solid var(--line); padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.gallery-cover img { width: 63px; height: 89px; object-fit: cover; object-position: top; border: 1px solid var(--line); }
.gallery-cover strong { color: var(--accent-blue); font-size: 12px; }
.gallery-body { padding: 22px; }
.gallery-body h3 { font-size: 20px; margin: 0 0 14px; }
.gallery-body > p { color: var(--muted); font-size: 13px; white-space: pre-wrap; }
.gallery-meta { font-size: 11px; color: var(--muted); padding-top: 14px; border-top: 1px solid var(--line); margin-top: 20px; }
.gallery-link { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; margin-top: 10px; }
.local-note { color: var(--muted); font-size: 11px; }
.share-resources { border-top: 1px solid var(--line); padding: 18px 0; margin-top: 24px; }
.share-resources h3 { font-size: 14px; }
.share-resources p { font-size: 13px; }
.share-resources ul { font-size: 12px; color: var(--muted); padding-left: 18px; }
.finish-screen { max-width: 760px; margin: 24px 0 60px; }
.finish-mark { width: 50px; height: 50px; display: grid; place-items: center; background: var(--accent-soft); border-radius: 50%; color: var(--accent-blue); margin-bottom: 24px; animation: reveal .24s ease-out; }
.finish-mark svg { width: 25px; height: 25px; }
.finish-screen .stats { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--muted); padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 24px 0; }
.finish-screen h1 { overflow-wrap: anywhere; }
footer { margin-top: 48px; padding: 22px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; display: flex; justify-content: space-between; gap: 16px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; background: #fff; color: var(--accent-blue); border: 1px solid var(--line); box-shadow: 0 4px 20px #202d4015; border-radius: 6px; padding: 12px 18px; max-width: calc(100% - 32px); font-size: 13px; pointer-events: none; }
body[data-stage="resources"] .toast { bottom: 110px; }
dialog { color: var(--ink); border: 1px solid var(--line); padding: 0; background: #fff; }
dialog::backdrop { background: #202d4055; }
.scenario-dialog { width: min(1140px, calc(100% - 40px)); max-width: none; height: min(900px, calc(100dvh - 40px)); max-height: calc(100dvh - 40px); border-radius: 8px; overflow: hidden; }
.scenario-dialog[open] { animation: reveal .2s ease-out; }
#scenario-body { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.scenario-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 28px 16px; flex-shrink: 0; }
.scenario-header .eyebrow { font-size: 10px; margin-bottom: 5px; }
.scenario-header h2 { font-size: 26px; margin: 0; }
.scenario-subtitle { margin: 5px 0 0; font-size: 13px; color: var(--muted); }
.scenario-switcher { display: flex; gap: 0; padding: 0 28px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.scenario-switcher button { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; min-height: 46px; padding: 10px 18px; border: 0; border-bottom: 2px solid transparent; background: #fff; color: var(--muted); }
.scenario-switcher button[aria-pressed="true"] { border-bottom-color: var(--accent-blue); color: var(--accent-blue); background: var(--accent-soft); }
.scenario-switcher button:hover { background: var(--soft); }
.scenario-switcher button span { font-size: 11px; font-weight: 600; }
.scenario-layout { display: grid; grid-template-columns: 1fr 1fr; overflow-y: auto; min-height: 0; flex: 1; overscroll-behavior: contain; }
.scenario-dialogue { min-width: 0; background: #f1f5fb; padding: 26px 24px; border-right: 1px solid var(--line); }
.dialogue-heading { display: flex; align-items: flex-start; gap: 10px; }
.dialogue-heading > svg { margin-top: 3px; color: var(--accent-blue); }
.dialogue-heading h3 { font-size: 13px; margin: 0; }
.dialogue-heading p { color: var(--muted); font-size: 10px; margin: 4px 0 0; }
.dialogue-messages { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-direction: column; gap: 19px; }
.dialogue-message { display: flex; align-items: flex-start; gap: 8px; max-width: 94%; animation: reveal .24s ease-out both; animation-delay: calc(var(--turn) * 45ms); }
.dialogue-message.human { align-self: flex-end; flex-direction: row-reverse; }
.dialogue-message.agent { align-self: flex-start; }
.speaker-avatar { flex-shrink: 0; width: 27px; height: 27px; margin-top: 23px; border: 1px solid #d5e0ef; border-radius: 50%; display: grid; place-items: center; color: var(--accent-blue); background: #fff; }
.speaker-avatar svg { width: 14px; height: 14px; }
.message-copy { min-width: 0; }
.speaker-name { display: block; font-size: 10px; color: var(--muted); margin-bottom: 5px; }
.human .speaker-name { text-align: right; }
.message-copy p { margin: 0; font-size: 13px; line-height: 1.8; background: #fff; border: 1px solid #dfe7f1; border-radius: 6px; padding: 12px 14px; }
.human .message-copy p { background: #e5edf9; border-color: #d5e0ef; }
.dialogue-question { border-top: 1px solid #d5e0ef; padding-top: 18px; }
.dialogue-question span { font-size: 10px; color: var(--accent-blue); font-weight: 600; }
.dialogue-question p { font-size: 13px; margin: 6px 0 0; }
.scenario-brief { min-width: 0; padding: 24px 30px; }
.scenario-brief section { padding: 0 0 20px; }
.scenario-brief h3 { font-size: 12px; color: var(--accent-blue); margin: 0 0 8px; }
.scenario-brief p, .scenario-brief li { font-size: 13px; line-height: 1.9; margin: 0; }
.scenario-brief ul { padding-left: 18px; margin: 0; }
.scenario-brief li + li { margin-top: 7px; }
.scenario-brief .scenario-mission { border-left: 2px solid var(--accent-blue); padding: 4px 0 4px 16px; margin: 0 0 22px; }
.scenario-decisions { border-top: 1px solid var(--line); }
.scenario-decisions summary { font-size: 12px; color: var(--accent-blue); }
.scenario-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px; margin: 0; background: #fff; border-top: 1px solid var(--line); flex-shrink: 0; }
.scenario-footer > span { color: var(--muted); font-size: 11px; margin-left: auto; }
.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(660px, 92%); max-width: none; border: 0; border-left: 1px solid var(--line); }
.drawer[open] { animation: drawer-in .25s ease-out; }
#preview-body { height: 100%; display: flex; flex-direction: column; }
.drawer-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { font-size: 18px; margin: 0; }
.drawer-content { padding: 22px 24px; overflow-y: auto; flex: 1; }
.drawer-content > p, .drawer-content li { font-size: 13px; }
.drawer-content .meta { color: var(--muted); font-size: 11px; }
.pdf-cover { display: block; width: min(220px, 100%); height: auto; border: 1px solid var(--line); margin: 20px auto; }
.drawer details { margin-top: 22px; border-top: 1px solid var(--line); }
.pdf-object { display: block; width: 100%; height: 540px; border: 1px solid var(--line); background: var(--soft); }
.drawer-actions { display: flex; align-items: center; gap: 12px; justify-content: space-between; border-top: 1px solid var(--line); padding: 16px 24px; background: #fff; }
.confirm-dialog { max-width: min(480px, calc(100% - 32px)); border-radius: 8px; padding: 28px; }
.confirm-dialog h2 { font-size: 22px; }
.confirm-dialog p { font-size: 14px; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes drawer-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@media (max-width: 1200px) { :root { --rail: 190px; } main { padding: 32px 28px 0; } .challenge-banner { margin-top: -32px; } .header-label, .header-divider { display: none; } .scenarios { gap: 12px; } .scenario { padding: 18px; } .scenario.selected { padding: 17px; } .knowledge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .share-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 28px; } }
@media (max-width: 960px) { .scenarios { grid-template-columns: 1fr; } .scenario-top { min-height: 75px; margin-bottom: 8px; } .document-thumb { width: 50px; height: 70px; } .scenario h3 { margin: 6px 0 12px; } .scenario .mission { border: 0; padding-top: 0; } .scenario .problem { margin-bottom: 12px; } .share-layout { grid-template-columns: 1fr; } .gallery-side { position: static; max-width: 400px; } .mini-steps { gap: 16px; } }
@media (max-width: 760px) {
  :root { --header: 60px; --rail: 0px; --journey-height: 52px; scroll-padding-top: 230px; }
  .topbar { padding: 0 16px; gap: 12px; }
  .brand { font-size: 13px; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .header-status { font-size: 10px; line-height: 1.5; max-width: 120px; }
  .topbar .external-link { display: none; }
  .layout { display: block; }
  .rail, body[data-stage="test"] .rail { position: sticky; top: var(--header); z-index: 25; height: var(--journey-height); padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); overflow: auto; scrollbar-width: thin; }
  .rail-label, .rail-bottom { display: none; }
  .rail nav ol, body[data-stage="test"] .rail ol { display: flex; gap: 6px; justify-content: flex-start; width: max-content; }
  .journey-button, body[data-stage="test"] .journey-button { gap: 7px; padding: 5px 8px; border-left: 0; border-radius: 4px; white-space: nowrap; }
  .journey-button small { display: none; }
  .journey-button strong { font-size: 12px; }
  .journey-number { width: 20px; height: 20px; font-size: 10px; }
  main, body[data-stage="test"] main { padding: 28px 22px 0; }
  .challenge-banner { top: calc(var(--header) + var(--journey-height)); margin: -12px 0 22px; padding: 10px 0; flex-wrap: wrap; }
  .challenge-banner small { display: block; }
  h1 { font-size: 28px; }
  .stage-heading h1 { font-size: 27px; }
  .stage-heading { margin-bottom: 24px; }
  .mode-options { grid-template-columns: 1fr; gap: 16px; }
  .mode-option { padding: 22px; }
  .intro .lead { font-size: 17px; }
  .selection-bar { left: 12px; right: 12px; bottom: 12px; padding: 12px; gap: 12px; }
  .selection-bar small { display: none; }
  .selection-bar strong { font-size: 12px; }
  .selection-bar .primary { padding: 10px 12px; font-size: 12px; }
  .test-layout { display: block; }
  .test-nav { border: 0; padding: 0; margin-bottom: 26px; }
  .test-nav > p { display: none; }
  .test-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 5px; }
  .test-tab { flex: 0 0 auto; width: auto; border-left: 0; border-bottom: 2px solid transparent; padding: 8px 12px; margin: 0; }
  .test-tab strong { font-size: 12px; }
  .test-legend { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
  .drawer { width: 100%; border: 0; }
  .drawer-header, .drawer-content { padding: 18px; }
  .drawer-actions { padding: 14px 18px; }
  .scenario-dialog { width: calc(100% - 20px); height: calc(100dvh - 20px); max-height: calc(100dvh - 20px); }
  .scenario-header { padding: 16px; gap: 10px; }
  .scenario-header h2 { font-size: 22px; }
  .scenario-subtitle { font-size: 12px; }
  .scenario-switcher { padding: 0 10px; }
  .scenario-switcher button { flex: 1; font-size: 11px; padding: 9px 5px; gap: 4px; }
  .scenario-layout { grid-template-columns: 1fr; }
  .scenario-dialogue { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 16px; }
  .scenario-brief { padding: 22px 20px; }
  .scenario-footer { padding: 12px; gap: 8px; }
  .scenario-footer > span { display: none; }
  .scenario-footer > button { flex: 1; padding: 9px 10px; font-size: 12px; }
  .mobile-reset { display: inline-flex; }
}
@media (max-width: 520px) {
  .knowledge-grid, .boundary-grid, .default-tool-options, .pendingActions .action-list { grid-template-columns: 1fr; }
  .boundary-grid { gap: 22px; }
  .action-input { flex-wrap: wrap; }
  .action-input input { flex: 1 1 180px; }
  .question label.question-title { font-size: 21px; }
  .question textarea { min-height: 160px; }
  .section-heading { flex-direction: column; gap: 5px; align-items: start; }
  .mini-steps { grid-template-columns: 1fr; gap: 12px; }
  .mini-steps li { display: flex; align-items: baseline; gap: 14px; }
  .mini-steps span { margin: 0; }
  .quick-check ul { columns: 1; }
  .rating-option { padding: 9px 10px; gap: 6px; font-size: 12px; }
  .optional-checks { grid-template-columns: 1fr; }
  .answer-summary { gap: 8px; grid-template-columns: 20px minmax(0, 1fr) 36px; }
  .answer-summary .icon-button { width: 36px; height: 36px; }
  .actions { gap: 10px; }
  pre { padding: 16px; font-size: 12px; }
  footer { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }