/* Copperplate — "The Living Manuscript"
   Layout concept: a manuscript on an editor's desk — a reading column with a working margin for editor's notes,
   ruled sheets, proofreader's marks as ornament, and the Copper Cashmere palette as the five swatches of the house. */

:root {
  /* Copper Cashmere palette */
  --copper: #B56B45;
  --walnut: #69493C;
  --sand: #EADBC7;
  --ivory: #FAF7F2;
  --charcoal: #2F2F2F;

  /* Roles (light) */
  --bg: #FAF7F2;
  --paper: #FFFDF9;
  --surface: #F3EADD;
  --surface-2: #EADBC7;
  --ink: #2F2F2F;
  --ink-soft: #5F5049;
  --ink-faint: #8A7A70;
  --rule: #E2D3C1;
  --rule-strong: #CDB79F;
  --accent: #B56B45;
  --accent-text: #985532;
  --accent-btn: #A65E3A;
  --on-accent: #FFFDF9;
  --walnut-ink: #69493C;
  --band-dark: #2F2F2F;
  --band-dark-ink: #FAF7F2;
  --band-dark-soft: #CDBFAF;
  --del: #B4472F;
  --shadow: 0 1px 0 rgba(105, 73, 60, .06), 0 18px 40px -22px rgba(105, 73, 60, .35);
  --shadow-lift: 0 2px 0 rgba(105, 73, 60, .05), 0 30px 60px -28px rgba(105, 73, 60, .45);

  /* Type */
  --f-display: "Bodoni Moda", "Bodoni 72", Didot, "Didot LT STD", "Libre Bodoni", Georgia, serif;
  --f-body: "EB Garamond", Garamond, "Adobe Garamond Pro", "Times New Roman", serif;
  --f-ui: "Jost", Futura, "Century Gothic", "Avenir Next", system-ui, sans-serif;

  --step--1: clamp(.84rem, .82rem + .1vw, .9rem);
  --step-0: clamp(1.12rem, 1.08rem + .2vw, 1.25rem);
  --step-1: clamp(1.3rem, 1.2rem + .45vw, 1.55rem);
  --step-2: clamp(1.6rem, 1.4rem + .9vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 1.8vw, 3rem);
  --step-4: clamp(2.5rem, 1.8rem + 3.2vw, 4.4rem);
  --step-5: clamp(2.9rem, 2rem + 4.4vw, 5.6rem);

  --measure: 66ch;
  --wrap: 1240px;
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-ink: cubic-bezier(.65, 0, .35, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #242120;
    --paper: #2D2A28;
    --surface: #33302D;
    --surface-2: #3D3733;
    --ink: #F4EEE6;
    --ink-soft: #D6C8B8;
    --ink-faint: #A99A8C;
    --rule: #453D37;
    --rule-strong: #5C5149;
    --accent: #D08A63;
    --accent-text: #E09C76;
    --accent-btn: #B56B45;
    --on-accent: #FFFDF9;
    --walnut-ink: #E2C9B6;
    --band-dark: #1A1817;
    --band-dark-ink: #F4EEE6;
    --band-dark-soft: #BFAF9F;
    --del: #E07A62;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 18px 40px -22px rgba(0, 0, 0, .7);
    --shadow-lift: 0 2px 0 rgba(0, 0, 0, .3), 0 30px 60px -28px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #242120;
  --paper: #2D2A28;
  --surface: #33302D;
  --surface-2: #3D3733;
  --ink: #F4EEE6;
  --ink-soft: #D6C8B8;
  --ink-faint: #A99A8C;
  --rule: #453D37;
  --rule-strong: #5C5149;
  --accent: #D08A63;
  --accent-text: #E09C76;
  --accent-btn: #B56B45;
  --on-accent: #FFFDF9;
  --walnut-ink: #E2C9B6;
  --band-dark: #1A1817;
  --band-dark-ink: #F4EEE6;
  --band-dark-soft: #BFAF9F;
  --del: #E07A62;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 18px 40px -22px rgba(0, 0, 0, .7);
  --shadow-lift: 0 2px 0 rgba(0, 0, 0, .3), 0 30px 60px -28px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------- Page turn between documents (cross-document View Transitions) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: aq-sheet-out .5s var(--ease-ink) both; }
::view-transition-new(root) { animation: aq-sheet-in .75s var(--ease) both; }
::view-transition-group(masthead) { animation-duration: .5s; }
@keyframes aq-sheet-out {
  to { opacity: 0; transform: translateY(-1.5%) scale(.985); filter: blur(2px); }
}
@keyframes aq-sheet-in {
  from { clip-path: inset(100% 0 0 0); transform: translateY(24px); }
  to { clip-path: inset(0 0 0 0); transform: none; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
/* paper grain */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] body::after { mix-blend-mode: screen; opacity: .035; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::after { mix-blend-mode: screen; opacity: .035; } }

img, svg { max-width: 100%; height: auto; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); transition: color .2s, text-decoration-color .2s; }
a:hover { color: var(--ink); text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }
::selection { background: color-mix(in srgb, var(--copper) 28%, transparent); color: var(--ink); }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 500; line-height: 1.08; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
h1 { font-size: var(--step-5); font-weight: 450; letter-spacing: -.02em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.25; }
em, i { font-style: italic; }
strong { font-weight: 600; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--paper); padding: .6rem 1rem; font-family: var(--f-ui); }
.skip:focus { left: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * 32px);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px), 3vw);
  padding-right: max(16px, env(safe-area-inset-right, 0px), 3vw);
}
@media (min-width: 1300px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }

/* ---------- Small type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .9em;
  font-family: var(--f-ui); font-size: .74rem; font-weight: 500; letter-spacing: .32em; text-transform: uppercase;
  color: var(--accent-text);
}
.eyebrow::before, .eyebrow.ruled::after { content: ""; width: 2.4em; height: 1px; background: currentColor; opacity: .6; }
.eyebrow.plain::before { display: none; }
.label { font-family: var(--f-ui); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-faint); }
.lede { font-size: clamp(1.2rem, 1.1rem + .5vw, 1.5rem); line-height: 1.5; color: var(--ink-soft); max-width: 40ch; }
.num { font-family: var(--f-ui); font-variant-numeric: tabular-nums; }

/* Ornamental rule with diamond, after the palette card */
.orn { display: flex; align-items: center; gap: 10px; color: var(--accent); }
.orn::before, .orn::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .55; }
.orn i { width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); display: block; }
.orn.short { width: 120px; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--accent-btn);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .7em;
  min-height: 52px; padding: .85rem 1.6rem;
  font-family: var(--f-ui); font-size: .82rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: var(--on-accent); background: var(--b); border: 1px solid var(--b); border-radius: var(--radius);
  text-decoration: none; cursor: pointer; transition: color .35s var(--ease), border-color .35s, transform .35s var(--ease);
}
.btn::before { /* ink fill sweeps across on hover */
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--walnut);
  transform: scaleX(0); transform-origin: right; transition: transform .55s var(--ease-ink);
}
.btn:hover { color: var(--on-accent); border-color: var(--walnut); }
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn.ghost { color: var(--ink); background: transparent; border-color: var(--rule-strong); }
.btn.ghost::before { background: var(--ink); }
.btn.ghost:hover { color: var(--bg); border-color: var(--ink); }
.btn.small { min-height: 42px; padding: .55rem 1.1rem; font-size: .74rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.textlink { font-family: var(--f-ui); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--ink); display: inline-flex; gap: .6em; align-items: center; }
.textlink::after { content: "→"; color: var(--accent); transition: transform .3s var(--ease); }
.textlink:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.masthead {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(14px); backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
  view-transition-name: masthead;
}
.masthead.scrolled { border-bottom-color: var(--rule); }
.masthead .bar { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; align-items: baseline; gap: 2px; text-decoration: none; color: var(--ink); font-family: var(--f-display); font-size: 1.7rem; font-weight: 500; letter-spacing: -.01em; line-height: 1; }
.brand .q { color: var(--accent); font-style: italic; font-weight: 500; position: relative; }
.brand .q::after { content: ""; position: absolute; right: -11px; bottom: .2em; width: 5px; height: 5px; background: var(--accent); transform: rotate(45deg); }
.brand { margin-right: 12px; }
.brand small { display: block; font-family: var(--f-ui); font-size: .55rem; letter-spacing: .38em; text-transform: uppercase; color: var(--ink-faint); margin-top: 6px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > a:not(.btn), .nav > .has-menu > button {
  font-family: var(--f-ui); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 450;
  color: var(--ink); text-decoration: none; background: none; border: 0; padding: .7rem .8rem; cursor: pointer; position: relative;
}
.nav > a:not(.btn)::after, .nav > .has-menu > button::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .45rem; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease-ink);
}
.nav > a:hover::after, .nav > a[aria-current="page"]::after, .nav > .has-menu:hover > button::after, .nav > .has-menu > button[aria-expanded="true"]::after { transform: scaleX(1); }
.nav .btn { margin-left: 12px; }
.has-menu { position: relative; }
.mega {
  position: absolute; top: calc(100% + 8px); left: 50%; translate: -50% 0; width: min(980px, 92vw);
  background: var(--paper); border: 1px solid var(--rule); box-shadow: var(--shadow-lift); padding: 28px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .25s, transform .35s var(--ease), visibility 0s .3s;
}
.has-menu:hover .mega, .has-menu:focus-within .mega, .has-menu.open .mega { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .35s var(--ease); }
.mega h4 { font-family: var(--f-ui); font-size: .68rem; letter-spacing: .26em; text-transform: uppercase; color: var(--accent-text); font-weight: 500; padding-bottom: 10px; border-bottom: 1px solid var(--rule); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.mega h4 .sw { width: 10px; height: 10px; border: 1px solid var(--rule-strong); }
.mega a { display: block; padding: .32rem 0; font-size: 1.05rem; text-decoration: none; color: var(--ink); line-height: 1.3; }
.mega a:hover { color: var(--accent-text); }
.mega .all { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--rule-strong); min-height: 44px; padding: 0 14px; font-family: var(--f-ui); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink); cursor: pointer; }
.read-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  .read-progress { animation: aq-grow linear both; animation-timeline: scroll(root); }
}
@keyframes aq-grow { to { transform: scaleX(1); } }

@media (max-width: 1180px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 10px; }
}
.drawer {
  position: fixed; inset: 0; z-index: 80; background: var(--bg); overflow-y: auto;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) max(20px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 28px) max(20px, env(safe-area-inset-left, 0px));
  clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .6s var(--ease-ink), visibility 0s .6s;
}
.drawer.open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .6s var(--ease-ink); }
.drawer .top { display: flex; justify-content: space-between; align-items: center; min-height: 58px; }
.drawer nav { display: grid; gap: 4px; margin-top: 24px; }
.drawer nav > a { font-family: var(--f-display); font-size: clamp(2rem, 8vw, 2.8rem); color: var(--ink); text-decoration: none; line-height: 1.15; padding: .2rem 0; border-bottom: 1px solid var(--rule); }
.drawer details { border-bottom: 1px solid var(--rule); }
.drawer summary { font-family: var(--f-display); font-size: clamp(2rem, 8vw, 2.8rem); list-style: none; cursor: pointer; padding: .2rem 0; display: flex; justify-content: space-between; align-items: center; }
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary::after { content: "+"; font-family: var(--f-ui); font-weight: 300; color: var(--accent); }
.drawer details[open] summary::after { content: "–"; }
.drawer details .grp { padding: 4px 0 18px; display: grid; gap: 2px; }
.drawer details .grp p { font-family: var(--f-ui); font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-text); margin-top: 12px; }
.drawer details .grp a { color: var(--ink); text-decoration: none; font-size: 1.15rem; padding: .25rem 0; }
.drawer .btn { margin-top: 28px; width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .drawer.open nav > * { animation: aq-rise .7s var(--ease) both; }
  .drawer.open nav > *:nth-child(2) { animation-delay: .06s; } .drawer.open nav > *:nth-child(3) { animation-delay: .12s; }
  .drawer.open nav > *:nth-child(4) { animation-delay: .18s; } .drawer.open nav > *:nth-child(5) { animation-delay: .24s; }
  .drawer.open nav > *:nth-child(6) { animation-delay: .3s; }
}
@keyframes aq-rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 128px); }
.section.tight { padding-block: clamp(48px, 6vw, 80px); }
.section-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head p { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.45; }
.band-sand { background: var(--surface); }
.band-dark { background: var(--band-dark); color: var(--band-dark-ink); }
.band-dark h2, .band-dark h3 { color: var(--band-dark-ink); }
.band-dark .eyebrow { color: #E2A07C; }
.band-dark p { color: var(--band-dark-soft); }

/* reveal on scroll — content is visible at rest; motion only where scroll-driven animation is supported */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .rv { animation: aq-reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    .rule-draw { animation: aq-grow-x linear both; animation-timeline: view(); animation-range: entry 10% cover 35%; transform-origin: left; }
  }
}
@keyframes aq-reveal { from { transform: translateY(36px); } }
@keyframes aq-grow-x { from { transform: scaleX(0); } }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(36px, 5vw, 72px) clamp(56px, 7vw, 104px); position: relative; }
.hero .grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.12fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero .copy { display: grid; gap: 26px; min-width: 0; }
.hero h1 { font-size: clamp(2.8rem, 1.9rem + 3.4vw, 4.9rem); }
.hero h1 .it { font-style: italic; color: var(--accent); }
.hero .standards { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 18px; border-top: 1px solid var(--rule); font-family: var(--f-ui); font-size: .78rem; letter-spacing: .06em; color: var(--ink-soft); }
.hero .standards span { display: inline-flex; gap: 8px; align-items: center; }
.hero .standards span::before { content: ""; width: 5px; height: 5px; background: var(--accent); transform: rotate(45deg); }
.sprig { position: absolute; width: 120px; color: var(--accent); opacity: .55; pointer-events: none; }
@media (max-width: 960px) {
  .hero .grid { grid-template-columns: minmax(0, 1fr); }
  .sprig { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero .copy > * { animation: aq-ink-in 1s var(--ease) both; }
  .hero .copy > *:nth-child(2) { animation-delay: .08s; } .hero .copy > *:nth-child(3) { animation-delay: .16s; }
  .hero .copy > *:nth-child(4) { animation-delay: .24s; } .hero .copy > *:nth-child(5) { animation-delay: .32s; }
}
@keyframes aq-ink-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); letter-spacing: .01em; } }

.page-hero { padding-block: clamp(28px, 4vw, 56px) clamp(40px, 5vw, 72px); }
.page-hero .grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.page-hero .copy { display: grid; gap: 22px; min-width: 0; align-content: start; }
.page-hero h1 { font-size: var(--step-4); }
.page-hero .points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-family: var(--f-ui); font-size: .95rem; letter-spacing: .02em; color: var(--ink-soft); }
.page-hero .points li { display: flex; gap: 12px; align-items: baseline; }
.page-hero .points li::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg) translateY(-2px); }
@media (max-width: 960px) { .page-hero .grid { grid-template-columns: minmax(0, 1fr); } }

.crumbs { font-family: var(--f-ui); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 22px; }
.crumbs a { color: var(--ink-faint); text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); }
.crumbs span[aria-hidden] { color: var(--accent); }

/* ---------- The manuscript (live edit) ---------- */
.manuscript {
  position: relative; background: var(--paper); border: 1px solid var(--rule); box-shadow: var(--shadow-lift);
  padding: 22px 22px 18px 0; min-width: 0; margin: 0;
}
.manuscript::before { /* torn-top stack effect */
  content: ""; position: absolute; inset: 10px -10px -10px 10px; z-index: -1; background: var(--surface); border: 1px solid var(--rule);
}
.ms-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 0 0 14px 56px; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.ms-head .label { color: var(--ink-faint); }
.ms-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ms-chips button, .ms-toggle button {
  font-family: var(--f-ui); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; background: none; color: var(--ink-soft);
  border: 1px solid var(--rule); padding: .4rem .65rem; cursor: pointer; border-radius: 1px; min-height: 32px;
}
.ms-chips button[aria-pressed="true"], .ms-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ms-body { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 190px); gap: 0 12px; padding-top: 16px; }
.ms-lines { font-family: var(--f-ui); font-size: .66rem; color: var(--ink-faint); text-align: right; line-height: 2.05; padding-top: .15em; user-select: none; font-variant-numeric: tabular-nums; }
.ms-text {
  font-family: var(--f-body); font-size: 1.12rem; line-height: 2.05; color: var(--ink);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.05em - 1px), color-mix(in srgb, var(--rule) 70%, transparent) calc(2.05em - 1px), color-mix(in srgb, var(--rule) 70%, transparent) 2.05em);
  min-height: 12.3em; position: relative;
}
.ms-text del { text-decoration: none; position: relative; color: inherit; transition: color .4s; }
.ms-text del::after { content: ""; position: absolute; left: -1px; right: -1px; top: 55%; height: 1.5px; background: var(--del); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease-ink); }
.ms-text del.on { color: color-mix(in srgb, var(--del) 70%, var(--ink)); }
.ms-text del.on::after { transform: scaleX(1); }
.ms-text ins { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; color: var(--accent-text); }
.ms-text .mk { display: inline-block; width: 1.25em; height: 1.25em; line-height: 1.25em; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-family: var(--f-ui); font-size: .62rem; text-align: center; vertical-align: super; margin-left: 2px; transform: scale(0); transition: transform .35s var(--ease); }
.ms-text .mk.on { transform: scale(1); }
.ms-text .caret { display: inline-block; width: 2px; height: 1.1em; background: var(--accent); vertical-align: -.15em; margin-left: 1px; animation: aq-blink 1s steps(1) infinite; }
@keyframes aq-blink { 50% { opacity: 0; } }
.ms-text.clean del, .ms-text.clean .mk { display: none; }
.ms-text.clean ins { text-decoration: none; color: inherit; }
.ms-notes { display: grid; gap: 10px; align-content: start; position: relative; }
.ms-note {
  font-family: var(--f-ui); font-size: .76rem; line-height: 1.45; color: var(--ink-soft);
  background: color-mix(in srgb, var(--sand) 55%, var(--paper)); border-left: 2px solid var(--accent); padding: .55rem .65rem .6rem;
  opacity: 0; transform: translateX(10px); transition: opacity .45s, transform .45s var(--ease);
}
.ms-note b { color: var(--accent-text); font-weight: 600; margin-right: 4px; }
.ms-note.on { opacity: 1; transform: none; }
.ms-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0 0 56px; margin-top: 10px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.ms-toggle { display: inline-flex; }
.ms-toggle button + button { border-left: 0; }
.ms-foot .tally { font-family: var(--f-ui); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
@media (max-width: 640px) {
  .manuscript { padding-right: 14px; }
  .ms-body { grid-template-columns: 26px minmax(0, 1fr); }
  .ms-head, .ms-foot { padding-left: 38px; }
  .ms-notes { grid-column: 2; margin-top: 12px; }
  .ms-text { font-size: 1.02rem; }
}
:root[data-theme="dark"] .ms-note { background: var(--surface-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ms-note { background: var(--surface-2); } }

/* ---------- Swatch columns (service families) ---------- */
.swatches { display: flex; gap: 14px; min-height: 520px; }
.swatch {
  --sw: var(--copper); --sw-ink: #FFFDF9;
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule); transition: flex-grow .7s var(--ease-ink), box-shadow .4s, transform .4s var(--ease);
}
.swatch .chip { flex: 1; background: var(--sw); color: var(--sw-ink); padding: 26px 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; position: relative; overflow: hidden; }
.swatch .chip .count { font-family: var(--f-ui); font-size: .7rem; letter-spacing: .28em; text-transform: uppercase; opacity: .85; }
.swatch .chip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 1.08rem; opacity: 0; transform: translateY(10px); transition: opacity .4s .1s, transform .5s var(--ease); }
.swatch .chip ul li { display: flex; gap: 10px; align-items: baseline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swatch .chip ul li::before { content: ""; width: 5px; height: 5px; flex: none; background: currentColor; transform: rotate(45deg) translateY(-2px); opacity: .7; }
.swatch .name { padding: 22px 18px 20px; text-align: center; display: grid; gap: 12px; justify-items: center; background: var(--paper); }
.swatch .name strong { font-family: var(--f-display); font-weight: 500; font-size: 1.4rem; line-height: 1.15; }
.swatch .name .orn { width: 110px; }
.swatch .name .code { font-family: var(--f-ui); font-size: .78rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft); }
.swatch:hover, .swatch:focus-visible, .swatch.is-open { flex-grow: 2.3; box-shadow: var(--shadow-lift); }
.swatch:hover .chip ul, .swatch:focus-visible .chip ul, .swatch.is-open .chip ul { opacity: 1; transform: none; }
.swatch.copper { --sw: #B56B45; --sw-ink: #FFFDF9; }
.swatch.walnut { --sw: #69493C; --sw-ink: #FAF7F2; }
.swatch.sand { --sw: #EADBC7; --sw-ink: #3B2D27; }
.swatch.ivory { --sw: #FAF7F2; --sw-ink: #3B2D27; }
.swatch.ivory .chip { border-bottom: 1px solid var(--rule); }
.swatch.charcoal { --sw: #2F2F2F; --sw-ink: #FAF7F2; }
@media (max-width: 900px) {
  .swatches { flex-direction: column; min-height: 0; }
  .swatch { flex-direction: row; }
  .swatch .chip { flex: 0 0 42%; min-height: 150px; }
  .swatch .chip ul { opacity: 1; transform: none; font-size: .98rem; }
  .swatch .name { flex: 1; align-content: center; }
  .swatch:hover, .swatch.is-open { flex-grow: 1; }
}
@media (max-width: 560px) {
  .swatch { flex-direction: column; }
  .swatch .chip { flex: auto; }
}

/* ---------- Stage finder ---------- */
.stages { display: grid; gap: 36px; }
.stage-track { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding-top: 6px; }
.stage-track::before { content: ""; position: absolute; left: 4%; right: 4%; top: 27px; height: 1px; background: var(--rule-strong); }
.stage-track .fill { position: absolute; left: 4%; top: 27px; height: 2px; background: var(--accent); width: var(--fill, 0%); transition: width .7s var(--ease-ink); }
.stage-btn { position: relative; background: none; border: 0; cursor: pointer; display: grid; justify-items: center; gap: 12px; padding: 0 2px; color: var(--ink-soft); font-family: var(--f-ui); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
.stage-btn .dot { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule-strong); background: var(--bg); display: grid; place-items: center; font-family: var(--f-display); font-size: 1.1rem; letter-spacing: 0; text-transform: none; color: var(--ink); transition: background .4s, color .4s, border-color .4s, transform .4s var(--ease); position: relative; z-index: 1; }
.stage-btn:hover .dot { transform: translateY(-3px); }
.stage-btn[aria-selected="true"] { color: var(--ink); }
.stage-btn[aria-selected="true"] .dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.stage-panel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); background: var(--paper); border: 1px solid var(--rule); padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.stage-panel h3 { font-size: var(--step-2); margin: 10px 0 14px; }
.stage-panel p { color: var(--ink-soft); }
.stage-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.stage-panel li a { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: .8rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); font-size: 1.12rem; }
.stage-panel li a span { font-family: var(--f-ui); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-text); white-space: nowrap; }
.stage-panel li a:hover { color: var(--accent-text); }
@media (prefers-reduced-motion: no-preference) { .stage-panel.swap { animation: aq-rise .55s var(--ease); } }
@media (max-width: 820px) {
  .stage-track { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .stage-track::before, .stage-track .fill { display: none; }
  .stage-panel { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; border-top: 1px solid var(--rule-strong); }
.process li { list-style: none; padding: 28px 24px 8px 0; position: relative; display: grid; gap: 12px; align-content: start; }
.process li::before { counter-increment: step; content: counter(step, upper-roman); font-family: var(--f-display); font-style: italic; font-size: 2.6rem; color: var(--accent); line-height: 1; }
.process li::after { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); }
.process h3 { font-size: 1.45rem; }
.process p { color: var(--ink-soft); font-size: 1.05rem; }
.process { padding-left: 0; margin: 0 0 48px; }
@media (max-width: 860px) { .process { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; } }
@media (max-width: 520px) { .process { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Guide cards (Reading Room) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule-strong); }
.card { display: grid; gap: 14px; align-content: start; padding: 28px 28px 32px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); position: relative; min-width: 0; }
.cards .card:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid var(--rule); }
.card .meta { display: flex; justify-content: space-between; gap: 12px; font-family: var(--f-ui); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-text); }
.card .meta span:last-child { color: var(--ink-faint); }
.card h3 { font-size: 1.6rem; line-height: 1.15; transition: color .3s; }
.card p { color: var(--ink-soft); font-size: 1.05rem; }
.card .go { font-family: var(--f-ui); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); display: inline-flex; gap: 8px; }
.card .go::after { content: "→"; color: var(--accent); transition: transform .3s var(--ease); }
.card:hover h3 { color: var(--accent-text); }
.card:hover .go::after { transform: translateX(5px); }
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards .card:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .cards .card:nth-child(2n) { padding-left: 24px; border-left: 1px solid var(--rule); }
}
@media (max-width: 600px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .cards .card:nth-child(2n) { padding-left: 0; border-left: 0; }
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button { font-family: var(--f-ui); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; background: none; border: 1px solid var(--rule-strong); color: var(--ink-soft); padding: .55rem .9rem; cursor: pointer; min-height: 40px; }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- Standards (dark band) ---------- */
.marks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(250, 247, 242, .16); }
.marks li { list-style: none; padding: 28px 28px 30px 0; border-bottom: 1px solid rgba(250, 247, 242, .12); display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 16px; align-content: start; }
.marks li:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid rgba(250, 247, 242, .12); }
.marks .glyph { grid-row: span 2; font-family: var(--f-display); font-size: 2.2rem; line-height: 1; color: #E2A07C; }
.marks h3 { font-size: 1.3rem; }
.marks p { font-size: 1.02rem; }
.marks { padding: 0; margin: 0; }
@media (max-width: 900px) {
  .marks { grid-template-columns: minmax(0, 1fr); }
  .marks li:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
}

/* ---------- Quote calculator ---------- */
.quote { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 0; border: 1px solid var(--rule-strong); background: var(--paper); box-shadow: var(--shadow); }
.quote .controls { padding: clamp(24px, 4vw, 40px); display: grid; gap: 26px; }
.quote .result { padding: clamp(24px, 4vw, 40px); background: var(--walnut); color: #FAF7F2; display: grid; gap: 18px; align-content: space-between; position: relative; overflow: hidden; }
.quote .result::after { content: "C"; position: absolute; right: -10px; bottom: -70px; font-family: var(--f-display); font-style: italic; font-size: 16rem; line-height: 1; color: rgba(250, 247, 242, .07); pointer-events: none; }
.quote .result .label { color: #E2C9B6; }
.quote .price { font-family: var(--f-display); font-size: clamp(3rem, 2.2rem + 3vw, 4.6rem); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.quote .price small { font-family: var(--f-ui); font-size: .9rem; letter-spacing: .1em; vertical-align: top; margin-right: 4px; }
.quote .result p { color: #E9DCCF; font-size: 1rem; }
.quote .result .btn { --b: #FAF7F2; color: #2F2F2F; }
.quote .result .btn::before { background: var(--copper); }
.quote .result .btn:hover { color: #FFFDF9; }
.field { display: grid; gap: 10px; }
.field > label, .field > .legend { font-family: var(--f-ui); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { flex: 1 1 auto; font-family: var(--f-ui); font-size: .78rem; letter-spacing: .06em; background: none; border: 1px solid var(--rule-strong); color: var(--ink); padding: .65rem .8rem; cursor: pointer; min-height: 44px; text-align: center; }
.seg button small { display: block; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-top: 2px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg button[aria-pressed="true"] small { color: var(--sand); }
.words { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 16px; align-items: center; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--accent) var(--pct, 30%), var(--rule-strong) var(--pct, 30%)); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--rule-strong); }
input[type="range"]::-moz-range-progress { height: 2px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; background: var(--paper); border: 2px solid var(--accent); transform: rotate(45deg); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; background: var(--paper); border: 2px solid var(--accent); border-radius: 0; transform: rotate(45deg); }
.input, input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; min-height: 50px; font: inherit; font-size: 1.08rem; color: var(--ink); background: var(--bg);
  border: 1px solid var(--rule-strong); border-radius: 1px; padding: .7rem .85rem; transition: border-color .25s, box-shadow .25s;
}
textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.words input[type="number"] { font-family: var(--f-ui); font-variant-numeric: tabular-nums; text-align: right; }
.fineprint { font-family: var(--f-ui); font-size: .76rem; line-height: 1.5; color: var(--ink-faint); letter-spacing: .02em; }
@media (max-width: 820px) { .quote { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Article (guides & service bodies) ---------- */
.doc { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, var(--measure)) minmax(0, 230px); gap: clamp(24px, 3.5vw, 56px); justify-content: center; align-items: start; }
.doc.no-toc { grid-template-columns: minmax(0, var(--measure)) minmax(0, 250px); }
.toc { position: sticky; top: 110px; font-family: var(--f-ui); font-size: .82rem; max-height: calc(100vh - 140px); overflow: auto; padding-right: 6px; }
.toc p { font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc a { display: block; padding: .42rem 0 .42rem 14px; color: var(--ink-soft); text-decoration: none; line-height: 1.35; position: relative; margin-left: -1px; border-left: 1px solid transparent; transition: color .25s, border-color .25s; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-left-color: var(--accent); }
.prose { min-width: 0; }
.prose > section { position: relative; padding-bottom: 8px; }
.prose > section + section { margin-top: 56px; }
.prose h2 { font-size: var(--step-2); margin-bottom: 22px; position: relative; }
.prose h2 .pil { position: absolute; left: -1.1em; top: .05em; font-family: var(--f-body); font-size: .8em; color: var(--accent); text-decoration: none; opacity: 0; transition: opacity .25s; }
.prose h2:hover .pil, .prose h2 .pil:focus { opacity: 1; }
.prose h3 { font-size: 1.38rem; margin: 30px 0 12px; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table, .prose .example, .prose .callout { margin: 0 0 1.05em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; padding-left: .2em; }
.prose ul li::marker { content: "◆  "; color: var(--accent); font-size: .55em; }
.prose ol li::marker { font-family: var(--f-ui); font-size: .85em; color: var(--accent-text); }
.prose strong { color: var(--ink); }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .82em; background: var(--surface); padding: .1em .35em; border-radius: 2px; }
.prose blockquote { border-left: 2px solid var(--accent); padding: .2em 0 .2em 1.1em; font-style: italic; color: var(--ink-soft); }
.prose .table-wrap { overflow-x: auto; margin: 0 0 1.3em; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.prose table { width: 100%; border-collapse: collapse; font-size: .98rem; margin: 0; min-width: 520px; }
.prose th { text-align: left; font-family: var(--f-ui); font-weight: 500; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); padding: .7rem .8rem; border-bottom: 1px solid var(--ink); vertical-align: bottom; }
.prose td { padding: .65rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; line-height: 1.45; }
.prose tr:last-child td { border-bottom: 0; }
.prose .example { background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--accent); padding: 18px 20px 6px; }
.prose .example .example-label { font-family: var(--f-ui); font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 10px; }
.prose .callout { background: var(--surface); padding: 18px 20px 4px 54px; position: relative; }
.prose .callout::before { content: "⁁"; position: absolute; left: 18px; top: 8px; font-family: var(--f-display); font-size: 2.1rem; color: var(--accent); line-height: 1; }
.margin { min-width: 0; position: relative; }
.mnote { position: absolute; left: 0; right: 0; font-family: var(--f-display); font-style: italic; font-size: 1rem; line-height: 1.45; color: var(--walnut-ink); padding-left: 16px; border-left: 1px solid var(--accent); }
.mnote::before { content: "⁁ Editor's note"; display: block; font-family: var(--f-ui); font-style: normal; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 6px; }
.inline-note { display: none; }
@media (max-width: 1180px) {
  .doc { grid-template-columns: minmax(0, 210px) minmax(0, var(--measure)); }
  .doc .margin { display: none; }
  .doc.no-toc { grid-template-columns: minmax(0, var(--measure)); }
  .inline-note { display: block; font-family: var(--f-display); font-style: italic; color: var(--walnut-ink); border-left: 1px solid var(--accent); padding-left: 14px; margin: 0 0 1.2em; }
  .inline-note::before { content: "⁁ Editor's note"; display: block; font-family: var(--f-ui); font-style: normal; font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 4px; }
}
@media (max-width: 860px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; border: 1px solid var(--rule); padding: 18px; background: var(--paper); }
}
.doc-head { display: grid; gap: 22px; max-width: 920px; }
.doc-head .meta-row { display: flex; flex-wrap: wrap; gap: 6px 24px; font-family: var(--f-ui); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.doc-head .meta-row span { display: inline-flex; gap: 8px; align-items: center; }
.takeaways { background: var(--paper); border: 1px solid var(--rule); padding: 24px 26px 18px; margin-bottom: 44px; box-shadow: var(--shadow); }
.takeaways p.label { color: var(--accent-text); margin-bottom: 12px; }
.takeaways ul { margin: 0; padding-left: 1.2em; }
.takeaways li { margin-bottom: .5em; }
.takeaways li::marker { content: "◆  "; color: var(--accent); font-size: .55em; }
.template { background: var(--charcoal); color: #F4EEE6; margin: 44px 0; border: 1px solid var(--charcoal); }
.template .t-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid rgba(250, 247, 242, .14); }
.template .t-head span { font-family: var(--f-ui); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: #E2A07C; }
.template pre { margin: 0; padding: 20px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .86rem; line-height: 1.65; white-space: pre-wrap; overflow-x: auto; color: #F4EEE6; }
.copy-btn { font-family: var(--f-ui); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; background: none; color: #F4EEE6; border: 1px solid rgba(250, 247, 242, .3); padding: .45rem .8rem; cursor: pointer; min-height: 36px; }
.copy-btn:hover { border-color: #E2A07C; color: #E2A07C; }
.cta-inline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: center; margin: 44px 0; padding: 26px 28px; background: var(--surface); border-top: 2px solid var(--accent); }
.cta-inline p { font-family: var(--f-display); font-size: 1.35rem; line-height: 1.3; }
.cta-inline .label { margin-bottom: 6px; color: var(--accent-text); font-family: var(--f-ui); font-size: .68rem; }
@media (max-width: 600px) { .cta-inline { grid-template-columns: minmax(0, 1fr); } }
.sources { font-size: 1rem; }
.sources ol { padding-left: 1.4em; }
.sources li { margin-bottom: .4em; color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--rule-strong); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 16px; align-items: center; padding: 1.15rem 0; font-family: var(--f-display); font-size: 1.32rem; line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 12px; height: 12px; justify-self: end; border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(45deg) translate(-3px, -3px); transition: transform .35s var(--ease); }
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq .ans { padding: 0 44px 1.3rem 0; color: var(--ink-soft); max-width: 70ch; }
.faq .ans p + p { margin-top: .7em; }
@media (prefers-reduced-motion: no-preference) { .faq details[open] .ans { animation: aq-rise .45s var(--ease); } }

/* ---------- Service extras ---------- */
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule-strong); background: var(--paper); }
.two-up > div { padding: clamp(24px, 3.5vw, 40px); display: grid; gap: 16px; align-content: start; }
.two-up > div + div { border-left: 1px solid var(--rule); }
.two-up h2 { font-size: var(--step-2); }
.two-up ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.two-up li { padding: .7rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; }
.two-up li::before { content: "✓"; font-family: var(--f-ui); color: var(--accent); }
.two-up .who li::before { content: "◆"; font-size: .6rem; padding-top: .55em; }
@media (max-width: 760px) { .two-up { grid-template-columns: minmax(0, 1fr); } .two-up > div + div { border-left: 0; border-top: 1px solid var(--rule); } }
.related { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 64px); }
.related h2 { font-size: var(--step-2); margin-bottom: 18px; }
.related ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.related li a { display: flex; justify-content: space-between; gap: 16px; padding: .95rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); font-size: 1.18rem; align-items: baseline; }
.related li a::after { content: "→"; color: var(--accent); font-family: var(--f-ui); transition: transform .3s var(--ease); }
.related li a:hover { color: var(--accent-text); }
.related li a:hover::after { transform: translateX(5px); }
@media (max-width: 760px) { .related { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Services hub list ---------- */
.family { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); padding-block: 48px; border-top: 1px solid var(--rule-strong); }
.family .fam-head { display: grid; gap: 14px; align-content: start; position: sticky; top: 110px; }
.family .fam-head .sw { width: 100%; max-width: 220px; aspect-ratio: 5 / 3; border: 1px solid var(--rule); }
.family .fam-head h2 { font-size: var(--step-2); }
.family .fam-head p { color: var(--ink-soft); font-size: 1.05rem; }
.svc-list { list-style: none; margin: 0; padding: 0; }
.svc-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.svc-list a strong { font-family: var(--f-display); font-weight: 500; font-size: 1.6rem; line-height: 1.2; transition: color .3s; }
.svc-list a span { grid-column: 1; color: var(--ink-soft); font-size: 1.05rem; }
.svc-list a::after { content: "→"; grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--accent); font-family: var(--f-ui); font-size: 1.2rem; transition: transform .3s var(--ease); }
.svc-list a:hover strong { color: var(--accent-text); }
.svc-list a:hover::after { transform: translateX(6px); }
@media (max-width: 860px) { .family { grid-template-columns: minmax(0, 1fr); } .family .fam-head { position: static; } }

/* ---------- Pricing ---------- */
.rate-table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.rate-wrap { overflow-x: auto; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.rate-table th { font-family: var(--f-ui); font-weight: 500; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; text-align: left; color: var(--ink-soft); padding: .9rem .9rem; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.rate-table td { padding: 1rem .9rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.rate-table td:not(:first-child) { font-family: var(--f-ui); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rate-table td:first-child strong { font-family: var(--f-display); font-weight: 500; font-size: 1.25rem; display: block; }
.rate-table td:first-child span { color: var(--ink-soft); font-size: .98rem; }
.rate-table { min-width: 640px; }

/* ---------- Contact form ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.form { display: grid; gap: 20px; background: var(--paper); border: 1px solid var(--rule); padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); }
.form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form .check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 1rem; color: var(--ink-soft); }
.form .check input { width: 20px; height: 20px; accent-color: var(--copper); margin-top: 3px; }
.form .hp { position: absolute; left: -5000px; }
.form-status { font-family: var(--f-ui); font-size: .9rem; padding: 14px 16px; border-left: 2px solid var(--accent); background: var(--surface); }
.direct { display: grid; gap: 22px; }
.direct .item { border-top: 1px solid var(--rule-strong); padding-top: 18px; display: grid; gap: 8px; }
.direct .item strong { font-family: var(--f-display); font-weight: 500; font-size: 1.4rem; }
.direct .item .sel { font-family: var(--f-ui); font-size: 1.05rem; user-select: all; color: var(--ink); }
.copy-small { font-family: var(--f-ui); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; background: none; border: 1px solid var(--rule-strong); color: var(--ink-soft); padding: .35rem .6rem; cursor: pointer; justify-self: start; min-height: 32px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } .form .row { grid-template-columns: minmax(0, 1fr); } }
.thanks { text-align: center; display: grid; gap: 16px; justify-items: center; padding: 30px 10px; }
.thanks .seal { width: 92px; height: 92px; border-radius: 50%; border: 1px solid var(--accent); display: grid; place-items: center; font-family: var(--f-display); font-style: italic; font-size: 2.6rem; color: var(--accent); position: relative; }
.thanks .seal::after { content: ""; position: absolute; inset: 6px; border: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) { .thanks .seal { animation: aq-stamp .7s var(--ease) both; } }
@keyframes aq-stamp { from { transform: scale(1.6) rotate(-12deg); opacity: 0; } 60% { transform: scale(.94) rotate(2deg); opacity: 1; } }

/* ---------- Closing CTA ---------- */
.closing { text-align: center; display: grid; gap: 22px; justify-items: center; }
.closing h2 { font-size: var(--step-4); max-width: 18ch; }
.closing h2 em { color: var(--accent); }
.closing p { color: var(--ink-soft); max-width: 52ch; font-size: var(--step-1); line-height: 1.45; }
.band-dark .closing p { color: var(--band-dark-soft); }
.band-dark .btn.ghost { color: var(--band-dark-ink); border-color: rgba(250, 247, 242, .35); }
.band-dark .btn.ghost::before { background: var(--band-dark-ink); }
.band-dark .btn.ghost:hover { color: var(--band-dark); }

/* ---------- Footer ---------- */
.footer { background: var(--band-dark); color: var(--band-dark-soft); padding-block: 80px calc(36px + env(safe-area-inset-bottom, 0px)); font-size: 1rem; }
.footer .top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 36px; padding-bottom: 48px; border-bottom: 1px solid rgba(250, 247, 242, .14); }
.footer .brand { color: var(--band-dark-ink); }
.footer h3 { font-family: var(--f-ui); font-size: .68rem; letter-spacing: .26em; text-transform: uppercase; color: #E2A07C; font-weight: 500; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer a { color: var(--band-dark-soft); text-decoration: none; }
.footer a:hover { color: var(--band-dark-ink); }
.footer .about p { margin-top: 18px; max-width: 36ch; }
.footer .contact-lines { margin-top: 20px; display: grid; gap: 6px; font-family: var(--f-ui); font-size: .92rem; }
.footer .contact-lines span { user-select: all; color: var(--band-dark-ink); }
.footer .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 26px; font-family: var(--f-ui); font-size: .78rem; letter-spacing: .06em; }
.theme-switch { display: inline-flex; border: 1px solid rgba(250, 247, 242, .25); }
.theme-switch button { background: none; border: 0; color: var(--band-dark-soft); font-family: var(--f-ui); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; padding: .45rem .7rem; cursor: pointer; min-height: 34px; }
.theme-switch button[aria-pressed="true"] { background: rgba(250, 247, 242, .14); color: var(--band-dark-ink); }
@media (max-width: 1000px) { .footer .top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer .about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer .top { grid-template-columns: minmax(0, 1fr); } }

/* WhatsApp float */
.float-wa {
  position: fixed; z-index: 45; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 10px; background: var(--charcoal); color: #FAF7F2; text-decoration: none;
  font-family: var(--f-ui); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; padding: .75rem 1rem; border: 1px solid #4a4440; box-shadow: var(--shadow-lift);
  transform: translateY(140%); transition: transform .5s var(--ease);
}
.float-wa.show { transform: none; }
.float-wa svg { width: 18px; height: 18px; fill: #E2A07C; }
.float-wa:hover { color: #FAF7F2; background: var(--walnut); }

/* ink trail canvas */
.ink { position: fixed; inset: 0; pointer-events: none; z-index: 90; }

/* 404 */
.lost { min-height: 60vh; display: grid; place-content: center; text-align: center; gap: 20px; justify-items: center; }
.lost .big { font-family: var(--f-display); font-size: clamp(6rem, 18vw, 12rem); line-height: .9; color: var(--accent); font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}

/* ---------- Contact band (every page) ---------- */
.contact-band { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.contact-band .cb-copy { display: grid; gap: 22px; align-content: start; }
.contact-band h2 { font-size: var(--step-4); }
.contact-band h2 em { color: var(--accent); }
.band-dark .contact-band h2 em { color: #E2A07C; }
.contact-band .cb-copy > p { font-size: var(--step-1); line-height: 1.45; max-width: 44ch; }
.band-dark .form { background: var(--paper); color: var(--ink); }
.band-dark .form label, .band-dark .form .check { color: var(--ink-soft); }
.form.quick { gap: 16px; }
.form .form-status { margin: 0; }
.thanks h3 { font-size: var(--step-2); }
.reach { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule-strong); }
.reach li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: .8rem 0; border-bottom: 1px solid var(--rule); }
.reach a { font-family: var(--f-display); font-size: 1.35rem; color: inherit; text-decoration: none; word-break: break-word; transition: color .25s; }
.reach a:hover { color: var(--accent-text); }
.band-dark .reach { border-top-color: rgba(250, 247, 242, .25); }
.band-dark .reach li { border-bottom-color: rgba(250, 247, 242, .12); }
.band-dark .reach .label { color: #CDBFAF; }
.band-dark .reach a:hover { color: #E2A07C; }
.band-dark .textlink { color: var(--band-dark-ink); }
.reach-row { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 0; gap: 0 28px; max-width: 980px; }
.reach-row li { grid-template-columns: minmax(0, 1fr); gap: 4px; border-top: 1px solid var(--rule-strong); border-bottom: 0; }
.drawer-reach { margin-top: 26px; border-top: 0; }
.drawer-reach a { font-size: 1.15rem; font-family: var(--f-ui); }
.footer .contact-lines a { color: var(--band-dark-ink); }
.footer .contact-lines a:hover { color: #E2A07C; }
.direct .item a.sel { text-decoration: none; }
@media (max-width: 900px) {
  .contact-band { grid-template-columns: minmax(0, 1fr); }
  .reach-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) { .reach li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
