/* Guia PES. Reference: docs/DESIGN.md. A light, typographic canvas (Apple-like restraint: hairlines, semibold type
   with tight tracking, pill actions, one emerald accent) and dark studio stages that hold the renders (CSS 3D devices,
   windows, documents), as on /maquetes. The five Fags are deep jewel tones used for rails, dots and badges, never as
   large fills behind text. Geist for text, Geist Mono for ids, dates and labels. Shape: 16px cards, 999px actions. */
@font-face { font-family: "Geist"; src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f5f6f7; --surface-3: #eceef0; --field: #ffffff;
  --ink: #3a4048; --head: #0c0f12; --muted: #5f6670; --line: #e5e7ea; --line-strong: #cfd3d8;
  --green: #12a06c; --green-dark: #0b7a55; --green-text: #0a6e4c; --green-soft: #e9f6f0; --on-color: #ffffff;
  --blue: #2f6fd6; --blue-dark: #2157b0; --blue-text: #1f56ad; --blue-soft: #eef3fc;
  --red: #d64545; --red-dark: #b42323; --red-text: #b02525; --red-soft: #fcefef;
  --gold: #d9a514; --gold-dark: #8a6400; --orange: #d0612c; --purple: #7b5bd6;
  --f1: #c99419; --f1d: #8a5f00; --f2: #d0612c; --f2d: #a3401a; --f3: #12a06c; --f3d: #0b7350;
  --f4: #2f6fd6; --f4d: #2157b0; --f5: #7b5bd6; --f5d: #5b3fb8; --locked: #d3d7dc; --locked-d: #9aa1aa;
  --accent: #0b7a55; --accent-hover: #086445; --accent-ink: #ffffff; --accent-text: #0a6e4c;
  --danger: #b02525; --r-s: 10px; --r-m: 16px; --r-l: 24px; --r-btn: 999px;
  --shadow: 0 1px 2px rgb(12 15 18 / .04), 0 1px 3px rgb(12 15 18 / .05);
  --shadow-md: 0 1px 2px rgb(12 15 18 / .04), 0 8px 24px -8px rgb(12 15 18 / .12);
  --shadow-lg: 0 2px 4px rgb(12 15 18 / .04), 0 24px 56px -20px rgb(12 15 18 / .28);
  --ease: cubic-bezier(.16, 1, .3, 1); --ease-out: cubic-bezier(.23, 1, .32, 1);
  --lime: #c6f36b; --stage: #0b1310;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d10; --surface: #111418; --surface-2: #15191e; --surface-3: #1c2127; --field: #111418;
    --ink: #c5ccd4; --head: #f3f5f7; --muted: #8e97a2; --line: #232930; --line-strong: #353c45;
    --green: #2fc58a; --green-dark: #1fa772; --green-text: #4fd69c; --green-soft: #0f2a20;
    --blue: #5b93f0; --blue-dark: #3f7be6; --blue-text: #86b0f7; --blue-soft: #121f36;
    --red: #f06a6a; --red-dark: #e14b4b; --red-text: #ff8f8f; --red-soft: #33171a;
    --gold-dark: #e8bd45;
    --f1: #e0ad3a; --f1d: #f0c562; --f2: #ea7a46; --f2d: #f39a6e; --f3: #2fc58a; --f3d: #5ad8a4;
    --f4: #5b93f0; --f4d: #8db3f6; --f5: #9b80ea; --f5d: #b9a6f2; --locked: #353c45; --locked-d: #59616b;
    --accent: #4fd69c; --accent-hover: #73e2b3; --accent-ink: #062016; --accent-text: #4fd69c;
    --danger: #ff8f8f;
    --shadow: 0 1px 2px rgb(0 0 0 / .3); --shadow-md: 0 8px 24px -8px rgb(0 0 0 / .5); --shadow-lg: 0 24px 56px -20px rgb(0 0 0 / .7);
  }
}
:root[data-theme="dark"] {
    --bg: #0b0d10; --surface: #111418; --surface-2: #15191e; --surface-3: #1c2127; --field: #111418;
    --ink: #c5ccd4; --head: #f3f5f7; --muted: #8e97a2; --line: #232930; --line-strong: #353c45;
    --green: #2fc58a; --green-dark: #1fa772; --green-text: #4fd69c; --green-soft: #0f2a20;
    --blue: #5b93f0; --blue-dark: #3f7be6; --blue-text: #86b0f7; --blue-soft: #121f36;
    --red: #f06a6a; --red-dark: #e14b4b; --red-text: #ff8f8f; --red-soft: #33171a;
    --gold-dark: #e8bd45;
    --f1: #e0ad3a; --f1d: #f0c562; --f2: #ea7a46; --f2d: #f39a6e; --f3: #2fc58a; --f3d: #5ad8a4;
    --f4: #5b93f0; --f4d: #8db3f6; --f5: #9b80ea; --f5d: #b9a6f2; --locked: #353c45; --locked-d: #59616b;
    --accent: #4fd69c; --accent-hover: #73e2b3; --accent-ink: #062016; --accent-text: #4fd69c;
    --danger: #ff8f8f;
    --shadow: 0 1px 2px rgb(0 0 0 / .3); --shadow-md: 0 8px 24px -8px rgb(0 0 0 / .5); --shadow-lg: 0 24px 56px -20px rgb(0 0 0 / .7);
  }
body { font-weight: 400; letter-spacing: -0.006em; font-feature-settings: "ss01", "cv11"; }
h1, h2, h3, h4 { color: var(--head); font-weight: 600; letter-spacing: -0.03em; }
h3 { letter-spacing: -0.018em; }
b, strong { font-weight: 600; }
.brand { font-weight: 600; font-size: 1.02rem; letter-spacing: -0.02em; color: var(--head); }
.brand svg { width: 30px; height: 30px; }
.mono, code, kbd { font-family: var(--f-mono); }
code { font-size: .86em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; letter-spacing: 0; }
kbd { font-size: .8em; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; }
a { color: var(--accent-text); text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { text-decoration-color: currentColor; }
.prose a:not(.btn), .legal a:not(.btn) { color: var(--accent-text); }
::selection { background: color-mix(in srgb, var(--green) 26%, transparent); color: var(--head); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ------------------------------------------------------------------ header (frosted, hairline) */
.site-head { background: color-mix(in srgb, var(--bg) 78%, transparent); }
.site-head.scrolled { border-bottom-color: var(--line); }
.head-row { height: 60px; }
.head-nav a { color: var(--ink); font-size: .9rem; font-weight: 500; padding: 7px 12px; border-radius: 999px; }
.head-nav a:hover { background: var(--surface-2); color: var(--head); }
.head-nav a[aria-current], .menu-panel a[aria-current] { color: var(--head); background: var(--surface-3); }
@media (min-width: 900px) and (max-width: 1199px) { .head-nav:not(.grouped) { display: none; } .menu:not(.grouped-menu) { display: block; } }

/* ------------------------------------------------------------------ buttons: pills, ink primary */
.btn { border-radius: var(--r-btn); border: 1px solid transparent; font-weight: 500; letter-spacing: -0.01em; min-height: 46px; padding: 0 22px; font-size: .97rem;
  transition: transform .18s var(--ease), background-color .2s, border-color .2s, color .2s, box-shadow .2s; }
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--head); color: var(--bg); box-shadow: 0 1px 2px rgb(12 15 18 / .2), inset 0 1px 0 rgb(255 255 255 / .08); }
.btn-solid:hover { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--head); }
.btn-ghost:hover { border-color: var(--head); background: var(--surface); }
.btn-blue { background: var(--accent); color: var(--accent-ink); }
.btn-blue:hover { background: var(--accent-hover); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .9rem; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ------------------------------------------------------------------ cards, tags, kickers */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 24px; box-shadow: var(--shadow); }
a.card { display: block; text-decoration: none; color: inherit; transition: transform .25s var(--ease), border-color .2s, box-shadow .25s var(--ease); }
a.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
a.card:active { transform: translateY(0); }
.tag { display: inline-flex; align-items: center; gap: 6px; font: 500 .72rem var(--f-mono); letter-spacing: .02em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.kicker { display: inline-flex; align-items: center; gap: 8px; text-wrap: balance; font: 500 .76rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: none; }

/* ------------------------------------------------------------------ layout */
.sec { padding-block: 96px 0; }
.sec-head { max-width: 720px; margin-bottom: 36px; }
.sec h2, .page-h h1 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.06; }
.page-h { padding-block: 56px 8px; }
.page-h h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); max-width: 18ch; line-height: 1.02; letter-spacing: -0.04em; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.18rem); color: var(--muted); max-width: 60ch; line-height: 1.55; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.8em; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 500; font-size: .86rem; color: var(--ink); background: var(--surface); transition: border-color .2s, color .2s, background-color .2s; }
.toc a:hover { border-color: var(--line-strong); color: var(--head); }
.note { padding: 16px 18px; border-radius: 14px; background: color-mix(in srgb, var(--blue) 6%, var(--surface-2)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--blue) 32%, var(--line)); }
.note.warn { border-left-color: var(--red); background: color-mix(in srgb, var(--red-soft) 60%, var(--surface)); }
.note.ok { border-left-color: var(--green); background: color-mix(in srgb, var(--green-soft) 70%, var(--surface)); }
.note b:first-child { color: var(--head); }
.levels td:first-child { font-weight: 600; color: var(--head); }

/* ------------------------------------------------------------------ studio stage: the dark panel every render sits in */
.stage { --sx: 0deg; --sy: 0deg; position: relative; isolation: isolate; overflow: hidden; border-radius: 28px; color: #e8f2ec; background: radial-gradient(120% 80% at 50% 0%, #1d3a2f 0%, #0d1a15 55%, #070c0a 100%); box-shadow: 0 30px 60px -36px rgb(4 30 20 / .55), inset 0 0 0 1px rgb(255 255 255 / .06); perspective: 1600px; }
.stage::before { content: ""; position: absolute; inset: -30% 10% 35%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgb(198 243 107 / .16), rgb(198 243 107 / .04) 55%, transparent); pointer-events: none; }
.stage::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5; background-image: linear-gradient(rgb(255 255 255 / .035) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .035) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%); }
.stage-in { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--sx)) rotateY(var(--sy)); }
.stage .floor { position: absolute; left: 50%; bottom: 7%; width: 70%; height: 60px; margin-left: -35%; border-radius: 50%; background: radial-gradient(closest-side, rgb(0 0 0 / .55), transparent); pointer-events: none; }

/* ------------------------------------------------------------------ page header: text + render */
.ph-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 980px) { .ph-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; } }
.ph-grid .stage { height: 380px; }
@media (max-width: 979px) { .ph-grid .stage { height: 300px; } }
@media (max-width: 520px) { .ph-grid .stage { height: 250px; border-radius: 22px; } }
html.present .ph-grid .stage { height: 56vh; }

/* ------------------------------------------------------------------ home hero */
.hero { padding-block: 56px 16px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; } }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); line-height: .98; letter-spacing: -0.045em; font-weight: 600; margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: var(--muted); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-stage { position: relative; }
.hero-stage .stage { height: 520px; }
.hero-stage .now { position: absolute; z-index: 3; left: 20px; bottom: 20px; width: min(340px, calc(100% - 40px)); }
@media (max-width: 979px) {
  .hero { padding-block: 28px 8px; }
  .hero-grid { gap: 20px; }
  .hero-stage .stage { height: 360px; }
  .hero-stage .now { position: relative; left: auto; bottom: auto; width: auto; margin-top: -48px; margin-inline: 12px; }
  .hero .actions { display: grid; grid-template-columns: 1fr; }
  .hero .actions .btn { width: 100%; }
}
@media (max-width: 520px) { .hero-stage .stage { height: 300px; } }
/* "now" card: frosted glass on the stage */
.now { padding: 18px 20px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); box-shadow: var(--shadow-lg); }
.now-week { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 10px; font-weight: 600; color: var(--head); font-size: .95rem; }
.now-week span:last-child { color: var(--muted); font: 500 .76rem var(--f-mono); }
.bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--green-dark), var(--green)); transition: width 1.2s var(--ease); }
.next-box { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.days { display: grid; place-items: center; align-content: center; width: 68px; height: 68px; border-radius: 16px; background: var(--head); color: var(--bg); text-align: center; line-height: 1; position: relative; overflow: hidden; }
.days::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--fag, var(--green)); }
.days b { font-size: 1.9rem; font-weight: 600; letter-spacing: -0.04em; display: block; font-variant-numeric: tabular-nums; }
.days span { font: 500 .62rem var(--f-mono); text-transform: uppercase; letter-spacing: .08em; opacity: .75; margin-top: 3px; }
.next-box p { margin: 0; }
.next-box .kicker { margin: 0 0 2px; font-size: .68rem; }
.next-what { font-weight: 600; color: var(--head); font-size: 1.02rem; letter-spacing: -0.015em; }
.next-when { color: var(--muted); font-size: .86rem; }
.next-box a { font-size: .9rem; font-weight: 500; }

/* ------------------------------------------------------------------ course map: a vertical timeline */
.map { position: relative; display: grid; gap: 14px; max-width: 760px; margin-inline: auto; }
.unit { display: grid; gap: 0; }
.unit-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px 16px 24px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; color: var(--ink); }
.unit-head::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--fag); }
.unit-head h3 { color: var(--head); margin: 2px 0 0; font-size: 1.12rem; }
.unit-head h2 { color: var(--head); }
.unit-head p { margin: 2px 0 0; font: 500 .8rem var(--f-mono); color: var(--muted); }
.unit-head .tag { background: color-mix(in srgb, var(--fag) 12%, var(--surface)); color: var(--fagd); border-color: color-mix(in srgb, var(--fag) 30%, transparent); }
.unit.locked .unit-head::before { background: var(--locked); }
.nodes { list-style: none; margin: 0; padding: 10px 0 6px 21px; display: grid; gap: 2px; justify-items: stretch; }
.map .node { --x: 0px; transform: none; position: relative; display: flex; align-items: center; gap: 14px; padding: 6px 0; }
.node button { all: unset; box-sizing: border-box; cursor: pointer; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong); color: var(--fagd); position: relative; z-index: 1; transition: transform .2s var(--ease), box-shadow .2s, background-color .2s; }
.node button:hover { transform: scale(1.08); box-shadow: var(--shadow-md); }
.node button:active { transform: scale(.96); }
.node button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.node button .i { width: 16px; height: 16px; }
.node.done button { background: color-mix(in srgb, var(--fag) 14%, var(--surface)); border-color: color-mix(in srgb, var(--fag) 40%, transparent); }
.node.todo button { color: var(--muted); }
.node[data-kind="due"] button { border-color: var(--fag); }
.node.now button { background: var(--fag); border-color: var(--fag); color: #fff; box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--fag), 0 8px 20px -6px var(--fag); }
.node .label { position: static; transform: none; width: auto; max-width: none; font-size: .86rem; font-weight: 400; color: var(--muted); line-height: 1.3; text-align: left; }
.node .label b { display: block; color: var(--head); font-weight: 500; font-size: .95rem; letter-spacing: -0.01em; }
.node .label time { font-family: var(--f-mono); font-size: .76rem; }
.node.left .label { left: auto; right: auto; text-align: left; }
.node .bubble { position: static; order: 3; transform: none; margin-left: auto; white-space: nowrap; background: var(--head); color: var(--bg); border: 0; font: 500 .7rem var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; animation: none; }
.node .bubble::after { display: none; }
.node.now { margin-top: 0; }
.pop { position: fixed; z-index: 70; inset: auto 12px 12px; max-width: 460px; margin-inline: auto; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); transform: translateY(16px); opacity: 0; transition: transform .35s var(--ease), opacity .2s; }
.pop.open { transform: none; opacity: 1; }
.pop h3 { margin: 0 0 4px; }
.pop .pop-date { color: var(--muted); font: 500 .85rem var(--f-mono); margin: 0 0 14px; }
.pop .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.map-path { position: absolute; inset: 0 0 auto 0; width: 100%; z-index: 0; pointer-events: none; overflow: visible; }
.map-path path { fill: none; stroke-linecap: round; stroke-width: 2; }
.map-path .track { stroke: var(--line-strong); stroke-dasharray: 3 5; }
.map-path .done { stroke: var(--green); opacity: .9; }
.map > .unit, .map > .map-fold { position: relative; z-index: 1; }
.unit.folded { gap: 0; }
.map-fold { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px; justify-content: center; padding: 11px 16px; border-radius: 999px; border: 1px dashed var(--line-strong); color: var(--muted); font-weight: 500; font-size: .9rem; background: var(--surface); transition: border-color .2s, color .2s; }
.map-fold:hover { border-color: var(--head); color: var(--head); }
.map-fold:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.map-fold-dots { display: inline-flex; }
.map-fold-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--fag); border: 2px solid var(--surface); margin-left: -4px; }

/* ------------------------------------------------------------------ guide index (home): four groups */
.groups { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.group { display: grid; align-content: start; gap: 4px; padding: 22px 14px 14px; border-radius: 22px; background: var(--surface-2); border: 1px solid var(--line); }
.group > h3 { margin: 0 8px 2px; font-size: 1.1rem; }
.group > p { margin: 0 8px 12px; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.g-link { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; text-decoration: none; color: var(--ink); transition: background-color .2s, box-shadow .2s; }
.g-link:hover { background: var(--surface); box-shadow: var(--shadow-md); }
.g-link .ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--c, var(--green-dark)); }
.g-link .ico .i { width: 18px; height: 18px; }
.g-link b { display: block; color: var(--head); font-weight: 500; font-size: .95rem; letter-spacing: -0.01em; }
.g-link small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.35; }
/* legacy guide cards (kept for any page that still uses them) */
.guides { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.guide { display: grid; gap: 8px; align-content: start; }
.guide .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--cd, var(--green-dark)); margin-bottom: 6px; }
.guide .ico .i { width: 20px; height: 20px; }
.guide h3 { margin: 0; font-size: 1.08rem; }
.guide p { margin: 0; color: var(--muted); font-size: .93rem; }

/* ------------------------------------------------------------------ checklists */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checklist li { display: block; }
.checklist label { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: background-color .2s, border-color .2s; }
.checklist label:hover { border-color: var(--line-strong); }
.checklist input { appearance: none; width: 24px; height: 24px; margin: 1px 0 0; border-radius: 7px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; cursor: pointer; background: var(--surface); transition: background-color .2s, border-color .2s, transform .2s var(--ease); }
.checklist input::after { content: ""; width: 10px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .25s var(--ease); }
.checklist input:checked { background: var(--green-dark); border-color: var(--green-dark); }
.checklist input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.checklist input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.checklist label:has(input:checked) { background: var(--surface-2); }
.checklist label:has(input:checked) .txt { color: var(--muted); }
.checklist .txt { line-height: 1.45; padding-top: 1px; font-weight: 500; color: var(--head); }
.checklist .txt small { display: block; color: var(--muted); font-size: .85rem; font-weight: 400; margin-top: 2px; }
.cl-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.cl-head h3 { margin: 0; }
svg.ring { width: 48px; height: 48px; flex: none; }
svg.ring circle { fill: none; stroke-width: 5; }
svg.ring .bg { stroke: var(--surface-3); }
svg.ring .fg { stroke: var(--green); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .6s var(--ease); }
svg.ring text { font: 600 12px var(--f-mono); fill: var(--head); }

/* ------------------------------------------------------------------ tabs (deliverables), files, fields */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 24px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.tabs button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-weight: 500; font-size: .92rem; color: var(--ink); transition: background-color .2s, color .2s, box-shadow .2s; }
.tabs button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fag, var(--line-strong)); }
.tabs button:hover { color: var(--head); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--head); box-shadow: var(--shadow-md), 0 0 0 1px var(--line); }
.tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tabs.code button::before { display: none; }
.tabs.code button { font-family: var(--f-mono); font-size: .84rem; }
@media (max-width: 560px) { .tabs { border-radius: 18px; width: 100%; } .tabs button { flex: 1 1 auto; justify-content: center; padding: 8px 10px; } }
.panel-fag { display: grid; gap: 20px; }
.fag-1 { --fag: var(--f1); --fagd: var(--f1d); } .fag-2 { --fag: var(--f2); --fagd: var(--f2d); }
.fag-3 { --fag: var(--f3); --fagd: var(--f3d); } .fag-4 { --fag: var(--f4); --fagd: var(--f4d); }
.fag-5 { --fag: var(--f5); --fagd: var(--f5d); } .fag-0 { --fag: var(--locked); --fagd: var(--locked-d); }
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.files li { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--f-mono); font-size: .86rem; overflow-wrap: anywhere; min-width: 0; }
.files li > * { min-width: 0; }
.files li span { color: var(--muted); font-family: var(--f-sans); font-size: .82rem; }
.copy { all: unset; cursor: pointer; font: 500 .72rem var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); padding: 4px 8px; border-radius: 6px; min-height: 24px; display: inline-grid; place-items: center; }
.copy:hover { background: var(--green-soft); }
.copy:focus-visible { outline: 2px solid var(--accent); }
.field { display: grid; gap: 6px; }
.field > label, .field > .label { font-weight: 500; color: var(--head); font-size: .9rem; }
.input input, .input select, select.select, textarea { border-width: 1px; border-radius: 12px; background: var(--field); font-weight: 400; }
textarea { width: 100%; min-height: 110px; padding: 12px 14px; border: 1px solid var(--line-strong); color: var(--ink); font: inherit; resize: vertical; }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.tree { font-family: var(--f-mono); font-size: .86rem; line-height: 1.7; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; overflow-x: auto; white-space: pre; margin: 0; }
input[type="checkbox"]:not(.checklist input) { width: 18px; height: 18px; accent-color: var(--green-dark); }

/* ------------------------------------------------------------------ calendar list */
.weeks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.week { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; }
.wk { position: relative; display: grid; place-items: center; align-content: center; text-align: center; height: 64px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--head); line-height: 1.05; overflow: hidden; }
.wk::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--fag); }
.wk b { font-size: 1.45rem; font-weight: 600; letter-spacing: -0.03em; display: block; }
.wk span { font: 500 .62rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.week.past .wk, .week.past .week-body { background: var(--surface-2); }
.week.past .wk::before { opacity: .45; }
.week.current .wk { background: var(--head); color: var(--bg); border-color: var(--head); }
.week.current .wk span { color: inherit; opacity: .75; }
.week-body { min-width: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; min-height: 64px; background: var(--surface); }
.week.current .week-body { border-color: var(--head); box-shadow: var(--shadow-md); }
.week-dates { font: 500 .78rem var(--f-mono); color: var(--muted); margin: 0 0 6px; }
.evs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.evs li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.evs li > span:last-child { min-width: 0; flex: 1 1 12em; }
.evs .d { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); min-width: 6.6em; }
.evs .k-due { font-weight: 600; color: var(--head); }
.evs .k-off { color: var(--muted); font-style: italic; }
.evs li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); transform: translateY(-1px); }
.evs .k-talk::before { background: var(--red); }
.evs .k-due::before { background: var(--fag); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fag) 25%, transparent); }
.evs .k-meet::before { background: var(--blue); }
.fag-0 .wk { color: var(--ink); }
@media (max-width: 420px) { .week { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; } .wk { height: 56px; } .wk b { font-size: 1.2rem; } .week-body { padding: 10px 12px; } .evs .d { min-width: 0; } }

/* ------------------------------------------------------------------ user stories */
.us-card { font-size: 1.05rem; line-height: 1.55; padding: 20px 22px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.us-card .w { color: var(--accent-text); font-weight: 600; }
.pair { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin: 0 0 18px; }
.bad, .good { position: relative; padding: 16px 18px 16px 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.bad::before, .good::before { position: absolute; left: 16px; top: 16px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 .78rem var(--f-sans); color: #fff; }
.bad::before { content: "✕"; background: var(--red-dark); }
.good::before { content: "✓"; background: var(--green-dark); }
.bad { border-left: 3px solid var(--red); }
.good { border-left: 3px solid var(--green); }
.bad p, .good p { margin: 0; color: var(--head); }
.bad small, .good small { display: block; margin-top: 6px; color: var(--muted); font-size: .9rem; }
.invest { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.flip { perspective: 900px; min-height: 172px; }
.flip button { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; height: 100%; min-height: 172px; position: relative; transform-style: preserve-3d; transition: transform .7s var(--ease); }
.flip button[aria-pressed="true"] { transform: rotateY(180deg); }
.flip button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 16px; }
.flip .face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 16px; padding: 16px; display: grid; align-content: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.flip .front { text-align: center; }
.flip .front b { font-size: 2.8rem; line-height: 1; font-weight: 600; letter-spacing: -0.04em; color: var(--c); }
.flip .front span { font-weight: 500; color: var(--head); }
.flip .back { transform: rotateY(180deg); font-size: .9rem; background: var(--surface-2); }
.gwt { font-family: var(--f-mono); font-size: .88rem; line-height: 1.7; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); white-space: pre-wrap; margin: 0 0 14px; overflow-wrap: anywhere; }
.gwt b { color: var(--accent-text); font-weight: 600; }

/* planning poker */
.poker { display: grid; gap: 16px; }
.poker-story { font-weight: 500; color: var(--head); }
.cards { display: flex; flex-wrap: wrap; gap: 10px; }
.pcard { all: unset; cursor: pointer; display: grid; place-items: center; width: 56px; height: 80px; border-radius: 12px; font-weight: 600; font-size: 1.35rem; color: var(--head); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s, background-color .2s; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pcard[aria-pressed="true"] { background: var(--head); border-color: var(--head); color: var(--bg); transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.pcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.votes { display: flex; flex-wrap: wrap; gap: 10px; min-height: 90px; }
.vote { width: 56px; height: 80px; border-radius: 12px; display: grid; place-items: center; font-weight: 600; font-size: 1.25rem; background: var(--surface-2); border: 1px solid var(--line); perspective: 600px; color: var(--head); }
.vote.hidden { background: repeating-linear-gradient(45deg, #13241c 0 6px, #0b1712 6px 12px); color: transparent; border-color: #0b1712; }
.vote small { display: block; font-size: .7rem; font-weight: 500; color: var(--muted); text-align: center; }

/* quiz */
.quiz { display: grid; gap: 14px; }
.q { font-weight: 600; color: var(--head); font-size: 1.08rem; letter-spacing: -0.015em; }
.opts { display: grid; gap: 8px; }
.opt { all: unset; box-sizing: border-box; cursor: pointer; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); line-height: 1.45; color: var(--ink); transition: border-color .2s, background-color .2s; }
.opt:hover { border-color: var(--line-strong); background: var(--surface-2); }
.opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt.right { background: var(--green-soft); border-color: var(--green); color: var(--head); }
.opt.wrong { background: var(--red-soft); border-color: var(--red); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.quiz-bar { display: flex; align-items: center; gap: 12px; }
.quiz-bar .bar { flex: 1; }
.feedback { padding: 14px 16px; border-radius: 12px; font-weight: 500; }
.feedback.right { background: var(--green-soft); color: var(--green-text); }
.feedback.wrong { background: var(--red-soft); color: var(--red-text); }

/* task board */
.board { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(170px, 1fr)); overflow-x: auto; padding-bottom: 6px; }
.col { background: var(--surface-2); border-radius: 16px; padding: 12px; min-height: 220px; border: 1px dashed transparent; transition: border-color .2s, background-color .2s; }
.col.over { border-color: var(--accent); background: var(--green-soft); }
.col h4 { margin: 0 0 10px; font: 500 .72rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.task { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: grab; font-size: .9rem; line-height: 1.35; touch-action: none; box-shadow: var(--shadow); color: var(--head); }
.task:active { cursor: grabbing; }
.task.dragging { opacity: .5; }
.task small { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; color: var(--muted); font: 500 .76rem var(--f-mono); }
.task .who { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--head); color: var(--bg); font: 600 .7rem var(--f-sans); }
.task:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* charts */
.chart-box { display: grid; gap: 16px; }
.chart { width: 100%; height: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.chart .grid line { stroke: var(--line); }
.chart text { font: 500 12px var(--f-mono); fill: var(--muted); }
.chart .ideal { stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 5 6; fill: none; }
.chart .real { stroke: var(--green-dark); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { fill: var(--surface); stroke: var(--green-dark); stroke-width: 2.5; }
.chart .barv { fill: var(--head); }
.chart .barv-top { fill: var(--green); }
.chart .avg { stroke: var(--orange); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.chart .title { font: 600 14px var(--f-sans); fill: var(--head); }
.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.nums { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.nums label { display: grid; gap: 2px; font: 500 .74rem var(--f-mono); color: var(--muted); }
.nums input { width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--field); color: var(--ink); font: 500 1rem var(--f-mono); }
.nums input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.seg { border-radius: 999px; }
.seg label { border-radius: 999px; font-weight: 500; }

/* grade simulator */
.sim { display: grid; gap: 22px; }
@media (min-width: 960px) { .sim { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: start; } .sim-out { position: sticky; top: 84px; } }
.slider-f { display: grid; gap: 4px; }
.slider-f .top { display: flex; justify-content: space-between; font-weight: 500; color: var(--head); }
.slider-f output { font-family: var(--f-mono); color: var(--accent-text); }
.slider-f small { color: var(--muted); }
input[type="range"] { accent-color: var(--head); height: 28px; }
.score { display: grid; place-items: center; text-align: center; padding: 28px; }
.score .big { font-size: clamp(3.6rem, 10vw, 5.6rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; color: var(--head); font-variant-numeric: tabular-nums; }
.score .big.pass { color: var(--green-text); }
.score .big.fail { color: var(--red-text); }
.formula { font-family: var(--f-mono); font-size: .86rem; line-height: 1.7; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; overflow-x: auto; white-space: nowrap; color: var(--head); }
.comps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 16px; }
.comp { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--surface); }
.comp b { display: block; font-size: 1.7rem; font-weight: 600; letter-spacing: -0.03em; color: var(--head); }
.comp span { font: 500 .74rem var(--f-mono); color: var(--muted); }
.wtable td.c, .wtable th.c { text-align: center; }

/* timer */
.timer { display: grid; justify-items: center; gap: 18px; text-align: center; }
.dial { position: relative; width: min(280px, 72vw); aspect-ratio: 1; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial circle { fill: none; stroke-width: 10; }
.dial .bg { stroke: var(--surface-3); }
.dial .zone { stroke: var(--green-soft); }
.dial .fg { stroke: var(--head); stroke-linecap: round; transition: stroke .3s; }
.dial.in .fg { stroke: var(--green); }
.dial.over .fg { stroke: var(--red); }
.dial .t { position: absolute; inset: 0; display: grid; place-content: center; }
.dial .t b { font-size: clamp(2.6rem, 9vw, 3.6rem); font-weight: 600; letter-spacing: -0.04em; color: var(--head); font-variant-numeric: tabular-nums; }
.dial .t span { color: var(--muted); font: 500 .8rem var(--f-mono); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ------------------------------------------------------------------ diagrams: every colour is a token, so light and dark both keep contrast */
:root { --d-new: #e9f6f0; --d-open: #eef3fc; --d-iface: #f2effb; --d-test: #fbf4e2; --d-data: #eef1f8; --d-run: #eaf5ef; --d-ci: #eff0f8; --d-net: #fbefe8; --d-team: #fbeeee; --d-vm: #f4f6f8; --d-docker: #edf5fb; --d-note: #fcf8ea; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --d-new: #12271e; --d-open: #131e33; --d-iface: #211c35; --d-test: #2a2414; --d-data: #161c2c; --d-run: #12241b; --d-ci: #181b2e; --d-net: #2b1d15; --d-team: #2c1719; --d-vm: #151a1f; --d-docker: #11212d; --d-note: #26220f; } }
:root[data-theme="dark"] { --d-new: #12271e; --d-open: #131e33; --d-iface: #211c35; --d-test: #2a2414; --d-data: #161c2c; --d-run: #12241b; --d-ci: #181b2e; --d-net: #2b1d15; --d-team: #2c1719; --d-vm: #151a1f; --d-docker: #11212d; --d-note: #26220f; }
.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; overflow-x: auto; box-shadow: var(--shadow); }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram svg text { font: 450 13px var(--f-sans); fill: var(--head); }
.diagram svg .h { font-weight: 600; font-size: 14px; }
.diagram svg .it { font-style: italic; }
.diagram svg .m { font: 450 12px var(--f-mono); fill: var(--ink); }
.diagram svg .rl { font: 500 12px var(--f-sans); fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.diagram svg .col { font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; fill: var(--muted); }
.diagram svg .kt { font: 600 10px var(--f-mono); fill: var(--head); }
.diagram svg .body { fill: var(--surface); }
.diagram svg .frame { fill: none; stroke: var(--head); stroke-width: 1.3; }
.diagram svg .sep { stroke: var(--head); stroke-width: 1; }
.diagram svg .hd { fill: var(--surface-2); }
.diagram svg .hd.new { fill: var(--d-new); } .diagram svg .hd.open { fill: var(--d-open); } .diagram svg .hd.iface { fill: var(--d-iface); }
.diagram svg .hd.test { fill: var(--d-test); } .diagram svg .hd.data { fill: var(--d-data); }
.diagram svg .note { fill: var(--d-note); stroke: var(--line-strong); stroke-width: 1; }
.diagram svg .card { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.3; }
.diagram svg .card.c-client { fill: var(--d-new); } .diagram svg .card.c-run { fill: var(--d-run); } .diagram svg .card.c-data { fill: var(--d-data); }
.diagram svg .card.c-ext { fill: var(--d-open); } .diagram svg .card.c-team { fill: var(--d-team); } .diagram svg .card.c-net { fill: var(--d-net); }
.diagram svg .card.c-ci { fill: var(--d-ci); } .diagram svg .card.c-new { fill: var(--d-new); }
.diagram svg .card.dash, .diagram svg .l.dash { stroke-dasharray: 7 5; }
.diagram svg .zone { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.3; }
.diagram svg .zone.z-vm { fill: var(--d-vm); stroke: var(--f4d); stroke-width: 1.5; }
.diagram svg .zone.z-docker { fill: var(--d-docker); stroke: #2496ed; stroke-dasharray: 8 5; }
.diagram svg .chip { fill: #fff; stroke: var(--line-strong); stroke-width: 1; }
.diagram svg .glyph { fill: var(--surface); stroke: var(--head); stroke-width: 1.2; }
.diagram svg .key { stroke: none; } .diagram svg .key.pk { fill: var(--gold); } .diagram svg .key.fk { fill: var(--d-open); stroke: var(--f4d); stroke-width: 1; }
.diagram svg .l { stroke: var(--head); stroke-width: 1.4; fill: none; }
.diagram svg .l.dot { stroke-dasharray: 2 5; stroke-linecap: round; stroke: var(--f2d); }
.diagram svg .mk { fill: var(--head); } .diagram svg .mk-open { fill: var(--surface); stroke: var(--head); stroke-width: 1.2; }
.diagram svg line:not([class]) { stroke: var(--head); stroke-width: 1.3; }
@media (prefers-reduced-motion: no-preference) { .diagram svg .l.dot { animation: flow 1.4s linear infinite; } }
.diagram figcaption, figure figcaption { font-size: .86rem; color: var(--muted); margin-top: 8px; }
figure { margin: 0 0 22px; }
.mistakes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mistakes li { padding: 12px 14px 12px 44px; position: relative; border-radius: 12px; background: color-mix(in srgb, var(--red) 4%, var(--surface)); border: 1px solid color-mix(in srgb, var(--red) 28%, var(--line)); }
.mistakes li::before { content: "!"; position: absolute; left: 14px; top: 13px; width: 20px; height: 20px; border-radius: 50%; background: var(--red-dark); color: #fff; font-weight: 600; display: grid; place-items: center; font-size: .75rem; }

/* gitflow */
.gitflow svg { min-width: 560px; }
.gitflow .lane { font: 500 12px var(--f-mono); }
.gitflow circle { stroke: var(--surface); stroke-width: 3; }
@media (prefers-reduced-motion: no-preference) {
  .gitflow.in .br { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.4s var(--ease) forwards; animation-delay: var(--d, 0s); }
  .gitflow.in circle { animation: pop .4s var(--ease) both; animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: center; }
  @keyframes pop { from { transform: scale(0); } }
}

/* service rotation */
.rotation { display: grid; place-items: center; }
.rotation svg { width: min(420px, 100%); height: auto; }
.rotation text { font: 600 22px var(--f-sans); fill: #fff; }
.rotation .lbl { font: 500 12px var(--f-mono); fill: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .rotation .flow { stroke-dasharray: 6 10; animation: flow 1.2s linear infinite; }
  @keyframes flow { to { stroke-dashoffset: -32; } }
}

/* faq + tables */
.faq { display: grid; border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 2px; font-weight: 500; color: var(--head); display: flex; justify-content: space-between; gap: 16px; align-items: center; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; font-weight: 300; line-height: 1; color: var(--muted); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 2px 20px; max-width: 70ch; }
.table-scroll { border-width: 1px; border-radius: 16px; background: var(--surface); }
thead th { background: var(--surface-2); font: 500 .74rem var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
td { color: var(--ink); }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; }

/* 404 */
.nf .nf-code { color: var(--muted); font-family: var(--f-mono); font-weight: 500; }
@media print { .node .bubble, #confetti, .stage { display: none; } }

/* tools: NAT table, commit checker, steps */
:root { --warn-text: #8a5300; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --warn-text: #f0c562; } }
:root[data-theme="dark"] { --warn-text: #f0c562; }
.out, .cmd { font-family: var(--f-mono); font-size: .82rem; line-height: 1.65; background: #0d1117; color: #d6dde5; border: 1px solid #1c232c; border-radius: 14px; padding: 14px 16px; margin: 0; overflow: auto; white-space: pre; tab-size: 2; }
.out { max-height: 440px; }
.out code, .cmd code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.out-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
textarea.code { font-family: var(--f-mono); font-size: .86rem; line-height: 1.6; min-height: 330px; tab-size: 2; white-space: pre; overflow: auto; }
.types { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.types code { font-size: .78rem; }
table.nat td, table.nat th { padding: 8px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.checks li::before { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; font-weight: 600; font-size: .78rem; }
.checks li.ok::before { content: "✓"; background: var(--green-dark); color: #fff; }
.checks li.bad::before { content: "✗"; background: var(--red-dark); color: #fff; }
.checks li.warn::before { content: "!"; background: var(--gold); color: #3d2e00; }
.checks li.info::before { content: "i"; background: var(--blue-soft); color: var(--blue-text); }
.checks li.bad { color: var(--red-text); } .checks li.warn { color: var(--warn-text); } .checks li.info { color: var(--muted); font-weight: 400; }
.checks li.bad, .checks li.good { padding: 0; border: 0; background: none; }
.checks li.bad::before, .checks li.good::before { position: static; }
.count { font-family: var(--f-mono); font-size: .82rem; color: var(--muted); font-weight: 500; }
.count.over { color: var(--red-text); }
.steps { counter-reset: st; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps > li { counter-increment: st; position: relative; padding-left: 48px; min-width: 0; }
.steps > li::before { content: counter(st, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--head); color: var(--bg); font: 500 .78rem var(--f-mono); }
.steps > li b:first-child { color: var(--head); }

/* architecture flow (MVVM, BLoC, mock swap) */
.flow-d { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 8px; }
.flow-d .box { overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 16px; padding: 16px 12px; text-align: center; background: var(--surface); font-weight: 600; color: var(--head); box-shadow: var(--shadow); border-top: 3px solid var(--line-strong); }
.flow-d .box small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.flow-d .box.c1 { border-top-color: var(--f3); } .flow-d .box.c2 { border-top-color: var(--f4); } .flow-d .box.c3 { border-top-color: var(--f5); }
.flow-d .arr { display: grid; gap: 4px; justify-items: center; font: 500 .7rem var(--f-mono); color: var(--muted); }
.flow-d .arr i { display: block; width: 46px; height: 2px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--head) 0 6px, transparent 6px 11px); }
.flow-d .arr i.back { transform: scaleX(-1); background: repeating-linear-gradient(90deg, var(--green) 0 6px, transparent 6px 11px); }
@media (prefers-reduced-motion: no-preference) { .flow-d .arr i { background-size: 11px 2px; animation: dash .7s linear infinite; } @keyframes dash { to { background-position: 11px 0; } } }
@media (max-width: 640px) { .flow-d { grid-template-columns: 1fr; } .flow-d .arr i { animation: none !important; } .flow-d .arr { grid-auto-flow: column; justify-content: center; } .flow-d .arr i { width: 2px; height: 24px; background: repeating-linear-gradient(180deg, var(--head) 0 6px, transparent 6px 11px); } .flow-d .arr i.back { transform: scaleY(-1); background: repeating-linear-gradient(180deg, var(--green) 0 6px, transparent 6px 11px); } }
.swap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.swap .box.fake { border-style: dashed; }

p > a:only-child { display: inline-block; min-height: 24px; }

/* ------------------------------------------------------------------ presentation mode: one section per slide, sized for a projector */
.pres-open { all: unset; position: fixed; right: 18px; bottom: 18px; z-index: 40; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-weight: 500; font-size: .92rem; color: var(--bg); background: var(--head); box-shadow: var(--shadow-lg); transition: transform .2s var(--ease); }
.pres-open:hover { transform: translateY(-2px); }
.pres-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
html.present { font-size: clamp(16px, 0.55vw + 10px, 26px); scroll-behavior: auto; }
html.present .site-head, html.present .site-foot, html.present .pres-open, html.present main > :not(section), html.present .adsbygoogle, html.present .google-auto-placed, html.present .skip { display: none !important; }
html.present main > section { display: none !important; }
html.present main > section.cur { display: flex !important; flex-direction: column; justify-content: center; min-height: 100vh; box-sizing: border-box; padding: 5vh 0 11vh; margin: 0 auto; }
html.present main > section.cur.wrap, html.present main > section.cur .wrap { max-width: min(1500px, 92vw); width: 100%; }
html.present main > section.cur > .wrap { margin: 0 auto; }
html.present .diagram svg { min-width: 0 !important; max-height: 58vh; }
.pres-hud { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 4px; padding: 6px 8px 10px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: var(--shadow-lg); opacity: .35; transition: opacity .25s; font-size: 15px; }
.pres-hud:hover, .pres-hud:focus-within { opacity: 1; }
.pres-hud button { all: unset; cursor: pointer; min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; font-weight: 500; color: var(--head); }
.pres-hud button:hover { background: var(--surface-2); }
.pres-hud button:focus-visible { outline: 2px solid var(--accent); }
.pres-where { padding: 0 8px; color: var(--muted); white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.pres-where b { color: var(--head); font-weight: 600; }
.pres-bar { position: absolute; left: 10px; right: 10px; bottom: 4px; height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.pres-bar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .4s var(--ease); }
.pres-toast { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 70; padding: 22px 30px; border-radius: 20px; background: var(--head); color: var(--bg); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.02em; box-shadow: var(--shadow-lg); }
@media (prefers-reduced-motion: no-preference) { html.present main > section.cur { animation: slidein .45s var(--ease); } @keyframes slidein { from { opacity: 0; transform: translateY(14px); } } }
@media print { .pres-open, .pres-hud { display: none !important; } }
/* presentation mode on a projector: forced light theme with darker text (pale greys vanish when projected) */
html.present[data-theme="light"] { color-scheme: light; --ink: #23282e; --muted: #474e57; --line: #d6dade; --line-strong: #b4bac1; }
html.present[data-theme="dark"] { color-scheme: dark; --bg: #0b0d10; --surface: #111418; --surface-2: #15191e; --surface-3: #1c2127; --field: #111418; --ink: #c5ccd4; --head: #f3f5f7; --muted: #8e97a2; --line: #232930; --line-strong: #353c45; --green-text: #4fd69c; --green-soft: #0f2a20; --blue-text: #86b0f7; --blue-soft: #121f36; --red-text: #ff8f8f; --red-soft: #33171a; --locked: #353c45; --locked-d: #59616b; --accent: #4fd69c; --accent-text: #4fd69c; --accent-ink: #062016; --d-new: #12271e; --d-open: #131e33; --d-iface: #211c35; --d-test: #2a2414; --d-data: #161c2c; --d-run: #12241b; --d-ci: #181b2e; --d-net: #2b1d15; --d-team: #2c1719; --d-vm: #151a1f; --d-docker: #11212d; --d-note: #26220f; }
html.present body { background: var(--bg); color: var(--ink); }

/* ------------------------------------------------------------------ reading progress (motion.js) */
.read-progress { position: fixed; z-index: 41; left: 0; right: 0; top: 0; height: 2px; background: var(--green); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
html.present .read-progress { display: none; }

/* ------------------------------------------------------------------ verified with Racó, subscription */
.verified { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 18px 0 0; font-size: .86rem; color: var(--muted); }
.verified > .i { color: var(--green-text); width: 16px; height: 16px; }
.verified .changes summary { cursor: pointer; color: var(--accent-text); font-weight: 500; }
.verified .changes ul { margin: 6px 0 0; padding-left: 1.2em; }
.sub-help { margin: 12px 0 0; font-size: .9rem; color: var(--muted); max-width: 70ch; }
.cl-share { margin-top: 12px; }
.cl-import { display: grid; gap: 10px; margin-bottom: 14px; }
.cl-import p { margin: 0; }
.cl-import .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ diagram viewer (phones) */
figure.diagram { position: relative; }
.dg-zoom { display: none; }
@media (max-width: 760px) {
  .dg-zoom { all: unset; position: sticky; left: calc(100% - 46px); top: 0; float: right; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; margin: -4px -4px 0 0; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); color: var(--head); cursor: pointer; }
  .dg-zoom:focus-visible { outline: 2px solid var(--accent); }
}
.dg-view { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--ink); }
.dg-view::backdrop { background: rgb(0 0 0 / .4); }
.dg-pan { width: 100%; height: 100%; overflow: auto; overscroll-behavior: contain; padding: 64px 16px 24px; box-sizing: border-box; -webkit-overflow-scrolling: touch; }
.dg-pan svg { width: 900px !important; min-width: 900px !important; max-width: none; height: auto; }
.dg-pan svg text { font: 450 13px var(--f-sans); fill: var(--head); }
.dg-close { position: fixed; top: 12px; right: 12px; z-index: 2; }
@media (prefers-reduced-motion: no-preference) { .dg-view[open] { animation: dg-in .22s var(--ease-out); } @keyframes dg-in { from { opacity: 0; transform: scale(.98); } } }

/* ------------------------------------------------------------------ table of contents: active section, sticky on phones */
.toc a[aria-current] { border-color: var(--head); color: var(--bg); background: var(--head); }
.toc-float { display: none; }
@media (max-width: 899px) {
  .toc-float { display: flex; position: fixed; z-index: 39; left: 0; right: 0; top: 60px; margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 8px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); transform: translateY(-120%); visibility: hidden; transition: transform .25s var(--ease-out), visibility 0s .25s; }
  .toc-float.on { transform: none; visibility: visible; transition: transform .25s var(--ease-out); }
  .toc-float::-webkit-scrollbar { display: none; }
  .toc-float a { white-space: nowrap; flex: none; padding: 5px 12px; font-size: .84rem; }
  html.present .toc-float { display: none; }
}

/* ------------------------------------------------------------------ folder tree: notes drop below on phones */
@media (max-width: 560px) {
  .tree { font-size: .78rem; }
  .tree .tp { display: none; }
  .tree .tc { display: block; padding-left: 4ch; color: var(--muted); white-space: pre-wrap; }
}

/* ------------------------------------------------------------------ section rhythm: alternate band on the guide index */
.band { background: var(--surface-2); border-block: 1px solid var(--line); padding-block: 88px; margin-top: 96px; }
.band + .sec { padding-top: 88px; }

/* ------------------------------------------------------------------ mock API (/mock-api): editor + live API
   Signature: the route board, every endpoint a pressable chip coloured by HTTP method that fires into the console.
   Motion only says what changed: a 200 ms reveal when an API is created, a blur cross-fade for each new response. */
:root { --m-get: var(--blue); --m-post: var(--green); --m-put: var(--gold); --m-del: var(--red-dark); --ease-out: cubic-bezier(.23,1,.32,1); }
.mk-hero h1 { max-width: 18ch; }
.mk-hero-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 18px; }
.mk-status { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; font-size: .92rem; color: var(--ink); background: var(--surface); }
.mk-status i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); flex: none; }
.mk-status[data-state="ok"] i { background: var(--green); }
.mk-status[data-state="busy"] { border-color: var(--gold); } .mk-status[data-state="busy"] i { background: var(--gold); }
.mk-status[data-state="down"] { border-color: var(--red); } .mk-status[data-state="down"] i { background: var(--red); }
@media (prefers-reduced-motion: no-preference) { .mk-status[data-state="ok"] i { animation: mk-pulse 2.4s ease-out infinite; } }
@keyframes mk-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.mk-demo { display: inline-flex; align-items: center; gap: 8px; margin: 0; min-width: 0; max-width: 100%; }
.mk-demo a { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-demo code { font-size: .82rem; }

.mk { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 22px; align-items: start; }
@media (max-width: 1023px) { .mk { grid-template-columns: minmax(0, 1fr); } }
.mk-edit, .mk-live, .mk-api, .mk-empty, .mk-visual, .mk-res, .mk-fields, .mk-routes, .mk-console, .mk-resp, .mk-report, .vt-form, .vt-out, .vt-step { grid-template-columns: minmax(0, 1fr); }
.mk-edit { display: grid; gap: 14px; min-width: 0; }
.mk-edit-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.mk-edit-head h3, .mk-empty h3, .mk-h { margin: 0; font-size: 1.15rem; }
.mk-tabs { margin-bottom: 12px; }
.mk-ta { width: 100%; box-sizing: border-box; min-height: 260px; padding: 12px 14px; border: 1px solid var(--line); color: var(--head); }
.mk-ta-sm { min-height: 120px; }
.mk-ta:focus, .mk-path:focus, .mk-f input:focus, .mk-f select:focus, .mk-res-name:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--blue); }

/* visual editor */
.mk-visual { display: grid; gap: 12px; }
.mk-res { border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px; display: grid; gap: 8px; background: var(--surface-2); }
.mk-res-head { display: flex; gap: 8px; align-items: center; }
.mk-res-name { flex: 1; min-width: 0; font: 600 1rem var(--f-mono); color: var(--head); background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.mk-res-id { font: 600 .78rem var(--f-mono); color: var(--muted); padding: 4px 8px; border-radius: 999px; border: 1px dashed var(--line-strong); }
.mk-fields { display: grid; gap: 6px; }
.mk-f { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.mk-f input, .mk-f select { width: 100%; min-width: 0; box-sizing: border-box; font: 500 .9rem var(--f-mono); color: var(--head); background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; min-height: 40px; }
.mk-f input[hidden] { display: block; visibility: hidden; }
.mk-x { all: unset; cursor: pointer; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--muted); transition: background-color .15s, color .15s, transform .1s; }
.mk-x:hover { background: var(--red-soft); color: var(--red-text); }
.mk-x:active { transform: scale(.94); }
.mk-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mk-i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mk-add { justify-self: start; gap: 6px; }
.mk-file { position: relative; overflow: hidden; gap: 8px; }
.mk-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.mk-file:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

.mk-errs, .mk-msg { margin: 0; font-weight: 600; min-height: 1.4em; }
.mk-errs[data-kind="ok"], .mk-msg[data-kind="ok"] { color: var(--green-text); }
.mk-errs[data-kind="err"], .mk-msg[data-kind="err"], .mk-hint[data-kind="err"] { color: var(--red-text); }
.mk-opts { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 520px) { .mk-opts { grid-template-columns: minmax(0, 1fr); } }
.mk-access { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; min-width: 0; }
.mk-access legend { font-weight: 600; color: var(--head); font-size: .92rem; margin-bottom: 6px; padding: 0; }
.mk-access label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: .9rem; line-height: 1.35; transition: border-color .15s, background-color .15s; }
.mk-access label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.mk-access input { margin: 3px 0 0; accent-color: var(--blue-dark); }
.mk-access b { color: var(--head); margin-right: 4px; }
.mk-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mk-pf { margin-left: auto; gap: 6px; }
@media (max-width: 520px) { .mk-pf { margin-left: 0; } .mk-actions .btn:not(.btn-sm) { flex: 1 1 100%; } }
.mk-fine { margin: 0; font-size: .82rem; }
.btn[aria-busy="true"] { cursor: progress; filter: saturate(.7); }
.btn-danger { background: var(--surface); border-color: var(--red-soft); color: var(--red-text); }
.btn-danger:hover { background: var(--red-soft); }

/* live API */
.mk-live { display: grid; gap: 14px; min-width: 0; }
.mk-empty { display: grid; gap: 10px; border-style: dashed; }
.mk-empty p { margin: 0; color: var(--muted); }
.mk-steps { margin: 4px 0 0; padding-left: 1.3em; display: grid; gap: 4px; font-weight: 600; color: var(--head); }
.mk-api { display: grid; gap: 14px; min-width: 0; }
@media (prefers-reduced-motion: no-preference) {
  .mk-api.is-new { animation: mk-in .22s var(--ease-out); }
  @keyframes mk-in { from { opacity: 0; transform: translateY(6px) scale(.99); } }
}
.mk-url { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; background: var(--blue-soft); }
.mk-url code { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; background: none; border: 0; font-size: .92rem; font-weight: 600; color: var(--head); padding: 0; }
.mk-url .tag { background: var(--surface); color: var(--blue-text); }
.mk-meta { margin: -6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .86rem; color: var(--muted); }
.mk-secret { border: 1px solid var(--gold); border-radius: 14px; padding: 0 14px; }
.mk-secret summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--head); }
.mk-secret[open] { padding-bottom: 14px; }
.mk-secret > * + * { margin-top: 10px; }
.mk-sec-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: .86rem; font-weight: 600; }
.mk-sec-row code { overflow-wrap: anywhere; font-size: .8rem; }
.mk-sec-row[hidden] { display: none; }
@media (max-width: 520px) { .mk-sec-row { grid-template-columns: minmax(0, 1fr) auto; } .mk-sec-row > span { grid-column: 1 / -1; } }

/* the route board */
.mk-routes { display: grid; gap: 12px; }
.mk-rg h4 { margin: 0 0 6px; font: 600 .9rem var(--f-mono); color: var(--head); }
.mk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-chip { --c: var(--m-get); all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 3px 10px 3px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: .82rem; font-weight: 600; color: var(--ink); transition: transform .1s var(--ease-out), border-color .15s; }
.mk-chip b { font: 600 .72rem var(--f-mono); letter-spacing: .02em; padding: 3px 6px; border-radius: 6px; background: var(--c); color: var(--on-color); }
.mk-chip[data-m="get"] b { color: var(--accent-ink); }
.mk-chip[data-m="post"] { --c: var(--m-post); }
.mk-chip[data-m="put"], .mk-chip[data-m="patch"] { --c: var(--m-put); }
.mk-chip[data-m="delete"] { --c: var(--m-del); }
.mk-chip[data-m="delete"] b { color: #fff; }
@media (hover: hover) and (pointer: fine) { .mk-chip:hover { border-color: var(--c); } }
.mk-chip:active { transform: translateY(2px); }
.mk-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
span.mk-chip { cursor: default; padding-right: 4px; }

/* console */
.mk-console { display: grid; gap: 10px; border-top: 1px solid var(--line); }
.mk-req { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px; padding-top: 14px; }
.mk-req select { min-height: 40px; font: 600 .86rem var(--f-mono); }
.mk-path { min-width: 0; box-sizing: border-box; font: 500 .9rem var(--f-mono); color: var(--head); background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
@media (max-width: 520px) { .mk-req { grid-template-columns: 96px minmax(0, 1fr); } .mk-req .btn { grid-column: 1 / -1; } }
.mk-req-opts { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: .86rem; }
.mk-req-opts label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; min-height: 32px; }
.mk-req-opts label[hidden] { display: none; }
.mk-req-opts .linklike { margin-left: auto; color: var(--blue-text); font: inherit; font-weight: 600; min-height: 32px; }
.mk-resp { display: grid; gap: 8px; min-width: 0; }
.mk-resp[hidden] { display: none; }
.mk-resp-bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .86rem; color: var(--muted); }
.mk-code { font: 600 .86rem var(--f-mono); padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--head); }
.mk-resp[data-cls="2"] .mk-code { background: var(--green-soft); color: var(--green-text); }
.mk-resp[data-cls="4"] .mk-code { background: color-mix(in srgb, var(--gold) 22%, var(--surface)); color: var(--warn-text); }
.mk-resp[data-cls="5"] .mk-code, .mk-resp[data-cls="0"] .mk-code { background: var(--red-soft); color: var(--red-text); }
.mk-hint { margin: 0; font-size: .9rem; font-weight: 600; }
.mk-hint:empty { display: none; }
.mk-out { max-height: 360px; }
.mk-resp.is-loading .mk-out { opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
  .mk-resp.is-swap .mk-out { animation: mk-swap .18s var(--ease-out); }
  @keyframes mk-swap { from { opacity: .3; filter: blur(2px); } }
}

/* my APIs, tables, report */
.mk-list { display: grid; gap: 10px; }
.mk-none { margin: 0; color: var(--muted); }
.mk-item { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.mk-item.is-cur { border-color: var(--blue); }
.mk-item-main { display: grid; gap: 4px; min-width: 0; flex: 1 1 260px; }
.mk-item-main b { color: var(--head); overflow-wrap: anywhere; }
.mk-item-main code { font-size: .78rem; overflow-wrap: anywhere; justify-self: start; }
.mk-item-meta { display: flex; gap: 10px; align-items: center; font-size: .82rem; color: var(--muted); }
.mk-item-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.mk-table th, .mk-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mk-table th { color: var(--head); font-weight: 600; background: var(--surface-2); }
.mk-table tr:last-child td { border-bottom: 0; }
.mk-table td:first-child code { white-space: nowrap; }
.mk-table td[data-lim] { font: 600 .95rem var(--f-mono); color: var(--head); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mk-report { display: grid; gap: 12px; }
.mk-report textarea, .mk-report .select { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); font: inherit; color: var(--head); }
.mk-report .btn { justify-self: start; }
.mk-work ::selection, .mk-out ::selection { background: color-mix(in srgb, var(--blue) 30%, transparent); }

/* ------------------------------------------------------------------ virtech generator (/virtech), promos on /api */
.vt { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 22px; align-items: start; }
@media (max-width: 1023px) { .vt { grid-template-columns: minmax(0, 1fr); } }
.vt-form { display: grid; gap: 14px; }
@media (min-width: 1024px) { .vt-form { position: sticky; top: 84px; } }
.vt-form [hidden] { display: none; }
.vt-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 420px) { .vt-2 { grid-template-columns: minmax(0, 1fr); } }
.vt-form .select { width: 100%; }
.vt-form .btn { justify-self: start; gap: 6px; }
.vt-out { display: grid; gap: 18px; min-width: 0; counter-reset: vt; }
.vt-step { display: grid; gap: 8px; min-width: 0; }
.vt-step h3 { margin: 0; font-size: 1.02rem; }
.vt-step-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.vt-step .help { margin: 0; }
.vt-step .cmd { white-space: pre; }
table.nat { width: 100%; border-collapse: collapse; }
table.nat th { text-align: left; color: var(--head); background: var(--surface-2); }
table.nat tr.is-cur td { background: var(--green-soft); }
table.nat .tag { background: var(--head); color: var(--bg); border-color: var(--head); margin-left: 6px; }
.mk-promo { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 22px; align-items: center; border-color: var(--blue); }
.mk-promo h2 { margin: 0 0 8px; }
.mk-promo .lead { margin: 0; }
.mk-promo-ex { display: grid; gap: 12px; justify-items: start; }
.mk-promo-ex .help { margin: 0; }
.mk-promo-ex .presets { justify-content: flex-start; }
table.nat th { white-space: normal; }
.mk-promo-ex .btn-solid { gap: 8px; }
@media (max-width: 760px) { .mk-promo { grid-template-columns: minmax(0, 1fr); } }
.vt-promo { display: grid; gap: 10px; justify-items: start; max-width: 860px; }
.vt-promo h2 { margin: 0; }
.vt-promo p { margin: 0; color: var(--ink); }
.vt-promo .btn { gap: 8px; pointer-events: none; }

/* ------------------------------------------------------------------ tools index (top of /eines) */
.tools-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.tool-row { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); text-decoration: none; color: var(--ink); background: var(--surface); transition: transform .1s cubic-bezier(.23,1,.32,1), border-color .15s; }
.tool-row b { display: block; color: var(--head); }
.tool-row small { display: block; color: var(--muted); font-size: .86rem; line-height: 1.35; }
.tool-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--blue-soft); color: var(--blue-text); }
.tool-ico svg { width: 22px; height: 22px; }
.tool-row:nth-child(-n+2) .tool-ico { background: var(--green-soft); color: var(--green-text); }
@media (hover: hover) and (pointer: fine) { .tool-row:hover { border-color: var(--blue); } }
.tool-row:active { transform: translateY(2px); }
.tool-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------------ mock API: relationship tree (visual schema) */
:root { --rel-0: var(--blue-dark); --rel-1: var(--green-dark); --rel-2: #5b3fb8; --rel-3: #a3401a; --rel-4: #b02525; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rel-0: #86b0f7; --rel-1: #4fd69c; --rel-2: #b9a6f2; --rel-3: #f39a6e; --rel-4: #ff8f8f; } }
:root[data-theme="dark"] { --rel-0: #86b0f7; --rel-1: #4fd69c; --rel-2: #b9a6f2; --rel-3: #f39a6e; --rel-4: #ff8f8f; }
.mk-opts { grid-template-columns: minmax(0, 1fr); }
.mk-diagram { position: relative; display: grid; gap: 12px; padding-left: calc(10px + var(--lanes, 0) * 8px); }
.mk-links { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.mk-link { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mk-link.rel-0 { stroke: var(--rel-0); } .mk-link.rel-1 { stroke: var(--rel-1); } .mk-link.rel-2 { stroke: var(--rel-2); }
.mk-link.rel-3 { stroke: var(--rel-3); } .mk-link.rel-4 { stroke: var(--rel-4); }
@media (prefers-reduced-motion: no-preference) {
  .mk-link.is-new { stroke-dasharray: 600; stroke-dashoffset: 600; animation: mk-draw .45s var(--ease-out) forwards; }
  @keyframes mk-draw { to { stroke-dashoffset: 0; } }
}
.mk-res { margin-left: calc(var(--depth, 0) * 14px); }
.mk-res-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.mk-count { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.mk-count input { width: 64px; box-sizing: border-box; font: 600 .9rem var(--f-mono); text-align: right; color: var(--head); background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; min-height: 40px; }
.mk-count input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--blue); }
.mk-f { grid-template-columns: 22px minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr) 36px; row-gap: 2px; }
.mk-f-ico { display: grid; place-items: center; color: var(--muted); }
.mk-f-ico .mk-i { width: 16px; height: 16px; }
.mk-f-pk .mk-f-ico { color: var(--gold-dark); }
.mk-f-pk { min-height: 40px; }
.mk-ro { font: 600 .9rem var(--f-mono); color: var(--head); padding-left: 10px; }
.mk-f-auto { grid-column: 3 / -1; font-size: .8rem; color: var(--muted); }
.mk-f-ex { grid-column: 2 / -1; font: 500 .74rem var(--f-mono); color: var(--muted); padding: 0 2px 4px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-f-fk .mk-f-arg { font-weight: 600; }
.mk-f-fk[data-rel="0"] .mk-f-ico, .mk-f-fk[data-rel="0"] .mk-f-arg { color: var(--rel-0); }
.mk-f-fk[data-rel="1"] .mk-f-ico, .mk-f-fk[data-rel="1"] .mk-f-arg { color: var(--rel-1); }
.mk-f-fk[data-rel="2"] .mk-f-ico, .mk-f-fk[data-rel="2"] .mk-f-arg { color: var(--rel-2); }
.mk-f-fk[data-rel="3"] .mk-f-ico, .mk-f-fk[data-rel="3"] .mk-f-arg { color: var(--rel-3); }
.mk-f-fk[data-rel="4"] .mk-f-ico, .mk-f-fk[data-rel="4"] .mk-f-arg { color: var(--rel-4); }
.mk-res-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mk-belongs { min-height: 40px; max-width: 100%; font: 600 .86rem var(--f-sans); color: var(--blue-text); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 10px; cursor: pointer; }
.mk-belongs:disabled { opacity: .5; cursor: default; }
.mk-belongs:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 520px) {
  .mk-f { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) 36px; }
  .mk-f .mk-f-arg { grid-column: 2 / 4; }
  .mk-f input.mk-f-arg[hidden] { display: none; }
  .mk-res { margin-left: calc(var(--depth, 0) * 8px); }
  .mk-res-head { grid-template-columns: minmax(0, 1fr) auto auto; }
  .mk-count span { display: none; }
}

/* ------------------------------------------------------------------ search dialog (assets/search.js) */
.search-dlg { position: fixed; inset: 0; margin: 9vh auto auto; width: min(660px, calc(100vw - 24px)); max-height: min(78dvh, 640px); padding: 0; overflow: hidden;
  display: none; flex-direction: column; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 60px rgba(0, 0, 0, .28); }
.search-dlg[open] { display: flex; animation: sd-in .16s ease-out; }
.search-dlg::backdrop { background: rgba(19, 31, 36, .55); backdrop-filter: blur(3px); }
@keyframes sd-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .search-dlg[open] { animation: none; } }
html.searching { overflow: hidden; }
.sd-head { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line); }
.sd-head > svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.sd-head input { flex: 1; min-width: 0; height: 58px; border: 0; background: transparent; color: var(--head); font: 500 1.08rem var(--f-sans); outline: none; -webkit-appearance: none; appearance: none; }
.sd-head input::-webkit-search-cancel-button { display: none; }
.sd-head input::placeholder { color: var(--muted); }
.sd-close { font: 600 .72rem var(--f-mono); color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; cursor: pointer; }
.sd-close:hover { color: var(--ink); }
.search-dlg ul { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.search-dlg ul:empty { display: none; }
.search-dlg li a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.search-dlg li[aria-selected="true"] a { background: var(--blue-soft); border-color: var(--accent); }
.sd-h { color: var(--head); font-weight: 600; }
.sd-p { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); }
.sd-x { font-size: .88rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-dlg mark { background: var(--gold); color: #2a2100; border-radius: 3px; padding: 0 1px; }
.sd-foot { padding: 14px 18px 4px; }
.sd-foot:empty { display: none; }
.sd-sugg, .sd-none { margin: 0 0 10px; color: var(--muted); font-size: .92rem; }
.sd-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; }
.sd-chips .chip { font: 600 .88rem var(--f-sans); color: var(--head); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.sd-chips .chip:hover, .sd-chips .chip:focus-visible { border-color: var(--accent); }
.sd-hint { margin: 0; padding: 9px 18px; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface-2); }
@media (pointer: coarse) { .sd-hint { display: none; } }
@media (max-width: 560px) { .search-dlg { margin-top: 12px; max-height: calc(100dvh - 24px); } }
html.present .head-search { display: none; }

/* header with the search button: tighter gaps so the longest translation (es) fits in 1168px next to the nav */
@media (min-width: 900px) {
  .head-row { gap: 12px; }
  .head-search, .head-search + .lang-switch { margin-left: 0; }
}
@media (min-width: 1200px) { .head-nav a { padding-inline: 10px; } .head-nav { margin-left: auto; } .head-nav + .head-search { margin-left: 8px; } }
@media (min-width: 900px) and (max-width: 1199px) { .head-search { margin-left: auto; } }
@media (max-width: 899px) { .head-row { gap: 6px; } .head-search, .head-search + .lang-switch, .head-search ~ .menu { margin-left: 0; } .head-search { margin-left: auto; } .brand { flex: none; } .brand svg { flex: none; } }
@media (max-width: 400px) { .brand span { display: none; } }   /* the logo alone (the link keeps its aria-label) so search, language and menu fit at 360px */

/* ================================================================ mockups page showcase (/maquetes, tool/mockups.py)
   Product art (Bici Verda, an invented app) keeps its own fixed colours in both themes: it is a picture of a product.
   Phones size everything in em of .ph (width / 22). The 3D box is pure CSS 3D; assets/mockups.js drives it. */
.ph { --pw: 220px; position: relative; flex: none; box-sizing: border-box; width: var(--pw); height: calc(var(--pw) * 2.08); padding: calc(var(--pw) * .03); border-radius: calc(var(--pw) * .16); font-size: calc(var(--pw) / 22); background: linear-gradient(145deg, #3a4048, #0c0e11 38%, #1c2025 70%, #0a0b0d); box-shadow: inset 0 0 0 1.5px #5b636d, inset 0 0 0 calc(var(--pw) * .012) #07080a, 0 2.2em 4em -1.6em rgb(5 25 18 / .55), 0 .8em 1.4em -.8em rgb(0 0 0 / .4); }
.ph::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 8; background: linear-gradient(115deg, rgb(255 255 255 / .2) 0 14%, rgb(255 255 255 / 0) 34%, rgb(255 255 255 / 0) 78%, rgb(255 255 255 / .06)); }
.ph-scr { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: calc(var(--pw) * .13); background: #f3f6f1; color: #13241c; font-family: var(--f-sans); line-height: 1.25; text-align: left; letter-spacing: 0; isolation: isolate; }
.ph-scr::before { content: ""; position: absolute; z-index: 9; top: .75em; left: 50%; width: 6.4em; height: 1.9em; margin-left: -3.2em; border-radius: 1em; background: #050607; }
.ph-scr b { font-weight: 700; }
.ph-scr small { font-size: inherit; }
.ph-scr p { max-width: none; }
.ph .mk-i { width: 1.3em; height: 1.3em; flex: none; }
.ph .sb { position: absolute; z-index: 7; top: 0; left: 0; right: 0; height: 3.2em; display: flex; align-items: center; justify-content: space-between; padding: 0 2em 0 2.4em; color: #0f2219; }
.ph .sb b { font-size: 1.1em; font-weight: 600; }
.ph .sb-r { display: flex; align-items: center; gap: .5em; }
.ph .sb-sig { display: inline-flex; align-items: flex-end; gap: .15em; height: 1em; }
.ph .sb-sig i { display: block; width: .28em; border-radius: .1em; background: currentColor; }
.ph .sb-sig i:nth-child(1) { height: .35em; }
.ph .sb-sig i:nth-child(2) { height: .55em; }
.ph .sb-sig i:nth-child(3) { height: .75em; }
.ph .sb-sig i:nth-child(4) { height: 1em; }
.ph .sb-bat { display: block; width: 2em; height: 1em; padding: .12em; box-sizing: border-box; border: .12em solid currentColor; border-radius: .32em; }
.ph .sb-bat i { display: block; width: 72%; height: 100%; border-radius: .12em; background: currentColor; }
.ph .home { position: absolute; z-index: 9; left: 50%; bottom: .7em; width: 8em; height: .36em; margin-left: -4em; border-radius: .2em; background: #0f2219; opacity: .85; }
/* map: Eixample-like grid at 45 degrees, a park, the sea and the Diagonal */
.ph .map { position: absolute; inset: 0; overflow: hidden; background-color: #e5ede0; background-image: repeating-linear-gradient(45deg, transparent 0 2.7em, #fff 2.7em 2.95em), repeating-linear-gradient(-45deg, transparent 0 2.7em, #fff 2.7em 2.95em); }
.ph .map i { position: absolute; display: block; }
.ph .map-park { left: 4%; top: 36%; width: 34%; height: 13%; border-radius: 45% 55% 50% 40%; background: #c5e4b0; transform: rotate(-18deg); }
.ph .map-sea { right: -30%; bottom: -12%; width: 80%; height: 30%; background: #b7dbee; transform: rotate(-32deg); }
.ph .map-diag { left: -20%; top: 44%; width: 150%; height: .6em; background: #fff; box-shadow: 0 0 0 .14em #d6e0d0; transform: rotate(-27deg); }
.ph .map.stale { filter: grayscale(1); opacity: .45; }
.ph .map .pin { display: grid; place-items: center; width: 2.5em; height: 2.5em; border-radius: 50%; border: .22em solid #fff; box-sizing: border-box; transform: translate(-50%, -50%); color: #fff; font-style: normal; font-weight: 700; font-size: .95em; box-shadow: 0 .3em .6em rgb(10 40 25 / .28); }
.ph .map .pin-ok { background: #17924d; }
.ph .map .pin-low { background: #d9480f; }
.ph .map .pin-none { background: #c92a2a; }
.ph .map .pin.sel { width: 3.5em; height: 3.5em; font-size: 1.1em; background: #0b3b2c; z-index: 2; box-shadow: 0 0 0 .45em rgb(23 146 77 / .28), 0 .4em .9em rgb(10 40 25 / .35); }
.ph .map .pin-end { width: 3em; height: 3em; background: #0b3b2c; }
.ph .map .pin-end .mk-i { width: 1.3em; height: 1.3em; }
.ph .map .map-me { width: 1.5em; height: 1.5em; box-sizing: border-box; border-radius: 50%; background: #2f7cf6; border: .26em solid #fff; transform: translate(-50%, -50%); box-shadow: 0 0 0 .8em rgb(47 124 246 / .2); }
.ph .map-route { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ph .map-route path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.ph .map-route .alt { stroke: #8f9c95; stroke-width: 4px; stroke-dasharray: 1 7; }
.ph .map-route .best { stroke: #17924d; stroke-width: 6px; }
.ph .srch { position: absolute; z-index: 5; top: 3.5em; left: 1.1em; right: 1.1em; height: 3.4em; display: flex; align-items: center; gap: .7em; padding: 0 .5em 0 1.1em; border-radius: 1.7em; background: #fff; color: #51615a; box-shadow: 0 .3em 1em rgb(16 40 30 / .14); }
.ph .srch span { flex: 1; font-size: 1.05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph .av { display: grid; place-items: center; width: 2.5em; height: 2.5em; flex: none; border-radius: 50%; background: #b8f05c; color: #0b3b2c; font-style: normal; font-weight: 700; font-size: .9em; }
.ph .chips { position: absolute; z-index: 5; top: 7.6em; left: 1.1em; display: flex; gap: .45em; }
.ph .chips span { padding: .45em .95em; border-radius: 1em; background: #fff; color: #23332c; font-size: .9em; font-weight: 600; box-shadow: 0 .15em .4em rgb(0 0 0 / .1); white-space: nowrap; }
.ph .chips .on { background: #0b3b2c; color: #fff; }
.ph .sheet { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; padding: .8em 1.5em 2.6em; border-radius: 1.9em 1.9em 0 0; background: #fff; box-shadow: 0 -.4em 1.6em rgb(16 40 30 / .15); }
.ph .grab { display: block; width: 3.4em; height: .4em; margin: 0 auto .9em; border-radius: .2em; background: #d3dcd6; }
.ph .sh-h { display: flex; justify-content: space-between; align-items: flex-start; gap: .6em; }
.ph .sh-t { display: block; font-size: 1.6em; letter-spacing: -.02em; color: #0f2219; }
.ph .sh-h small { display: block; margin-top: .2em; color: #51615a; font-size: .95em; }
.ph .sh-fav { display: grid; place-items: center; width: 2.7em; height: 2.7em; flex: none; border-radius: 50%; background: #f1f5f2; color: #c98b00; }
.ph .sh-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .7em; margin: 1em 0 .8em; }
.ph .sh-stats > div { padding: .7em .9em; border-radius: 1em; background: #f2f6f3; }
.ph .sh-stats b { display: block; font-size: 2.2em; line-height: 1; color: #0f2219; }
.ph .sh-stats b.ok { color: #127a3f; }
.ph .sh-stats span { display: block; margin-top: .2em; font-size: .95em; font-weight: 600; }
.ph .sh-stats small { display: block; font-size: .8em; color: #51615a; }
.ph .sh-bar { display: block; height: .5em; margin-bottom: 1em; border-radius: .25em; overflow: hidden; background: #e3ebe6; }
.ph .sh-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #17924d, #7fd66b); }
.ph .app-btn { display: flex; align-items: center; justify-content: center; gap: .6em; height: 3.9em; padding: 0 1.4em; border-radius: 1.95em; background: #0b3b2c; color: #fff; font-weight: 600; font-size: 1.12em; white-space: nowrap; box-shadow: 0 .3em .9em -.2em rgb(11 59 44 / .5); }
.ph .toast-ok { position: absolute; z-index: 7; top: 7.4em; left: 1.1em; right: 1.1em; display: flex; align-items: center; gap: .8em; padding: .9em 1em; border-radius: 1.2em; background: #0b3b2c; color: #fff; box-shadow: 0 .6em 1.4em rgb(11 59 44 / .35); }
.ph .toast-ok > .mk-i { width: 2.1em; height: 2.1em; padding: .35em; box-sizing: border-box; border-radius: 50%; background: #b8f05c; color: #0b3b2c; stroke-width: 3; }
.ph .toast-ok b { display: block; font-size: 1.08em; }
.ph .toast-ok small { display: block; font-size: .88em; color: #cfe7da; }
.ph .rt-card { position: absolute; z-index: 5; top: 3.7em; left: 1.1em; right: 1.1em; padding: .3em 1em; border-radius: 1.3em; background: #fff; box-shadow: 0 .3em 1em rgb(16 40 30 / .14); }
.ph .rt { display: flex; align-items: center; gap: .8em; padding: .75em 0; }
.ph .rt + .rt { border-top: 1px solid #e6ece8; }
.ph .rt > div { flex: 1; min-width: 0; }
.ph .rt b { display: block; font-size: 1.08em; color: #0f2219; }
.ph .rt-dot { width: .95em; height: .95em; border-radius: 50%; flex: none; background: #17924d; box-shadow: 0 0 0 .3em rgb(23 146 77 / .2); }
.ph .rt-dot.alt { background: #8f9c95; box-shadow: none; }
.ph .air { display: inline-block; margin-top: .2em; padding: .1em .55em; border-radius: .6em; font-style: normal; font-size: .85em; font-weight: 600; }
.ph .air.ok { background: #e1f5e6; color: #11703a; }
.ph .air.bad { background: #fde8e8; color: #b42318; }
.ph .rt .rt-min { font-size: 1.7em; letter-spacing: -.02em; }
.ph .rt-min small { font-size: .5em; margin-left: .15em; color: #51615a; }
.ph .co2 { display: flex; align-items: center; gap: .5em; margin: 0 0 .9em; color: #11703a; font-weight: 600; font-size: 1em; }
.ph .bd-head { padding: 4em 1.5em 0; font-size: 1.6em; }
.ph .bd-head b { letter-spacing: -.02em; }
.ph .ring { display: grid; place-items: center; width: 11.5em; height: 11.5em; margin: 1.1em auto .7em; border-radius: 50%; background: conic-gradient(#17924d calc(var(--p) * 1%), #dbe5de 0); }
.ph .ring > div { display: grid; place-content: center; text-align: center; width: 8.9em; height: 8.9em; border-radius: 50%; background: #f3f6f1; }
.ph .ring b { font-size: 3em; line-height: 1; letter-spacing: -.03em; color: #0f2219; }
.ph .ring span { font-size: .85em; color: #51615a; }
.ph .streak { display: flex; align-items: center; justify-content: center; gap: .4em; margin: 0 0 1.1em; color: #c2410c; font-weight: 600; }
.ph .bdg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9em .6em; padding: 0 1.4em; }
.ph .bdg { text-align: center; }
.ph .bdg > i { display: grid; place-items: center; width: 4.3em; height: 4.3em; margin: 0 auto .35em; border-radius: 1.4em; background: var(--c); color: #fff; box-shadow: 0 .3em 0 rgb(0 0 0 / .2); }
.ph .bdg > i .mk-i { width: 2em; height: 2em; }
.ph .bdg span { font-size: .82em; font-weight: 600; }
.ph .bdg.off > i { background: #d5ddd8; box-shadow: none; }
.ph .bdg.off span { color: #6b7a72; }
.ph .tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 5.4em; display: flex; justify-content: space-around; padding-top: 1em; box-sizing: border-box; background: #fff; border-top: 1px solid #e3ebe6; }
.ph .tabbar i { color: #8a968f; }
.ph .tabbar i.on { color: #0b3b2c; }
.ph .tabbar .mk-i { width: 1.8em; height: 1.8em; }
.ph .st-body { position: absolute; z-index: 5; top: 10em; left: 1.6em; right: 1.6em; display: grid; justify-items: center; text-align: center; }
.ph .st-body > b { text-wrap: balance; font-size: 1.45em; letter-spacing: -.01em; color: #0f2219; }
.ph .st-body p { margin: .4em 0 1.4em; color: #51615a; font-size: 1em; }
.ph .st-ill { display: grid; place-items: center; width: 7.6em; height: 7.6em; margin-bottom: 1.1em; border-radius: 50%; background: #e3f2e7; color: #17924d; }
.ph .st-ill .mk-i { width: 3.6em; height: 3.6em; stroke-width: 1.6; }
.ph .st-ill.err { background: #fde8e8; color: #c92a2a; }
.ph .st-body.card-err { top: auto; bottom: 3.2em; left: 1.1em; right: 1.1em; padding: 1.6em 1.2em 1.2em; border-radius: 1.6em; background: #fff; box-shadow: 0 .4em 1.6em rgb(16 40 30 / .18); }
.ph .st-body.card-err .st-ill { width: 5.6em; height: 5.6em; margin-bottom: .8em; }
.ph .st-body.card-err .st-ill .mk-i { width: 2.6em; height: 2.6em; }
.ph .st-body .app-btn { justify-self: stretch; }
.ph .skel { position: absolute; top: 7.8em; left: 1.1em; right: 1.1em; bottom: 2.4em; display: grid; gap: .8em; align-content: start; }
.ph .sk { display: block; border-radius: 1em; background: linear-gradient(90deg, #e2e9e4 0 40%, #f3f7f4 50%, #e2e9e4 60% 100%) 0 0 / 300% 100%; }
.ph .sk-map { height: 20em; }
.ph .sk-l1 { height: 1.7em; width: 66%; }
.ph .sk-l2 { height: 1.1em; width: 42%; }
.ph .sk-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7em; }
.ph .sk-row .sk { height: 5em; }
.ph .sk-btn { height: 3.9em; border-radius: 1.95em; }
@media (prefers-reduced-motion: no-preference) {
  .ph .sk { animation: mk-shim 1.5s linear infinite; }
  @keyframes mk-shim { from { background-position: 100% 0; } to { background-position: 0 0; } }
  .ph .map .pin.sel::after { content: ""; position: absolute; inset: -.25em; border-radius: 50%; border: .2em solid #17924d; animation: mk-ping 2.2s cubic-bezier(.2,.6,.3,1) infinite; }
  @keyframes mk-ping { from { transform: scale(1); opacity: .8; } to { transform: scale(2.1); opacity: 0; } }
}

/* product box: a studio stage (dark in both themes, like a product photo) and a CSS 3D box with a lid */
.pbx-grid { display: grid; gap: 22px; align-items: center; }
@media (min-width: 980px) { .pbx-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px; } }
.pbx-side { display: grid; gap: 16px; }
.pbx-stage { position: relative; isolation: isolate; overflow: hidden; padding-bottom: 18px; border-radius: 28px; color: #e9f5ee; background: radial-gradient(120% 75% at 50% 8%, #1f4134 0%, #0d1a16 58%, #070d0b 100%); box-shadow: 0 30px 60px -36px rgb(4 30 20 / .7); }
.pbx-view { --W: 260px; --H: 370px; --D: 92px; --s: 1; position: relative; height: 660px; perspective: 1500px; perspective-origin: 50% 30%; cursor: grab; touch-action: pan-y; outline: none; user-select: none; -webkit-user-select: none; }
.pbx-view.drag { cursor: grabbing; }
.pbx-view:focus-visible { box-shadow: inset 0 0 0 3px #49c0f8; border-radius: 28px 28px 0 0; }
.pbx-spot { position: absolute; left: 50%; top: -14%; width: 760px; height: 760px; margin-left: -380px; border-radius: 50%; background: radial-gradient(closest-side, rgb(184 240 92 / .2), rgb(184 240 92 / .05) 55%, rgb(184 240 92 / 0)); pointer-events: none; }
.pbx-floor { position: absolute; left: 50%; top: calc(61% + (var(--H) * .5 + 20px) * var(--s)); width: 380px; height: 70px; margin: -35px 0 0 -190px; border-radius: 50%; background: radial-gradient(closest-side, rgb(0 0 0 / .7), rgb(0 0 0 / 0)); transform: scaleX(var(--shw, 1)); pointer-events: none; }
.pbx-scene { position: absolute; left: 50%; top: 61%; width: 0; height: 0; transform-style: preserve-3d; transform: scale(var(--s)); }
.pbx { --rx: -14deg; --ry: -30deg; --open: 0deg; --rise: 0px; --ty: 0px; position: absolute; transform-style: preserve-3d; transform: translateY(var(--ty)) rotateX(var(--rx)) rotateY(var(--ry)); }
/* animated descendants get their own compositing layers, which escape the face's clip in 3D: keep the box still */
.pbx *, .pbx *::before, .pbx *::after { animation: none !important; }
.pbx-face { position: absolute; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-sizing: border-box; }
.pbx-face > .shade { position: absolute; inset: 0; z-index: 20; pointer-events: none; background: rgb(0 0 0 / var(--sh, 0)); }
.pbx-face > .sheen { position: absolute; inset: 0; z-index: 19; pointer-events: none; background: linear-gradient(105deg, rgb(255 255 255 / 0) 36%, rgb(255 255 255 / .17) 48%, rgb(255 255 255 / 0) 60%) var(--gx, 60%) 0 / 280% 100% no-repeat; }
.f-front, .f-back, .in-front, .in-back { width: var(--W); height: var(--H); left: calc(var(--W) / -2); top: calc(var(--H) / -2); }
.f-left, .f-right, .in-left, .in-right { width: var(--D); height: var(--H); left: calc(var(--D) / -2); top: calc(var(--H) / -2); }
.f-bottom, .in-bottom { width: var(--W); height: var(--D); left: calc(var(--W) / -2); top: calc(var(--D) / -2); }
.f-front { --sh: .04; transform: translateZ(calc(var(--D) / 2)); }
.f-back { --sh: .3; transform: rotateY(180deg) translateZ(calc(var(--D) / 2)); }
.f-left { --sh: .5; transform: rotateY(-90deg) translateZ(calc(var(--W) / 2)); }
.f-right { --sh: .24; transform: rotateY(90deg) translateZ(calc(var(--W) / 2)); }
.f-bottom { transform: rotateX(-90deg) translateZ(calc(var(--H) / 2)); background: #04170f; }
/* the lid hinges on the back edge: the element's top edge is the hinge (transform-origin), 90deg lays it flat */
.pbx-lid { position: absolute; width: var(--W); height: var(--D); left: calc(var(--W) / -2); top: calc(var(--D) / -2); transform-style: preserve-3d; transform-origin: 50% 0; transform: translate3d(0, calc((var(--H) - var(--D)) / -2), calc(var(--D) / -2)) rotateX(calc(90deg + var(--open))); }
.pbx-lid .pbx-face { inset: 0; width: 100%; height: 100%; }
.f-top { display: flex; align-items: center; justify-content: center; gap: 14px; background: linear-gradient(180deg, #145c42, #0b3b2c); }
.f-top .bv-logo { width: 38px; height: 38px; }
.f-top .tab { padding: 5px 9px; border: 1.5px dashed rgb(184 240 92 / .55); border-radius: 7px; color: #b8f05c; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.f-top-in { --sh: .1; display: grid; place-items: center; transform: rotateX(180deg); background: linear-gradient(0deg, #c9a56c, #b48d55); }
.f-top-in b { color: #5b3f15; font-size: 19px; font-weight: 800; opacity: .85; }
.pbx-face.in { background: linear-gradient(180deg, #a98252, #7b5a30); }
.in-front { transform: translateZ(calc(var(--D) / 2 - 1px)) rotateY(180deg); }
.in-back { transform: translateZ(calc(var(--D) / -2 + 1px)); }
.in-left { transform: rotateY(-90deg) translateZ(calc(var(--W) / 2 - 1px)) rotateY(180deg); }
.in-right { transform: rotateY(90deg) translateZ(calc(var(--W) / 2 - 1px)) rotateY(180deg); }
.pbx-face.in-bottom { transform: rotateX(-90deg) translateZ(calc(var(--H) / 2 - 1px)) rotateX(180deg); background: #6c4e28; }
.pbx-riser { --pw: 176px; position: absolute; width: var(--pw); height: calc(var(--pw) * 2.08); left: calc(var(--pw) / -2); top: calc(var(--pw) * -1.04); transform-style: preserve-3d; transform: translateY(var(--rise)); }
.pbx-riser .ph { --pw: 176px; position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.pbx-riser::after { content: ""; position: absolute; inset: 0; border-radius: calc(var(--pw) * .16); transform: rotateY(180deg); backface-visibility: hidden; -webkit-backface-visibility: hidden; background: radial-gradient(circle at 26% 12%, #2b3138 0 9%, transparent 9.5%), linear-gradient(150deg, #232a31, #0d1014); box-shadow: inset 0 0 0 1.5px #5b636d; }
/* box art: front */
.f-front { padding: 20px 18px; color: #fff; background: linear-gradient(160deg, #13583f 0%, #0b3b2c 55%, #06261c 100%); }
.bv-grid { position: absolute; inset: -30%; background-image: repeating-linear-gradient(45deg, transparent 0 22px, rgb(184 240 92 / .08) 22px 23.5px), repeating-linear-gradient(-45deg, transparent 0 22px, rgb(184 240 92 / .08) 22px 23.5px); }
.bv-path { position: absolute; inset: 0; width: 100%; height: 100%; }
.bv-path path { fill: none; stroke: #b8f05c; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 9; opacity: .55; }
.bv-brand { position: relative; display: flex; align-items: center; gap: 9px; }
.bv-brand .bv-logo { width: 32px; height: 32px; }
.bv-brand b { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.bv-slogan { position: relative; margin: 18px 0 0; max-width: 6.4ch; font-size: 35px; line-height: .98; font-weight: 800; letter-spacing: -.035em; text-wrap: balance; color: #fff; }
.bv-sticker { position: absolute; top: 16px; right: 14px; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #ffc800; color: #3d2c00; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; transform: rotate(12deg); box-shadow: 0 4px 0 #c99a00; outline: 1.5px dashed rgb(61 44 0 / .4); outline-offset: -6px; }
.bv-feats { position: absolute; left: 16px; bottom: 18px; width: 112px; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bv-feats li { display: grid; grid-template-columns: 24px 1fr; gap: 7px; align-items: center; font-size: 11.5px; line-height: 1.2; font-weight: 600; }
.bv-feats li > i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: rgb(184 240 92 / .16); color: #b8f05c; }
.bv-feats .mk-i { width: 14px; height: 14px; }
.f-front .bv-ph { --pw: 128px; position: absolute; right: -16px; bottom: -84px; transform: rotate(-9deg); box-shadow: inset 0 0 0 1.5px #5b636d, -14px 18px 30px rgb(0 0 0 / .45); }
/* back */
.f-back { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 12px; color: #0b3b2c; background: #f1f9ea; }
.bv-back-h { display: flex; align-items: center; gap: 8px; }
.bv-back-h .bv-logo { width: 26px; height: 26px; }
.bv-back-h b { font-size: 16.5px; font-weight: 800; letter-spacing: -.01em; }
.bv-bens { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bv-bens li { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; }
.bv-bens li > i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #0b3b2c; color: #b8f05c; flex: none; }
.bv-bens .mk-i { width: 11px; height: 11px; stroke-width: 3.4; }
.bv-shots { display: flex; justify-content: center; gap: 10px; }
.bv-shots .ph { --pw: 42px; box-shadow: inset 0 0 0 1px #5b636d, 0 6px 10px -4px rgb(0 0 0 / .35); }
.bv-quote { margin: 0; padding: 7px 10px; border-left: 3px solid #17924d; border-radius: 4px 10px 10px 4px; background: #fff; }
.bv-quote p { margin: 0; font-size: 11px; line-height: 1.3; font-weight: 600; font-style: italic; }
.bv-quote cite { display: block; margin-top: 2px; font-size: 9.5px; font-style: normal; color: #3f5a4c; }
.bv-reqs { display: flex; gap: 5px; }
.bv-reqs span { flex: 1 1 auto; display: flex; align-items: center; gap: 4px; padding: 4px 5px; border: 1.5px solid #cfe3c5; border-radius: 8px; font-size: 9.5px; font-weight: 700; line-height: 1.1; }
.bv-reqs .mk-i { width: 13px; height: 13px; flex: none; }
.bv-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
.bv-foot > small { max-width: 30%; font-size: 7.5px; line-height: 1.25; text-align: right; color: #3f5a4c; }
.bv-code { display: grid; gap: 2px; justify-items: center; padding: 4px 6px 2px; background: #fff; }
.bv-code .bars { display: flex; gap: 1.5px; height: 22px; }
.bv-code .bars i { display: block; background: #0b3b2c; }
.bv-code small { font-family: var(--f-mono); font-size: 7.5px; letter-spacing: .1em; }
/* spines */
.f-left { background: linear-gradient(90deg, #06261c, #0b3b2c); color: #fff; }
.f-right { background: linear-gradient(90deg, #a9e44c, #b8f05c); color: #0b3b2c; }
.spine { height: 100%; display: flex; align-items: center; justify-content: center; gap: 14px; writing-mode: vertical-rl; transform: rotate(180deg); }
.spine .bv-logo { width: 34px; height: 34px; transform: rotate(90deg); }
.spine b { font-size: 24px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.spine.alt { transform: none; gap: 10px; }
.spine.alt b { font-size: 21px; }
.spine.alt small { font-size: 10.5px; font-weight: 700; opacity: .8; white-space: nowrap; }
/* controls */
.pbx-ctrl { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0 16px; }
.pbx-ctrl button { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 14px; border-radius: 14px; border: 1px solid rgb(255 255 255 / .18); background: rgb(255 255 255 / .07); color: #eef8f2; font-size: .9rem; font-weight: 600; transition: transform .1s cubic-bezier(.23,1,.32,1), background-color .15s, border-color .15s; }
.pbx-ctrl button:hover { background: rgb(255 255 255 / .13); }
.pbx-ctrl button:active { transform: translateY(2px); }
.pbx-ctrl button[aria-pressed="true"] { background: #b8f05c; border-color: #8fcf3a; color: #0b3b2c; }
.pbx-ctrl button:focus-visible { outline: 3px solid #49c0f8; outline-offset: 2px; }
.pbx-ctrl .mk-i { width: 18px; height: 18px; }
.pbx-hint { margin: 10px 16px 0; text-align: center; font-size: .82rem; color: #b9cfc4; }
@media (max-width: 979px) { .pbx-view { --s: .86; height: 570px; } }
@media (max-width: 520px) { .pbx-view { --s: .7; height: 480px; } .pbx-ctrl button { padding: 6px 11px; font-size: .84rem; } }
html.present .pbx-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
html.present .pbx-side { grid-template-columns: 1fr 1fr; align-items: start; }
html.present .pbx-side .note { grid-column: 1 / -1; }
html.present .pbx-view { --s: .6; height: 48vh; }
html.present .pbx-hint { display: none; }
html.present .pbx-ctrl button { min-height: 34px; padding: 4px 10px; font-size: 14px; }

/* sketch to mockup: one phone, three stacked layers, the higher fidelity wipes in from the left */
.fid { display: grid; gap: 22px; align-items: center; }
@media (min-width: 900px) { .fid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; } }
.fid-stage { position: relative; isolation: isolate; display: grid; place-items: center; padding: 34px 0; perspective: 1400px; }
.fid-stage::before { content: ""; position: absolute; inset: 4% 8%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, var(--green-soft), transparent); }
.fid-ph { --pw: 236px; transform: rotateY(var(--ty, -10deg)) rotateX(var(--tx, 4deg)); transition: transform .6s cubic-bezier(.16,1,.3,1); }
.fid-ph .fl { position: absolute; inset: 0; }
.fid-ph .fl.l2, .fid-ph .fl.l3 { clip-path: inset(0 100% 0 0); transition: clip-path .8s cubic-bezier(.65,0,.35,1); }
.fid input[data-n="2"]:checked ~ .fid-stage .l2, .fid input[data-n="3"]:checked ~ .fid-stage .l2, .fid input[data-n="3"]:checked ~ .fid-stage .l3 { clip-path: inset(0); }
.fid-ph .scan { position: absolute; z-index: 10; top: 0; bottom: 0; left: 0; width: .3em; margin-left: -.15em; background: #b8f05c; box-shadow: 0 0 1.4em .5em rgb(184 240 92 / .7); opacity: 0; pointer-events: none; }
.fid-ph .paper { position: absolute; inset: 0; background: #fbfaf4 radial-gradient(#d8d2c0 .09em, transparent .11em) 0 0 / 1.4em 1.4em; }
.fid-ph .sk-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fid-ph .sk-svg .pen { fill: none; stroke: #3a3a3a; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fid-ph .sk-svg .pen.thin { stroke-width: 1.1; opacity: .75; }
.fid-ph .sk-svg .arrow { stroke: #2f7cf6; }
.fid-ph .wf { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; gap: .8em; padding: 3.6em 1.1em 2.4em; background: #fff; font-family: var(--f-mono); color: #4f5a63; }
.fid-ph .wf-box { position: relative; display: flex; align-items: center; gap: .5em; padding: .6em .8em; border: .15em solid #98a2ab; border-radius: .5em; background: #f1f3f5; font-size: .95em; }
.fid-ph .wf-top { height: 3.4em; box-sizing: border-box; }
.fid-ph .wf-ico { display: block; width: 1.4em; height: 1.4em; border: .15em solid #98a2ab; border-radius: 50%; box-sizing: border-box; }
.fid-ph .wf-map { justify-content: center; }
.fid-ph .wf-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fid-ph .wf-map path { stroke: #c3cad0; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.fid-ph .wf-map span { position: relative; padding: .1em .5em; background: #f1f3f5; }
.fid-ph .wf-sheet { display: grid; gap: .55em; align-items: start; }
.fid-ph .wf-line { display: block; height: .7em; border-radius: .2em; background: #c9d0d6; }
.fid-ph .wf-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5em; }
.fid-ph .wf-cell { display: block; padding: .8em .3em; border: .15em dashed #98a2ab; border-radius: .4em; text-align: center; font-style: normal; font-size: .82em; }
.fid-ph .wf-btn { display: block; padding: .9em; border: .15em solid #4f5a63; border-radius: .5em; text-align: center; font-style: normal; font-weight: 600; color: #2d353b; }
.fid-tag, .fid-ann { position: absolute; z-index: 2; padding: 5px 11px; border-radius: 12px; font-size: .8rem; font-weight: 600; white-space: nowrap; transition: opacity .4s, translate .5s cubic-bezier(.16,1,.3,1); }
.fid-tag { top: 2%; right: 4%; border: 1px solid var(--accent); background: var(--blue-soft); color: var(--accent-text); }
.fid-ann { border: 1px solid var(--line); background: var(--surface); color: var(--head); opacity: 0; translate: 0 8px; }
.fid-ann::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
.fid-ann.a1 { left: 2%; top: 22%; }
.fid-ann.a2 { right: 0; top: 56%; }
.fid-ann.a3 { left: 4%; bottom: 14%; }
.fid input[data-n="1"]:checked ~ .fid-stage .fid-tag { opacity: 0; }
.fid input[data-n="3"]:checked ~ .fid-stage .fid-ann { opacity: 1; translate: 0 0; }
.fid input[data-n="3"]:checked ~ .fid-stage .a2 { transition-delay: .1s; }
.fid input[data-n="3"]:checked ~ .fid-stage .a3 { transition-delay: .2s; }
.fid-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fid-seg label { cursor: pointer; display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--head); font-weight: 600; text-align: center; font-size: .92rem; transition: transform .1s cubic-bezier(.23,1,.32,1), border-color .15s, background-color .15s; }
.fid-seg label:active { transform: translateY(2px); }
.fid-seg label b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); font-size: .85rem; }
.fid input[data-n="1"]:checked ~ .fid-side label[for$="-1"], .fid input[data-n="2"]:checked ~ .fid-side label[for$="-2"], .fid input[data-n="3"]:checked ~ .fid-side label[for$="-3"] { border-color: var(--green-dark); background: var(--green-soft); }
.fid input[data-n="1"]:checked ~ .fid-side label[for$="-1"] b, .fid input[data-n="2"]:checked ~ .fid-side label[for$="-2"] b, .fid input[data-n="3"]:checked ~ .fid-side label[for$="-3"] b { background: var(--green); color: var(--on-color); }
.fid input[data-n="1"]:focus-visible ~ .fid-side label[for$="-1"], .fid input[data-n="2"]:focus-visible ~ .fid-side label[for$="-2"], .fid input[data-n="3"]:focus-visible ~ .fid-side label[for$="-3"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.fid-notes { margin-top: 14px; }
.fid-note { display: none; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.fid-note p { margin: 0; }
.fid-note .fid-q { margin-bottom: 6px; font-size: 1.15rem; font-weight: 600; color: var(--head); }
.fid input[data-n="1"]:checked ~ .fid-side .n1, .fid input[data-n="2"]:checked ~ .fid-side .n2, .fid input[data-n="3"]:checked ~ .fid-side .n3 { display: block; }
.fid-prog { height: 4px; margin-top: 12px; border-radius: 4px; overflow: hidden; background: var(--surface-2); opacity: 0; transition: opacity .3s; }
.fid-prog.on { opacity: 1; }
.fid-prog i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--green); transform-origin: 0 50%; transform: scaleX(0); }
@media (max-width: 520px) { .fid-ph { --pw: 200px; } .fid-ann { font-size: .72rem; padding: 4px 8px; } }
html.present .fid-ph { --pw: min(236px, 26vh); }

/* the four states, as a curved gallery */
.mk-states { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 12px 4px 6px; list-style: none; perspective: 1800px; }
.mk-states li { display: grid; justify-items: center; align-content: start; gap: 14px; }
.mk-states .ph { --pw: 188px; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.mk-states li:nth-child(1) .ph { transform: rotateY(14deg); } .mk-states li:nth-child(2) .ph { transform: rotateY(5deg) translateZ(20px); }
.mk-states li:nth-child(3) .ph { transform: rotateY(-5deg) translateZ(20px); } .mk-states li:nth-child(4) .ph { transform: rotateY(-14deg); }
@media (hover: hover) { .mk-states li:hover .ph { transform: translateY(-10px) translateZ(40px); } }
.mk-states > li > p { margin: 0; max-width: 24ch; text-align: center; font-size: .92rem; }
.mk-states > li > p b { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--head); font-size: 1.02rem; }
.mk-states .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.mk-states .s-load .dot { background: var(--blue); } .mk-states .s-err .dot { background: var(--red); } .mk-states .s-ok .dot { background: var(--green); }
.mk-states.pre li { opacity: 0; transform: translateY(46px) rotateX(18deg); }
.mk-states.go li { opacity: 1; transform: none; transition: opacity .7s, transform 1s cubic-bezier(.16,1,.3,1); transition-delay: calc(var(--i, 0) * 90ms); }
@media (max-width: 1100px) { .mk-states .ph { --pw: 168px; } }
@media (max-width: 899px) {
  .mk-states { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 196px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px 16px 14px; margin-inline: -16px; scrollbar-width: thin; }
  .mk-states li { scroll-snap-align: center; } .mk-states li .ph { transform: none !important; --pw: 170px; }
}
html.present .mk-states .ph { --pw: min(188px, 24vh); }

/* ================================================================ page header renders (tool/renders.py)
   Objects on the studio stage, sized in em of .stage-in (which follows the stage through container units).
   Fixed product colours: they are pictures of screens and paper, the same in light and dark. */
.rd { container-type: size; }
.rd .stage-in { font-size: min(3cqw, 4.1cqh); font-family: var(--f-sans); letter-spacing: -0.01em; line-height: 1.3; }
.rd-el { position: absolute; transform-style: preserve-3d; transform: translate3d(0, 0, var(--z, 0)) rotateY(var(--ry, 0)) rotateX(var(--rx, 0)) rotateZ(var(--rz, 0)); }
.rd-el.center { transform: translate(-50%, -50%) translate3d(0, 0, var(--z, 0)) rotateY(var(--ry, 0)) rotateX(var(--rx, 0)) rotateZ(var(--rz, 0)); }
@media (prefers-reduced-motion: no-preference) {
  .rd-el { animation: rd-in 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
  .rd-el.fl { animation: rd-in 1s var(--ease) both, rd-float 8s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 90ms + 120ms), var(--d, 0s); }
  @keyframes rd-in { from { opacity: 0; scale: .94; translate: 0 1.4em; } }
  @keyframes rd-float { 50% { translate: 0 -.5em; } }
}
.rd-id { font: 500 .78em var(--f-mono); letter-spacing: 0; color: #6b7670; }
.rd .mono { font-family: var(--f-mono); }
/* window */
.rd-win { background: #fff; color: #17211c; border-radius: .9em; overflow: hidden; box-shadow: 0 2.4em 4em -1.6em rgb(0 0 0 / .75), 0 0 0 1px rgb(255 255 255 / .08); }
.rd-bar { display: flex; align-items: center; gap: .42em; height: 2.1em; padding: 0 .9em; background: #f3f5f4; border-bottom: 1px solid #e3e8e5; }
.rd-bar i { width: .62em; height: .62em; border-radius: 50%; background: #ff5f57; }
.rd-bar i:nth-child(2) { background: #febc2e; } .rd-bar i:nth-child(3) { background: #28c840; }
.rd-bar span { margin-left: .6em; font: 500 .74em var(--f-mono); color: #6b7670; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-body { padding: .9em; }
.rd-win.dark { background: #0d1117; color: #d6dde5; }
.rd-win.dark .rd-bar { background: #161b22; border-bottom-color: #222a33; }
.rd-win.dark .rd-bar span { color: #8b949e; }
/* chips, cards */
.rd-chip { display: inline-flex; align-items: center; gap: .5em; padding: .55em .95em; border-radius: 999px; background: rgb(255 255 255 / .09); border: 1px solid rgb(255 255 255 / .16); color: #ecf5f0; font-size: .82em; font-weight: 500; white-space: nowrap; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1.2em 2em -1em rgb(0 0 0 / .7); }
.rd-chip > b { width: .55em; height: .55em; border-radius: 50%; background: var(--c, var(--lime)); box-shadow: 0 0 .8em var(--c, var(--lime)); }
.rd-chip .mk-i { width: 1.15em; height: 1.15em; color: var(--lime); stroke-width: 2.6; }
.rd-chip.light { background: #fff; color: #17211c; border-color: transparent; }
.rd-chip.mono { font-family: var(--f-mono); font-size: .76em; }
.rd-chip.mini { padding: .25em .6em; font-size: .7em; background: #e9f6f0; color: #0b6b47; border: 0; box-shadow: none; backdrop-filter: none; }
.rd-card { background: #fff; color: #17211c; border-radius: .9em; padding: .9em 1em; box-shadow: 0 2em 3.4em -1.4em rgb(0 0 0 / .75); }
.rd-card-h { margin: 0 0 .5em; font: 500 .7em var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: #6b7670; }
.rd-av { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: #0b3b2c; color: #c6f36b; font: 600 .62em var(--f-sans); font-style: normal; }
.rd .rd-ph { --pw: min(19cqw, 29cqh); }
.rd-logo svg { filter: drop-shadow(0 .6em 1em rgb(0 0 0 / .5)); }
/* laptop + board */
.rd-lap { width: 30em; }
.rd-lap-scr { padding: .55em; border-radius: 1em 1em .3em .3em; background: linear-gradient(160deg, #2a2e33, #101215); box-shadow: inset 0 0 0 1px #3d434a, 0 2.4em 4em -1.6em rgb(0 0 0 / .8); }
.rd-lap-in { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); aspect-ratio: 16 / 10.2; border-radius: .45em; overflow: hidden; background: #f6f8f7; }
.rd-side { display: grid; align-content: start; justify-items: center; gap: .9em; padding-top: .8em; background: #0b3b2c; color: #9fc7b4; }
.rd-side .mk-i { width: 1.1em; height: 1.1em; }
.rd-side-logo { width: 1.7em; height: 1.7em; }
.rd-main { padding: .8em .9em; min-width: 0; }
.rd-h { display: flex; justify-content: space-between; align-items: center; margin: 0 0 .7em; font-size: .86em; font-weight: 600; color: #17211c; }
.rd-lap-base { position: relative; height: 1.1em; margin: 0 -2.6em; border-radius: 0 0 1.4em 1.4em / 0 0 1em 1em; background: linear-gradient(#e6e9ec, #a3aab1); box-shadow: 0 1.8em 2.4em -1em rgb(0 0 0 / .8); }
.rd-lap-base::before { content: ""; position: absolute; left: 50%; top: 0; width: 5em; height: .38em; margin-left: -2.5em; border-radius: 0 0 .5em .5em; background: #8b9299; }
.rd-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55em; }
.rd-col { display: grid; align-content: start; gap: .4em; padding: .45em; border-radius: .55em; background: #ecf0ee; }
.rd-colh { display: flex; justify-content: space-between; margin: 0 .1em .1em; font: 500 .56em var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: #6b7670; }
.rd-task { position: relative; display: grid; gap: .15em; padding: .45em .5em .45em .7em; border-radius: .45em; background: #fff; box-shadow: 0 .1em .3em rgb(0 0 0 / .08); font-size: .62em; overflow: hidden; }
.rd-task::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: .25em; background: var(--c); }
.rd-task .rd-id { font-size: .82em; }
.rd-task b { font-weight: 500; color: #17211c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-meta { display: flex; justify-content: space-between; align-items: center; color: #6b7670; font: 500 .78em var(--f-mono); }
.rd-slot { height: 4.2em; border-radius: .45em; border: 1px dashed #c3cdc8; font-size: .62em; }
.rd-win .rd-slot { height: 4em; }
@media (prefers-reduced-motion: no-preference) {
  .rd-task.move { animation: rd-move 7s var(--ease) infinite 1.6s; z-index: 2; }
  @keyframes rd-move { 0%, 22% { translate: 0 0; box-shadow: 0 .1em .3em rgb(0 0 0 / .08); } 30% { translate: 0 -.5em; box-shadow: 0 1em 1.6em -.6em rgb(0 0 0 / .35); } 48%, 84% { translate: calc(100% + 1.45em / .62) -0.2em; box-shadow: 0 .1em .3em rgb(0 0 0 / .08); } 92%, 100% { translate: calc(100% + 1.45em / .62) -0.2em; opacity: 0; } }
}
.rd-mini-burn { width: 13em; padding: .7em .8em .5em; }
.rd-mini-burn p { display: flex; justify-content: space-between; margin: 0 0 .3em; font-size: .72em; font-weight: 600; }
.rd-mini-burn p span { font: 500 .9em var(--f-mono); color: #6b7670; }
.rd-burn { width: 100%; height: auto; }
.rd-burn path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.rd-burn .g { stroke: #dfe5e2; stroke-width: 1; }
.rd-burn .ideal { stroke: #b9c3be; stroke-width: 1.4; stroke-dasharray: 3 3; }
.rd-burn .real { stroke: #12a06c; stroke-width: 2.4; stroke-dasharray: 160; stroke-dashoffset: 0; }
.rd-burn circle { fill: #fff; stroke: #12a06c; stroke-width: 2; }
@media (prefers-reduced-motion: no-preference) { .rd-burn .real { animation: rd-draw 2.4s var(--ease) both .8s; } @keyframes rd-draw { from { stroke-dashoffset: 160; } } }
/* calendar */
.rd-cal { padding: 1em; border-radius: 1em; background: #fff; color: #17211c; box-shadow: 0 2.4em 4em -1.6em rgb(0 0 0 / .8); }
.rd-cal-h { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 .7em; }
.rd-cal-h b { font-size: 1.05em; font-weight: 600; text-transform: capitalize; }
.rd-cal-h span { font: 500 .7em var(--f-mono); color: #6b7670; }
.rd-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3em; text-align: center; }
.rd-cal-g span { display: grid; place-items: center; height: 2.1em; border-radius: .5em; font-size: .78em; color: #3a4440; font-variant-numeric: tabular-nums; }
.rd-cal-g .h { height: 1.6em; font: 500 .62em var(--f-mono); text-transform: uppercase; color: #8a948f; }
.rd-cal-g .ev { position: relative; font-weight: 600; color: #17211c; background: color-mix(in srgb, var(--c) 14%, #fff); }
.rd-cal-g .ev::after { content: ""; position: absolute; bottom: .3em; width: .35em; height: .35em; border-radius: 50%; background: var(--c); }
.rd-cal-g .k-due { background: var(--c); color: #fff; }
.rd-cal-g .k-due::after { background: #fff; }
.rd-event { --c: var(--f3); display: grid; gap: .15em; width: 12em; border-top: .25em solid var(--c); }
.rd-event b { font-size: .95em; font-weight: 600; }
.rd-event small { font: 500 .7em var(--f-mono); color: #6b7670; }
/* documents */
.rd-doc { width: 12.5em; aspect-ratio: 1 / 1.35; padding: 1em; border-radius: .5em; background: #fff; color: #17211c; box-shadow: 0 2.4em 4em -1.6em rgb(0 0 0 / .8), inset 0 0 0 1px #e3e8e5; display: grid; align-content: start; gap: .6em; }
.rd-doc-h { display: flex; justify-content: space-between; }
.rd-doc-t { height: .9em; width: 70%; border-radius: .2em; background: #17211c; }
.rd-doc-l { display: grid; gap: .45em; }
.rd-doc-l i { display: block; height: .38em; border-radius: .2em; background: #e3e8e5; }
.rd-doc-fig { display: flex; align-items: flex-end; gap: .35em; height: 4.4em; padding: .4em; border-radius: .4em; background: #f3f6f4; }
.rd-doc-fig span { flex: 1; border-radius: .2em .2em 0 0; background: #12a06c; }
.rd-doc-img { height: 5em; border-radius: .4em; background: linear-gradient(160deg, #13583f, #0b3b2c 60%, #06261c); position: relative; overflow: hidden; }
.rd-doc-img::after { content: ""; position: absolute; right: 12%; bottom: -30%; width: 34%; height: 110%; border-radius: .5em; background: #f3f6f1; transform: rotate(-9deg); box-shadow: 0 0 0 .25em #1a1d21; }
.rd-stamp { position: absolute; right: -1.2em; top: 42%; display: inline-flex; align-items: center; gap: .35em; padding: .4em .8em; border-radius: 999px; background: #12a06c; color: #fff; font-size: .78em; font-weight: 600; transform: rotate(-8deg) translateZ(30px); box-shadow: 0 1em 1.6em -.6em rgb(0 0 0 / .6); }
.rd-stamp .mk-i { width: 1.1em; height: 1.1em; stroke-width: 3; }
/* user story card + poker */
.rd-story { width: 19em; padding: 1.1em 1.2em; border-radius: .8em; background: #fff; color: #17211c; box-shadow: 0 2.4em 4em -1.6em rgb(0 0 0 / .8); }
.rd-story.ghost { opacity: .9; height: 13em; }
.rd-story-h { display: flex; justify-content: space-between; align-items: center; margin: 0 0 .6em; }
.rd-pill { padding: .15em .6em; border-radius: 999px; background: #fdecdf; color: #a3401a; font: 500 .68em var(--f-mono); }
.rd-story-t { margin: 0 0 .7em; font-size: 1.02em; line-height: 1.35; letter-spacing: -0.015em; }
.rd-story-t b { font-weight: 600; color: #0b6b47; }
.rd-story-t em { font-style: normal; color: #4a5650; }
.rd-story-ac { margin: 0 0 .3em; font: 500 .62em var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: #8a948f; }
.rd-story ul { margin: 0 0 .7em; padding: 0; list-style: none; display: grid; gap: .25em; font: 400 .72em var(--f-mono); color: #3a4440; }
.rd-story ul li::before { content: "✓ "; color: #12a06c; }
.rd-story-f { display: flex; justify-content: space-between; align-items: center; margin: 0; padding-top: .6em; border-top: 1px solid #e3e8e5; font-size: .74em; font-weight: 600; }
.rd-l { display: grid; gap: .5em; margin: 0; }
.rd-l i { display: block; height: .45em; border-radius: .2em; background: #e3e8e5; }
.rd-l i:nth-child(2) { width: 80%; } .rd-l i:nth-child(3) { width: 60%; }
.rd-poker { display: grid; place-items: center; width: 3.4em; height: 4.8em; border-radius: .55em; background: #fff; color: #17211c; font-size: 1.1em; font-weight: 600; box-shadow: 0 1.6em 2.4em -1em rgb(0 0 0 / .8); }
.rd-poker.on { background: #c6f36b; color: #0b3b2c; }
/* UML */
.rd-umlw { display: grid; grid-template-columns: auto minmax(3em, 1fr) auto; grid-template-rows: auto 2.2em auto; align-items: center; }
.rd-link.h { position: relative; height: 1px; background: #17211c; display: flex; justify-content: space-between; }
.rd-link.h span { position: relative; top: -1.4em; padding: 0 .3em; font: 500 .62em var(--f-mono); color: #3a4440; }
.rd-link.v { grid-column: 3; justify-self: center; width: 1px; height: 100%; background: #17211c; }
.rd-uml { position: relative; display: grid; min-width: 8em; border: 1px solid #17211c; border-radius: .3em; background: #fff; font-size: .7em; }
.rd-uml b { padding: .35em .6em; border-bottom: 1px solid #17211c; background: #e9f6f0; font-weight: 600; text-align: center; }
.rd-uml span { padding: .15em .6em; font-family: var(--f-mono); font-size: .9em; color: #3a4440; }
.rd-uml span:nth-of-type(1) { padding-top: .35em; } .rd-uml span:last-child { padding-bottom: .4em; }
.rd-uml.c { grid-column: 3; grid-row: 3; }
/* terminal + methods */
.rd-term { font: 400 .74em/1.65 var(--f-mono); white-space: pre; color: #c9d1d9; }
.rd-term p { margin: 0; }
.rd-term .p { color: #6e7681; } .rd-term .k { color: #7ee2b8; } .rd-term .s { color: #a5d6ff; } .rd-term .n { color: #f2cc60; } .rd-term .b { color: #ff9e64; } .rd-term .ok { color: #7ee787; }
.rd-m { display: inline-grid; place-items: center; min-width: 4.4em; padding: .3em .55em; border-radius: .4em; font: 600 .7em var(--f-mono); color: #fff; box-shadow: 0 1em 1.6em -.6em rgb(0 0 0 / .7); }
.rd-m.m-get { background: #2f6fd6; } .rd-m.m-post { background: #12a06c; } .rd-m.m-put, .rd-m.m-patch { background: #c99419; } .rd-m.m-delete { background: #c43c3c; }
.rd-routes { display: grid; gap: .45em; }
.rd-route { display: flex; align-items: center; gap: .7em; margin: 0; padding: .45em .55em; border-radius: .5em; background: #f3f6f4; }
.rd-route .rd-m { box-shadow: none; min-width: 4.6em; }
.rd-route code { background: none; border: 0; padding: 0; font-size: .78em; color: #17211c; }
.rd-nat { display: grid; gap: .35em; font: 500 .8em var(--f-mono); }
.rd-nat p { display: grid; grid-template-columns: 1fr auto 1fr; gap: .6em; margin: 0; padding: .3em .55em; border-radius: .4em; background: #f3f6f4; }
.rd-nat i { color: #12a06c; font-style: normal; }
/* scrum ring */
.rd-ring { position: relative; width: 17em; height: 17em; }
.rd-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.rd-ring circle { fill: none; stroke-width: 1.6; }
.rd-ring .t { stroke: rgb(255 255 255 / .14); }
.rd-ring .a { stroke: var(--lime); stroke-dasharray: 120 490; stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) { .rd-ring .a { animation: rd-spin 9s linear infinite; } @keyframes rd-spin { to { stroke-dashoffset: -490; } } }
.rd-rl { position: absolute; display: inline-grid; place-items: center; padding: .45em .9em; border-radius: 999px; background: #fff; color: #17211c; font-size: .8em; font-weight: 600; box-shadow: 0 1em 1.6em -.6em rgb(0 0 0 / .7); transform: translate(-50%, -50%) translateZ(40px); }
.rd-rl.p0 { left: 50%; top: 4%; } .rd-rl.p1 { left: 96%; top: 50%; } .rd-rl.p2 { left: 50%; top: 96%; } .rd-rl.p3 { left: 4%; top: 50%; }
.rd-ring-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #fff; }
.rd-ring-c b { font-size: 1.8em; font-weight: 600; letter-spacing: -0.03em; }
.rd-ring-c span { font: 500 .72em var(--f-mono); color: #9fb3a9; text-transform: uppercase; letter-spacing: .06em; }
/* tool tiles, layers */
.rd-tile { display: grid; justify-items: center; gap: .45em; padding: 1em 1.1em .8em; min-width: 6.2em; border-radius: 1em; background: #fff; color: #17211c; box-shadow: 0 2em 3em -1.4em rgb(0 0 0 / .8); }
.rd-tile span { font-size: .72em; font-weight: 600; }
.rd-tile.sm { min-width: 0; padding: .8em; }
.rd-plate { display: flex; align-items: center; gap: .7em; width: 13em; padding: .75em 1em; border-radius: .8em; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .14); border-left: .25em solid var(--c); color: #ecf5f0; font-size: .86em; font-weight: 500; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 1.4em 2.2em -1em rgb(0 0 0 / .7); }
.rd-plate .rd-id { color: #9fb3a9; }
/* slide, timer, score */
.rd-slide { position: relative; aspect-ratio: 16 / 9; display: grid; align-content: center; gap: .3em; padding: 1.6em 2em; border-radius: .7em; background: linear-gradient(140deg, #fff 55%, #e9f6f0); color: #17211c; box-shadow: 0 2.4em 4em -1.6em rgb(0 0 0 / .8); }
.rd-slide b { font-size: 2.2em; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.rd-slide small { font-size: .9em; color: #4a5650; }
.rd-slide-bars { position: absolute; right: 2em; bottom: 1.6em; display: flex; align-items: flex-end; gap: .4em; height: 4em; }
.rd-slide-bars i { width: 1.1em; border-radius: .2em .2em 0 0; background: #12a06c; }
.rd-timer, .rd-score-r { position: relative; display: grid; place-items: center; width: 7.5em; height: 7.5em; border-radius: 50%; background: #fff; box-shadow: 0 2em 3em -1.4em rgb(0 0 0 / .8); }
.rd-timer svg, .rd-score-r svg { position: absolute; inset: .45em; width: calc(100% - .9em); height: calc(100% - .9em); transform: rotate(-90deg); }
.rd-timer circle, .rd-score-r circle { fill: none; stroke-width: 5; }
.rd-timer .t, .rd-score-r .t { stroke: #e3e8e5; }
.rd-timer .a { stroke: #17211c; stroke-dasharray: 201; stroke-dashoffset: 8; stroke-linecap: round; }
.rd-timer b, .rd-score-r b { position: relative; font: 600 1.25em var(--f-mono); color: #17211c; letter-spacing: -0.02em; }
.rd-score { padding: 1.2em 1.4em; border-radius: 1.2em; background: #fff; display: grid; justify-items: center; box-shadow: 0 2.4em 4em -1.6em rgb(0 0 0 / .8); }
.rd-score-r { width: 10em; height: 10em; box-shadow: none; }
.rd-score-r .a { stroke: #12a06c; stroke-dasharray: 214; stroke-dashoffset: 34; stroke-linecap: round; }
.rd-score-r b { font: 600 2.8em var(--f-sans); letter-spacing: -0.05em; }
@media (prefers-reduced-motion: no-preference) {
  .rd-score-r .a { animation: rd-score 2s var(--ease) both .6s; } @keyframes rd-score { from { stroke-dashoffset: 214; } }
  .rd-timer .a { animation: rd-tick 60s linear infinite; } @keyframes rd-tick { to { stroke-dashoffset: 201; } }
}
/* dataset, map card, git */
.rd-table { width: 100%; border-collapse: collapse; font-size: .74em; }
.rd-table th { padding: .35em .5em; text-align: left; font: 500 .82em var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: #8a948f; background: none; border-bottom: 1px solid #e3e8e5; }
.rd-table td { padding: .5em; border-bottom: 1px solid #eef1ef; color: #17211c; }
.rd-table td.n { font-family: var(--f-mono); text-align: right; }
.rd-table td i { display: block; height: .45em; border-radius: .2em; background: #12a06c; }
.rd-table td:last-child { width: 30%; }
.rd-mapcard { position: relative; width: 24em; height: 16em; border-radius: 1.6em; overflow: hidden; font-size: .55em; box-shadow: 0 2em 3em -1.4em rgb(0 0 0 / .8), 0 0 0 .4em #fff; }
.rd-mapcard .map { position: absolute; inset: 0; background-color: #e5ede0; background-image: repeating-linear-gradient(45deg, transparent 0 2.7em, #fff 2.7em 2.95em), repeating-linear-gradient(-45deg, transparent 0 2.7em, #fff 2.7em 2.95em); overflow: hidden; }
.rd-mapcard .map i { position: absolute; display: block; }
.rd-mapcard .map-park { left: 4%; top: 36%; width: 34%; height: 18%; border-radius: 45% 55% 50% 40%; background: #c5e4b0; }
.rd-mapcard .map-sea { right: -30%; bottom: -12%; width: 80%; height: 30%; background: #b7dbee; transform: rotate(-32deg); }
.rd-mapcard .map-diag { left: -20%; top: 44%; width: 150%; height: .6em; background: #fff; transform: rotate(-27deg); }
.rd-mapcard .map .pin { display: grid; place-items: center; width: 2.9em; height: 2.9em; line-height: 1; font-variant-numeric: tabular-nums; border-radius: 50%; border: .22em solid #fff; box-sizing: border-box; transform: translate(-50%, -50%); color: #fff; font-style: normal; font-weight: 700; font-size: .95em; }
.rd-mapcard .pin-ok { background: #17924d; } .rd-mapcard .pin-low { background: #d9480f; } .rd-mapcard .pin-none { background: #c92a2a; } .rd-mapcard .pin.sel { background: #0b3b2c; width: 3.6em; height: 3.6em; font-size: 1.1em; box-shadow: 0 0 0 .5em rgb(23 146 77 / .25); }
.rd-mapcard .map-me { width: 1.5em; height: 1.5em; border-radius: 50%; background: #2f7cf6; border: .26em solid #fff; transform: translate(-50%, -50%); }
.rd-gitw { display: grid; gap: .5em; }
.rd-graph { width: 100%; height: 6.4em; }
.rd-graph path { fill: none; stroke-width: 2.4; stroke-linecap: round; }
.rd-graph path.main { stroke: #17211c; } .rd-graph path.feat { stroke: #12a06c; } .rd-graph path.fix { stroke: #d0612c; }
.rd-graph circle { stroke: #fff; stroke-width: 2; }
.rd-graph circle.main { fill: #17211c; } .rd-graph circle.feat { fill: #12a06c; } .rd-graph circle.fix { fill: #d0612c; }
.rd-commit { display: flex; gap: .7em; align-items: center; margin: 0; padding: .4em .6em; border-radius: .45em; background: #f3f6f4; font: 400 .72em var(--f-mono); color: #17211c; white-space: nowrap; overflow: hidden; }
.rd-commit .rd-id { font-size: 1em; color: #0b6b47; }
@media (prefers-reduced-motion: no-preference) {
  .rd-graph path { stroke-dasharray: 300; animation: rd-path 2s var(--ease) both .5s; } @keyframes rd-path { from { stroke-dashoffset: 300; } }
}
/* phones on a narrow stage: keep the composition, lose the smallest objects */
@container (max-width: 420px) { .rd .rd-chip.light, .rd .rd-mini-burn { display: none; } }

/* ------------------------------------------------------------------ call to action on a stage (home formula) */
.cta-stage { display: grid; gap: 16px; padding: clamp(28px, 5vw, 56px); color: #d5e2db; perspective: none; }
.cta-stage .kicker { color: #9fb3a9; }
.cta-stage .kicker::before { background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.cta-stage .formula { justify-self: start; max-width: 100%; background: rgb(255 255 255 / .05); border-color: rgb(255 255 255 / .1); color: #fff; font-size: clamp(.86rem, 1.5vw, 1.12rem); }
.cta-stage p { max-width: 68ch; }
.cta-stage .btn-solid { background: var(--lime); color: #0b1310; box-shadow: 0 10px 30px -10px rgb(198 243 107 / .6); }
.cta-stage .btn-solid:hover { background: #fff; color: #0b1310; }

.rd-home .stage-in { font-size: min(2.5cqw, 3.4cqh); }
@media (min-width: 980px) { .hero-stage .stage { height: 560px; } }
.rd-maquetes .rd-ph { --pw: min(23cqw, 34cqh); }
.rd-mobil .rd-ph { --pw: min(22cqw, 34cqh); }
/* Google Play badge on the product box (front, back, spine) */
.bv-play { position: relative; display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 4px 9px 4px 7px; border-radius: 7px; background: #000; border: 1px solid #8a8a8a; color: #fff; line-height: 1; }
.bv-play svg { width: 16px; height: 16px; flex: none; }
.bv-play span { display: grid; gap: 1px; }
.bv-play small { font-size: 6.4px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.bv-play b { font-size: 12px; font-weight: 600; letter-spacing: -0.01em; }
.f-back .bv-play { margin: 0; transform: scale(.92); transform-origin: left bottom; }
.spine .bv-play-i { width: 22px; height: 22px; transform: rotate(90deg); }
.spine.alt .bv-play-i { transform: none; }
.bv-play small, .bv-play b, .bv-code small { white-space: nowrap; }
.f-back .bv-play { transform: scale(.8); margin: 0 -10px -2px -6px; }
.f-back .bv-code small { font-size: 6.4px; letter-spacing: .06em; }
.f-back .bv-code .bars { height: 20px; }
.ph-grid > *, .hero-grid > * { min-width: 0; }
/* timeline rail: always drawn in CSS (motion.js only adds the completed stretch on top) */
.nodes { position: relative; }
.nodes::before { content: ""; position: absolute; left: 39px; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.map-path .track { stroke: transparent; }
