:root { color-scheme: light; font: 100%/1.55 "Segoe UI", system-ui, sans-serif; color: #18283e; background: #f2f5fa; --blue: #204caa; --line: #d8e1ee; --muted: #435775; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 1220px; margin: 0 auto; padding: clamp(1rem, 4vw, 3.5rem); }
.hero { background: #142945; color: #fff; border-radius: 1rem; padding: clamp(1.5rem, 5vw, 3.5rem); margin-bottom: 1.4rem; }
h1 { font-size: clamp(2rem, 5vw, 3.45rem); line-height: 1.12; letter-spacing: -.04em; margin: 0; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: stretch; }
section { min-width: 0; padding: clamp(1rem, 3vw, 1.6rem); background: #fff; border: 1px solid var(--line); border-radius: .85rem; }
h2 { margin: 0 0 .5rem; font-size: 1.4rem; line-height: 1.25; }
h3 { margin: 1rem 0 .5rem; font-size: 1rem; }
p { margin: .55rem 0 1rem; color: var(--muted); }
button, textarea, input, select { font: inherit; }
button { cursor: pointer; border: 1px solid transparent; border-radius: .48rem; background: var(--blue); color: #fff; padding: .55rem .85rem; font-weight: 650; }
button:hover:not(:disabled) { background: #193d87; }
button:disabled { background: #e4eaf3; color: #4b607d; cursor: default; }
.secondary { background: #fff; color: #1b407f; border-color: #b6c8e2; }
.secondary:hover:not(:disabled) { color: #142945; background: #eaf1fb; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.details { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .75rem; }
summary { cursor: pointer; width: fit-content; font-weight: 650; color: #214879; }
ul { padding-left: 1.35rem; margin: .45rem 0; overflow-wrap: anywhere; }
.pair-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr)); }
label { display: block; margin: .8rem 0 .4rem; font-weight: 650; }
.option { font-weight: 400; }
input[type="checkbox"] { margin-right: .4rem; accent-color: var(--blue); }
input[type="file"], textarea { max-width: 100%; width: 100%; }
textarea { display: block; padding: .8rem; resize: vertical; border: 1px solid #a0b3cd; border-radius: .5rem; color: inherit; background: #f8faff; margin-bottom: .8rem; }
.hint { font-size: .92rem; }
:focus-visible { outline: 3px solid #2465d9; outline-offset: 3px; }
.built { margin-top: 1rem; }
#status, #preview-status { color: #234473; margin: .8rem 0; }
#status:empty, #preview-status:empty { display: none; }
#try-generator { margin-top: 1.2rem; }
pre { margin: .45rem 0 .85rem; overflow: auto; max-height: min(55vh, 34rem); background: #13243c; color: #edf3ff; padding: .9rem; border-radius: .55rem; font: .88rem/1.55 ui-monospace, Consolas, monospace; }
pre code { font: inherit; }
dialog { width: min(1060px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--line); border-radius: .85rem; color: inherit; }
dialog::backdrop { background: rgb(11 28 55 / 65%); }
#example-choice, #sample-choice, #new-case-choice { max-width: 100%; padding: .45rem; color: inherit; background: #f8faff; border: 1px solid #a0b3cd; border-radius: .45rem; }
#sample-choice { margin-bottom: .75rem; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.dialog-header h2 { margin: 0; }
.example-columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem; }
.spec-preview { white-space: pre-wrap; overflow-wrap: anywhere; background: #f0f5ff; color: #18283e; }
@media (max-width: 760px) { .workspace, .example-columns { grid-template-columns: 1fr; } }

#workbook-flow { margin-bottom: 1.2rem; }
#workbook-flow input[type=file] { margin-bottom: .45rem; }
#workbook-flow button { margin-top: .55rem; }
#workbook-flow .workspace > div { min-width: 0; }
