:root {
  color-scheme: dark;
  --bg: #080e16;
  --surface: #101b28;
  --surface-alt: #0c1621;
  --line: #2b4053;
  --ink: #edf5fc;
  --soft: #b7c9da;
  --teal: #7de5d3;
  font: 16px/1.55 system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
header, footer { display: flex; justify-content: space-between; gap: 16px; padding-block: 20px; align-items: center; }
header { border-bottom: 1px solid var(--line); }
footer { border-top: 1px solid var(--line); margin-top: 64px; color: var(--soft); font-size: .85rem; }
nav, .hero-links { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; }
a { color: var(--teal); text-underline-offset: .24em; }
.brand { text-decoration: none; font-weight: 730; color: var(--ink); display: inline-flex; align-items: center; gap: .7rem; white-space: nowrap; }
.mark { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--teal); color: var(--teal); border-radius: 9px; font-size: .85rem; letter-spacing: .05em; }
nav a { text-decoration: none; color: var(--soft); font-size: .93rem; }
nav a:hover { color: var(--teal); }
.hero { padding-block: 64px 42px; }
.hero > p:not(.eyebrow) { max-width: 57ch; font-size: 1.12rem; }
.hero-links { margin-top: 18px; }
.eyebrow { color: var(--teal); font-size: .74rem; font-weight: 730; letter-spacing: .11em; }
h1, h2, h3, p { margin: 0 0 .65em; }
h1, h2, h3 { line-height: 1.12; }
h1 { font-size: clamp(2.6rem, 6.7vw, 5.4rem); letter-spacing: -.06em; margin-bottom: .23em; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.25rem); letter-spacing: -.04em; }
h3 { font-size: 1.15rem; letter-spacing: -.02em; }
p { color: var(--soft); }
section { scroll-margin-top: 14px; }
main > section + section:not(.tool) { margin-top: 48px; }
.panel { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); padding: clamp(16px, 3vw, 27px); min-width: 0; }
.tool { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 18px; }
.guide, .tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.guide a { display: block; margin-top: 9px; }
.guide textarea { margin: 9px 0 14px; }
.idea-grid, .references { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.references { margin-top: 16px; }
.reference { text-decoration: none; display: grid; gap: 5px; }
.reference span { color: var(--soft); }
.section-top { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin-bottom: 12px; }
.section-top > div { max-width: 72ch; }
.section-top select { display: block; margin-top: 5px; }
.idea { display: flex; flex-direction: column; }
.idea dl { margin: 3px 0 12px; flex: 1; }
.idea dt { font-size: .82rem; font-weight: 720; margin-top: 8px; }
.idea dd { margin: 2px 0 0; color: var(--soft); font-size: .9rem; }
.idea button { margin-top: 12px; align-self: start; }
#ideas + p { margin-top: 12px; }
.framework { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; padding: 0; gap: 10px; }
.framework li { padding: 12px 14px; border-left: 2px solid var(--line); background: var(--surface-alt); }
.framework a { font-weight: 700; font-size: .9rem; }
.framework p { margin: 6px 0 0; font-size: .85rem; }
label, legend { font-weight: 690; }
small, .small { display: block; color: var(--soft); font-size: .84rem; font-weight: 400; }
.field-row { display: grid; grid-template-columns: 1fr 90px; align-items: center; gap: 12px; margin-block: 13px; }
fieldset { border: 1px solid var(--line); border-radius: 9px; margin: 15px 0; padding: 10px 13px; }
.radio { display: flex; align-items: center; gap: 7px; font-weight: 490; padding: 4px 0; }
input[type=radio] { accent-color: var(--teal); }
input[type=number], textarea, select {
  background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  padding: 8px 10px; border-radius: 7px; font: inherit; max-width: 100%;
}
input[type=file] { max-width: 100%; margin: 5px 0; }
textarea { width: 100%; resize: vertical; }
button, .button { font: inherit; font-weight: 690; border-radius: 8px; padding: 8px 13px; cursor: pointer; text-decoration: none; }
.primary { border: 1px solid var(--teal); background: var(--teal); color: #072720; }
.secondary { border: 1px solid var(--line); background: var(--surface-alt); color: var(--ink); }
.text-button { background: transparent; color: var(--teal); border: 0; padding-inline: 0; text-decoration: underline; text-underline-offset: .25em; }
.quiet-link { font-size: .88rem; }
button:hover, .button:hover { filter: brightness(1.12); }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 2px solid #b3fff0; outline-offset: 3px; }
#csv-controls { margin-top: 8px; }
#run-error { color: #ffb5ac; margin-top: 9px; }
#run-status { color: var(--teal); font-weight: 630; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 14px 0; }
.metrics div { background: var(--surface-alt); border-radius: 9px; padding: 9px 11px; }
.metrics dt { color: var(--soft); font-size: .79rem; }
.metrics dd { margin: 3px 0 0; font-size: clamp(1rem, 2.1vw, 1.35rem); font-weight: 720; overflow-wrap: anywhere; }
.check { margin: 15px 0; background: #102a29; border: 1px solid #30574e; border-radius: 7px; padding: 9px 11px; font-size: .88rem; }
.table-wrap { overflow-x: auto; margin-bottom: 10px; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { text-align: left; padding: 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--soft); }
@media (max-width: 880px) {
  .idea-grid, .references { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .framework { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 30px); }
  header, footer { align-items: flex-start; flex-direction: column; }
  .hero { padding-block: 36px 25px; }
  .tool, .guide, .tiers, .idea-grid, .references, .framework { grid-template-columns: minmax(0, 1fr); }
  .section-top { flex-direction: column; align-items: flex-start; }
  .metrics div { padding-inline: 7px; }
  main > section + section:not(.tool) { margin-top: 35px; }
}
