:root {
  color-scheme: light;
  font: 1rem/1.55 system-ui, sans-serif;
  color: #1f332c;
  background: #f1f6f3;
  --forest: #173d31;
  --line: #cadbd1;
  --muted: #425c51;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 1; background: white; padding: .7rem; }
.skip:focus { top: 1rem; }
.masthead { background: var(--forest); color: white; padding: 1rem max(1.25rem, calc((100vw - 68rem) / 2)); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-size: 1.25rem; font-weight: 750; }
.brand span { background: #cde9d9; color: var(--forest); border-radius: .45rem; width: 2rem; text-align: center; }
main, footer { max-width: 70.5rem; margin: 0 auto; padding-inline: 1.25rem; }
.intro { max-width: 47rem; padding: clamp(2rem, 6vw, 4.5rem) 0 1.5rem; }
h1, h2, h3 { line-height: 1.13; color: var(--forest); margin: 0 0 .85rem; }
h1 { font-size: clamp(2.3rem, 7vw, 4.1rem); letter-spacing: -.055em; }
h2 { font-size: 1.45rem; letter-spacing: -.03em; }
.intro p { font-size: 1.12rem; max-width: 39rem; }
.intro .private, .hint, footer { color: var(--muted); font-size: .95rem; }
.workspace { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 1rem; align-items: start; }
.panel { background: white; border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 3vw, 1.6rem); min-width: 0; }
.results { grid-column: 1 / -1; }
.results pre { white-space: pre-wrap; overflow-wrap: anywhere; }
label { display: block; font-weight: 650; }
textarea, input, select { font: inherit; color: inherit; background: white; border: 1px solid #859d91; padding: .55rem .65rem; border-radius: .4rem; }
textarea, input:not([type=checkbox]) { width: 100%; margin-top: .25rem; }
textarea { resize: vertical; }
textarea#overrides, textarea#scenario-plan { font-family: ui-monospace, monospace; }
#scenario-type { display: block; width: 100%; margin: .25rem 0 .75rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.actions { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.actions select { display: block; margin-top: .25rem; }
button, .button { font: inherit; font-weight: 700; background: var(--forest); color: white; border: 1px solid var(--forest); border-radius: .42rem; padding: .5rem .85rem; cursor: pointer; text-decoration: none; display: inline-block; }
.secondary { background: white; color: var(--forest); }
button:disabled { opacity: .58; cursor: default; }
:focus-visible { outline: 3px solid #246751; outline-offset: 3px; }
.masthead :focus-visible { outline-color: white; }
details { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .8rem; }
summary { cursor: pointer; font-weight: 700; color: var(--forest); }
details label { margin-top: .75rem; }
.check { display: flex; gap: .5rem; align-items: flex-start; }
.hint { overflow-wrap: anywhere; }
#schema-studio { border: 0; padding: 0; margin: 0; min-width: 0; }
#schema-studio legend { font-weight: 700; margin-bottom: .65rem; }
.studio-table { border: 1px solid var(--line); border-radius: .6rem; padding: .8rem; margin-top: .75rem; }
.studio-table .actions { align-items: center; }
.studio-column { border-top: 1px solid var(--line); padding-top: .7rem; margin-top: .75rem; }
.studio-column .fields { margin-top: .5rem; }
.studio-column select { display: block; width: 100%; margin-top: .25rem; min-width: 0; }
.studio-column .hint { margin: .4rem 0 0; }
#status { min-height: 1.55em; margin-bottom: .55rem; }
#status.error { color: #972d22; font-weight: 650; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .8rem; }
.metrics div { background: #edf5f0; padding: .75rem; border-radius: .5rem; }
.metrics dt { color: var(--muted); font-size: .92rem; }
.metrics dd { margin: .15rem 0 0; font-weight: 750; font-size: 1.2rem; }
.table-scroll { overflow-x: auto; margin-top: .6rem; }
table { border-collapse: collapse; text-align: left; width: 100%; font-size: .9rem; }
th, td { padding: .45rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
footer { margin-block: 2rem; }
@media (max-width: 48rem) { .workspace { grid-template-columns: 1fr; } }
@media (max-width: 24rem) { .fields { grid-template-columns: 1fr; } }
