/* about.css — "About the dates": a short, well-set essay with a few figures. */

.about {
    width: min(100%, var(--content-w));
    margin: 0 auto;
    padding: clamp(40px, 7vw, 96px) var(--gutter) var(--s8);
}

/* ── Opening ────────────────────────────────────────────────────────── */
.about-head { max-width: 52rem; }
.about-title {
    margin-top: var(--s4);
    font-size: clamp(2.3rem, 1.3rem + 3.6vw, 4.4rem);
    font-weight: 340;
    line-height: 1.02;
    letter-spacing: -.028em;
}
.about-title em { display: block; font-weight: 300; }
.about-lede { margin-top: var(--s5); font-size: clamp(1.05rem, 1rem + .3vw, 1.22rem); }

/* ── Layout: contents rail beside the essay ─────────────────────────── */
.about-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: clamp(32px, 6vw, 96px);
    margin-top: clamp(48px, 7vw, 96px);
    padding-top: var(--s6);
    border-top: 1px solid var(--line);
}
.about-toc { position: sticky; top: var(--s5); align-self: start; }
.about-toc-title { margin-bottom: var(--s3); }
.about-toc button {
    display: flex; align-items: center; width: 100%; min-height: 44px;
    padding: var(--s1) var(--s3);
    border-left: 1px solid var(--line);
    text-align: left; font-size: var(--fs-sm); line-height: 1.3; color: var(--text-dim);
    transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.about-toc button:hover { color: var(--text); border-color: var(--line-strong); }
.about-toc button.is-current { color: var(--text); border-left: 2px solid var(--gold); padding-left: calc(var(--s3) - 1px); }

/* ── The essay ──────────────────────────────────────────────────────── */
.about-essay {
    max-width: 40rem;
    font-family: var(--font-display);
    font-size: 1.125rem;
    line-height: 1.72;
    font-variation-settings: 'opsz' 14;
    text-wrap: pretty;
}
.about-section { scroll-margin-top: var(--s5); }
.about-section + .about-section { margin-top: var(--s7); }
.about-section h2 { font-size: var(--fs-h2); margin-bottom: var(--s4); outline: none; }
.about-section p + p, .about-section p + figure, .about-section figure + p, .about-section p + .about-table-wrap { margin-top: var(--s4); }
.about-essay cite { font-style: italic; }
.about-essay a:not(.btn) {
    color: var(--text);
    text-decoration: underline; text-underline-offset: 3px;
    text-decoration-color: color-mix(in srgb, var(--gold) 60%, transparent);
    transition: text-decoration-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.about-essay a:not(.btn):hover { color: var(--gold-bright); text-decoration-color: currentColor; }
.about-report { margin-top: var(--s5); font-family: var(--font-ui); }

/* ── Figures ────────────────────────────────────────────────────────── */
.about-fig {
    padding: var(--s5);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--bg-1);
    font-family: var(--font-ui);
    font-size: var(--fs-sm);
    line-height: 1.5;
}

/* Confidence: anchored dates in gold, deepening to traditional in neutral. */
.conf-seg.is-certain, .conf-swatch.is-certain { background: var(--gold); }
.conf-seg.is-probable, .conf-swatch.is-probable { background: color-mix(in srgb, var(--gold) 62%, var(--bg)); }
.conf-seg.is-possible, .conf-swatch.is-possible { background: color-mix(in srgb, var(--gold) 36%, var(--bg)); }
.conf-seg.is-traditional, .conf-swatch.is-traditional { background: color-mix(in srgb, var(--text-dim) 50%, var(--bg)); }

.conf-row { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) 2.5rem; align-items: center; gap: var(--s3); }
.conf-row + .conf-row { margin-top: var(--s3); }
.conf-row-label { font-weight: 600; }
.conf-row-total { text-align: right; color: var(--text-dim); }
.conf-bar { display: flex; gap: 2px; height: 14px; border-radius: var(--r-pill); overflow: hidden; background: var(--line); }
.conf-seg { min-width: 3px; }

.conf-legend {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s5);
    margin: var(--s5) 0 0; padding-top: var(--s5); border-top: 1px solid var(--line);
}
.conf-item dt { display: flex; align-items: center; gap: var(--s2); font-weight: 600; }
.conf-item dd { margin: var(--s1) 0 0; color: var(--text-dim); }
.conf-item .conf-counts { color: var(--text); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; }
.conf-swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; box-shadow: inset 0 0 0 1px var(--line); }

/* ── Eras table ─────────────────────────────────────────────────────── */
.about-table-wrap { overflow-x: auto; margin-inline: calc(var(--s2) * -1); padding-inline: var(--s2); }
.about-table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: var(--fs-sm); line-height: 1.4; }
.about-table thead th {
    padding: 0 var(--s3) var(--s2) 0;
    border-bottom: 1px solid var(--line-strong);
    text-align: left; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim);
    white-space: nowrap;
}
.about-table tbody th, .about-table td { padding: var(--s2) var(--s3) var(--s2) 0; border-bottom: 1px solid var(--line); vertical-align: middle; text-align: left; }
.about-table tbody th { font-weight: 500; }
.about-table td.year { white-space: nowrap; color: var(--text-dim); }
.about-table .col-sure { width: 26%; min-width: 96px; padding-right: 0; }
.about-table .conf-bar { height: 8px; }
.era-link { display: inline-flex; align-items: center; gap: var(--s2); min-height: 32px; text-decoration: none !important; }
.era-swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c); }
:root[data-theme='light'] .era-swatch { background: color-mix(in srgb, var(--c) 70%, #000); }

/* ── Close ──────────────────────────────────────────────────────────── */
.about-foot { display: grid; justify-items: center; gap: var(--s6); margin-top: var(--s8); font-family: var(--font-ui); }
.about-foot .ornament { width: min(100%, 420px); }

/* ── Sizes ──────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
    .about-layout { grid-template-columns: 1fr; }
    .about-toc { display: none; }
    .about-essay { max-width: none; }
}
@media (max-width: 560px) {
    .about-essay { font-size: 1.06rem; }
    .conf-legend { grid-template-columns: 1fr; }
    .about-table .col-length { display: none; }
}
