:root {
  color-scheme: dark;
  background: #172130;
  color: #eef6fb;
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
  --panel: #233245;
  --line: #425569;
  --mint: #7aefd2;
  --muted: #bdcddd;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
.wrap { width: min(1200px, calc(100% - 44px)); margin-inline: auto; }
.top { background: #1c2a3b; border-bottom: 1px solid var(--line); }
.bar, .foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bar { min-height: 59px; }
.brand { display: flex; gap: 9px; align-items: center; font-weight: 750; text-decoration: none; }
.mark { color: var(--mint); font-size: 24px; }
h1 { font-size: clamp(36px, 6vw, 62px); letter-spacing: -.053em; line-height: 1.06; margin: 30px 0 0; }
h2 { margin: 0 0 14px; font-size: 19px; }
.intro { color: var(--muted); margin: 9px 0 23px; }
.workspace { display: grid; grid-template-columns: minmax(252px, 1fr) minmax(0, 2.42fr); gap: 15px; align-items: start; }
.panel { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
button, input { font: inherit; border: 1px solid var(--line); border-radius: 7px; }
button { padding: 9px 11px; cursor: pointer; font-weight: 750; }
button:disabled { opacity: .47; cursor: default; }
.primary { color: #12322e; background: var(--mint); border-color: var(--mint); }
.secondary { color: inherit; background: #293d52; }
:is(a, input, button):focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.muted, output, .foot { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
#source { margin: 10px 0 13px; }
form { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
label { display: grid; gap: 4px; min-width: 0; font-size: 13px; font-weight: 700; }
input { width: 100%; min-height: 38px; padding: 6px 8px; color: inherit; background: #19293a; }
.error { color: #ff9eaa; font-size: 13px; }
.preview-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 7px; flex-wrap: wrap; }
output[data-mode=bars] { color: var(--mint); font-weight: 750; }
output[data-mode=variable], output[data-mode=unclear] { color: #f8c875; font-weight: 750; }
.stage { display: grid; place-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 9px; min-height: 250px; background: #132031; text-align: center; }
canvas { display: block; max-width: 100%; width: auto; height: auto; max-height: 355px; object-fit: contain; }
#edges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 12px 0; gap: 7px; }
#edges div { border: 1px solid var(--line); border-radius: 7px; padding: 7px 8px; min-width: 0; }
dt { font-size: 12px; color: var(--muted); }
dd { margin: 3px 0 0; font-size: 15px; font-weight: 750; overflow-wrap: anywhere; }
#crop, #samples, #detail { margin: 8px 0; }
#status { margin: 9px 0 0; min-height: 16px; }
.foot { padding-block: 12px 30px; }
.foot nav { display: flex; gap: 14px; }
.info { max-width: 800px; line-height: 1.56; padding-bottom: 38px; }
.info section { margin-top: 27px; }
.info h3 { margin-bottom: 6px; }
@media (max-width: 725px) {
  .wrap { width: calc(100% - 26px); }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .stage { min-height: 185px; }
}
