/* Data-Man Study Hub — shared styles
   Layout: sticky charcoal masthead over a centred 1160px column.
   Hub = compact hero + "at a glance" panel, two learning tracks, module card grid.
   Content pages = breadcrumb, page title, prose sections at ~68ch with full-width figures. */

:root {
  /* Colour — follows the DCAM brand palette: orange, steel blue, charcoal, steel grey */
  --masthead: #3B3B3B;
  --masthead-ink: #F4F4F3;
  --masthead-muted: #B9BDBF;
  --bg: #F5F5F3;
  --surface: #FFFFFF;
  --surface-2: #EEEEEC;
  --ink: #262626;
  --muted: #5E6366;
  --line: #DCDCD9;
  --brand-orange: #E8874A;    /* decorative fills only: too light for text on white */
  --brand-blue: #3079AB;
  --accent: #B4541A;          /* text-safe orange: buttons, focus, hover */
  --accent-ink: #FFFFFF;
  --accent-soft: #FBEADF;
  --link: #2A6D9B;
  --dmbok: #2A6D9B;           /* DAMA-DMBOK = blue */
  --dmbok-soft: #E2EDF6;
  --dcam: #B4541A;            /* DCAM v3 = orange */
  --dcam-soft: #FBEADF;
  --ok: #2E7D4F;
  --ok-soft: #E3F2E8;
  --bad: #B23B3B;
  --bad-soft: #F8E5E5;
  --seg: #DDE9F3;
  --seg-alt: #CADCEB;
  --seg-ink: #1D4566;
  --on-strong: #FFFFFF;
  --chart-current: #C8682C;   /* validated pair, light surface */
  --chart-target: #3079AB;
  /* DCAM layers */
  --l-found: #555555;
  --l-found-ink: #FFFFFF;
  --l-exec: #E8874A;
  --l-exec-ink: #2A1A0F;
  --l-collab: #8A9598;
  --l-collab-ink: #1E2427;
  --l-app: #3079AB;
  --l-app-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(40, 40, 40, .06), 0 6px 18px rgba(40, 40, 40, .07);
  /* Type */
  --f-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --t-xs: .75rem;
  --t-sm: .875rem;
  --t-md: 1rem;
  --t-lg: 1.25rem;
  --t-xl: 1.625rem;
  --t-2xl: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);

  --radius: 10px;
  --maxw: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --masthead: #141414;
    --masthead-ink: #EDEDED;
    --masthead-muted: #9EA3A6;
    --bg: #1A1A1A;
    --surface: #242424;
    --surface-2: #2D2D2D;
    --ink: #ECECEA;
    --muted: #A8ADB0;
    --line: #3A3A3A;
    --brand-orange: #E8874A;
    --brand-blue: #3B86BC;
    --accent: #F0955A;
    --accent-ink: #1A1A1A;
    --accent-soft: #3A2618;
    --link: #7DB4DC;
    --dmbok: #6AA9D8;
    --dmbok-soft: #1B2D3B;
    --dcam: #F0955A;
    --dcam-soft: #3A2618;
    --ok: #5CC08A;
    --ok-soft: #14301F;
    --bad: #E77B7B;
    --bad-soft: #3A1A1A;
    --seg: #22323F;
    --seg-alt: #2A3B4C;
    --seg-ink: #D3E3F0;
    --on-strong: #111111;
    --chart-current: #D27236;   /* validated pair, dark surface */
    --chart-target: #4A92CC;
    --l-found: #6A6A6A;
    --l-found-ink: #FFFFFF;
    --l-exec: #E8874A;
    --l-exec-ink: #2A1A0F;
    --l-collab: #8A9598;
    --l-collab-ink: #1E2427;
    --l-app: #3079AB;
    --l-app-ink: #FFFFFF;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --masthead: #141414;
  --masthead-ink: #EDEDED;
  --masthead-muted: #9EA3A6;
  --bg: #1A1A1A;
  --surface: #242424;
  --surface-2: #2D2D2D;
  --ink: #ECECEA;
  --muted: #A8ADB0;
  --line: #3A3A3A;
  --brand-orange: #E8874A;
  --brand-blue: #3B86BC;
  --accent: #F0955A;
  --accent-ink: #1A1A1A;
  --accent-soft: #3A2618;
  --link: #7DB4DC;
  --dmbok: #6AA9D8;
  --dmbok-soft: #1B2D3B;
  --dcam: #F0955A;
  --dcam-soft: #3A2618;
  --ok: #5CC08A;
  --ok-soft: #14301F;
  --bad: #E77B7B;
  --bad-soft: #3A1A1A;
  --seg: #22323F;
  --seg-alt: #2A3B4C;
  --seg-ink: #D3E3F0;
  --on-strong: #111111;
  --chart-current: #D27236;
  --chart-target: #4A92CC;
  --l-found: #6A6A6A;
  --l-found-ink: #FFFFFF;
  --l-exec: #E8874A;
  --l-exec-ink: #2A1A0F;
  --l-collab: #8A9598;
  --l-collab-ink: #1E2427;
  --l-app: #3079AB;
  --l-app-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* ---------- Language toggle: content carries both languages ---------- */
:root:not([data-lang="id"]) [data-l="id"],
:root[data-lang="id"] [data-l="en"] { display: none !important; }

/* ---------- Framework context ---------- */
:root { --fw: var(--accent); --fw-soft: var(--accent-soft); }
.fw-dmbok { --fw: var(--dmbok); --fw-soft: var(--dmbok-soft); }
.fw-dcam { --fw: var(--dcam); --fw-soft: var(--dcam-soft); }

/* ---------- Base ---------- */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-md);
  line-height: 1.6;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--masthead);
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.2; text-wrap: balance; margin: 0; color: var(--ink); }
h1 { font-size: var(--t-2xl); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: var(--t-xl); font-weight: 600; }
h3 { font-size: var(--t-lg); font-weight: 600; }
p { margin: 0; }
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.eyebrow {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted { color: var(--muted); }
.prose { max-width: 68ch; display: grid; gap: .9rem; }
.prose ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--masthead);
  color: var(--masthead-ink);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.masthead .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: .6rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--masthead-ink);
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
}
.brand small {
  font-family: var(--f-body);
  font-weight: 400;
  font-size: var(--t-xs);
  color: var(--masthead-muted);
  display: block;
  line-height: 1.2;
}
.brand-mark { width: 28px; height: 28px; flex: none; }
.mainnav {
  display: flex;
  gap: .25rem;
  margin-left: auto;
  overflow-x: auto;
  min-width: 0;
}
.mainnav a {
  color: var(--masthead-muted);
  text-decoration: none;
  font-size: var(--t-sm);
  font-weight: 500;
  padding: .4rem .65rem;
  border-radius: 6px;
  white-space: nowrap;
}
.mainnav a:hover, .mainnav a[aria-current="page"] { color: var(--masthead-ink); background: rgba(255, 255, 255, .08); }
.mainnav a.is-planned { opacity: .55; }
.controls { display: flex; gap: .5rem; align-items: center; }
.seg-toggle {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 6px;
  overflow: hidden;
}
.seg-toggle button, .icon-btn {
  font: 500 var(--t-xs)/1 var(--f-mono);
  letter-spacing: .06em;
  color: var(--masthead-muted);
  background: transparent;
  border: 0;
  padding: .45rem .6rem;
  cursor: pointer;
}
.seg-toggle button[aria-pressed="true"] { background: var(--masthead-ink); color: var(--masthead); }
.icon-btn {
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.icon-btn svg { width: 14px; height: 14px; }
@media (max-width: 760px) {
  .mainnav { order: 3; width: 100%; margin-left: 0; padding-bottom: .15rem; }
  .controls { margin-left: auto; }
}

/* ---------- Buttons, pills ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font: 600 var(--t-sm)/1 var(--f-body);
  padding: .8rem 1.1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font: 500 var(--t-xs)/1 var(--f-mono);
  letter-spacing: .04em;
  padding: .3rem .5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.pill-dmbok { background: var(--dmbok-soft); color: var(--dmbok); }
.pill-dcam { background: var(--dcam-soft); color: var(--dcam); }
.pill-both { background: var(--surface-2); color: var(--muted); }
.pill-ready { background: var(--ok-soft); color: var(--ok); }
.pill-planned { background: var(--surface-2); color: var(--muted); }

/* ---------- Hub: hero ---------- */
.hero { padding-block: 3rem 2rem; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
.hero-copy { display: grid; gap: 1.1rem; min-width: 0; }
.hero-copy .lede { font-size: 1.125rem; color: var(--muted); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; padding-top: .4rem; }
.glance {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
}
.glance-head { padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; }
.glance-cols { display: grid; grid-template-columns: 1fr 1fr; }
.glance-col { padding: 1rem 1.1rem 1.2rem; display: grid; gap: .8rem; align-content: start; }
.glance-col + .glance-col { border-left: 1px solid var(--line); }
.glance-col h3 { font-size: 1.05rem; }
.glance dl { margin: 0; display: grid; gap: .65rem; }
.glance dt { font-size: var(--t-xs); color: var(--muted); }
.glance dd { margin: 0; font-family: var(--f-display); font-size: 1.35rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.glance dd span.unit { font-family: var(--f-body); font-size: var(--t-sm); font-weight: 400; color: var(--muted); }
.glance-col.dmbok h3 { color: var(--dmbok); }
.glance-col.dcam h3 { color: var(--dcam); }
.glance-foot { padding: .7rem 1.1rem; background: var(--surface-2); font-size: var(--t-xs); color: var(--muted); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}
@media (max-width: 420px) {
  .glance-cols { grid-template-columns: 1fr; }
  .glance-col + .glance-col { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- Hub: learning tracks ---------- */
.section { padding-block: 2rem; }
.section-head { display: grid; gap: .4rem; margin-bottom: 1.25rem; }
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.track {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.1rem;
  display: grid;
  gap: .9rem;
  align-content: start;
  min-width: 0;
}
.track-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: .75rem;
  padding: .55rem 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.steps li::before {
  content: counter(step);
  font: 500 var(--t-sm)/1 var(--f-mono);
  color: var(--muted);
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  align-self: center;
}
.steps li strong { font-weight: 600; }
.steps li span.muted { display: block; font-size: var(--t-sm); }
@media (max-width: 760px) { .tracks { grid-template-columns: 1fr; } }

/* ---------- Hub: module cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: .55rem;
  padding: 1.1rem 1.1rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.card.is-planned { background: transparent; border-style: dashed; }
.card-top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.card-icon { width: 34px; height: 34px; color: var(--muted); }
.card.dmbok .card-icon { color: var(--dmbok); }
.card.dcam .card-icon { color: var(--dcam); }
.card.both .card-icon { color: var(--muted); }
.card h3 { font-size: 1.12rem; }
.card p { font-size: var(--t-sm); color: var(--muted); }
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding-top: .6rem;
  border-top: 1px solid var(--line);
  font: 500 var(--t-xs)/1.3 var(--f-mono);
  color: var(--muted);
}
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } a.card:hover { transform: none; } }

/* ---------- Footer ---------- */
.site-foot {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.site-foot .wrap { padding-block: 1.75rem 2.25rem; display: grid; gap: .75rem; font-size: var(--t-sm); color: var(--muted); }
.site-foot p { max-width: 90ch; }

/* ---------- Content page ---------- */
.page-head { padding-block: 2.25rem 1.5rem; display: grid; gap: .8rem; }
.crumbs { font-size: var(--t-sm); color: var(--muted); display: flex; gap: .4rem; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.page-head .lede { font-size: 1.125rem; color: var(--muted); max-width: 64ch; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem; }
.toc {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  padding-block: .25rem 0;
}
.toc a {
  font-size: var(--t-sm);
  padding: .35rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
}
.toc a:hover { border-color: var(--accent); color: var(--accent); }
.block { padding-block: 2rem; border-top: 1px solid var(--line); scroll-margin-top: 5rem; }
.block > .section-head { max-width: 68ch; }

/* DMBOK wheel explorer */
.explorer {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
.wheel-box { display: grid; gap: .6rem; justify-items: center; }
.wheel { width: 100%; max-width: 440px; height: auto; display: block; }
.wheel .seg { cursor: pointer; }
.wheel .seg path { fill: var(--seg); stroke: var(--bg); stroke-width: 2.5; transition: fill .15s; }
.wheel .seg:nth-child(even) path { fill: var(--seg-alt); }
.wheel .seg text { fill: var(--seg-ink); font: 600 10.5px/1 var(--f-body); pointer-events: none; }
.wheel .seg:hover path { fill: var(--dmbok-soft); }
.wheel .seg[aria-pressed="true"] path { fill: var(--dmbok); }
.wheel .seg[aria-pressed="true"] text { fill: var(--on-strong); }
.wheel .hub circle { fill: var(--masthead); stroke: var(--bg); stroke-width: 3; }
.wheel .hub[aria-pressed="true"] circle { fill: var(--dmbok); }
.wheel .hub text { fill: var(--masthead-ink); font: 700 13px/1 var(--f-display); pointer-events: none; }
.wheel .hub[aria-pressed="true"] text { fill: var(--on-strong); }
.wheel .hub { cursor: pointer; }
.wheel :focus-visible { outline: none; }
.wheel .seg:focus-visible path, .wheel .hub:focus-visible circle { stroke: var(--ink); stroke-width: 3; }
.hint { font-size: var(--t-xs); color: var(--muted); text-align: center; }

.ka-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem 1.5rem;
  display: grid;
  gap: 1rem;
  min-width: 0;
}
.ka-panel .ka-num { font: 500 var(--t-xs)/1 var(--f-mono); color: var(--fw); letter-spacing: .08em; }
.ka-panel h3 { font-size: var(--t-xl); }
.ka-panel .ka-alt { font-size: var(--t-sm); color: var(--muted); }
.ka-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
.ka-grid h4 { margin: 0 0 .35rem; font: 600 var(--t-xs)/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ka-grid ul { margin: 0; padding-left: 1.1rem; font-size: var(--t-sm); display: grid; gap: .25rem; }
.ka-example { background: var(--surface-2); border-radius: 8px; padding: .8rem 1rem; font-size: var(--t-sm); }
.ka-example strong { font-weight: 600; }
@media (max-width: 900px) {
  .explorer { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .ka-grid { grid-template-columns: 1fr; } }

/* All-KA reference table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.ref { width: 100%; border-collapse: collapse; font-size: var(--t-sm); min-width: 640px; }
table.ref th, table.ref td { text-align: left; padding: .65rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.ref thead th { font: 600 var(--t-xs)/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
table.ref tbody tr:last-child td { border-bottom: 0; }
table.ref td:first-child { font-family: var(--f-mono); color: var(--muted); width: 3rem; }
table.ref td strong { font-weight: 600; }

/* Environmental factors */
.factors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 900px) { .factors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .factors { grid-template-columns: 1fr; } }
.factor { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .85rem 1rem; display: grid; gap: .25rem; }
.factor strong { font-weight: 600; }
.factor span { font-size: var(--t-sm); color: var(--muted); }

/* Maturity ladder */
.ladder {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .5rem;
  align-items: end;
}
.rung {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--fw);
  border-radius: 6px;
  padding: .75rem .8rem;
  display: grid;
  gap: .3rem;
  align-content: start;
  min-width: 0;
}
.rung .lvl { font: 700 1.5rem/1 var(--f-display); color: var(--fw); font-variant-numeric: tabular-nums; }
.rung strong { font-weight: 600; font-size: var(--t-sm); }
.rung span { font-size: var(--t-xs); color: var(--muted); line-height: 1.45; }
.rung:nth-child(1) { min-height: 9rem; border-top-color: var(--line); }
.rung:nth-child(1) .lvl { color: var(--muted); }
.rung:nth-child(2) { min-height: 10.5rem; }
.rung:nth-child(3) { min-height: 12rem; }
.rung:nth-child(4) { min-height: 13.5rem; }
.rung:nth-child(5) { min-height: 15rem; }
.rung:nth-child(6) { min-height: 16.5rem; }
@media (max-width: 860px) {
  .ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rung:nth-child(n) { min-height: 0; }
}
@media (max-width: 480px) { .ladder { grid-template-columns: 1fr 1fr; } }

/* Callouts */
.callout {
  border: 1px solid var(--line);
  border-left: 4px solid var(--fw);
  background: var(--surface);
  border-radius: 6px;
  padding: .9rem 1.1rem;
  font-size: var(--t-sm);
  display: grid;
  gap: .35rem;
  max-width: 68ch;
}
.callout.dcam { border-left-color: var(--dcam); }
.callout.dmbok { border-left-color: var(--dmbok); }
.callout strong { font-weight: 600; }

/* Quick check quiz */
.quiz { display: grid; gap: 1rem; max-width: 68ch; }
.q {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem 1.1rem 1.1rem;
  margin: 0;
  display: grid;
  gap: .6rem;
  min-width: 0;
}
.q legend { font-weight: 600; padding: 0; float: left; width: 100%; margin-bottom: .2rem; }
.q legend + * { clear: both; }
.q label {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  padding: .5rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: var(--t-sm);
}
.q label:hover { background: var(--surface-2); }
.q input { margin-top: .2rem; accent-color: var(--accent); }
.q label.is-right { border-color: var(--ok); background: var(--ok-soft); }
.q label.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.q .why { font-size: var(--t-sm); padding: .6rem .8rem; border-radius: 8px; background: var(--surface-2); }
.quiz-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.score { font: 600 var(--t-sm)/1 var(--f-mono); }

/* Next/prev */
.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 2rem 0; border-top: 1px solid var(--line); }

/* ---------- DCAM v3 framework diagram ---------- */
.dcam-wheel { width: 100%; max-width: 460px; height: auto; display: block; }
.dcam-wheel .dseg { cursor: pointer; }
.dcam-wheel .dseg path { stroke: var(--bg); stroke-width: 3; transition: filter .15s; }
.dcam-wheel .dseg text { font: 600 10px/1 var(--f-body); pointer-events: none; }
.dcam-wheel .dseg text .num { font-weight: 700; font-family: var(--f-mono); }
.dcam-wheel .dseg .ring-label { font: 600 10.5px/1 var(--f-body); letter-spacing: .02em; }
.dcam-wheel .layer-found path { fill: var(--l-found); }
.dcam-wheel .layer-found text { fill: var(--l-found-ink); }
.dcam-wheel .layer-exec path { fill: var(--l-exec); }
.dcam-wheel .layer-exec text { fill: var(--l-exec-ink); }
.dcam-wheel .layer-collab path { fill: var(--l-collab); }
.dcam-wheel .layer-collab text { fill: var(--l-collab-ink); }
.dcam-wheel .layer-app path { fill: var(--l-app); }
.dcam-wheel .layer-app text { fill: var(--l-app-ink); }
.dcam-wheel .dseg:hover path { filter: brightness(1.08); }
.dcam-wheel .dseg[aria-pressed="true"] path { stroke: var(--ink); stroke-width: 3.5; }
.dcam-wheel :focus-visible { outline: none; }
.dcam-wheel .dseg:focus-visible path { stroke: var(--ink); stroke-dasharray: 5 3; stroke-width: 3; }
.dcam-wheel .dhub circle { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.dcam-wheel .hub-word { font: 700 21px/1 var(--f-display); fill: var(--accent); letter-spacing: .04em; }
.dcam-wheel .hub-ver { font: 500 11px/1 var(--f-mono); fill: var(--muted); }

.layer-chip { display: inline-block; padding: .15rem .45rem; border-radius: 4px; font-family: var(--f-mono); letter-spacing: .06em; }
.layer-chip.layer-found { background: var(--l-found); color: var(--l-found-ink); }
.layer-chip.layer-exec { background: var(--l-exec); color: var(--l-exec-ink); }
.layer-chip.layer-collab { background: var(--l-collab); color: var(--l-collab-ink); }
.layer-chip.layer-app { background: var(--l-app); color: var(--l-app-ink); }
.ka-panel[data-layer] { border-top: 4px solid var(--l-exec); }
.ka-panel[data-layer="found"] { border-top-color: var(--l-found); }
.ka-panel[data-layer="collab"] { border-top-color: var(--l-collab); }
.ka-panel[data-layer="app"] { border-top-color: var(--l-app); }
.ka-panel .facts .pill { text-decoration: none; }

.layers { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; width: 100%; max-width: 460px; }
.layers li { display: grid; grid-template-columns: 14px 1fr; gap: .6rem; align-items: start; font-size: var(--t-sm); }
.layers .sw { width: 14px; height: 14px; border-radius: 3px; margin-top: .25rem; }
.layers .sw.layer-found { background: var(--l-found); }
.layers .sw.layer-exec { background: var(--l-exec); }
.layers .sw.layer-collab { background: var(--l-collab); }
.layers .sw.layer-app { background: var(--l-app); }
.layers strong { font-weight: 600; }
.layers .picks { display: inline-flex; gap: .25rem; flex-wrap: wrap; margin-left: .35rem; }
.layers button {
  font: 500 var(--t-xs)/1 var(--f-mono);
  padding: .2rem .4rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 4px;
  cursor: pointer;
}
.layers button:hover { border-color: var(--accent); color: var(--accent); }
.layers .muted { display: block; }

/* Framework hierarchy */
.hier { display: grid; gap: .5rem; max-width: 760px; }
.hier-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .75rem 1rem;
}
.hier-row:nth-child(2) { margin-left: 1.5rem; }
.hier-row:nth-child(3) { margin-left: 3rem; }
.hier-row:nth-child(4) { margin-left: 4.5rem; background: var(--surface-2); }
.hier-row .tag { font: 600 var(--t-xs)/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fw); }
.hier-row p { font-size: var(--t-sm); }
.hier-row code { font-family: var(--f-mono); font-size: .8rem; background: var(--surface-2); padding: .05rem .3rem; border-radius: 3px; }
@media (max-width: 600px) {
  .hier-row { grid-template-columns: 1fr; gap: .3rem; }
  .hier-row:nth-child(n) { margin-left: 0; }
  .hier-row:nth-child(2) { border-left: 4px solid var(--line); }
  .hier-row:nth-child(3) { border-left: 8px solid var(--line); }
  .hier-row:nth-child(4) { border-left: 12px solid var(--line); }
}

/* Worked score example */
.score-bar { display: inline-block; height: .55rem; border-radius: 3px; background: var(--fw); vertical-align: middle; margin-right: .5rem; }
table.ref td.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); width: auto; }

.newlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; list-style: none; padding: 0; margin: 0; }
.newlist li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; font-size: var(--t-sm); display: flex; gap: .5rem; align-items: baseline; }
.newlist li::before { content: "+"; font: 700 var(--t-sm)/1 var(--f-mono); color: var(--fw); }
table.ref.plain td:first-child { font-family: inherit; color: var(--ink); width: auto; }

/* DCAM capability list inside the component panel */
.ka-grid > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.caps { display: grid; gap: .4rem; }
.caps h4 { margin: 0 0 .2rem; font: 600 var(--t-xs)/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cap { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.cap summary {
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  gap: .5rem;
  align-items: baseline;
  padding: .55rem .75rem;
  cursor: pointer;
  list-style: none;
  font-size: var(--t-sm);
  font-weight: 600;
}
.cap summary::-webkit-details-marker { display: none; }
.cap summary:hover { background: var(--surface-2); border-radius: 8px; }
.cap[open] summary { border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.cap-id { font: 500 var(--t-xs)/1.4 var(--f-mono); color: var(--fw); }
.cap-count { font: 500 var(--t-xs)/1 var(--f-mono); color: var(--muted); background: var(--surface-2); padding: .2rem .4rem; border-radius: 999px; }
.cap-count::after { content: " ▾"; }
.cap[open] .cap-count::after { content: " ▴"; }
.cap-desc { font-size: var(--t-sm); color: var(--muted); padding: .6rem .75rem 0; }
.subs { list-style: none; margin: 0; padding: .5rem .75rem .75rem; display: grid; gap: .55rem; }
.subs li { display: grid; grid-template-columns: 2.6rem 1fr; gap: .5rem; font-size: var(--t-sm); }
.subs li strong { display: block; font-weight: 600; }
.subs li span:not(.cap-id) { color: var(--muted); }

/* ---------- Self-assessment ---------- */
.guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; list-style: none; padding: 0; margin: 0; counter-reset: g; }
.guide li { counter-increment: g; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1rem; display: grid; gap: .3rem; align-content: start; min-width: 0; }
.guide li::before { content: counter(g); font: 700 1.25rem/1 var(--f-display); color: var(--fw); }
.guide strong { font-weight: 600; }
.guide span { font-size: var(--t-sm); color: var(--muted); }
@media (max-width: 860px) { .guide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .guide { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: 1rem; min-width: 0; }
.setup-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem 1rem; }
.field { display: grid; gap: .3rem; min-width: 0; }
.field > label, .field > .lbl { font: 600 var(--t-xs)/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input[type="text"], .field input[type="date"], textarea.note, textarea.out {
  font: 400 var(--t-sm)/1.4 var(--f-body);
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .5rem .6rem;
  width: 100%;
}
.field.wide { grid-column: span 2; }
.choice { display: flex; flex-wrap: wrap; gap: .4rem; }
.choice label {
  display: inline-flex; gap: .45rem; align-items: center;
  border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem;
  font-size: var(--t-sm); cursor: pointer; background: var(--bg);
}
.choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { accent-color: var(--accent); margin: 0; }
.choice small { color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.btn-sm { padding: .55rem .8rem; font-size: var(--t-xs); }
@media (max-width: 860px) { .setup-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .setup-grid { grid-template-columns: 1fr; } .field.wide { grid-column: auto; } }

.rubric { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .4rem; }
.rubric div { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .5rem .6rem; font-size: var(--t-xs); color: var(--muted); display: grid; gap: .15rem; min-width: 0; }
.rubric b { font: 700 .95rem/1 var(--f-display); color: var(--fw); }
.rubric strong { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) { .rubric { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .rubric { grid-template-columns: 1fr 1fr; } }

.progress { display: flex; align-items: center; gap: .75rem; font: 500 var(--t-xs)/1 var(--f-mono); color: var(--muted); }
.progress .ptrack { flex: 1; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.progress .fill { height: 100%; background: var(--fw); border-radius: 3px; width: 0; transition: width .2s; }

.groups { display: grid; gap: .75rem; }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.group > summary {
  display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center;
  padding: .85rem 1rem; cursor: pointer; list-style: none;
}
.group > summary::-webkit-details-marker { display: none; }
.group > summary .gid { font: 600 var(--t-xs)/1 var(--f-mono); padding: .3rem .45rem; border-radius: 4px; background: var(--fw-soft); color: var(--fw); }
.group > summary .gname { font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; }
.group > summary .gstat { font: 500 var(--t-xs)/1.3 var(--f-mono); color: var(--muted); text-align: right; white-space: nowrap; }
.group[open] > summary { border-bottom: 1px solid var(--line); }
.items { display: grid; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1.25rem; padding: .85rem 1rem; border-top: 1px solid var(--line); align-items: start; }
.item:first-child { border-top: 0; }
.item.is-na { opacity: .6; }
.item-text { display: grid; gap: .2rem; min-width: 0; }
.item-text .iid { font: 500 var(--t-xs)/1 var(--f-mono); color: var(--fw); }
.item-text strong { font-weight: 600; font-size: var(--t-sm); }
.item-text p { font-size: var(--t-sm); color: var(--muted); }
.item-ctrl { display: grid; gap: .35rem; justify-items: end; }
.scale-row { display: flex; align-items: center; gap: .5rem; }
.scale-row .lbl { font: 600 var(--t-xs)/1 var(--f-mono); letter-spacing: .04em; color: var(--muted); width: 3.6rem; text-align: right; }
.scale { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.scale label { position: relative; }
.scale input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.scale span {
  display: grid; place-items: center; width: 2rem; height: 2rem;
  font: 600 var(--t-sm)/1 var(--f-mono); color: var(--ink); cursor: pointer;
  border-left: 1px solid var(--line); background: var(--surface);
}
.scale label:first-child span { border-left: 0; }
.scale span:hover { background: var(--surface-2); }
.scale input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: -3px; }
.scale.now input:checked + span { background: var(--chart-current); color: #fff; }
.scale.target input:checked + span { background: var(--chart-target); color: #fff; }
.item-extra { grid-column: 1 / -1; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; font-size: var(--t-xs); color: var(--muted); }
.item-extra label { display: inline-flex; gap: .35rem; align-items: center; cursor: pointer; }
.item-extra details { flex: 1; min-width: 14rem; }
.item-extra summary { cursor: pointer; }
textarea.note { margin-top: .4rem; min-height: 3.5rem; resize: vertical; }
@media (max-width: 720px) {
  .item { grid-template-columns: 1fr; }
  .item-ctrl { justify-items: start; }
  .scale-row .lbl { text-align: left; }
}
@media (max-width: 380px) { .scale span { width: 1.75rem; } }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; display: grid; gap: .2rem; }
.tile span { font-size: var(--t-xs); color: var(--muted); }
.tile b { font: 700 1.6rem/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.tile small { font: 500 var(--t-xs)/1 var(--f-mono); color: var(--muted); }
@media (max-width: 720px) { .tiles { grid-template-columns: 1fr 1fr; } }

.results-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 960px) { .results-grid { grid-template-columns: 1fr; } }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: grid; gap: .5rem; position: relative; min-width: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.legend { display: flex; gap: 1rem; font-size: var(--t-xs); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend i { width: 18px; height: 0; border-top: 2px solid var(--chart-current); display: inline-block; }
.legend i.t { border-top: 2px dashed var(--chart-target); }
.radar { width: 100%; height: auto; display: block; overflow: visible; }
.radar .grid-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.radar .spoke { stroke: var(--line); stroke-width: 1; }
.radar .tick { fill: var(--muted); font: 500 9px/1 var(--f-mono); }
.radar .axis-label { fill: var(--ink); font: 600 12.5px/1.2 var(--f-body); }
.radar .axis-label.empty { fill: var(--muted); font-weight: 400; }
.radar .s-current { fill: var(--chart-current); fill-opacity: .14; stroke: var(--chart-current); stroke-width: 2; stroke-linejoin: round; }
.radar .s-target { fill: none; stroke: var(--chart-target); stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.radar .dot-c { fill: var(--chart-current); stroke: var(--surface); stroke-width: 2; }
.radar .dot-t { fill: var(--chart-target); stroke: var(--surface); stroke-width: 2; }
.radar .hit { fill: transparent; cursor: pointer; }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--ink); color: var(--bg);
  font-size: var(--t-xs); line-height: 1.45; padding: .5rem .65rem; border-radius: 6px;
  box-shadow: var(--shadow); max-width: 15rem;
}
.tooltip b { display: block; font-weight: 600; margin-bottom: .15rem; }
.empty-state { border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.5rem; text-align: center; color: var(--muted); font-size: var(--t-sm); display: grid; gap: .6rem; justify-items: center; }
.gapbar { display: inline-block; height: .5rem; border-radius: 3px; background: var(--accent); vertical-align: middle; }
table.ref td.gcell { white-space: nowrap; }
textarea.out { font-family: var(--f-mono); font-size: .75rem; min-height: 10rem; }
.toast { font-size: var(--t-xs); color: var(--ok); font-weight: 600; }
.results-grid table.ref { min-width: 0; }
.results-grid table.ref th, .results-grid table.ref td { padding: .55rem .6rem; }

/* ---------- DMBOK context diagram ---------- */
.select { font: 400 var(--t-sm)/1.4 var(--f-body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .5rem .6rem; width: 100%; }
.ctx { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--dmbok); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: .9rem; min-width: 0; }
.ctx-head h3 { font-size: var(--t-xl); }
.ctx-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: .75rem; }
.ctx-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.25fr) auto minmax(0, 1fr); gap: .5rem; align-items: stretch; }
.ctx-col { display: grid; gap: .5rem; align-content: start; min-width: 0; }
.ctx-arrow { align-self: center; font-size: 1.4rem; color: var(--dmbok); }
.ctx-base { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.ctx-box { border: 1px solid var(--line); border-radius: 8px; padding: .7rem .85rem; background: var(--bg); min-width: 0; }
.ctx-box.ctx-main { background: var(--dmbok-soft); border-color: transparent; }
.ctx-box.ctx-sub { background: transparent; border-style: dashed; }
.ctx-box h4 { margin: 0 0 .4rem; font: 600 var(--t-xs)/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dmbok); }
.ctx-box p, .ctx-box li { font-size: var(--t-sm); }
.ctx-box ul { margin: 0; padding-left: 1.05rem; display: grid; gap: .2rem; }
.ctx-acts { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.ctx-acts li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .5rem; align-items: start; }
.ph { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 4px; font: 600 .7rem/1 var(--f-mono); background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.ph-P { border-color: var(--dmbok); color: var(--dmbok); }
.ph-D { border-color: var(--accent); color: var(--accent); }
.ph-C { border-color: var(--muted); color: var(--muted); }
.ph-O { border-color: var(--ok); color: var(--ok); }
.ctx-legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: var(--t-xs); color: var(--muted); }
.ctx-legend > span { display: inline-flex; align-items: center; gap: .35rem; }
.ctx-crit { border-top: 1px solid var(--line); padding-top: .9rem; display: grid; gap: .6rem; justify-items: start; }
.ctx-crit h4 { margin: 0; font: 600 var(--t-xs)/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ctx-crit ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.25rem; }
.ctx-crit li { display: grid; gap: .1rem; font-size: var(--t-sm); }
.ctx-crit li strong { font-weight: 600; color: var(--dmbok); }
@media (max-width: 900px) {
  .ctx-top, .ctx-base { grid-template-columns: 1fr; }
  .ctx-flow { grid-template-columns: 1fr; }
  .ctx-arrow { transform: rotate(90deg); justify-self: center; line-height: 1; }
  .ctx-crit ul { grid-template-columns: 1fr; }
}

/* ---------- Comparison ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
table.vs th[scope="row"] { font-weight: 600; color: var(--muted); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .05em; font-family: var(--f-mono); width: 11rem; }
table.vs .th-dmbok { color: var(--dmbok); }
table.vs .th-dcam { color: var(--dcam); }
.map-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .map-grid { grid-template-columns: minmax(0, 1fr); } }
table.matrix { border-collapse: collapse; width: 100%; min-width: 640px; font-size: var(--t-sm); }
table.matrix th, table.matrix td { border-bottom: 1px solid var(--line); padding: .35rem .4rem; }
table.matrix thead th { vertical-align: bottom; background: var(--surface-2); }
table.matrix .corner { text-align: left; font: 500 var(--t-xs)/1.3 var(--f-mono); color: var(--muted); width: 13rem; }
table.matrix button { all: unset; cursor: pointer; display: block; border-radius: 4px; padding: .2rem .3rem; }
table.matrix button:focus-visible { outline: 3px solid var(--accent); }
table.matrix button:hover { color: var(--accent); }
table.matrix .colh button { display: grid; gap: .15rem; justify-items: center; text-align: center; font-size: var(--t-xs); line-height: 1.25; }
table.matrix .colname { color: var(--ink); font-weight: 600; }
table.matrix tbody th { text-align: left; font-weight: 600; width: 12rem; line-height: 1.3; }
table.matrix td.cell { text-align: center; }
table.matrix .hl { background: var(--accent-soft); }
table.matrix tr.hl th, table.matrix tr.hl td { background: var(--dmbok-soft); }
table.matrix button[aria-pressed="true"] { color: var(--accent); }
.dot-p, .dot-s { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; }
.dot-p { background: var(--brand-orange); }
.dot-s { border: 2px solid var(--brand-orange); background: transparent; width: 12px; height: 12px; }
.legend .dot-p, .legend .dot-s { margin-right: .1rem; }
.map-note { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: .5rem; font-size: var(--t-sm); min-width: 0; }
.map-note h3 { font-size: 1.15rem; }

.align { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: .75rem; display: grid; gap: .4rem; }
.align-row { display: grid; grid-template-columns: 11rem repeat(6, minmax(0, 1fr)); gap: .3rem; align-items: center; min-width: 620px; }
.align-axis span { font-size: var(--t-xs); color: var(--muted); text-align: center; }
.align-axis span b { display: block; font: 700 1.05rem/1 var(--f-display); color: var(--dcam); }
.align-lbl { grid-column: 1; font-size: var(--t-sm); text-align: left !important; }
.align-lbl b { font: 700 1rem/1 var(--f-display); color: var(--dmbok); margin-right: .25rem; }
.align .bar { height: 1.7rem; border-radius: 4px; background: var(--dmbok-soft); border: 1px solid var(--dmbok); color: var(--dmbok); font: 600 var(--t-xs)/1.7rem var(--f-mono); text-align: center; }
.map-note .pill { white-space: normal; text-align: left; line-height: 1.35; }
.table-scroll { position: relative; }
.legend { flex-wrap: wrap; }

/* ---------- Certification ---------- */
.small { font-size: var(--t-xs); }
ul.tight { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; font-size: var(--t-sm); }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; overflow-x: auto; }
.tabs button {
  font: 600 var(--t-sm)/1 var(--f-body); color: var(--muted); background: none; border: 0;
  padding: .85rem 1rem; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tabpanel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.tabpanel[hidden] { display: none; }

.exam-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 860px) { .exam-grid { grid-template-columns: 1fr; } }
.exam-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--dmbok); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: .8rem; align-content: start; min-width: 0; }
.exam-card.ex-dcam { border-top-color: var(--dcam); }
.exam-card h2 { font-size: 1.6rem; }
.exam-card h3 { font-size: 1.05rem; margin-top: .3rem; }
.facts-dl { margin: 0; display: grid; gap: 0; }
.facts-dl > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--line); font-size: var(--t-sm); }
.facts-dl dt { font: 600 var(--t-xs)/1.5 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.facts-dl dd { margin: 0; }
@media (max-width: 420px) { .facts-dl > div { grid-template-columns: 1fr; gap: .1rem; } }
table.weights .wbar-cell { width: 45%; }
.wbar { display: block; height: .65rem; border-radius: 0 3px 3px 0; background: var(--dmbok); }
.linkish { background: none; border: 0; color: var(--link); font: 600 var(--t-xs)/1 var(--f-body); cursor: pointer; padding: .2rem; }
.linkish:hover { text-decoration: underline; }
.inline-check { display: inline-flex; gap: .45rem; align-items: center; font-size: var(--t-sm); cursor: pointer; }
.inline-check input { accent-color: var(--accent); }

.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: 1rem; max-width: 760px; }
.qcard .q { border: 0; padding: 0; background: none; }
.qcard .q legend { font-size: 1.05rem; margin-bottom: .4rem; }
.qhead { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.qtimer { margin-left: auto; font: 600 var(--t-sm)/1 var(--f-mono); color: var(--accent); }
.optkey { font-family: var(--f-mono); color: var(--muted); margin-right: .2rem; }
.review { margin: 0; padding-left: 1.2rem; display: grid; gap: .8rem; font-size: var(--t-sm); }
.review li { display: grid; gap: .2rem; }
.review strong { font-weight: 600; }
.ok-ans { color: var(--ok); font-weight: 600; }

.cards-bar { align-items: flex-end; }
.fc-wrap { display: grid; gap: .8rem; justify-items: center; }
.flashcard {
  position: relative; width: min(100%, 560px); aspect-ratio: 16 / 10; max-width: 100%;
  border: 0; padding: 0; background: none; cursor: pointer; perspective: 1200px; font: inherit; color: inherit;
}
.fc-face {
  position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: .6rem;
  padding: 1.5rem 1.75rem; text-align: center; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow); backface-visibility: hidden;
  transition: transform .45s ease; overflow: auto;
}
.fc-back { transform: rotateY(180deg); background: var(--surface-2); }
.flashcard.is-flipped .fc-front { transform: rotateY(-180deg); }
.flashcard.is-flipped .fc-back { transform: rotateY(0); }
.flashcard:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 14px; }
.fc-term { font: 700 clamp(1.3rem, 1rem + 1.5vw, 1.9rem)/1.2 var(--f-display); }
.fc-alt { color: var(--muted); font-size: var(--t-sm); }
.fc-def { font-size: var(--t-md); line-height: 1.55; max-width: 44ch; }
.fc-tag { position: absolute; top: .8rem; left: 1rem; font: 600 var(--t-xs)/1 var(--f-mono); letter-spacing: .06em; color: var(--accent); }
.fc-hint { position: absolute; bottom: .8rem; font-size: var(--t-xs); color: var(--muted); }
.fc-controls { display: flex; gap: .75rem; align-items: center; justify-content: center; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) {
  .fc-face { transition: none; }
}
@media (max-width: 480px) { .flashcard { aspect-ratio: 4 / 5; } }

.sheet-bar { justify-content: space-between; }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: .9rem; }
.sheet[hidden] { display: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: .5rem; }
.sheet-head h2 { font-size: 1.35rem; }
.sheet-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.sbox { border: 1px solid var(--line); border-radius: 6px; padding: .6rem .7rem; font-size: .8rem; line-height: 1.45; min-width: 0; }
.sbox h3 { font: 600 .7rem/1.3 var(--f-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--fw, var(--accent)); margin: 0 0 .35rem; }
.sbox.span2 { grid-column: span 2; grid-row: span 2; }
.span-all { grid-column: 1 / -1; }
.kv { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.kv b { font-family: var(--f-mono); font-weight: 600; }
.ka-mini { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; }
.sheet-comps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.sbox.comp { border-top: 3px solid var(--l-exec); }
.sbox.layer-b-found { border-top-color: var(--l-found); }
.sbox.layer-b-collab { border-top-color: var(--l-collab); }
.sbox.layer-b-app { border-top-color: var(--l-app); }
#sheet-dmbok-body .sbox h3 { color: var(--dmbok); }
#sheet-dcam-body .sbox h3 { color: var(--dcam); }
@media (max-width: 1000px) { .sheet-cols, .sheet-comps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .sheet-cols, .sheet-comps { grid-template-columns: 1fr; } .sbox.span2 { grid-column: auto; grid-row: auto; } }

@media print {
  body { background: #fff; color: #000; }
  body::before, .masthead, .site-foot, .page-head, .tabs, .pager, .sheet-bar, #exams, #quiz, #cards { display: none !important; }
  #sheets { display: block !important; }
  .sheet { border: 0; padding: 0; box-shadow: none; }
  .sheet-cols, .sheet-comps { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .sbox { font-size: 7.5pt; padding: 4px 6px; break-inside: avoid; }
  .sbox.span2 { grid-column: span 3; grid-row: auto; }
  @page { size: A4 landscape; margin: 8mm; }
}

/* ---------- Glossary ---------- */
.gl-tools { gap: .9rem; }
.gl-search input { font: 400 var(--t-md)/1.4 var(--f-body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .65rem .8rem; width: 100%; }
.az { display: flex; flex-wrap: wrap; gap: .15rem; }
.az a, .az span { font: 600 var(--t-xs)/1 var(--f-mono); width: 1.65rem; height: 1.65rem; display: grid; place-items: center; border-radius: 4px; text-decoration: none; }
.az a { color: var(--ink); background: var(--surface-2); }
.az a:hover { background: var(--accent-soft); color: var(--accent); }
.az span { color: var(--line); }
.gl-list { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
.gl-group { scroll-margin-top: 5rem; }
.gl-group h2 { font-size: 1.4rem; color: var(--accent); border-bottom: 1px solid var(--line); padding-bottom: .3rem; margin-bottom: .4rem; }
.gl-group dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
.gl-item { padding: .7rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .25rem; align-content: start; }
.gl-item dt { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: baseline; }
.gl-term { font-family: var(--f-display); font-weight: 600; font-size: 1.08rem; }
.gl-alt { color: var(--muted); font-size: var(--t-sm); }
.gl-item dd { margin: 0; font-size: var(--t-sm); color: var(--ink); max-width: 60ch; }
.gl-item .pill { font-size: .65rem; padding: .2rem .4rem; }
mark { background: var(--accent-soft); color: inherit; border-radius: 2px; padding: 0 .1em; }
@media (max-width: 760px) { .gl-group dl { grid-template-columns: 1fr; } }

/* ---------- Foundations ---------- */
.dik { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.dik li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: .45rem; align-content: start; min-width: 0; }
.dik li:nth-child(1) { border-top: 4px solid var(--l-collab); }
.dik li:nth-child(2) { border-top: 4px solid var(--dmbok); }
.dik li:nth-child(3) { border-top: 4px solid var(--dcam); }
.dik li + li::before { content: "→"; position: absolute; left: -.75rem; top: 50%; transform: translate(-50%, -50%); color: var(--muted); font-size: 1.1rem; }
.dik code { font: 500 var(--t-sm)/1.4 var(--f-mono); background: var(--surface-2); padding: .3rem .5rem; border-radius: 4px; overflow-wrap: anywhere; }
.dik strong { font-weight: 600; font-size: var(--t-sm); }
.dik .muted { font-size: var(--t-xs); }
@media (max-width: 760px) { .dik { grid-template-columns: 1fr; } .dik li + li::before { content: "↓"; left: 50%; top: -.4rem; } }
.lifecycle { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; counter-reset: lc; }
.lifecycle li { counter-increment: lc; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .75rem .7rem; display: grid; gap: .3rem; align-content: start; font-size: var(--t-xs); color: var(--muted); min-width: 0; }
.lifecycle li::before { content: counter(lc); font: 700 1.1rem/1 var(--f-display); color: var(--accent); }
.lifecycle li strong { color: var(--ink); font-size: var(--t-sm); font-weight: 600; }
.lifecycle li:nth-child(3), .lifecycle li:nth-child(5) { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 1000px) { .lifecycle { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 520px) { .lifecycle { grid-template-columns: 1fr 1fr; } }
.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.theme { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1rem; }
.theme h3 { font-size: 1rem; margin-bottom: .4rem; }
.theme ul { margin: 0; padding-left: 1.05rem; display: grid; gap: .3rem; font-size: var(--t-sm); }
a.card-link { text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
a.card-link:hover { box-shadow: var(--shadow); }

/* ---------- Templates ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tpl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; display: grid; grid-template-rows: auto auto 1fr auto; gap: .6rem; min-width: 0; }
.tpl-card h2 { font-size: 1.15rem; }
.tpl-card p { font-size: var(--t-sm); color: var(--muted); }
@media (max-width: 960px) { .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tpl-grid { grid-template-columns: 1fr; } }

/* DCAM sub-capability guidance */
.subd { margin-top: .35rem; }
.subd summary { cursor: pointer; font: 600 var(--t-xs)/1.4 var(--f-body); color: var(--link); display: inline-block; }
.subd[open] summary { margin-bottom: .4rem; }
.subd-body { display: grid; gap: .4rem; padding: .6rem .75rem; background: var(--surface-2); border-radius: 6px; font-size: var(--t-xs); color: var(--ink); }
.subd-body p { color: var(--ink); }
.subd-body strong { font-weight: 600; }
.subd-body .tip { border-left: 3px solid var(--fw); padding-left: .5rem; }
.mini-rubric { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; gap: .2rem; }
.mini-rubric li { display: grid; grid-template-columns: 1.2rem 6.5rem 1fr; gap: .4rem; align-items: baseline; padding: .2rem .35rem; border-radius: 4px; }
.mini-rubric li b { font-family: var(--f-mono); color: var(--fw); }
.mini-rubric .lvl-name { font-weight: 600; }
.mini-rubric li.is-ach { background: var(--fw-soft); }
.item-guide { grid-column: 1 / -1; }
@media (max-width: 520px) { .mini-rubric li { grid-template-columns: 1.2rem 1fr; } .mini-rubric li > span:last-child { grid-column: 2; } }

/* DMBOK chapter guide */
.chapters { display: grid; gap: .5rem; }
.chap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.chap > summary { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: .6rem; align-items: center; padding: .75rem 1rem; cursor: pointer; list-style: none; }
.chap > summary::-webkit-details-marker { display: none; }
.chap[open] > summary { border-bottom: 1px solid var(--line); }
.chap-n { font: 700 1.2rem/1 var(--f-display); color: var(--dmbok); }
.chap-t { font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; }
.chap-body { padding: .9rem 1rem 1rem; display: grid; gap: .75rem; justify-items: start; }
.chap-gist { font-size: var(--t-sm); max-width: 75ch; }
.chap-dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.25rem; width: 100%; }
.chap-dl > div { border-top: 1px solid var(--line); padding-top: .45rem; }
.chap-dl dt { font-weight: 600; font-size: var(--t-sm); }
.chap-dl dd { margin: .15rem 0 0; font-size: var(--t-sm); color: var(--muted); }
.chap-tip { font-size: var(--t-sm); background: var(--dmbok-soft); border-radius: 6px; padding: .55rem .75rem; width: 100%; }
.chap-tip strong { font-weight: 600; }
@media (max-width: 720px) { .chap-dl { grid-template-columns: 1fr; } .chap > summary { grid-template-columns: 2rem 1fr; } .chap > summary .pill { grid-column: 2; justify-self: start; } }

/* ---------- Case study ---------- */
.ev { font: 600 var(--t-xs)/1 var(--f-mono); padding: .25rem .45rem; border-radius: 999px; white-space: nowrap; }
.ev-yes { background: var(--ok-soft); color: var(--ok); }
.ev-part { background: var(--accent-soft); color: var(--accent); }
.ev-no { background: var(--bad-soft); color: var(--bad); }
.interviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.iv { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: grid; gap: .5rem; align-content: start; font-size: var(--t-sm); }
.iv-a { background: var(--surface-2); border-radius: 6px; padding: .5rem .65rem; font-style: italic; }
.iv-c { border-left: 3px solid var(--dcam); padding-left: .55rem; }
.iv b { font-style: normal; font-weight: 600; }
@media (max-width: 900px) { .interviews { grid-template-columns: 1fr; } }
.cs-table td { vertical-align: top; }
.cs-table td:nth-child(4), .cs-table td:nth-child(5) { min-width: 14rem; }
.sc { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; font: 700 var(--t-sm)/1 var(--f-mono); }
.sc-c { background: var(--chart-current); color: #fff; }
.sc-t { border: 2px solid var(--chart-target); color: var(--chart-target); }
.why-not { display: block; margin-top: .3rem; font-size: var(--t-xs); color: var(--muted); }
.dumbbell { width: 100%; height: auto; display: block; }
.dumbbell .grid { stroke: var(--line); stroke-width: 1; }
.dumbbell .tick { fill: var(--muted); font: 500 11px/1 var(--f-mono); }
.dumbbell .rowlbl { fill: var(--ink); font: 600 11.5px/1 var(--f-mono); }
.dumbbell .bar { stroke: var(--muted); stroke-width: 2; stroke-opacity: .55; }
.dumbbell .dot-cur { fill: var(--chart-current); stroke: var(--surface); stroke-width: 2; }
.dumbbell .dot-tgt { fill: var(--surface); stroke: var(--chart-target); stroke-width: 2.5; }
.legend .lg-dot { width: 11px; height: 11px; border-radius: 50%; border: 0; background: var(--chart-current); }
.legend .lg-ring { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--chart-target); }
