
:root {
    --ground: #ded2bc;
    --surface: #d1c3aa;
    --surface-2: #c1b296;
    --line: #9e9074;
    --ink-soft: #564c39;
    --ink: #2b261c;
    --accent: #a65e2e;
    --accent-ink: #ffffff;

    --beco-9f2: 'DM Serif Display', 'DM Serif Display Fallback', Georgia, 'Times New Roman', serif;
    --beco-2f5: 'Spectral', 'Spectral Fallback', Georgia, Charter, serif;
    --beco-4e2: 'JetBrains Mono', 'JetBrains Mono Fallback', Menlo, Consolas, monospace;

    --fs-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
    --fs-sm: clamp(0.875rem, 0.84rem + 0.18vw, 0.9375rem);
    --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    --fs-md: clamp(1.125rem, 1.05rem + 0.38vw, 1.25rem);
    --fs-lg: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
    --fs-xl: clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
    --fs-2xl: clamp(1.875rem, 1.65rem + 1.1vw, 2.375rem);
    --fs-3xl: clamp(2.25rem, 1.95rem + 1.5vw, 3rem);
    --fs-display: clamp(2.5rem, 2.1rem + 2vw, 4.125rem);

    --lh-tight: 1.12;
    --lh-snug: 1.25;
    --lh-base: 1.55;
    --lh-loose: 1.7;

    --space-3xs: clamp(0.25rem, 0.22rem + 0.12vw, 0.3125rem);
    --space-2xs: clamp(0.375rem, 0.33rem + 0.2vw, 0.5rem);
    --space-xs: clamp(0.625rem, 0.56rem + 0.3vw, 0.75rem);
    --space-sm: clamp(0.875rem, 0.8rem + 0.4vw, 1rem);
    --space-md: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
    --space-lg: clamp(1.75rem, 1.5rem + 1.2vw, 2.25rem);
    --space-xl: clamp(2.5rem, 2.1rem + 1.8vw, 3.25rem);
    --space-2xl: clamp(3.5rem, 2.9rem + 2.8vw, 4.75rem);
    --space-3xl: clamp(4.5rem, 3.8rem + 3.5vw, 6.25rem);

    --content-max: 1280px;
    --content-prose: 65ch;
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --dur-fast: 140ms;
    --dur-mid: 240ms;
    --dur-slow: 420ms;

    --header-height: 4.5rem;
    --dock-height: 64px;
    --focus-ring: 0 0 0 3px rgba(166, 94, 46, 0.35);
    --shadow-subtle: 0 1px 3px rgba(43, 38, 28, 0.08);
    --shadow-card: 0 4px 14px rgba(43, 38, 28, 0.09);
    --shadow-float: 0 12px 28px rgba(43, 38, 28, 0.14);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    scroll-behavior: smooth;

    scroll-padding-top: var(--header-height);
    background-color: var(--ground);
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--beco-2f5);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    color: var(--ink);
    background-color: var(--ground);
    padding-bottom: calc(var(--dock-height) + env(safe-area-inset-bottom, 0px) + 1rem);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
}

@media (min-width: 960px) {
    body {
        padding-bottom: 0;
    }
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: var(--space-xs);
    font-family: var(--beco-9f2);
    font-weight: 400;
    line-height: var(--lh-tight);
    color: var(--ink);
    letter-spacing: -0.015em;
    text-wrap: balance;
    overflow-wrap: break-word;
}

h1 {
    font-size: var(--fs-display);
    letter-spacing: -0.025em;
    line-height: 1.08;
}

h2 {
    font-size: var(--fs-3xl);
    line-height: 1.15;
}

h3 {
    font-size: var(--fs-2xl);
    line-height: 1.2;
}

h4 {
    font-size: var(--fs-xl);
    line-height: 1.25;
}

h5 {
    font-size: var(--fs-lg);
    line-height: 1.3;
}

h6 {

    font-size: var(--fs-md);
    line-height: 1.35;
}

p {
    margin-top: 0;
    margin-bottom: var(--space-sm);
    max-width: var(--content-prose);
    color: var(--ink);
    overflow-wrap: break-word;
}

.lead {
    font-size: var(--fs-md);
    line-height: var(--lh-base);
    color: var(--ink-soft);

    max-width: 58ch;
}

small, .text-sm {
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
}

.text-xs {
    font-size: var(--fs-xs);
    line-height: var(--lh-snug);
}

.text-soft {
    color: var(--ink-soft);
}

.text-ink {
    color: var(--ink);
}

.font-display {
    font-family: var(--beco-9f2);
}

.font-body {
    font-family: var(--beco-2f5);
}

.font-mono {
    font-family: var(--beco-4e2);
    font-feature-settings: 'tnum' 1;
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
}

strong, b {
    font-weight: 600;
    color: var(--ink);
}

em, i {
    font-style: italic;
}

a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--dur-fast) var(--ease-out), text-decoration-color var(--dur-fast) var(--ease-out);
}

a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--radius-xs);
}

ul, ol {
    margin-top: 0;
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
    max-width: var(--content-prose);
}

li {
    margin-bottom: var(--space-2xs);
}

blockquote {
    margin: var(--space-md) 0;
    padding-left: var(--space-md);
    border-left: 3px solid var(--accent);
    font-family: var(--beco-9f2);
    font-size: var(--fs-lg);
    line-height: var(--lh-snug);
    color: var(--ink);
}

hr {
    border: 0;
    height: 1px;
    background-color: var(--line);
    margin: var(--space-xl) 0;
}

img, picture, svg, video {
    display: block;
    max-width: 100%;
    height: auto;
}

figure {
    margin: 0;
}

figcaption {
    margin-top: var(--space-2xs);
    font-size: var(--fs-sm);
    color: var(--ink-soft);
    font-style: italic;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: var(--fs-sm);
}

th, td {
    padding: var(--space-xs) var(--space-sm);
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    font-family: var(--beco-9f2);
    font-weight: 400;
    color: var(--ink);
    letter-spacing: 0.02em;
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.container {
    width: 100%;
    max-width: var(--content-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1rem, 0.8rem + 1.2vw, 2.5rem);
    padding-right: clamp(1rem, 0.8rem + 1.2vw, 2.5rem);
}

.container-narrow {
    width: 100%;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1rem, 0.8rem + 1.2vw, 2rem);
    padding-right: clamp(1rem, 0.8rem + 1.2vw, 2rem);
}

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

.skip-link {
    position: absolute;
    top: var(--space-xs);
    left: var(--space-xs);
    z-index: 9999;
    padding: var(--space-xs) var(--space-md);
    background: var(--accent);
    color: var(--accent-ink);
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transform: translateY(-160%);
    transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus-visible {
    transform: translateY(0);
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
    flex-shrink: 0;
    vertical-align: middle;
}

.grid-asym-left {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.grid-asym-right {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 860px) {
    .grid-asym-left {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        align-items: start;
        gap: var(--space-xl);
    }

    .grid-asym-right {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
        align-items: start;
        gap: var(--space-xl);
    }
}

.drawn-line-system {
    position: relative;
}

.drawn-line-system::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0.75rem;
    width: 1px;
    background-color: var(--line);
    z-index: 1;
}

.drawn-marker-stage {
    position: relative;
    padding-left: clamp(2.25rem, 1.8rem + 1.8vw, 3.5rem);
    margin-bottom: var(--space-2xl);
}

.drawn-marker-stage:last-child {
    margin-bottom: 0;
}

.drawn-marker-stage::before {
    content: '';
    position: absolute;
    left: calc(0.75rem - 4px);
    top: 0.35rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--ground);
    border: 2px solid var(--accent);
    z-index: 2;
    transition: background-color var(--dur-mid) var(--ease-out);
}

.drawn-marker-stage:hover::before {
    background-color: var(--accent);
}

@media (min-width: 860px) {
    .drawn-line-system::before {
        left: clamp(1rem, 0.8rem + 1.2vw, 2.5rem);
    }

    .drawn-marker-stage {
        padding-left: clamp(3.25rem, 2.5rem + 2.5vw, 5rem);
    }

    .drawn-marker-stage::before {
        left: calc(clamp(1rem, 0.8rem + 1.2vw, 2.5rem) - 4px);
    }
}

.section-spacing {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
}

.section-spacing-sm {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
}

.lofo9e7er {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: var(--space-sm);
    margin-bottom: var(--space-md);
    border: 1px solid var(--line);
    background-color: var(--surface);
}

@supports (animation-timeline: view()) {
    .scroll-rule-draw {
        transform-origin: top;
        animation: ruleGrow linear both;
        animation-timeline: view();
        animation-range: entry 10% cover 40%;
    }

    @keyframes ruleGrow {
        from {
            opacity: 0.3;
            transform: scaleY(0.4);
        }
        to {
            opacity: 1;
            transform: scaleY(1);
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
