/* hallmark: system=Editorial Monograph palette=Warm E-Ink Amber type=Instrument Serif + Instrument Sans + JetBrains Mono */
@import url("./tokens.css");
@import url("./base.css");

:root {
  color-scheme: light dark;
  --paper: var(--color-paper);
  --paper-2: var(--color-paper-2);
  --ink: var(--color-ink);
  --ink-2: var(--color-ink-2);
  --muted: var(--color-muted);
  --line: var(--color-rule);
  --hl: var(--color-accent);
  --hl-bg: var(--color-accent);
  --hl-ink: var(--color-accent-ink);
  --hl-text: var(--color-accent-text);
  --darkreader-bg--hl: var(--color-accent);
  --darkreader-bg--btn-bg: var(--color-accent);
  --darkreader-text-000000: #1e1e1e;
  --darkreader-border-fde047: var(--color-accent);
  --darkreader-background-fde04740: color-mix(in oklab, var(--color-accent) 25%, transparent);
  --accent: var(--color-focus);
  --code-bg: var(--color-paper-3);
  --btn-bg: var(--hl);
  --btn-ink: var(--color-accent-ink);
  --serif: var(--font-display);
  --sans: var(--font-body);
  --mono: var(--font-mono);
  --hand: var(--font-hand);
  --maxw: var(--container);
}
:root[data-theme="light"] {
  color-scheme: light;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: var(--color-paper);
  --paper-2: var(--color-paper-2);
  --ink: var(--color-ink);
  --ink-2: var(--color-ink-2);
  --muted: var(--color-muted);
  --line: var(--color-rule);
  --hl: var(--color-accent);
  --hl-bg: color-mix(in srgb, var(--color-accent) 46%, transparent);
  --hl-ink: var(--color-accent-ink);
  --hl-text: var(--hl);
  --darkreader-bg--hl: var(--color-accent);
  --darkreader-bg--btn-bg: var(--color-accent);
  --darkreader-text-000000: #1e1e1e;
  --darkreader-border-fde047: var(--color-accent);
  --darkreader-background-fde04740: color-mix(in oklab, var(--color-accent) 25%, transparent);
  --accent: var(--color-focus);
  --code-bg: var(--color-paper-3);
  --btn-bg: var(--hl);
  --btn-ink: var(--color-accent-ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: var(--color-paper);
    --paper-2: var(--color-paper-2);
    --ink: var(--color-ink);
    --ink-2: var(--color-ink-2);
    --muted: var(--color-muted);
    --line: var(--color-rule);
    --hl: var(--color-accent);
    --hl-bg: color-mix(in srgb, var(--color-accent) 46%, transparent);
    --hl-ink: var(--color-accent-ink);
    --hl-text: var(--hl);
    --darkreader-bg--hl: var(--color-accent);
    --darkreader-bg--btn-bg: var(--color-accent);
    --darkreader-text-000000: #1e1e1e;
    --darkreader-border-fde047: var(--color-accent);
    --darkreader-background-fde04740: color-mix(in oklab, var(--color-accent) 25%, transparent);
    --accent: var(--color-focus);
    --code-bg: var(--color-paper-3);
    --btn-bg: var(--hl);
    --btn-ink: var(--color-accent-ink);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
code, pre { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 3000;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--hl);
  color: var(--hl-ink);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: translateY(-200%);
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.container { width: min(var(--maxw), 100% - 48px); margin-inline: auto; }
@media (max-width: 520px) {
  .container { width: min(var(--maxw), 100% - 32px); }
}
.narrow { width: min(720px, 100% - 48px); }
.center { text-align: center; }
.muted { color: var(--muted); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 0.95; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(46px, 8vw, 90px); line-height: 0.95; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(32px, 4.5vw, 52px); line-height: 1; letter-spacing: -0.015em; }
h3 { font-size: 26px; line-height: 1.05; }
/* Evidenziatore editoriale Tomedown: linea piatta a tinta unita */
h1 em, h2 em {
  font-style: italic;
  position: relative;
  display: inline;
  color: inherit !important;
  padding: 0 0.16em;
  background-image: linear-gradient(var(--hl), var(--hl));
  background-repeat: no-repeat;
  background-size: 100% 36%;
  background-position: 0 88%;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
:root[data-theme="dark"] h1 em,
:root[data-theme="dark"] h2 em {
  background-image: linear-gradient(var(--hl), var(--hl));
  color: #ffffff !important;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) h1 em,
  :root:not([data-theme="light"]) h2 em {
    background-image: linear-gradient(var(--hl), var(--hl));
    color: #ffffff !important;
  }
}
h1 em::before, h2 em::before {
  display: none !important;
}
mark { background: var(--hl); color: var(--hl-ink); padding: 0 0.15em; }

.eyebrow {
  display: inline-block;
  width: fit-content;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--hl);
  color: var(--hl-ink);
  padding: 2px 9px;
  border-radius: 5px;
  margin-bottom: 0.8rem;
}
:root[data-theme="dark"] .eyebrow {
  background: none;
  color: var(--hl);
  padding: 0;
  font-weight: 500;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .eyebrow {
    background: none;
    color: var(--hl);
    padding: 0;
    font-weight: 500;
  }
}

/* header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.65rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.logo img {
  display: block;
  height: 30px;
  width: 30px;
  border-radius: 6.5px;
}
.nav { display: flex; gap: 22px; align-items: center; font-size: 0.95rem; flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.82rem;
  border: 1px solid var(--line);
  padding: 4px 11px;
  border-radius: 999px;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.nav-github svg {
  display: block;
}
.nav-github:hover {
  border-color: var(--muted);
  background: var(--paper-2);
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.theme-toggle:hover {
  border-color: var(--muted);
  background: var(--paper-2);
  color: var(--ink);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* Mobile Header & Site Menu Drawer */
.header-mobile-actions {
  display: none;
}
.site-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 240;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.site-menu-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: var(--paper-2);
  border-left: 1px solid var(--line);
  z-index: 250;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .28s cubic-bezier(0.16, 1, 0.3, 1), visibility .28s ease;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2);
}

@media (max-width: 860px) {
  .site-header .container {
    height: 56px;
  }
  .site-nav-desktop {
    display: none !important;
  }
  .header-mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .site-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--paper-2);
    color: var(--ink);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
  }
  .site-menu-toggle:hover {
    border-color: var(--muted);
    background: var(--paper);
  }
  .site-menu-backdrop {
    display: block;
  }
  .site-menu-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .site-menu-drawer {
    display: flex;
  }
  .site-menu-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  body.site-menu-open {
    overflow: hidden;
  }
  .site-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
  }
  .site-menu-logo {
    font-size: 1.45rem;
  }
  .site-menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink-2);
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
  }
  .site-menu-close:hover {
    color: var(--ink);
    border-color: var(--muted);
  }
  .site-menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    -webkit-overflow-scrolling: touch;
  }
  .site-menu-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .site-menu-heading {
    font-family: var(--mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    padding: 0 12px 6px;
  }
  .site-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
  }
  .site-menu-link svg {
    color: var(--muted);
    transition: color .15s ease;
  }
  .site-menu-link:hover, .site-menu-link.is-active {
    background: var(--paper);
    color: var(--hl);
  }
  .site-menu-link:hover svg {
    color: var(--hl);
  }
  .site-menu-sublink {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.92rem;
    color: var(--ink-2);
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
  }
  .site-menu-sublink:hover {
    background: var(--paper);
    color: var(--ink);
  }
  .site-menu-footer {
    padding: 16px 18px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper);
  }
  .site-menu-github {
    width: 100%;
    justify-content: center;
    padding: 9px 16px;
    font-size: 0.88rem;
  }
}

/* hero */
.hero { padding: 96px 24px 40px; text-align: center; }
.hero-inner { max-width: 820px; margin: 0 auto; }
.hero h1 { line-height: 1.2; }
.hero p { color: var(--ink-2); font-size: 20px; text-wrap: pretty; }
.pronounce { font-size: 1rem !important; }
.pronounce .word { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); }
.pronounce .say { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); margin: 0 6px; }
.pronounce abbr { font-style: italic; text-decoration: none; margin-right: 4px; }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
}
.btn-primary, .btn-primary:visited {
  background-color: var(--hl) !important;
  background-image: linear-gradient(var(--hl), var(--hl)) !important;
  color: var(--hl-ink) !important;
  border: 1px solid var(--hl) !important;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(240, 176, 10, 0.25);
}
.btn-primary:hover, .btn-primary:active, .btn-primary:focus {
  background-color: color-mix(in srgb, var(--hl) 88%, #ffffff) !important;
  background-image: linear-gradient(color-mix(in srgb, var(--hl) 88%, #ffffff), color-mix(in srgb, var(--hl) 88%, #ffffff)) !important;
  color: var(--hl-ink) !important;
  box-shadow: 0 4px 14px rgba(240, 176, 10, 0.35);
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { transform: translateY(-1px); }
}
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }

/* showcase */
.showcase { padding: 24px 0 120px; }
.hero-showcase {
  position: relative;
  max-width: 1240px;
  margin: 32px auto 0;
}
.showcase-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}
.showcase-note {
  position: absolute;
  margin: 0;
  width: 210px;
  color: var(--ink-2);
  pointer-events: none;
}
.showcase-note-left {
  left: -215px;
  top: 68px;
  transform: rotate(-15deg);
}
.showcase-note-right {
  right: 135px;
  bottom: -66px;
  width: auto;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  transform: none;
}
.showcase-note .margin-quote {
  margin: 0;
  font-size: 1.65rem;
}
.showcase-note .margin-arrow {
  width: 115px;
  flex-shrink: 0;
  margin: 4px 0;
}
.showcase-note-left .margin-arrow {
  margin-left: auto;
}
.showcase-note-right .margin-arrow {
  width: 96px;
  margin-bottom: 4px;
}
.js .showcase-note[data-reveal] {
  opacity: 0;
  transition: opacity .6s ease, transform .75s cubic-bezier(.22, 1, .36, 1);
}
.js .showcase-note-left[data-reveal] {
  transform: rotate(-15deg) translateY(14px);
}
.js .showcase-note-right[data-reveal] {
  transform: translateY(14px);
}
.js .showcase-note[data-reveal] .arrow-shaft,
.js .showcase-note[data-reveal] .arrow-head {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.js .showcase-note[data-reveal] .margin-quote mark {
  background-size: 0% 100%;
}
.js .showcase-note[data-reveal].is-visible {
  opacity: 1;
}
.js .showcase-note-left[data-reveal].is-visible {
  transform: rotate(-15deg) translateY(0);
}
.js .showcase-note-right[data-reveal].is-visible {
  transform: translateY(0);
}
.js .showcase-note[data-reveal].is-visible .arrow-shaft {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .8s cubic-bezier(.22, 1, .36, 1) .15s;
}
.js .showcase-note[data-reveal].is-visible .arrow-head {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .35s ease .8s;
}
.js .showcase-note[data-reveal].is-visible .margin-quote mark {
  background-size: 100% 100%;
  transition: background-size .65s cubic-bezier(.22, 1, .36, 1) .45s;
}

@media (max-width: 1540px) {
  .showcase-note {
    position: static;
    width: auto;
    max-width: min(560px, 100% - 32px);
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
  }
  .showcase-note-left,
  .js .showcase-note-left[data-reveal].is-visible {
    margin: 0 auto 28px;
    transform: rotate(-2deg) translateY(0);
  }
  .showcase-note-right,
  .js .showcase-note-right[data-reveal].is-visible {
    margin: 26px auto 8px;
    transform: rotate(-1.5deg) translateY(0);
  }
  .showcase-note .margin-quote {
    font-size: 1.55rem;
    line-height: 1.2;
    text-wrap: balance;
  }
  .showcase-note .margin-arrow {
    display: block;
    width: 58px;
    margin: 0;
    flex-shrink: 0;
  }
  .showcase-note-left .margin-arrow {
    transform: scale(-1, -1) rotate(-40deg) translateY(-8px);
    margin-right: 4px;
    order: -1;
  }
  .showcase-note-right .margin-arrow {
    transform: rotate(-6deg);
    margin-bottom: 6px;
  }
}

@media (max-width: 640px) {
  .showcase-note {
    max-width: 100%;
    gap: 6px;
  }
  .showcase-note-left,
  .js .showcase-note-left[data-reveal].is-visible {
    margin: 0 auto 20px;
    transform: rotate(-1.5deg) translateY(0);
  }
  .showcase-note-right,
  .js .showcase-note-right[data-reveal].is-visible {
    margin: 18px auto 6px;
    transform: rotate(-1deg) translateY(0);
  }
  .showcase-note .margin-quote {
    font-size: 1.32rem;
  }
  .showcase-note-left .margin-arrow {
    width: 46px;
    transform: scale(-1, -1) rotate(-38deg) translateY(-6px);
    margin-right: 3px;
    order: -1;
  }
  .showcase-note-right .margin-arrow {
    width: 48px;
    transform: rotate(-4deg);
    margin-bottom: 4px;
  }
}

/* Spotlight Visual Showcase */
.spotlight {
  max-inline-size: var(--container);
  margin-inline: auto;
}
.spotlight-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.spotlight-tab {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: transparent;
  color: var(--ink-2);
  border: 0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  font-family: var(--sans);
  transition: color 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.spotlight-tab:first-child {
  border-right: 1px solid var(--line);
  padding-left: 4px;
}
.spotlight-tab:last-child {
  padding-right: 4px;
}
@media (hover: hover) and (pointer: fine) {
  .spotlight-tab:hover {
    color: var(--ink);
  }
}
.spotlight-tab:focus:not(:focus-visible) {
  outline: none;
}
.spotlight-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.spotlight-tab[aria-selected="true"] {
  color: var(--ink);
}
.spotlight-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  border-block-end: 2.5px solid var(--hl);
}
.spotlight-tab-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}
.spotlight-tab:active .spotlight-tab-num {
  transform: scale(0.94);
}
.spotlight-tab[aria-selected="true"] .spotlight-tab-num {
  background: var(--hl);
  border-color: var(--hl);
  color: var(--hl-ink);
}
.spotlight-tab-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.spotlight-tab-title,
.spotlight-tab-text strong {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: inherit;
}
.spotlight-tab-sub {
  font-size: 0.84rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Stack both slides in one CSS Grid cell permanently so stage height never jumps on switch */
.spotlight-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
.spotlight-slide {
  grid-area: 1 / 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 320ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 320ms cubic-bezier(0.23, 1, 0.32, 1),
    visibility 0s linear 320ms;
}
.spotlight-slide:focus,
.spotlight-slide:focus-visible {
  outline: none;
}
.spotlight-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    opacity 320ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 320ms cubic-bezier(0.23, 1, 0.32, 1),
    visibility 0s linear 0s;
}
.spotlight-slide-inner {
  inline-size: 100%;
}
.spotlight-frame {
  overflow: clip;
  border: 0;
  border-radius: 12px;
  background: transparent;
}
#spotlight-koreader .spotlight-frame {
  max-inline-size: 1160px;
  margin-inline: auto;
}
#spotlight-obsidian .spotlight-frame {
  inline-size: 100%;
}
.spotlight-frame img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 1922 / 1195;
  object-fit: contain;
  border-radius: 12px;
}
#spotlight-obsidian .spotlight-frame img {
  aspect-ratio: 2720 / 1720;
  border-radius: 0;
}
.spotlight-caption,
.spotlight-slide figcaption {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 14px;
}
.spotlight-caption code {
  font-size: 0.84em;
}
/* MWG tabs: keep tabs on a single horizontal scrollable row on narrow viewports */
@media (max-width: 640px) {
  .spotlight-tabs {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: inline proximity;
    scrollbar-width: none;
    margin-bottom: 20px;
  }
  .spotlight-tabs::-webkit-scrollbar {
    display: none;
  }
  .spotlight-tab {
    flex: 1 0 215px;
    scroll-snap-align: start;
    padding: 13px 14px;
    gap: 10px;
  }
  .spotlight-tab:first-child {
    padding-left: 4px;
  }
  .spotlight-tab:last-child {
    padding-left: 14px;
    padding-right: 4px;
  }
  .spotlight-tab-title,
  .spotlight-tab-text strong {
    font-size: 0.96rem;
  }
  .spotlight-tab-sub {
    font-size: 0.78rem;
  }
}

/* sections */
.section-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.card p { color: var(--ink-2); margin: 0; }

/* Bento Grid Features (Editorial Hairline Grid) */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.bento-card {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
}
.bento-span-7 { grid-column: span 7; }
.bento-span-6 { grid-column: span 6; }
.bento-span-5 { grid-column: span 5; }
.bento-card h3 {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 10px;
}
.bento-card p {
  margin: 0 0 20px;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.6;
}
.bento-visual {
  margin-top: auto;
  align-content: center;
  background: transparent;
  border: 0;
  border-top: 1px dashed var(--line);
  border-radius: 0;
  padding: 16px 0 0;
  font-family: var(--mono);
  font-size: 0.78rem;
}
/* Window container for Bento card 1 */
.bento-window {
  margin-top: auto;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.bento-window-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: color-mix(in srgb, var(--paper) 75%, var(--line) 25%);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.bento-window-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.bento-window-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.bento-window-env {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  flex-shrink: 0;
  margin-left: 8px;
}
.bento-window-body {
  padding: 13px 16px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
  display: grid;
  gap: 5px;
}
.bento-code-dim { color: var(--muted); }
.bento-code-key { color: var(--ink); font-weight: 600; }
.bento-code-val { color: var(--ink-2); }
.bento-quote-row {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  color: var(--ink-2);
  font-style: italic;
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bento-tree {
  display: grid;
  gap: 8px;
}
.tree-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
}
.tree-active { color: var(--ink); font-weight: 500; }
.bento-pill {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.bento-pill-hl {
  background: var(--hl);
  color: var(--hl-ink);
  border-color: var(--hl);
  font-weight: 600;
}
.bento-index {
  display: grid;
  gap: 10px;
}
.index-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 500;
  min-width: 0;
}
.index-book-tag {
  color: var(--ink);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.index-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.index-pills span {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.72rem;
}
.bento-timeline {
  display: grid;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.tl-divider {
  border-top: 1px dashed var(--line);
  margin: 6px 0;
  opacity: 0.6;
}
.tl-item {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
}
.tl-date {
  background: var(--hl);
  color: var(--hl-ink);
  padding: 1px 7px;
  border-radius: 5px;
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.72rem;
  flex-shrink: 0;
}
:root[data-theme="dark"] .tl-date {
  background: none;
  color: var(--hl);
  padding: 0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tl-date {
    background: none;
    color: var(--hl);
    padding: 0;
  }
}
.tl-book {
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
  font-size: 0.78rem;
}
@media (max-width: 480px) {
  .tl-item {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
    align-items: center;
    row-gap: 5px;
    column-gap: 8px;
  }
  .tl-book {
    grid-column: 1 / -1;
    font-size: 0.82rem;
    white-space: normal;
    word-break: break-word;
  }
  .bento-window-env {
    display: none;
  }
}
.bento-styles,
.bento-tokens,
.bento-merge {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.bento-styles code,
.bento-tokens code {
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .bento-styles code:hover,
  .bento-tokens code:hover {
    border-color: color-mix(in srgb, var(--hl) 55%, var(--line));
    transform: translateY(-1px);
  }
}
.bento-styles code svg,
.bento-tokens code svg {
  flex-shrink: 0;
  color: var(--muted);
}
.b-style-hl svg {
  color: var(--hl-ink) !important;
}
:root[data-theme="dark"] .b-style-hl svg {
  color: var(--hl) !important;
}
.b-style-hl {
  border-color: color-mix(in srgb, var(--hl) 50%, var(--line)) !important;
  background: color-mix(in srgb, var(--hl) 12%, var(--paper-2)) !important;
}
.merge-ok, .merge-add, .merge-bak {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.74rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.merge-ok { color: var(--ink); background: var(--paper-2); }
.merge-add { background: var(--hl); color: var(--hl-ink); border-color: var(--hl); font-weight: 600; }
.merge-bak { color: var(--muted); }
@media (max-width: 860px) {
  .bento-span-7, .bento-span-6, .bento-span-5 { grid-column: span 12; }
}
@media (max-width: 600px) {
  .bento-window {
    border-radius: 12px;
  }
  .bento-window-head {
    padding: 8px 12px;
  }
  .bento-window-body {
    padding: 12px;
    font-size: 0.74rem;
  }
}
.faq-split {
  display: grid;
  grid-template-columns: 1fr 1.65fr;
  gap: 64px;
  align-items: start;
}
.faq-intro {
  position: sticky;
  top: 96px;
}
.faq-intro .eyebrow { display: block; margin-bottom: 0.6rem; }
.faq-intro h2 { margin-bottom: 0.45em; }
.faq-intro p { margin: 0 0 1.6em; line-height: 1.6; }
.faq-list {
  display: grid;
  gap: 12px;
}
.faq-list details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 24px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq-list details:hover {
  border-color: var(--muted);
}
.faq-list details[open] {
  border-color: color-mix(in srgb, var(--hl) 55%, var(--line));
}
.faq-list details summary {
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-list details summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.faq-list details[open] summary { color: var(--ink); }
.faq-list details[open] summary::after {
  content: "–";
  color: var(--hl-ink);
  background: var(--hl);
  border-color: var(--hl);
}
.faq-list details p { color: var(--ink-2); margin: 14px 0 0; font-size: 0.95rem; line-height: 1.6; }
@media (max-width: 860px) {
  .faq-split { grid-template-columns: 1fr; gap: 32px; }
  .faq-intro { position: static; }
}
.cta { padding: clamp(56px, 9vw, 96px) 0; border-top: 1px solid var(--line); }
.cta p { color: var(--ink-2); }

/* inner pages */
.page-head { padding: clamp(56px, 9vw, 110px) 0 24px; }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); }
.lead { font-size: 20px; color: var(--ink-2); text-wrap: pretty; }

/* 404 Editorial Lost Folio */
.error-section {
  padding: clamp(56px, 8vw, 96px) 0 clamp(64px, 8vw, 104px);
}
.error-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  margin-bottom: clamp(48px, 6vw, 72px);
}
.error-code-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}
.error-code-num {
  font-family: var(--serif);
  font-size: clamp(3.6rem, 7vw, 5.2rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ink);
  user-select: none;
}
.error-code-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.error-copy h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.04;
  margin: 0 0 18px;
  overflow-wrap: break-word;
  min-width: 0;
}
.error-lead {
  max-width: 48ch;
  margin: 0 0 28px;
}
.error-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.error-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.folio-ledger {
  background: transparent;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.folio-ledger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.folio-filename {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  padding: 0;
}
.folio-status {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.folio-frontmatter {
  margin: 0;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
  overflow-x: auto;
}
.folio-frontmatter code {
  background: transparent;
  padding: 0;
}
.folio-scribe {
  font-family: var(--hand);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.22;
  color: var(--ink-2);
  margin: 0;
}
.folio-scribe mark {
  background: var(--hl-bg);
  color: var(--hl-ink);
  padding: 0 0.2em;
  border-radius: 3px;
}
:root[data-theme="dark"] .folio-scribe mark {
  color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .folio-scribe mark {
    color: var(--ink);
  }
}
.error-shelves {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.error-shelf-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 24px;
  text-decoration: none;
  border-right: 1px solid var(--line);
  transition: color 160ms cubic-bezier(0.22, 1, 0.36, 1), transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}
.error-shelf-link:first-child {
  padding-left: 0;
}
.error-shelf-link:last-child {
  border-right: 0;
  padding-right: 0;
}
.error-shelf-link:active {
  transform: scale(0.99);
}
.error-shelf-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.error-shelf-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.error-shelf-head h3 {
  font-family: var(--sans);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
  transition: color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
.error-shelf-link p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-2);
}
.error-shelf-link:hover .error-shelf-head h3 {
  color: var(--accent);
}
.error-shelf-link:hover .editorial-icon-seal {
  border-color: var(--accent);
  color: var(--accent);
}
@media (max-width: 860px) {
  .error-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .error-shelves {
    grid-template-columns: 1fr;
  }
  .error-shelf-link {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px 0;
  }
  .error-shelf-link:last-child {
    border-bottom: 0;
  }
}
@media (max-width: 640px) {
  .error-section {
    padding: 40px 0 64px;
  }
  .error-copy h1 {
    font-size: clamp(2.15rem, 9.5vw, 2.9rem);
  }
  .error-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .folio-scribe {
    font-size: 1.48rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .error-shelf-link,
  .error-shelf-head h3 {
    transition: none;
  }
}
.prose h2 { margin-top: 1.8em; font-size: clamp(28px, 3vw, 38px); line-height: 1.05; }
.prose h3 { font-family: var(--sans); font-size: 20px; font-weight: 600; line-height: 1.25; margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: .93rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--paper-2); }
.prose blockquote { margin: 1.2em 0; padding-left: 1em; border-left: 3px solid var(--hl); color: var(--ink-2); }
.prose img { border: 1px solid var(--line); border-radius: 10px; }
.docs .prose figure:not(.doc-shot):not(.doc-specimen):not(.compare-figure):not(.doc-device-figure):not(.spotlight-slide) > img:not([src$=".svg"]):not([src*="current-book"]),
.docs .prose > p > img:not([src$=".svg"]):not([src*="current-book"]),
.docs .prose > img:not([src$=".svg"]):not([src*="current-book"]) {
  display: block;
  max-width: 100%;
  margin: 28px auto;
  border: 1.5px solid color-mix(in srgb, var(--hl) 42%, var(--line));
  border-radius: 14px;
  box-shadow: 0 18px 42px -14px rgba(0, 0, 0, 0.38), 0 0 0 4px color-mix(in srgb, var(--hl) 8%, transparent);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
@media (hover: hover) and (pointer: fine) {
  .docs .prose figure:not(.doc-shot):not(.doc-specimen):not(.compare-figure):not(.doc-device-figure):not(.spotlight-slide) > img:not([src$=".svg"]):not([src*="current-book"]):hover,
  .docs .prose > p > img:not([src$=".svg"]):not([src*="current-book"]):hover,
  .docs .prose > img:not([src$=".svg"]):not([src*="current-book"]):hover {
    transform: translateY(-2px);
    border-color: var(--hl);
    box-shadow: 0 22px 48px -14px rgba(0, 0, 0, 0.45), 0 0 0 5px color-mix(in srgb, var(--hl) 14%, transparent);
  }
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* docs layout */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 72px; padding: 64px 0 120px; align-items: start; }
.docs.docs-has-toc { width: min(1380px, 100% - 48px); max-width: 1380px; grid-template-columns: 210px minmax(0, 1fr) 210px; gap: 40px; }
.docs .prose { min-width: 0; width: 100%; max-width: 760px; margin: 0 auto; font-size: 16px; line-height: 28px; }
.docs .prose pre,
.docs .prose table { max-width: 100%; overflow-x: auto; box-sizing: border-box; }
.docs-nav { position: sticky; top: 92px; font-size: .93rem; }
.docs-toc { position: sticky; top: 92px; font-size: .84rem; }
.docs-toc h4,
.docs-toc .docs-toc-title { font-family: var(--sans); font-size: .8rem; font-weight: 700; color: var(--ink); margin: 0 0 12px; letter-spacing: normal; line-height: 1.3; }
.docs-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.docs-toc a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.35;
  transition: color .15s ease, border-color .15s ease;
}
.docs-toc .toc-l3 a { padding-left: 24px; font-size: .8rem; }
.docs-toc a:hover { color: var(--ink); }
.docs-toc a.is-active {
  color: var(--ink);
  background: color-mix(in srgb, var(--hl) 38%, transparent);
  border-left-color: var(--hl);
  border-radius: 0 6px 6px 0;
  font-weight: 600;
}
:root[data-theme="dark"] .docs-toc a.is-active {
  color: var(--hl);
  background: none;
  border-left-color: var(--hl);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .docs-toc a.is-active {
    color: var(--hl);
    background: none;
    border-left-color: var(--hl);
  }
}
@media (max-width: 1200px) {
  .docs.docs-has-toc { max-width: var(--maxw); grid-template-columns: 230px minmax(0, 1fr); gap: 56px; }
  .docs-toc { display: none; }
}
.docs-nav h4,
.docs-nav .docs-nav-sec { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 26px 0 8px; font-weight: 700; line-height: 1.3; }
.docs-nav h4:first-child,
.docs-nav .docs-nav-sec:first-of-type { margin-top: 0; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: block; padding: 5px 0 5px 14px; text-decoration: none; color: var(--ink-2); border-left: 2px solid var(--line); transition: color .15s ease, border-color .15s ease; }
.docs-nav a:hover { color: var(--ink); }
.docs-nav a[aria-current="page"] {
  color: var(--ink);
  background: color-mix(in srgb, var(--hl) 38%, transparent);
  border-left-color: var(--hl);
  border-radius: 0 6px 6px 0;
  font-weight: 600;
}
:root[data-theme="dark"] .docs-nav a[aria-current="page"] {
  color: var(--hl);
  background: none;
  border-left-color: var(--hl);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .docs-nav a[aria-current="page"] {
    color: var(--hl);
    background: none;
    border-left-color: var(--hl);
  }
}
.docs .prose { max-width: 760px; margin: 0 auto; font-size: 16px; line-height: 28px; }
.docs .prose h1,
.docs .prose h2,
.docs .prose h3,
.docs .prose h4 { position: relative; outline: none; }
.docs .prose h1 { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 24px; }
.docs .prose h2 { font-family: var(--sans); font-weight: 600; font-size: 24px; line-height: 32px; letter-spacing: -0.02em; margin: 48px 0 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.docs .prose h3 { font-family: var(--sans); font-weight: 600; font-size: 20px; line-height: 28px; letter-spacing: -0.01em; margin: 32px 0 0; }
.docs .prose p { margin: 16px 0; line-height: 28px; }
.docs .prose ul, .docs .prose ol { padding-left: 1.25rem; margin: 16px 0; }
.docs .prose li + li { margin-top: 8px; }
.docs .prose .header-anchor {
  position: absolute;
  top: 4px;
  left: 0;
  margin-left: -28px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  user-select: none;
  opacity: 0;
  transform: translateX(4px);
  transition: color .2s ease, opacity .2s ease, transform .2s ease;
}
.docs .prose .header-anchor .anchor-icon {
  width: 15px;
  height: 15px;
  display: block;
}
.docs .prose h1 .header-anchor { top: 14px; }
.docs .prose h2 .header-anchor { top: 30px; }
.docs .prose h3 .header-anchor { top: 4px; }
.docs .prose h4 .header-anchor { top: 2px; }
.docs .prose .header-anchor:hover {
  color: var(--ink);
  opacity: 1 !important;
}
:root[data-theme="dark"] .docs .prose .header-anchor:hover {
  color: var(--hl);
}
.docs .prose h1:hover .header-anchor,
.docs .prose h1 .header-anchor:focus,
.docs .prose h2:hover .header-anchor,
.docs .prose h2 .header-anchor:focus,
.docs .prose h3:hover .header-anchor,
.docs .prose h3 .header-anchor:focus,
.docs .prose h4:hover .header-anchor,
.docs .prose h4 .header-anchor:focus {
  opacity: 0.75;
  transform: translateX(0);
}
.docs .prose h1 + ul a[href^="#"] {
  text-decoration-color: var(--hl);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.docs .prose h1 + ul li::marker {
  color: var(--hl);
}
.doc-device-figure {
  max-width: 440px;
  margin: 32px auto;
}
.doc-device-figure.doc-device-figure-wide {
  max-width: 740px;
}
.doc-device-figure img,
.docs .prose img[src$=".svg"],
.docs .prose img[src*="current-book"] {
  display: block;
  width: 100%;
  max-width: 440px;
  margin: 32px auto;
  height: auto;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.doc-device-figure img {
  margin: 0 auto;
}
.docs .prose .doc-device-figure-wide img,
.docs .prose img[src$="/keep_my_notes_menu.svg"],
.docs .prose img[src$="/updates_menu.svg"],
.docs .prose img[src$="/style_menu.svg"],
.docs .prose img[src$="/confirm_delete_backups.svg"],
.docs .prose img[src*="current_book_menu"],
.docs .prose img[src*="current_book_style_format"],
.docs .prose img[src*="current_book_notes_card"],
.docs .prose .doc-device-frame-wide img {
  max-width: 760px;
}
dialog.guide-lightbox {
  position: fixed;
  inset: 0;
  inline-size: 100%;
  max-inline-size: 100%;
  block-size: 100dvh;
  max-block-size: 100dvh;
  margin: 0;
  border: 0;
  outline: none;
  z-index: 2000;
  background: transparent;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 20px;
}
dialog.guide-lightbox:not([open]) {
  display: none;
}
dialog.guide-lightbox[open] {
  display: flex;
  animation: lightboxIn 180ms cubic-bezier(0.23, 1, 0.32, 1);
}
dialog.guide-lightbox::backdrop {
  background: color-mix(in oklab, #141311 78%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
.guide-lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-inline-size: min(1200px, 94vw);
  max-block-size: 92dvh;
  gap: 14px;
}
.guide-viewport {
  position: relative;
  overflow: clip;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid color-mix(in oklab, var(--paper) 22%, var(--line));
  box-shadow: 0 24px 64px rgba(15, 14, 12, 0.48);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  max-block-size: 80dvh;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: fit-content;
}
.guide-viewport.is-zoomed {
  cursor: grab;
}
.guide-viewport.is-zoomed.is-panning {
  cursor: grabbing;
}
.guide-zoom-img {
  display: block;
  max-block-size: 80dvh;
  max-inline-size: min(1140px, 90vw);
  inline-size: auto;
  block-size: auto;
  object-fit: contain;
  transform-origin: 50% 50%;
  pointer-events: none;
  transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
.guide-viewport.is-panning .guide-zoom-img {
  transition: none;
}
.guide-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 8px 6px 14px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(15, 14, 12, 0.28);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  max-inline-size: 92vw;
  flex-wrap: wrap;
}
.guide-toolbar-info {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.guide-zoom-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--hl) 24%, transparent);
  color: var(--ink);
  font-weight: 600;
  font-family: var(--mono);
  font-size: 12px;
}
.guide-toolbar-hint {
  color: var(--muted);
  font-size: 12.5px;
}
@media (max-width: 640px) {
  .guide-toolbar-hint {
    display: none;
  }
}
.guide-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.guide-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 30px;
  min-block-size: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
  line-height: 1.2;
}
@media (hover: hover) and (pointer: fine) {
  .guide-btn:hover {
    border-color: color-mix(in oklab, var(--hl) 65%, var(--line));
    background: color-mix(in oklab, var(--hl) 12%, var(--paper));
  }
}
.guide-btn:active {
  transform: scale(0.97);
}
.guide-btn-toggle.is-active {
  background: var(--hl);
  color: var(--hl-ink);
  border-color: var(--hl);
  font-weight: 600;
}
.guide-btn-close {
  margin-inline-start: 2px;
}
.doc-shot {
  margin: 28px 0 32px;
}
.doc-spotlight {
  margin: 28px 0 32px;
}
.doc-spotlight .spotlight-tabs {
  margin-bottom: 18px;
}
.doc-spotlight .spotlight-frame {
  aspect-ratio: auto;
}
.doc-spotlight .doc-device-figure {
  margin: 12px auto 0;
}
.doc-spotlight .doc-device-figure img {
  margin: 0 auto;
}
.docs .prose .doc-spotlight .spotlight-frame img,
.docs .prose .doc-shot-frame img,
.docs .prose .doc-device-frame img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 !important;
  border: 0 !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  transition: none !important;
}
.docs .prose .doc-spotlight .spotlight-frame img:hover,
.docs .prose .doc-shot-frame img:hover,
.docs .prose .doc-device-frame img:hover {
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  transform: none;
}
.doc-spotlight .spotlight-slide.is-active .spotlight-frame img {
  animation: none;
}
.doc-spotlight .spotlight-slide.is-active .spotlight-frame img.zoom-context {
  transform-origin: 50% 46%;
  animation: kenBurnsContext 8.5s cubic-bezier(.22, 1, .36, 1) forwards;
}
.doc-spotlight .spotlight-slide.is-active .spotlight-frame img.zoom-footnote {
  transform-origin: 5% 94%;
  animation: kenBurnsFootnote 7s cubic-bezier(.22, 1, .36, 1) forwards;
}
@keyframes kenBurnsContext {
  0% { transform: scale(1); }
  100% { transform: scale(1.35); }
}
@keyframes kenBurnsFootnote {
  0% { transform: scale(1); }
  100% { transform: scale(1.78); }
}

.doc-shot-frame img.zoom-keep-notes,
.doc-shot-frame img[src*="keep-my-notes-obsidian.webp"],
.doc-shot-frame img[src*="docs-28-keep-my-notes-obsidian.webp"] {
  transform-origin: 52% 76%;
  animation: kenBurnsKeepNotes 8.5s cubic-bezier(.22, 1, .36, 1) forwards;
}
@keyframes kenBurnsKeepNotes {
  0% { transform: scale(1); }
  100% { transform: scale(1.85); }
}

.doc-shot-frame img.zoom-link-ids,
.doc-shot-frame img[src*="link-ids-obsidian.webp"],
.doc-shot-frame img[src*="docs-29-highlight-link-ids-obsidian.webp"] {
  transform-origin: 50% 50%;
  animation: kenBurnsLinkIds 8.5s cubic-bezier(.22, 1, .36, 1) forwards;
}
@keyframes kenBurnsLinkIds {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.doc-shot-frame img {
  animation-play-state: paused !important;
}
.doc-shot.is-inview .doc-shot-frame img {
  animation-play-state: running !important;
}

.doc-shot-frame img.zoom-context,
.doc-shot-frame img[src*="highlights-context-obsidian.webp"],
.doc-shot-frame img[src*="hightlights_context.webp"] {
  transform-origin: 50% 46%;
  animation: kenBurnsContext 8s cubic-bezier(.22, 1, .36, 1) forwards;
}

.doc-shot-frame img.zoom-modules,
.doc-shot-frame img[src*="book_modules_v210.webp"],
.doc-shot-frame img[src*="book-header-modules.webp"],
.doc-shot-frame img[src*="docs-25-book-note-modules-obsidian.webp"] {
  transform-origin: 56% 52%;
  animation: kenBurnsModules 8s cubic-bezier(.22, 1, .36, 1) forwards;
}
@keyframes kenBurnsModules {
  0% { transform: scale(1); }
  100% { transform: scale(1.52); }
}

.doc-shot-frame img.zoom-index,
.doc-shot-frame img[src*="index-obsidian.webp"],
.doc-shot-frame img[src*="index_v210_trophy_dashboard.webp"],
.doc-shot-frame img[src*="index-dashboard-trophy.webp"],
.doc-shot-frame img[src*="docs-27-index-dashboard-obsidian.webp"] {
  transform-origin: 58% 52%;
  animation: kenBurnsIndex 8s cubic-bezier(.22, 1, .36, 1) forwards;
}
@keyframes kenBurnsIndex {
  0% { transform: scale(1); }
  100% { transform: scale(1.48); }
}

.doc-shot-frame img.zoom-digest,
.doc-shot-frame img[src*="digest-obsidian.webp"],
.doc-shot-frame img[src*="reading_digest_v210.webp"],
.doc-shot-frame img[src*="reading-digest-timeline.webp"],
.doc-shot-frame img[src*="docs-03-reading-digest-obsidian.webp"] {
  transform-origin: 56% 58%;
  animation: kenBurnsDigest 8s cubic-bezier(.22, 1, .36, 1) forwards;
}
@keyframes kenBurnsDigest {
  0% { transform: scale(1); }
  100% { transform: scale(1.50); }
}
.doc-device-frame {
  max-width: 440px;
  margin: 0 auto;
}
.doc-device-frame-wide {
  max-width: 760px;
}
.docs .prose .doc-device-frame-wide img[src$=".svg"] {
  max-width: 760px;
}
.doc-device-frame img {
  display: block;
  width: 100%;
  height: auto;
  border: 0 !important;
  border-radius: 0 !important;
}
.doc-shot-frame {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #1e1e1e;
  box-shadow: 0 24px 54px -26px rgba(26, 25, 22, 0.38);
  cursor: zoom-in;
  outline: none;
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 220ms cubic-bezier(0.23, 1, 0.32, 1), border-color 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
@media (hover: hover) and (pointer: fine) {
  .doc-shot-frame:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(245, 166, 35, 0.35);
    border-color: rgba(245, 166, 35, 0.5);
  }
}
.doc-shot-frame:active {
  transform: scale(0.99) translateY(0);
}
.doc-shot-frame:focus-visible {
  outline: 2px solid var(--hl);
  outline-offset: 3px;
}
.doc-shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  border: 0 !important;
  border-radius: 0 !important;
}
.doc-shot figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-2);
}
.doc-shot figcaption::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--hl);
  flex-shrink: 0;
}
/* Interactive 6 Styles Showcase */
.styles-showcase {
  margin: 32px 0 40px;
}
.showcase-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.style-tab {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  color: var(--ink);
}
@media (hover: hover) and (pointer: fine) {
  .style-tab:hover {
    border-color: var(--muted);
    transform: translateY(-1px);
  }
}
.style-tab:active {
  transform: scale(0.985);
}
.style-tab.is-active {
  background: color-mix(in srgb, var(--paper-2) 90%, var(--hl) 10%);
  border-color: var(--hl);
  box-shadow: 0 4px 14px rgba(240, 176, 10, 0.25);
}
:root[data-theme="dark"] .style-tab.is-active {
  background: #25241e;
  border-color: var(--hl);
}
.tab-badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
}
.style-tab.is-active .tab-badge {
  color: var(--hl-ink);
  background: var(--hl);
  padding: 1px 5px;
  border-radius: 4px;
}
.style-tab code {
  font-size: 0.76rem;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font-weight: 600;
}
.tab-label {
  font-size: 0.74rem;
  color: var(--muted);
  margin-left: auto;
}
.showcase-window {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 48px -18px rgba(0, 0, 0, 0.25);
}
.window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
}
.window-dots {
  display: flex;
  gap: 7px;
  align-items: center;
  padding-right: 60px;
}
.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.window-dots span:nth-child(1) { background: #ff5f56; }
.window-dots span:nth-child(2) { background: #ffbd2e; }
.window-dots span:nth-child(3) { background: #27c93f; }
.window-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 500;
}
.window-env {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.window-content {
  padding: 28px 32px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.style-pane:not(.is-active):not([hidden="until-found"]) {
  display: none;
}
.style-pane[hidden="until-found"] {
  content-visibility: hidden;
}
.style-pane.is-active {
  display: block;
  animation: paneFade 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes paneFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Callout & Alert Styles */
.obsidian-callout {
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 10px;
}
.callout-highlight {
  background: rgba(59, 130, 246, 0.08);
  border-left: 4px solid #3b82f6;
}
.callout-alert {
  background: rgba(168, 85, 247, 0.08);
  border-left: 4px solid #a855f7;
}
.callout-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.callout-highlight .callout-header { color: #2563eb; }
.callout-alert .callout-header { color: #9333ea; }
:root[data-theme="dark"] .callout-highlight .callout-header { color: #60a5fa; }
:root[data-theme="dark"] .callout-alert .callout-header { color: #c084fc; }
.callout-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}
.callout-body {
  margin: 0 !important;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink);
}

/* Standard Quotes Render */
.obsidian-quote {
  margin: 0 0 10px !important;
  padding: 8px 0 8px 18px !important;
  border-left: 3px solid var(--line) !important;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink) !important;
}
.obsidian-quote p {
  margin: 0 !important;
}
.render-mark {
  background: var(--hl);
  color: var(--hl-ink);
  padding: 2px 6px;
  border-radius: 4px;
}
.render-star {
  font-size: 1.1rem;
  margin-right: 2px;
}
.quote-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 8px;
}
.quote-meta strong {
  color: var(--ink-2);
}
@media (max-width: 820px) {
  .showcase-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 540px) {
  .showcase-tabs {
    grid-template-columns: 1fr;
  }
}

/* Editorial Documentation Hub (/docs/) */
.hub-container {
  max-width: 1020px;
  padding: 76px 0 104px;
}
.hub-hero {
  max-width: 680px;
  margin: 0 auto 72px;
}
.hub-hero h1 {
  font-family: var(--serif);
  font-size: clamp(46px, 6vw, 72px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}
.hub-hero .lead {
  font-size: 1.16rem;
  line-height: 1.62;
  color: var(--ink-2);
  margin: 0 auto 36px;
  max-width: 540px;
}
.hub-search-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}
.hub-search-icon {
  position: absolute;
  left: 6px;
  color: var(--muted);
  pointer-events: none;
  transition: color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hub-search-wrap:focus-within .hub-search-icon {
  color: var(--ink);
}
.hub-search-input {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.98rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  padding: 12px 48px 12px 34px;
  outline: none;
  transition: border-color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hub-search-input::placeholder {
  color: var(--muted);
}
.hub-search-input:focus {
  border-bottom-color: var(--hl);
  background: transparent;
  box-shadow: none;
}
.hub-search-kbd {
  position: absolute;
  right: 4px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
  pointer-events: none;
}

/* Asymmetric Monograph Index Layout (Left Chapter Spine + Right Guide Ledger) */
.hub-chapters-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}
.hub-chapter {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 56px;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.hub-chapter-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  position: sticky;
  top: 96px;
}
.hub-chapter-num {
  display: block;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.65rem;
}
.hub-chapter-header h2 {
  font-family: var(--serif);
  font-size: clamp(1.95rem, 2.7vw, 2.4rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0 0 10px;
}
.hub-chapter-desc {
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  max-width: 28ch;
}
.hub-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hub-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 18px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 24px 0;
  margin: 0;
  text-decoration: none;
  transition: border-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hub-card:first-child {
  padding-top: 10px;
}
.hub-card:last-child {
  border-bottom: 0;
  padding-bottom: 10px;
}
.hub-card:hover {
  background-color: transparent;
  transform: none;
  box-shadow: none;
}
:root[data-theme="dark"] .hub-card:hover {
  background-color: transparent;
  box-shadow: none;
}
.hub-card-lead {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 2px;
}
.hub-card-index {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  min-width: 20px;
  transition: color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hub-card-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-2);
  flex-shrink: 0;
  transition:
    border-color 150ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 150ms cubic-bezier(0.22, 1, 0.36, 1),
    color 150ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hub-card:hover .hub-card-index {
  color: var(--accent);
}
.hub-card:hover .hub-card-icon-wrap {
  border-color: color-mix(in srgb, var(--hl) 65%, var(--line));
  background: color-mix(in srgb, var(--hl) 20%, var(--paper));
  color: var(--ink);
  transform: scale(1.04);
}
.hub-card-main {
  min-width: 0;
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hub-card:hover .hub-card-main {
  transform: translateX(4px);
}
.hub-card-arrow {
  color: var(--muted);
  flex-shrink: 0;
  align-self: center;
  transition: transform 150ms cubic-bezier(0.22, 1, 0.36, 1), color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hub-card:hover .hub-card-arrow {
  color: var(--ink);
  transform: translateX(5px);
}
.hub-card h3 {
  font-family: var(--sans);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 4px;
  transition: color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hub-card:hover h3 {
  color: var(--accent);
}
.hub-card p {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.58;
  color: var(--ink-2);
  margin: 0;
  max-width: 62ch;
}
.hub-empty {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  padding: 48px 0;
}
.hub-footer {
  margin-top: 64px;
  padding-top: 40px;
}
.hub-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  color: var(--ink);
  margin: 0 0 10px;
}
.hub-footer .muted {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}
@media (max-width: 820px) {
  .hub-chapter {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 36px 0;
  }
  .hub-chapter-header {
    position: static;
  }
  .hub-card {
    margin: 0;
    padding: 18px 0;
  }
  .hub-card:hover {
    padding-left: 6px;
  }
}
@media (max-width: 720px) {
  .hub-container { padding: 48px 0 64px; }
  .hub-hero { margin-bottom: 44px; }
}
.doc-cards { list-style: none; padding: 0 !important; display: grid; gap: 0; margin-top: 2em !important; border-top: 1px solid var(--line); }
.doc-cards a { display: block; text-decoration: none; padding: 18px 4px; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; transition: color 150ms cubic-bezier(0.22, 1, 0.36, 1); }
.doc-cards a:hover { color: var(--accent); }
.doc-cards span { display: block; color: var(--ink-2); font-size: .93rem; margin-top: 4px; }
.docs-nav-header {
  display: none;
}

@media (max-width: 860px) {
  /* Docs mobile top action bar */
  .docs-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    margin: 0 auto;
    width: min(var(--maxw), 100% - 32px);
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    position: sticky;
    top: 76px;
    z-index: 90;
    box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
    will-change: transform, opacity;
  }
  .docs-mobile-bar.is-hidden {
    transform: translateY(-90px);
    opacity: 0;
    pointer-events: none;
  }
  .docs-mobile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 14px;
    font-family: var(--sans);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }
  .docs-mobile-btn:hover,
  .docs-mobile-btn.is-active {
    background: color-mix(in srgb, var(--hl) 24%, var(--paper));
    border-color: var(--hl);
    color: var(--ink);
  }
  .docs-mobile-caret {
    transition: transform 0.2s ease;
  }
  .docs-mobile-btn.is-active .docs-mobile-caret {
    transform: rotate(180deg);
  }

  /* Backdrop overlay */
  .docs-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 198;
  }
  .docs-backdrop.is-open {
    opacity: 1;
    visibility: visible;
  }

  body.docs-drawer-open {
    overflow: hidden;
  }

  /* Docs drawer (flyout from left) */
  .docs-nav {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(340px, 86vw);
    background: var(--paper);
    border-right: 1px solid var(--line);
    padding: 24px 20px 48px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 16px 0 36px rgba(0, 0, 0, 0.35);
  }
  .docs-nav.is-open {
    transform: translateX(0);
  }
  .docs-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
  }
  .docs-nav-title {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--ink);
  }
  .docs-nav-close {
    background: var(--paper-2);
    border: 1px solid var(--line);
    color: var(--ink-2);
    font-size: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }
  .docs-nav-close:hover {
    background: var(--hl);
    color: var(--hl-ink);
  }

  /* Floating on-page TOC dropdown */
  .docs-toc {
    display: none !important;
    position: fixed;
    top: 132px;
    right: 16px;
    left: 16px;
    max-height: min(420px, 60vh);
    overflow-y: auto;
    background: var(--paper);
    border: 1.5px solid var(--hl);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.45);
    z-index: 150;
    animation: docsSlideDown 0.2s ease;
  }
  .docs-toc.is-open {
    display: block !important;
  }
  @keyframes docsSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Docs layout adjustments */
  .docs {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 24px 0 80px !important;
    width: min(var(--maxw), 100% - 28px);
  }
  .docs .prose {
    max-width: 100%;
    font-size: 16px;
    line-height: 1.7;
  }
  .docs .prose h1 {
    font-size: clamp(32px, 7vw, 44px);
    line-height: 1.15;
    margin-bottom: 20px;
  }
  .docs .prose h2 {
    font-size: 21px;
    line-height: 28px;
    margin: 36px 0 14px;
    padding-top: 18px;
  }
  .docs .prose h3 {
    font-size: 18px;
    line-height: 24px;
    margin: 26px 0 0;
  }

  /* Full-width responsive Kindle device mockups on mobile */
  .doc-device-figure,
  .doc-device-figure.doc-device-figure-wide,
  .doc-device-frame,
  .docs .prose .doc-device-figure img,
  .docs .prose .doc-device-figure-wide img,
  .docs .prose img[src$=".svg"],
  .docs .prose img[src$="/keep_my_notes_menu.svg"],
  .docs .prose img[src$="/updates_menu.svg"],
  .docs .prose img[src$="/style_menu.svg"],
  .docs .prose img[src$="/confirm_delete_backups.svg"],
  .docs .prose img[src*="current_book_menu"],
  .docs .prose img[src*="current_book_style_format"],
  .docs .prose img[src*="current_book_notes_card"],
  .docs .prose .doc-device-frame-wide img[src$=".svg"] {
    width: 100% !important;
    max-width: 100% !important;
    margin: 24px 0 !important;
  }

  /* Responsive tables with smooth touch scrolling */
  .prose table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    margin: 20px 0;
  }
  .prose th, .prose td {
    padding: 7px 10px;
    font-size: 0.85rem;
    white-space: normal;
    min-width: 120px;
  }
}

@media (min-width: 861px) {
  .docs-mobile-bar,
  .docs-backdrop {
    display: none !important;
  }
}

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 56px; color: var(--ink-2); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) auto; gap: 40px 56px; align-items: start; }
.footer-brand { margin: 0 0 8px; font-family: var(--serif); font-size: 1.25rem; color: var(--ink); }
.footer-desc { margin: 0 0 12px; max-width: 560px; line-height: 1.6; }
.footer-meta { margin: 0; max-width: 560px; font-size: .85rem; line-height: 1.55; color: var(--muted); }
.footer-meta strong { color: var(--ink-2); font-weight: 600; }
.footer-links-col { display: flex; gap: 48px; }
.footer-col { display: flex; flex-direction: column; gap: 7px; font-family: var(--mono); font-size: .8rem; }
.footer-col-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.footer-col a { text-decoration: none; color: var(--ink-2); }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-links-col { gap: 36px; }
}

/* reveal on scroll */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

/* About Hero Full Width */
.about-hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 520px;
  margin: 0 0 56px 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
  border-bottom: none;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 24px 60px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url('../img/about_light.webp');
  transition: background-image 0.25s ease;
}

:root[data-theme="dark"] .about-hero {
  background-image: url('../img/about_dark.webp');
}

:root[data-theme="dark"] .about-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(20, 20, 20, 0.4) 0%, rgba(10, 10, 10, 0.85) 100%);
  z-index: 1;
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .about-hero {
    background-image: url('../img/about_dark.webp');
  }
  :root:not([data-theme="light"]) .about-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(20, 20, 20, 0.4) 0%, rgba(10, 10, 10, 0.85) 100%);
    z-index: 1;
    pointer-events: none;
  }
}

.about-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  background: linear-gradient(to bottom, transparent 0%, var(--paper) 100%);
  pointer-events: none;
  z-index: 1;
}

.about-hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: 0 auto;
}

.about-hero-content h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  color: var(--ink);
  margin-bottom: 24px;
}

.about-hero-lead {
  color: var(--ink-2);
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.15rem;
  line-height: 1.6;
}

:root[data-theme="dark"] .about-hero-content h1 {
  color: #ffffff;
}

:root[data-theme="dark"] .about-hero-lead {
  color: #e5e5e5;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .about-hero-content h1 {
    color: #ffffff;
  }
  :root:not([data-theme="light"]) .about-hero-lead {
    color: #e5e5e5;
  }
}

/* About Editorial Layout */
.about-wrap {
  width: min(980px, 100% - 48px);
  margin: 0 auto;
  padding: 72px 0 96px;
}
.about-editorial {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
  padding-bottom: 72px;
  border-bottom: 1px solid var(--line);
}
.about-letter .eyebrow,
.about-rules .eyebrow,
.about-signoff .eyebrow {
  display: block;
  margin-bottom: 0.5rem;
}
.about-letter h2 {
  margin-bottom: 0.6em;
}
.about-letter p {
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.7;
  margin: 0 0 1.1em;
}
.colophon-card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 22px 0;
}
.colophon-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.colophon-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0;
}
.colophon-edition {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.colophon-list {
  margin: 0;
  display: grid;
  gap: 11px;
}
.colophon-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.colophon-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.colophon-list dt {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.colophon-list dd {
  margin: 0;
  text-align: right;
  color: var(--ink);
  font-weight: 500;
}
.about-aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.margin-note {
  margin: 6px 0 0;
  padding-left: 8px;
  color: var(--ink-2);
  transform: rotate(-3.5deg);
  transform-origin: left center;
}
.margin-arrow {
  width: 150px;
  height: auto;
  display: block;
  margin: 0 0 4px 12px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.78;
}
.margin-quote {
  font-family: "Caveat", "Instrument Serif", cursive;
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.18;
  margin: 0 0 0 28px;
  color: var(--ink-2);
}
.margin-quote mark {
  background: linear-gradient(var(--hl), var(--hl)) no-repeat left center;
  background-size: 100% 100%;
  color: var(--hl-ink);
  padding: 0 0.22em;
  border-radius: 4px;
}
.js .margin-note[data-reveal] {
  opacity: 0;
  transform: rotate(-3.5deg) translateY(14px);
  transition: opacity .6s ease, transform .75s cubic-bezier(.22, 1, .36, 1);
}
.js .margin-note[data-reveal] .arrow-shaft,
.js .margin-note[data-reveal] .arrow-head {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.js .margin-note[data-reveal] .margin-quote mark {
  background-size: 0% 100%;
}
.js .margin-note[data-reveal].is-visible {
  opacity: 1;
  transform: rotate(-3.5deg) translateY(0);
}
.js .margin-note[data-reveal].is-visible .arrow-shaft {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .8s cubic-bezier(.22, 1, .36, 1) .15s;
}
.js .margin-note[data-reveal].is-visible .arrow-head {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .35s ease .8s;
}
.js .margin-note[data-reveal].is-visible .margin-quote mark {
  background-size: 100% 100%;
  transition: background-size .65s cubic-bezier(.22, 1, .36, 1) .45s;
}
@media (max-width: 820px) {
  .margin-note,
  .js .margin-note[data-reveal].is-visible {
    transform: rotate(-1.5deg) translateY(0);
    padding-left: 0;
  }
  .margin-arrow {
    width: 96px;
    margin: 0 auto 4px;
  }
  .margin-quote {
    margin-left: 0;
    font-size: 1.5rem;
    text-align: center;
  }
}

.about-contrast {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}
.contrast-box {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.contrast-before {
  border-color: var(--line);
  opacity: 0.88;
}
.contrast-after {
  border-color: color-mix(in srgb, var(--hl) 70%, var(--line));
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.35);
  background: color-mix(in srgb, var(--paper-2) 94%, var(--hl) 6%);
}
:root[data-theme="dark"] .contrast-after {
  background: #1e1e1a;
  border-color: color-mix(in srgb, var(--hl) 45%, transparent);
  box-shadow: 0 18px 48px -16px rgba(0, 0, 0, 0.6);
}
.contrast-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.contrast-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.contrast-label-hl {
  color: var(--ink);
  font-weight: 700;
}
.contrast-pill {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.contrast-pill-dim {
  color: var(--muted);
  background: var(--code-bg);
}
.contrast-pill-yellow {
  background: var(--hl);
  color: var(--hl-ink);
  font-weight: 600;
  border-color: transparent;
}
.contrast-box h3 {
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 18px;
}
.contrast-tree {
  margin-top: auto;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.tree-file,
.tree-folder {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.tree-entries {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.tree-entries li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-book {
  color: var(--ink);
  font-weight: 600;
}
.tree-note {
  font-style: italic;
  font-size: 0.75rem;
  color: var(--muted);
}
.tree-muted {
  color: var(--muted);
  font-style: italic;
  padding-top: 4px;
}
.tree-item-hl {
  color: var(--ink) !important;
  font-weight: 500;
}
.tree-badge {
  margin-left: auto;
  font-size: 0.68rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hl) 40%, transparent);
  color: var(--ink);
  font-weight: 600;
}
.tree-dim {
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: auto;
}
@media (max-width: 820px) {
  .about-contrast {
    grid-template-columns: 1fr;
  }
}

/* About Manifesto (The Philosophy) */
.about-manifesto {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}
.manifesto-head {
  margin-bottom: 40px;
}
.manifesto-head h2 {
  margin: 6px 0 10px;
}
.manifesto-head p {
  margin: 0;
  font-size: 1.05rem;
}
.manifesto-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.manifesto-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.manifesto-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--hl) 55%, var(--line));
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.2);
}
.manifesto-card-hl {
  background: color-mix(in srgb, var(--paper-2) 95%, var(--hl) 5%);
  border-color: color-mix(in srgb, var(--hl) 70%, var(--line));
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.25);
}
:root[data-theme="dark"] .manifesto-card-hl {
  background: #21201c;
  border-color: color-mix(in srgb, var(--hl) 45%, transparent);
}
.manifesto-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.manifesto-pill {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  color: var(--muted);
}
.manifesto-pill-hl {
  background: var(--hl);
  color: var(--hl-ink);
  border-color: transparent;
}
.manifesto-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.manifesto-card h3 {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.15;
  margin: 0 0 12px;
}
.manifesto-card p {
  color: var(--ink-2);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0 0 20px;
}
.manifesto-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.manifesto-foot code {
  background: transparent;
  padding: 0;
  color: var(--ink);
  font-weight: 600;
}
@media (max-width: 900px) {
  .manifesto-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* About Brand Identity & Swatches */
.about-brand {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}
.brand-head {
  max-width: 680px;
  margin-bottom: 48px;
}
.brand-anatomy {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 48px;
}
.brand-icon-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}
.brand-icon-stage img {
  width: 140px;
  height: 140px;
  border-radius: 30px;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.35);
}
.brand-icon-caption {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.brand-pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.brand-pillar-item h4 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}
.brand-pillar-item p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-2);
}

/* Color Swatches Grid */
.brand-swatches-title {
  font-family: var(--sans);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 8px;
}
.brand-swatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin: 24px 0 56px;
}
.brand-swatch-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.brand-swatch-card:hover {
  transform: translateY(-2px);
  border-color: var(--muted);
}
.brand-swatch-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}
:root[data-theme="dark"] .brand-swatch-box {
  border-color: rgba(255,255,255,0.12);
}
.brand-swatch-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.brand-swatch-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--ink);
  font-weight: 400;
}
.brand-swatch-hex {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}
.brand-swatch-role {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

/* Brand Typography */
.brand-typography-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 24px 0 32px;
}
.brand-type-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.brand-type-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}
.brand-type-sample {
  font-size: 2.2rem;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 12px;
}
.brand-type-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.brand-type-role {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}
@media (max-width: 900px) {
  .brand-anatomy {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 28px;
  }
  .brand-pillars-grid {
    grid-template-columns: 1fr;
  }
  .brand-typography-grid {
    grid-template-columns: 1fr;
  }
}

.about-signoff {
  margin-top: 48px;
  padding: 48px 40px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.about-signoff h2 {
  margin: 6px 0 10px;
}
.about-signoff p {
  margin: 0;
  color: var(--ink-2);
  font-size: 1.05rem;
}
.about-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 820px) {
  .about-editorial,
  .about-contrast {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .about-signoff {
    padding: 32px 24px;
    align-items: flex-start;
  }
}

/* Download Page */
.dl-hero {
  padding: 72px 0 64px;
}
.dl-hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 48px;
  align-items: center;
}
.dl-hero-copy .eyebrow {
  display: block;
  margin-bottom: 0.6rem;
}
.dl-hero-copy h1 {
  margin-bottom: 0.35em;
}
.dl-hero-copy .lead {
  max-width: 560px;
  margin: 0;
}
.dl-actions {
  justify-content: flex-start;
  margin-top: 28px;
}
.dl-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dl-release-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-top: 4px solid var(--hl);
  border-radius: 18px;
  padding: 26px 28px;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.06);
}
.colophon-list dt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.colophon-list dt svg {
  color: var(--hl);
  flex-shrink: 0;
}
.dl-release-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.dl-release-top .colophon-tag {
  margin-bottom: 0;
}
.dl-version-pill {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--hl);
  color: var(--hl-ink);
  border: 1px solid var(--hl);
  padding: 4px 12px;
  border-radius: 999px;
}
.dl-head {
  margin-bottom: 40px;
}
.dl-steps {
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.dl-step {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 4px 18px -4px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
:root[data-theme="dark"] .dl-step {
  box-shadow: 0 6px 24px -6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.dl-step:hover {
  border-color: color-mix(in srgb, var(--hl) 60%, var(--line));
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
:root[data-theme="dark"] .dl-step:hover {
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.dl-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.dl-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--hl) 16%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--hl) 35%, var(--line));
  color: var(--hl-ink);
  transition: transform 0.25s ease, background-color 0.25s ease;
}
:root[data-theme="dark"] .dl-step-icon {
  background: color-mix(in srgb, var(--hl) 15%, #252420);
  border-color: color-mix(in srgb, var(--hl) 40%, transparent);
  color: var(--hl);
}
.dl-step:hover .dl-step-icon {
  transform: scale(1.08) rotate(-2deg);
  background: var(--hl);
  color: var(--hl-ink);
}
.dl-step-icon svg {
  width: 22px;
  height: 22px;
}
.dl-step-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  color: var(--muted);
}
.dl-step h3 {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 14px 0 8px;
  color: var(--ink);
}
.dl-step p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.92rem;
  line-height: 1.6;
}
.dl-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0 0 48px;
}
.dl-wireless {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 32px;
  align-items: center;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.04);
}
.dl-wireless-copy .eyebrow {
  display: block;
  margin-bottom: 0.45rem;
}
.dl-wireless-copy h3 {
  font-family: var(--sans);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  color: var(--ink);
}
.dl-wireless-copy p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.6;
}
.dl-stores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.docs .prose .dl-stores {
  margin: 16px 0 26px;
}
.dl-store-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.docs .prose .dl-store-card {
  background: var(--paper-2);
}
.dl-store-card:hover {
  border-color: color-mix(in srgb, var(--hl) 55%, var(--line));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.08);
}
.dl-store-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.dl-store-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: var(--ink);
}
.dl-store-card p,
.docs .prose .dl-store-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.55;
}
.dl-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.dl-panel {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.04);
}
.dl-panel .eyebrow {
  display: block;
  margin-bottom: 0.4rem;
}
.dl-panel h3 {
  font-family: var(--sans);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
  color: var(--ink);
}
.dl-paths {
  margin: 0;
  display: grid;
  gap: 14px;
}
.dl-paths > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  font-size: 0.9rem;
}
.dl-paths > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.dl-paths dt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink);
  font-weight: 600;
}
.dl-paths dt svg {
  color: var(--muted);
}
.dl-paths dd {
  margin: 0;
  text-align: right;
}
.dl-checks {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 14px;
}
.dl-checks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink-2);
  font-size: 0.94rem;
  line-height: 1.55;
}
.dl-check-bullet {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hl) 20%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--hl) 40%, var(--line));
  color: var(--hl-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
:root[data-theme="dark"] .dl-check-bullet {
  background: color-mix(in srgb, var(--hl) 20%, #252420);
  border-color: color-mix(in srgb, var(--hl) 45%, transparent);
  color: var(--hl);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dl-check-bullet {
    background: color-mix(in srgb, var(--hl) 20%, #252420);
    border-color: color-mix(in srgb, var(--hl) 45%, transparent);
    color: var(--hl);
  }
}
.inline-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  color: var(--ink);
  margin: 0 2px;
}
.dl-next {
  margin: 0;
}
@media (max-width: 860px) {
  /* Download Hero: 1 column, release card sits full-width directly under the copy */
  .dl-hero {
    padding: 36px 0 32px;
  }
  .dl-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .dl-hero-copy {
    width: 100%;
  }
  .dl-hero-copy .lead {
    max-width: 100%;
  }
  .dl-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .dl-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .dl-release-card {
    width: 100%;
    padding: 22px 20px;
    border-radius: 16px;
  }

  /* 4-Step Setup: 1 column, each step is its own full-width card */
  .dl-steps {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 36px;
  }
  .dl-step {
    width: 100%;
    padding: 22px 20px;
    border-radius: 16px;
  }

  /* Wireless Setup & Stores: 1 column each */
  .dl-wireless {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    border-radius: 16px;
    gap: 20px;
  }
  .dl-stores {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .dl-store-card {
    width: 100%;
    padding: 18px 20px;
    border-radius: 14px;
  }

  /* Bottom Panels (Paths & Requirements): 1 column, stacked full-width */
  .dl-grid-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .dl-panel {
    width: 100%;
    padding: 24px 20px;
    border-radius: 16px;
  }
  .dl-next .btn {
    width: 100%;
    justify-content: center;
  }

  /* Paths items: stacked vertically so long code paths never collide with device labels */
  .dl-paths > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-bottom: 12px;
  }
  .dl-paths dt {
    font-size: 0.85rem;
  }
  .dl-paths dd {
    text-align: left;
    width: 100%;
  }
  .dl-paths dd code {
    display: block;
    width: 100%;
    overflow-x: auto;
    word-break: break-all;
    font-size: 0.82rem;
    padding: 6px 10px;
  }

  /* Colophon / release card rows: stacked cleanly so filename and details never squish */
  .colophon-list > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-bottom: 10px;
  }
  .colophon-list dt {
    font-size: 0.82rem;
  }
  .colophon-list dd {
    text-align: left;
    padding-left: 22px;
    word-break: break-all;
    font-size: 0.92rem;
  }
}
.btn-pill {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-family: var(--mono);
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.btn-pill:hover {
  border-color: var(--muted);
}
.btn-pill-yellow {
  background-color: var(--hl) !important;
  background-image: linear-gradient(var(--hl), var(--hl)) !important;
  color: var(--hl-ink) !important;
  border-color: var(--hl) !important;
  font-weight: 600;
}
.btn-pill-yellow:hover {
  background-color: color-mix(in srgb, var(--hl) 88%, #ffffff) !important;
  background-image: linear-gradient(color-mix(in srgb, var(--hl) 88%, #ffffff), color-mix(in srgb, var(--hl) 88%, #ffffff)) !important;
}

/* ==========================================================================
   Protezione Totale Anti-Marroncino (Dark Reader & estensioni simili)
   Garantisce che il giallo ambra var(--hl) non venga mai invertito o scurito
   ========================================================================== */
:root, :root:root, html, body,
[data-darkreader-scheme], [data-darkreader-mode] {
  --darkreader-bg--hl: #f0b00a !important;
  --darkreader-bg--btn-bg: #f0b00a !important;
  --darkreader-text-000000: #1e1e1e !important;
  --darkreader-text-191919: #1e1e1e !important;
  --darkreader-border-fde047: #f0b00a !important;
  --darkreader-background-fde04740: rgba(240, 176, 10, 0.25) !important;
  --darkreader-inline-bgcolor: #f0b00a !important;
  --darkreader-inline-color: #1e1e1e !important;
}

html .btn-primary,
html .btn-primary:visited,
html .btn-pill-yellow,
html [data-darkreader-inline-bgcolor].btn-primary,
[data-darkreader-scheme] .btn-primary,
[data-darkreader-mode] .btn-primary {
  background: var(--hl) !important;
  background-color: var(--hl) !important;
  background-image: linear-gradient(var(--hl), var(--hl)) !important;
  color: var(--hl-ink) !important;
  border-color: var(--hl) !important;
  box-shadow: 0 2px 10px rgba(240, 176, 10, 0.25) !important;
  --darkreader-inline-bgcolor: var(--hl) !important;
  --darkreader-inline-color: #1e1e1e !important;
}

html .btn-primary:hover,
html .btn-primary:active,
html .btn-primary:focus,
html .btn-pill-yellow:hover {
  background: color-mix(in srgb, var(--hl) 88%, #ffffff) !important;
  background-color: color-mix(in srgb, var(--hl) 88%, #ffffff) !important;
  background-image: none !important;
  color: var(--hl-ink) !important;
  box-shadow: 0 4px 14px rgba(240, 176, 10, 0.35) !important;
}

/* ==========================================================================
   Hallmark Shared Components: Code Blocks, Changelog & Home
   ========================================================================== */

/* Code blocks with copy button in /docs and quick install */
.code-block-wrapper {
  position: relative;
  margin: 20px 0;
}
.code-block-wrapper pre {
  margin: 0 !important;
  padding-right: 84px !important;
}
.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 28px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.code-copy-btn:hover {
  color: var(--ink);
  border-color: var(--hl);
}
.code-copy-btn.is-copied {
  background: var(--hl);
  color: var(--hl-ink);
  border-color: var(--hl);
  font-weight: 600;
}
.code-copy-btn.is-error {
  border-color: #dc2626;
  color: #dc2626;
}

/* Editorial Changelog Feed (/changelog/) */
.changelog-feed {
  border-top: 1px solid var(--line);
}
.release-entry {
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
.release-entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.release-entry-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.3rem);
  line-height: 1.08;
}
.release-entry-head h2 a {
  text-decoration: none;
}
.release-entry-head h2 a:hover {
  color: var(--accent);
}
.release-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.release-entry-body h3,
.release-entry-body h4 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 22px 0 8px;
  color: var(--ink);
}
.release-entry-body p {
  margin: 10px 0;
  color: var(--ink-2);
  font-size: 0.96rem;
  line-height: 1.65;
}
.release-entry-body ul {
  margin: 10px 0;
  padding-left: 1.35rem;
}
.release-entry-body li {
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 6px;
}
.release-entry-body li strong {
  color: var(--ink);
}
.changelog-loading,
.changelog-fallback {
  padding: 28px 0;
}

/* Clean Tables in /docs */
.docs .prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 24px 0;
  font-size: 0.92rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: table;
}
@media (max-width: 720px) {
  .docs .prose table {
    display: block;
    overflow-x: auto;
  }
}
.docs .prose th {
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.docs .prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: top;
}
.docs .prose tr:last-child td {
  border-bottom: 0;
}
.docs .prose td code {
  color: var(--ink);
}

/* Homepage Quick Installation Block */
.install-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) {
  .install-grid {
    grid-template-columns: 1fr;
  }
}
.install-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.install-card h3 {
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}
.install-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.6;
}
.install-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  font-size: 0.94rem;
  color: var(--ink-2);
}
.install-steps strong {
  color: var(--ink);
}

/* Clean Bento Mockups without inline rgba */
.bento-callout-mock {
  background: color-mix(in oklab, var(--hl) 10%, transparent);
  border-left: 3px solid var(--accent);
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 0.78rem;
}
.bento-callout-title {
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}
.bento-callout-sub {
  color: var(--muted);
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.index-trophy-mock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 6px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.index-trophy-label {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}

/* ==========================================================================
   Editorial Amber Highlight Stroke (.hl-stroke) & Brand Swatches/Typography
   ========================================================================== */
mark.hl-stroke,
h1 mark.hl-stroke,
h2 mark.hl-stroke {
  font-style: normal;
  position: relative;
  display: inline;
  color: inherit !important;
  background-color: transparent !important;
  padding: 0 0.14em;
  background-image: linear-gradient(var(--hl), var(--hl));
  background-repeat: no-repeat;
  background-size: 100% 38%;
  background-position: 0 88%;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
:root[data-theme="dark"] mark.hl-stroke,
:root[data-theme="dark"] h1 mark.hl-stroke,
:root[data-theme="dark"] h2 mark.hl-stroke {
  background-image: linear-gradient(var(--hl), var(--hl));
  color: var(--ink) !important;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) mark.hl-stroke,
  :root:not([data-theme="light"]) h1 mark.hl-stroke,
  :root:not([data-theme="light"]) h2 mark.hl-stroke {
    background-image: linear-gradient(var(--hl), var(--hl));
    color: var(--ink) !important;
  }
}

/* Editorial Chapter Kicker (clean monospace numeral + title, no pill badge) */
.editorial-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
}

/* About Brand Swatch Boxes & Typography Samples (no inline styles) */
.swatch-book-paper { background-color: var(--swatch-paper); }
.swatch-amber-hl { background-color: var(--swatch-amber); }
.swatch-eink-charcoal { background-color: var(--swatch-charcoal); }
.swatch-printers-ink { background-color: var(--swatch-ink); }
.swatch-warm-page { background-color: var(--swatch-warm-page); }

.type-sample-serif { font-family: var(--serif); }
.type-sample-sans { font-family: var(--sans); font-weight: 600; }
.type-sample-hand { font-family: var(--font-hand); font-weight: 600; }
.type-sample-mono { font-family: var(--mono); font-weight: 500; }

.manifesto-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.manifesto-tags span {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 6px;
}

/* ==========================================================================
   Mobile & Smartphone Refinements (< 640px and < 480px)
   ========================================================================== */
@media (max-width: 640px) {
  /* Homepage Hero */
  .hero {
    padding: 64px 16px 32px;
  }
  .hero-showcase {
    margin: 20px auto 0;
  }
  .actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* About Page Cards */
  .brand-swatches-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .brand-swatch-card {
    padding: 10px;
  }
  .contrast-box {
    padding: 20px 16px;
  }
  .about-signoff {
    padding: 24px 18px;
  }
  .about-links {
    width: 100%;
    flex-direction: column;
  }
  .about-links .btn,
  .about-links .btn-pill {
    width: 100%;
    justify-content: center;
  }

  /* Code Block Wrappers */
  .code-block-wrapper pre {
    padding-right: 16px !important;
    padding-top: 44px !important;
  }
  .code-copy-btn {
    top: 8px;
    right: 8px;
  }

  /* Docs Mobile Bar */
  .docs-mobile-bar {
    padding: 8px 12px;
  }
  .docs-mobile-btn {
    padding: 6px 10px;
    font-size: 0.82rem;
  }
}

@media (max-width: 400px) {
  .brand-swatches-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Editorial Redesign & Micro-interactions
   ========================================================================== */

/* 1. Anchor Scroll Offset & Smooth Scrolling */
section[id] {
  scroll-margin-top: 84px;
}

/* 2. Desktop Navbar Spacing (No wrapping or overlapping on mid-size laptops) */
.site-nav-desktop {
  flex-wrap: nowrap;
  gap: 20px;
}
.site-nav-desktop a {
  white-space: nowrap;
  font-weight: 500;
  transition: color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
@media (max-width: 1020px) and (min-width: 861px) {
  .site-nav-desktop {
    gap: 14px;
    font-size: 0.88rem;
  }
  .nav-github {
    padding: 4px 9px;
    font-size: 0.78rem;
  }
}

/* 3. Typographic Hierarchy & Eyebrow Kicker (letter-spacing: 0.08em) */
.editorial-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.85rem;
}
.hero h1,
.dl-hero-copy h1,
.about-hero-content h1 {
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-top: 0;
  margin-bottom: 20px;
}
.hero .lead {
  font-size: clamp(1.12rem, 1.8vw, 1.32rem);
  line-height: 1.6;
  max-width: 62ch;
  margin: 0 auto 12px;
  color: var(--ink);
}
.hero .muted {
  font-size: 0.96rem;
  line-height: 1.55;
  margin: 0 auto;
}
.section-head h2 {
  letter-spacing: -0.022em;
  line-height: 1.12;
  margin-top: 0;
  margin-bottom: 12px;
}

/* 4. Editorial Highlighter (<mark class="editorial-highlight">) + Left-to-Right Animation */
mark.editorial-highlight {
  --hl-bg: var(--hl);
  font-style: normal;
  line-height: 1;
  color: inherit !important;
  background-color: transparent !important;
  padding: 0 0.16em;
  margin: 0 -0.04em;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  background-image: linear-gradient(
    to bottom,
    transparent 16%,
    var(--hl-bg) 16%,
    var(--hl-bg) 88%,
    transparent 88%
  );
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% 100%;
}
:root[data-theme="dark"] mark.editorial-highlight {
  --hl-bg: color-mix(in srgb, var(--hl) 46%, transparent);
  color: var(--ink) !important;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) mark.editorial-highlight {
    --hl-bg: color-mix(in srgb, var(--hl) 46%, transparent);
    color: var(--ink) !important;
  }
}
.js mark.editorial-highlight {
  background-size: 0% 100%;
  transition: background-size 450ms cubic-bezier(0.22, 1, 0.36, 1) 80ms;
}
.js mark.editorial-highlight.is-visible {
  background-size: 100% 100%;
}

/* 5. Editorial Open Features Grid Rules */
@media (min-width: 861px) {
  .bento-card:nth-child(odd) {
    padding-left: 0;
    border-right: 1px solid var(--line);
  }
  .bento-card:nth-child(even) {
    padding-right: 0;
  }
}
@media (max-width: 860px) {
  .bento-card {
    padding: 32px 0;
  }
}

/* 6. Editorial De-boxing: Open Quick Install Columns */
#quick-install .install-grid {
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.install-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 36px 32px;
  box-shadow: none;
  min-width: 0;
}
.install-card .code-block-wrapper {
  margin: 4px 0;
  width: 100%;
  min-width: 0;
}
.install-card pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  font-size: 0.84rem;
  line-height: 1.55;
}
.install-card pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.install-card .actions {
  justify-content: flex-start;
  margin-top: 8px;
}
@media (min-width: 861px) {
  .install-card:first-child {
    padding-left: 0;
    border-right: 1px solid var(--line);
  }
  .install-card:last-child {
    padding-right: 0;
  }
}
@media (max-width: 860px) {
  .install-card {
    padding: 28px 0;
  }
  .install-card:first-child {
    border-bottom: 1px solid var(--line);
  }
  .install-card .actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
    margin-top: 10px;
  }
  .install-card .actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* 7. Editorial De-boxing: Open FAQ Ledger List (MWG accordion) */
.faq-list {
  gap: 0;
  border-top: 1px solid var(--line);
}
.faq-list details {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 20px 4px;
  box-shadow: none;
}
.faq-list details:hover,
.faq-list details[open] {
  border-color: var(--line);
}
.faq-list details summary {
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.75ch;
  transition: color 150ms cubic-bezier(0.23, 1, 0.32, 1);
}
.faq-list details summary::-webkit-details-marker {
  display: none;
}
.faq-list details summary::after {
  display: none;
}
/* MWG accordion: place rotating mask marker right before label text for vertical scanning */
.faq-list details summary::before {
  content: "";
  inline-size: 0.95em;
  block-size: 0.95em;
  flex-shrink: 0;
  background-color: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat center / contain;
  rotate: -90deg;
}
.faq-list details summary:dir(rtl)::before {
  rotate: 90deg;
}
.faq-list details[open] > summary::before {
  rotate: 0deg;
  background-color: var(--accent);
}
@media (hover: hover) and (pointer: fine) {
  .faq-list details summary:hover {
    color: var(--accent);
  }
  .faq-list details summary:hover::before {
    background-color: var(--accent);
  }
}
/* MWG accordion: intrinsic height slide animation on ::details-content */
.faq-list details::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}
.faq-list details:not([open])::details-content {
  block-size: 0;
}
.faq-list details p {
  padding-inline-start: calc(0.95em + 0.75ch);
}
@media (prefers-reduced-motion: no-preference) {
  .faq-list details summary::before {
    transition: rotate 180ms cubic-bezier(0.23, 1, 0.32, 1), background-color 150ms ease;
  }
  .faq-list details::details-content {
    transition: block-size, content-visibility, display;
    transition-duration: 240ms;
    transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    transition-behavior: allow-discrete;
  }
}

/* 8. Emil Design Eng Micro-interactions (200ms Mobile Drawer & Tactile Buttons) */
.site-menu-backdrop {
  transition: opacity 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.site-menu-drawer {
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), visibility 200ms ease-out;
}
.docs-backdrop {
  transition: opacity 200ms cubic-bezier(0.22, 1, 0.36, 1), visibility 200ms ease-out;
}
.docs-nav {
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.btn,
.code-copy-btn,
.site-menu-toggle,
.site-menu-close,
.theme-toggle {
  transition:
    transform 150ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 150ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 150ms cubic-bezier(0.22, 1, 0.36, 1),
    color 150ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
.btn:active,
.code-copy-btn:active,
.site-menu-toggle:active,
.site-menu-close:active,
.theme-toggle:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .js mark.editorial-highlight {
    background-size: 100% 100% !important;
    transition: none !important;
  }
  .doc-shot-frame img,
  .doc-spotlight .spotlight-slide.is-active .spotlight-frame img,
  dialog.guide-lightbox[open] {
    animation: none !important;
    transform: none !important;
  }
  .site-menu-backdrop,
  .site-menu-drawer,
  .docs-backdrop,
  .docs-nav,
  .btn,
  .code-copy-btn {
    transition: none !important;
  }
}

/* 9. Smartphone & Mobile Editorial Refinements (< 640px) */
@media (max-width: 640px) {
  section[id] {
    scroll-margin-top: 68px;
  }
  .bento-card {
    padding: 28px 0 !important;
  }
  .bento-card h3 {
    font-size: 1.15rem;
  }
  .install-card {
    padding: 26px 0 !important;
  }
  .faq-list details {
    padding: 18px 0 !important;
  }
  .faq-list details summary {
    font-size: 1rem;
    line-height: 1.4;
  }
  .hub-container {
    padding: 40px 0 60px;
  }
  .hub-hero {
    margin-bottom: 36px;
  }
  .hub-search-kbd {
    display: none;
  }
  .hub-search-input {
    font-size: 16px;
    padding: 10px 12px 10px 32px;
  }
  .hub-chapters-wrap {
    gap: 0;
  }
  .hub-chapter-header h2 {
    font-size: 1.75rem;
  }
  .hub-chapter-desc {
    max-width: 100%;
  }
  .hub-card {
    padding: 18px 0 !important;
    gap: 14px;
  }
  .hub-card-lead {
    gap: 8px;
  }
  .hub-card-icon-wrap {
    width: 30px;
    height: 30px;
  }
  .hub-card h3 {
    font-size: 1.05rem;
  }
  .hub-card p {
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   10. Unified Editorial Monograph System (Home, About, Download, Docs)
   ========================================================================== */

/* Shared Editorial SVG Icon Seal (matches Docs Hub signature) */
.editorial-seal-row,
.feature-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.feature-eyebrow {
  margin-bottom: 14px;
}
.feature-num,
.manifesto-num,
.dl-step-num {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.editorial-icon-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-2);
  flex-shrink: 0;
  transition:
    border-color 160ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 160ms cubic-bezier(0.22, 1, 0.36, 1),
    color 160ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.editorial-icon-seal.is-sm {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
@media (hover: hover) and (pointer: fine) {
  .bento-card:hover .editorial-icon-seal,
  .manifesto-card:hover .editorial-icon-seal,
  .dl-step:hover .editorial-icon-seal,
  .dl-store-card:hover .editorial-icon-seal,
  .brand-pillar-item:hover .editorial-icon-seal {
    border-color: color-mix(in srgb, var(--hl) 65%, var(--line));
    background: color-mix(in srgb, var(--hl) 20%, var(--paper));
    color: var(--ink);
    transform: scale(1.04);
  }
}
.bento-card:hover .feature-num,
.manifesto-card:hover .manifesto-num,
.dl-step:hover .dl-step-num {
  color: var(--accent);
}
.bento-card h3 {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 10px;
  transition: color 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- ABOUT PAGE: Open Editorial Monograph De-boxing --- */
.about-contrast {
  gap: 0;
  padding: 64px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.contrast-box {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 8px 36px;
  opacity: 1;
}
.contrast-before {
  padding-left: 0;
  border-right: 1px solid var(--line) !important;
}
.contrast-after {
  padding-right: 0;
}
.contrast-tree {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.about-manifesto {
  padding: 72px 0;
}
.manifesto-grid {
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.manifesto-card,
.manifesto-card-hl {
  background: transparent !important;
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 36px 28px;
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.manifesto-card:first-child {
  padding-left: 0;
}
.manifesto-card:last-child {
  border-right: 0 !important;
  padding-right: 0;
}
.manifesto-card:hover {
  transform: none;
  box-shadow: none;
  background-color: transparent !important;
}
.manifesto-card h3 {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  transition: color 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.manifesto-card:hover h3 {
  color: var(--accent);
}

/* Chapter 03 — The Visual Identity (Specimen & Editorial Monograph) */
.brand-head {
  max-width: 62ch;
  margin-bottom: 40px;
}
.brand-anatomy {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 40px 0;
  margin-bottom: 56px;
}
.brand-icon-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.brand-icon-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--line) 45%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 45%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: center center;
  transition: border-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.brand-icon-frame img {
  width: 128px;
  height: 128px;
  border-radius: 26px;
  box-shadow: 0 2px 8px rgba(30, 30, 30, 0.08);
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.brand-icon-stage:hover .brand-icon-frame {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.brand-icon-stage:hover .brand-icon-frame img {
  transform: scale(1.03);
}
.brand-icon-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.brand-icon-caption {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.03em;
}
.brand-icon-sub {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}
.brand-pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}
.brand-pillar-item {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  transition: background-color 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.brand-pillar-item:nth-child(odd) {
  padding-left: 0;
  border-right: 1px solid var(--line);
}
.brand-pillar-item:nth-child(even) {
  padding-right: 0;
}
.brand-pillar-item:nth-last-child(-n+2) {
  border-bottom: 0;
}
.brand-pillar-item:nth-child(-n+2) {
  padding-top: 4px;
}
.brand-pillar-item:nth-last-child(-n+2) {
  padding-bottom: 4px;
}
.brand-pillar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.brand-pillar-head h3,
.brand-pillar-head h4 {
  font-family: var(--sans);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
  transition: color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
.brand-pillar-item:hover .brand-pillar-head h3 {
  color: var(--accent);
}
.brand-pillar-item:hover .editorial-icon-seal {
  border-color: var(--accent);
  color: var(--accent);
}

.brand-subblock {
  margin-top: 56px;
}
.brand-subblock-head {
  max-width: 60ch;
}
.brand-subblock-head .muted {
  margin: 0;
  font-size: 0.96rem;
}

.brand-swatches-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 0;
}
.brand-swatch-card {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 160ms cubic-bezier(0.22, 1, 0.36, 1), transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}
@media (hover: hover) and (pointer: fine) {
  .brand-swatch-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
  }
  .brand-swatch-card:hover .brand-swatch-box {
    transform: scale(1.015);
  }
}
.brand-swatch-card:active {
  transform: scale(0.98);
}
.brand-swatch-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}
.brand-swatch-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
}
.brand-swatch-hex.is-copied {
  color: var(--accent);
}
.brand-typography-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0 16px;
}
.brand-type-card {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 28px 28px 28px 0;
}
.brand-type-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.brand-type-top .brand-type-badge {
  margin-bottom: 0;
}
.brand-type-spec {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}
@media (min-width: 901px) {
  .brand-type-card:nth-child(odd) {
    border-right: 1px solid var(--line);
  }
  .brand-type-card:nth-child(even) {
    padding-left: 28px;
    padding-right: 0;
  }
}
@media (max-width: 900px) {
  .brand-anatomy {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 0;
    margin-bottom: 44px;
  }
  .brand-icon-frame {
    max-width: 220px;
  }
  .brand-pillars-grid {
    grid-template-columns: 1fr;
  }
  .brand-pillar-item,
  .brand-pillar-item:nth-child(odd),
  .brand-pillar-item:nth-child(even) {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand-pillar-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .brand-swatches-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .brand-type-card {
    padding: 22px 0;
    border-right: 0;
  }
}
.about-signoff {
  margin-top: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 64px 0 24px;
}

/* --- DOWNLOAD PAGE: Open Editorial Monograph De-boxing --- */
.dl-release-card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 24px 0;
  box-shadow: none;
}
.colophon-list dt svg {
  color: var(--accent);
}
.dl-steps {
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
}
.dl-step {
  background: transparent !important;
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 32px 24px;
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.dl-step:first-child {
  padding-left: 0;
}
.dl-step:last-child {
  border-right: 0 !important;
  padding-right: 0;
}
.dl-step:hover {
  transform: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
}
.dl-step h3 {
  font-family: var(--sans);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 16px 0 8px;
  color: var(--ink);
  transition: color 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.dl-step:hover h3 {
  color: var(--accent);
}
.dl-step:hover .editorial-icon-seal {
  border-color: var(--accent);
  color: var(--accent);
}
.dl-divider {
  display: none;
}
.dl-wireless {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 0 56px;
  margin-bottom: 56px;
  box-shadow: none;
  gap: 48px;
}
.dl-wireless-copy h2,
.dl-wireless-copy h3 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--ink);
}
.dl-stores {
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.dl-store-card {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 24px 20px;
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.dl-store-card:first-child {
  padding-left: 0;
  border-right: 1px solid var(--line) !important;
}
.dl-store-card:last-child {
  padding-right: 0;
}
.dl-store-card:hover {
  transform: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
}
.dl-store-title h3,
.dl-store-title strong {
  font-family: var(--sans);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
  transition: color 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.dl-store-card:hover .dl-store-title h3,
.dl-store-card:hover .dl-store-title strong {
  color: var(--accent);
}
.dl-store-card:hover .editorial-icon-seal {
  border-color: var(--accent);
  color: var(--accent);
}
.bento-card h3 {
  transition: color 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.bento-card:hover h3 {
  color: var(--accent);
}
.dl-grid-2 {
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.dl-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 36px 36px;
}
.dl-panel:first-child {
  padding-left: 0;
  border-right: 1px solid var(--line);
}
.dl-panel:last-child {
  padding-right: 0;
}
.dl-panel h3 {
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 18px;
  color: var(--ink);
}

/* --- RESPONSIVE @MEDIA FOR UNIFIED ABOUT & DOWNLOAD (Tablet & Smartphone) --- */
@media (max-width: 900px) {
  .manifesto-card,
  .manifesto-card-hl {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    padding: 28px 0 !important;
  }
  .manifesto-card:last-child {
    border-bottom: 0 !important;
  }
  .brand-anatomy {
    padding: 32px 0;
    gap: 32px;
  }
  .brand-type-card {
    padding: 24px 0 !important;
    border-right: 0 !important;
  }
}

@media (max-width: 860px) {
  .contrast-box {
    padding: 24px 0 !important;
    border-right: 0 !important;
  }
  .contrast-before {
    border-bottom: 1px solid var(--line) !important;
  }
  .dl-steps {
    grid-template-columns: 1fr;
    margin-bottom: 40px;
  }
  .dl-step {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    padding: 24px 0 !important;
  }
  .dl-step:last-child {
    border-bottom: 0 !important;
  }
  .dl-wireless {
    padding: 8px 0 40px;
    margin-bottom: 40px;
    gap: 28px;
  }
  .dl-store-card {
    border-right: 0 !important;
    padding: 20px 0 !important;
  }
  .dl-store-card:first-child {
    border-bottom: 1px solid var(--line) !important;
  }
  .dl-panel {
    border-right: 0 !important;
    padding: 28px 0 !important;
  }
  .dl-panel:first-child {
    border-bottom: 1px solid var(--line);
  }
  .dl-paths > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .dl-paths dd {
    text-align: left;
    word-break: break-all;
  }
  .dl-next .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }
  h1,
  .about-hero-content h1,
  .dl-hero-copy h1 {
    font-size: clamp(2.35rem, 10vw, 3.1rem);
    line-height: 1.02;
  }
  h2,
  .dl-wireless-copy h2,
  .dl-wireless-copy h3 {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
    line-height: 1.1;
  }
  .lead,
  .about-hero-lead,
  .about-letter p {
    font-size: 1.04rem;
    line-height: 1.62;
  }
  .brand-swatches-title {
    font-size: 1.28rem;
  }
  .contrast-box h3,
  .dl-panel h3 {
    font-size: 1.18rem;
  }
  .manifesto-card h3,
  .dl-step h3 {
    font-size: 1.12rem;
  }
  .brand-pillar-head h3,
  .dl-store-title h3 {
    font-size: 1.05rem;
  }
  .about-contrast {
    padding: 40px 0;
  }
  .about-manifesto,
  .about-brand {
    padding: 48px 0;
  }
  .about-signoff {
    padding: 44px 0 16px;
  }
  .brand-swatches-grid {
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid var(--line);
  }
  .brand-swatch-card {
    flex-direction: row;
    align-items: center;
    padding: 12px 0;
    gap: 14px;
  }
  .brand-swatch-card:hover {
    transform: none;
  }
  .brand-swatch-box {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
  }
  .tree-entries li {
    white-space: normal;
    word-break: break-word;
  }
  .dl-hero {
    padding: 36px 0 32px;
  }
  .dl-release-card {
    padding: 20px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .editorial-icon-seal,
  .manifesto-card,
  .brand-icon-frame,
  .brand-icon-frame img,
  .brand-pillar-item,
  .brand-pillar-head h3,
  .brand-swatch-card,
  .brand-swatch-box,
  .dl-step,
  .dl-store-card {
    transition: none !important;
  }
}

/* ==========================================================================
   11. Print & Literary Editorial Polish (1E1E1E Ink + Hairline Rules)
   ========================================================================== */

/* Text Selection in Brand Amber + 1E1E1E Ink */
::selection {
  background: color-mix(in srgb, var(--hl) 45%, transparent);
  color: #1e1e1e;
}
:root[data-theme="dark"] ::selection {
  background: color-mix(in srgb, var(--hl) 45%, transparent);
  color: #faf6ee;
}

/* Crisp Editorial Typography & Open-Type Kerning */
body {
  font-kerning: normal;
  font-feature-settings: "kern" 1, "liga" 1;
}
h1, h2, h3, .logo, .hub-quote, .footer-brand {
  font-feature-settings: "kern" 1, "liga" 1, "dlig" 1;
}

/* Soft Warm-Cream Section Divider (unified via --line token) */
.section-divider {
  border: 0;
  height: 0;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  opacity: 1;
  margin: 0;
}

/* Editorial Drop-Cap on About Chapter 01 Letter */
.about-letter > p:first-of-type::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 3.85rem;
  line-height: 0.82;
  padding: 6px 12px 0 0;
  color: var(--ink);
  font-weight: 400;
}

/* Refined Literary Lead & Reading Rhythm */
.section-head .muted {
  font-size: 1.04rem;
  line-height: 1.62;
  max-width: 58ch;
  margin-inline: auto;
}
.site-footer {
  border-top: 1px solid var(--line);
}
.footer-brand {
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}
.site-nav-desktop a {
  position: relative;
}
.site-nav-desktop a:not(.nav-github)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1.5px;
  background: var(--hl);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.site-nav-desktop a:not(.nav-github):hover::after {
  transform: scaleX(1);
}

@media (max-width: 640px) {
  .about-letter > p:first-of-type::first-letter {
    font-size: 3.1rem;
    padding: 4px 10px 0 0;
  }
}

/* ==========================================================================
   12. Tomedown 3.0 Homepage Redesign (Emil Design Eng + Modern Web Guidance)
   ========================================================================== */

/* Responsive fluid typography adhering to WCAG 1.4.4 (max <= 2.5x min, rem + vw) */
.hero h1 {
  font-size: clamp(2.75rem, 1.5rem + 5.2vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 0.42em;
}
.section-head h2,
.faq-intro h2,
.cta h2 {
  font-size: clamp(2.05rem, 1.35rem + 2.6vw, 3.25rem);
  line-height: 1.04;
}

/* Hero Release 3.0 Pill + Editorial Kicker Row */
.hero-eyebrow-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  flex-wrap: balance;
  gap: 10px 14px;
  margin-bottom: 18px;
}
.hero-eyebrow-row .editorial-kicker {
  margin-bottom: 0;
}
.hero-release-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--hl) 55%, var(--line));
  background: color-mix(in srgb, var(--hl) 14%, var(--paper-2));
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition:
    transform 150ms cubic-bezier(0.23, 1, 0.32, 1),
    border-color 150ms cubic-bezier(0.23, 1, 0.32, 1),
    background-color 150ms cubic-bezier(0.23, 1, 0.32, 1);
}
.hero-release-dot {
  inline-size: 6px;
  block-size: 6px;
  border-radius: 50%;
  background: var(--hl);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--hl) 30%, transparent);
}
@media (hover: hover) and (pointer: fine) {
  .hero-release-pill:hover {
    border-color: var(--hl);
    background: color-mix(in srgb, var(--hl) 24%, var(--paper-2));
    transform: translateY(-1px);
  }
}
.hero-release-pill:active {
  transform: scale(0.97);
}

/* Hero Colophon Ledger (balanced wrapped row) */
.hero-colophon {
  list-style: none;
  padding: 18px 0 0;
  margin: 26px auto 0;
  max-width: 680px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
  align-items: safe center;
  flex-wrap: wrap;
  flex-wrap: balance;
  gap: 6px 20px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.hero-colophon li {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 20px;
}
.hero-colophon li + li::before {
  content: "·";
  color: var(--line);
  font-weight: 700;
}

/* Emil Design Eng: Subtle staggered hero entrance (opted-in only for no-preference) */
@media (prefers-reduced-motion: no-preference) {
  .hero-stagger-1,
  .hero-stagger-2,
  .hero-stagger-3,
  .hero-stagger-4,
  .hero-stagger-5,
  .hero-stagger-6 {
    animation: heroFolioRise 380ms cubic-bezier(0.23, 1, 0.32, 1) both;
  }
  .hero-stagger-1 { animation-delay: 0ms; }
  .hero-stagger-2 { animation-delay: 40ms; }
  .hero-stagger-3 { animation-delay: 85ms; }
  .hero-stagger-4 { animation-delay: 125ms; }
  .hero-stagger-5 { animation-delay: 165ms; }
  .hero-stagger-6 { animation-delay: 210ms; }
}
@keyframes heroFolioRise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reserve exact 16:9 ratio on hero showcase image to prevent CLS */
.showcase-img {
  aspect-ratio: 2000 / 1125;
}

/* Interactive 3.0 Live Note Specimen Workbench */
.specimen-workbench {
  container: specimen / inline-size;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
  padding: 0 0 clamp(44px, 6vw, 64px);
}
.specimen-controls-col h3 {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 1.25rem + 1.4vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 6px 0 12px;
}
.specimen-controls-col > p {
  margin: 0 0 22px;
  color: var(--ink-2);
  font-size: 0.96rem;
  line-height: 1.62;
}
.specimen-control-group {
  margin-bottom: 18px;
}
.specimen-control-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 8px;
}

/* Emil Design Eng clip-path segmented switch (zero mid-transition text contrast flicker) */
.spec-mode-switch {
  position: relative;
  display: inline-grid;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
}
.spec-mode-base,
.spec-mode-overlay {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(126px, 1fr));
}
.spec-mode-btn,
.spec-mode-pill {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
}
.spec-mode-btn {
  cursor: pointer;
  color: var(--ink-2);
  transition: color 150ms ease, transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}
@media (hover: hover) and (pointer: fine) {
  .spec-mode-btn:hover {
    color: var(--ink);
  }
}
.spec-mode-btn:active {
  transform: scale(0.97);
}
.spec-mode-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.spec-mode-overlay {
  pointer-events: none;
  background: var(--hl);
  border-radius: 999px;
  clip-path: inset(0 50% 0 0 round 999px);
}
.spec-mode-switch[data-active="standard"] .spec-mode-overlay {
  clip-path: inset(0 0 0 50% round 999px);
}
@media (prefers-reduced-motion: no-preference) {
  .spec-mode-overlay {
    transition: clip-path 210ms cubic-bezier(0.23, 1, 0.32, 1);
  }
}
.spec-mode-pill {
  color: var(--hl-ink);
}
@media (forced-colors: active) {
  .spec-mode-overlay {
    display: none;
  }
  .spec-mode-btn[aria-pressed="true"] {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
}

/* Visual style 4-button selector */
.spec-style-pills {
  display: flex;
  flex-wrap: wrap;
  flex-wrap: balance;
  gap: 8px;
}
.spec-style-btn {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 500;
  transition:
    border-color 150ms cubic-bezier(0.23, 1, 0.32, 1),
    background-color 150ms cubic-bezier(0.23, 1, 0.32, 1),
    color 150ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}
.spec-style-glyph {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
@media (hover: hover) and (pointer: fine) {
  .spec-style-btn:hover {
    border-color: color-mix(in srgb, var(--hl) 55%, var(--line));
    color: var(--ink);
  }
}
.spec-style-btn:active {
  transform: scale(0.97);
}
.spec-style-btn[aria-pressed="true"] {
  border-color: var(--hl);
  background: color-mix(in srgb, var(--hl) 16%, var(--paper-2));
  color: var(--ink);
}
.spec-style-btn[aria-pressed="true"] .spec-style-glyph {
  color: var(--accent);
  font-weight: 600;
}
.specimen-footnote {
  margin: 14px 0 0 !important;
  font-family: var(--mono);
  font-size: 0.78rem !important;
}
.specimen-footnote a {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
  .specimen-footnote a:hover {
    color: var(--ink);
  }
}

/* Specimen Note Window */
.specimen-window {
  box-shadow: 0 10px 30px rgba(30, 30, 30, 0.05);
}
.specimen-window-body {
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.58;
  display: grid;
  gap: 10px;
  overflow-x: auto;
}
@media (prefers-reduced-motion: no-preference) {
  .specimen-window-body {
    transition:
      opacity 160ms cubic-bezier(0.23, 1, 0.32, 1),
      transform 160ms cubic-bezier(0.23, 1, 0.32, 1),
      filter 160ms cubic-bezier(0.23, 1, 0.32, 1);
  }
  .specimen-window-body.is-morphing {
    opacity: 0.35;
    transform: translateY(2px);
    filter: blur(1.5px);
  }
}
.spec-yaml {
  color: var(--ink-2);
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.spec-module {
  padding: 7px 10px;
  border-inline-start: 2.5px solid var(--hl);
  background: color-mix(in srgb, var(--paper) 65%, var(--paper-2));
  border-radius: 0 6px 6px 0;
}
.spec-line-accent {
  color: var(--ink);
  font-weight: 600;
}
.spec-line-sub {
  color: var(--ink-2);
  font-size: 0.73rem;
}
.spec-chapter {
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 3px;
}
.spec-h2 {
  color: var(--ink);
  font-weight: 600;
}
.spec-quote {
  color: var(--ink);
  font-style: italic;
}
.spec-meta {
  color: var(--muted);
  font-size: 0.72rem;
}
.spec-note {
  color: var(--ink-2);
}
.spec-drawing {
  color: var(--ink-2);
  font-size: 0.72rem;
}
.spec-wikilink {
  color: var(--accent);
  font-weight: 500;
}
.spec-blockid {
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 5px;
  font-size: 0.68rem;
}

/* MWG css-layout: Subgrid alignment across sibling feature ledger cells + balanced pill rows */
.bento-styles,
.bento-tokens,
.bento-merge,
.index-pills,
.actions {
  flex-wrap: wrap;
  flex-wrap: balance;
}
@media (min-width: 861px) {
  .bento-grid {
    grid-auto-rows: auto;
  }
  .bento-card {
    grid-row: span 4;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    grid-template-rows: subgrid;
    row-gap: 0;
  }
  .bento-card .bento-visual {
    align-self: end;
    width: 100%;
  }
}

@media (max-width: 940px) {
  .specimen-workbench {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}
@media (max-width: 520px) {
  .spec-mode-base,
  .spec-mode-overlay {
    grid-template-columns: repeat(2, minmax(108px, 1fr));
  }
  .spec-mode-btn,
  .spec-mode-pill {
    padding: 7px 12px;
    font-size: 0.74rem;
  }
  .specimen-window-body {
    padding: 13px 14px;
    font-size: 0.72rem;
  }
  .hero-colophon {
    gap: 6px 14px;
    font-size: 0.71rem;
  }
  .hero-colophon li {
    gap: 14px;
  }
}

/* ==========================================================================
   13. Interactive Before/After Split Comparison Slider (Obsidian vs Standard)
   ========================================================================== */
.compare-figure {
  margin: 28px 0 36px;
}
.compare-mat {
  position: relative;
  padding: 12px 14px 14px;
  border-radius: 14px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--hl);
  transition: border-color 180ms cubic-bezier(0.23, 1, 0.32, 1);
}
@media (hover: hover) and (pointer: fine) {
  .compare-mat:hover {
    border-color: color-mix(in oklab, var(--hl) 52%, var(--line));
    border-inline-start-color: var(--hl);
  }
}
.compare-slider {
  --split: 50%;
  position: relative;
  display: grid;
  border-radius: 9px;
  border: 0;
  outline: none;
  background: var(--paper);
  overflow: clip;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.compare-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  outline: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
  outline-offset: -1px;
  pointer-events: none;
  z-index: 5;
}
.compare-pane {
  grid-area: 1 / 1;
  position: relative;
  min-width: 0;
  overflow: clip;
  pointer-events: none;
}
.compare-pane img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  pointer-events: none;
}
.compare-before {
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
}
.compare-after {
  clip-path: inset(0 0 0 var(--split));
}
.compare-slider.is-clicking .compare-before,
.compare-slider.is-clicking .compare-after {
  transition: clip-path 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.compare-slider.is-clicking .compare-divider {
  transition: left 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.compare-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 4px 11px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: normal;
  background: color-mix(in oklab, var(--paper) 90%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  border: 1px solid var(--line);
  pointer-events: none;
  transition: opacity 150ms cubic-bezier(0.23, 1, 0.32, 1);
}
.compare-badge-left {
  left: 12px;
  border-color: color-mix(in oklab, var(--hl) 60%, var(--line));
}
.compare-badge-right {
  right: 12px;
}
.compare-slider[data-edge="start"] .compare-badge-left,
.compare-slider[data-edge="end"] .compare-badge-right {
  opacity: 0;
}
.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 2px;
  background: var(--hl);
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}
.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--hl);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 14, 12, 0.18);
  transition:
    transform 140ms cubic-bezier(0.23, 1, 0.32, 1),
    background-color 140ms ease,
    color 140ms ease;
}
/* Keyboard-only input: pointer events are handled directly by .compare-slider via setPointerCapture */
.compare-range {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
  appearance: none;
  -webkit-appearance: none;
  outline: none !important;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .compare-slider:hover .compare-handle {
    transform: translate(-50%, -50%) scale(1.06);
  }
}
.compare-slider.is-dragging .compare-handle {
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--hl);
  color: var(--hl-ink);
}
.compare-slider:has(.compare-range:focus-visible) .compare-handle {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.compare-figure figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}
@media (max-width: 640px) {
  .compare-handle {
    width: 36px;
    height: 36px;
  }
  .compare-badge {
    top: 8px;
    padding: 3px 8px;
    font-size: 0.66rem;
  }
  .compare-badge-left { left: 8px; }
  .compare-badge-right { right: 8px; }
}

/* ==========================================================================
   14. Editorial Specimen Passe-Partout (.doc-specimen)
   ========================================================================== */
.doc-specimen {
  margin: 28px 0 36px;
}
.doc-specimen-mat {
  position: relative;
  padding: 12px 14px 14px;
  border-radius: 14px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--hl);
  overflow: hidden;
  transition: border-color 180ms cubic-bezier(0.23, 1, 0.32, 1);
}
@supports (overflow-clip-margin: content-box) {
  .doc-specimen-mat {
    overflow: clip;
    overflow-clip-margin: content-box;
  }
}
@media (hover: hover) and (pointer: fine) {
  .doc-specimen-mat:hover {
    border-color: color-mix(in oklab, var(--hl) 52%, var(--line));
    border-inline-start-color: var(--hl);
  }
}
.doc-specimen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 10px;
}
.doc-specimen-label {
  font-family: var(--sans);
  font-size: 0.81rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: normal;
  color: var(--ink-2);
}
.doc-specimen-viewport {
  position: relative;
  border-radius: 9px;
  overflow: clip;
  background: var(--code-bg);
  cursor: zoom-in;
}
.doc-specimen-viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  outline: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
  outline-offset: -1px;
  pointer-events: none;
}
.doc-specimen-viewport:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
  .doc-specimen-viewport {
    transition: transform 150ms cubic-bezier(0.23, 1, 0.32, 1);
  }
  .doc-specimen-viewport:active {
    transform: scale(0.992);
  }
}
.docs .prose .doc-specimen-viewport img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
/* Subtle framing for single highlight block IDs (no hover zoom jump) */
.doc-specimen-zoom-hl {
  max-height: 168px;
}
.docs .prose .doc-specimen-zoom-hl img {
  transform-origin: 65% 36%;
  transform: scale(1.16);
}
@media (prefers-reduced-motion: reduce) {
  .compare-mat,
  .compare-badge,
  .compare-handle,
  .compare-slider.is-clicking .compare-before,
  .compare-slider.is-clicking .compare-after,
  .compare-slider.is-clicking .compare-divider,
  .doc-specimen-mat,
  .guide-zoom-img,
  dialog.guide-lightbox[open] {
    transition: none !important;
    animation: none !important;
  }
}
/* Optional bottom CSS gradient fade for open-ended crops (no image editing needed) */
.doc-specimen.is-fade-bottom .doc-specimen-viewport img {
  mask-image: linear-gradient(to top, transparent, black 3.2rem);
}
.doc-specimen figcaption {
  margin-top: 11px;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}
@media (max-width: 640px) {
  .doc-specimen-mat {
    padding: 10px 10px 12px;
    border-radius: 12px;
  }
  .doc-specimen-head {
    padding-bottom: 8px;
  }
  .doc-specimen-viewport {
    border-radius: 7px;
  }
}







