/* ============================================================
   Checklistor — "The Ledger"
   A working ledger, marked by a pen. Paper sheets, graphite rules,
   fountain-pen ultramarine, red pencil for deadlines. Three voices:
   serif (document), grotesque (interface), mono (index).
   The brand gesture: the tick overshoots the box.
   No webfonts, no external requests. Class names are API — unchanged.
   ============================================================ */

:root {
  /* materials */
  --paper: #f3f1e9;
  --paper-deep: #eae7db;
  --sheet: #faf8f2;
  --sheet-2: #f1eee4;
  --ink: #1b1914;
  --ink-2: #55514a;
  --ink-3: #7c7767;
  --rule: #d8d3c4;
  --rule-2: #b9b3a0;
  /* inks */
  --pen: #2b49c7;
  --pen-2: #1d36a8;
  --pen-soft: #e7eaf8;
  --pencil: #c23b2a;
  --pencil-soft: #f6e3df;
  --on-pen: #f6f4ec;
  /* legacy aliases (inline styles + JS reference these) */
  --green: var(--pen);
  --green-2: var(--pen-2);
  --green-ink: var(--on-pen);
  --green-soft: var(--pen-soft);
  --amber: var(--pencil);
  --red: var(--pencil);
  --red-soft: var(--pencil-soft);
  --line: var(--rule);
  --line-2: var(--rule-2);
  --card: var(--sheet);
  --card-2: var(--sheet-2);
  --ink-1: var(--ink);
  --stamp: var(--pen);
  /* type */
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  /* geometry */
  --r: 3px;
  --wrap: 1120px;
  --shadow: 0 1px 0 var(--rule), 0 10px 30px rgba(27, 25, 20, .06);
  --shadow-lift: 0 1px 0 var(--rule-2), 0 18px 44px rgba(27, 25, 20, .12);
  color-scheme: light;
}

html[data-theme="dark"] {
  --paper: #14161d;
  --paper-deep: #10121a;
  --sheet: #1b1e28;
  --sheet-2: #212431;
  --ink: #e9e6d9;
  --ink-2: #b5b1a1;
  --ink-3: #868171;
  --rule: #2b2f3c;
  --rule-2: #3f4455;
  --pen: #94a9ff;
  --pen-2: #b6c4ff;
  --pen-soft: #232839;
  --pencil: #ff8272;
  --pencil-soft: #392323;
  --on-pen: #12141b;
  --shadow: 0 1px 0 var(--rule), 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lift: 0 1px 0 var(--rule-2), 0 18px 44px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* ground: dot grid + faint grain */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(var(--rule-2) .8px, transparent .8px);
  background-size: 26px 26px;
  opacity: .28;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .035;
  mix-blend-mode: multiply;
}
html[data-theme="dark"] body::after { mix-blend-mode: screen; opacity: .04; }
main { position: relative; z-index: 1; flex: 1; }
.site-header, .site-footer { position: relative; z-index: 2; }
img, svg { max-width: 100%; height: auto; vertical-align: middle; }

h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; }
h1, h2 { font-family: var(--serif); letter-spacing: -.015em; line-height: 1.06; font-weight: 640; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); }
h3 { font-size: 1.1rem; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--pen); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--pen-2); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--pen); color: var(--on-pen); }

.wrap { width: min(var(--wrap), calc(100% - 2.5rem)); margin: 0 auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -3.5rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .55rem .9rem;
  border-radius: var(--r); text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: .75rem; color: var(--paper); }

/* ---------- voices ---------- */
.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; gap: .7rem;
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; width: 2.2rem; height: 1px; background: var(--pen); flex: none;
}
.eyebrow::after { content: none; }

/* ---------- header: ledger heading ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink);
  box-shadow: 0 3px 0 -2px var(--rule-2);
}
.site-header .bar { display: flex; align-items: center; gap: 1.5rem; padding: .8rem 0; }
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--ink);
  font-family: var(--serif); font-weight: 700; font-size: 1.18rem; letter-spacing: -.01em;
}
/* optical alignment: "Checklistor" has no descenders, so the text's visual band sits
   above its box center — lift the mark to meet the cap-height midline */
.brand svg { flex: none; overflow: visible; transform: translateY(-0.12em); }
.brand .tick-stroke { stroke: var(--pen); }
.brand .box-stroke { stroke: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 1.3rem; margin-left: auto; }
.site-nav a {
  text-decoration: none; color: var(--ink-2);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  padding: .35rem 0; position: relative;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 2px; background: var(--pen); transition: right .18s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { right: 0; }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]::after { right: 0; }
.site-nav .nav-cta,
.site-nav a.nav-cta[aria-current="page"] {
  color: var(--on-pen); background: var(--ink); padding: 0 .95rem;
  height: 2.1rem; display: inline-flex; align-items: center;
  border-radius: var(--r); letter-spacing: .14em;
}
html[data-theme="dark"] .site-nav .nav-cta,
html[data-theme="dark"] .site-nav a.nav-cta[aria-current="page"] { color: var(--paper); background: var(--ink); }
.site-nav .nav-cta::after { content: none; }
.site-nav .nav-cta:hover { background: var(--pen); color: var(--on-pen); }
.theme-toggle {
  border: 1px solid var(--rule-2); background: transparent; cursor: pointer;
  width: 2.1rem; height: 2.1rem; border-radius: var(--r);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); flex: none;
  /* .bar's 1.5rem gap is right for nav rhythm but too wide between the two
     header buttons — pull the toggle in so CTA↔toggle reads as a pair (~10px) */
  margin-left: -0.85rem;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle .ico-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
html[data-theme="dark"] .theme-toggle .ico-moon { display: none; }

.nav-toggle { display: none; }
@media (max-width: 660px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--rule-2); background: transparent; cursor: pointer;
    width: 2.1rem; height: 2.1rem; border-radius: var(--r);
    color: var(--ink-2); margin-left: auto;
  }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--sheet); border-bottom: 1px solid var(--ink);
    padding: .4rem 1.25rem 1rem; box-shadow: var(--shadow-lift); margin-left: 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .8rem 0; font-size: .78rem; border-bottom: 1px dashed var(--rule); }
  .site-nav a::after { content: none; }
  .site-nav .nav-cta { margin-top: .7rem; justify-content: center; border-bottom: 0; }
  /* mobile pair: hamburger + toggle sit ~10px apart */
  .theme-toggle { margin-left: -0.9rem; }
}

/* ---------- buttons: stamped, square ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  font-weight: 620; font-size: .93rem; letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  padding: .64rem 1.25rem; border-radius: var(--r);
  transition: background .13s ease, border-color .13s ease, transform .06s ease;
}
.btn:hover { background: var(--pen); border-color: var(--pen); color: var(--on-pen); }
.btn:active { transform: translateY(1px); }
.btn-green { background: var(--pen); border-color: var(--pen); color: var(--on-pen); }
.btn-green:hover { background: var(--pen-2); border-color: var(--pen-2); color: var(--on-pen); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-sm { padding: .42rem .85rem; font-size: .84rem; gap: .4rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg { flex: none; }

/* ---------- the checkbox: unfilled box, escaping tick ---------- */
.ckbox {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  width: 1.25rem; height: 1.25rem; margin: 0; flex: none;
  border: 1.5px solid var(--ink-2); border-radius: 2px;
  background: transparent;
  position: relative;
  transition: border-color .12s ease;
}
.ckbox:hover { border-color: var(--pen); }
.ckbox::after {
  content: "";
  position: absolute;
  /* oversized: the tick escapes the box, up and to the right */
  left: -18%; top: -42%; width: 150%; height: 150%;
  background: var(--pen);
  clip-path: polygon(8% 61%, 0 72%, 34% 100%, 100% 8%, 89% 0%, 35% 72%);
  transform: scale(0);
  transform-origin: 30% 80%;
  transition: transform .16s cubic-bezier(.2, 1.5, .45, 1);
  pointer-events: none;
}
.ckbox:checked { border-color: var(--ink-3); }
.ckbox:checked::after { transform: scale(1); }

/* ---------- tags (ex-chips): square index labels ---------- */
.chip {
  display: inline-flex; align-items: baseline; gap: .35rem;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-2);
  border: 1px solid var(--rule-2); border-radius: 2px;
  padding: .2rem .5rem; background: transparent;
  text-decoration: none; white-space: nowrap;
}
a.chip:hover { border-color: var(--pen); color: var(--pen); }
.chip-green { color: var(--pen); border-color: var(--pen); background: transparent; }
.chip svg { display: none; }

.trust-strip { display: flex; flex-wrap: wrap; gap: .45rem .55rem; }

/* ---------- sheets ---------- */
.card {
  background: var(--sheet); border: 1px solid var(--rule-2);
  border-radius: var(--r); box-shadow: var(--shadow);
}

/* ---------- hero ---------- */
.hero { padding: clamp(2.6rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 460px);
  gap: clamp(1.5rem, 4.5vw, 4.5rem); align-items: start;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { max-width: 14ch; font-size: clamp(2.4rem, 5.6vw, 4rem); }
.hero h1 em { font-style: italic; color: var(--pen); }
.hero .lede {
  font-size: 1.13rem; color: var(--ink-2); max-width: 44ch; line-height: 1.6;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem 0 1.4rem; }
/* margin-note trust line */
.hero .trust-strip {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em;
  color: var(--ink-3); gap: 0;
}
.hero .trust-strip .chip { border: 0; padding: 0; font-size: inherit; letter-spacing: inherit; color: inherit; }
.hero .trust-strip .chip + .chip::before { content: "/"; margin: 0 .65rem; color: var(--rule-2); }

/* the demo sheet */
.demo-card { padding: 0; overflow: hidden; }
.demo-card .demo-head {
  display: flex; align-items: baseline; gap: .6rem;
  padding: .8rem 1.1rem .55rem;
  border-bottom: 1px solid var(--ink);
  box-shadow: 0 2px 0 -1px var(--rule);
}
.demo-card .demo-head strong { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; }
.demo-card .demo-head .mono { font-size: .7rem; color: var(--ink-3); margin-left: auto; letter-spacing: .1em; }
.demo-card .progress { margin: .75rem 1.1rem 0; }
.demo-note {
  font-size: .78rem; color: var(--ink-3); margin: 0;
  padding: .65rem 1.1rem .8rem; border-top: 1px dashed var(--rule);
  font-style: italic; font-family: var(--serif);
}

/* ---------- progress: hatched ink meter ---------- */
.progress {
  --pct: 0%;
  height: 9px; border-radius: 2px; background: transparent;
  border: 1px solid var(--rule-2); overflow: hidden; position: relative;
}
.progress::after {
  content: ""; position: absolute; inset: 0; width: var(--pct);
  background:
    linear-gradient(to right, transparent calc(100% - 2px), var(--pen) calc(100% - 2px)),
    repeating-linear-gradient(-55deg, var(--pen) 0 1.6px, transparent 1.6px 4.4px);
  transition: width .35s ease;
}

/* ---------- sections ---------- */
.section { padding: clamp(2.2rem, 5vw, 4rem) 0; }
.section-alt {
  background: var(--paper-deep);
  border-top: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2);
}
.section-head { max-width: 64ch; margin-bottom: 2rem; }
.section-head p { color: var(--ink-2); font-size: 1.02rem; }

/* figure captions — editorial specimen labels */
.fig-cap {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  color: var(--ink-3); margin: .7rem 0 0; display: flex; gap: .6rem; align-items: baseline;
}
.fig-cap::before { content: ""; width: 1.4rem; height: 1px; background: var(--rule-2); align-self: center; flex: none; }
.fig-cap em { font-family: var(--serif); font-style: italic; letter-spacing: 0; font-size: .8rem; color: var(--ink-2); }

/* ledger stat line (privacy section) */
.spec-line {
  display: flex; flex-wrap: wrap; gap: .4rem 0;
  font-family: var(--mono); font-size: .78rem; letter-spacing: .06em;
  color: var(--ink-2); border-top: 1px solid var(--ink);
  padding-top: .9rem; max-width: 760px;
  box-shadow: 0 -3px 0 -2px var(--rule-2);
}
.spec-line span { display: inline-flex; align-items: baseline; white-space: nowrap; }
.spec-line span + span::before { content: "/"; margin: 0 .9rem; color: var(--rule-2); }
.spec-line b { color: var(--pen); font-weight: 700; margin-right: .45rem; }

/* ---------- procedure steps (home) ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  max-width: 720px;
}
.steps li {
  display: flex; gap: 1.6rem; align-items: flex-start;
  padding: 1.4rem 0; border-top: 1px solid var(--rule-2);
}
.steps li:last-child { border-bottom: 1px solid var(--rule-2); }
.steps .step-no {
  font-family: var(--serif); font-size: 2.6rem; font-weight: 640; font-style: italic;
  color: var(--pen); line-height: 1; flex: none; width: 3.2rem; text-align: right;
  margin-top: -.2rem;
}
.steps h3 { font-family: var(--serif); font-size: 1.22rem; margin-bottom: .3rem; }
.steps p { margin: 0; color: var(--ink-2); font-size: .96rem; max-width: 52ch; }
@media (max-width: 540px) {
  .steps li { gap: 1rem; }
  .steps .step-no { font-size: 2rem; width: 2.2rem; }
}

/* ---------- ledger rows (shared by template pages + demo) ---------- */
.ck-items { list-style: none; margin: 0; padding: .2rem 0 .4rem; counter-reset: ckrow; }
.ck-items li { counter-increment: ckrow; }
.ck-items li + li { border-top: 1px solid var(--rule); }
.ck-item-row {
  display: flex; align-items: flex-start; gap: .8rem;
  padding: .58rem 1.1rem .58rem .9rem; cursor: pointer; position: relative;
}
.ck-item-row::before {
  content: counter(ckrow, decimal-leading-zero);
  font-family: var(--mono); font-size: .66rem; color: var(--ink-3);
  width: 1.5rem; flex: none; text-align: right;
  padding-top: .42rem; letter-spacing: .05em;
}
.ck-item-row .ckbox { margin-top: .22rem; }
.ck-item-row span { flex: 1; position: relative; }
.ck-item-row span::after {
  content: ""; position: absolute; left: 0; right: 100%; top: 58%;
  height: 1.5px; background: var(--pen); opacity: .75;
  transition: right .22s ease-out;
}
.ck-item-row input:checked ~ span { color: var(--ink-3); }
.ck-item-row input:checked ~ span::after { left: -3px; right: -4px; }

/* ---------- template cards: index cards ---------- */
.tpl-grid {
  display: grid; gap: 0;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  border-top: 1px solid var(--rule-2); border-left: 1px solid var(--rule-2);
  counter-reset: tplcard;
}
.tpl-card {
  counter-increment: tplcard;
  display: flex; flex-direction: column; gap: .5rem;
  padding: 1.15rem 1.2rem 1rem; text-decoration: none; color: var(--ink);
  background: var(--sheet);
  border-right: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2);
  border-radius: 0; box-shadow: none;
  transition: background .13s ease, box-shadow .13s ease;
  position: relative;
}
.tpl-card:hover { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--pen), inset 3px 0 0 0 var(--pen); z-index: 1; }
.tpl-card .tpl-top {
  display: flex; align-items: baseline; gap: .6rem;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
}
.tpl-card .tpl-top::before { content: "№ " counter(tplcard, decimal-leading-zero); color: var(--pen); }
.tpl-card .tpl-cat { margin-left: auto; border: 0; padding: 0; font-size: .66rem; letter-spacing: .12em; color: var(--ink-3); }
.tpl-card h2, .tpl-card h3 {
  margin: 0; font-family: var(--serif); font-size: 1.16rem; font-weight: 700;
  letter-spacing: -.01em; line-height: 1.2;
}
.tpl-card p { margin: 0; font-size: .87rem; color: var(--ink-2); flex: 1; line-height: 1.5; }
.tpl-card .tpl-meta {
  display: flex; gap: .9rem; font-family: var(--mono); font-size: .68rem;
  color: var(--ink-3); border-top: 1px dashed var(--rule-2); padding-top: .6rem;
  letter-spacing: .04em;
}

/* filters: underline tabs */
.filter-row {
  display: flex; flex-wrap: wrap; gap: 1.4rem; margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--rule-2);
}
.filter-btn {
  border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  padding: .45rem 0 .6rem; border-radius: 0; position: relative;
}
.filter-btn::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -1px;
  height: 2px; background: var(--pen); transition: right .16s ease;
}
.filter-btn:hover { color: var(--ink); }
.filter-btn[aria-pressed="true"] { color: var(--ink); }
.filter-btn[aria-pressed="true"]::after { right: 0; }

/* ---------- template detail ---------- */
.breadcrumbs { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; color: var(--ink-3); margin: 1.3rem 0 0; text-transform: uppercase; }
.breadcrumbs a { color: var(--ink-3); text-decoration: none; }
.breadcrumbs a:hover { color: var(--pen); text-decoration: underline; }
.tpl-hero { padding: 1.7rem 0 1.3rem; }
.tpl-hero .tpl-title-row { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap; }
.tpl-hero .tpl-emoji-lg {
  font-size: 1.5rem; width: auto; height: auto; background: none; border: 0; box-shadow: none;
  display: inline; flex: none;
}
.tpl-hero h1 { max-width: 22ch; }
.tpl-hero .lede { color: var(--ink-2); max-width: 62ch; margin-top: .5rem; font-size: 1.05rem; }
.tpl-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0 .5rem; }
.tpl-stats { display: flex; flex-wrap: wrap; gap: .3rem 0; margin-top: 1.1rem; }
.tpl-stats .chip { border: 0; padding: 0; font-size: .72rem; letter-spacing: .1em; }
.tpl-stats .chip + .chip::before { content: "/"; margin: 0 .8rem; color: var(--rule-2); }
.tpl-stats .chip-green { background: transparent; }

.tpl-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 296px;
  gap: 2.2rem; align-items: start; padding-bottom: 2.6rem;
}
@media (max-width: 900px) { .tpl-body { grid-template-columns: 1fr; } }

/* document sections: double-rule ledger headings */
.ck-section { margin-bottom: 1.15rem; overflow: hidden; }
.ck-section-head {
  display: flex; align-items: baseline; gap: .75rem;
  padding: .8rem 1.1rem .6rem .9rem;
  background: transparent;
  border-bottom: 1px solid var(--ink);
  box-shadow: 0 2.5px 0 -1.5px var(--rule);
  margin-bottom: 2px;
}
.ck-section-head .num { font-family: var(--mono); font-size: .7rem; color: var(--pen); font-weight: 600; letter-spacing: .08em; }
.ck-section-head h2, .ck-section-head h3 {
  margin: 0; font-family: var(--serif); font-size: 1.18rem; font-weight: 700; letter-spacing: -.01em;
}
.ck-section-head .count { margin-left: auto; font-family: var(--mono); font-size: .68rem; color: var(--ink-3); white-space: nowrap; letter-spacing: .06em; }
.ck-section-head .count.done { color: var(--pen); font-weight: 700; }

/* sidebar */
.side-card { padding: 1.1rem 1.15rem; margin-bottom: 1rem; }
.side-card h3 { font-family: var(--serif); font-size: 1.06rem; margin-bottom: .7rem; }
.side-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.side-card li a { font-size: .9rem; text-decoration: none; display: flex; gap: .5rem; align-items: baseline; }
.side-card li a:hover { text-decoration: underline; }

/* FAQ: document Q&A */
.faq-list { max-width: 760px; }
.faq-list details {
  border: 0; border-top: 1px solid var(--rule-2); border-radius: 0;
  background: transparent; margin-bottom: 0; overflow: hidden;
}
.faq-list details:last-child { border-bottom: 1px solid var(--rule-2); }
.faq-list summary {
  cursor: pointer; font-weight: 640; padding: .95rem .2rem; list-style: none;
  display: flex; align-items: baseline; gap: .8rem;
  font-family: var(--serif); font-size: 1.05rem; letter-spacing: -.005em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before {
  content: "Q"; font-family: var(--mono); color: var(--pen); font-size: .75rem;
  font-weight: 700; width: 1.2rem; flex: none; letter-spacing: .05em;
}
.faq-list details[open] summary::before { content: "A"; color: var(--pencil); }
.faq-list summary:hover { color: var(--pen); }
.faq-list details p {
  padding: 0 .2rem 1.1rem 2rem; margin: 0; color: var(--ink-2); font-size: .96rem;
}

/* ---------- prose ---------- */
.prose { max-width: 70ch; padding: 2.4rem 0 3.2rem; }
.prose h1 { margin-bottom: .35em; }
.prose h2 { margin-top: 1.7em; font-size: 1.45rem; }
.prose .lede { font-size: 1.1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose li::marker { color: var(--pen); }
.prose .updated { font-family: var(--mono); font-size: .72rem; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.prose table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.prose th, .prose td { text-align: left; border: 1px solid var(--rule-2); padding: .5rem .7rem; }
.prose th { background: var(--sheet-2); font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--sheet-2); border: 1px solid var(--rule); border-radius: 2px; padding: .08em .35em; }
.prose pre { background: var(--sheet-2); border: 1px solid var(--rule); border-radius: var(--r); padding: 1rem; overflow-x: auto; }
.prose pre code { border: 0; background: transparent; padding: 0; }

/* changelog: register entries */
.log-entry { border-left: 1px solid var(--rule-2); padding: 0 0 1.6rem 1.5rem; position: relative; }
.log-entry::before {
  content: ""; position: absolute; left: -5px; top: .5rem;
  width: 9px; height: 9px; border-radius: 1px; background: var(--pen);
  transform: rotate(45deg);
}
.log-entry .mono { font-size: .72rem; color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; }
.log-entry h2 { font-size: 1.35rem; margin: .2rem 0 .45rem; }

/* ---------- footer: colophon ---------- */
.site-footer {
  border-top: 1px solid var(--ink);
  box-shadow: inset 0 3px 0 -2px var(--rule-2);
  background: var(--paper-deep);
  padding: 2.4rem 0 2.6rem; margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 1.6rem; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: .8rem; font-weight: 600;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; font-size: .9rem; }
.site-footer a:hover { color: var(--pen); text-decoration: underline; }
.site-footer .foot-brand p {
  color: var(--ink-2); font-size: .95rem; max-width: 26ch;
  font-family: var(--serif); font-style: italic; margin-top: .6rem;
}
.foot-bottom {
  display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between;
  border-top: 1px solid var(--rule-2); margin-top: 2rem; padding-top: 1.2rem;
  font-family: var(--mono); font-size: .7rem; color: var(--ink-3); letter-spacing: .06em;
}
.foot-bottom a { font-size: inherit; }

/* ============================================================
   MAKER — the working ledger
   ============================================================ */
.mk-layout {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  gap: 1.6rem; align-items: start; padding: 1.5rem 0 3rem;
}
@media (max-width: 900px) { .mk-layout { grid-template-columns: 1fr; } }

/* library: the register */
.mk-lib { position: sticky; top: 4.6rem; }
@media (max-width: 900px) { .mk-lib { position: static; } }
.mk-lib .card { padding: .95rem .95rem 1rem; }
.mk-lib h2 {
  font-size: .66rem; font-family: var(--mono); letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 600;
  margin-bottom: .7rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--ink);
  box-shadow: 0 2px 0 -1px var(--rule);
}
.mk-lib-list { list-style: none; margin: 0 0 .8rem; padding: 0; display: flex; flex-direction: column; max-height: 46vh; overflow-y: auto; }
.mk-lib-list li + li { border-top: 1px solid var(--rule); }
.mk-lib-item {
  display: flex; align-items: center; gap: .55rem; width: 100%;
  border: 0; background: transparent; cursor: pointer;
  text-align: left; padding: .55rem .35rem; border-radius: 0;
  color: var(--ink-2); font-size: .92rem; position: relative;
}
.mk-lib-item:hover { color: var(--ink); background: var(--paper); }
.mk-lib-item[aria-current="true"] { color: var(--ink); box-shadow: inset 2.5px 0 0 0 var(--pen); padding-left: .65rem; font-weight: 600; }
.mk-lib-item .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); }
.mk-lib-item .pct { font-family: var(--mono); font-size: .64rem; color: var(--ink-3); letter-spacing: .06em; }
.mk-lib-item .pct.done { color: var(--pen); font-weight: 700; }
.mk-lib p a { color: var(--pen); }

/* toolbar: stationery rail */
.mk-panel { min-width: 0; }
.mk-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .9rem;
  margin-bottom: 1rem; border-bottom: 1px solid var(--rule-2); padding-bottom: .45rem;
}
.mk-toolbar .spacer { flex: 1; }
.tool-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  border: 0; background: transparent; color: var(--ink-2);
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 600; cursor: pointer;
  padding: .45rem 0; border-radius: 0; text-decoration: none; position: relative;
}
.tool-btn::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 2px; background: var(--pen); transition: right .16s ease;
}
.tool-btn:hover { color: var(--ink); background: transparent; }
.tool-btn:hover::after { right: 0; }
.tool-btn svg { flex: none; color: var(--pen); }
.tool-btn.danger:hover { color: var(--pencil); }
.tool-btn.danger:hover::after { background: var(--pencil); }

/* list head: the document title block */
.mk-list-head { padding: 1.2rem 1.3rem 1.05rem; margin-bottom: 1.1rem; position: relative; overflow: visible; }
.mk-title-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.mk-title {
  font-family: var(--serif); font-size: 1.7rem; font-weight: 700; letter-spacing: -.015em;
  border: 0; border-bottom: 1px dashed transparent; background: transparent; color: var(--ink);
  border-radius: 0; padding: .1rem 0; margin: 0;
  flex: 1; min-width: 200px;
}
.mk-title:hover { border-bottom-color: var(--rule-2); }
.mk-title:focus { border-bottom: 1px solid var(--pen); outline: none; }
.mk-head-meta {
  display: flex; align-items: center; gap: 1rem; margin-top: .8rem;
  font-family: var(--mono); font-size: .68rem; color: var(--ink-3); flex-wrap: wrap;
  letter-spacing: .07em;
}
.mk-head-meta .progress { flex: 1; min-width: 140px; }

/* the completion seal */
.stamp {
  position: absolute; top: -0.55rem; right: 1.1rem; pointer-events: none;
  font-family: var(--mono); font-weight: 700; font-size: .66rem; letter-spacing: .3em;
  text-indent: .3em;
  color: var(--pen); border: 2px solid var(--pen); border-radius: 999px;
  padding: .55rem .8rem;
  box-shadow: inset 0 0 0 2.5px var(--sheet), inset 0 0 0 3.5px var(--pen);
  background: var(--sheet);
  transform: rotate(8deg) scale(0); opacity: 0;
  transition: transform .3s cubic-bezier(.2, 1.7, .45, 1), opacity .15s ease;
}
.stamp.show { transform: rotate(-7deg) scale(1); opacity: .92; }

/* maker sections: ruled document */
.mk-section { margin-bottom: 1.1rem; overflow: visible; }
.mk-section-head {
  display: flex; align-items: baseline; gap: .65rem;
  padding: .75rem 1rem .55rem .8rem; background: transparent;
  border-bottom: 1px solid var(--ink);
  box-shadow: 0 2.5px 0 -1.5px var(--rule);
  border-radius: 0;
}
.mk-section.collapsed .mk-section-head { border-bottom-color: var(--rule-2); box-shadow: none; }
.mk-collapse {
  border: 0; background: transparent; cursor: pointer; color: var(--ink-3);
  width: 1.4rem; height: 1.4rem; display: grid; place-content: center; border-radius: 2px; flex: none;
  align-self: center;
}
.mk-collapse:hover { color: var(--pen); background: var(--paper); }
.mk-collapse svg { transition: transform .15s ease; }
.mk-section.collapsed .mk-collapse svg { transform: rotate(-90deg); }
.mk-sec-num { font-family: var(--mono); font-size: .68rem; color: var(--pen); font-weight: 600; flex: none; letter-spacing: .08em; }
.mk-sec-title {
  flex: 1; min-width: 120px; font-family: var(--serif); font-weight: 700; font-size: 1.12rem;
  border: 0; border-bottom: 1px dashed transparent; background: transparent; color: var(--ink);
  border-radius: 0; padding: 0; margin: 0; letter-spacing: -.01em;
}
.mk-sec-title:hover { border-bottom-color: var(--rule-2); }
.mk-sec-title:focus { border-bottom: 1px solid var(--pen); outline: none; }
.mk-sec-count { font-family: var(--mono); font-size: .66rem; color: var(--ink-3); white-space: nowrap; letter-spacing: .08em; }
.mk-sec-count.done { color: var(--pen); font-weight: 700; }

/* maker rows: the ledger */
.mk-items { list-style: none; margin: 0; padding: .15rem 0; counter-reset: mkrow; }
.mk-section.collapsed .mk-items, .mk-section.collapsed .mk-composer { display: none; }

.mk-item { position: relative; }
.mk-item + .mk-item { border-top: 1px solid var(--rule); }
.mk-item:not(.sub) { counter-increment: mkrow; }
.mk-item-row { display: flex; align-items: flex-start; gap: .7rem; padding: .48rem .8rem .48rem .7rem; }
.mk-item:not(.sub) > .mk-item-row::before {
  content: counter(mkrow, decimal-leading-zero);
  font-family: var(--mono); font-size: .64rem; color: var(--ink-3);
  width: 1.45rem; flex: none; text-align: right; padding-top: .5rem; letter-spacing: .05em;
}
.mk-item-row .ckbox { margin-top: .3rem; }
.mk-item.sub .mk-item-row { padding-left: 3.15rem; }
.mk-item.sub .mk-item-row::before { content: none; }
.mk-item.sub .mk-item-row::after {
  content: ""; position: absolute; left: 2.35rem; top: 0; bottom: 0;
  border-left: 1px solid var(--rule-2);
}
.mk-item-main { flex: 1; min-width: 0; }
.strike-wrap { position: relative; display: block; }
.strike-wrap::after {
  content: ""; position: absolute; left: 0; right: 100%; top: 55%;
  height: 1.5px; background: var(--pen); opacity: .75; pointer-events: none;
  transition: right .22s ease-out;
}
.mk-item.done > .mk-item-row .strike-wrap::after { left: -3px; right: 2px; }
.mk-item-text {
  display: block; width: 100%; border: 0; background: transparent;
  color: var(--ink); font: inherit; border-radius: 0; padding: .2rem 0; margin: 0;
  border-bottom: 1px dashed transparent;
  overflow-wrap: break-word;
}
.mk-item-text:hover { border-bottom-color: var(--rule-2); }
.mk-item-text:focus { border-bottom: 1px solid var(--pen); outline: none; }
.mk-item.done > .mk-item-row .mk-item-text { color: var(--ink-3); }
.mk-item-meta { display: flex; flex-wrap: wrap; gap: .6rem; padding: 0 0 .15rem; }
.mk-item-note {
  font-family: var(--serif); font-style: italic;
  font-size: .88rem; color: var(--ink-2); background: transparent;
  border-left: 2px solid var(--rule-2); border-radius: 0;
  padding: .12rem 0 .12rem .6rem; margin: .15rem 0 .3rem; white-space: pre-wrap; overflow-wrap: break-word;
}
.mk-due {
  font-family: var(--mono); font-size: .66rem; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: .35rem; letter-spacing: .08em; text-transform: uppercase;
}
.mk-due.overdue { color: var(--pencil); font-weight: 700; }
.mk-due.today { color: var(--pencil); font-weight: 700; }

/* item actions */
.mk-item-actions { display: flex; gap: .1rem; opacity: 0; transition: opacity .12s ease; flex: none; }
.mk-item-row:hover .mk-item-actions, .mk-item-row:focus-within .mk-item-actions { opacity: 1; }
@media (hover: none) { .mk-item-actions { opacity: 1; } }
.icon-btn {
  border: 0; background: transparent; cursor: pointer; color: var(--ink-3);
  width: 1.7rem; height: 1.7rem; display: grid; place-content: center; border-radius: 2px;
}
.icon-btn:hover { color: var(--pen); background: var(--paper); }
.icon-btn.danger:hover { color: var(--pencil); background: var(--pencil-soft); }

/* composer: the writing line */
.mk-composer { display: flex; gap: .6rem; padding: .5rem .8rem .75rem 3.15rem; align-items: center; }
.mk-composer .plus { color: var(--pen); flex: none; display: grid; place-content: center; width: 1rem; margin-left: -1.7rem; }
.mk-composer input {
  flex: 1; border: 0; border-bottom: 1px dashed var(--rule-2); background: transparent; color: var(--ink);
  font: inherit; border-radius: 0; padding: .35rem 0; min-width: 0;
}
.mk-composer input:focus { border-bottom: 1px solid var(--pen); outline: none; }
.mk-composer input::placeholder { color: var(--ink-3); font-style: italic; font-family: var(--serif); }

/* add section */
.mk-add-section {
  width: 100%; border: 1px dashed var(--rule-2); background: transparent; color: var(--ink-2);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 600; cursor: pointer; border-radius: var(--r);
  padding: .85rem; margin-bottom: 2rem;
}
.mk-add-section:hover { border-color: var(--pen); color: var(--pen); background: var(--pen-soft); }

/* empty state: a fresh sheet */
.mk-empty { text-align: center; padding: 3.6rem 1.5rem 3.2rem; }
.mk-empty .mk-empty-mark { margin-bottom: 1.1rem; color: var(--rule-2); }
.mk-empty .mk-empty-mark .esc-tick { color: var(--pen); }
.mk-empty h2 { font-size: 1.6rem; }
.mk-empty p { color: var(--ink-2); max-width: 42ch; margin: 0 auto 1.4rem; }
.mk-empty .row { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }

/* toasts: ink slips */
.toast-region { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: .5rem; width: min(430px, calc(100vw - 2rem)); }
.toast {
  display: flex; align-items: center; gap: .8rem;
  background: var(--ink); color: var(--paper); border-radius: var(--r);
  border-left: 3px solid var(--pen);
  padding: .7rem 1rem; box-shadow: var(--shadow-lift); font-size: .92rem;
  animation: toast-in .22s cubic-bezier(.2, 1.2, .4, 1);
}
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
html[data-theme="dark"] .toast { background: var(--sheet-2); color: var(--ink); border: 1px solid var(--rule-2); border-left: 3px solid var(--pen); }
.toast .undo-btn {
  margin-left: auto; border: 0; background: transparent;
  font-family: var(--mono); font-weight: 700; cursor: pointer; font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase;
  padding: .2rem .4rem; border-radius: 2px; flex: none;
  color: #a9baff; text-decoration: underline; text-underline-offset: 3px;
}
html[data-theme="dark"] .toast .undo-btn { color: var(--pen); }
.toast .undo-btn:hover { color: #cdd7ff; }
html[data-theme="dark"] .toast .undo-btn:hover { color: var(--pen-2); }

/* dialogs: forms on the desk */
dialog.mk-dialog {
  border: 1px solid var(--ink); border-radius: var(--r);
  background: var(--sheet); color: var(--ink); box-shadow: var(--shadow-lift);
  padding: 1.5rem; width: min(520px, calc(100vw - 2rem));
}
dialog.mk-dialog::backdrop { background: rgba(27, 25, 20, .5); backdrop-filter: blur(2px); }
dialog.mk-dialog h2 { font-size: 1.35rem; margin-bottom: .8rem; }
dialog.mk-dialog .dlg-row { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.2rem; flex-wrap: wrap; }
dialog.mk-dialog textarea, dialog.mk-dialog input[type="text"], dialog.mk-dialog input[type="date"], dialog.mk-dialog input[type="file"], dialog.mk-dialog select {
  width: 100%; border: 1px solid var(--rule-2); background: var(--paper);
  color: var(--ink); font: inherit; border-radius: var(--r); padding: .55rem .7rem;
}
dialog.mk-dialog textarea { min-height: 130px; font-family: var(--mono); font-size: .84rem; resize: vertical; }
dialog.mk-dialog textarea:focus, dialog.mk-dialog input:focus, dialog.mk-dialog select:focus { border-color: var(--pen); outline: none; }
dialog.mk-dialog label {
  display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 600; color: var(--ink-2); margin: .9rem 0 .35rem;
}
dialog.mk-dialog .hint { font-size: .8rem; color: var(--ink-3); margin: .45rem 0 0; font-style: italic; font-family: var(--serif); }
.share-url {
  font-family: var(--mono); font-size: .76rem; word-break: break-all;
  background: var(--paper); border: 1px solid var(--rule-2); border-radius: var(--r);
  padding: .6rem .7rem; max-height: 90px; overflow-y: auto;
}

/* popover menus */
.menu-pop {
  position: absolute; z-index: 60; min-width: 215px;
  background: var(--sheet); border: 1px solid var(--ink); border-radius: var(--r);
  box-shadow: var(--shadow-lift); padding: .3rem; display: none;
}
.menu-pop.open { display: block; }
.menu-pop button, .menu-pop a {
  display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left;
  border: 0; background: transparent; cursor: pointer; color: var(--ink);
  font-size: .9rem; padding: .5rem .6rem; border-radius: 2px; text-decoration: none;
}
.menu-pop button:hover, .menu-pop a:hover { background: var(--pen-soft); }
.menu-pop .desc { display: block; font-size: .7rem; color: var(--ink-3); font-weight: 400; font-family: var(--mono); letter-spacing: .02em; }
.menu-pop hr { border: 0; border-top: 1px solid var(--rule); margin: .3rem 0; }

/* share banner: a delivered note */
.share-banner {
  border: 1px solid var(--pen);
  background: var(--pen-soft); border-radius: var(--r);
  padding: 1rem 1.15rem; margin-bottom: 1.1rem;
  display: flex; flex-wrap: wrap; gap: .8rem; align-items: center;
  box-shadow: var(--shadow);
}
.share-banner[hidden] { display: none; }
.share-banner p { margin: 0; flex: 1; min-width: 220px; font-size: .95rem; }
.share-banner .row { display: flex; gap: .55rem; flex-wrap: wrap; }

/* keyboard hints as margin notes */
.kbd {
  font-family: var(--mono); font-size: .68rem; border: 1px solid var(--rule-2);
  border-bottom-width: 2px; border-radius: 2px; padding: .05rem .35rem;
  background: var(--sheet); color: var(--ink-2);
}

/* ============================================================
   EMBED page
   ============================================================ */
.embed-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 1.8rem; align-items: start; padding: 1.6rem 0 3rem; }
@media (max-width: 860px) { .embed-grid { grid-template-columns: 1fr; } }
.embed-controls { padding: 1.2rem; }
.embed-controls label {
  display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 600; color: var(--ink-2); margin: 1rem 0 .35rem;
}
.embed-controls label:first-of-type { margin-top: 0; }
.embed-controls input[type="text"] {
  width: 100%; border: 1px solid var(--rule-2); background: var(--paper); color: var(--ink);
  font: inherit; border-radius: var(--r); padding: .5rem .65rem;
}
.embed-controls input[type="text"]:focus { border-color: var(--pen); outline: none; }
.color-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.color-field { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--rule-2); border-radius: var(--r); padding: .3rem .5rem; background: var(--paper); }
.color-field input[type="color"] { border: 0; background: transparent; width: 1.7rem; height: 1.7rem; padding: 0; cursor: pointer; }
.color-field .mono { font-size: .68rem; color: var(--ink-2); letter-spacing: .08em; }
.embed-code { margin-top: 1.1rem; }
.embed-code textarea {
  width: 100%; font-family: var(--mono); font-size: .74rem; min-height: 120px;
  border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--paper);
  color: var(--ink); padding: .6rem; resize: vertical;
}
.embed-preview iframe { width: 100%; height: 560px; border: 1px solid var(--rule-2); border-radius: var(--r); box-shadow: var(--shadow-lift); }

/* ============================================================
   PRINT — ink on paper, literally
   ============================================================ */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 11pt; display: block; }
  body::before, body::after { display: none; }
  .site-header, .site-footer, .mk-lib, .mk-toolbar, .mk-composer, .mk-item-actions,
  .mk-add-section, .toast-region, .breadcrumbs, .tpl-actions, .filter-row,
  .share-banner .row, .no-print, .theme-toggle, .nav-toggle, .demo-note, .hero-ctas { display: none !important; }
  main, .wrap { width: 100%; max-width: none; }
  .card, .mk-section, .ck-section { border: 0; box-shadow: none; break-inside: avoid; border-radius: 0; }
  .mk-section-head, .ck-section-head { border-bottom: 1.5px solid #000 !important; box-shadow: none !important; }
  .ckbox { border-color: #000 !important; background: #fff !important; }
  .ckbox::after { background: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .mk-item + .mk-item, .ck-items li + li { border-top: 1px solid #ccc; }
  a { color: #000; text-decoration: none; }
  .progress { border-color: #666; }
  .progress::after {
    background: repeating-linear-gradient(-55deg, #000 0 1.6px, transparent 1.6px 4.4px) !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .strike-wrap::after, .ck-item-row span::after { background: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .mk-title, .mk-sec-title, .mk-item-text { border: 0 !important; background: transparent !important; }
  .stamp { display: none; }
  .print-footer { display: block !important; margin-top: 8mm; font-family: var(--mono); font-size: 8pt; color: #666; border-top: 1px solid #ccc; padding-top: 3mm; }
}
.print-footer { display: none; }
