/* ReportName.com — shared design system
   Tokens first, then base, layout, components, page-specific blocks, print. */

:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --surface-3: #e3e8ef;
  --ink: #0e1726;
  --ink-2: #3d4a5c;
  --muted: #677387;
  --line: #dde3eb;
  --line-strong: #c4cdd9;
  --brand: #1f5fd6;
  --brand-hover: #174bb0;
  --brand-soft: #e6eefc;
  --brand-ink: #ffffff;
  --ok: #14803c;
  --ok-soft: #dcf3e4;
  --warn: #a35a00;
  --warn-soft: #fdf0dc;
  --danger: #c22f2f;
  --danger-soft: #fbe5e5;
  --focus: #1f5fd6;
  --shadow-sm: 0 1px 2px rgb(14 23 38 / 6%);
  --shadow-md: 0 4px 16px rgb(14 23 38 / 8%), 0 1px 3px rgb(14 23 38 / 6%);
  --shadow-lg: 0 24px 60px rgb(14 23 38 / 18%);

  /* chart series (validated categorical order, light) */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #6250d6;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1180px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0f19;
    --surface: #111827;
    --surface-2: #182233;
    --surface-3: #223047;
    --ink: #eef2f7;
    --ink-2: #c3ccd9;
    --muted: #8d99ab;
    --line: #243045;
    --line-strong: #34445e;
    --brand: #5b9bff;
    --brand-hover: #82b3ff;
    --brand-soft: #16284a;
    --brand-ink: #06101f;
    --ok: #4cc77a;
    --ok-soft: #12301f;
    --warn: #f0a640;
    --warn-soft: #33240e;
    --danger: #f07070;
    --danger-soft: #3a1717;
    --focus: #82b3ff;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow-md: 0 4px 16px rgb(0 0 0 / 40%);
    --shadow-lg: 0 24px 60px rgb(0 0 0 / 60%);
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #9085e9;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0f19;
  --surface: #111827;
  --surface-2: #182233;
  --surface-3: #223047;
  --ink: #eef2f7;
  --ink-2: #c3ccd9;
  --muted: #8d99ab;
  --line: #243045;
  --line-strong: #34445e;
  --brand: #5b9bff;
  --brand-hover: #82b3ff;
  --brand-soft: #16284a;
  --brand-ink: #06101f;
  --ok: #4cc77a;
  --ok-soft: #12301f;
  --warn: #f0a640;
  --warn-soft: #33240e;
  --danger: #f07070;
  --danger-soft: #3a1717;
  --focus: #82b3ff;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-md: 0 4px 16px rgb(0 0 0 / 40%);
  --shadow-lg: 0 24px 60px rgb(0 0 0 / 60%);
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #9085e9;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
code, kbd, .mono { font-family: var(--mono); font-size: .92em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-soft); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 760px; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .78rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.eyebrow-list { flex-wrap: wrap; gap: 4px 0; }
.eyebrow-list > span { white-space: nowrap; }
.eyebrow-list > span + span::before { content: "·"; margin: 0 8px; }
.nowrap { white-space: nowrap; }
@media (max-width: 520px) {
  .eyebrow-list > span:last-child { flex-basis: 100%; }
  .eyebrow-list > span:last-child::before { content: none; }
}
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }

/* ---------- Header / footer ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink);
}
.brand-mark svg { width: 16px; height: 16px; }
.brand small { font-weight: 500; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: .95rem; font-weight: 500;
  padding: 8px 12px; border-radius: var(--radius-sm);
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.nav .nav-cta { background: var(--brand); color: var(--brand-ink); margin-left: 6px; }
.nav .nav-cta:hover { background: var(--brand-hover); color: var(--brand-ink); }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
@media (max-width: 820px) {
  .menu-btn { display: inline-grid; margin-left: auto; }
  .nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
    box-shadow: var(--shadow-md);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav .nav-cta { margin: 8px 0 0; text-align: center; }
}

.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 32px 0; font-size: .92rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- Buttons & form controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: .94rem; font-weight: 600; line-height: 1;
  padding: 11px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); color: var(--brand-ink); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--line-strong); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 7px 10px; font-size: .85rem; }
.btn-lg { padding: 14px 22px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.field { display: grid; gap: 6px; }
.field label, .label { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: .82rem; color: var(--muted); }
.input, .textarea, .select {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 10px 12px; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }

/* ---------- Cards / chips / misc ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  font-size: .8rem; font-weight: 500; line-height: 1.2;
  padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-2);
}
.chip .mono { overflow-wrap: anywhere; }
.chip-type { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.chip-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.chip-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.chip-brand { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
button.chip { cursor: pointer; font-family: inherit; }
button.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
button.chip[aria-pressed="true"] .chip-type { color: inherit; opacity: .8; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500; z-index: 90; pointer-events: none; transition: .2s; box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

dialog.modal {
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 0;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
  width: min(480px, calc(100vw - 32px));
}
dialog.modal::backdrop { background: rgb(5 10 20 / 55%); }
.modal-body { padding: 24px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

/* ---------- Home ---------- */
.hero { padding: 72px 0 48px; }
.hero h1 { max-width: 15ch; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-2); max-width: 56ch; margin: 16px 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 40px; } }
.preview-card { padding: 20px; }
.preview-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px dashed var(--line); font-size: .94rem; }
.preview-row:last-child { border-bottom: 0; }
.preview-row .tick { width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.preview-row.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.preview-row.done .name { color: var(--muted); text-decoration: line-through; }
.preview-row .tick svg { width: 12px; height: 12px; }
.preview-row .chip { margin-left: auto; }

.section { padding: 48px 0; }
.section-head { margin-bottom: 28px; max-width: 640px; }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
@media (max-width: 900px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card { padding: 20px; position: relative; }
.step-card::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: .8rem; color: var(--brand); font-weight: 600;
  display: block; margin-bottom: 12px;
}
.step-card p { color: var(--ink-2); font-size: .94rem; margin: 0; }
.link-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .link-cards { grid-template-columns: 1fr; } }
.link-card { display: block; padding: 22px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.link-card:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-2px); }
.link-card p { color: var(--ink-2); margin: 0; font-size: .94rem; }
.link-card .arrow { color: var(--brand); }

/* ---------- Page header ---------- */
.page-head { padding: 40px 0 24px; }
.page-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.page-head p { color: var(--ink-2); max-width: 62ch; margin: 0; }

/* ---------- Toolbox / checklist ---------- */
.tb-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 960px) { .tb-layout { grid-template-columns: 1fr; gap: 16px; } }

.tb-rail { position: sticky; top: 76px; display: grid; gap: 16px; }
@media (max-width: 960px) {
  .tb-rail { position: sticky; top: 60px; z-index: 20; margin: 0 calc(var(--gutter) * -1); }
  .tb-rail .card { border-radius: 0; border-left: 0; border-right: 0; }
  .tb-rail .rail-steps, .tb-rail .rail-tools { display: none; }
}
.rail-progress { padding: 18px; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.progress-top strong { font-size: 1.5rem; font-family: var(--mono); font-weight: 600; letter-spacing: -0.02em; }
.progress-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 999px; transition: width .3s ease; }
.rail-actions { display: flex; gap: 8px; margin-top: 14px; }
.rail-actions .btn { flex: 1; }
@media (max-width: 960px) { .rail-progress { padding: 12px var(--gutter); } .rail-progress .progress-top strong { font-size: 1.1rem; } .rail-actions { margin-top: 10px; } }

.rail-steps { list-style: none; margin: 0; padding: 8px; }
.rail-steps a {
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px;
  padding: 10px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink-2); font-size: .92rem; font-weight: 500;
}
.rail-steps a:hover { background: var(--surface-2); color: var(--ink); }
.rail-steps a.active { background: var(--brand-soft); color: var(--ink); }
.rail-num {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-size: .8rem; font-weight: 600;
  border: 1.5px solid var(--line-strong); color: var(--muted); background: var(--surface);
}
.rail-steps a.complete .rail-num { background: var(--ok); border-color: var(--ok); color: #fff; }
.rail-steps a.started .rail-num { border-color: var(--ok); color: var(--ok); }
.rail-count { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.rail-tools { padding: 14px; display: grid; gap: 8px; }
.rail-tools .btn { justify-content: flex-start; }

.tb-main { display: grid; gap: 20px; }
#tools { display: grid; gap: 20px; }
#tools > [hidden] { display: none; }

/* Mode switch */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; max-width: 760px; }
.mode-opt {
  display: flex; gap: 14px; align-items: flex-start; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink); background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px;
  transition: border-color .15s, background .15s;
}
.mode-opt:hover { border-color: var(--line-strong); }
.mode-opt[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.mode-opt strong { display: block; font-size: 1rem; }
.mode-opt strong + span { display: block; font-size: .86rem; color: var(--ink-2); margin-top: 2px; }
.mode-icon { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.mode-opt[aria-pressed="true"] .mode-icon { background: var(--brand); color: var(--brand-ink); }
.mode-icon svg { width: 18px; height: 18px; }
@media (max-width: 600px) {
  .mode-switch { gap: 8px; }
  .mode-opt { padding: 12px; gap: 10px; flex-direction: column; }
  .mode-opt strong + span { font-size: .8rem; }
  .mode-icon { width: 30px; height: 30px; }
}

.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chips[hidden] { display: none; }
.cat-chips .chip { padding: 6px 11px; font-size: .84rem; }
.cat-chips .chip b { font-family: var(--mono); font-weight: 600; color: var(--ok); }
.cat-chips .chip[aria-pressed="true"] b { color: inherit; }
.rail-hint { display: block; font-size: .8rem; margin-top: 6px; }
.rail-cta { padding: 18px; }
.rail-cta strong { display: block; margin-bottom: 4px; }
.rail-cta p { font-size: .88rem; color: var(--ink-2); margin: 0 0 12px; }
.rail-cta .btn { white-space: normal; }
@media (max-width: 960px) { .tb-rail .rail-cta { display: none; } }
.tb-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tb-toolbar .search { position: relative; flex: 1 1 260px; }
.tb-toolbar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.tb-toolbar .search .input { padding-left: 36px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-2); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--brand); width: 16px; height: 16px; }

.stage { scroll-margin-top: 80px; }
@media (max-width: 960px) { .stage { scroll-margin-top: 150px; } }
.stage-head { display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: start; padding: 22px 24px; }
.stage-num {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.stage.complete .stage-num { background: var(--ok); color: #fff; border-color: var(--ok); }
.stage-head h2 { font-size: 1.3rem; margin-bottom: 4px; }
.stage-head p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.stage-meta { text-align: right; font-family: var(--mono); font-size: .82rem; color: var(--muted); white-space: nowrap; padding-top: 4px; }
@media (max-width: 600px) {
  .stage-head { grid-template-columns: 36px 1fr; padding: 18px 16px; gap: 12px; }
  .stage-num { width: 36px; height: 36px; border-radius: 10px; font-size: .9rem; }
  .stage-meta { grid-column: 2; text-align: left; padding: 0; }
}
.stage-body { border-top: 1px solid var(--line); }
.stage-pad { padding: 20px 24px 24px; }
@media (max-width: 600px) { .stage-pad { padding: 16px; } }

.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.case-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .case-grid { grid-template-columns: 1fr; } }
.target-add { display: flex; gap: 8px; }
.target-add .input { font-family: var(--mono); font-size: .9rem; }
.target-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.target-list .chip { padding: 6px 6px 6px 10px; font-size: .86rem; }
.target-list .chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: 1.1rem; line-height: 1; border-radius: 4px; }
.target-list .chip button:hover { color: var(--danger); }

.group { border-top: 1px solid var(--line); }
.group:first-child { border-top: 0; }
.group-head {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 24px;
  background: var(--surface-2); border: 0; font: inherit; color: var(--ink); cursor: pointer; text-align: left;
}
.group-head:hover { background: var(--surface-3); }
.group-head h3 { margin: 0; font-size: 1rem; }
.group-head .count { margin-left: auto; font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.group-head .caret { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; flex: none; }
.group[data-open="false"] .caret { transform: rotate(-90deg); }
.group[data-open="false"] .group-items { display: none; }
@media (max-width: 600px) { .group-head { padding: 12px 16px; } }

.tool { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px 14px; padding: 14px 24px; border-top: 1px solid var(--line); align-items: start; }
.tool:first-child { border-top: 0; }
@media (max-width: 600px) { .tool { padding: 14px 16px; grid-template-columns: 28px minmax(0, 1fr); } .tool-actions { grid-column: 2; } }
.tool.is-done { background: color-mix(in srgb, var(--ok-soft) 45%, transparent); }
.check {
  appearance: none; -webkit-appearance: none; margin: 1px 0 0; cursor: pointer;
  width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; transition: .15s;
}
.check:hover { border-color: var(--ok); }
.check:checked { background: var(--ok); border-color: var(--ok); }
.check:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  background-size: 16px 16px; background-position: center; background-repeat: no-repeat;
}
.tool { cursor: pointer; }
.tool:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.tool.is-done:hover { background: color-mix(in srgb, var(--ok-soft) 65%, transparent); }
.tool .tool-detail, .tool .tool-detail * { cursor: auto; }
.tool .tool-detail button { cursor: pointer; }
.tool-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tool-title a { font-weight: 600; color: var(--ink); text-decoration: none; }
.tool-title a:hover { color: var(--brand); text-decoration: underline; }
.tool-title a svg { width: 13px; height: 13px; display: inline; vertical-align: -1px; margin-left: 3px; color: var(--muted); }
.tool.is-done .tool-title a { color: var(--ink-2); }
.tool-desc { color: var(--ink-2); font-size: .9rem; margin: 4px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-desc.expanded { -webkit-line-clamp: unset; }
.tool-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tool-summary:empty { display: none; }
.tool-note-preview { font-size: .86rem; color: var(--ink-2); border-left: 2px solid var(--line-strong); padding-left: 10px; margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tool-actions { display: flex; gap: 6px; }
.tool-detail { grid-column: 2 / -1; display: grid; gap: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.tool-detail[hidden] { display: none; }
.detail-row { display: grid; gap: 6px; }
.detail-targets { display: flex; flex-wrap: wrap; gap: 6px; }
.outcomes { display: flex; flex-wrap: wrap; gap: 6px; }

.reco { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ok); }
.reco svg { width: 12px; height: 12px; }

.finish { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
@media (max-width: 640px) { .finish { grid-template-columns: 1fr; } }
.finish-stats { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 12px; }
.finish-stats div { font-size: .85rem; color: var(--muted); }
.finish-stats strong { display: block; font-family: var(--mono); font-size: 1.4rem; color: var(--ink); font-weight: 600; }

.further { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 20px 24px 24px; }
@media (max-width: 640px) { .further { grid-template-columns: 1fr; padding: 16px; } }
.further a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 500; font-size: .93rem; }
.further a:hover { border-color: var(--brand); }
.further a span { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* ---------- Report ---------- */
.report-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 24px; align-items: flex-end; padding: 40px 0 24px; }
.report-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 8px; overflow-wrap: anywhere; }
.report-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--muted); }
.report-meta b { color: var(--ink-2); font-weight: 600; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.report-grid { display: grid; gap: 20px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 820px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { padding: 18px 20px; }
.tile .label { display: block; font-size: .82rem; font-weight: 500; color: var(--muted); }
.tile .value { font-family: var(--mono); font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; margin-top: 6px; }
.tile .value small { font-size: .95rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.tile .sub { font-size: .82rem; color: var(--ink-2); margin-top: 4px; }
.two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.panel { padding: 22px 24px; min-width: 0; }
@media (max-width: 600px) { .panel { padding: 18px 16px; } }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { font-size: 1.1rem; margin: 0; }
.panel-head p { margin: 0; font-size: .85rem; color: var(--muted); }

.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 170px) minmax(0, 1fr) 64px; gap: 12px; align-items: center; position: relative; }
.bar-row .name { font-size: .9rem; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .num { font-family: var(--mono); font-size: .85rem; color: var(--ink-2); text-align: right; }
.bar-track { height: 14px; background: var(--surface-2); border-radius: 4px; position: relative; overflow: hidden; }
.bar-fill { position: absolute; inset: 0 auto 0 0; border-radius: 0 4px 4px 0; min-width: 0; transition: width .4s ease; }
.bar-row:hover .bar-track { outline: 1px solid var(--line-strong); }
@media (max-width: 520px) { .bar-row { grid-template-columns: 1fr 56px; } .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; } }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--ink-2); margin-top: 16px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut { width: 150px; height: 150px; flex: none; }
.donut-list { display: grid; gap: 8px; font-size: .88rem; flex: 1; min-width: 160px; }
.donut-list div { display: flex; align-items: center; gap: 8px; }
.donut-list i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-list b { margin-left: auto; font-family: var(--mono); font-weight: 600; }

.matrix-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px 4px; }
.matrix { border-collapse: separate; border-spacing: 3px; font-size: .82rem; }
.matrix th { font-weight: 500; color: var(--ink-2); text-align: left; }
.matrix thead th { vertical-align: bottom; height: 130px; padding: 0; }
.matrix thead th > div { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; max-height: 128px; overflow: hidden; text-overflow: ellipsis; padding: 4px 0; }
.matrix tbody th { padding-right: 12px; font-family: var(--mono); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.matrix td { width: 26px; height: 26px; border-radius: 5px; background: var(--surface-2); position: relative; }
.matrix td.on { background: var(--c, var(--series-1)); }
.matrix td.general { background: transparent; box-shadow: inset 0 0 0 2px var(--c, var(--series-1)); opacity: .55; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 14px 24px; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--series-1)); box-shadow: 0 0 0 3px var(--surface); }
.timeline time { display: block; font-family: var(--mono); font-size: .76rem; color: var(--muted); }

.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table td.note { color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; min-width: 200px; max-width: 360px; }
.data-table tr:last-child td { border-bottom: 0; }
.stage-dot { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.stage-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

.gap-list { display: grid; gap: 10px; }
.gap-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius); font-size: .9rem; }
.gap-item svg { width: 18px; height: 18px; color: var(--warn); flex: none; margin-top: 2px; }

.tooltip {
  position: fixed; z-index: 80; pointer-events: none; max-width: 280px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md); padding: 10px 12px; font-size: .82rem;
  opacity: 0; transition: opacity .1s;
}
.tooltip.show { opacity: 1; }
.tooltip b { display: block; margin-bottom: 4px; }
.tooltip ul { margin: 0; padding-left: 16px; color: var(--ink-2); }

/* ---------- Blog ---------- */
.blog-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 24px; }
.blog-tools .input { max-width: 320px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
@media (max-width: 400px) { .post-grid { grid-template-columns: 1fr; } }
.post-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.post-card:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-2px); }
.post-card .cover { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; border-bottom: 1px solid var(--line); }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.post-card .body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card h2 { font-size: 1.2rem; margin: 0; }
.post-card p { color: var(--ink-2); margin: 0; font-size: .94rem; }
.post-card .meta { margin-top: auto; padding-top: 8px; font-size: .82rem; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.post-card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; }
.post-card.featured .cover { aspect-ratio: auto; min-height: 260px; border-bottom: 0; border-right: 1px solid var(--line); }
.post-card.featured h2 { font-size: 1.6rem; }
@media (max-width: 760px) { .post-card.featured { grid-template-columns: 1fr; } .post-card.featured .cover { aspect-ratio: 16/9; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); } }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.article { padding: 40px 0 0; }
.article-head { margin-bottom: 32px; }
.article-head h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
.article-head .summary { font-size: 1.15rem; color: var(--ink-2); }
.article-head .meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: .88rem; color: var(--muted); }
.prose { font-size: 1.06rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose h2 { margin-top: 2em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 0; }
.prose li + li { margin-top: .35em; }
.prose figure { margin: 1.6em 0; }
.prose figure img { border-radius: var(--radius); border: 1px solid var(--line); }
.prose figcaption { font-size: .86rem; color: var(--muted); margin-top: 8px; text-align: center; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--brand); color: var(--ink-2); font-style: italic; }
.prose pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; font-size: .88rem; }
.prose :not(pre) > code { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.callout { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 16px 18px; border-radius: var(--radius); background: var(--brand-soft); font-size: .98rem; }
.callout svg { width: 20px; height: 20px; color: var(--brand); margin-top: 3px; }
.callout.warn { background: var(--warn-soft); }
.callout.warn svg { color: var(--warn); }
.callout.tip { background: var(--ok-soft); }
.callout.tip svg { color: var(--ok); }
.callout strong:first-child { display: block; }
.callout p { margin: 0; }
.post-steps { list-style: none; padding: 0 !important; counter-reset: pstep; display: grid; gap: 14px; }
.post-step { display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.post-step + .post-step { margin-top: 0 !important; }
.post-step.done { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.post-step.done h3 { color: var(--muted); }
.post-step h3 { font-size: 1.08rem; margin: 2px 0 6px; }
.post-step h3 .n { font-family: var(--mono); font-size: .8rem; color: var(--brand); margin-right: 8px; }
.post-step .content > * + * { margin-top: .7em; }
.post-step img { border-radius: var(--radius); border: 1px solid var(--line); margin-top: 12px; }
.step-progress { font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.tool-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-links a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); text-decoration: none; font-size: .9rem; font-weight: 500; color: var(--ink); }
.tool-links a:hover { border-color: var(--brand); color: var(--brand); }
.article-foot { margin-top: 48px; padding: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }

/* ---------- Simple content pages ---------- */
.content-page .prose h2 { font-size: 1.3rem; }
.content-page .prose h3 { font-size: 1.05rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .value-grid { grid-template-columns: 1fr; } }
.value-grid .card { padding: 22px; }
.value-grid p { color: var(--ink-2); margin: 0; font-size: .95rem; }
.form-grid { display: grid; gap: 16px; }
.form-status { font-size: .92rem; padding: 12px 14px; border-radius: var(--radius-sm); }
.form-status.ok { background: var(--ok-soft); color: var(--ok); }
.form-status.err { background: var(--danger-soft); color: var(--danger); }
.toc { font-size: .9rem; }
.toc a { display: block; padding: 4px 0; color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand); }

/* ---------- Print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

.tiles.tiles-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .tiles.tiles-3 { grid-template-columns: 1fr; } }

/* ---------- Past reports & sync ---------- */
.reports-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .reports-layout { grid-template-columns: 1fr; } }
.reports-main { display: grid; gap: 20px; min-width: 0; }
.reports-side { display: grid; gap: 20px; position: sticky; top: 76px; }
@media (max-width: 960px) { .reports-side { position: static; } }
.hist-list { display: grid; gap: 12px; }
.hist-item { padding: 18px 20px; }
.hist-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.hist-title strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.hist-meta { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.hist-stats { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .88rem; color: var(--ink-2); margin-top: 10px; }
.hist-stats b { font-family: var(--mono); color: var(--ink); }
.hist-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.hist-del { margin-left: auto; color: var(--danger); }
.hist-del:hover { background: var(--danger-soft); color: var(--danger); }
.sync-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sync-actions .btn { flex: 1; }
.sync-fine { font-size: .78rem; color: var(--muted); margin: 14px 0 0; line-height: 1.5; }
.sync-fine svg { display: inline; vertical-align: -1px; }
.sync-busy { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-2); padding: 14px 0 6px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line-strong); border-top-color: var(--brand); animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.sync-out { text-align: center; margin-top: 16px; display: grid; gap: 6px; justify-items: center; }
.sync-qr { width: 200px; height: 200px; background: #fff; border-radius: 12px; padding: 6px; display: grid; place-items: center; border: 1px solid var(--line); }
.sync-qr svg { width: 100%; height: 100%; }
.sync-code { font-family: var(--mono); font-size: 1.5rem; font-weight: 600; letter-spacing: .08em; overflow-wrap: anywhere; margin-top: 4px; }
.sync-code.expiring { color: var(--warn); }
.sync-timer { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.sync-input { text-align: center; font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase; }
.sync-diff { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.sync-diff ul { margin: 8px 0 10px; padding-left: 18px; font-size: .9rem; }

/* ---------- Print / PDF ---------- */
.print-only { display: none; }

@media print {
  /* html:not(#_) outranks both dark-mode selectors above, so paper is always light */
  html:not(#_) {
    color-scheme: light;
    --bg: #fff; --surface: #fff; --surface-2: #f1f3f6; --surface-3: #e3e8ef;
    --ink: #0e1726; --ink-2: #333d4d; --muted: #5b6778; --line: #d5dbe3; --line-strong: #b5bfcc;
    --brand: #1f5fd6; --brand-soft: #e6eefc; --ok: #14803c; --ok-soft: #dcf3e4; --warn: #a35a00; --warn-soft: #fdf0dc;
    --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #6250d6;
  }
  @page { margin: 12mm 12mm 14mm; }
  html, body { background: #fff !important; }
  body { font-size: 9.5pt; line-height: 1.45; display: block; min-height: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none !important; }
  .site-header, .site-footer, .no-print, .toast, .tooltip, .skip-link { display: none !important; }
  .print-only { display: block; }
  span.print-only { display: inline; }
  .wrap { max-width: none; padding: 0; }
  a { color: inherit; text-decoration: none; }

  /* Grid/flex containers can clip content at page breaks in Chrome — print as plain blocks */
  .report-grid, .two-col { display: block; }
  .report-grid > *, .two-col > * { margin: 0 0 10pt; }
  .card { border-radius: 8px; }
  .panel { padding: 10pt 12pt; }
  .card, .tile { break-inside: avoid; }
  .card.pbreak { break-inside: auto; }
  .panel-head { margin-bottom: 8pt; break-after: avoid; }
  .panel-head h2 { font-size: 11.5pt; }
  .panel-head p { font-size: 8pt; }

  .report-head { padding: 0 0 10pt; border-bottom: 2px solid var(--ink); margin-bottom: 12pt; display: block; }
  .report-head h1 { font-size: 18pt; margin-bottom: 4pt; }
  .report-meta { font-size: 8.5pt; }

  .tiles, .tiles.tiles-3 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6pt; break-inside: avoid; }
  .tiles.tiles-3 { grid-template-columns: repeat(3, 1fr); }
  .tile { padding: 7pt 9pt; }
  .tile .value { font-size: 16pt; }
  .tile .label, .tile .sub { font-size: 7.5pt; }

  .bars { gap: 6pt; }
  .bar-row { grid-template-columns: 38% 1fr 34pt; gap: 8pt; break-inside: avoid; }
  .bar-row .name, .bar-row .num { font-size: 8.5pt; }
  .bar-track { height: 9pt; border: 0.5pt solid var(--line); }
  .legend { font-size: 7.5pt; margin-top: 8pt; }

  .donut-wrap { break-inside: avoid; gap: 14pt; }
  .donut { width: 110px; height: 110px; }
  .donut-list { font-size: 8.5pt; gap: 4pt; }

  /* Printed matrix: resources down, targets across */
  .pmatrix { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 8pt; margin-bottom: 8pt; }
  .pmatrix caption { text-align: left; font-size: 8pt; color: var(--muted); padding-bottom: 3pt; }
  .pmatrix th, .pmatrix td { border: 0.5pt solid var(--line); padding: 3pt 4pt; }
  .pmatrix thead th { background: var(--surface-2); font-weight: 600; vertical-align: bottom; text-align: center; }
  .pmatrix thead th .chip-type { display: block; font-size: 6.5pt; }
  .pmatrix thead th .mono { display: block; font-size: 7.5pt; overflow-wrap: anywhere; word-break: break-all; }
  .pmatrix th.pm-res { width: 34%; text-align: left; font-weight: 500; }
  .pmatrix tbody th .stage-dot { white-space: normal; }
  .pmatrix td { text-align: center; font-weight: 700; font-size: 9pt; }
  .pmatrix td.on { background: color-mix(in srgb, var(--c) 22%, #fff); color: var(--ink); }
  .pmatrix td.general { color: var(--muted); }
  .pmatrix thead { display: table-header-group; }
  .pmatrix tr { break-inside: avoid; }

  .table-scroll, .matrix-scroll { overflow: visible !important; }
  .data-table { font-size: 8pt; table-layout: auto; }
  .data-table thead { display: table-header-group; }
  .data-table th { font-size: 7pt; padding: 4pt 5pt; }
  .data-table td { padding: 5pt; }
  .data-table td.note { min-width: 0; max-width: none; }
  .data-table tr { break-inside: avoid; }
  .print-url { font-family: var(--mono); font-size: 6.5pt; color: var(--muted); overflow-wrap: anywhere; word-break: break-all; margin-top: 2pt; }

  .timeline li { break-inside: avoid; padding-bottom: 6pt; font-size: 8.5pt; }
  .tags .chip, .chip { font-size: 7.5pt; padding: 1pt 5pt; }
  .print-foot { font-size: 7.5pt; color: var(--muted); border-top: 0.5pt solid var(--line); padding-top: 6pt; margin-top: 6pt; }
}
