@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:ital,opsz,wght@0,12..96,400..800;1,12..96,500..700&family=Inter:wght@400;500;600&display=swap');

/* ═══════════════════════════════════════════════════════════
   Tokens
   ═══════════════════════════════════════════════════════════ */
:root {
    --bg: #EDE2CD;
    --bg-alt: #E4D5B9;
    --surface: #F4ECDD;
    --paper: #F7F0E2;
    --tick: #9E2F1F;
    --tick-faint: rgba(158, 47, 31, 0.36);
    --ink: #1F1A17;
    --ink-muted: #594D45;
    --accent: #7A4034;
    --accent-strong: #5E2F25;
    --warm: #E8A55E;
    --line: rgba(122, 64, 52, 0.2);
    --line-strong: rgba(122, 64, 52, 0.42);

    /* Always-dark bands (method, CTA, mobile menu) */
    --band: #2A1D16;
    --band-ink: #F6EEE3;
    --band-muted: #CDBBA9;
    --band-line: rgba(246, 238, 227, 0.14);

    --on-accent: #FBF5EC;

    --font-display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

    --radius: 3px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    --container: 1240px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --header-h: 84px;
    --section: clamp(4.5rem, 9vw, 8rem);

    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #2E2017;
    --bg-alt: #38281C;
    --surface: #35261B;
    --paper: #3A2A1E;
    --tick: #EE8468;
    --tick-faint: rgba(238, 132, 104, 0.35);
    --ink: #F5EDE3;
    --ink-muted: #CBB9A8;
    --accent: #D98B6C;
    --accent-strong: #E9A486;
    --line: rgba(232, 165, 94, 0.18);
    --line-strong: rgba(232, 165, 94, 0.38);
    --band: #1E1510;
    --on-accent: #241812;

    color-scheme: dark;
}

/* ═══════════════════════════════════════════════════════════
   Base
   ═══════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

ul,
ol {
    list-style: none;
}

::selection {
    background: var(--accent);
    color: var(--on-accent);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

input,
textarea,
select {
    caret-color: var(--accent);
}

html {
    scrollbar-color: var(--line-strong) var(--bg);
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 2000;
    padding: 0.7rem 1.1rem;
    background: var(--ink);
    color: var(--bg);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.skip-link:focus {
    top: 1rem;
}

/* Inline text link */
.text-link {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
    text-decoration-color: var(--line-strong);
    transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.text-link:hover {
    text-decoration-color: currentColor;
}

/* ═══════════════════════════════════════════════════════════
   Motion
   ═══════════════════════════════════════════════════════════ */
.js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

@keyframes unveil {
    from { clip-path: inset(0 0 100% 0); }
    to { clip-path: inset(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
    }
    .js .reveal { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════════════
   Header
   ═══════════════════════════════════════════════════════════ */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: saturate(1.2) blur(10px);
    -webkit-backdrop-filter: saturate(1.2) blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease, background-color 0.3s ease;
}

.header.scrolled {
    border-bottom-color: var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    height: var(--header-h);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
}

.logo-badge {
    width: 46px;
    height: 46px;
    border-radius: 50%;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.logo-sub {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ink-muted);
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.25rem;
}

.nav-link {
    position: relative;
    display: inline-block;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink-muted);
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.15rem;
    height: 1.5px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    color: var(--ink);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
    transform: scaleX(1);
}

.nav-cta {
    margin-left: 0.25rem;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    background: none;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
}

.menu-btn-line {
    display: block;
    width: 16px;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.25s var(--ease);
}

/* ═══════════════════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 50px;
    padding: 0.8rem 1.6rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.btn svg {
    transition: transform 0.3s var(--ease);
}

.btn:hover svg {
    transform: translateX(3px);
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
}

.btn-primary:hover {
    background: var(--accent-strong);
    box-shadow: 0 6px 18px -8px rgba(94, 47, 37, 0.55);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn-ghost:hover {
    border-color: var(--ink);
}

.btn-sm {
    min-height: 42px;
    padding: 0.55rem 1.2rem;
    font-size: 0.9rem;
}

.btn-light {
    background: var(--band-ink);
    color: var(--band);
}

.btn-light:hover {
    background: var(--warm);
}

.btn:disabled {
    opacity: 0.55;
    cursor: progress;
}

/* ═══════════════════════════════════════════════════════════
   Audit marks — hand-drawn ticks, circles and carets that
   draw themselves like a red pencil
   ═══════════════════════════════════════════════════════════ */
.mark {
    width: 30px;
    height: 26px;
    flex-shrink: 0;
    overflow: visible;
}

.mark path {
    fill: none;
    stroke: var(--tick);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}

.js .reveal .mark path,
.js .reveal.mark path {
    stroke-dashoffset: 1;
}

.js .reveal.is-visible .mark path {
    animation: draw 0.55s cubic-bezier(0.65, 0, 0.35, 1) forwards;
    animation-delay: calc(0.35s + var(--i, 0) * 0.22s);
}

@keyframes draw {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
}

/* The accountant's double rule: a total that has been checked */
.total {
    position: relative;
    display: inline-block;
}

.total::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.08em;
    height: 0.14em;
    max-height: 9px;
    min-height: 5px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform-origin: left;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   Working paper sheet
   ═══════════════════════════════════════════════════════════ */
.wp {
    --rule: 2.75rem;
    position: relative;
    background-color: var(--paper);
    background-image:
        linear-gradient(90deg, transparent calc(var(--margin) - 4px), var(--tick-faint) calc(var(--margin) - 4px), var(--tick-faint) calc(var(--margin) - 3px), transparent calc(var(--margin) - 3px), transparent calc(var(--margin) - 1px), var(--tick-faint) calc(var(--margin) - 1px), var(--tick-faint) var(--margin), transparent var(--margin));
    --margin: 0px;
    border-radius: 2px;
    box-shadow:
        0 1px 0 var(--line),
        0 2px 4px -2px rgba(31, 26, 23, 0.18),
        0 24px 48px -30px rgba(31, 26, 23, 0.5);
}

.wp-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 1rem 1.5rem 0.9rem;
    border-bottom: 3px double var(--line-strong);
}

.wp-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.wp-ref {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tick);
    font-variant-numeric: tabular-nums;
}

/* Hero sheet */
.hero-wp {
    --margin: 3.25rem;
    transform: rotate(1.25deg);
    animation: sheet-in 1s var(--ease) 0.1s both;
}

@keyframes sheet-in {
    from { opacity: 0; transform: translateY(24px) rotate(3deg); }
    to { opacity: 1; transform: rotate(1.25deg); }
}

.hero-wp .wp-head {
    padding-left: calc(var(--margin) + 0.75rem);
}

.wp-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--line);
}

.wp-meta div {
    padding: 0.75rem 1.5rem 0.8rem;
}

.wp-meta div:first-child {
    padding-left: calc(var(--margin) + 0.75rem);
}

.wp-meta div + div {
    border-left: 1px solid var(--line);
}

.wp-meta dt {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-muted);
}

.wp-meta dd {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.02rem;
}

.wp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.wp-table th,
.wp-table td {
    text-align: left;
    height: var(--rule);
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.wp-table th:first-child,
.wp-table td:first-child {
    padding-left: calc(var(--margin) + 0.75rem);
}

.wp-table thead th {
    height: 2.25rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-muted);
}

.wp-check {
    width: 6.5rem;
    text-align: center !important;
}

.wp-check .mark {
    display: inline-block;
    vertical-align: middle;
}

.wp-table tfoot th {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-muted);
    border-bottom: 0;
    height: 4rem;
}

.wp-result {
    border-bottom: 0 !important;
    text-align: center;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 700;
    font-size: 1.45rem;
    color: var(--tick);
}

.wp-foot {
    padding: 0.9rem 1.5rem 1rem calc(var(--margin) + 0.75rem);
    font-size: 0.82rem;
    color: var(--ink-muted);
    border-top: 1px solid var(--line);
}

/* Hero sheet: marks draw in sequence on load */
.hero-wp .mark path {
    stroke-dashoffset: 1;
    animation: draw 0.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
    animation-delay: calc(1.05s + var(--i, 0) * 0.38s);
}

.hero-wp .wp-result .total::after,
.hero-title .total::after {
    animation: rule 0.6s var(--ease) both;
}

.hero-wp .wp-result .total::after {
    animation-delay: 2.75s;
}

.hero-title .total::after {
    animation-delay: 0.6s;
    border-color: var(--accent);
}

@keyframes rule {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* ═══════════════════════════════════════════════════════════
   Home: hero
   ═══════════════════════════════════════════════════════════ */
.hero {
    padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 6.5rem);
    overflow-x: clip;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: center;
}

.hero-copy > * {
    animation: rise 0.9s var(--ease) both;
}

.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.24s; }

.hero-title {
    font-size: clamp(2.9rem, 7vw, 5.75rem);
    line-height: 0.98;
    letter-spacing: -0.035em;
    margin-bottom: 1.9rem;
}

.hero-title em {
    display: block;
    font-style: italic;
    font-weight: 600;
    color: var(--accent);
}

.hero-title .total::after {
    bottom: -0.04em;
    border-top-width: 3px;
    border-bottom-width: 3px;
    height: 0.13em;
    max-height: 12px;
}

.hero-lead {
    max-width: 34rem;
    font-size: clamp(1.1rem, 1.5vw, 1.25rem);
    color: var(--ink-muted);
    margin-bottom: 2.25rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    border-top: 1px solid var(--line-strong);
    border-bottom: 3px double var(--line-strong);
    max-width: 34rem;
}

.hero-facts div {
    flex: 1 1 0;
    min-width: 8.5rem;
    padding: 1rem 1.25rem 1rem 0;
}

.hero-facts div + div {
    padding-left: 1.25rem;
    border-left: 1px solid var(--line);
}

.hero-facts dt {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.01em;
}

.hero-facts dd {
    font-size: 0.88rem;
    color: var(--ink-muted);
    line-height: 1.45;
}

/* ═══════════════════════════════════════════════════════════
   Industries band
   ═══════════════════════════════════════════════════════════ */
.industries {
    background: var(--accent);
    color: var(--on-accent);
}

[data-theme="dark"] .industries {
    background: #4A2B20;
    color: var(--ink);
}

.industries-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 2.5rem;
    padding-block: 1.6rem;
}

.industries h2 {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0;
    opacity: 0.8;
}

.industries ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2.25rem;
}

.industries li {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   Section heads
   ═══════════════════════════════════════════════════════════ */
.section {
    padding: var(--section) 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem 4rem;
    align-items: end;
    margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-title {
    font-size: clamp(2.1rem, 4.2vw, 3.4rem);
    letter-spacing: -0.03em;
}

.section-intro {
    color: var(--ink-muted);
    max-width: 30rem;
}

/* ═══════════════════════════════════════════════════════════
   Ledger (services, roles)
   ═══════════════════════════════════════════════════════════ */
.ledger {
    --cols: 4.5rem minmax(0, 0.95fr) minmax(0, 1.25fr) 10rem;
    border-bottom: 3px double var(--line-strong);
}

.ledger-headings {
    display: grid;
    grid-template-columns: var(--cols);
    gap: 0 2rem;
    padding: 0 0.5rem 0.7rem;
    border-bottom: 1.5px solid var(--ink);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-muted);
}

.ledger-row {
    display: grid;
    grid-template-columns: var(--cols);
    gap: 0.5rem 2rem;
    align-items: baseline;
    padding: 1.9rem 0.5rem;
    border-bottom: 1px solid var(--line);
    background-image: linear-gradient(var(--bg-alt), var(--bg-alt));
    background-size: 0% 100%;
    background-repeat: no-repeat;
    transition: background-size 0.5s var(--ease);
}

.ledger li:last-child .ledger-row {
    border-bottom: 0;
}

.ledger-ref {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--tick);
    font-variant-numeric: tabular-nums;
}

.ledger-row h3 {
    font-size: clamp(1.45rem, 2.4vw, 1.95rem);
    letter-spacing: -0.02em;
    transition: color 0.2s ease;
}

.ledger-row p {
    color: var(--ink-muted);
    max-width: 34rem;
}

.ledger-end {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.9rem;
    align-self: center;
}

.ledger-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}

.ledger-cta svg {
    transition: transform 0.3s var(--ease);
}

.ledger-row:hover {
    background-size: 100% 100%;
}

.ledger-row:hover h3 {
    color: var(--accent);
}

.ledger-row:hover .ledger-cta svg {
    transform: translateX(4px);
}

/* Roles: wider first column for the terms */
.ledger:has(.role-row) {
    --cols: 11rem minmax(0, 0.9fr) minmax(0, 1.3fr) 6rem;
}

.role-row .ledger-ref {
    font-size: 0.88rem;
    line-height: 1.45;
}

/* ═══════════════════════════════════════════════════════════
   Dark band: method as a tickmark legend
   ═══════════════════════════════════════════════════════════ */
.band {
    --tick: var(--warm);
    --line-strong: rgba(246, 238, 227, 0.32);
    background: var(--band);
    color: var(--band-ink);
}

.band .section-intro {
    color: var(--band-muted);
}

.method {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 3rem clamp(3rem, 7vw, 6rem);
    align-items: start;
}

.method-head .section-intro {
    margin-top: 1.25rem;
}

.legend {
    border: 1px solid var(--band-line);
    border-radius: 2px;
    padding: 0.5rem 0 0;
}

.legend-title {
    padding: 0.85rem 1.75rem 0.95rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    border-bottom: 3px double var(--line-strong);
}

.legend-item {
    display: grid;
    grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
    gap: 0.5rem 2rem;
    align-items: center;
    padding: 1.6rem 1.75rem;
}

.legend-item + .legend-item {
    border-top: 1px solid var(--band-line);
}

.legend-item dt {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.45rem;
    letter-spacing: -0.01em;
}

.legend-item .mark {
    width: 44px;
    height: 38px;
}

.legend-item .mark path {
    stroke-width: 2.4;
}

.legend-item dd {
    color: var(--band-muted);
}

/* ═══════════════════════════════════════════════════════════
   Subpage hero
   ═══════════════════════════════════════════════════════════ */
.page-hero {
    padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
    border-bottom: 3px double var(--line-strong);
}

.page-hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.75rem);
    letter-spacing: -0.035em;
    margin-bottom: 1rem;
    animation: rise 0.9s var(--ease) both;
}

.page-hero p {
    max-width: 36rem;
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    color: var(--ink-muted);
    animation: rise 0.9s var(--ease) 0.08s both;
}

/* ═══════════════════════════════════════════════════════════
   Split layout (label column + content)
   ═══════════════════════════════════════════════════════════ */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 2rem clamp(2.5rem, 7vw, 6rem);
}

.split-aside h2 {
    font-size: clamp(1.5rem, 2.4vw, 1.9rem);
    letter-spacing: -0.02em;
}

.split-aside p {
    color: var(--ink-muted);
    margin-top: 1rem;
    max-width: 22rem;
}

.prose p {
    margin-bottom: 1.4rem;
    max-width: 40rem;
}

.prose p.lead {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.4vw, 1.85rem);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.015em;
    margin-bottom: 1.75rem;
}

.prose p.muted {
    color: var(--ink-muted);
}

/* Legal documents */
.legal {
    max-width: 44rem;
}

.legal h2 {
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    margin: 2.75rem 0 0.75rem;
}

.legal p {
    color: var(--ink-muted);
    margin-bottom: 1rem;
}

.legal p:first-child {
    color: var(--ink);
    font-size: 1.15rem;
}

/* ═══════════════════════════════════════════════════════════
   Values strip (about)
   ═══════════════════════════════════════════════════════════ */
.values {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: clamp(3rem, 6vw, 5rem);
    border-top: 1px solid var(--line-strong);
    border-bottom: 3px double var(--line-strong);
}

.values li {
    padding: 1.5rem 1.25rem;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    font-weight: 600;
    font-style: italic;
    color: var(--accent);
}

.values li + li {
    border-left: 1px solid var(--line);
}

/* ═══════════════════════════════════════════════════════════
   Journal (about: history)
   ═══════════════════════════════════════════════════════════ */
.journal {
    width: 100%;
    border-collapse: collapse;
    border-bottom: 3px double var(--line-strong);
}

.journal thead th {
    text-align: left;
    padding: 0 1rem 0.7rem 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--band-muted);
    border-bottom: 1.5px solid var(--band-ink);
}

.journal tbody th,
.journal tbody td {
    text-align: left;
    vertical-align: baseline;
    padding: 1.8rem 2rem 1.8rem 0;
    border-bottom: 1px solid var(--band-line);
}

.journal tbody tr:last-child th,
.journal tbody tr:last-child td {
    border-bottom: 0;
}

.journal tbody th {
    width: 7rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--warm);
    font-variant-numeric: tabular-nums;
}

.journal-entry {
    width: 30%;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    letter-spacing: -0.02em;
}

.journal td:not(.journal-entry):not(.journal-mark) {
    color: var(--band-muted);
    max-width: 30rem;
}

.journal-mark {
    width: 3rem;
    padding-right: 0 !important;
    vertical-align: middle !important;
}

/* ═══════════════════════════════════════════════════════════
   Contact details
   ═══════════════════════════════════════════════════════════ */
.details {
    display: grid;
    gap: 1.75rem;
    margin-top: 2rem;
}

.details dt {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-muted);
    margin-bottom: 0.25rem;
}

.details dd {
    font-size: 1.05rem;
    line-height: 1.6;
}

.details dd a:not(.text-link) {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

.details dd a:not(.text-link):hover {
    color: var(--accent);
}

.details .inline-links {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.4rem;
    font-size: 0.95rem;
}

.map-frame {
    height: clamp(320px, 42vw, 460px);
    border-top: 1px solid var(--line);
    overflow: hidden;
}

.map-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(1) sepia(0.25) contrast(1.05);
}

[data-theme="dark"] .map-frame iframe {
    filter: grayscale(1) invert(0.9) sepia(0.3) brightness(0.85);
}

/* ═══════════════════════════════════════════════════════════
   Forms (on a working-paper sheet)
   ═══════════════════════════════════════════════════════════ */
.form-sheet form {
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(1.75rem, 4vw, 2.5rem);
}

.form-intro {
    color: var(--ink-muted);
    margin-bottom: 1.75rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.25rem;
}

.field {
    margin-bottom: 1.4rem;
}

.field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.field .optional {
    font-weight: 400;
    color: var(--ink-muted);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.8rem 0.95rem;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder,
.field textarea::placeholder {
    color: color-mix(in srgb, var(--ink-muted) 80%, transparent);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: var(--ink-muted);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.field textarea {
    resize: vertical;
    min-height: 140px;
}

.field select {
    cursor: pointer;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23594D45' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

[data-theme="dark"] .field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23CBB9A8' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
}

.field-note {
    margin: -0.25rem 0 1.6rem;
    padding: 1rem 1.1rem;
    font-size: 0.95rem;
    color: var(--ink-muted);
    background: var(--bg-alt);
    border-radius: var(--radius);
}

.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-top: 0.5rem;
}

.form-status {
    font-size: 0.95rem;
    min-height: 1.5em;
}

.form-status[data-state="pending"] { color: var(--ink-muted); }
.form-status[data-state="success"] { color: #2F6B3F; font-weight: 500; }
.form-status[data-state="error"] { color: #A3261B; font-weight: 500; }
[data-theme="dark"] .form-status[data-state="success"] { color: #8FCB9B; }
[data-theme="dark"] .form-status[data-state="error"] { color: #F2A096; }

/* ═══════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════ */
.cta-band {
    background: var(--band);
    color: var(--band-ink);
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.cta-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.cta-inner h2 {
    font-size: clamp(2.4rem, 5.5vw, 4.25rem);
    letter-spacing: -0.035em;
}

.cta-inner h2 em {
    font-style: italic;
    font-weight: 600;
    color: var(--warm);
}

.cta-inner p {
    color: var(--band-muted);
    margin-top: 0.75rem;
}

.cta-inner p a {
    color: var(--band-ink);
    font-weight: 600;
}

.footer {
    padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 0.7fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--ink-muted);
    font-size: 0.95rem;
    max-width: 18rem;
}

.footer h3 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--ink-muted);
    margin-bottom: 0.9rem;
}

.footer address,
.footer-col p {
    font-style: normal;
    font-size: 0.95rem;
    line-height: 1.65;
}

.footer-col ul {
    display: grid;
    gap: 0.45rem;
    font-size: 0.95rem;
}

.footer-col a {
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-col .inline-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.6rem;
}

.footer-col .inline-links a {
    color: var(--accent);
    font-weight: 500;
}

.footer-map {
    margin: 0 0 2.5rem;
    border: 1px solid var(--line);
    border-top: 3px double var(--ink);
    background: var(--paper);
}

.footer-map .map-frame {
    height: clamp(220px, 26vw, 300px);
    border-top: 0;
}

.footer-map figcaption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
    color: var(--ink-muted);
}

.footer-map figcaption a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    font-weight: 500;
}

.footer-map figcaption a:hover {
    color: var(--ink);
}

.footer-legal {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--ink-muted);
}

.footer-legal nav {
    display: flex;
    gap: 1.75rem;
}

.footer-legal a:hover {
    color: var(--ink);
}

/* ═══════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .method {
        grid-template-columns: 1fr;
    }

    .ledger {
        --cols: 3.5rem minmax(0, 0.9fr) minmax(0, 1.3fr) 8.5rem;
    }
}

@media (max-width: 960px) {
    :root {
        --header-h: 72px;
    }

    .logo-badge {
        width: 40px;
        height: 40px;
    }

    .nav-links {
        display: none;
    }

    .menu-btn {
        display: inline-flex;
        position: relative;
        z-index: 1001;
    }

    .header.menu-open {
        /* backdrop-filter would make the header the containing block
           for the fixed menu panel, trapping it inside the bar */
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: var(--band);
        border-bottom-color: transparent;
        color: var(--band-ink);
    }

    .header.menu-open .logo-sub {
        color: var(--band-muted);
    }

    .header.menu-open .icon-btn {
        color: var(--band-ink);
        border-color: var(--band-line);
    }

    .nav.open .nav-links {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0.25rem;
        position: fixed;
        inset: var(--header-h) 0 0 0;
        padding: 2rem var(--gutter);
        background: var(--band);
        z-index: 999;
    }

    .nav.open .nav-links li {
        width: 100%;
        border-bottom: 1px solid var(--band-line);
    }

    .nav.open .nav-link {
        display: block;
        padding: 1rem 0;
        font-family: var(--font-display);
        font-size: 1.8rem;
        font-weight: 600;
        color: var(--band-ink);
    }

    .nav.open .nav-link::after {
        display: none;
    }

    .nav.open .nav-link[aria-current="page"] {
        color: var(--warm);
    }

    .nav.open .nav-cta {
        margin: 1.5rem 0 0;
        border: 0;
    }

    .nav.open .nav-cta .btn {
        width: 100%;
        background: var(--band-ink);
        color: var(--band);
    }

    .menu-btn[aria-expanded="true"] .menu-btn-line:nth-child(1) {
        transform: translateY(3.25px) rotate(45deg);
    }

    .menu-btn[aria-expanded="true"] .menu-btn-line:nth-child(2) {
        transform: translateY(-3.25px) rotate(-45deg);
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-wp {
        max-width: 560px;
        width: 100%;
        justify-self: center;
    }

    .section-head {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .ledger-headings {
        display: none;
    }

    .ledger {
        border-top: 1.5px solid var(--ink);
    }

    .ledger-row,
    .ledger:has(.role-row) .ledger-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.5rem 1rem;
        padding: 1.6rem 0.25rem;
    }

    .ledger-row .ledger-ref {
        grid-column: 1 / -1;
    }

    .ledger-row h3 {
        grid-column: 1;
    }

    .ledger-row p {
        grid-column: 1 / -1;
    }

    .ledger-end {
        grid-column: 1 / -1;
        grid-row: auto;
        justify-content: space-between;
        flex-direction: row-reverse;
    }

    .split {
        grid-template-columns: 1fr;
    }

    .legend-item {
        grid-template-columns: 1fr;
        padding: 1.4rem 1.25rem;
    }

    .legend-title {
        padding-inline: 1.25rem;
    }

    .journal thead {
        display: none;
    }

    .journal,
    .journal tbody,
    .journal tr {
        display: block;
    }

    .journal tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.25rem 1rem;
        padding: 1.6rem 0;
        border-bottom: 1px solid var(--band-line);
    }

    .journal tbody tr:last-child {
        border-bottom: 0;
    }

    .journal tbody th,
    .journal tbody td {
        display: block;
        width: auto !important;
        padding: 0 !important;
        border: 0 !important;
    }

    .journal tbody th { grid-column: 1; grid-row: 1; }
    .journal .journal-mark { grid-column: 2; grid-row: 1 / span 2; }
    .journal .journal-entry { grid-column: 1; }
    .journal td:nth-child(3) { grid-column: 1 / -1; }

    .values {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .values li:nth-child(3) {
        border-left: 0;
    }

    .values li:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .logo-sub {
        display: none;
    }

    .hero-actions .btn {
        flex: 1 1 100%;
    }

    .hero-facts div {
        flex-basis: 100%;
        padding: 0.75rem 0 !important;
        border-left: 0 !important;
    }

    .hero-facts div + div {
        border-top: 1px solid var(--line);
    }

    .hero-wp {
        --margin: 1.75rem;
        transform: none;
        animation-name: rise;
    }

    .wp-meta {
        grid-template-columns: 1fr;
    }

    .wp-meta div + div {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding-left: calc(var(--margin) + 0.75rem);
    }

    .wp-table th,
    .wp-table td {
        padding-right: 1rem;
    }

    .wp-check {
        width: 4.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .cta-inner .btn {
        width: 100%;
    }
}
