/* ==========================================================================
   Builder widget kit, v1 (2026-09-22)
   The Full Stack PM house style for interactive lesson widgets:
   the website's "warm diner editorial" palette and type, plus the
   hand-drawn napkin layer from the lesson figures.
   Every widget links this file and kit.js. Use the tokens, never raw hex.
   ========================================================================== */

@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/courses/builder/w/_kit/fonts/outfit-var.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url('/courses/builder/w/_kit/fonts/jetbrains-mono-var.woff2') format('woff2'); }

/* ---------- tokens: light ---------- */
:root {
  --bg: #faf8f5;            /* page (site stone-50) */
  --surface: #fffdf8;       /* cards */
  --paper: #ffffff;         /* inner panels, inputs */
  --cream: #fff6db;
  --cream-2: #f5e6c8;
  --butter: #f4d35e;
  --butter-2: #fae89a;
  --gold: #fcc403;
  --maple: #e63f02;
  --maple-2: #b43200;       /* hover, text on light maple */
  --maple-3: #ffe6d8;       /* light fill */
  --maple-wash: #fff0eb;
  --ink: #1a1612;
  --ink-2: #2d2620;
  --s900: #3d352d; --s800: #4a4038; --s700: #5c5248; --s600: #7a6e62; --s500: #9a8d80;
  --s400: #b8a99a; --s300: #d4c9bc; --s200: #e8e0d6; --s100: #f4f0eb; --s50: #faf8f5;
  --line: #e8e0d6;
  --line-2: #d4c9bc;
  --muted: #7a6e62;
  --faint: #9a8d80;
  --on-maple: #ffffff;

  /* the three jobs, used identically in every widget */
  --p: #b8860b;  --p-ink: #6f5200;  --p-soft: #fff1bf;  --p-line: #f0c94a;   /* presentation: what you see */
  --l: #e63f02;  --l-ink: #a83000;  --l-soft: #ffe6d8;  --l-line: #f59a73;   /* logic: what happens */
  --d: #2f6b9a;  --d-ink: #1f4d73;  --d-soft: #e2eef8;  --d-line: #8fb8da;   /* data: what's kept */

  /* the two places */
  --zone-device: #fffaf0;   /* the user's device */
  --zone-remote: #f1efec;   /* other machines */

  /* code, warm syntax */
  --code-bg: #fffdf8;
  --code-gutter: #b8a99a;
  --tk-kw: #b43200; --tk-str: #7a5a00; --tk-com: #9a8d80; --tk-fn: #2f6b9a;
  --tk-num: #c2410c; --tk-tag: #2f6b9a; --tk-attr: #8a5a00; --tk-punc: #7a6e62;

  --shadow-sm: 0 1px 2px rgba(26,22,18,.04);
  --shadow-md: 0 2px 4px rgba(26,22,18,.04), 0 4px 8px rgba(26,22,18,.06);
  --shadow-lg: 0 4px 8px rgba(26,22,18,.04), 0 8px 16px rgba(26,22,18,.06), 0 16px 32px rgba(26,22,18,.08);
  --shadow-xl: 0 8px 16px rgba(26,22,18,.04), 0 16px 32px rgba(26,22,18,.08), 0 32px 64px rgba(26,22,18,.12);
  --shadow-maple: 0 4px 14px rgba(230,63,2,.25);
  --shadow-butter: 0 4px 14px rgba(244,211,94,.4);

  --r-xs: 6px; --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 24px; --r-pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);          /* out-expo */
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  color-scheme: light;
}

/* ---------- tokens: dark ("late night diner") ---------- */
:root[data-theme="dark"] {
  --bg: #171310;
  --surface: #241e18;
  --paper: #1d1813;
  --cream: #2e2718;
  --cream-2: #3a3122;
  --butter: #f4d35e;
  --butter-2: #3f361b;
  --gold: #fcc403;
  --maple: #ff5a26;
  --maple-2: #ff7a4d;
  --maple-3: #4a2114;
  --maple-wash: #382016;
  --ink: #f2ece3;
  --ink-2: #ece5db;
  --s900: #ece5db; --s800: #ddd4c8; --s700: #c9bdaf; --s600: #a89c8d; --s500: #8a7e70;
  --s400: #6b6155; --s300: #54493f; --s200: #3a322a; --s100: #2a241e; --s50: #1d1813;
  --line: #3a322a;
  --line-2: #54493f;
  --muted: #a89c8d;
  --faint: #8a7e70;
  --on-maple: #1a1612;

  --p: #f4d35e;  --p-ink: #f7de84;  --p-soft: #3a3118;  --p-line: #8a7424;
  --l: #ff5a26;  --l-ink: #ff8f66;  --l-soft: #45200f;  --l-line: #9a3a17;
  --d: #7fb2de;  --d-ink: #a9cdec;  --d-soft: #1c2a37;  --d-line: #3f6a8f;

  --zone-device: #221c15;
  --zone-remote: #1b1a19;

  --code-bg: #1d1813;
  --code-gutter: #6b6155;
  --tk-kw: #ff8f66; --tk-str: #f4d35e; --tk-com: #8a7e70; --tk-fn: #7fb2de;
  --tk-num: #ffb38a; --tk-tag: #7fb2de; --tk-attr: #e8c16a; --tk-punc: #a89c8d;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 2px 4px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.35);
  --shadow-lg: 0 4px 8px rgba(0,0,0,.3), 0 8px 16px rgba(0,0,0,.35), 0 16px 32px rgba(0,0,0,.4);
  --shadow-xl: 0 8px 16px rgba(0,0,0,.3), 0 16px 32px rgba(0,0,0,.4), 0 32px 64px rgba(0,0,0,.5);
  --shadow-maple: 0 4px 14px rgba(255,90,38,.3);
  --shadow-butter: 0 4px 14px rgba(244,211,94,.2);
  color-scheme: dark;
}

/* ---------- base ---------- */
/* ---------- Builder 1 course site (tokens come from the widget kit, above) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
code { font-family: var(--mono); font-size: .86em; background: var(--maple-wash); color: var(--maple-2); padding: .1em .38em; border-radius: 5px; }
:root[data-theme="dark"] code { background: var(--cream); color: var(--butter); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 12px;
  padding: 0 max(16px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--maple); color: var(--on-maple); font-size: 13px; font-weight: 800; }
.brand-name { font-size: 16px; }
.top-actions { margin-left: auto; display: flex; gap: 8px; }
.top-actions button, .menu-btn { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-pill); height: 36px; padding: 0 14px; font-size: 14px; }
.review-btn[aria-pressed="true"] { background: var(--butter-2); border-color: var(--butter); color: var(--ink); }
:root[data-theme="dark"] .review-btn[aria-pressed="true"] { color: var(--butter); }
.theme-btn { width: 36px; padding: 0 !important; display: grid; place-items: center; }
.theme-btn svg { width: 17px; height: 17px; }
.menu-btn { display: none; width: 40px; padding: 0; font-size: 18px; }

/* layout */
.shell { display: grid; grid-template-columns: 290px minmax(0, 1fr); }
.side { position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; border-right: 1px solid var(--line); padding: 22px 14px 60px 18px; }
.main { min-width: 0; padding: 40px 24px 120px; }
.lesson { max-width: 740px; margin: 0 auto; }

/* sidebar */
.side-mod { margin-bottom: 22px; }
.side-mod-title { margin: 0 0 6px; padding: 0 8px; font-size: 13px; font-weight: 700; line-height: 1.35; }
.side-mod-title span { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--maple); }
.side ol { list-style: none; margin: 0; padding: 0; }
.side-mod > ol > li > a { display: grid; grid-template-columns: 38px 1fr auto; align-items: baseline; gap: 4px; padding: 6px 8px; border-radius: 8px; text-decoration: none; font-size: 14px; line-height: 1.35; color: var(--s800); }
.side-mod > ol > li > a:hover { background: var(--s100); }
:root[data-theme="dark"] .side-mod > ol > li > a:hover { background: var(--surface); }
.side li.is-on > a { background: var(--maple-wash); color: var(--maple-2); font-weight: 600; }
:root[data-theme="dark"] .side li.is-on > a { background: var(--cream); color: var(--maple); }
.side li.is-outline > a { color: var(--faint); }
.side-num { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.side-tag { font-size: 10.5px; color: var(--faint); border: 1px solid var(--line); border-radius: 99px; padding: 0 6px; }
.side-secs { list-style: none; margin: 2px 0 8px 46px !important; padding: 0 !important; border-left: 2px solid var(--line); }
.side-secs li { margin: 0; }
.side-secs li::marker { content: none; }
.side-secs a { display: block; padding: 4px 10px; font-size: 13px; line-height: 1.4; text-decoration: none; color: var(--muted); border-left: 2px solid transparent; margin-left: -2px; }
.side-secs a.is-here { color: var(--maple); border-left-color: var(--maple); }

/* lesson head */
.lesson-head { margin-bottom: 36px; }
.kicker { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--maple); }
h1 { margin: 0 0 14px; font-size: clamp(32px, 5vw, 46px); line-height: 1.08; letter-spacing: -.025em; font-weight: 800; }
.top { margin: 0; font-size: 19px; line-height: 1.5; color: var(--s700); }

/* sections */
section { position: relative; }
.sec, .opener, .close, .placeholder { margin: 0 0 56px; }
h2 { margin: 0 0 16px; font-size: 27px; line-height: 1.2; letter-spacing: -.018em; font-weight: 750; position: relative; }
h3 { margin: 26px 0 8px; font-size: 19px; }
.anchor { position: absolute; left: -26px; top: 0; text-decoration: none; color: var(--s300); opacity: 0; transition: opacity .15s; font-weight: 500; }
h2:hover .anchor { opacity: 1; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 18px; padding-left: 22px; }
li { margin: 5px 0; }
li::marker { color: var(--maple); }
strong { font-weight: 700; }
.opener p:first-of-type { font-size: 19px; }
.sec-tag { display: inline-block; vertical-align: middle; margin-right: 10px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; }
.tag-do { background: var(--ink); color: var(--bg); }
:root[data-theme="dark"] .tag-do { background: var(--butter); color: #1a1612; }
.muted { color: var(--muted); }

/* tables */
.table { overflow-x: auto; margin: 6px 0 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
thead th { font-size: 13px; background: var(--s100); }
:root[data-theme="dark"] thead th { background: var(--paper); }
tbody th { font-weight: 600; min-width: 130px; }
tr:last-child > * { border-bottom: 0; }

/* code blocks */
.codeblock { position: relative; margin: 6px 0 20px; }
.codeblock pre { margin: 0; padding: 18px 76px 18px 20px; background: var(--ink); color: #f4f0eb; border-radius: var(--r); overflow-x: auto; font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
:root[data-theme="dark"] .codeblock pre { background: #0f0c0a; border: 1px solid var(--line); }
.codeblock pre code { background: none !important; color: inherit !important; padding: 0; font-size: inherit; }
.codeblock .copy { position: absolute; top: 10px; right: 10px; border: 1px solid #4a4038; background: #2d2620; color: #f4f0eb; border-radius: 7px; font-size: 12px; padding: 3px 10px; }

/* widgets */
.widget { margin: 26px 0 8px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-md); overflow: hidden; }
.wbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.wlabel { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--maple); }
.wtitle { font-weight: 650; display: none; }
.wreview .wname { margin: 0 0 4px; font-weight: 650; }
.wmin { margin-left: auto; color: var(--faint); font-size: 13px; }
.wframe { background: var(--bg); }
.wframe iframe { display: block; width: 100%; height: 520px; border: 0; transition: height .25s var(--ease); }
.wreview { padding: 12px 16px 14px; border-top: 1px dashed var(--line-2); background: var(--s50); font-size: 14px; line-height: 1.5; }
:root[data-theme="dark"] .wreview { background: var(--paper); }
.wteaches { margin: 0 0 8px; color: var(--s700); }
.wflag { margin: 0 0 8px; color: var(--maple-2); font-size: 13px; }
:root[data-theme="dark"] .wflag { color: var(--maple); }
.wmarks, .wchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wchips { margin-top: 10px; }
.wmarks-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.wmarks button, .idea-marks button { border: 1px solid var(--line-2); background: var(--paper); border-radius: 99px; padding: 2px 11px; font-size: 13px; }
.wmarks button.is-on[data-mark="pick"], .idea-marks button.is-on[data-mark="pick"] { background: var(--maple); border-color: var(--maple); color: var(--on-maple); }
.wmarks button.is-on[data-mark="maybe"], .idea-marks button.is-on[data-mark="maybe"] { background: var(--butter); border-color: var(--butter); color: var(--ink); }
.wmarks button.is-on[data-mark="cut"], .idea-marks button.is-on[data-mark="cut"] { background: var(--s600); border-color: var(--s600); color: #fff; text-decoration: line-through; }
.wopen { margin-left: auto; font-size: 13px; color: var(--muted); }
.wchip { border: 1px solid var(--line); background: var(--paper); border-radius: 9px; padding: 4px 10px; font-size: 13px; text-align: left; }
.wchip.is-on { border-color: var(--maple); box-shadow: inset 0 0 0 1px var(--maple); }
.wchip-id { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-right: 6px; }
.wchip .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 6px; vertical-align: middle; }
.dot-pick { background: var(--maple); } .dot-maybe { background: var(--butter); } .dot-cut { background: var(--s500); }

/* image, meme, video slots */
.slot { display: flex; gap: 12px; align-items: baseline; margin: 22px 0; padding: 22px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--r); background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--line) 45%, transparent) 10px 11px); font-size: 15px; color: var(--s700); }
.slot-kind { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--maple); flex: none; }

/* break, close, notes */
.close { padding: 24px 26px 8px; border-radius: var(--r-lg); background: var(--cream); }
.close-label { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--maple-2); }
:root[data-theme="dark"] .close-label { color: var(--butter); }
.placeholder { padding: 22px 24px; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); }
.outline-note { margin: 0 0 36px; padding: 14px 18px; border-radius: var(--r); background: var(--butter-2); font-size: 15px; }
.outline-list li { margin: 8px 0; }
.question { display: flex; gap: 10px; align-items: baseline; margin: -6px 0 16px; font-size: 14px; color: var(--muted); }
.question span { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--d); }
.by { display: inline-block; margin: 0 0 12px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; }
.by-carl { background: var(--d-soft); color: var(--d-ink); }
.by-claude { background: var(--butter-2); color: var(--p-ink); }
:root[data-theme="dark"] .by-carl { background: var(--surface); color: var(--d-line); }
:root[data-theme="dark"] .by-claude { background: var(--surface); color: var(--butter); }
.savebar { position: fixed; right: 16px; bottom: 16px; z-index: 30; font-size: 12px; padding: 4px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
html:not(.review) .review-only { display: none !important; }

/* prev / next */
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.prevnext a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; background: var(--surface); }
.prevnext a:hover { border-color: var(--maple); }
.pn-next { text-align: right; grid-column: 2; }
.pn-lab { display: block; font-size: 12px; color: var(--faint); }
.pn-t { font-weight: 650; }

/* home */
.mods { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.mod-card { padding: 22px 22px 10px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.mod-card h2 { font-size: 22px; margin-bottom: 2px; }
.mod-card ol { list-style: none; padding: 0; margin: 12px 0; }
.mod-card li a { display: flex; gap: 10px; text-decoration: none; padding: 4px 0; font-size: 15px; }
.mod-card li.is-outline a { color: var(--faint); }

/* narrow */
@media (max-width: 900px) {
  .shell { display: block; }
  .menu-btn { display: inline-block; }
  .side { position: fixed; left: 0; top: 60px; z-index: 15; width: min(320px, 88vw); background: var(--bg); transform: translateX(-102%); transition: transform .25s var(--ease); box-shadow: var(--shadow-xl); }
  body.nav-open .side { transform: none; }
  .main { padding: 28px 16px 100px; }
  .brand-name { font-size: 15px; }
  .review-btn { font-size: 13px !important; padding: 0 10px !important; }
  .anchor { display: none; }
}
@media (max-width: 480px) { .brand-name { display: none; } .flags-btn kbd { display: none; } .top-actions button { white-space: nowrap; padding: 0 10px !important; font-size: 13px; } .top-actions { gap: 6px; } }

/* ---------- islands: blocks inside editable text ---------- */
.island { display: block; }
.island-hidden { display: none; }
.sec-body, .sec-title { outline: none; caret-color: var(--maple); }
.sec-body:focus, .sec-title:focus { outline: none; }
.review .is-edited > h2::after, .review .opener.is-edited::before, .review .close.is-edited .close-label::after { content: "edited"; display: inline-block; vertical-align: middle; margin-left: 10px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--p-ink); background: var(--butter-2); border-radius: 99px; padding: 2px 8px; }
.review .opener.is-edited::before { margin: 0 0 10px; }

/* ---------- described graphics ---------- */
.graphic { margin: 22px 0; padding: 16px 18px 6px; border: 1.5px solid var(--line-2); border-radius: var(--r); background:
  linear-gradient(var(--surface), var(--surface)) padding-box, repeating-linear-gradient(135deg, var(--line) 0 6px, transparent 6px 12px) border-box; border-color: transparent; position: relative; }
.graphic figcaption { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.graphic-kind { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--maple); }
.graphic-animation .graphic-kind::before { content: "▶ "; font-size: 9px; }
.graphic-title { font-weight: 700; font-size: 15px; }
.graphic p { margin: 0 0 10px; font-size: 15px; line-height: 1.55; color: var(--s700); }

/* ---------- interactive ideas (collapsible) ---------- */
.ideas { margin: 18px 0 8px; border: 1px solid var(--d-line); border-radius: var(--r); background: var(--d-soft); }
:root[data-theme="dark"] .ideas { background: color-mix(in srgb, var(--d) 14%, var(--surface)); border-color: color-mix(in srgb, var(--d) 45%, var(--line)); }
.ideas summary { display: flex; align-items: center; gap: 8px; padding: 10px 16px; cursor: pointer; list-style: none; font-size: 14px; }
.ideas summary::-webkit-details-marker { display: none; }
.ideas summary::before { content: "▸"; color: var(--d); font-size: 12px; transition: transform .15s; }
.ideas[open] summary::before { transform: rotate(90deg); }
.ideas-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--d-ink); }
:root[data-theme="dark"] .ideas-label { color: var(--d-line); }
.ideas-count { font-size: 12px; color: var(--d); background: var(--surface); border-radius: 99px; padding: 0 8px; }
.ideas ol { margin: 0; padding: 0 18px 8px 36px; font-size: 15px; line-height: 1.5; }
.ideas li { margin: 0 0 12px; }
.ideas li::marker { color: var(--d); }
.ideas li strong { margin-right: 2px; }
.ideas li .idea-text > strong::after { content: ":"; }
.idea-marks { display: flex; gap: 6px; margin-top: 6px; }

/* ---------- comments ---------- */
mark.cmt { background: var(--butter-2); color: inherit; border-bottom: 2px solid var(--butter); border-radius: 2px; cursor: pointer; }
:root[data-theme="dark"] mark.cmt { background: color-mix(in srgb, var(--butter) 22%, transparent); }

/* ---------- checker flags ---------- */
.show-flags span.flag { text-decoration: underline dotted color-mix(in srgb, var(--maple) 60%, transparent); text-decoration-thickness: 2px; text-underline-offset: 5px; cursor: pointer; }
.show-flags span.flag:hover { background: var(--maple-wash); }
:root[data-theme="dark"].show-flags span.flag:hover { background: var(--cream); }
.flags-btn { display: inline-flex; align-items: center; gap: 6px; }
.flags-btn kbd { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.flags-btn[aria-pressed="true"] { background: var(--maple-wash); border-color: var(--maple); color: var(--maple-2); }
:root[data-theme="dark"] .flags-btn[aria-pressed="true"] { background: var(--cream); color: var(--maple); }

/* ---------- popovers ---------- */
.pop { position: fixed; z-index: 60; max-height: calc(100vh - 90px); overflow-y: auto; width: min(440px, calc(100vw - 24px)); padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-xl); font-size: 15px; line-height: 1.5; }
.pop textarea { width: 100%; resize: vertical; min-height: 60px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); font: inherit; font-size: 15px; color: var(--ink); outline: none; }
.pop textarea:focus { border-color: var(--butter); box-shadow: 0 0 0 2px var(--butter-2); }
.pop-hint { margin-top: 4px; font-size: 12px; color: var(--faint); }
.pop-comment { margin: 2px 4px 8px; white-space: pre-wrap; }
.pop-actions { display: flex; justify-content: flex-end; }
.pop-actions button { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 2px 12px; font-size: 13px; }
.pop-opts { display: grid; gap: 6px; }
.pop-opt { display: grid; gap: 2px; text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 8px 12px; }
.pop-opt:hover { border-color: var(--line-2); }
.pop-opt.is-on { border-color: var(--maple); box-shadow: inset 0 0 0 1px var(--maple); background: var(--maple-wash); }
:root[data-theme="dark"] .pop-opt.is-on { background: var(--cream); }
.pop-lab { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.pop-pick { font-size: 10px; letter-spacing: .04em; color: var(--on-maple); background: var(--maple); border-radius: 99px; padding: 0 6px; }
.pop-text { font-size: 15px; }
.savebar { z-index: 30; }

/* ---------- "In the forest" breakouts ---------- */
.forest { margin: 22px 0; padding: 14px 18px 4px; border-left: 4px solid #4f7a4a; border-radius: 0 var(--r) var(--r) 0; background: color-mix(in srgb, #4f7a4a 9%, var(--surface)); }
:root[data-theme="dark"] .forest { border-left-color: #7fae78; background: color-mix(in srgb, #7fae78 10%, var(--surface)); }
.forest-label { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #3f6b3a; user-select: none; }
:root[data-theme="dark"] .forest-label { color: #9cc896; }
.forest-label::before { content: ""; width: 10px; height: 12px; background: currentColor; clip-path: polygon(50% 0, 100% 70%, 62% 70%, 62% 100%, 38% 100%, 38% 70%, 0 70%); }
.forest p, .forest li { font-size: 16px; }

/* ---------- version switcher ---------- */
.versions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 22px; font-size: 13px; }
.versions span { color: var(--muted); margin-right: 4px; }
.versions a { text-decoration: none; border: 1px solid var(--line); border-radius: 99px; padding: 3px 12px; background: var(--surface); }
.versions a.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- vocab boxes ---------- */
.vocab { margin: 18px 0; padding: 10px 16px 2px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); }
.vocab-label { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--maple); user-select: none; }
.vocab p { margin: 0 0 8px; font-size: 15.5px; }

/* ---------- suggested visuals and interactives (review layer) ---------- */
.opt-card { margin: 10px 0 18px; font-size: 14.5px; line-height: 1.5; }
.opt-toggle { display: inline-flex; align-items: center; gap: 8px; border: 1px dashed var(--line-2); background: var(--surface); border-radius: 99px; padding: 4px 12px 4px 10px; font-size: 12.5px; color: var(--muted); }
.opt-toggle:hover { border-style: solid; color: var(--ink); }
.opt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--d); }
.opt-count { font-family: var(--mono); font-size: 11px; background: var(--s100); border-radius: 99px; padding: 0 6px; color: var(--ink); }
:root[data-theme="dark"] .opt-count { background: var(--paper); }
.opt-picked { font-size: 11px; font-weight: 700; color: var(--on-maple); background: var(--maple); border-radius: 99px; padding: 0 7px; }
.opt-kinds { display: inline-flex; gap: 3px; }
.kd { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.kd-check, .opt-check .opt-kind { background: var(--maple); }
.kd-anim, .opt-anim .opt-kind { background: var(--d); }
.kd-graphic, .opt-graphic .opt-kind { background: var(--p); }
.kd-inter, .opt-inter .opt-kind { background: var(--s600); }
.opt-body { margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-sm); display: grid; gap: 8px; }
.opt-click { margin: 0; font-size: 13.5px; color: var(--muted); }
.opt-click span { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--d); margin-right: 8px; }
.opt-lost { margin: 0; font-size: 12.5px; color: var(--maple-2); }
.opt { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--paper); }
.opt.is-pick { border-color: var(--maple); box-shadow: inset 0 0 0 1px var(--maple); }
.opt.is-cut { opacity: .5; }
.opt-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.opt-kind { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #fff; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.opt-graphic .opt-kind { color: #3a2a00; }
.opt-name { font-weight: 700; font-size: 14.5px; }
.opt-text { margin: 2px 0 6px; font-size: 14px; color: var(--s800); }
:root[data-theme="dark"] .opt-text { color: var(--s700); }
.opt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.opt-try { border: 1px solid var(--d-line); background: var(--d-soft); color: var(--d-ink); border-radius: 99px; padding: 2px 12px; font-size: 12.5px; font-weight: 600; }
:root[data-theme="dark"] .opt-try { background: var(--surface); color: var(--d-line); }
.opt-marks { margin-left: auto; display: inline-flex; gap: 4px; }
.opt-marks button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 99px; padding: 1px 10px; font-size: 12px; }
.opt-marks button.is-on[data-om="pick"] { background: var(--maple); border-color: var(--maple); color: var(--on-maple); }
.opt-marks button.is-on[data-om="maybe"] { background: var(--butter); border-color: var(--butter); color: var(--ink); }
.opt-marks button.is-on[data-om="cut"] { background: var(--s600); border-color: var(--s600); color: #fff; }
.opt-stage { margin: 8px 0 4px; }
.opt-sketch { display: block; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; }
.opt-existing { margin: 0 0 14px; padding: 8px 12px; border-left: 3px solid var(--line-2); font-size: 13px; color: var(--muted); background: var(--s50); border-radius: 0 8px 8px 0; }
:root[data-theme="dark"] .opt-existing { background: var(--paper); }
.opt-existing span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }

/* storyboard player for suggested animations */
.sb-frame { position: relative; min-height: 150px; display: grid; place-items: center; padding: 30px 22px 18px; border: 2px solid var(--ink); border-radius: 14px 18px 12px 16px; background: #fffdf8; color: #1a1612; box-shadow: 3px 3px 0 var(--line-2); }
.sb-title { position: absolute; top: 8px; left: 12px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #2f6b9a; }
.sb-beat { margin: 0; font-size: 17px; line-height: 1.45; text-align: center; max-width: 560px; }
.sb-beat.in { animation: sbIn .5s var(--ease); }
@keyframes sbIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.sb-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.sb-bar button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 99px; padding: 1px 10px; font-size: 12px; }
.sb-dots { display: inline-flex; gap: 5px; flex: 1; justify-content: center; }
.sb-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: background .3s; }
.sb-dots i.on { background: var(--d); }

/* inline check engine */
.ck { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ck-prompt { margin: 0 0 10px; font-weight: 600; font-size: 15px; }
.ck-choices { display: grid; gap: 6px; }
.ck-choices button, .ck-go { text-align: left; border: 1px solid var(--line-2); background: var(--paper); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.ck-go { margin-top: 8px; text-align: center; font-weight: 600; }
.ck-choices button.is-right, .ck-item.is-right, .ck-step.is-right { border-color: var(--maple); box-shadow: inset 0 0 0 1px var(--maple); }
.ck-choices button.is-wrong, .ck-item.is-wrong, .ck-step.is-wrong { border-color: var(--s500); background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--line) 50%, transparent) 6px 7px); }
.ck-out p { margin: 8px 0 0; font-size: 14px; }
.ck-out .ok::before { content: "✓ "; color: var(--maple); font-weight: 700; }
.ck-out .no::before { content: "✕ "; font-weight: 700; }
.ck-why { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.ck-sort, .ck-order { display: grid; gap: 6px; }
.ck-item, .ck-step { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--paper); font-size: 14px; }
.ck-step { grid-template-columns: 1fr auto; align-items: center; }
.ck-bins { display: flex; flex-wrap: wrap; gap: 4px; }
.ck-bins button, .ck-mv button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 99px; padding: 1px 10px; font-size: 12px; }
.ck-bins button.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.opt-note { display: block; width: 100%; margin-top: 8px; min-height: 34px; resize: vertical; padding: 6px 10px; border: 1px dashed var(--line-2); border-radius: 8px; background: transparent; font: inherit; font-size: 13.5px; color: var(--ink); }
.opt-note:focus { outline: 2px solid var(--butter); border-style: solid; background: var(--paper); }
.opt-note.has-text { border-style: solid; border-color: var(--butter); background: var(--butter-2); }
:root[data-theme="dark"] .opt-note.has-text { background: var(--surface); }
.opt-note-spot { margin-top: 2px; }
.opt-noted { font-size: 11px; font-weight: 700; color: var(--p-ink); }
:root[data-theme="dark"] .opt-noted { color: var(--butter); }
.review .island-ideas.opt-merged { display: none; }
.opt-inlesson { margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--d-ink); background: var(--d-soft); border-radius: 99px; padding: 1px 8px; white-space: nowrap; }
:root[data-theme="dark"] .opt-inlesson { color: var(--d-line); background: var(--surface); }
.opt-was span, .opt-was-lab { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.opt-card-end .opt-toggle { border-color: var(--d-line); color: var(--d-ink); background: var(--d-soft); }
:root[data-theme="dark"] .opt-card-end .opt-toggle { background: var(--surface); color: var(--d-line); }
.graphic .graphic-title[contenteditable="true"], .graphic > p[contenteditable="true"] { outline: none; border-radius: 4px; cursor: text; }
.graphic .graphic-title[contenteditable="true"]:hover, .graphic > p[contenteditable="true"]:hover { background: color-mix(in srgb, var(--butter-2) 55%, transparent); }
.graphic .graphic-title[contenteditable="true"]:focus, .graphic > p[contenteditable="true"]:focus { background: var(--paper); box-shadow: 0 0 0 2px var(--butter-2); }
.review .graphic-kind { cursor: pointer; border-bottom: 1px dashed currentColor; }
.island-graphic .g-note { margin: -14px 0 18px; }

.vocab p > strong:first-child { display: block; margin-bottom: 1px; }

/* ---------- mini checks and real images ---------- */
.check { background: color-mix(in srgb, var(--butter-2) 55%, var(--surface)); border: 1.5px dashed var(--butter); }
.check .graphic-kind { color: var(--p-ink); }
:root[data-theme="dark"] .check { background: var(--surface); }
:root[data-theme="dark"] .check .graphic-kind { color: var(--butter); }
.photo { margin: 22px 0; }
.photo img { display: block; width: 100%; border-radius: var(--r); border: 1px solid var(--line); }
.photo figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ---------- keep, cut and comment on every element ---------- */
.el-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.slot { flex-wrap: wrap; }
.slot .el-bar { flex: 1 1 100%; }
.photo .el-bar { border-top: 0; padding-top: 0; margin-top: 10px; }
.el-bar .el-note { flex: 1 1 260px; margin-top: 0; background: var(--paper); }
.el-marks { display: inline-flex; gap: 4px; }
.el-marks button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 99px; padding: 2px 12px; font-size: 12.5px; }
.el-marks button.is-on[data-em="keep"] { background: var(--maple); border-color: var(--maple); color: var(--on-maple); }
.el-marks button.is-on[data-em="cut"] { background: var(--s600); border-color: var(--s600); color: #fff; text-decoration: line-through; }
.el-cutnote { display: none; font-size: 12px; color: var(--muted); }
.review .is-cut .el-cutnote { display: inline; }
.review .island.is-cut :is(figure, .slot) > :not(.el-bar), .review .island.is-kept :is(.graphic, .photo, .slot, .widget), aside.forest .el-bar { margin-bottom: 2px; }

/* ---------- only keeps ---------- */
.keeps-btn[aria-pressed="true"] { background: var(--maple-wash); border-color: var(--maple); color: var(--maple-2); }
.review.only-keeps :is(.island-graphic, .island-check, .island-image, .island-slot, .island-widget, aside.forest):not(.is-kept),
.review.only-keeps .opt-card,
.review.only-keeps .el-bar,
.review.only-keeps .island-ideas:not(.has-picks),
.review.only-keeps .island-ideas li:not(.is-picked),
.review.only-keeps .idea-marks { display: none !important; }
.review.only-keeps .island-ideas.opt-merged.has-picks { display: block; }
.review.only-keeps .island.is-kept :is(.graphic, .photo, .slot, .widget), .review.only-keeps aside.forest.is-kept { box-shadow: none; }

/* ---------- idea comments and new ideas; the middle mark ---------- */
.ideas li .idea-note { margin-top: 6px; background: var(--surface); }
.idea-add { margin: 4px 18px 14px 36px; }
.opt-card .idea-add { margin: 10px 0 0; }
.idea-add-row { display: flex; gap: 8px; align-items: flex-start; }
.idea-add-text { flex: 1; margin-top: 0; background: var(--surface); }
.idea-add-btn { border: 1px solid var(--d-line); background: var(--surface); color: var(--d-ink); border-radius: 99px; padding: 5px 14px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.idea-new-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.idea-new-list li { margin: 0; padding: 6px 10px; border: 1px dashed var(--d-line); border-radius: 8px; background: var(--surface); }
.idea-new-list button { border: 0; background: none; color: var(--muted); font-size: 16px; padding: 0 4px; float: right; }
.idea-new-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--d-ink); }
.el-marks button.is-on[data-em="maybe"] { background: var(--butter); border-color: var(--butter); color: var(--ink); }
.review .island.is-maybe :is(.graphic, .photo, .slot, .widget), .review aside.forest.is-maybe { box-shadow: 0 0 0 2px var(--butter); }
.review.only-keeps .idea-add, .review.only-keeps .idea-note { display: none !important; }

/* ---------- built elements: the live piece in place of its brief ---------- */
.built { margin: 26px 0 22px; }
.built-frame iframe { display: block; width: 100%; height: 360px; border: 0; background: transparent; transition: height .25s var(--ease); }
.built-cap { margin: 8px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.built-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 8px; }
.built-head .graphic-kind { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--maple); }
.built-head .graphic-title { font-weight: 700; font-size: 15px; }
.built-tag { font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--s100); border-radius: 99px; padding: 1px 8px; }
.built-open { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.built-brief { margin-top: 8px; font-size: 13.5px; color: var(--s700); }
.built-brief summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.built-brief p { margin: 6px 0 0; }
.review .built { padding: 12px 14px 14px; border: 1px dashed var(--line-2); border-radius: var(--r); }

/* ---------- the break into the tool ---------- */
.break { margin: 72px 0 36px; }
.break::before { content: ""; display: block; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--maple) 0 18%, var(--ink) 18% 100%); }
.break-label { display: flex; align-items: baseline; gap: 14px; margin: 22px 0 0; font-size: clamp(30px, 5vw, 44px); line-height: 1.05; font-weight: 800; letter-spacing: -.028em; color: var(--ink); }
.break-prompt { font-family: var(--mono); font-weight: 700; font-size: .72em; color: var(--maple); }
.break-cursor { display: inline-block; width: .5em; height: .09em; margin-left: .08em; background: var(--maple); align-self: baseline; animation: breakBlink 1.1s steps(1) infinite; }
@keyframes breakBlink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .break-cursor { animation: none; } }

/* ---------- comments pinned inside built pieces and widgets ---------- */
.built-frame, .wframe { position: relative; }
.pinlayer { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.pin { position: absolute; pointer-events: auto; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: var(--maple); color: #fff; font: 700 12px/1 var(--font); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(26,22,18,.35); cursor: pointer; }
.pin:hover { transform: translate(-50%, -50%) scale(1.12); }
.pin-catch { position: absolute; inset: 0; z-index: 4; cursor: crosshair; background: color-mix(in srgb, var(--maple) 6%, transparent); outline: 2px dashed var(--maple); outline-offset: -2px; border-radius: 10px; display: flex; align-items: flex-start; justify-content: center; }
.pin-catch span { position: sticky; top: 74px; margin-top: 10px; padding: 4px 12px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow-md); }
.el-pin { border: 1px solid var(--maple); background: var(--maple-wash); color: var(--maple-2); border-radius: 99px; padding: 2px 12px; font-size: 12.5px; font-weight: 600; }
.pop-quote { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); font-style: italic; }

/* one big comment field per built piece and widget */
.el-bar-big { flex-direction: row; align-items: center; }
.el-bar-big .el-big-label { flex: 1 1 100%; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--maple); }
.el-bar-big .el-note { flex: 1 1 100%; min-height: 96px; font-size: 14.5px; line-height: 1.5; padding: 10px 12px; border-style: solid; border-color: var(--line-2); background: var(--paper); }
.el-bar-big .el-note:focus { border-color: var(--maple); }
.el-bar-big .el-note.has-text { border-color: var(--butter); background: var(--butter-2); }
.el-bar-big .el-pin { margin-left: auto; border: 0; background: none; color: var(--muted); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; padding: 2px 4px; }

/* interactive pieces sit on their own tinted card, apart from the reading text */
.built-check, .built-animation { padding: 6px 10px 10px; border-radius: var(--r-lg); background: var(--s100); border: 1px solid var(--line); }
:root[data-theme="dark"] .built-check, :root[data-theme="dark"] .built-animation { background: var(--surface); }
.review .built-check, .review .built-animation { padding: 12px 14px 14px; border: 1px dashed var(--line-2); }
.wframe { background: var(--s100); }
:root[data-theme="dark"] .wframe { background: var(--surface); }
.built-frame iframe, .wframe iframe { overflow: hidden; }

.idea-carl { display: inline-block; margin-right: 8px; padding: 0 7px; border-radius: 99px; background: var(--maple); color: var(--on-maple); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: 2px; }

/* worked-example clips */
figure.clip { margin: 22px 0; }
figure.clip video { width: 100%; border-radius: 12px; border: 1px solid var(--line, #e5e0d8); background: #141414; display: block; }
figure.clip figcaption { font-size: 14px; color: var(--muted, #6b6359); margin-top: 8px; }

figure.meme { max-width: 520px; margin: 22px auto; }
figure.meme img { width: 100%; border-radius: 10px; display: block; }

.hub-link { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); font-size: 14px; text-decoration: none; white-space: nowrap; }
@media (max-width: 640px) { .hub-link { display: none; } }

/* pieces students never see (unbuilt briefs, idea lists, interactives not on the live site): hidden unless asked for */
:root:not(.show-unbuilt) .is-unbuilt { display: none !important; }
.show-unbuilt .is-unbuilt { outline: 2px dashed var(--s300); outline-offset: 4px; border-radius: var(--r); position: relative; }
.show-unbuilt .is-unbuilt::before { content: 'Not built: students don\'t see this'; display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--s500); margin: 0 0 6px; }
.unbuilt-btn[aria-pressed="true"] { background: var(--butter-2); border-color: var(--butter); color: var(--ink); }

/* published (student) pages: no review tools */
body.published .review-only, body.published .savebar { display: none !important; }
.top-link { font-size: 14px; font-weight: 600; color: var(--maple, #e63f02); text-decoration: none; margin-right: 12px; white-space: nowrap; }
.top-link:hover { text-decoration: underline; }
.agent-note { margin: 18px 0 28px; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--maple, #e63f02) 7%, transparent); font-size: 14px; }
.agent-note p { margin: 0; }
.agent-note-title { font-weight: 700; font-size: 15px; }
.agent-note ul { margin: 6px 0 0; padding-left: 20px; }
.agent-note li { margin: 8px 0 0; }
.agent-note .codeblock { margin: 6px 0 2px; }
.side-start .side-mod-title span { margin-bottom: 2px; }
.share-note { max-width: 740px; margin: 48px auto 0; padding: 14px 18px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--maple, #e63f02) 7%, transparent); font-size: 16px; }
.share-note p { margin: 0; }
.share-note + .fb { margin-top: 20px; }
.btn-start { display: inline-block; margin-top: 8px; padding: 10px 18px; border-radius: 999px; background: var(--maple, #e63f02); color: #fff !important; font-weight: 600; text-decoration: none; }
.island { all: unset; display: block; }
body.published .codeblock pre { white-space: pre-wrap; word-break: break-word; padding-right: 72px; }

/* feedback box */
.fb { max-width: 740px; margin: 56px auto 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.fb h2 { font-size: 20px; margin: 0 0 4px; }
.fb p { margin: 0 0 12px; font-size: 15px; color: var(--muted); }
.fb-text { display: block; width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); font: inherit; font-size: 15px; color: var(--ink); resize: vertical; }
.fb-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.fb-name { flex: 1 1 180px; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); font: inherit; font-size: 14.5px; color: var(--ink); }
.fb-send { height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--maple, #e63f02); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.fb-send:disabled { opacity: .6; }
.fb-msg { font-size: 14px; color: var(--muted); }

figure.intro-video { margin: 8px 0 34px; }
figure.intro-video video { aspect-ratio: 16 / 9; box-shadow: 0 18px 44px rgba(17,24,39,0.14); }
