/* Guia PES. Reference: docs/DESIGN.md (Duolingo): a course map of units and nodes, flat colour, pressable 3D
   buttons and cards (a thicker bottom border, never blurred shadows), one colour per Fag, Rubik everywhere.
   Shape rule: 16px for buttons, cards and inputs; nodes are circles; pills 999px. */
@font-face { font-family: "Rubik"; src: url("/fonts/rubik-latin-wght-normal.woff2") format("woff2"); font-weight: 300 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: "Rubik", 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: #f7f7f7; --field: #ffffff;
  --ink: #4b4b4b; --head: #1f2a33; --muted: #6b6b6b; --line: #e5e5e5; --line-strong: #cfcfcf;
  --green: #58cc02; --green-dark: #46a302; --green-text: #2c7a00; --green-soft: #d7ffb8; --on-color: #102b00;
  --blue: #1cb0f6; --blue-dark: #1899d6; --blue-text: #0a6ca3; --blue-soft: #ddf4ff;
  --red: #ff4b4b; --red-dark: #ea2b2b; --red-text: #c2161f; --red-soft: #ffdfe0;
  --gold: #ffc800; --gold-dark: #d9a900; --orange: #ff9600; --purple: #ce82ff;
  --f1: #ffc800; --f1d: #d9a900; --f2: #ff9600; --f2d: #d97f00; --f3: #58cc02; --f3d: #46a302;
  --f4: #1cb0f6; --f4d: #1899d6; --f5: #ce82ff; --f5d: #a568cc; --locked: #e5e5e5; --locked-d: #cfcfcf;
  --accent: #1cb0f6; --accent-hover: #1899d6; --accent-ink: #062a3d; --accent-text: #0a6ca3;
  --danger: #c2161f; --r-s: 12px; --r-m: 16px; --r-btn: 16px;
  --shadow: 0 2px 0 var(--line);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131f24; --surface: #131f24; --surface-2: #1b2b32; --field: #1b2b32;
    --ink: #dce6eb; --head: #f1f7fb; --muted: #a2b3bc; --line: #37464f; --line-strong: #4b5d67;
    --green-text: #8ee000; --green-soft: #1f3a12; --blue-text: #49c0f8; --blue-soft: #10334a; --red-text: #ff7b7b; --red-soft: #3d1c20;
    --locked: #37464f; --locked-d: #2a3840;
    --accent: #1cb0f6; --accent-hover: #49c0f8; --accent-ink: #052131; --accent-text: #49c0f8;
    --danger: #ff7b7b;
  }
}
body { font-weight: 400; letter-spacing: .005em; }
h1, h2, h3 { color: var(--head); font-weight: 750; letter-spacing: -0.02em; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--head); }
.brand svg { width: 34px; height: 34px; }
.mono, code, kbd { font-family: var(--f-mono); }
code { font-size: .88em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 1px 6px; }
a { color: var(--blue-text); }
.prose a:not(.btn), .legal a:not(.btn) { color: var(--blue-text); }
@media (min-width: 900px) and (max-width: 1199px) { .head-nav { display: none; } .menu { display: block; } }
@media (min-width: 1200px) { .head-nav a { font-weight: 600; } }
.head-nav a[aria-current], .menu-panel a[aria-current] { color: var(--blue-text); background: var(--blue-soft); }

/* ------------------------------------------------------------------ pressable buttons */
.btn { border-radius: var(--r-btn); border: 2px solid transparent; border-bottom-width: 4px; font-weight: 700; letter-spacing: .03em; min-height: 50px; padding: 0 22px; transition: transform .1s, border-bottom-width .1s, filter .15s; }
.btn:active { transform: translateY(2px); border-bottom-width: 2px; }
.btn-solid { background: var(--green); border-color: var(--green-dark); color: var(--on-color); }
.btn-solid:hover { background: var(--green); filter: brightness(1.06); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--blue-text); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn-blue { background: var(--blue); border-color: var(--blue-dark); color: var(--accent-ink); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: .9rem; }

/* ------------------------------------------------------------------ cards */
.card { background: var(--surface); border: 2px solid var(--line); border-bottom-width: 4px; border-radius: var(--r-m); padding: 22px; }
a.card { display: block; text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
a.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
a.card:active { transform: translateY(2px); border-bottom-width: 2px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.kicker { font-size: .82rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--green-text); margin: 0 0 10px; }

/* ------------------------------------------------------------------ layout */
.sec { padding-block: 64px 0; }
.sec-head { max-width: 760px; margin-bottom: 26px; }
.sec h2, .page-h h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.1; }
.page-h { padding-block: 44px 8px; }
.page-h h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); max-width: 20ch; }
.lead { font-size: clamp(1.05rem, 1.7vw, 1.2rem); color: var(--muted); max-width: 62ch; }
.grid-2 { display: grid; gap: 18px; 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: 72ch; }
.prose h2 { margin-top: 1.8em; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--ink); }
.toc a:hover { border-color: var(--blue); color: var(--blue-text); }
.note { padding: 14px 16px; border-radius: var(--r-s); background: var(--blue-soft); color: var(--ink); border: 2px solid transparent; }
.note.warn { background: var(--red-soft); }
.note.ok { background: var(--green-soft); }
.note b:first-child { color: var(--head); }

/* ------------------------------------------------------------------ hero */
.hero { padding-block: 40px 16px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px; padding-block: 24px; } }
.hero h1 { font-size: clamp(2.4rem, 6.4vw, 4.4rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; margin-bottom: .3em; }
.hero h1 em { font-style: normal; color: var(--green-text); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* "now" card */
.now { position: relative; padding: 24px; }
.now-week { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 10px; font-weight: 700; color: var(--head); }
.now-week span:last-child { color: var(--muted); font-weight: 600; font-size: .9rem; }
.bar { height: 16px; border-radius: 999px; background: var(--surface-2); border: 2px solid var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--green); box-shadow: inset 0 -4px 0 rgb(0 0 0 / .12), inset 0 4px 0 rgb(255 255 255 / .35); transition: width 1.2s cubic-bezier(.16,1,.3,1); }
.next-box { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin-top: 20px; padding-top: 18px; border-top: 2px solid var(--line); }
.days { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 24px; background: var(--fag, var(--green)); color: var(--on-color); border-bottom: 5px solid var(--fagd, var(--green-dark)); text-align: center; line-height: 1; }
.days b { font-size: 2.4rem; font-weight: 800; display: block; font-variant-numeric: tabular-nums; }
.days span { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.next-box p { margin: 0; }
.next-what { font-weight: 750; color: var(--head); font-size: 1.1rem; }
.next-when { color: var(--muted); font-size: .92rem; }

/* ------------------------------------------------------------------ course map */
.map { position: relative; display: grid; gap: 34px; max-width: 560px; margin-inline: auto; }
.unit { display: grid; gap: 18px; }
.unit-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-radius: var(--r-m); background: var(--fag); border-bottom: 5px solid var(--fagd); color: var(--on-color); }
.unit-head h3 { color: inherit; margin: 0; font-size: 1.15rem; }
.unit-head p { margin: 2px 0 0; font-size: .86rem; font-weight: 600; }
.unit-head h2 { color: inherit; }
.unit-head .tag { background: rgb(255 255 255 / .55); color: var(--on-color); }
.unit.locked .unit-head { background: var(--locked); border-bottom-color: var(--locked-d); color: var(--ink); }
.nodes { list-style: none; margin: 0; padding: 8px 0; display: grid; gap: 22px; justify-items: center; }
.node { --x: 0px; transform: translateX(var(--x)); position: relative; }
.node button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; width: 70px; height: 64px; border-radius: 50%; background: var(--fag); border-bottom: 7px solid var(--fagd); color: var(--on-color); transition: transform .12s; }
.node button:hover { filter: brightness(1.05); }
.node button:active { transform: translateY(4px); border-bottom-width: 3px; }
.node button:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.node button .i { width: 30px; height: 30px; }
.node.done button { opacity: 1; }
.node.todo button { background: var(--locked); border-bottom-color: var(--locked-d); color: var(--muted); }
.node.now button { box-shadow: 0 0 0 6px var(--bg), 0 0 0 10px var(--fag); }
.node .bubble { position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--surface); border: 2px solid var(--line); color: var(--head); border-color: var(--fag); font-weight: 800; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; padding: 7px 12px; border-radius: 12px; animation: bob 1.8s ease-in-out infinite; }
.node .bubble::after { content: ""; position: absolute; top: 100%; left: 50%; width: 10px; height: 10px; background: var(--surface); border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: translate(-50%, -5px) rotate(45deg); }
@keyframes bob { 50% { transform: translate(-50%, -5px); } }
.node .label { position: absolute; top: 50%; left: calc(100% + 14px); transform: translateY(-50%); width: max-content; max-width: 180px; font-size: .84rem; font-weight: 600; color: var(--muted); line-height: 1.25; }
.node .label b { display: block; color: var(--head); font-weight: 700; }
.node.left .label { left: auto; right: calc(100% + 14px); text-align: right; }
.pop { position: fixed; z-index: 70; inset: auto 12px 12px; max-width: 460px; margin-inline: auto; padding: 20px; background: var(--surface); border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 20px; transform: translateY(20px); opacity: 0; transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .2s; }
.pop.open { transform: none; opacity: 1; }
.pop h3 { margin: 0 0 4px; }
.pop .pop-date { color: var(--muted); font-weight: 600; margin: 0 0 12px; }
.pop .actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (prefers-reduced-motion: no-preference) {
  .js .node { animation: pop-in .5s cubic-bezier(.34,1.56,.64,1) both; animation-delay: calc(var(--i, 0) * 45ms); }
  @keyframes pop-in { from { opacity: 0; transform: translateX(var(--x)) scale(.6); } }
}

/* ------------------------------------------------------------------ guide cards */
.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: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--c, var(--green)); border-bottom: 4px solid var(--cd, var(--green-dark)); color: var(--on-color); margin-bottom: 6px; }
.guide .ico .i { width: 28px; height: 28px; }
.guide h3 { margin: 0; font-size: 1.15rem; }
.guide p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ------------------------------------------------------------------ checklists */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: block; }
.checklist label { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; transition: background .2s, border-color .2s; }
.checklist label:hover { border-color: var(--line-strong); }
.checklist input { appearance: none; width: 30px; height: 30px; margin: 0; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.checklist input::after { content: ""; width: 12px; height: 7px; border-left: 3px solid var(--on-color); border-bottom: 3px solid var(--on-color); transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.checklist input:checked { background: var(--green); border-color: var(--green-dark); transform: scale(1.06); }
.checklist input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.checklist input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.checklist label:has(input:checked) { background: var(--green-soft); border-color: transparent; }
.checklist .txt { line-height: 1.45; padding-top: 3px; }
.checklist .txt small { display: block; color: var(--muted); font-size: .86rem; margin-top: 2px; }
.cl-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.cl-head h3 { margin: 0; }
.ring { width: 54px; height: 54px; flex: none; }
.ring circle { fill: none; stroke-width: 7; }
.ring .bg { stroke: var(--line); }
.ring .fg { stroke: var(--green); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .6s cubic-bezier(.16,1,.3,1); }
.ring text { font: 800 14px var(--f-sans); fill: var(--head); }

/* ------------------------------------------------------------------ Fag tabs (deliverables) */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 22px; }
.tabs button { all: unset; cursor: pointer; padding: 10px 16px; border-radius: 14px; font-weight: 700; border: 2px solid var(--line); border-bottom-width: 4px; color: var(--ink); background: var(--surface); }
.tabs button[aria-selected="true"] { background: var(--fag); border-color: var(--fagd); color: var(--on-color); }
.tabs button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.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: 8px; }
.files li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 2px solid var(--line); font-family: var(--f-mono); font-size: .9rem; overflow-wrap: anywhere; }
.files li span { color: var(--muted); font-family: var(--f-sans); font-size: .82rem; }
.copy { all: unset; cursor: pointer; font-family: var(--f-sans); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-text); padding: 4px 8px; border-radius: 8px; }
.copy:hover { background: var(--blue-soft); }
.copy:focus-visible { outline: 2px solid var(--blue); }
.field { display: grid; gap: 6px; }
.field > label, .field > .label { font-weight: 700; color: var(--head); font-size: .92rem; }
.input input, .input select, select.select, textarea { border-width: 2px; border-radius: 14px; background: var(--field); font-weight: 500; }
textarea { width: 100%; min-height: 110px; padding: 12px 14px; border: 2px solid var(--line-strong); color: var(--ink); font: inherit; resize: vertical; }
textarea:focus { outline: none; border-color: var(--blue); }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.tree { font-family: var(--f-mono); font-size: .9rem; line-height: 1.7; background: var(--surface-2); border: 2px solid var(--line); border-radius: 14px; padding: 16px 18px; overflow-x: auto; white-space: pre; margin: 0; }

/* ------------------------------------------------------------------ calendar list */
.weeks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.week { display: grid; grid-template-columns: 74px 1fr; gap: 14px; align-items: start; }
.wk { display: grid; place-items: center; text-align: center; height: 70px; border-radius: 18px; background: var(--fag); border-bottom: 5px solid var(--fagd); color: var(--on-color); line-height: 1.05; }
.wk b { font-size: 1.6rem; font-weight: 800; display: block; }
.wk span { font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.week.past .wk { background: color-mix(in srgb, var(--fag) 35%, var(--surface-2)); border-bottom-color: color-mix(in srgb, var(--fagd) 35%, var(--surface-2)); color: var(--ink); }
.week.current .wk { box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--fag); }
.week-body { padding: 12px 16px; border: 2px solid var(--line); border-radius: 16px; min-height: 70px; }
.week.current .week-body { border-color: var(--fag); }
.week-dates { font-size: .84rem; color: var(--muted); font-weight: 600; 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; }
.evs .d { font-family: var(--f-mono); font-size: .82rem; color: var(--muted); min-width: 6.6em; }
.evs .k-due { font-weight: 800; color: var(--head); }
.evs .k-off { color: var(--muted); font-style: italic; }
.evs li::before { content: ""; flex: none; width: 9px; height: 9px; 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 2px var(--fagd); }
.evs .k-meet::before { background: var(--blue); }

/* ------------------------------------------------------------------ user stories */
.us-card { font-size: 1.05rem; line-height: 1.5; padding: 18px 20px; border-radius: 16px; border: 2px solid var(--line); border-bottom-width: 4px; background: var(--surface); }
.us-card .w { color: var(--blue-text); font-weight: 750; }
.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 52px; border-radius: 16px; border: 2px solid; }
.bad { border-color: var(--red); background: var(--red-soft); }
.good { border-color: var(--green); background: var(--green-soft); }
.bad::before, .good::before { position: absolute; left: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; }
.bad::before { content: "✕"; background: var(--red-dark); }
.good::before { content: "✓"; background: var(--green-dark); }
.bad p, .good p { margin: 0; }
.bad small, .good small { display: block; margin-top: 6px; color: var(--ink); opacity: .85; }
.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 .6s cubic-bezier(.16,1,.3,1); }
.flip button[aria-pressed="true"] { transform: rotateY(180deg); }
.flip button:focus-visible { outline: 3px solid var(--blue); 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: 2px solid var(--line); border-bottom-width: 4px; background: var(--surface); }
.flip .front { text-align: center; }
.flip .front b { font-size: 3rem; line-height: 1; font-weight: 800; color: var(--c); }
.flip .front span { font-weight: 700; color: var(--head); }
.flip .back { transform: rotateY(180deg); font-size: .92rem; background: var(--surface-2); }
.gwt { font-family: var(--f-mono); font-size: .92rem; line-height: 1.7; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); border: 2px solid var(--line); white-space: pre-wrap; margin: 0 0 14px; }
.gwt b { color: var(--blue-text); }

/* planning poker */
.poker { display: grid; gap: 16px; }
.poker-story { font-weight: 600; }
.cards { display: flex; flex-wrap: wrap; gap: 10px; }
.pcard { all: unset; cursor: pointer; display: grid; place-items: center; width: 58px; height: 82px; border-radius: 12px; font-weight: 800; font-size: 1.4rem; color: var(--head); background: var(--surface); border: 2px solid var(--line); border-bottom-width: 5px; transition: transform .15s; }
.pcard:hover { transform: translateY(-4px); }
.pcard[aria-pressed="true"] { background: var(--blue); border-color: var(--blue-dark); color: var(--accent-ink); transform: translateY(-8px); }
.pcard:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.votes { display: flex; flex-wrap: wrap; gap: 10px; min-height: 90px; }
.vote { width: 58px; height: 82px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; background: var(--blue-soft); border: 2px solid var(--line); perspective: 600px; }
.vote.hidden { background: repeating-linear-gradient(45deg, var(--blue) 0 8px, var(--blue-dark) 8px 16px); color: transparent; }
.vote small { display: block; font-size: .62rem; font-weight: 700; color: var(--muted); text-align: center; }

/* quiz */
.quiz { display: grid; gap: 14px; }
.q { font-weight: 700; color: var(--head); font-size: 1.08rem; }
.opts { display: grid; gap: 10px; }
.opt { all: unset; box-sizing: border-box; cursor: pointer; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--line); border-bottom-width: 4px; font-weight: 500; line-height: 1.4; }
.opt:hover { background: var(--surface-2); }
.opt:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.opt.right { background: var(--green-soft); border-color: var(--green); }
.opt.wrong { background: var(--red-soft); border-color: var(--red); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.quiz-bar { display: flex; align-items: center; gap: 12px; }
.quiz-bar .bar { flex: 1; }
.feedback { padding: 14px 16px; border-radius: 14px; font-weight: 600; }
.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(160px, 1fr)); overflow-x: auto; padding-bottom: 6px; }
.col { background: var(--surface-2); border-radius: 16px; padding: 12px; min-height: 220px; border: 2px dashed transparent; transition: border-color .2s, background .2s; }
.col.over { border-color: var(--blue); background: var(--blue-soft); }
.col h4 { margin: 0 0 10px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.task { background: var(--surface); border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: grab; font-size: .9rem; line-height: 1.35; touch-action: none; }
.task:active { cursor: grabbing; }
.task.dragging { opacity: .5; }
.task small { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-weight: 600; }
.task .who { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--purple); color: #1d0a2b; font-size: .66rem; font-weight: 800; }
.task:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* charts */
.chart-box { display: grid; gap: 16px; }
.chart { width: 100%; height: auto; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; }
.chart .grid line { stroke: var(--line); }
.chart text { font: 600 12px var(--f-sans); fill: var(--muted); }
.chart .ideal { stroke: var(--line-strong); stroke-width: 2.5; stroke-dasharray: 6 6; fill: none; }
.chart .real { stroke: var(--blue); stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { fill: var(--surface); stroke: var(--blue); stroke-width: 3; }
.chart .barv { fill: var(--green); }
.chart .barv-top { fill: var(--green-dark); }
.chart .avg { stroke: var(--orange); stroke-width: 3; stroke-dasharray: 2 6; stroke-linecap: round; }
.chart .title { font: 800 14px var(--f-sans); fill: var(--head); }
.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.2s cubic-bezier(.16,1,.3,1) 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-size: .78rem; font-weight: 700; color: var(--muted); }
.nums input { width: 100%; min-height: 42px; padding: 0 10px; border: 2px solid var(--line-strong); border-radius: 12px; background: var(--field); color: var(--ink); font: 600 1rem var(--f-mono); }
.nums input:focus { outline: none; border-color: var(--blue); }
.seg { border-radius: 16px; }
.seg label { border-radius: 12px; }

/* 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: 88px; } }
.slider-f { display: grid; gap: 4px; }
.slider-f .top { display: flex; justify-content: space-between; font-weight: 700; color: var(--head); }
.slider-f output { font-family: var(--f-mono); color: var(--blue-text); }
.slider-f small { color: var(--muted); }
input[type="range"] { accent-color: var(--green); height: 28px; }
.score { display: grid; place-items: center; text-align: center; padding: 26px; }
.score .big { font-size: clamp(3.6rem, 10vw, 5.4rem); font-weight: 800; 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: .88rem; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; overflow-x: auto; white-space: nowrap; }
.comps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 16px; }
.comp { border: 2px solid var(--line); border-radius: 14px; padding: 10px; }
.comp b { display: block; font-size: 1.8rem; font-weight: 800; }
.comp span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.wtable td.c, .wtable th.c { text-align: center; }
.levels td:first-child { font-weight: 700; color: var(--head); }

/* 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: 16; }
.dial .bg { stroke: var(--line); }
.dial .zone { stroke: var(--green-soft); }
.dial .fg { stroke: var(--blue); 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: 800; color: var(--head); font-variant-numeric: tabular-nums; }
.dial .t span { color: var(--muted); font-weight: 600; font-size: .9rem; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* diagrams */
.diagram { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 12px; overflow-x: auto; }
.diagram svg { min-width: 520px; width: 100%; height: auto; }
.diagram svg text { font: 500 13px var(--f-sans); fill: var(--head); }
.diagram svg .h { font-weight: 700; }
.diagram svg .m { font: 500 12px var(--f-mono); fill: var(--ink); }
.diagram svg rect, .diagram svg .box { fill: var(--surface); stroke: var(--head); stroke-width: 1.6; }
.diagram svg line, .diagram svg path.l { stroke: var(--head); stroke-width: 1.6; fill: none; }
.diagram svg .accent { fill: var(--green-soft); }
.diagram svg .accent2 { fill: var(--blue-soft); }
.diagram svg .accent3 { fill: #fff3cc; }
.diagram figcaption, figure figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }
figure { margin: 0 0 22px; }
.mistakes { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.mistakes li { padding: 12px 14px 12px 44px; position: relative; border-radius: 14px; background: var(--red-soft); }
.mistakes li::before { content: "!"; position: absolute; left: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--red-dark); color: #fff; font-weight: 900; display: grid; place-items: center; font-size: .8rem; }

/* gitflow */
.gitflow svg { min-width: 560px; }
.gitflow .lane { font: 700 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 cubic-bezier(.16,1,.3,1) forwards; animation-delay: var(--d, 0s); }
  .gitflow.in circle { animation: pop .4s cubic-bezier(.34,1.56,.64,1) 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: 800 22px var(--f-sans); fill: var(--on-color); }
.rotation .lbl { font: 600 12px var(--f-sans); 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: 2px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 2px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 2px; font-weight: 700; color: var(--head); display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.6rem; line-height: 1; color: var(--blue-text); transition: transform .3s cubic-bezier(.16,1,.3,1); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 2px 18px; max-width: 70ch; }
.table-scroll { border-width: 2px; border-radius: 16px; }
thead th { background: var(--surface-2); }

/* confetti canvas */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; }

/* 404 */
.nf .nf-code { color: var(--green-text); font-family: var(--f-sans); font-weight: 800; }
@media print { .node .bubble, #confetti { display: none; } }
.node.now { margin-top: 34px; }
@media (max-width: 560px) { .node { --x: 0px !important; } .node .label { max-width: min(150px, 34vw); } }

/* tools: code tabs, mock generator, NAT table, commit checker */
:root { --warn-text: #9a5200; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --warn-text: #ffb347; } }
.tabs.code button { --fag: var(--blue); --fagd: var(--blue-dark); font-family: var(--f-mono); font-size: .88rem; }
.out, .cmd { font-family: var(--f-mono); font-size: .84rem; line-height: 1.6; background: var(--surface-2); border: 2px solid var(--line); 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; }
.out-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.mock { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .mock { grid-template-columns: minmax(0, 1fr); } }
textarea.code { font-family: var(--f-mono); font-size: .88rem; line-height: 1.6; min-height: 330px; tab-size: 2; white-space: pre; overflow: auto; }
.mock [data-msg] { margin: 0; font-weight: 600; color: var(--green-text); }
.mock.has-err [data-msg] { color: var(--red-text); }
.mock.has-err .out { opacity: .55; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; }
.types { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.types code { font-size: .8rem; }
table.nat td, table.nat th { padding: 6px 10px; white-space: nowrap; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.checks li::before { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; font-weight: 800; font-size: .85rem; }
.checks li.ok::before { content: "✓"; background: var(--green); color: var(--on-color); }
.checks li.bad::before { content: "✗"; background: var(--red); 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: 500; }
.count { font-family: var(--f-mono); font-size: .85rem; color: var(--muted); font-weight: 700; }
.count.over { color: var(--red-text); }
.steps { counter-reset: st; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps > li { counter-increment: st; position: relative; padding-left: 52px; }
.steps > li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--f4); color: var(--on-color); font-weight: 800; border-bottom: 4px solid var(--f4d); }
.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 { border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 16px; padding: 16px 12px; text-align: center; background: var(--surface); font-weight: 750; color: var(--head); }
.flow-d .box small { display: block; font-weight: 500; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.flow-d .box.c1 { border-color: var(--f3d); } .flow-d .box.c2 { border-color: var(--f4d); } .flow-d .box.c3 { border-color: var(--f5d); }
.flow-d .arr { display: grid; gap: 4px; justify-items: center; font-size: .74rem; color: var(--muted); font-weight: 600; }
.flow-d .arr i { display: block; width: 46px; height: 4px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--blue) 0 8px, transparent 8px 14px); }
.flow-d .arr i.back { transform: scaleX(-1); background: repeating-linear-gradient(90deg, var(--green) 0 8px, transparent 8px 14px); }
@media (prefers-reduced-motion: no-preference) { .flow-d .arr i { background-size: 14px 4px; animation: dash .7s linear infinite; } @keyframes dash { to { background-position: 14px 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: 4px; height: 26px; background: repeating-linear-gradient(180deg, var(--blue) 0 8px, transparent 8px 14px); } .flow-d .arr i.back { transform: scaleY(-1); background: repeating-linear-gradient(180deg, var(--green) 0 8px, transparent 8px 14px); } }
.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; }
.fag-0 .wk { color: var(--ink); }
