:root {
    --bg: #f4f0e8;
    --card: rgba(255, 255, 255, 0.68);
    --line: rgba(22, 21, 19, 0.13);
    --text: #171512;
    --muted: #615b52;
    --accent: #b44c2f;
    --accent-soft: rgba(180, 76, 47, 0.08);
    --shadow: 0 18px 48px rgba(22, 21, 19, 0.08);
}
* {
    box-sizing: border-box;
}
html {
    color-scheme: light;
    scroll-behavior: smooth;
}
body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(
            circle at top left,
            rgba(180, 76, 47, 0.14),
            transparent 18rem
        ),
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.45),
            rgba(255, 255, 255, 0)
        ),
        var(--bg);
    font-family:
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}
a {
    color: inherit;
}
.page {
    width: min(72rem, calc(100vw - 2rem));
    margin: 0 auto;
    padding: 1.4rem 0 4rem;
}
.nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
    font:
        600 0.8rem/1.2 ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}
.nav nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.nav a {
    text-decoration: none;
    color: var(--muted);
}
.nav a:hover,
.nav a:focus-visible {
    color: var(--accent);
    outline: none;
}
.lead {
    display: grid;
    gap: 1rem;
    padding: 3rem 0 2rem;
}
.lead h1 {
    margin: 0;
    font:
        600 clamp(2.7rem, 8vw, 5rem)/0.94 Georgia,
        "Times New Roman",
        serif;
    letter-spacing: -0.04em;
}
.lead p,
.prose,
.card p,
.job p,
.job li,
.definition dd,
.edge-note,
.list li {
    color: var(--muted);
    line-height: 1.65;
    font-size: 1.05rem;
}
.eyebrow,
.section-title,
.job header span,
.card h2,
.definition dt,
.pill,
.meta {
    font:
        600 0.79rem/1.2 ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}
.eyebrow,
.section-title {
    color: var(--accent);
}
.grid {
    display: grid;
    gap: 1rem;
}
.grid.columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card,
.job,
.definition,
.edge-panel {
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
}
.card,
.definition,
.edge-panel {
    padding: 1.2rem;
}
.card h2,
.definition dt {
    margin: 0 0 0.75rem;
    color: var(--text);
}
.list,
.definition dl,
.job ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.section {
    margin-top: 2.5rem;
    display: grid;
    gap: 1rem;
}
.section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}
.section-title::before {
    content: "";
    width: 1.25rem;
    height: 1px;
    background: currentColor;
}
.job {
    padding: 1.25rem;
    display: grid;
    gap: 0.9rem;
}
.job header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    flex-wrap: wrap;
}
.job h3,
.post-list h2 {
    margin: 0;
    font:
        600 1.25rem/1.15 Georgia,
        "Times New Roman",
        serif;
}
.job ul {
    display: grid;
    gap: 0.55rem;
}
.job li {
    position: relative;
    padding-left: 1rem;
}
.job li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.76rem;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--accent);
}
.stack,
.post-meta,
.definition dd {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.pill {
    padding: 0.42rem 0.62rem;
    border: 1px solid var(--line);
    background: var(--accent-soft);
}
.definition dl {
    display: grid;
    gap: 1rem;
}
.definition dd {
    margin: 0;
}
.post-list {
    display: grid;
    gap: 1rem;
}
.post-list a {
    text-decoration: none;
}
.post-list article {
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}
.post-list h2 {
    margin-bottom: 0.5rem;
}
.post-meta {
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.95rem;
}
.prose {
    max-width: 46rem;
}
.prose h2,
.prose h3 {
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
}
.prose a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.12em;
}
.prose code {
    font:
        600 0.9em/1.2 ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;
    background: rgba(22, 21, 19, 0.05);
    padding: 0.1rem 0.28rem;
}
.prose pre {
    overflow-x: auto;
    padding: 1rem;
    background: #1a1714;
    color: #f7f2eb;
}
.live-sidecar {
    display: grid;
    gap: 1rem;
    margin: 1.75rem 0 2.25rem;
}
.live-card {
    display: grid;
    gap: 0.9rem;
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
    padding: 1.1rem;
}
.live-card-header {
    display: grid;
    gap: 0.55rem;
}
.live-card-title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    color: var(--text);
    font:
        600 1.15rem/1.15 Georgia,
        "Times New Roman",
        serif;
}
.live-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}
.live-status {
    margin: 0;
    color: var(--muted);
    font:
        600 0.76rem/1.3 ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.live-status[data-tone="ok"] {
    color: var(--accent);
}
.live-status[data-tone="error"] {
    color: #8f3021;
}
.live-source {
    color: var(--accent);
    font:
        600 0.78rem/1.2 ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
}
.live-source:hover,
.live-source:focus-visible {
    text-decoration: underline;
    outline: none;
}
.live-copy,
.live-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.97rem;
}
.live-copy {
    display: grid;
    gap: 0.55rem;
    max-width: 56rem;
}
.live-copy-offset {
    max-width: 44rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(22, 21, 19, 0.14);
}
.live-copy-lead {
    color: var(--text);
}
.live-copy-note strong {
    color: var(--text);
    font-weight: 600;
}
.live-copy-ref {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: baseline;
    font-size: 0.9rem;
}
.live-copy-ref span {
    color: var(--accent);
    font:
        600 0.73rem/1.2 ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.live-copy-ref a {
    color: var(--muted);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.12em;
    word-break: break-all;
}
.live-table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.36);
}
.live-table-wrap-fit {
    display: inline-block;
    width: auto;
    max-width: 100%;
}
.live-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}
.live-table-fit {
    min-width: 0;
}
.live-table th,
.live-table td {
    padding: 0.72rem 0.85rem;
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}
.live-table th {
    color: var(--text);
    background: rgba(244, 240, 232, 0.92);
    font:
        600 0.74rem/1.2 ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.live-table td {
    color: var(--muted);
    font-size: 0.92rem;
}
.live-table-compact td {
    padding: 0.62rem 0.72rem;
}
.sticky-col {
    position: sticky;
    left: 0;
    z-index: 1;
    background: rgba(244, 240, 232, 0.98);
}
.metric-pair {
    display: grid;
    gap: 0.15rem;
    min-width: 5.5rem;
}
.metric-pair strong {
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 600;
}
.metric-pair span {
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.info-pop {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.info-dot {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--accent);
    font:
        600 0.76rem/1 ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;
    cursor: help;
}
.info-dot:hover,
.info-dot:focus-visible {
    text-decoration: underline;
    outline: none;
}
.info-tip {
    position: absolute;
    left: 50%;
    top: calc(100% + 0.5rem);
    width: min(18rem, calc(100vw - 3rem));
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    background: rgba(23, 21, 18, 0.96);
    box-shadow: var(--shadow);
    color: #f7f2eb;
    font:
        500 0.76rem/1.45 ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;
    letter-spacing: 0.03em;
    text-transform: none;
    transform: translate(-50%, -0.2rem);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 140ms ease,
        transform 140ms ease;
    z-index: 3;
}
.info-pop:hover .info-tip,
.info-pop:focus-within .info-tip {
    opacity: 1;
    transform: translate(-50%, 0);
}
.edge-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 1rem;
    margin-top: 2rem;
}
.edge-panel h2 {
    margin-top: 0;
}
.edge-table {
    width: 100%;
    border-collapse: collapse;
}
.edge-table th,
.edge-table td {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.edge-table th {
    color: var(--muted);
    font:
        600 0.78rem/1.2 ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font:
        500 0.84rem/1.5 ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;
}
@media (max-width: 900px) {
    .grid.columns-2,
    .grid.columns-3,
    .edge-layout {
        grid-template-columns: 1fr;
    }
    .info-tip {
        left: 0;
        transform: translate(0, -0.2rem);
    }
    .info-pop:hover .info-tip,
    .info-pop:focus-within .info-tip {
        transform: translate(0, 0);
    }
}
@media (max-width: 640px) {
    .page {
        width: min(100vw - 1.2rem, 72rem);
    }
    .nav {
        align-items: flex-start;
        flex-direction: column;
    }
    .lead {
        padding-top: 2rem;
    }
    .job header {
        flex-direction: column;
    }
    .live-card-meta {
        align-items: flex-start;
        flex-direction: column;
    }
    .live-copy-offset {
        padding-left: 0.8rem;
    }
    .live-card {
        padding: 0.95rem;
    }
    .live-table th,
    .live-table td {
        padding: 0.58rem 0.65rem;
    }
}
