/*
 * Ontwikkelboom — styling
 * Design tokens are taken from the roadmap (kickstart.ict-hva.nl / in-action.ict-hva.nl),
 * so the tree looks familiar to students: dotted canvas, grey containers, pills with a
 * coloured square, an olive stem and pink links.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../vendor/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../vendor/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* roadmap */
  --bg: oklch(99% .003 270);
  --bg-sub: oklch(97.5% .004 270);
  --surface: #ffffff;
  --surface-2: oklch(98% .003 270);
  --border: oklch(92% .006 270);
  --border-strong: oklch(86% .008 270);
  --fg: oklch(20% .012 270);
  --fg-muted: oklch(45% .012 270);
  --fg-faint: oklch(62% .01 270);
  --accent: oklch(55% .16 265);
  --danger: oklch(55% .18 25);
  --assignment: oklch(58% .16 145);
  --product: oklch(68% .14 75);
  --knowledge: oklch(60% .14 235);
  --side: oklch(60% .14 305);
  --container: oklch(55% .02 270);
  --shadow-sm: 0 1px 0 oklch(0% 0 0 / .04), 0 1px 2px oklch(0% 0 0 / .04);
  --shadow-md: 0 1px 0 oklch(0% 0 0 / .04), 0 4px 12px -2px oklch(0% 0 0 / .08), 0 2px 4px -1px oklch(0% 0 0 / .04);
  --scrim: oklch(20% .012 270 / .32);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", "JetBrains Mono", monospace;

  /* tree */
  --ks: var(--assignment);              /* Kickstart = Main */
  --ia: var(--knowledge);               /* In Action = Knowledge */
  --vd: var(--side);                    /* Verdiepend = Side-Track */
  --star: var(--product);
  --stem: color-mix(in oklch, var(--assignment) 75%, oklch(20% 0 0));
  --edge: oklch(83% .06 350);
  --edge-strong: oklch(70% .1 350);
  --cross: oklch(58% .13 350);
  --dot: oklch(86% .008 270);
  --drawer-w: 420px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
/* semantic elements carry no default spacing; components set their own */
h1, h2, h3, p, ul, menu { margin: 0; }
ul, menu { padding: 0; list-style: none; }
a { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.boot { display: grid; place-items: center; height: 100%; color: var(--fg-muted); }
.error-box { max-width: 520px; margin: 24px; padding: 16px 18px; border-radius: var(--radius-lg); border: 1px solid color-mix(in oklch, var(--danger) 40%, var(--border)); background: color-mix(in oklch, var(--danger) 6%, var(--surface)); color: var(--fg); line-height: 1.55; }

/* ------------------------------------------------------------------ canvas */
.canvas-wrap {
  position: fixed; inset: 0; overflow: hidden;
  touch-action: none; cursor: grab;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.4px), radial-gradient(circle at center, var(--bg) 0, var(--bg) 70%, var(--bg-sub) 100%);
  background-size: 22px 22px, 100% 100%;
}
.canvas-wrap.dragging { cursor: grabbing; }
.stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.sheet { position: relative; font-family: var(--font); color: var(--fg); }

.sheet-title { position: absolute; left: 0; width: 100%; text-align: center; font-size: 44px; font-weight: 600; letter-spacing: -.02em; line-height: 54px; color: var(--container); pointer-events: none; }

.cont { position: absolute; border: 1.5px solid color-mix(in oklch, var(--container) 55%, transparent); background: color-mix(in oklch, var(--container) 7%, var(--surface)); border-radius: 10px; }
.ct { position: absolute; top: 7px; left: 11px; font-size: 13px; font-weight: 700; line-height: 18px; color: oklch(38% .015 270); pointer-events: none; }
.cont .cnt { position: absolute; top: 8px; right: 12px; font-family: var(--mono); font-size: 11px; color: var(--fg-faint); font-variant-numeric: tabular-nums; pointer-events: none; }

svg.edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.e-branch { fill: none; stroke: var(--edge); stroke-width: 2.5; stroke-linecap: round; }
.e-inner { fill: none; stroke: var(--edge); stroke-width: 1.6; stroke-linecap: round; transition: opacity .15s, stroke .15s; }
.e-inner.done { stroke: var(--edge-strong); stroke-width: 2; }
.e-cross { fill: none; stroke: var(--cross); stroke-width: 1.75; stroke-dasharray: 4 4; stroke-linecap: round; transition: opacity .15s; }
.e-end { fill: var(--cross); transition: opacity .15s; }
.e-stem { fill: none; stroke: var(--stem); stroke-width: 5; stroke-linecap: round; opacity: .85; }
.e-vertex { fill: var(--surface); stroke: var(--stem); stroke-width: 2.5; }
.focusing .e-inner, .focusing .e-cross, .focusing .e-end { opacity: .14; }
.focusing .e-inner.hl, .focusing .e-cross.hl, .focusing .e-end.hl { opacity: 1; }
.focusing .e-inner.hl { stroke: var(--cross); stroke-width: 2.25; }

/* ------------------------------------------------------------------ nodes (pills) */
.pill {
  --c: var(--ks);
  position: absolute; height: 26px; display: flex; align-items: center; gap: 7px; padding: 0 7px 0 10px;
  border-radius: var(--radius-sm); border: 1px solid color-mix(in oklch, var(--c) 35%, var(--border));
  background: color-mix(in oklch, var(--c) 8%, var(--surface));
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; text-align: left;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: box-shadow .15s, border-color .15s, background .15s, transform .1s;
}
.pill[data-z="ia"] { --c: var(--ia); background: color-mix(in oklch, var(--c) 9%, var(--surface)); }
.pill[data-z="vd"] { --c: var(--vd); background: color-mix(in oklch, var(--c) 10%, var(--surface)); }
.pill:hover, .pill.rel { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.pill.rel { border-color: var(--cross); }
.pill.active { outline: 2px solid var(--c); outline-offset: 2px; }
.pill[data-state="2"] { background: color-mix(in oklch, var(--c) 20%, var(--surface)); border-color: color-mix(in oklch, var(--c) 60%, var(--border)); }
.pill .d { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.pill .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pill .code { flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; color: oklch(45% .14 305); }
.pill .want { flex: none; color: var(--star); display: none; width: 12px; height: 12px; margin: 0 -2px; }
.pill .want svg { display: block; }
.pill[data-want="1"] .want { display: block; }
.pill[data-want="1"] .d { display: none; }

.o { flex: none; display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--c);
  background: linear-gradient(90deg, var(--surface) 5px, color-mix(in oklch, var(--c) 30%, var(--surface)) 5px, color-mix(in oklch, var(--c) 30%, var(--surface)) 6px, var(--surface) 6px); }
.pill .o { width: 15px; height: 15px; border-radius: 50%; position: relative; }
.pill .o::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; } /* larger click target */
.pill:hover .o { box-shadow: 0 0 0 3px color-mix(in oklch, var(--c) 18%, transparent); }
[data-state=""] > .o, .o.none { border-style: dashed; border-color: color-mix(in oklch, var(--c) 55%, var(--border-strong)); background: var(--surface); }
[data-state="0"] > .o, .o.s0 { background: var(--surface); }
/* Kickstart and In Action should be familiar: an empty circle turns red */
.pill:not([data-z="vd"])[data-state="0"] > .o, .o.s0.miss { border-color: var(--danger); background: color-mix(in oklch, var(--danger) 16%, var(--surface)); }
[data-state="1"] > .o, .o.s1 { background: linear-gradient(90deg, var(--c) 50%, var(--surface) 50%); }
[data-state="2"] > .o, .o.s2 { background: var(--c); }

/* ------------------------------------------------------------------ crown */
.kruin-chips { position: absolute; display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 10px 12px; }
.chip {
  --c: var(--vd);
  height: 28px; display: flex; align-items: center; gap: 7px; padding: 0 9px 0 10px; border-radius: var(--radius-sm);
  border: 1px solid color-mix(in oklch, var(--c) 35%, var(--border)); background: color-mix(in oklch, var(--c) 10%, var(--surface));
  font-size: 12px; font-weight: 500; white-space: nowrap; box-shadow: var(--shadow-sm); cursor: pointer;
}
.chip:hover { box-shadow: var(--shadow-md); }
.chip .code { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; color: oklch(45% .14 305); }
.chip .star, .star { flex: none; color: var(--star); }
.chip[aria-pressed="true"] { border-color: var(--star); background: color-mix(in oklch, var(--star) 14%, var(--surface)); }
.star path { fill: transparent; }
[aria-pressed="true"] .star path, .star.on path { fill: currentColor; }

/* ------------------------------------------------------------------ card on the sheet */
.card { position: absolute; padding: 12px 16px; display: flex; flex-direction: column; gap: 5px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); font-size: 12px; line-height: 17px; color: var(--fg-muted); }
.card b { color: var(--fg); }
.card .fields { display: flex; gap: 18px; margin-bottom: 4px; }
.card label { display: flex; align-items: flex-end; gap: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); cursor: text; }
.card input { border: 0; border-bottom: 1px solid oklch(70% .01 270); background: transparent; padding: 0 2px 1px; height: 18px; font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--fg); border-radius: 0; }
.card input:focus { outline: none; border-bottom-color: var(--accent); background: color-mix(in oklch, var(--accent) 6%, transparent); }
.card .keys { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.key { display: inline-flex; align-items: center; gap: 5px; color: var(--fg); }
.key .o { --c: var(--ks); }

.lane-label { position: absolute; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 14px; pointer-events: none; }
.lane-label.ks { color: oklch(45% .15 145); } .lane-label.ia { color: oklch(47% .13 235); } .lane-label.vd { color: oklch(45% .14 305); }
.start { position: absolute; display: flex; align-items: center; justify-content: center; gap: 7px; background: color-mix(in oklch, var(--ks) 8%, var(--surface)); border: 1px solid color-mix(in oklch, var(--ks) 35%, var(--border)); border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow-sm); }
.start i { width: 8px; height: 8px; border-radius: 2px; background: var(--ks); }
.sheet-legend { position: absolute; height: 36px; display: none; align-items: center; gap: 18px; padding: 0 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); font-size: 13px; box-shadow: var(--shadow-sm); }
.sheet-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sheet-legend .sq { width: 8px; height: 8px; border-radius: 2px; }
.sheet-note { position: absolute; font-size: 12px; line-height: 17px; color: var(--fg-muted); }
.sheet-note b { color: var(--fg); }

/* ------------------------------------------------------------------ floating controls */
.float { position: fixed; z-index: 10; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.brand { top: calc(16px + env(safe-area-inset-top, 0px)); left: calc(16px + env(safe-area-inset-left, 0px)); display: flex; align-items: center; gap: 12px; padding: 8px 14px; max-width: calc(100vw - 32px); }
.brand b { font-size: 14px; font-weight: 700; }
.brand .prog { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-muted); white-space: nowrap; }
.brand .prog b { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--fg); font-variant-numeric: tabular-nums; }
.pbar { display: flex; width: 120px; height: 6px; border-radius: 99px; overflow: hidden; background: var(--border); }
.pbar i { display: block; height: 100%; }

.actions { top: calc(16px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); display: flex; gap: 6px; padding: 6px; border-radius: var(--radius-lg); }
.actions li:has(> [hidden]) { display: none; } /* no empty gap for a hidden button */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius); padding: 0 12px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--fg); white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-2); box-shadow: var(--shadow-sm); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: color-mix(in oklch, var(--accent) 88%, black); }
.btn.ghost { border-color: transparent; }
.btn.danger { color: var(--danger); }
.btn svg { flex: none; }

.legend { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: calc(16px + env(safe-area-inset-left, 0px)); display: flex; align-items: center; gap: 16px; padding: 9px 14px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sq { width: 8px; height: 8px; border-radius: 2px; }
.zoom { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px 6px; border-radius: 18px; }
.zoom button { width: 34px; height: 30px; border: 0; background: none; border-radius: 10px; display: grid; place-items: center; cursor: pointer; color: var(--fg); }
.zoom button:hover { background: var(--bg-sub); }
.zoom .val { width: 52px; font-family: var(--mono); font-size: 12px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.zoom .sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.drawer-open .zoom { left: calc((100vw - var(--drawer-w)) / 2); }
.drawer-open .actions { right: calc(var(--drawer-w) + 16px + env(safe-area-inset-right, 0px)); }

.menu { position: fixed; z-index: 30; min-width: 260px; padding: 6px; display: grid; gap: 2px; }
.menu button { width: 100%; display: grid; gap: 1px; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: var(--radius); cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: var(--bg-sub); }
.menu b { font-size: 13px; font-weight: 600; }
.menu span { font-size: 12px; color: var(--fg-muted); }

.toast { position: fixed; z-index: 40; left: 50%; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 9px 14px; border-radius: var(--radius); font-size: 13px; box-shadow: var(--shadow-md); max-width: calc(100vw - 32px); }

.example-banner { position: fixed; z-index: 11; top: calc(66px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 14px; border-radius: var(--radius-lg); background: color-mix(in oklch, var(--star) 16%, var(--surface)); border: 1px solid color-mix(in oklch, var(--star) 50%, var(--border)); box-shadow: var(--shadow-md); font-size: 13px; max-width: calc(100vw - 32px); }
.drawer-open .example-banner { left: calc((100vw - var(--drawer-w)) / 2); }

/* ------------------------------------------------------------------ side panel */
.drawer {
  position: fixed; z-index: 20; top: 0; right: 0; bottom: 0; width: min(var(--drawer-w), 100vw);
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: -12px 0 32px -16px oklch(0% 0 0 / .25);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px);
}
.d-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 10px 20px; border-bottom: 1px solid var(--border); }
.d-body { flex: 1; overflow-y: auto; padding: 16px 20px 24px; }
.d-foot { border-top: 1px solid var(--border); padding: 10px 14px 12px 20px; display: grid; gap: 8px; }
.zchip { --c: var(--ks); display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: color-mix(in oklch, var(--c) 75%, var(--fg)); }
.zchip i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.close { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); cursor: pointer; flex: none; }
.close:hover { background: var(--bg-sub); }
.drawer h2 { font-size: 20px; font-weight: 600; line-height: 1.25; margin: 0 0 8px; text-wrap: balance; }
.drawer .desc { font-size: 14px; line-height: 1.55; margin: 0 0 16px; }
.drawer .desc b { font-weight: 600; }
.rate { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.rate button { --c: var(--ks); display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 9px 10px; cursor: pointer; font-size: 13.5px; }
.rate button:hover { border-color: color-mix(in oklch, var(--c) 50%, var(--border)); }
.rate button .o { width: 18px; height: 18px; }
.rate button kbd { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; background: var(--surface-2); }
.rate button[aria-pressed="true"] { border-color: var(--c); background: color-mix(in oklch, var(--c) 10%, var(--surface)); font-weight: 600; }
.want-btn { --c: var(--star); }
.want-btn .star { width: 18px; height: 18px; }
.sec { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 16px; }
.sec h3 { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); margin: 0 0 8px; }
.sec p { margin: 0; font-size: 13px; line-height: 1.55; }
.sec p + p { margin-top: 6px; }
.muted { color: var(--fg-muted); font-size: 12.5px; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { --c: var(--ks); font-size: 12px; padding: 3px 8px; border-radius: var(--radius-sm); background: color-mix(in oklch, var(--c) 8%, var(--surface)); border: 1px solid color-mix(in oklch, var(--c) 30%, var(--border)); }
.lo { display: grid; gap: 8px; }
.lo li { font-size: 13px; line-height: 1.5; }
.lo code { font-family: var(--mono); font-size: 12px; background: var(--bg-sub); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; margin-right: 4px; }
.rel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rel-list button { --c: var(--ks); display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 4px 0; cursor: pointer; font-size: 13px; }
.rel-list button:hover span:last-child { text-decoration: underline; }
.rel-list small { color: var(--fg-faint); font-size: 11px; margin-left: 4px; }
.rel-list .x { font-size: 10px; color: var(--cross); margin-left: 4px; font-weight: 600; }
.plinks { display: flex; flex-wrap: wrap; gap: 6px; }
.plinks a { --c: var(--vd); display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 8px; border-radius: var(--radius-sm); color: var(--fg); text-decoration: none; background: color-mix(in oklch, var(--c) 8%, var(--surface)); border: 1px solid color-mix(in oklch, var(--c) 30%, var(--border)); }
.plinks a:hover { border-color: var(--c); }
.plinks .pcode { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; color: oklch(45% .14 305); }
.sec .plinks + p { margin-top: 8px; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav .pos { flex: 1; text-align: center; font-size: 12px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg-muted); cursor: pointer; user-select: none; }
.check input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }

/* outcome */
.fields2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fields2 label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--fg-muted); }
.fields2 input { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 7px 9px; font-size: 14px; font-weight: 400; min-width: 0; background: var(--surface); }
.zsum { display: grid; gap: 10px; }
.zrow { --c: var(--ks); display: grid; gap: 6px; }
.zrow .top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; }
.zrow .top b { display: inline-flex; align-items: center; gap: 7px; }
.zrow .top b i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.zrow .top span { font-size: 12px; color: var(--fg-muted); }
.stack { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--bg-sub); border: 1px solid var(--border); }
.stack i { display: block; height: 100%; }
.s2b { background: var(--c); } .s1b { background: color-mix(in oklch, var(--c) 45%, var(--surface)); } .s0b { background: color-mix(in oklch, var(--c) 14%, var(--surface)); }
.counts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--fg-muted); }
.counts li { display: inline-flex; align-items: center; gap: 5px; }
.counts b { font-family: var(--mono); font-weight: 500; color: var(--fg); font-variant-numeric: tabular-nums; }
.counts .o { width: 11px; height: 11px; }
.olist { --c: var(--ks); list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.olist li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px; align-items: start; font-size: 13px; line-height: 1.4; }
.olist li .o { margin-top: 2px; width: 13px; height: 13px; }
.olist small { display: block; color: var(--fg-muted); font-size: 11.5px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: inherit; text-align: left; }
.pbars { display: grid; gap: 7px; }
.prow { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 2.5ch; gap: 10px; align-items: center; font-size: 12.5px; }
.prow a { color: var(--fg); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow a:hover { text-decoration: underline; }
.ptrack { height: 8px; border-radius: 99px; background: var(--bg-sub); border: 1px solid var(--border); overflow: hidden; }
.ptrack i { display: block; height: 100%; background: var(--vd); border-radius: 99px; }
.prow b { font-family: var(--mono); font-weight: 500; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* outcome as a second sheet (print and PDF); hidden on screen. 1587 px = 420 mm */
.print-outcome { display: none; width: 1587px; padding: 60px 68px; background: var(--surface); color: var(--fg); font-size: 14px; }
.print-outcome > header { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 24px; margin-bottom: 10px; }
.print-outcome h2 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.print-outcome .meta { margin: 0; font-size: 14px; color: var(--fg-muted); }
.print-outcome .meta span { margin: 0 8px; color: var(--fg-faint); }
.print-outcome .desc { grid-column: 1 / -1; margin: 0; font-size: 14px; line-height: 1.55; color: var(--fg-muted); }
.print-outcome .cols { column-count: 3; column-gap: 53px; }
.print-outcome .sec h3 { break-after: avoid; }
.print-outcome .cols > .sec:first-child { border-top: 0; margin-top: 0; }
.print-outcome .olist li, .print-outcome .prow { break-inside: avoid; }
.print-outcome .linkish, .print-outcome .prow a { color: var(--fg); text-decoration: none; cursor: default; }

@media (max-width: 760px) {
  :root { --drawer-w: 100vw; }
  .legend { display: none; }
  .brand .pbar { display: none; }
  .actions .btn .lbl-long { display: none; }
  .drawer-open .zoom { display: none; }
  .drawer-open .actions, .drawer-open .brand { display: none; }
  .example-banner { top: calc(118px + env(safe-area-inset-top, 0px)); }
}
@media (max-width: 520px) {
  .brand { top: auto; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .fields2 { grid-template-columns: 1fr; }
}
.dialog { width: min(460px, calc(100vw - 32px)); padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--fg); box-shadow: var(--shadow-md); font-size: 14px; line-height: 1.55; }
.dialog::backdrop { background: var(--scrim); }
.dialog h2 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.dialog p { margin: 0 0 10px; color: var(--fg-muted); }
.dialog p svg { vertical-align: -3px; }
.dialog .keys { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.dialog .key { display: flex; align-items: center; gap: 8px; }
.dialog section .btn-row { margin-top: 4px; }
.in-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.in-foot .btn-row { justify-content: flex-end; }
.in-foot .spacer { flex: 1; }
.btn:disabled { opacity: .6; cursor: default; box-shadow: none; }
.in-progress { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; color: var(--fg-muted); }
.dots { display: flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.dots i.on { background: var(--accent); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ------------------------------------------------------------------ print: A3 landscape */
@page { size: A3 landscape; margin: 0; }
@media print {
  html, body { height: auto; overflow: visible; background: #fff; }
  body * { visibility: hidden; }
  .canvas-wrap, .canvas-wrap * { visibility: visible; }
  .canvas-wrap { position: relative; inset: auto; width: 420mm; height: 297mm; overflow: hidden; background: none; }
  .stage { transform: none !important; }
  .sheet {
    background-color: #fff;
    background-image: radial-gradient(var(--dot) 1px, transparent 1.4px);
    background-size: 22px 22px;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .float, .drawer, .menu, .toast, .example-banner, .dialog { display: none !important; }
  .sheet-legend { display: flex; }
  .pill, .chip, .card, .start, .sheet-legend { box-shadow: none !important; transform: none !important; }
  .pill.active, .pill.rel { outline: none; border-color: color-mix(in oklch, var(--c) 35%, var(--border)); }
  .focusing .e-inner, .focusing .e-cross, .focusing .e-end { opacity: 1; }
  .cont .cnt { display: none; }
  /* unrated nodes print as a plain empty circle */
  [data-state=""] > .o { border-style: solid; border-color: var(--c); background: linear-gradient(90deg, #fff 5px, color-mix(in oklch, var(--c) 30%, #fff) 5px, color-mix(in oklch, var(--c) 30%, #fff) 6px, #fff 6px); }
  .card input { border-bottom-color: oklch(60% .01 270); }
  .print-empty .pill > .o { border-style: solid; border-color: var(--c) !important; background: linear-gradient(90deg, #fff 5px, color-mix(in oklch, var(--c) 30%, #fff) 5px, color-mix(in oklch, var(--c) 30%, #fff) 6px, #fff 6px) !important; }
  .print-empty .pill { background: color-mix(in oklch, var(--c) 8%, #fff) !important; border-color: color-mix(in oklch, var(--c) 35%, var(--border)) !important; }
  .print-empty .pill .want { display: none !important; }
  .print-empty .pill .d { display: block !important; }
  .print-empty .chip { border-color: color-mix(in oklch, var(--vd) 35%, var(--border)) !important; background: color-mix(in oklch, var(--vd) 10%, #fff) !important; }
  .print-empty .chip .star path { fill: transparent !important; }
  .print-empty .card input { color: transparent !important; }
  .print-empty .e-inner.done { stroke: var(--edge); stroke-width: 1.6; }

  /* sheet 2: the outcome (not on the blank form) */
  .print-outcome { display: block; visibility: visible; break-before: page; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-outcome * { visibility: visible; }
  .print-empty .print-outcome { display: none; }
}

/* ------------------------------------------------------------------ PDF: same sheets as print, as images */
.pdf-export .sheet { background-color: var(--surface); background-image: radial-gradient(var(--dot) 1px, transparent 1.4px); background-size: 22px 22px; }
.pdf-export .sheet-legend { display: flex; }
.pdf-export .cont .cnt { display: none; }
.pdf-export .pill.active, .pdf-export .pill.rel { outline: none; border-color: color-mix(in oklch, var(--c) 35%, var(--border)); }
.pdf-export .print-outcome { display: block; position: fixed; left: 0; top: 0; z-index: -1; height: 1123px; overflow: hidden; }

