/* Layout: a bright study desk. Sticky glass top bar, colour-coded units, a reading column for notes, a split stimulus/answer desk for exams. */
:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --sunk: #efece4;
  --ink: #1b2331;
  --muted: #686d78;
  --line: #e5e0d5;
  --accent: #1f6f8b;
  --accent-ink: #ffffff;
  --accent-soft: #ddedf2;
  --crane: #d9412f;
  --hl: #7c5cf0;
  --hl-soft: #eee8fe;
  --good: #16a35a;
  --warn: #e3860f;
  --bad: #e5484d;
  --c1: #14b8a6; --c2: #ff7a59; --c3: #5b8def; --c4: #f5b53d; --c5: #a78bfa; --c6: #34c77b;
  --u1: #14b8a6; --u2: #ff7a59; --u3: #5b8def; --u4: #f0a91f; --u5: #2fbf71; --u6: #8b6cf6;
  --shadow: 0 1px 2px rgba(23, 32, 51, .04), 0 10px 28px -14px rgba(23, 32, 51, .16);
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 14px; --r-s: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141b; --surface: #171e28; --sunk: #1f2733; --ink: #ecebe6; --muted: #a3a8b3; --line: #2a3340;
    --accent: #5fbfd9; --accent-ink: #0f141b; --accent-soft: #15333f; --crane: #ff6b57; --hl: #b49cff; --hl-soft: #2a2347;
    --good: #4ade80; --warn: #fbb454; --bad: #ff7b7f;
    --c1: #2dd4bf; --c2: #ff8f73; --c3: #7fa7ff; --c4: #ffcb5c; --c5: #c4b0ff; --c6: #5edb98;
    --u1: #2dd4bf; --u2: #ff8f73; --u3: #7fa7ff; --u4: #ffc547; --u5: #5edb98; --u6: #b49cff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141b; --surface: #171e28; --sunk: #1f2733; --ink: #ecebe6; --muted: #a3a8b3; --line: #2a3340;
  --accent: #5fbfd9; --accent-ink: #0f141b; --accent-soft: #15333f; --crane: #ff6b57; --hl: #b49cff; --hl-soft: #2a2347;
  --good: #4ade80; --warn: #fbb454; --bad: #ff7b7f;
  --c1: #2dd4bf; --c2: #ff8f73; --c3: #7fa7ff; --c4: #ffcb5c; --c5: #c4b0ff; --c6: #5edb98;
  --u1: #2dd4bf; --u2: #ff8f73; --u3: #7fa7ff; --u4: #ffc547; --u5: #5edb98; --u6: #b49cff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -16px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-ui); font-size: 15.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* Top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap;
  padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; text-align: left; }
.brand-mark { width: 40px; height: 32px; flex: none; }

.brand-txt { display: grid; line-height: 1.1; }
.brand-txt b { font-family: var(--f-display); font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.brand-txt small { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.nav { display: flex; gap: 2px; background: var(--sunk); padding: 3px; border-radius: 99px; }
.nav a { background: none; border: 0; padding: 6px 14px; border-radius: 99px; color: var(--muted); font-weight: 600; font-size: 14px; }
.nav a[aria-current="true"] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 3px rgba(23, 32, 51, .12); }
.spacer { flex: 1; }
.m-show { display: none; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); user-select: none; font-weight: 500; }
.toggle .lvl { font-weight: 700; color: var(--ink); background: var(--sunk); padding: 2px 9px; border-radius: 99px; font-size: 12px; }
.switch { position: relative; width: 40px; height: 24px; border-radius: 12px; background: var(--line); border: 0; padding: 0; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--hl); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }

.wrap { max-width: 1280px; margin: 0 auto; padding-block: 30px 72px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; vertical-align: middle; font-family: var(--f-ui); }
.badge.hl { background: var(--hl-soft); color: var(--hl); }
.badge.sl { background: var(--accent-soft); color: var(--accent); }
.badge.both { background: var(--sunk); color: var(--ink); }
.badge.soon { background: var(--sunk); color: var(--muted); font-weight: 600; }
body.hl-off .hl-only { display: none !important; }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 8px 16px; font-weight: 600; font-size: 14.5px; transition: border-color .15s, transform .1s, box-shadow .15s; }
.btn:hover { border-color: color-mix(in srgb, var(--muted) 60%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px -8px var(--accent); }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* Home */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: center; margin-bottom: 18px; }
.hero .crane-wrap { width: 100%; }
.hero-stats { margin-bottom: 34px; max-width: 560px; }
.crane-hero { width: min(270px, 80%); height: auto; animation: crane-float 7s ease-in-out infinite; }
.crane-wrap { display: grid; justify-items: center; gap: 4px; width: 100%; }
.crane-btn { border: 0; background: none; padding: 0; cursor: pointer; display: grid; justify-items: center; width: 100%; }
.crane-btn .crane-hero { width: min(240px, 75%); }
.crane-btn.hop .crane-hero { animation: crane-hop .5s ease; }
@keyframes crane-hop { 0%, 100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-16px) rotate(-4deg); } 70% { transform: translateY(0) rotate(2deg); } }
.crane-say { position: relative; margin: 0; max-width: 300px; background: var(--surface); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 14.5px; line-height: 1.45; text-align: center; animation: say-pop .4s ease; }
.crane-say::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 16px; height: 16px; background: var(--surface); transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.crane-say.pop { animation: say-pop .4s ease; }
@keyframes say-pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.crane-tip { width: 30px; height: auto; flex: none; }
.crane-comment { display: flex; gap: 10px; align-items: center; margin: 10px 0; padding: 8px 12px; border-radius: var(--r-s); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); font-size: 14px; }
.crane-comment p { margin: 0; }
.crane-comment .crane-tip { width: 36px; }
@keyframes crane-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { .crane-hero { animation: none; } }
.creator { display: flex; gap: 14px; align-items: flex-start; margin-top: 20px; max-width: 64ch; background: var(--surface); border-radius: var(--r); padding: 14px 18px 14px 14px; box-shadow: var(--shadow); border-left: 4px solid var(--crane); }
.creator .crane-mini { width: 52px; height: auto; flex: none; margin-top: 2px; }
.creator b { font-family: var(--f-display); font-size: 17px; }
.creator p { margin: 4px 0 0; font-size: 14.5px; color: var(--muted); max-width: none; }
.hero h1 { font-size: clamp(32px, 4.6vw, 54px); font-weight: 700; letter-spacing: -.02em; }
.hero h1 em { font-style: italic; color: var(--crane); }
.hero p { color: var(--muted); margin: 10px 0 0; font-size: 17px; max-width: 58ch; }
.hero p em { font-style: italic; font-weight: 700; color: var(--crane); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }
.stat { background: var(--surface); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 2px; }
.stat b { font-family: var(--f-display); font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.unit { --uc: var(--u1); background: var(--surface); border-radius: var(--r); padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 12px; min-width: 0; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.unit::before { content: ""; position: absolute; inset: 0 0 auto; height: 90px; background: linear-gradient(180deg, color-mix(in srgb, var(--uc) 13%, transparent), transparent); pointer-events: none; }
.unit-head { display: flex; gap: 14px; align-items: center; position: relative; }
.unit-num { width: 46px; height: 46px; border-radius: 13px; background: var(--uc); color: #fff; display: grid; place-items: center; font-family: var(--f-display); font-size: 22px; font-weight: 800; flex: none; box-shadow: 0 8px 18px -10px var(--uc); }
.unit-num.sm { font-size: 13px; }
.unit h2 { font-size: 19px; font-weight: 700; }
.unit .hrs { font-size: 12px; color: var(--muted); }
.prog { height: 6px; border-radius: 99px; background: var(--sunk); overflow: hidden; position: relative; }
.prog i { position: absolute; inset: 0 auto 0 0; background: var(--uc); border-radius: 99px; }
.prog-l { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: -6px; }
.sec-list { list-style: none; margin: 0; padding: 0; }
.sec-list li + li { border-top: 1px solid var(--line); }
.sec-link { width: 100%; text-align: left; display: flex; gap: 10px; align-items: center; background: none; border: 0; padding: 9px 4px; border-radius: 8px; }
.sec-link:hover { background: var(--sunk); }
.sec-link .n { font-family: var(--f-mono); font-size: 12.5px; color: var(--uc); font-weight: 600; min-width: 30px; }
.sec-link .t { flex: 1; font-weight: 500; }
.sec-link .done { font-size: 12px; color: var(--muted); }
.sec-link .done.full { color: var(--good); font-weight: 600; }

/* Section reader */
.reader { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 44px; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 78px); align-self: start; font-size: 13.5px; max-height: calc(100vh - 100px); overflow: auto; padding-right: 4px; }
.toc a { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 5px 10px; border-radius: 8px; color: var(--muted); }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.toc .u { margin: 16px 0 4px 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; }
.article { max-width: 780px; min-width: 0; }
.article-head { display: grid; gap: 10px; margin-bottom: 26px; padding: 26px 28px; border-radius: var(--r); background: linear-gradient(135deg, color-mix(in srgb, var(--uc) 16%, var(--surface)), var(--surface) 70%); box-shadow: var(--shadow); }
.article-head .eyebrow { color: var(--uc); }
.article-head h1 { font-size: clamp(28px, 3.8vw, 42px); font-weight: 800; letter-spacing: -.02em; }
.article-head p { margin: 0; color: var(--muted); font-size: 16.5px; }
.prose { font-size: 17px; line-height: 1.68; }
.prose p { margin: 0 0 14px; }
.prose h2 { font-size: 25px; margin: 38px 0 12px; font-weight: 700; }
.prose h2::before { content: ""; display: block; width: 28px; height: 4px; border-radius: 4px; background: var(--uc); margin-bottom: 12px; }
.prose h3 { font-size: 19px; margin: 24px 0 6px; font-weight: 700; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 5px; }
.prose li::marker { color: var(--uc); }
.prose strong { font-weight: 700; }
.term { background: linear-gradient(transparent 58%, color-mix(in srgb, var(--uc) 28%, transparent) 58%); padding: 0 2px; font-weight: 600; }
.callout { font-size: 15px; background: var(--surface); padding: 14px 16px; margin: 20px 0; border-radius: var(--r-s); box-shadow: var(--shadow); border-left: 4px solid var(--accent); }
.callout .eyebrow { margin-bottom: 4px; color: var(--accent); }
.callout.hlbox { border-left-color: var(--hl); background: linear-gradient(135deg, var(--hl-soft), var(--surface)); }
.callout.hlbox .eyebrow { color: var(--hl); }
.hl-block { border-radius: var(--r); padding: 4px 22px 10px; margin: 26px 0; background: linear-gradient(160deg, var(--hl-soft), transparent 70%); border: 1px solid color-mix(in srgb, var(--hl) 30%, var(--line)); }
.hl-block > .eyebrow { display: block; color: var(--hl); margin: 16px 0 -20px; }
.hl-block h2::before { background: var(--hl); }
.defs { font-size: 15px; display: grid; border-radius: var(--r-s); background: var(--surface); margin: 16px 0; box-shadow: var(--shadow); overflow: hidden; }
.defs div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 14px; padding: 11px 16px; }
.defs div + div { border-top: 1px solid var(--line); }
.defs dt { font-weight: 700; margin: 0; }
.defs dd { margin: 0; }
.tbl-wrap { overflow-x: auto; margin: 16px 0; border-radius: var(--r-s); box-shadow: var(--shadow); }
table.tbl { border-collapse: collapse; font-size: 14px; min-width: 100%; background: var(--surface); }
.tbl th, .tbl td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td, .tbl tr:last-child th { border-bottom: 0; }
.tbl th { background: var(--sunk); font-weight: 700; font-size: 13px; }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; font-size: 15px; }
.two > div { background: var(--surface); border-radius: var(--r-s); padding: 14px 16px; min-width: 0; box-shadow: var(--shadow); border-top: 3px solid var(--c1); }
.two > div:nth-child(2) { border-top-color: var(--c2); }
/* green and red tops are only for advantages and disadvantages; other pairs (internal/external, formal/informal...) are neutral */
.two.neutral > div { border-top-color: var(--c3); }
.two.neutral > div:nth-child(2) { border-top-color: var(--c5); }
.two h4 { margin: 0 0 8px; font-size: 14.5px; }
.two ul { margin: 0; padding-left: 18px; }
.two li { margin-bottom: 3px; }

/* Widgets */
.widget { font-size: 14px; background: var(--surface); border-radius: var(--r); padding: 18px; margin: 22px 0; box-shadow: var(--shadow); }
.widget-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 12px; flex-wrap: wrap; }
.widget-head b { font-size: 16px; font-family: var(--f-display); font-weight: 700; }
.widget-head span { font-size: 12px; color: var(--muted); background: var(--sunk); padding: 2px 9px; border-radius: 99px; }
.widget svg { display: block; width: 100%; height: auto; overflow: visible; }
svg text { font-family: var(--f-ui); fill: var(--ink); }
svg .tick { fill: var(--muted); font-size: 11px; }
svg .lbl { font-size: 12px; font-weight: 600; }
svg .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
svg .base { stroke: color-mix(in srgb, var(--muted) 55%, var(--line)); stroke-width: 1.2; }
.sliders { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 20px; margin-top: 14px; }
.sliders label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
.sliders label b { color: var(--ink); font-family: var(--f-mono); font-weight: 600; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; background: var(--sunk); outline-offset: 6px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(0,0,0,.15); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.field { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-family: var(--f-mono); font-size: 13px; width: 100%; min-width: 0; }
.readout { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.readout div { display: grid; background: var(--sunk); border-radius: var(--r-s); padding: 8px 12px; min-width: 110px; }
.readout span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.readout b { font-family: var(--f-mono); font-size: 16px; font-variant-numeric: tabular-nums; }
.readout .hi { background: var(--accent-soft); }
.readout .hi b { color: var(--accent); }
.readout .hlr { background: var(--hl-soft); }
.readout .hlr span { color: var(--hl); }
.matrix { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.matrix > * { min-width: 0; overflow-wrap: break-word; }
.matrix .axis-l { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.matrix .axis-t { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.cell { --q: var(--c1); text-align: left; border: 2px solid transparent; background: color-mix(in srgb, var(--q) 10%, var(--surface)); border-radius: var(--r-s); padding: 14px; min-height: 92px; display: grid; align-content: start; gap: 4px; transition: border-color .15s, background .15s, transform .15s; }
.cell:hover { transform: translateY(-1px); }
.cell b { font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cell small { color: var(--muted); font-size: 13px; }
.cell > * { min-width: 0; }
@media (max-width: 640px) { .cell { padding: 10px; } .cell b { flex-wrap: wrap; justify-content: flex-start; font-size: 14px; } }
.cell[aria-pressed="true"] { border-color: var(--q); background: color-mix(in srgb, var(--q) 20%, var(--surface)); }
.detail { margin-top: 12px; padding: 14px 16px; background: var(--sunk); border-radius: var(--r-s); }
.detail p { margin: 0 0 6px; }
.detail p:last-child { margin: 0; }
.risk { display: inline-flex; gap: 3px; }
.risk i { width: 12px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--muted) 25%, transparent); }
.risk i.on { background: var(--c2); }
.risk-pill { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.risk-pill.r1 { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.risk-pill.r2 { background: color-mix(in srgb, var(--warn) 20%, transparent); color: color-mix(in srgb, var(--warn) 80%, var(--ink)); }
.risk-pill.r3, .risk-pill.r4 { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
/* hierarchy of objectives, wide at the top */
.obj-funnel { display: grid; gap: 6px; }
.obj-row { display: grid; justify-items: center; }
.obj-step { background: color-mix(in srgb, var(--oc) 16%, var(--surface)); border-top: 4px solid var(--oc); border-radius: 10px; padding: 9px 14px; text-align: center; display: grid; gap: 2px; }
.obj-step span { font-size: 12.5px; color: var(--muted); }
.obj-step em { font-size: 13px; }
.obj-arrows { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.sc-sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }
.sc-tbl td, .sc-tbl th { font-size: 13.5px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { border: 0; background: var(--sunk); border-radius: 99px; padding: 6px 14px; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--surface); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 4px; }
.card { border-radius: var(--r-s); padding: 12px 14px; background: var(--sunk); display: grid; gap: 4px; align-content: start; }
.card b { display: flex; justify-content: space-between; gap: 6px; align-items: start; }
.card .ex { color: var(--muted); font-size: 13px; }
.pill { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.pill.pos { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.pill.neg { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.pill.mix { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.flow { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.flow > div { flex: 1 1 150px; border-radius: var(--r-s); padding: 12px 14px; background: var(--sunk); }
.flow > div:nth-of-type(1) { background: color-mix(in srgb, var(--c3) 14%, var(--surface)); }
.flow > div:nth-of-type(2) { background: color-mix(in srgb, var(--c1) 14%, var(--surface)); }
.flow > div:nth-of-type(3) { background: color-mix(in srgb, var(--c2) 14%, var(--surface)); }
.flow > i { align-self: center; color: var(--muted); font-style: normal; font-size: 20px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ftable { overflow-x: auto; }
.ftable table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.ftable th, .ftable td { padding: 5px 6px; text-align: right; white-space: nowrap; }
.ftable th:first-child, .ftable td:first-child { text-align: left; }
.ftable input { width: 76px; text-align: right; }
.ftable tr.tot td { font-weight: 700; border-top: 1px solid var(--line); font-family: var(--f-mono); }

/* Practice questions */
.practice { margin-top: 44px; display: grid; gap: 14px; }
.practice > h2 { font-size: 28px; font-weight: 800; }
.pq { background: var(--surface); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.pq.hlq { box-shadow: var(--shadow), inset 0 0 0 1.5px color-mix(in srgb, var(--hl) 45%, transparent); }
.pq-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.pq-q { font-size: 16px; font-weight: 500; }
.marks { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
textarea.ans { width: 100%; min-height: 110px; resize: vertical; border: 1.5px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; background: var(--bg); line-height: 1.6; transition: border-color .15s; }
textarea.ans:focus { border-color: var(--accent); outline: none; }
.model { border-top: 1px dashed var(--line); padding-top: 12px; display: grid; gap: 8px; }
.model h4 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.model ul { margin: 0; padding-left: 20px; }
.model .ex { background: var(--accent-soft); padding: 12px 14px; border-radius: var(--r-s); font-size: 15px; }
.saved { font-size: 12px; color: var(--muted); }
.notes-coming { text-align: center; padding: 40px 20px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); color: var(--muted); }

/* Toolkit */
.page-head { display: grid; gap: 8px; margin-bottom: 26px; max-width: 70ch; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; letter-spacing: -.02em; }
.page-head p { color: var(--muted); margin: 0; font-size: 16.5px; }
.toolkit { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 30px; }
.tool-list { display: grid; gap: 2px; align-content: start; background: var(--surface); border-radius: var(--r); padding: 8px; box-shadow: var(--shadow); align-self: start; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 78px); }
.tool-list button { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.tool-list button:hover { background: var(--sunk); }
.tool-list button[aria-current="true"] { background: var(--ink); color: var(--surface); }
.tool-list button[aria-current="true"] .badge.hl { background: var(--hl); color: #fff; }
.tool-panel { min-width: 0; --uc: var(--u6); }
.tool-panel h2 { font-size: 32px; font-weight: 800; margin: 6px 0 12px; }

/* Exams */
.exam-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.exam-card { background: var(--surface); border-radius: var(--r); padding: 20px; display: grid; gap: 10px; min-width: 0; box-shadow: var(--shadow); align-content: start; position: relative; overflow: hidden; }
.exam-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: color-mix(in srgb, var(--pc, var(--c1)) 16%, transparent); }
.exam-card h3 { font-size: 22px; font-weight: 700; }
.exam-card .meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; }
.exam-card .meta span { background: var(--sunk); padding: 2px 9px; border-radius: 99px; color: var(--muted); font-weight: 600; }
.exam-card .status { font-size: 13px; color: var(--muted); font-weight: 600; }
.exam-card .status.fin { color: var(--good); }
.exam-group { margin: 26px 0 12px; display: flex; align-items: baseline; gap: 10px; }
.exam-group h2 { font-size: 22px; font-weight: 700; }

.run-bar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 57px); z-index: 4; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding-block: 10px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; border-bottom: 1px solid var(--line); }
.clock { display: flex; align-items: center; gap: 10px; background: var(--surface); padding: 6px 14px 6px 8px; border-radius: 99px; box-shadow: var(--shadow); }
.clock svg { width: 34px; height: 34px; }
.timer { font-family: var(--f-mono); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.phase { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; color: var(--muted); }
.timer.reading { color: var(--c3); }
.timer.low { color: var(--warn); }
.timer.over { color: var(--bad); }
.navstrip { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.navstrip button { font-family: var(--f-mono); font-size: 11.5px; min-width: 36px; padding: 5px 6px; border-radius: 8px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.navstrip button.answered { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); font-weight: 600; }
.navstrip button[aria-current="true"] { background: var(--ink); color: var(--surface); box-shadow: none; }
.navstrip .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.desk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding-top: 20px; }
.stim { background: var(--surface); border-radius: var(--r); padding: 22px 24px; font-size: 16.5px; line-height: 1.65; max-height: calc(100vh - 170px); overflow: auto; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 136px); align-self: start; box-shadow: var(--shadow); }
.stim h3 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.stim p { margin: 0 0 12px; }
.stim .res { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: var(--accent); margin: 18px 0 6px; }
.stim .fig { font-size: 13px; margin: 14px 0; }
.stim .fig-t { font-weight: 700; margin-bottom: 8px; font-size: 13.5px; }
.stim .fig svg { width: 100%; height: auto; display: block; overflow: visible; }
.stim .new { animation: fadein 1.2s ease; border-radius: 8px; }
@keyframes fadein { from { background: var(--accent-soft); } to { background: transparent; } }
.qpane { display: grid; gap: 14px; align-content: start; min-width: 0; }
.qcard { background: var(--surface); border-radius: var(--r); padding: 20px 22px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.qcard .qtext { font-size: 19px; line-height: 1.5; font-weight: 500; }
.qcard .qlabel { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.qcard textarea.ans { min-height: 220px; font-size: 15.5px; }
.qcard textarea.ans.long { min-height: 440px; }
.qcard .note { font-size: 13px; color: var(--muted); }
.qnav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.choose { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choose button { text-align: left; border: 2px solid transparent; border-radius: var(--r); padding: 18px; background: var(--surface); display: grid; gap: 6px; box-shadow: var(--shadow); }
.choose button[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.choose b { font-family: var(--f-display); font-size: 21px; }
.banner { padding: 10px 14px; border-radius: var(--r-s); font-size: 14px; background: var(--sunk); }
.banner.reading { background: color-mix(in srgb, var(--c3) 14%, transparent); }
.banner.over { background: color-mix(in srgb, var(--bad) 13%, transparent); }
.intro-card { max-width: 720px; display: grid; gap: 16px; }
.intro-card h1 { font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
.prerelease { background: linear-gradient(135deg, color-mix(in srgb, var(--c4) 18%, var(--surface)), var(--surface)); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
/* Paper 1 case: numbered paragraphs like the IB booklet, with the parts added in the exam marked */
.pre { display: grid; gap: 10px; }
.pre p { margin: 0; }
.pre-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 18px; }
.pre-head span { font-size: 13px; color: var(--muted); align-self: center; }
.pre-terms { columns: 2 180px; margin: 0; padding-left: 20px; font-size: 14px; }
.case { counter-reset: cp; display: grid; gap: 10px; }
.case p { margin: 0; }
.case .cp { counter-increment: cp; position: relative; padding-left: 30px; }
.case .cp::before { content: counter(cp); position: absolute; left: 0; top: 2px; font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.case .cp-list { margin: 0; padding-left: 50px; }
.case-new { display: grid; gap: 8px; border-left: 3px solid var(--c3); padding: 4px 0 4px 12px; }
.case-h { margin: 0; font-size: 15px; }
.new-tag { justify-self: start; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c3); }
.case-note { font-size: 12px; color: var(--muted); font-style: italic; }
.fiction-note { margin: 18px 0 0; font-size: 12.5px; color: var(--muted); font-style: italic; border-top: 1px solid var(--line); padding-top: 10px; max-width: 80ch; }
.pre-peek { background: var(--sunk); border-radius: var(--r-s); padding: 8px 12px; margin-bottom: 12px; }
.pre-peek summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.pre-peek .pre { margin-top: 10px; font-size: 14px; }
.pre-peek .pre-head, .pre-peek .pre > .case { display: none; }

.pad { display: grid; gap: 8px; }
.pad-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.pad-tools button { border: 0; background: var(--sunk); border-radius: 99px; padding: 4px 12px; font-weight: 600; }
.pad-tools button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.pad canvas { width: 100%; aspect-ratio: 4 / 3; max-width: 100%; border-radius: var(--r-s); touch-action: none; background-color: var(--bg); box-shadow: inset 0 0 0 1px var(--line);
  background-image: radial-gradient(color-mix(in srgb, var(--muted) 35%, transparent) 1px, transparent 1px); background-size: 20px 20px; }

.review-sum { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface)); border-radius: var(--r); padding: 20px 22px; margin-bottom: 22px; box-shadow: var(--shadow); }
.review-sum .big { font-family: var(--f-display); font-size: 46px; font-weight: 800; line-height: 1; }
.rv { background: var(--surface); border-radius: var(--r); padding: 18px 20px; display: grid; gap: 10px; margin-bottom: 12px; box-shadow: var(--shadow); }
.rv .your { background: var(--sunk); border-radius: var(--r-s); padding: 12px 14px; white-space: pre-wrap; font-size: 15px; }
.rv .your.empty { color: var(--muted); font-style: italic; }
.rv img { max-width: 420px; width: 100%; border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--line); }
.score { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.score input { width: 66px; }
.overlay { position: fixed; inset: 0; background: color-mix(in srgb, #0c1120 45%, transparent); backdrop-filter: blur(4px); z-index: 20; display: grid; place-items: center; padding: 16px; }
.sheet { background: var(--surface); border-radius: var(--r); max-width: 660px; width: 100%; max-height: 85vh; overflow: auto; padding: 22px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.formula { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0; font-size: 14px; }
.formula > div { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.formula > div:nth-child(4n+1), .formula > div:nth-child(4n+2) { background: var(--sunk); }
.formula > div:nth-child(odd) { font-weight: 600; padding-left: 10px; }
.formula > div:nth-child(even) { font-family: var(--f-mono); font-size: 12.5px; }

@media (max-width: 960px) {
  .reader, .toolkit { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr) 190px; gap: 18px; }
  .crane-btn .crane-hero { width: 150px; }
  .crane-say { font-size: 13.5px; }
  .toc { display: none; }
  .tool-list { position: static; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .desk { grid-template-columns: minmax(0, 1fr); }
  .stim { position: static; max-height: none; }
  .run-bar { position: static; }
}
@media (max-width: 560px) {
  .two, .choose { grid-template-columns: 1fr; }
  .defs div { grid-template-columns: 1fr; gap: 2px; }
  .units { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; align-items: start; }
  .crane-btn .crane-hero { width: 96px; }
  .crane-say { font-size: 12px; padding: 7px 9px; }
  .creator { padding: 12px 14px 12px 12px; } .creator .crane-mini { width: 40px; }
  .stat b { font-size: 22px; }
  .article-head { padding: 20px; }
  .tq-keys { position: static; }
}
/* phones: logo and the SL/HL switch on one row, all six menu items in a grid below, nothing to scroll sideways */
@media (max-width: 640px) {
  .topbar { position: static; }
  .topbar-in { gap: 10px; padding-block: 8px 10px; }
  .brand { order: 0; flex: 1; min-width: 0; }
  .brand-mark { width: 34px; height: 28px; }
  .brand-txt b { font-size: 17px; }
  .brand-txt small { font-size: 10.5px; white-space: normal; }
  .spacer { display: none; }
  .toggle { order: 1; gap: 6px; }
  .nav { order: 2; flex-basis: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; border-radius: 14px; }
  .nav a { padding: 8px 2px; border-radius: 11px; font-size: 13px; text-align: center; justify-content: center; white-space: nowrap; }
  .nav a.nav-locked { display: flex; }
  .nav a.nav-locked .lock-i svg { width: 12px; height: 12px; }
  .m-hide { display: none; }
  .m-show { display: inline; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hero h1 { font-size: 31px; }
  .hero p.hero-lead { font-size: 19px; }
  .hero p { font-size: 16px; }
  /* the crane sits under the introduction, talking to the right */
  .hero .crane-wrap { display: flex; align-items: center; gap: 12px; }
  .hero .crane-btn { order: 0; flex: none; width: auto; }
  .crane-btn .crane-hero { width: 96px; }
  .hero .crane-say { order: 1; flex: 1; min-width: 0; max-width: none; font-size: 14px; padding: 10px 13px; text-align: left; }
  .crane-say::after { left: -6px; top: 50%; bottom: auto; transform: translateY(-50%) rotate(45deg); }
  .hero-stats { margin-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* the hidden attribute always wins over a display rule (answer panels, confirmations) */
[hidden] { display: none !important; }
/* ---------- linked terms in the notes ---------- */
.tl { cursor: pointer; border-bottom: 1.5px dotted color-mix(in srgb, var(--muted) 70%, transparent); border-radius: 3px; transition: background .15s; }
.tl:hover { background: var(--sunk); }
.tl.r-vw { border-bottom: 2px solid var(--good); }
.tl.r-vw::after { content: "✓"; font-size: .7em; color: var(--good); margin-left: 2px; vertical-align: super; font-weight: 700; }
.tl.r-w { border-bottom: 2px solid color-mix(in srgb, var(--c3) 70%, transparent); }
.tl.r-dk { background: color-mix(in srgb, var(--warn) 20%, transparent); border-bottom: 2px solid var(--warn); font-weight: 600; padding: 0 2px; }
.tl.r-dka { background: color-mix(in srgb, var(--bad) 18%, transparent); border-bottom: 2px solid var(--bad); font-weight: 700; padding: 0 2px; }
.tl.r-dka::before { content: "!"; display: inline-grid; place-items: center; width: 1.05em; height: 1.05em; border-radius: 50%; background: var(--bad); color: #fff; font-size: .62em; font-weight: 800; margin-right: 3px; vertical-align: .25em; }
.tl.pulse { animation: tlpulse 2.4s ease; }
@keyframes tlpulse { 0%, 60% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- popover ---------- */
.tpop { position: absolute; z-index: 30; background: var(--surface); border-radius: var(--r); box-shadow: 0 20px 50px -18px rgba(12, 17, 32, .45), 0 0 0 1px var(--line); padding: 16px; display: grid; gap: 10px; font-size: 14.5px; }
.tpop p { margin: 0; line-height: 1.55; }
.tpop-h { display: flex; align-items: center; gap: 8px; }
.tpop-h b { font-family: var(--f-display); font-size: 19px; flex: 1; }
.tpop-x { border: 0; background: var(--sunk); width: 28px; height: 28px; border-radius: 50%; font-size: 18px; line-height: 1; }
.tpop-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- shared bits ---------- */
.rate { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rate button { border: 1.5px solid color-mix(in srgb, var(--rc) 35%, var(--line)); background: color-mix(in srgb, var(--rc) 7%, var(--surface)); color: var(--ink); border-radius: var(--r-s); padding: 8px 6px; font-size: 12.5px; font-weight: 600; display: grid; gap: 2px; justify-items: center; line-height: 1.2; transition: background .12s, transform .1s; }
.rate button:hover { background: color-mix(in srgb, var(--rc) 16%, var(--surface)); }
.rate button:active { transform: scale(.97); }
.rate button[aria-pressed="true"] { background: var(--rc); border-color: var(--rc); color: #fff; }
.rate kbd { font-family: var(--f-mono); font-size: 10.5px; opacity: .65; }
.rate.mini { display: flex; gap: 4px; }
.rate.mini button { width: 22px; height: 22px; padding: 0; border-radius: 50%; }
.ctx-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ctx-bar .eyebrow { margin-right: 2px; }
.ctx-chip { border: 0; border-radius: 99px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; background: color-mix(in srgb, var(--cc) 14%, var(--surface)); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc) 35%, transparent); }
.ctx-chip:hover { background: color-mix(in srgb, var(--cc) 26%, var(--surface)); }
.ctx-chip span { color: var(--cc); }
.ctx-bar.sm .ctx-chip { font-size: 11.5px; padding: 2px 9px; }
.addset { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.addset select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: 13.5px; font-weight: 600; }
.addset-msg { font-size: 12.5px; color: var(--good); font-weight: 600; }
.newset-inline { display: inline-flex; gap: 6px; }
.newset-inline input { width: 150px; }

/* ---------- flashcards page ---------- */
.fc { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; align-items: start; }
.fc-side { background: var(--surface); border-radius: var(--r); padding: 10px; box-shadow: var(--shadow); display: grid; gap: 2px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 78px); max-height: calc(100vh - 100px); overflow: auto; }
.fc-side > button { --uc: var(--accent); display: flex; justify-content: space-between; gap: 8px; align-items: center; text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.fc-side > button b { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); background: var(--sunk); padding: 1px 7px; border-radius: 99px; }
.fc-side > button:hover { background: var(--sunk); }
.fc-side > button[aria-current="true"] { background: color-mix(in srgb, var(--uc) 14%, var(--surface)); box-shadow: inset 3px 0 0 var(--uc); font-weight: 700; }
.fc-side > button.flagset b { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.fc-g { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 12px 10px 4px; }
.fc-g:first-child { margin-top: 4px; }
.fc-topic { margin: 0 4px; width: auto; }
.fc-new { display: flex; gap: 6px; margin: 8px 4px 4px; }
.fc-empty { color: var(--muted); font-size: 13.5px; margin: 6px 10px; }
.fc-main { display: grid; gap: 14px; min-width: 0; }
.fc-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.fc-head h2 { font-size: 30px; font-weight: 800; margin-top: 4px; }
.seg { display: flex; background: var(--sunk); padding: 3px; border-radius: 99px; }
.seg button { border: 0; background: none; padding: 6px 16px; border-radius: 99px; font-weight: 600; color: var(--muted); font-size: 14px; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(23, 32, 51, .12); }
.mbar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--line); }
.mbar i { display: block; height: 100%; }
.mlegend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--muted); }
.mlegend span { display: inline-flex; align-items: center; gap: 6px; }
.mlegend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.mlegend b { color: var(--ink); font-family: var(--f-mono); font-size: 12px; }
.fc-tools { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.fc-tools label { display: inline-flex; gap: 6px; align-items: center; }
.fc-tools input { accent-color: var(--accent); }
.fc-count { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); font-weight: 600; }
.card3d { position: relative; width: 100%; min-height: 250px; border: 0; padding: 0; background: none; perspective: 1400px; display: block; }
.card3d .face { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; padding: 30px; border-radius: 20px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .55s cubic-bezier(.3, .7, .2, 1); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); text-align: center; }
.card3d .front { background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--c1) 16%, var(--surface)), var(--surface) 60%); }
.card3d .back { background: radial-gradient(circle at 80% 100%, color-mix(in srgb, var(--c5) 16%, var(--surface)), var(--surface) 60%); transform: rotateY(180deg); }
.card3d.flipped .front { transform: rotateY(-180deg); }
.card3d.flipped .back { transform: rotateY(0deg); }
.card3d small { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.fc-term { font-family: var(--f-display); font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.fc-def { margin: 0; font-size: 18px; line-height: 1.55; max-width: 52ch; }
.fc-manage { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fc-manage .confirm { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.fc-sub { font-size: 18px; font-weight: 700; margin: 10px 0 0; }
.fc-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.fc-filter #fc-q { flex: 1 1 220px; }
.trow { display: flex; gap: 14px; justify-content: space-between; align-items: start; background: var(--surface); border-radius: var(--r-s); padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 8px; }
.trow-main { display: grid; gap: 4px; min-width: 0; }
.trow-main b { font-size: 15.5px; }
.trow-main > span { font-size: 14px; color: var(--muted); }
.trow-side { display: grid; gap: 8px; justify-items: end; flex: none; }
.stat-link { border: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.stat-link:hover { box-shadow: var(--shadow), inset 0 0 0 2px var(--accent-soft); }
.stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
@media (max-width: 960px) {
  .fc { grid-template-columns: minmax(0, 1fr); }
  .fc-side { position: static; max-height: none; }
}
@media (max-width: 560px) {
  .rate { grid-template-columns: 1fr 1fr; }
  .trow { flex-direction: column; }
  .trow-side { justify-items: start; }
  .card3d { min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) { .card3d .face { transition: none; } }
/* lists in the notes: numbered, one item per line, with the "know at least 2" tip */
ol.steps { margin: 6px 0 14px; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 6px; }
ol.steps > li { counter-increment: st; position: relative; padding: 6px 10px 6px 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); line-height: 1.5; }
ol.steps > li::before { content: counter(st); position: absolute; left: 9px; top: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--accent-soft); color: var(--accent); font-family: var(--f-ui); }
.list-tip { display: flex; gap: 10px; align-items: flex-start; margin: -4px 0 16px; padding: 9px 12px; border-radius: var(--r-s); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); font-size: 14px; color: var(--ink); }
.list-tip svg { flex: none; color: var(--warn); margin-top: 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* contact form */
.sheet.contact { max-width: 620px; width: 100%; max-height: none; overflow: visible; }
.contact-page .sheet.contact .crane-mini { width: 54px; height: auto; }
/* ---------- exam answer technique ---------- */
.tech { display: grid; gap: 34px; }
.tech-sec { display: grid; gap: 14px; }
.tech-sec > h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.01em; }
.tech-sec h3 { font-size: 20px; margin-top: 8px; }
.tech-sec > p { margin: 0; max-width: 75ch; color: var(--muted); }
.tech .tbl-wrap { margin: 0; }
.tech-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tech-tips > div { background: var(--surface); border-radius: var(--r-s); padding: 14px 16px; box-shadow: var(--shadow); }
.tech-tips p { margin: 6px 0 0; font-size: 14.5px; color: var(--muted); }
.tq-desk { padding-top: 0; }
.tq-list { display: grid; gap: 16px; align-content: start; }
.tq-top { display: flex; justify-content: space-between; align-items: center; }
.tq .qtext { font-size: 17.5px; }
.tq-wants { margin: 0; font-size: 14.5px; }
.tq-none { margin: 0; font-size: 14px; color: var(--muted); font-style: italic; background: var(--sunk); padding: 8px 12px; border-radius: var(--r-s); }
.tq-lit { justify-self: start; }
.tq-lit[aria-pressed="true"] { background: var(--c4); border-color: var(--c4); color: #1b1606; }
.tq-model { display: grid; gap: 6px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); border-left: 3px solid var(--accent); padding: 12px 14px; border-radius: 0 var(--r-s) var(--r-s) 0; line-height: 1.7; font-size: 15.5px; }
.tq-more summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.tq-more ul { margin: 6px 0; padding-left: 20px; font-size: 14px; }
.tq-mh { margin: 8px 0 0; font-weight: 700; font-size: 13px; color: var(--bad); }
.tq-keys { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; font-weight: 600; padding: 4px 0; }
.tq-key { border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-weight: 600; font-size: 13px; background: var(--surface); color: var(--muted); }
.tq-key[aria-pressed="true"] { color: var(--ink); background: var(--hk); border-color: transparent; }
.k-term, mark.hl-term { --hk: color-mix(in srgb, var(--c1) 26%, transparent); }
.k-case, mark.hl-case, .k-res, mark.hl-res { --hk: color-mix(in srgb, var(--c3) 26%, transparent); }
.k-tool, mark.hl-tool { --hk: color-mix(in srgb, var(--c5) 30%, transparent); }
.k-eval, mark.hl-eval { --hk: color-mix(in srgb, var(--c2) 26%, transparent); }
.k-struct, mark.hl-struct { --hk: color-mix(in srgb, var(--c6) 24%, transparent); }
.tech mark { background: var(--hk); color: inherit; padding: 1px 2px; border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.off-term mark.hl-term, .off-case mark.hl-case, .off-res mark.hl-res, .off-tool mark.hl-tool, .off-eval mark.hl-eval, .off-struct mark.hl-struct { background: none; padding: 0; }
.tech .sh { transition: background .25s; border-radius: 4px; }
.tech .sh.lit { background: color-mix(in srgb, var(--c4) 45%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c4) 45%, transparent); }
.tech-warn { background: color-mix(in srgb, var(--warn) 13%, var(--surface)); border-left: 4px solid var(--warn); border-radius: 0 var(--r-s) var(--r-s) 0; padding: 12px 16px; }
.tech-warn p { margin: 6px 0 0; font-size: 14.5px; }
.tech-sec[hidden] { display: none; }
.tech-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tech-tabs-l { font-weight: 700; margin-right: 4px; }
/* toolkit groups and drawing practice */
.tool-grp { grid-column: 1 / -1; display: grid; gap: 2px; padding: 10px 6px 4px; font-size: 13px; }
.tool-grp b { font-size: 13.5px; }
.tool-grp span { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.tool-grp-tag { margin: 4px 0 0; font-size: 14px; font-weight: 600; color: var(--good); }
.tool-grp-tag.rare { color: var(--muted); }
.tkq { display: grid; gap: 10px; }
.tkq .pq-top { flex-wrap: wrap; }
.tkq .lvp { white-space: nowrap; flex: none; align-self: flex-start; }
.tkq .tbl-wrap { margin: 0; }
.tk-model { display: grid; gap: 6px; }
.tk-model[hidden] { display: none; }
.tk-model ul { margin: 0; padding-left: 20px; }
.tk-check-h { margin: 6px 0 0; font-weight: 700; }
.tech-tabs [role="tab"] { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 8px 18px; font-weight: 700; font-size: 15px; }
.tech-tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.p3-flag .btn { margin-left: 8px; }
.p3-flag { background: color-mix(in srgb, var(--c5) 14%, var(--surface)); border-radius: var(--r); padding: 16px 20px; border-left: 4px solid var(--c5); }
/* diagram builders */
.bd { display: grid; gap: 10px; }
.bd-area { display: grid; gap: 10px; }
.bd-help { margin: 0; font-size: 13.5px; color: var(--muted); }
.bd-palette { display: grid; gap: 8px; background: var(--sunk); border-radius: var(--r-s); padding: 10px; }
.bd-palette > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bd-pl { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.bd-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 600; text-align: left; line-height: 1.3; }
.bd-chip.lab { background: color-mix(in srgb, var(--c5) 16%, var(--surface)); }
.bd-chip.on { outline: 3px solid var(--accent); outline-offset: 1px; }
.bd-chip.ok { border-color: var(--good); box-shadow: inset 0 0 0 1px var(--good); }
.bd-chip.bad { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.bd-matrix { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 6px; }
.bd-y { display: flex; flex-direction: column; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.bd-y b { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12.5px; color: var(--ink); }
.bd-x { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.bd-x b { font-size: 12.5px; color: var(--ink); }
.bd-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.bd-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.bd-box { min-height: 96px; border: 2px dashed var(--line); border-radius: var(--r-s); padding: 8px; display: grid; align-content: start; gap: 6px; cursor: pointer; background: var(--surface); }
.bd-box:hover { border-color: var(--accent); }
.bd-fixed { font-weight: 800; font-size: 13.5px; }
.bd-ph { font-size: 12.5px; color: var(--muted); font-style: italic; }
.bd-items { display: flex; flex-wrap: wrap; gap: 5px; }
.bd-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bd-tools .btn { padding: 6px 12px; font-size: 13.5px; }
.bd-sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bd-canvas { overflow-x: auto; background: var(--surface); border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--line); }
.bd-canvas svg { display: block; width: 100%; height: auto; }
.bd-panel { display: grid; gap: 8px; }
.bd-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.bd-fields label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.bd-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bd-fb { background: var(--sunk); border-radius: var(--r-s); padding: 10px 14px; font-size: 14px; }
.bd-fb ul { margin: 6px 0 0; padding-left: 4px; list-style: none; display: grid; gap: 3px; }
.bd-fb li.ok { color: var(--good); } .bd-fb li.bad { color: var(--bad); }
.bd-chip, .bd-shape, .nw-node, .ch-svg { touch-action: none; }
.bd-chip { cursor: grab; }
.bd-ghost { position: fixed; z-index: 60; pointer-events: none; transform: translate(-50%, -60%) rotate(-2deg); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .25)); }
.bd-ghost .bd-chip { background: var(--surface); }
body.bd-dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
.bd-box.over { border-color: var(--accent); border-style: solid; background: var(--accent-soft); }
.bd-shape { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 12px 6px 8px; font-weight: 700; font-size: 13.5px; cursor: grab; }
.bd-shape svg { display: block; }
.bd-shape.on { outline: 3px solid var(--accent); outline-offset: 1px; }
.bd-act { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 4px 9px; font-weight: 800; font-size: 13px; }
.bd-act small { font-weight: 500; color: var(--muted); }
.bd-act.on { background: var(--ink); color: var(--surface); border-color: var(--ink); } .bd-act.on small { color: inherit; }
.bd-act.used { opacity: .4; text-decoration: line-through; }
.bd-msg { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--warn); }
.bd-dragging .bd-node.can .bd-target { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 4 3; }
.bd-node.over .bd-target, .nw-node.over circle { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 3; stroke-dasharray: none; }
.bd-canvas svg.over { background: var(--accent-soft); }
.bd-pop { animation: bdpop .35s cubic-bezier(.3, 1.6, .5, 1); }
.bd-grow { animation: bdfade .45s ease; }
@keyframes bdpop { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bdfade { from { opacity: 0; } to { opacity: 1; } }
.tr-form { gap: 8px; }
.tr-row { border-left: 3px solid var(--line); padding: 6px 0 6px 10px; display: grid; gap: 6px; }
.tr-t { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; }
.tr-t svg { width: 16px; height: 16px; }
.tr-rej { display: flex !important; align-items: center; gap: 6px; align-self: end; padding-bottom: 6px; }
.tr-x { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 6px; }
.tr-x:hover { color: var(--bad); }
.bd-ro { pointer-events: none; }
.bd-ro .bd-help, .bd-ro .bd-tools, .bd-ro .bd-palette, .bd-ro .bd-panel, .bd-ro .bd-actions { display: none; }
.tkq textarea.ans.short { min-height: 110px; }
.tk-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tk-total { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: auto; }
.tk-score { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tk-score b { font-family: var(--f-display); font-size: 26px; }
.tk-score span { color: var(--muted); }
.tk-sec { margin: 10px 0 0; font-weight: 800; font-size: 13.5px; }
.tk-warn { margin: 4px 0 0; color: var(--bad); font-weight: 600; }
.bd-fb li.part { color: var(--warn); }
/* motivation theory comparison and worker builder */
.mc-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.mc-pick select { width: auto; flex: 1 1 220px; font-family: var(--f-ui); font-size: 14px; }
.mc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.mc-card { background: var(--sunk); border-radius: var(--r-s); padding: 12px 14px; font-size: 14px; }
.mc-card h4 { margin: 0; font-size: 16px; }
.mc-card p { margin: 6px 0; }
.mc-when { color: var(--muted); font-size: 12.5px; margin-top: 0 !important; }
.mc-pc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mc-pc > div { background: var(--surface); border-radius: 8px; padding: 8px 10px; border-top: 3px solid var(--c1); }
.mc-pc > div + div { border-top-color: var(--c2); }
.mc-pc ul { margin: 4px 0 0; padding-left: 16px; }
.wb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .wb-grid, .mc-pc { grid-template-columns: minmax(0, 1fr); } }
.wb-sliders { display: grid; gap: 6px; }
.wb-sliders label { display: grid; grid-template-columns: 150px minmax(0, 1fr) 22px; gap: 8px; align-items: center; font-size: 13.5px; }
.wb-sliders b { text-align: right; font-family: var(--f-mono); }
.wb-out { background: var(--sunk); border-radius: var(--r-s); padding: 12px 14px; font-size: 14px; }
.wb-top { margin: 0 0 8px; }
.wb-res { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.wb-me { margin: 10px 0 0; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); padding: 10px 14px; border-radius: var(--r-s); }
/* industrial relations game and timelines */
.ir-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 16px; margin-bottom: 10px; }
.ir-m { display: grid; grid-template-columns: auto minmax(0, 1fr) 24px; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; }
.ir-bar { height: 8px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
.ir-bar i { display: block; height: 100%; border-radius: 99px; }
.ir-log { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.ir-log li.emp b { color: var(--c3); } .ir-log li.boss b { color: var(--c2); }
.ir-q { margin: 6px 0; }
.ir-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.ir-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 14px; font-weight: 700; font-size: 13.5px; }
.ir-btn.talk { border-color: var(--good); color: var(--good); }
.ir-btn.press { border-color: var(--bad); color: var(--bad); }
.ir-end { border-radius: var(--r-s); padding: 12px 14px; margin-top: 8px; background: var(--sunk); border-left: 4px solid var(--muted); }
.ir-end.good { border-left-color: var(--good); } .ir-end.bad { border-left-color: var(--bad); } .ir-end.mid { border-left-color: var(--warn); }
.ir-end p { margin: 4px 0 8px; font-size: 14px; }
.ir-tl { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 3px solid var(--line); display: grid; gap: 10px; }
.ir-tl li { position: relative; display: grid; gap: 2px; font-size: 14px; }
.ir-tl li::before { content: ""; position: absolute; left: -26px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
/* finance tools */
.fp-q { display: grid; gap: 8px; margin-bottom: 10px; }
.fp-q b { font-size: 14px; }
.fp-res { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.fp-res li { display: grid; gap: 2px; font-size: 14px; }
.fp-out { background: var(--sunk); border-radius: var(--r-s); padding: 12px 14px; }
.bb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .bb-grid, .bs-grid, .dg-grid { grid-template-columns: minmax(0, 1fr) !important; } }
.bb-sl { display: grid; gap: 6px; }
.bb-sl label { display: grid; grid-template-columns: 150px minmax(0, 1fr) 70px; gap: 8px; align-items: center; font-size: 13.5px; }
.bb-sl label b { text-align: right; font-family: var(--f-mono); font-size: 12.5px; }
.bb-h { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 6px; }
.bb-sl .bb-react { display: flex; gap: 8px; grid-template-columns: none; }
.bb-bars { display: grid; gap: 10px; }
.bb-bars > div { display: grid; grid-template-columns: 95px minmax(0, 1fr) 70px; gap: 8px; align-items: center; font-size: 13.5px; font-weight: 600; }
.bb-track { height: 22px; background: var(--sunk); border-radius: 6px; display: flex; overflow: hidden; }
.bb-track i { display: block; height: 100%; }
.bb-res { display: grid; gap: 2px; margin: 10px 0 0; padding: 10px 14px; border-radius: var(--r-s); background: var(--sunk); border-left: 4px solid var(--muted); font-size: 14px; }
.bb-res.ok { border-left-color: var(--good); } .bb-res.bad { border-left-color: var(--bad); }
.bb-note { font-size: 13.5px; color: var(--muted); margin: 8px 0 0; }
.dg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.dg-grid svg { width: 100%; height: auto; display: block; }
.stmt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.stmt { background: var(--surface); border-radius: var(--r); overflow: hidden; font-size: 13.5px; box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); }
.stmt-t { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--surface)), color-mix(in srgb, var(--c3) 10%, var(--surface))); padding: 10px 14px; font-weight: 800; font-family: var(--f-display); font-size: 15px; border-bottom: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.stmt-t small { display: block; font-weight: 500; color: var(--muted); font-family: var(--f-ui); font-size: 12px; margin-top: 2px; }
.stmt table { width: 100%; border-collapse: collapse; }
.stmt td { padding: 6px 14px; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.stmt td.num { text-align: right; font-family: var(--f-mono); white-space: nowrap; }
.stmt td i { color: var(--muted); }
.stmt tr.sub td, .stmt tr.bold td { font-weight: 800; }
.stmt tr.tot td { background: color-mix(in srgb, var(--c3) 8%, transparent); }
.stmt tr.tot td.num { border-top: 1.5px solid var(--ink); }
.stmt tr.tot.bold td { background: color-mix(in srgb, var(--c4) 24%, transparent); }
.stmt tr.tot.bold td:first-child { box-shadow: inset 4px 0 0 var(--c4); }
.stmt tr.unitrow td { font-size: 11.5px; font-weight: 800; color: var(--muted); padding-top: 6px; padding-bottom: 4px; border-bottom: 0; }
.stmt tr.h td { font-weight: 800; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); padding-top: 8px; padding-bottom: 5px; }
.stmt tr.hi td { background: color-mix(in srgb, var(--c4) 24%, transparent); }
.stmt tr:last-child td { border-bottom: 0; }
.stmt tr.new td { animation: say-pop .4s ease; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.stmt tr.next td { color: var(--muted); font-style: italic; }
.stmt-note { margin-top: 10px; background: var(--sunk); border-radius: var(--r-s); padding: 10px 14px; font-size: 14px; }
.stmt-diff { margin: 10px 0 0; padding-left: 20px; font-size: 14px; display: grid; gap: 4px; }
.bs-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.bs-side { display: grid; gap: 8px; }
.bs-why { margin: 0; font-size: 14px; }
.bs-msg { margin: 0; font-size: 13.5px; color: var(--warn); font-weight: 600; }
.bs-pool { display: flex; flex-wrap: wrap; gap: 6px; }
.bs-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 600; }
.bs-chip:hover { border-color: var(--accent); }
.rc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.rc-head b { font-size: 16px; text-align: center; }
.rc-data { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.rc-r { border-radius: var(--r-s); padding: 8px 10px; display: grid; gap: 2px; background: var(--sunk); border-top: 4px solid var(--muted); }
.rc-r span { font-size: 12px; font-weight: 700; color: var(--muted); }
.rc-r b { font-size: 20px; font-family: var(--f-display); }
.rc-r small { font-size: 11px; color: var(--muted); font-family: var(--f-mono); }
.rc-r.ok { border-top-color: var(--good); } .rc-r.mid { border-top-color: var(--warn); } .rc-r.bad { border-top-color: var(--bad); }
.rc-why { margin-top: 10px; background: var(--sunk); border-radius: var(--r-s); padding: 10px 14px; font-size: 14px; }
.rc-why summary { cursor: pointer; font-weight: 700; }
/* ratio detective: statements with the source lines lit up */
.rc-stmts { margin-bottom: 10px; }
.rc-stmts .stmt { font-size: 12.5px; }
.rc-stmts .stmt td { padding: 4px 10px; }
.stmt tr.src td { background: color-mix(in srgb, var(--c5) 30%, var(--surface)) !important; box-shadow: inset 4px 0 0 var(--c5); font-weight: 800; }
.rc-tip { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
button.rc-r { font: inherit; text-align: left; cursor: pointer; border: 0; }
.rc-r.on { outline: 3px solid var(--c5); outline-offset: 1px; }
.rc-calc { margin-top: 10px; padding: 10px 14px; border-radius: var(--r-s); background: color-mix(in srgb, var(--c5) 14%, var(--surface)); font-size: 14px; font-family: var(--f-mono); line-height: 1.6; }
.rc-calc b { font-family: var(--f-ui); }
.rg { display: grid; gap: 6px; font-size: 14.5px; }
.rg p { margin: 0; }
.rg-f { font-family: var(--f-mono); font-size: 13.5px; background: var(--sunk); padding: 8px 12px; border-radius: 8px; }
.rg-fix { background: color-mix(in srgb, var(--good) 10%, var(--surface)); border-left: 4px solid var(--good); padding: 8px 12px; border-radius: 0 8px 8px 0; }
.rg-fix ul { margin: 4px 0 0; padding-left: 18px; }
/* IB layout cash flow forecast */
.cf-ib { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); }
.cf-t { padding: 10px 14px; font-weight: 800; font-family: var(--f-display); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--surface)), color-mix(in srgb, var(--c3) 10%, var(--surface))); border-bottom: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.cf-ib table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cf-ib td { border: 1px solid var(--line); padding: 4px 10px; }
.cf-ib td.num { text-align: right; font-family: var(--f-mono); min-width: 72px; }
.cf-ib tr.cf-h td { font-weight: 800; background: var(--sunk); }
.cf-ib tr.b td { background: color-mix(in srgb, var(--c3) 7%, transparent); }
.cf-ib tr.gap td { height: 12px; padding: 0; border-left-color: transparent; border-right-color: transparent; }
.cf-ib tr.close td { background: color-mix(in srgb, var(--c4) 24%, transparent); font-weight: 800; }
.cf-ib td.neg { color: var(--bad); font-weight: 800; }
.cf-ib tr.hi td { background: color-mix(in srgb, var(--c5) 18%, transparent); }
.al-note { margin: 10px 0 0; font-size: 14px; background: var(--sunk); padding: 10px 14px; border-radius: var(--r-s); }
/* NPV table, styled like the other statements */
.npv-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); }
.npv { border-collapse: collapse; width: 100%; font-size: 13.5px; min-width: 520px; }
.npv th { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--surface)), color-mix(in srgb, var(--c3) 10%, var(--surface))); color: var(--ink); padding: 9px 12px; text-align: right; font-weight: 800; border-bottom: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.npv th:first-child, .npv td:first-child { text-align: left; }
.npv td { padding: 6px 12px; text-align: right; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); font-family: var(--f-mono); }
.npv th.npv-w, .npv td.npv-w { text-align: left; }
.npv td.npv-w span { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12.5px; background: color-mix(in srgb, var(--c5) 14%, var(--surface)) !important; color: var(--ink); }
.npv tr.npv-tot td { font-weight: 800; background: color-mix(in srgb, var(--c3) 8%, transparent); border-top: 1.5px solid var(--ink); }
.npv tr.npv-res td { font-weight: 800; }
.npv tr.npv-res.ok td { background: color-mix(in srgb, var(--good) 14%, var(--surface)); }
.npv tr.npv-res.bad td { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.npv tr.npv-res td:first-child { box-shadow: inset 4px 0 0 var(--c4); }
.npv tr:last-child td { border-bottom: 0; }
.npv td.npv-w { font-family: var(--f-ui); font-weight: 600; color: var(--muted); }
.inv-m { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.inv-m > div { background: var(--sunk); border-radius: var(--r-s); padding: 8px 14px; display: grid; }
.inv-m span { font-size: 12px; color: var(--muted); font-weight: 700; }
.inv-m b { font-size: 20px; font-family: var(--f-display); }
/* BCG matrix widget */
.bcg-ex { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.bcg-ex button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px; font-weight: 600; font-size: 13px; }
.bcg-ex button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.widget svg.bcg-m, .widget svg.bcg-path { width: 100%; height: auto; display: block; }
.bcg-h { margin: 22px 0 6px; font-size: 16px; }
.bcg-note { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
/* example business plans */
.bp { display: grid; gap: 12px; margin-top: 18px; }
.bp-head { display: grid; gap: 8px; }
.bp-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.bp-tabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 14px; font-weight: 600; font-size: 14px; }
.bp-tabs button[aria-selected="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.bp-card { background: var(--surface); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.bp-card h4 { margin: 0; font-size: 20px; }
.bp-kind { margin: 2px 0 12px; color: var(--muted); font-size: 14px; }
.bp-list { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; line-height: 1.55; }
.bp-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.contact form { display: grid; gap: 12px; }
.contact label { display: grid; gap: 5px; font-size: 13.5px; font-weight: 600; }
.contact .field { width: 100%; font-weight: 400; font-family: var(--f-ui); }
.contact select.field { padding-block: 8px; }
.ct-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ct-err { margin: 0; color: var(--bad); font-weight: 600; font-size: 14px; }
.ct-note { font-size: 13.5px; color: var(--good); font-weight: 600; }
/* small symbols in diagram legends keep their own size */
.widget svg.sym, .legend svg.sym { width: auto; height: auto; min-width: 0; flex: none; display: inline-block; vertical-align: middle; }
/* ---------- question generator ---------- */
.practice#gen { margin-top: 44px; display: grid; gap: 14px; }
.gen-head { display: flex; justify-content: space-between; align-items: end; gap: 14px; flex-wrap: wrap; }
.gen-head h2 { font-size: 28px; font-weight: 800; }
.gen-head p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; max-width: 46ch; }
.gen-ctl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gen-ctl .seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(23, 32, 51, .12); }
.gen-meta { display: flex; gap: 6px 16px; align-items: center; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.gen-meta b { color: var(--ink); font-family: var(--f-mono); }
.gen-meta .lv-note { background: var(--sunk); padding: 2px 10px; border-radius: 99px; font-weight: 600; font-size: 12.5px; }
.gen-list { display: grid; gap: 14px; }
.gen-keep { margin: 10px 0 6px; font-size: 13px; color: var(--muted); }
.gen-empty { text-align: center; padding: 34px 20px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); color: var(--muted); }
.gen-done { padding: 14px 16px; border-radius: var(--r-s); background: color-mix(in srgb, var(--good) 13%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 35%, transparent); font-size: 14.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gq:first-child { animation: genin .4s ease; }
@keyframes genin { from { transform: translateY(-6px); opacity: .4; } to { transform: none; opacity: 1; } }
.lvp { font-family: var(--f-ui); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; letter-spacing: .03em; }
.lvp.lv-L { background: color-mix(in srgb, var(--c1) 16%, transparent); color: var(--accent); }
.lvp.lv-M { background: color-mix(in srgb, var(--c4) 22%, transparent); color: color-mix(in srgb, var(--warn) 85%, var(--ink)); }
.lvp.lv-H { background: color-mix(in srgb, var(--c2) 18%, transparent); color: color-mix(in srgb, var(--c2) 80%, var(--ink)); }
.tool-panel .practice#gen { margin-top: 36px; }
/* automatic answer check */
.fb { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--r-s); background: var(--sunk); }
.fb-top { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.fb-top p { margin: 2px 0 0; font-size: 13px; color: var(--muted); max-width: 60ch; }
.fb-top .btn { margin-left: auto; }
.fb-mark { font-family: var(--f-display); font-size: 34px; font-weight: 800; line-height: 1; color: var(--accent); }
.fb-mark small { font-size: 16px; color: var(--muted); }
.fb-ans { background: var(--surface); border-radius: var(--r-s); padding: 12px 14px; font-size: 15px; line-height: 1.75; }
.g-idea { background: color-mix(in srgb, var(--good) 22%, transparent); border-radius: 3px; padding: 0 1px; }
.g-sign { background: color-mix(in srgb, var(--c3) 22%, transparent); border-radius: 3px; padding: 0 1px; font-weight: 600; }
.g-link { background: color-mix(in srgb, var(--c4) 30%, transparent); border-radius: 3px; padding: 0 1px; }
.g-app { box-shadow: inset 0 -2px 0 var(--c5); font-weight: 600; }
.g-ok { background: color-mix(in srgb, var(--good) 25%, transparent); color: var(--good); font-weight: 700; border-radius: 3px; padding: 0 2px; }
.g-num { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); border-radius: 3px; padding: 0 2px; }
.g-bad { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1.5px; border-radius: 3px; padding: 0 2px; }
.fb-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; }
.fb-legend span { padding: 1px 6px; }
.fb-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.fb-checks li::before { display: inline-block; width: 20px; font-weight: 800; }
.fb-checks li.ok::before { content: "✓"; color: var(--good); }
.fb-checks li.no::before { content: "✗"; color: var(--bad); }
.fb-checks li.na::before { content: "–"; color: var(--muted); }
.fb-miss { margin: 0; font-size: 13.5px; color: var(--muted); }
.fb-empty { margin: 0; color: var(--muted); }
.auto-sum { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; width: 100%; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; }
/* case for High-level practice questions */
.gen-case { margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--sunk); }
.gen-case summary { cursor: pointer; padding: 10px 14px; font-weight: 700; font-size: 14px; color: var(--accent); }
.gen-case .stim { position: static; max-height: none; overflow: visible; box-shadow: none; margin: 0 8px 8px; padding: 16px 18px; font-size: 15.5px; }
.gen-case .stim .fig svg { max-width: 560px; }
/* common mistakes */
.mistakes { list-style: none; padding: 0; margin: 4px 0 12px; display: grid; gap: 6px; }
.mistakes li { position: relative; padding-left: 24px; font-size: 14.5px; }
.mistakes li::before { content: '✕'; position: absolute; left: 4px; top: 0; color: var(--bad); font-weight: 800; }
.callout.mistake-box { border-left: 4px solid var(--bad); }
/* grades */
.grade-row { display: flex; gap: 18px; align-items: center; width: 100%; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.grade-badge { display: grid; justify-items: center; gap: 2px; min-width: 96px; padding: 10px 14px; border-radius: var(--r-s); background: color-mix(in srgb, var(--gc) 26%, var(--surface)); border: 2px solid var(--gc); }
.grade-badge b { font-family: var(--f-display); font-size: 44px; font-weight: 800; line-height: 1; }
.grade-info { flex: 1; min-width: 240px; display: grid; gap: 8px; }
.grade-info p { margin: 0; font-size: 14px; color: var(--muted); }
.grade-strip { position: relative; display: flex; height: 26px; border-radius: 8px; overflow: visible; }
.grade-strip span { display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #1f2937; opacity: .45; }
.grade-strip span:first-child { border-radius: 8px 0 0 8px; } .grade-strip span:last-of-type { border-radius: 0 8px 8px 0; }
.grade-strip span.on { opacity: 1; box-shadow: inset 0 0 0 2px #1f293755; }
.grade-strip i { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.gb-wrap { display: grid; gap: 10px; }
.gb-tables { display: flex; flex-wrap: wrap; gap: 16px; }
.gb-col { flex: 1 1 300px; max-width: 620px; display: grid; gap: 8px; } .gb-col h3 { margin: 0; font-size: 17px; }
.gb-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-size: 15px; }
.gb-table th, .gb-table td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.gb-table th + th, .gb-table td + td { border-left: 1px solid var(--line); }
.gb-table thead th { background: var(--sunk); font-weight: 700; } .gb-table th small { font-weight: 500; color: var(--muted); }
.gb-table tbody tr:last-child td { border-bottom: 0; }
.gdot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 10px; vertical-align: 0; }
.gb-note { margin: 0; max-width: 620px; font-size: 14px; color: var(--muted); }
.pe-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; position: relative; padding: 10px 12px; margin: 2px -4px 0; border-radius: var(--r-s); background: color-mix(in srgb, var(--uc) 9%, var(--surface)); }
.pe-l { font-size: 13px; font-weight: 700; margin-right: auto; }
.pe-l small { font-weight: 500; color: var(--muted); }
.pe-btn { border: 0; border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.pe-btn.lv-L { background: color-mix(in srgb, var(--c1) 18%, var(--surface)); color: var(--accent); }
.pe-btn.lv-M { background: color-mix(in srgb, var(--c4) 24%, var(--surface)); color: color-mix(in srgb, var(--warn) 85%, var(--ink)); }
.pe-btn.lv-H { background: color-mix(in srgb, var(--c2) 20%, var(--surface)); color: color-mix(in srgb, var(--c2) 80%, var(--ink)); }
.pe-btn:hover { filter: brightness(.95); }
.pe-btn.going { box-shadow: inset 0 0 0 2px currentColor; }
.lt-card { gap: 6px; }
.lt-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); position: relative; z-index: 1; }
.lt-row .status { flex: 1; font-size: 12.5px; }
.lt-btns { display: flex; gap: 6px; }
.lt-btns .btn { padding: 5px 12px; font-size: 13px; }
details.samples { margin-top: 30px; }
details.samples summary { cursor: pointer; list-style: none; }
details.samples summary::-webkit-details-marker { display: none; }
details.samples summary h2::before { content: "▸ "; color: var(--muted); }
details.samples[open] summary h2::before { content: "▾ "; }
.rw-wrap { display: grid; gap: 12px; margin: 30px 0 6px; }
.rw { position: relative; background: color-mix(in srgb, var(--c4) 20%, var(--surface)); border-left: 4px solid var(--c4); border-radius: 0 var(--r-s) var(--r-s) 0; padding: 14px 16px; font-size: 15.5px; line-height: 1.6; display: grid; gap: 4px; }
.rw b { font-size: 16px; }
.rw p { margin: 0 !important; }
.rw-tag { justify-self: start; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: color-mix(in srgb, var(--c4) 55%, var(--ink)); }
.model .rule { margin: 0; font-size: 15px; }
.model .cmd { margin: 0; font-size: 15px; } .model .cmd b { color: var(--accent); }
.model .mistakes { margin: 0; }
.model .ideas { margin: 0; padding-left: 20px; display: grid; gap: 3px; }
.model .ideas-t { margin: 4px 0 2px; font-weight: 700; font-size: 14px; }
.model .ex p { margin: 0; }
.model .ex p + p { margin-top: 14px; }
.model .ex strong { color: var(--accent); font-weight: 700; }
.hint { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-s); background: color-mix(in srgb, var(--c4) 16%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c4) 45%, transparent); font-size: 14px; line-height: 1.5; }
.hint svg { flex: none; color: color-mix(in srgb, var(--c4) 70%, var(--ink)); margin-top: 1px; }
.hint b { color: color-mix(in srgb, var(--c4) 55%, var(--ink)); }
@media (prefers-reduced-motion: reduce) { .gq:first-child { animation: none; } }

.npv td[colspan] { font-family: var(--f-ui); }

/* ----- simpler builders: tables, force field, Gantt cells, network form ----- */
.tb-wrap { overflow-x: auto; }
.tb, .gg, .ws-tbl { border-collapse: collapse; font-size: 13.5px; }
.tb th, .tb td, .ws-tbl th, .ws-tbl td { border: 1px solid var(--line); padding: 5px 7px; text-align: center; }
.tb th:first-child, .ws-tbl th { text-align: left; white-space: nowrap; background: var(--surface-2, color-mix(in srgb, var(--ink) 4%, transparent)); }
.tb input { width: 78px; padding: 5px 6px; text-align: right; font-variant-numeric: tabular-nums; }
.tb-chart { margin: 10px 0 4px; }
.bd-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }
.ff-grid { display: grid; grid-template-columns: 1fr minmax(120px, 0.6fr) 1fr; gap: 10px; align-items: stretch; margin-top: 10px; }
.ff-side { border: 2px dashed var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.ff-side.over { border-color: var(--accent); background: var(--accent-soft); }
.ff-h { font-weight: 800; font-size: 14px; display: grid; } .ff-h span { font-weight: 500; font-size: 12px; color: var(--muted); }
.ff-side[data-side="d"] .ff-h { color: var(--c1); } .ff-side[data-side="r"] .ff-h { color: var(--c2); text-align: right; }
.ff-change { display: grid; place-content: center; text-align: center; gap: 4px; border: 2px solid var(--ink); border-radius: 12px; padding: 10px; background: var(--surface); }
.ff-change span { font-size: 12px; color: var(--muted); }
.ff-card { border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: var(--surface); display: grid; gap: 5px; font-size: 13px; }
.ff-top { display: flex; align-items: start; gap: 6px; }
.ff-arrow { height: 10px; border-radius: 2px; position: relative; transition: width .2s; }
.ff-card.d .ff-arrow { background: var(--c1); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); }
.ff-card.r .ff-arrow { background: var(--c2); margin-left: auto; clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%); }
.ff-score { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.ff-score button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 12.5px; }
.ff-score button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.ff-tot { margin-top: auto; font-size: 13px; }
.ff-side[data-side="r"] .ff-tot { text-align: right; }
@media (max-width: 640px) { .ff-grid { grid-template-columns: 1fr; } .ff-change { order: -1; } .ff-side[data-side="r"] .ff-h, .ff-side[data-side="r"] .ff-tot { text-align: left; } }
.gg th { font-size: 12px; font-weight: 700; padding: 3px; color: var(--muted); }
.gg tr > th:first-child { text-align: left; white-space: nowrap; padding-right: 10px; color: var(--ink); font-size: 13px; }
.gg th span { font-weight: 500; color: var(--muted); font-size: 12px; }
.gg td { padding: 2px; }
.gg-c { width: 30px; height: 26px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: block; }
.gg-c:hover { border-color: var(--c3); background: color-mix(in srgb, var(--c3) 15%, transparent); }
.gg-c[aria-pressed="true"] { background: var(--c3); border-color: var(--c3); }
.nw-form { display: grid; gap: 8px; margin-top: 8px; }
.nw-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.nw-row { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 5px 8px; font-size: 13px; }
.nw-row label { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.nw-row input { width: 46px; padding: 4px 5px; text-align: center; }
.nw-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nw-a { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 2px 2px 2px 8px; font-size: 13px; font-weight: 600; }
.bd-ro .nw-acts, .bd-ro .bd-msg { display: none; }
.bd-ro .tb input, .bd-ro .nw-row input, .bd-ro .bd-fields input, .bd-ro .ff-score button, .bd-ro .gg-c, .bd-ro .tr-x { pointer-events: none; }
.bd-ro .tr-x { display: none; }
/* worked statistics */
.ws-nums { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.ws-nums span { min-width: 40px; text-align: center; padding: 6px 8px; border-radius: 8px; background: color-mix(in srgb, var(--c3) 14%, transparent); font-weight: 700; font-variant-numeric: tabular-nums; }
.ws-tip { font-size: 13.5px; color: var(--muted); margin: 6px 0; }
.ws-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.ws-work { display: grid; gap: 6px; }
.ws-step { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; align-items: baseline; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.ws-step span { font-size: 13.5px; color: var(--muted); }
.ws-step em { font-style: normal; font-weight: 800; white-space: nowrap; }
@media (max-width: 560px) { .ws-step { grid-template-columns: 1fr; gap: 2px; } }
.ws-tbl td { font-variant-numeric: tabular-nums; min-width: 36px; }
.ff-pal { display: flex; flex-wrap: wrap; gap: 6px; }
.ff-pal .bd-chip { width: auto; }
.ff-tot b { display: inline; }

/* ----- block builders: break-even blocks, Gantt bars, network steps ----- */
.be-chip { border-left: 4px solid var(--c); }
.be-chart { border: 2px dashed transparent; border-radius: 12px; overflow-x: auto; margin: 8px 0; }
.be-chart.over { border-color: var(--accent); background: var(--accent-soft); }
.be-cards { display: grid; gap: 6px; }
.be-card { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 10px; padding: 6px 8px 6px 10px; font-size: 13.5px; background: var(--surface); }
.be-card b { min-width: 130px; }
.be-card label { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.be-card input { width: 92px; padding: 5px 6px; text-align: right; font-variant-numeric: tabular-nums; }
.gb-wrap { overflow-x: auto; padding-bottom: 4px; }
.gb { display: grid; gap: 4px; min-width: max-content; }
.gb-head, .gb-row { display: grid; grid-template-columns: 190px auto; align-items: center; gap: 8px; }
.gb-lab { font-size: 13px; display: grid; line-height: 1.25; }
.gb-lab small { color: var(--muted); font-size: 11.5px; }
.gb-head .gb-lab { font-weight: 700; color: var(--muted); }
.gb-weeks { display: grid; grid-template-columns: repeat(var(--n), var(--cw)); font-size: 11.5px; font-weight: 700; color: var(--muted); text-align: center; }
.gb-track { position: relative; display: grid; grid-template-columns: repeat(var(--n), var(--cw)); height: 34px; }
.gb-c { height: 34px; border: 0; border-left: 1px solid var(--line); background: transparent; cursor: pointer; padding: 0; }
.gb-c:nth-child(odd) { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.gb-c:hover { background: color-mix(in srgb, var(--c3) 18%, transparent); }
.gb-bar { position: absolute; top: 4px; height: 26px; margin-left: 2px; border-radius: 6px; color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; padding-left: 8px; cursor: grab; touch-action: none; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.gb-bar:active { cursor: grabbing; transition: none; }
.gb-ghost { position: absolute; top: 4px; left: 2px; height: 26px; border: 2px dashed var(--line); border-radius: 6px; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; padding: 0 6px; white-space: nowrap; pointer-events: none; }
.nw-step { margin: 6px 0 0; font-size: 14px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); }
.bd-ro .nw-step, .bd-ro .gb-ghost, .bd-ro .bd-pl, .bd-ro .be-card .tr-x { display: none; }
.bd-ro .be-card input, .bd-ro .gb-c, .bd-ro .gb-bar { pointer-events: none; }
@media (max-width: 560px) { .gb-head, .gb-row { grid-template-columns: 120px auto; } }
.nw-row b { white-space: nowrap; }
.nw-nodes { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }

/* ----- unit 4 visuals ----- */
.pc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.pc > div { border-radius: 10px; padding: 8px 12px; border-top: 4px solid; background: var(--surface); border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pc-p { border-top-color: var(--good) !important; } .pc-c { border-top-color: var(--bad) !important; }
.pc-p b { color: var(--good); } .pc-c b { color: var(--bad); }
.pc ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
@media (max-width: 560px) { .pc { grid-template-columns: 1fr; } }
.seg-chain { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 8px; }
.seg-chain span { border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-weight: 700; font-size: 13.5px; background: var(--surface); }
.seg-chain span.t { background: var(--c2); color: #fff; border-color: var(--c2); }
.seg-chain i { font-style: normal; font-size: 12.5px; color: var(--muted); padding-left: 18px; }
.seg-chain i::before { content: "↓ "; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.sc-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); }
.sc-box svg { width: 100%; height: auto; display: block; margin: 4px 0; }
.sc-box p { margin: 0; font-size: 13.5px; }
.rm-tree { display: grid; gap: 8px; }
.rm-top { justify-self: center; background: var(--ink); color: var(--surface); font-weight: 800; padding: 6px 16px; border-radius: 10px; }
.rm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rm-col { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; border-radius: 12px; padding: 10px; border: 2px solid; }
.rm-col.p { border-color: var(--c3); background: color-mix(in srgb, var(--c3) 7%, transparent); }
.rm-col.s { border-color: var(--c4); background: color-mix(in srgb, var(--c4) 7%, transparent); }
.rm-h { width: 100%; display: grid; margin-bottom: 2px; } .rm-h span { font-size: 12.5px; color: var(--muted); }
.rm-n { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px 10px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.rm-n[aria-pressed="true"] { color: #fff; } .rm-n.p[aria-pressed="true"] { background: var(--c3); border-color: var(--c3); } .rm-n.s[aria-pressed="true"] { background: var(--c4); border-color: var(--c4); }
.rm-card { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; border-left: 5px solid var(--c3); } .rm-card.s { border-left-color: var(--c4); }
.rm-card h4 { margin: 4px 0; } .rm-card p { margin: 4px 0; }
.rm-tags { display: flex; gap: 6px; } .rm-tags span { font-size: 11.5px; font-weight: 700; border-radius: 99px; padding: 2px 8px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.rm-ex { font-size: 14px; color: var(--muted); }
.rm-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 6px; font-size: 13.5px; }
.rm-grid > b { align-self: center; } .rm-grid > div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); }
@media (max-width: 560px) { .rm-cols { grid-template-columns: 1fr; } .rm-grid { grid-template-columns: 1fr 1fr; } .rm-grid > span { display: none; } .rm-grid > b:nth-child(4), .rm-grid > b:nth-child(7) { grid-column: 1 / -1; } }
.em-scale { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 0 2px 4px; border-bottom: 3px solid; border-image: linear-gradient(90deg, var(--good), var(--warn, #d08b2c), var(--bad)) 1; margin-bottom: 8px; }
.em-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; align-items: end; }
.em-b { display: grid; justify-items: center; gap: 4px; border: 0; background: none; cursor: pointer; padding: 0; font-weight: 700; font-size: 12.5px; color: var(--ink); }
.em-b i { display: block; width: 100%; height: var(--h); border-radius: 8px 8px 3px 3px; background: color-mix(in srgb, var(--c3) 35%, transparent); transition: background .15s; }
.em-b[aria-pressed="true"] i { background: var(--c3); } .em-b[aria-pressed="true"] span { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) { .em-row { grid-template-columns: repeat(3, 1fr); } }

/* ----- unit 5 visuals ----- */
.u5-btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.u5-b { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 14px; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--ink); }
.u5-b[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pc-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 680px) { .pc-wrap { grid-template-columns: 1fr; } }
.pc-fb p, .lp-main p.ok, .lp-main p.bad { margin: 6px 0; }
.pc-fb .ok, .lp-main .ok, .cg-log .ok, .jj .ok { color: var(--good); }
.pc-fb .bad, .lp-main .bad, .cg-log .bad, .jj .bad { color: var(--bad); }
.u5-nav { display: flex; gap: 8px; margin-top: 8px; }
.lp-sites { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0; }
@media (max-width: 600px) { .lp-sites { grid-template-columns: 1fr; } }
.lp-site { text-align: left; border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px; cursor: pointer; display: grid; gap: 4px; color: var(--ink); }
.lp-site span { font-size: 12.5px; color: var(--muted); }
.lp-site.ok { border-color: var(--good); background: color-mix(in srgb, var(--good) 10%, var(--surface)); }
.lp-site.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
.lp-t tr.lp-off td { color: var(--muted); opacity: .6; }
.lp-t td.num { position: relative; }
.lp-tot td i { display: block; height: 5px; border-radius: 3px; background: var(--c3); margin-top: 3px; margin-left: auto; }
.sch-row { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.sch-box { flex: 1; min-width: 100px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--surface); display: grid; gap: 3px; align-content: start; }
.sch-box span { font-size: 12.5px; color: var(--muted); }
.sch-ar { align-self: center; font-style: normal; font-weight: 800; color: var(--c3); }
.sch-ar.far { color: var(--c2); letter-spacing: 3px; }
.sch-time { margin: 6px 0; font-size: 14px; }
.jj { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.jj-side { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface); }
.jj-side h4 { margin: 0 0 6px; } .jj-side p { margin: 6px 0 0; font-size: 13.5px; }
.jj-store { display: flex; flex-wrap: wrap; gap: 4px; min-height: 52px; padding: 6px; border: 2px dashed var(--line); border-radius: 8px; align-content: flex-start; }
.jj-store i { width: 20px; height: 20px; border-radius: 4px; display: block; }
.om { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 8px; }
.om-c { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface); display: grid; gap: 4px; }
.om-c em { font-style: normal; font-weight: 800; font-size: 20px; }
.om-c p { margin: 0; font-size: 13px; }
.om-bar { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.om-bar i { display: block; height: 100%; background: var(--c3); border-radius: 4px; transition: width .2s; }
.cg-prep { display: grid; gap: 6px; margin: 6px 0; }
.cg-opt { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); font-size: 14px; }
.cg-opt b { margin-left: auto; }
.cg-m { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.cg-m > div { display: grid; gap: 3px; font-size: 13px; } .cg-m span { color: var(--muted); }
.cg-ans { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; margin: 6px 0; font-size: 14px; cursor: pointer; color: var(--ink); }
.cg-ans:hover { border-color: var(--c3); background: color-mix(in srgb, var(--c3) 8%, var(--surface)); }
.cg-log { padding-left: 18px; } .cg-log li { margin: 4px 0; }
.rd-fun { display: grid; gap: 4px; justify-items: center; }
.rd-fun > div { width: var(--w); background: color-mix(in srgb, var(--c5) 18%, var(--surface)); border: 1px solid var(--c5); border-radius: 8px; padding: 5px 10px; display: flex; gap: 8px; align-items: baseline; justify-content: center; font-size: 13.5px; }
.rd-fun b { font-size: 16px; }
.mf { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.mf-s { flex: 1; min-width: 120px; text-align: left; border: 2px solid var(--c); border-radius: 12px; padding: 8px; background: color-mix(in srgb, var(--c) 8%, var(--surface)); display: grid; gap: 4px; align-content: start; cursor: pointer; color: var(--ink); }
.mf-s.on { background: color-mix(in srgb, var(--c) 24%, var(--surface)); }
.mf-s span { font-size: 12.5px; background: var(--surface); border-radius: 6px; padding: 2px 6px; }
.mf-s em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--bad); }
.mf-ar { align-self: center; font-style: normal; font-weight: 800; color: var(--muted); }

/* contact page: notes for schools and free access, then the two forms */
.ct-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ct-note-card { background: color-mix(in srgb, var(--crane) 8%, var(--surface)); border-left: 4px solid var(--crane); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); }
.ct-note-card b { font-family: var(--f-display); font-size: 16px; }
.ct-note-card p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.ct-grid .sheet.contact { max-width: none; }
.ct-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.ct-head h2 { margin: 0; font-size: 20px; }
.ct-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }

/* footer and privacy policy */
.site-foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 18px 0 26px; font-size: 13.5px; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.site-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.site-foot a[hidden] { display: none; }
/* page links (menu, section lists, contents, previous and next) look like the buttons they replaced */
.nav a, .toc a, a.sec-link, .qnav a.btn { text-decoration: none; }
.nav a { display: inline-block; cursor: pointer; }
a.sec-link { color: inherit; }
.toc a { cursor: pointer; }
.site-foot button { border: 0; background: none; padding: 0; color: var(--muted); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.site-foot button:hover, .site-foot a:hover { color: var(--ink); }
.policy { max-width: 72ch; }
.policy h2 { font-size: 21px; margin-top: 26px; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.hero p.hero-lead { color: var(--ink); font-size: 21px; font-weight: 600; margin-top: 12px; }

/* unit practice exams on the Exams page */
.pe-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-bottom: 26px; }
.pe-unit { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; background: var(--surface); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); border-left: 4px solid var(--uc); }
.pe-unit .unit-num { width: 30px; height: 30px; font-size: 15px; background: var(--uc); }
.pe-unit b { font-size: 14.5px; }
.pe-unit .pe-btns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.pe-unit.flash { animation: pe-flash 1.6s ease; }
@keyframes pe-flash { 0%, 60% { box-shadow: 0 0 0 3px var(--uc); } 100% { box-shadow: var(--shadow); } }
.pe-go { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; width: 100%; text-align: left; }
.pe-go:hover { border-color: var(--uc); color: var(--uc); }

/* distribution channel chain (4.5) */
.ch-chain { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; padding: 4px 0 8px; }
.ch-box { flex: 1; min-width: 120px; border: 2px solid var(--c3); border-radius: 12px; padding: 8px 10px; background: color-mix(in srgb, var(--c3) 7%, var(--surface)); display: grid; gap: 3px; align-content: start; }
.ch-box.end { border-color: var(--c1); background: color-mix(in srgb, var(--c1) 8%, var(--surface)); }
.ch-box span { font-size: 12.5px; color: var(--muted); }
.ch-box em { font-style: normal; font-weight: 800; font-size: 13.5px; color: var(--c3); }
.ch-ar { align-self: center; font-style: normal; font-weight: 800; color: var(--muted); }

/* free and paid (access.js) */
/* locked items: grayed out, still clickable so they lead to the unlock box */
.is-locked > .sec-link, .pe-go.is-locked { opacity: .5; filter: grayscale(1); }
.is-locked > .sec-link:hover, .pe-go.is-locked:hover { opacity: .75; }
.pe-go.is-locked { display: flex; align-items: center; gap: 8px; }
.nav a.nav-locked { opacity: .45; display: inline-flex; align-items: center; gap: 5px; }
.nav a.nav-locked .lock-i { margin: 0; }
.nav a.nav-locked:hover { opacity: .7; }
/* the full access bar */
.promo { background: linear-gradient(115deg, #123f52, #1f6f8b 55%, #c2412f); color: #fff; border-radius: var(--r); margin: 22px 0 26px; overflow: hidden; box-shadow: 0 14px 34px -18px rgba(18, 63, 82, .9); }
/* two sides with a divider: price, trial and the free access bubble on the left, the key button on the right */
.promo-in { padding: 22px 26px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); align-items: center; }
.promo-main { display: grid; gap: 8px; justify-items: start; padding-right: 28px; }
.promo-side { display: grid; gap: 10px; align-content: center; padding-left: 28px; border-left: 1px solid rgba(255, 255, 255, .3); align-self: stretch; }
.promo-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.promo-price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.promo-price { margin: 0; font-family: var(--f-display); font-size: 20px; font-weight: 600; white-space: nowrap; }
.promo-price b { font-size: 38px; line-height: 1.1; }
.promo-small { font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .78); }
.promo-pitch { margin: 0; font-size: 15.5px; color: rgba(255, 255, 255, .92); max-width: 60ch; }
.promo-buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 4px; }
.promo-buy-row .promo-small { max-width: 240px; }.promo .btn.promo-buy { background: #fff; color: #123f52; border-color: #fff; font-size: 16px; padding: 11px 24px; box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .6); text-decoration: none; }
.promo .btn.promo-buy:hover { transform: translateY(-1px); }
.promo .btn.promo-key { justify-content: center; background: rgba(255, 255, 255, .12); color: #fff; border: 2px solid rgba(255, 255, 255, .85); font-size: 16px; padding: 12px 20px; }
.promo .btn.promo-key:hover, .promo .btn.promo-key[aria-expanded="true"] { background: rgba(255, 255, 255, .24); }
.promo-bubble { position: relative; max-width: 300px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .14); color: #fff; border-radius: 16px 16px 16px 4px; padding: 8px 13px; font: inherit; font-size: 13px; line-height: 1.4; text-align: left; cursor: pointer; }
.promo-bubble:hover, .promo-bubble[aria-expanded="true"] { background: rgba(255, 255, 255, .24); }
.promo-panel-in { padding: 0 24px 20px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.promo-panel-in.free { display: grid; gap: 10px; max-width: 720px; }
.promo-panel label { display: grid; gap: 5px; font-size: 13.5px; font-weight: 600; flex: 1 1 260px; max-width: 460px; }
.promo-panel-in.free label { max-width: none; }
.promo-panel .field { font-family: var(--f-ui); font-size: 14px; padding: 9px 11px; background: #fff; color: #172033; border-color: transparent; }
.promo-panel .ct-err { color: #ffd9d3; flex-basis: 100%; }
.promo-panel .ct-note { font-size: 13.5px; }
.promo-free-head { margin: 0; font-size: 14px; } .promo-free-head b { margin-right: 4px; }
.promo-send { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.promo .btn.primary { background: #fff; color: #123f52; border-color: #fff; box-shadow: none; }
/* narrower screens: the two sides stack and the divider runs across */
@media (max-width: 760px) { .promo-in { grid-template-columns: minmax(0, 1fr); } .promo-main { padding: 0 0 18px; } .promo-side { padding: 18px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .3); } }
@media (max-width: 560px) { .promo-in { padding: 16px; } .promo-price b { font-size: 30px; } .promo-bubble { max-width: none; } .promo-panel-in { padding: 0 16px 16px; } }
.lock-i { margin-left: auto; color: var(--muted); display: inline-flex; flex: none; }
.lock-box { display: flex; gap: 16px; align-items: flex-start; margin: 22px 0; padding: 20px 22px; border-radius: var(--r); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); box-shadow: var(--shadow); }
.lock-box .crane-mini { width: 60px; height: auto; flex: none; }
.lock-box h2 { margin: 0 0 6px; font-size: 22px; }
.lock-box p { margin: 0 0 12px; color: var(--muted); }
.lock-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.lock-outline { background: var(--surface); border-radius: var(--r); padding: 16px 20px; box-shadow: var(--shadow); margin-top: 16px; }
.lock-outline ol { margin: 8px 0; padding-left: 22px; display: grid; gap: 4px; }
.lock-outline p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
/* My subscription: top bar button and page */
.acct-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 99px; padding: 6px 12px; font-size: 13.5px; font-weight: 600; }
.acct-btn:hover { border-color: var(--accent); color: var(--accent); }
.acct-btn[hidden] { display: none; }
.sub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.sheet.sub-card { max-width: none; align-content: start; }
.sub-card h2 { font-size: 21px; margin: 0; }
.sub-card p { margin: 0; }
.sub-card .btn { justify-self: start; text-decoration: none; }
.sub-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.sub-list li::marker { color: var(--good); }
.sub-steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.sub-facts { margin: 0; display: grid; gap: 8px; }
.sub-facts div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; }
.sub-facts dt { color: var(--muted); font-size: 14px; }
.sub-facts dd { margin: 0; font-weight: 600; }
.sub-note { font-size: 13.5px; color: var(--muted); }
.sub-help { margin: 18px 0 0; color: var(--muted); }
/* home page: the syllabus the course is written for */
.hero p.syllabus-badge { display: inline-flex; align-items: center; gap: 8px; line-height: 1.35; margin: 14px 0 2px; padding: 7px 14px 7px 8px; border-radius: 99px; background: color-mix(in srgb, var(--good) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--good) 40%, transparent); color: var(--ink); font-size: 15px; font-weight: 700; max-width: none; }
@media (max-width: 640px) { .hero p.syllabus-badge { border-radius: 14px; font-size: 14px; } }
.syllabus-badge span { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--good); color: #fff; font-size: 13px; }/* FAQ: groups of questions that open to show the answer */
.faq { display: grid; gap: 26px; max-width: 820px; }
.faq-group { display: grid; gap: 8px; }
.faq-group h2 { font-size: 22px; margin-bottom: 4px; }
.faq-q { background: var(--surface); border-radius: var(--r-s); box-shadow: var(--shadow); }
.faq-q summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; font-weight: 600; font-size: 15.5px; }
.faq-q summary::-webkit-details-marker { display: none; }
.faq-q summary::after { content: "+"; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); color: var(--accent); font-weight: 800; font-size: 16px; }
.faq-q[open] summary::after { content: "−"; }
.faq-q summary:hover { color: var(--accent); }
.faq-a { padding: 0 16px 14px; font-size: 15px; line-height: 1.6; }
.faq-a p { margin: 0; }
.faq-list { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
/* subscribers see this on the home page instead of the full access banner */
.sub-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 22px 0 26px; padding: 14px 18px; border-radius: var(--r); background: color-mix(in srgb, var(--good) 10%, var(--surface)); box-shadow: var(--shadow); border-left: 4px solid var(--good); }
.sub-strip p { margin: 0; font-weight: 600; }
.sub-strip p span { color: var(--muted); font-weight: 500; }
@media (max-width: 640px) { .nav a.nav-locked .lock-i { display: none; } .acct-btn, .acct-btn:not([hidden]) { display: none; } .sub-strip { padding: 12px 14px; } .sub-strip .btn { width: 100%; justify-content: center; } .sub-grid { grid-template-columns: minmax(0, 1fr); } .sub-facts div { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.unlock-card form { display: grid; gap: 10px; }
.unlock-card label { display: grid; gap: 5px; font-size: 13.5px; font-weight: 600; }

/* phones: picker buttons in an even grid instead of ragged rows of different widths */
@media (max-width: 640px) {
  .tabs, .u5-btns, .bp-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 6px; }
  .tabs button, .u5-b, .bp-tabs button { border-radius: 12px; padding: 9px 10px; min-height: 42px; line-height: 1.25; text-align: center; white-space: normal; }
  .tabs button:last-child:nth-child(odd), .u5-b:last-child:nth-child(odd), .bp-tabs button:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .bcg-ex { display: grid; grid-template-columns: minmax(0, 1fr); }
  .bcg-ex button { border-radius: 12px; padding: 9px 12px; line-height: 1.3; text-align: left; white-space: normal; }
}
