/* Palette from slides/build/DESIGN.md ("the tower"). clay_text A8492A is used for all clay-coloured text. */
:root {
  --ink: #1E2A36; --ink2: #2B3A4A; --ink3: #3D4E60;
  --clay: #C8603D; --clay-text: #A8492A; --clay-light: #E8936F; --clay-soft: #F7E6DF;
  --muted: #5F6B7A; --line: #D5DBE2; --outline: #8794A5;
  --panel: #F1F3F6; --panel2: #E6EBF1;
  --code-bg: #18212B; --code-text: #E6EAF0; --code-comment: #8B98A9;

  --bg: #FFFFFF; --bg-alt: #F6F7F9; --surface: #FFFFFF; --text: var(--ink); --text-2: var(--muted);
  --accent-text: var(--clay-text); --accent-fill: var(--clay); --border: var(--line);
  --slab: var(--ink); --slab-text: #FFFFFF; --chip: var(--panel); --chip-text: var(--ink);
  --focus: #1F5FBF; --warn-bg: var(--clay-soft);
  --shadow: 0 1px 2px rgba(30,42,54,.06), 0 4px 16px rgba(30,42,54,.06);
  --radius: 12px;
  --font: "Heebo", "Assistant", Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", "Liberation Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141C25; --bg-alt: #19232E; --surface: #1E2A36; --text: #E6EAF0; --text-2: #A9B4C2;
    --accent-text: var(--clay-light); --border: #34465A;
    --slab: #3D4E60; --slab-text: #FFFFFF; --chip: #2B3A4A; --chip-text: #E6EAF0;
    --focus: #8DB8FF; --warn-bg: #3A2A24;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 1.0625rem; line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { background: var(--chip); color: var(--accent-text); padding: .08em .4em; border-radius: 5px; unicode-bidi: isolate; white-space: nowrap; }
kbd { border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0 .35em; background: var(--surface); unicode-bidi: isolate; direction: ltr; display: inline-block; }
bdi.dom, .dom { font-family: var(--mono); font-size: .9em; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
section { padding: 56px 0; scroll-margin-top: 64px; }
section:nth-of-type(even) { background: var(--bg-alt); }
.kicker { color: var(--accent-text); font-weight: 700; font-size: .95rem; margin-bottom: .35em; letter-spacing: .01em; }
.lead { font-size: 1.12rem; color: var(--text); max-width: 72ch; }
.muted, .note { color: var(--text-2); }
.note { font-size: .95rem; }

.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }

/* header */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.head-row { display: flex; align-items: center; gap: 16px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); text-decoration: none; white-space: nowrap; font-size: 1.05rem; }
.brand-mark { display: inline-flex; flex-direction: column-reverse; gap: 2px; }
.brand-mark i { display: block; width: 18px; height: 4px; background: var(--slab); border-radius: 1px; }
.brand-mark i.b-now { background: var(--clay); }
.site-head nav { flex: 1; min-width: 0; }
.nav { list-style: none; margin: 0; padding: 4px 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
.nav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; white-space: nowrap; font-size: .95rem; font-weight: 500; }
.nav a:hover { background: var(--chip); }
@media (max-width: 760px) { .head-row { flex-wrap: wrap; gap: 0; padding-top: 6px; } .site-head nav { flex-basis: 100%; } }

/* hero */
.hero { padding: 48px 0 56px; background: var(--bg); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.25fr 1fr; } }
h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 800; letter-spacing: -.01em; margin-bottom: .35em; }
.h1-sub { display: block; font-size: .5em; font-weight: 500; color: var(--text-2); margin-top: .3em; }
.stats { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-wrap: wrap; gap: 12px; }
.stats li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px; min-width: 120px; box-shadow: var(--shadow); }
.stats b { display: block; font-size: 2rem; line-height: 1.1; color: var(--accent-text); font-weight: 800; }
.stats span { color: var(--text-2); font-size: .95rem; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 10px; border: 1.5px solid var(--text); color: var(--text); text-decoration: none; font-weight: 700; }
.btn:hover { background: var(--chip); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink2); }
@media (prefers-color-scheme: dark) { .btn-primary { background: var(--clay-light); border-color: var(--clay-light); color: #1E2A36; } .btn-primary:hover { background: #F0A887; } }

/* hero tower */
.tower { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; }
.slab { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; max-width: 380px; padding: 16px 20px; background: var(--slab); color: var(--slab-text); border-radius: 6px; text-decoration: none; font-weight: 700; transition: transform .15s; }
.slab:nth-child(1) { max-width: 300px; } .slab:nth-child(2) { max-width: 330px; } .slab:nth-child(3) { max-width: 355px; }
.slab:hover { transform: translateY(-2px); }
.slab-now { background: var(--clay); }
.slab-n { font-size: .9rem; opacity: .92; font-weight: 500; }
.slab-name { font-size: 1.15rem; }
.ground { width: 100%; max-width: 440px; height: 3px; background: var(--text); border-radius: 2px; margin-top: 4px; }
.tower-cap { color: var(--text-2); font-size: .95rem; margin: 8px 0 0; text-align: center; }

/* tower map */
.floor-map { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.floor-row { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
@media (min-width: 860px) { .floor-row { grid-template-columns: minmax(280px, 1fr) 1.6fr; } }
.floor-slab { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--slab); color: var(--slab-text); text-decoration: none; }
.floor-row:last-child .floor-slab, .basement .floor-slab { background: transparent; color: var(--text); border: 0; }
.floor-map > .floor-row:nth-child(4) .floor-slab { background: var(--clay); }
.floor-slab:hover .fs-go { transform: translateX(-4px); }
.fs-n { font-size: 2rem; font-weight: 800; line-height: 1; min-width: 1.2em; text-align: center; }
.fs-body { display: flex; flex-direction: column; flex: 1; }
.fs-title { font-weight: 800; font-size: 1.15rem; }
.fs-short { font-size: .95rem; opacity: .92; }
.fs-go { font-size: 1.4rem; transition: transform .15s; }
.floor-detail { padding: 14px 18px; }
.floor-detail p { margin-bottom: .6em; }
.basement { background: transparent; border-style: dashed; box-shadow: none; }
.basement .fs-short { color: var(--text-2); opacity: 1; }
@media (min-width: 860px) { .basement { grid-template-columns: 1fr; } }

.chips { list-style: none; padding: 0; margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { background: var(--chip); color: var(--chip-text); border: 1px solid var(--border); border-radius: 999px; padding: 2px 12px; font-size: .92rem; }

/* floor sections */
.floor-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.floor-head h2 { margin: 0; }
.mini { display: flex; flex-direction: column; gap: 3px; flex: none; }
.mini span { display: block; width: 34px; height: 9px; border-radius: 2px; }
.mi-done { background: var(--slab); }
.mi-now { background: var(--clay); }
.mi-next { border: 1.25px solid var(--outline); }
.links-h { margin-top: 32px; font-size: 1.25rem; padding-inline-start: 12px; border-inline-start: 4px solid var(--clay); }

.cards { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.lcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative; }
.lcard:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.lcard:focus-within a:focus-visible { outline: none; }
.lcard-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.lcard h4 { font-size: 1.08rem; margin: 0 0 .35em; }
.lcard h4 a { color: var(--text); text-decoration: none; }
.lcard h4 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.lcard:hover { border-color: var(--outline); }
.lcard:hover h4 a { color: var(--accent-text); text-decoration: underline; }
.lcard p { color: var(--text); font-size: .98rem; margin-bottom: .8em; flex: 1; }
.lmeta { margin: 0; font-size: .9rem; border-top: 1px solid var(--border); padding-top: 8px; display: grid; gap: 2px; }
.lmeta div { display: flex; gap: 6px; flex-wrap: wrap; }
.lmeta dt { color: var(--text-2); font-weight: 500; }
.lmeta dt::after { content: ":"; }
.lmeta dd { margin: 0; font-weight: 500; }
.lmeta .dom { color: var(--accent-text); }
.tag { flex: none; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 1px 9px; border: 1px solid currentColor; white-space: nowrap; }
.t-off { color: var(--text-2); }
.t-com { color: var(--accent-text); }
.t-login { color: var(--text-2); border-style: dashed; }
.t-ext { color: var(--text-2); }

/* checklist + code */
.checklist { counter-reset: step; list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.checklist > li { counter-increment: step; position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px 12px; padding-inline-start: 64px; box-shadow: var(--shadow); min-width: 0; }
.checklist > li::before { content: counter(step); position: absolute; inset-inline-start: 16px; top: 14px; width: 34px; height: 34px; border-radius: 6px; background: var(--clay); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 1.05rem; }
.checklist h3 { margin-bottom: .3em; }
@media (max-width: 480px) { .checklist > li { padding-inline-start: 18px; padding-top: 56px; } }
.code { margin: 10px 0 12px; border-radius: 10px; overflow: hidden; background: var(--code-bg); border: 1px solid #2B3A4A; max-width: 100%; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: #222D39; color: var(--code-comment); font-size: .85rem; }
.copy { font: inherit; font-weight: 700; color: #fff; background: transparent; border: 1px solid #5F6B7A; border-radius: 6px; padding: 3px 12px; cursor: pointer; min-height: 30px; }
.copy:hover { background: #2B3A4A; }
.copy.ok { border-color: var(--clay-light); color: var(--clay-light); }
.code pre { margin: 0; padding: 12px 14px; overflow-x: auto; text-align: left; }
.code code { color: var(--code-text); font-size: .92rem; line-height: 1.6; white-space: pre; }
details.alt { margin-top: 6px; }
details.alt > summary, .faq > summary { cursor: pointer; font-weight: 700; color: var(--accent-text); }
.trouble { margin-top: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; min-width: 0; }
.table-wrap { overflow-x: auto; margin-bottom: 16px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; min-width: 560px; }
th, td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--ink); color: #fff; font-weight: 700; }
td code { white-space: normal !important; word-break: break-word; }

/* issues */
.issues { display: grid; gap: 14px; margin-top: 20px; }
@media (min-width: 860px) { .issues { grid-template-columns: repeat(2, 1fr); } }
.issue { background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--clay) 35%, transparent); border-inline-start: 5px solid var(--clay); border-radius: var(--radius); padding: 16px 18px; }
.issue ul { padding-inline-start: 1.2em; margin: 0; }
.issue li { margin-bottom: .35em; }
.issue .note { margin: .5em 0 0; }

/* mockups */
.mocks { display: grid; gap: 22px; margin-top: 16px; }
@media (min-width: 1000px) { .mocks { grid-template-columns: repeat(2, 1fr); } }
figure { margin: 0; min-width: 0; }
figcaption { font-size: .95rem; color: var(--text-2); margin-top: 10px; }
figcaption strong { color: var(--text); }
.ill { display: inline-block; background: var(--clay); color: #fff; font-weight: 800; font-size: .8rem; border-radius: 5px; padding: 1px 8px; margin-inline-end: 6px; }
.win { border-radius: 10px; overflow: hidden; border: 1px solid #2B3A4A; box-shadow: var(--shadow); background: #0F161E; }
.win-bar { display: flex; align-items: center; gap: 10px; background: #222D39; color: #C9D1DB; padding: 7px 12px; font-size: .85rem; direction: ltr; }
.win-title { flex: 1; text-align: center; margin-inline-end: 42px; }
.dots { display: flex; gap: 6px; } .dots i { width: 10px; height: 10px; border-radius: 50%; background: #4A5A6C; display: block; }
.term { font-family: var(--mono); font-size: .84rem; line-height: 1.55; color: #E6EAF0; padding: 14px 16px; text-align: left; overflow-x: auto; min-height: 260px; }
.term > div, .permbox > div, .planbox > div { white-space: pre-wrap; word-break: break-word; }
.term .gap { height: .7em; }
.ps { color: var(--clay-light); }
.dim { color: #8B98A9; }
.say { color: #C9D1DB; }
.bullet { color: var(--clay-light); }
.inputbox { border: 1px solid #5F6B7A; border-radius: 6px; padding: 4px 10px; margin-top: 4px; }
.caret { display: inline-block; width: .55em; height: 1.05em; background: #E6EAF0; vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
.status { margin-top: 6px; font-size: .8rem; }
.mode-manual { color: #E6EAF0; } .mode-plan { color: #8FC1E8; }
.permbox, .planbox { border: 1px solid var(--clay-light); border-radius: 6px; padding: 10px 12px; }
.planbox { border-color: #8FC1E8; }
.perm-h { font-weight: 700; color: var(--clay-light); }
.planbox .perm-h { color: #8FC1E8; }
.perm-cmd { color: #FFFFFF; padding-left: 2ch; }
.opt { color: #C9D1DB; } .opt.sel { color: #FFFFFF; font-weight: 700; }

.desk { display: grid; grid-template-columns: 130px 1fr; min-height: 300px; background: #F7F6F3; color: #1E2A36; font-size: .85rem; text-align: left; }
.desk-side { background: #EDEBE6; padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid #D9D5CC; }
.ds-item { padding: 4px 8px; border-radius: 6px; color: #3D4E60; }
.ds-on { background: #FFFFFF; font-weight: 700; color: #1E2A36; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ds-sep { height: 1px; background: #D9D5CC; margin: 6px 0; }
.ds-new { padding: 4px 8px; font-weight: 700; color: #A8492A; }
.ds-sess { padding: 3px 8px; color: #5F6B7A; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desk-main { padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.msg-user { align-self: flex-end; background: #E6EBF1; border-radius: 12px; padding: 6px 12px; max-width: 85%; }
.msg-claude { max-width: 92%; }
.changes { display: inline-flex; gap: 8px; align-self: flex-start; border: 1px solid #D5DBE2; background: #fff; border-radius: 8px; padding: 4px 10px; font-weight: 500; }
.plus { color: #1D7A45; font-family: var(--mono); } .minus { color: #A8492A; font-family: var(--mono); }
.prompt-box { margin-top: auto; border: 1px solid #C9CFD8; background: #fff; border-radius: 12px; padding: 12px; display: flex; justify-content: space-between; align-items: center; min-height: 52px; }
.ph { color: #8794A5; }
.ring { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(#C8603D 0 35%, #E6EBF1 35% 100%); display: inline-block; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { border: 1px solid #D5DBE2; background: #fff; border-radius: 999px; padding: 1px 10px; font-size: .78rem; color: #3D4E60; }
.pill-mode { border-color: #C8603D; color: #A8492A; font-weight: 700; }
@media (max-width: 480px) { .desk { grid-template-columns: 92px 1fr; } .term { font-size: .76rem; } }

.shots { display: grid; gap: 22px; margin-top: 16px; }
@media (min-width: 760px) { .shots { grid-template-columns: repeat(2, 1fr); } }
.shot-img { display: block; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.src { display: block; margin-top: 4px; font-size: .88rem; }

/* glossary + faq */
.glossary { display: grid; gap: 10px; margin: 20px 0 0; }
@media (min-width: 700px) { .glossary { grid-template-columns: repeat(2, 1fr); } }
.g-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.g-item dt { font-weight: 700; }
.g-en { font-weight: 500; color: var(--accent-text); font-size: .92rem; margin-inline-start: 6px; unicode-bidi: isolate; }
.g-item dd { margin: 2px 0 0; color: var(--text); font-size: .97rem; }
.faqs { display: grid; gap: 10px; margin-top: 20px; max-width: 860px; }
.faq { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; }
.faq > summary { color: var(--text); font-size: 1.05rem; }
.faq[open] > summary { color: var(--accent-text); margin-bottom: 6px; }
.faq p { margin: 0; }

/* footer */
.site-foot { background: var(--ink); color: #E6EAF0; padding: 36px 0; }
.site-foot a { color: var(--clay-light); }
.site-foot .muted { color: #A9B4C2; font-size: .92rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: flex-end; }
.foot-row > div { max-width: 760px; }
.to-top { font-weight: 700; white-space: nowrap; }
.back-float { position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 40; background: var(--ink); color: #fff; border-radius: 999px; padding: 10px 16px; text-decoration: none; font-weight: 700; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s; }
.back-float.show { opacity: 1; pointer-events: auto; }
@media (prefers-color-scheme: dark) { .back-float { background: var(--clay-light); color: #1E2A36; } }
@media print { .site-head, .back-float, .copy { display: none; } section { padding: 20px 0; } }
.term .permbox, .term .planbox { white-space: normal; }
.keys { unicode-bidi: isolate; white-space: nowrap; }
.mocks, .shots { align-items: start; }
/* AA: white text on clay uses the darker clay_text fill (5.75:1); C8603D stays for non-text marks */
.slab-now, .floor-map > .floor-row:nth-child(4) .floor-slab, .ill, .checklist > li::before { background: var(--clay-text); }

/* ---- round 1 review fixes ---- */
/* brand mark: a small tower (narrow top, wide base), so it doesn't read as a menu button */
.brand-mark { align-items: center; }
.brand-mark i:nth-child(1) { width: 18px; } .brand-mark i:nth-child(2) { width: 15px; }
.brand-mark i:nth-child(3) { width: 12px; } .brand-mark i:nth-child(4) { width: 9px; }
/* mobile nav: fade + arrow at the scrolling edge (RTL: content continues to the left) */
.nav-wrap { position: relative; }
@media (max-width: 760px) {
  .nav { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 44px); mask-image: linear-gradient(to left, transparent 0, #000 44px); padding-inline-end: 36px; }
  .nav-wrap.at-end .nav { -webkit-mask-image: none; mask-image: none; }
  .nav-hint { position: absolute; left: 0; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--accent-text); pointer-events: none; font-size: 1.1rem; }
  .nav-wrap.at-end .nav-hint { display: none; }
}
@media (min-width: 761px) { .nav-hint { display: none; } }
/* code: wrap long commands inside the block instead of cutting them off */
.code pre { white-space: pre-wrap; overflow-x: visible; }
.code code { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
/* error table becomes cards on narrow screens */
@media (max-width: 640px) {
  .table-wrap { overflow: visible; }
  table { min-width: 0; }
  table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table, tbody, tr, td { display: block; width: 100%; }
  tr { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; background: var(--bg); }
  td { border: 0; padding: 3px 0; }
  td::before { content: attr(data-label) ": "; display: block; font-weight: 700; color: var(--text-2); font-size: .85rem; }
}
/* link priority + language */
.lcard h4 { margin-bottom: .4em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: .6em; }
.t-must { background: var(--clay-text); border-color: var(--clay-text); color: #fff; }
.t-extra { color: var(--text-2); border-style: dotted; }
.t-lang { color: var(--text-2); }
.tip .tag { vertical-align: 1px; }
.lcard-must { border-inline-start: 4px solid var(--clay); }
.grp-h { font-size: 1.05rem; margin: 18px 0 0; color: var(--text); }
details.more-links { margin-top: 18px; }
details.more-links > summary { cursor: pointer; font-weight: 700; color: var(--accent-text); padding: 10px 14px; border: 1px dashed var(--outline); border-radius: 10px; background: var(--surface); }
details.more-links[open] > summary { margin-bottom: 4px; }
.tip { background: var(--surface); border: 1px solid var(--border); border-inline-start: 4px solid var(--clay); border-radius: 10px; padding: 12px 16px; max-width: 80ch; }
/* mockup annotation (our Hebrew label, not part of the UI) */
.anno { font-family: var(--font); background: var(--clay-text); color: #fff; border-radius: 5px; padding: 2px 8px; font-size: .8rem; display: inline-block; margin-bottom: 6px; text-align: right; white-space: normal !important; }
.reply { color: #E6EAF0; }
.mode-auto { color: var(--clay-light); }
/* screenshots: natural-size crops, tap for the full page */
.shot-img { position: relative; width: fit-content; max-width: 100%; }
.zoom { position: absolute; bottom: 6px; left: 6px; background: rgba(30,42,54,.88); color: #fff; font-size: .78rem; font-weight: 700; border-radius: 6px; padding: 2px 8px; }
.shot-img:focus-visible .zoom, .shot-img:hover .zoom { background: var(--clay-text); }
@media (max-width: 480px) { .code code { font-size: .8rem; } .code pre { padding: 10px 12px; } }
.code code { overflow-wrap: break-word; }
.zoom { position: static; display: block; border-radius: 0; text-align: center; padding: 4px 8px; }
.shot-img { width: auto; }
.shot-img img { margin-inline: auto; }

/* ---- part B ---- */
.prep { background: var(--bg-alt); border-top: 4px solid var(--clay); }
.prep-pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin: 16px 0; }
.prep-pre ul { margin: 0; padding-inline-start: 1.2em; }
.note-box { background: var(--warn-bg); border-inline-start: 4px solid var(--clay); border-radius: 8px; padding: 10px 14px; }
.prep-progress { display: flex; align-items: center; gap: 12px; margin: 16px 0 8px; font-weight: 700; }
.pp-bar { flex: 1; max-width: 320px; height: 10px; border-radius: 99px; background: var(--chip); border: 1px solid var(--border); overflow: hidden; }
.pp-fill { display: block; height: 100%; width: 0; background: var(--clay-text); transition: width .2s; }
.prep-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.prep-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); min-width: 0; }
.prep-step.done { border-color: color-mix(in srgb, var(--clay) 55%, var(--border)); }
.prep-step.done .prep-body { opacity: .75; }
.prep-check { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 800; font-size: 1.15rem; }
.prep-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pc-box { flex: none; width: 28px; height: 28px; border-radius: 6px; border: 2px solid var(--outline); background: var(--bg); display: grid; place-items: center; }
.prep-check input:checked + .pc-box { background: var(--clay-text); border-color: var(--clay-text); }
.prep-check input:checked + .pc-box::after { content: "✓"; color: #fff; font-size: 1.05rem; }
.prep-check input:focus-visible + .pc-box { outline: 3px solid var(--focus); outline-offset: 2px; }
.pc-id { color: var(--accent-text); font-weight: 800; margin-inline-end: 4px; }
.prep-body { margin-top: 8px; }
.prep-body ol, .prep-body ul, .ex-body ol, .ex-body ul, .hw ul, .capstone ul, .capstone ol { padding-inline-start: 1.4em; }
.prep-body li, .ex-body li { margin-bottom: .35em; }
.toolbox-box { margin-top: 18px; background: var(--surface); border: 1px solid var(--border); border-inline-start: 5px solid var(--clay); border-radius: var(--radius); padding: 12px 16px; }
.toolbox-box h3 { font-size: 1.05rem; margin-bottom: .3em; }
.toolbox-box p { margin-bottom: .3em; }
.exs { display: grid; gap: 8px; margin-top: 10px; }
details.ex { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; min-width: 0; }
details.ex > summary { cursor: pointer; font-weight: 700; }
details.ex[open] > summary { margin-bottom: 8px; }
.ex-body { min-width: 0; }
.hw { margin-top: 24px; background: var(--surface); border: 1px dashed var(--outline); border-radius: var(--radius); padding: 14px 18px; }
.road { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.road-step { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.road-step:last-child .road-n { background: var(--clay-text); }
.road-n { flex: none; width: 40px; height: 40px; border-radius: 6px; background: var(--slab); color: #fff; font-weight: 800; font-size: 1.3rem; display: grid; place-items: center; }
.road-step h3 { font-size: 1.1rem; margin-bottom: .2em; }
.road-step p { margin-bottom: .2em; }
.capstone { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-top: 16px; }
.capstone h3 { margin-top: 1em; } .capstone h3:first-child { margin-top: 0; }
.cs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.cs-grid { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 900px) { .cs-grid { grid-template-columns: repeat(2, 1fr); } .cs-wide { grid-column: 1 / -1; } }
.cs-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; min-width: 0; break-inside: avoid; }
.cs-block h3 { font-size: 1.05rem; margin-bottom: .5em; }
table.cs { min-width: 0; }
table.cs td:first-child { white-space: nowrap; }
.cs-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.cs-list li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cs-list span { color: var(--text-2); font-size: .95rem; }
.cs-ol { margin: 0 0 .5em; padding-inline-start: 1.4em; }
.fcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.fcard h4 { font-family: var(--mono); font-size: 1rem; margin-bottom: .3em; }
.fcard p { flex: 1; font-size: .97rem; }
.fbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.btn-small { padding: 6px 12px; font-size: .92rem; border-radius: 8px; }
.btn-ghost { border-color: var(--border); }
button.btn { font: inherit; font-weight: 700; background: var(--surface); cursor: pointer; }
@media (max-width: 640px) { table.cs td:first-child { white-space: normal; } }

@media print {
  body.print-cheat .site-head, body.print-cheat .site-foot, body.print-cheat .skip, body.print-cheat .back-float { display: none !important; }
  body.print-cheat main > *:not(#cheat) { display: none !important; }
  body.print-cheat #cheat { padding: 0; background: #fff; }
  body.print-cheat .print-cheat { display: none; }
  body.print-cheat * { box-shadow: none !important; color: #000 !important; background: #fff !important; }
  body.print-cheat .cs-grid { grid-template-columns: 1fr 1fr; gap: 8px; font-size: 10pt; }
  body.print-cheat .cs-block { border: 1px solid #999; padding: 6px 8px; }
  body.print-cheat table.cs td, body.print-cheat table.cs th { padding: 2px 4px; }
  body.print-cheat .cs-wide { grid-column: 1 / -1; }
  details { display: block; }
}
:not(pre) > code { white-space: normal; overflow-wrap: anywhere; }
table.cs td:first-child code { white-space: nowrap; }
@media (max-width: 640px) { table.cs td:first-child code { white-space: normal; } }
/* code blocks that contain Hebrew lines: each line takes its own direction */
.code-he code { unicode-bidi: plaintext; }
.code-he pre { text-align: start; }
.code-he pre, .code-he code { display: block; }
@media print {
  body.print-cheat { font-size: 9pt; line-height: 1.35; }
  body.print-cheat .cs-grid { display: block; column-count: 2; column-gap: 8px; }
  body.print-cheat .cs-block { display: inline-block; width: 100%; margin: 0 0 6px; }
  body.print-cheat .cs-block h3 { font-size: 10pt; margin: 0 0 3px; }
  body.print-cheat h2 { font-size: 15pt; margin: 0; }
  body.print-cheat .lead { font-size: 9pt; margin: 2px 0 6px; }
  body.print-cheat table.cs th { color: #000 !important; border-bottom: 1.5px solid #000; }
  body.print-cheat code, body.print-cheat kbd { font-size: 8.5pt; }
  body.print-cheat table, body.print-cheat tr, body.print-cheat td { display: table-row; }
  body.print-cheat table { display: table; } body.print-cheat td { display: table-cell; }
  body.print-cheat td::before { content: none; }
  body.print-cheat thead { position: static; width: auto; height: auto; clip: auto; display: table-header-group; }
  @page { size: A4; margin: 10mm; }
}
/* round 2: inline code = commands stay whole and LTR; Hebrew prompts may wrap; long commands wrap at spaces only */
:not(pre) > code { direction: ltr; unicode-bidi: isolate; white-space: nowrap; overflow-wrap: normal; }
:not(pre) > code.he { direction: rtl; white-space: normal; }
:not(pre) > code.long { white-space: normal; word-break: keep-all; overflow-wrap: normal; }
.warn { background: var(--warn-bg); border-inline-start: 4px solid var(--clay); border-radius: 8px; padding: 8px 12px; font-size: .95rem; }
/* cheatsheet stays a dense two-column table on phones */
@media (max-width: 640px) {
  table.cs thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: table-header-group; }
  table.cs { display: table; width: 100%; } table.cs tbody { display: table-row-group; }
  table.cs tr { display: table-row; border: 0; padding: 0; margin: 0; background: none; }
  table.cs td { display: table-cell; width: auto; padding: 5px 6px; border-bottom: 1px solid var(--border); font-size: .92rem; }
  table.cs td::before { content: none; }
  table.cs th { padding: 6px; font-size: .9rem; }
}
:not(pre) > code.long { overflow-wrap: break-word; word-break: normal; max-width: 100%; }
code.long .nw { white-space: nowrap; }
@media (max-width: 640px) { table.cs td:first-child code { white-space: nowrap; } }
