/* CSIA R&D — quiet, type-led showcase. System grotesk, black on white, one link blue. */

:root {
    --ink: #1d1d1f;
    --ink-2: #6e6e73;
    --ink-3: #86868b;
    --line: #d2d2d7;
    --paper: #ffffff;
    --paper-2: #f5f5f7;
    --night: #000000;
    --night-2: #1d1d1f;
    --night-ink-2: #a1a1a6;
    --link: #0066cc;
    --link-on-dark: #2997ff;

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;

    --max: 1180px;
    --narrow: 700px;
    --gutter: 24px;
    --radius: 22px;
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);

    color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.47;
    letter-spacing: -0.022em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { width: 100%; max-width: var(--narrow); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Navigation ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.wordmark {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.nav-links { display: flex; gap: 40px; }

.nav-links a {
    font-size: 15px;
    color: var(--ink-2);
    letter-spacing: -0.01em;
    transition: color 0.2s var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ink); }

/* ---------- Shared type ---------- */

.kicker {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
    letter-spacing: -0.01em;
    margin-bottom: 14px;
}

.link-more {
    color: var(--link);
    font-size: 17px;
    letter-spacing: -0.02em;
}

.link-more::after {
    content: "";
    display: inline-block;
    width: 0.42em;
    height: 0.42em;
    margin-left: 0.32em;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: translateY(-0.08em) rotate(45deg);
}

a.link-more:hover,
.tile:hover .link-more { text-decoration: underline; text-underline-offset: 3px; }

.link-back {
    display: inline-block;
    font-size: 14px;
    color: var(--link);
    margin-bottom: 40px;
}

.link-back::before {
    content: "";
    display: inline-block;
    width: 0.4em;
    height: 0.4em;
    margin-right: 0.4em;
    border-bottom: 1.5px solid currentColor;
    border-left: 1.5px solid currentColor;
    transform: translateY(-0.1em) rotate(45deg);
}

.link-back:hover { text-decoration: underline; text-underline-offset: 3px; }

.button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 980px;
    background: var(--link);
    color: #fff;
    font-size: 17px;
    letter-spacing: -0.02em;
    transition: background 0.2s var(--ease);
}

.button:hover { background: #0077ed; }

.empty { color: var(--ink-2); font-size: 19px; padding: 40px 0; }

/* ---------- Home hero ---------- */

.hero {
    padding-top: clamp(80px, 14vw, 168px);
    padding-bottom: clamp(72px, 10vw, 128px);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(44px, 8.4vw, 104px);
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: -0.045em;
    max-width: 11.5em;
}

.hero-lede {
    margin-top: 32px;
    max-width: 34em;
    font-size: clamp(19px, 2.1vw, 24px);
    line-height: 1.38;
    color: var(--ink-2);
    letter-spacing: -0.024em;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    margin-top: 36px;
}

.hero-links .link-more { font-size: 19px; }

/* ---------- Sections ---------- */

.section { padding-bottom: clamp(88px, 11vw, 140px); }
.section-tight { padding-bottom: clamp(88px, 11vw, 140px); }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    padding-top: 28px;
    margin-bottom: 28px;
    border-top: 1px solid var(--line);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.035em;
}

/* ---------- Tiles ---------- */

.tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

/* With an odd number of tiles the first one spans the full row. */
.tiles > .tile:first-child:nth-last-child(2n + 1) { grid-column: 1 / -1; }

.tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 440px;
    padding: clamp(32px, 4vw, 52px);
    border-radius: var(--radius);
    background: var(--paper-2);
    overflow: hidden;
    transition: transform 0.5s var(--ease);
}

.tile:hover { transform: scale(1.008); }

.tile-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 12px;
}

.tile-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.035em;
    max-width: 16em;
}

.tile-text {
    margin-top: 16px;
    max-width: 32em;
    font-size: 17px;
    color: var(--ink-2);
}

.tile-note {
    margin-top: 14px;
    font-size: 14px;
    color: var(--ink-3);
}

.tile .link-more { display: inline-block; margin-top: 28px; }

.tile-media {
    margin: 36px calc(clamp(32px, 4vw, 52px) * -1) calc(clamp(32px, 4vw, 52px) * -1);
}

.tile-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.tile-dark { background: var(--night); color: #f5f5f7; }
.tile-dark .tile-label,
.tile-dark .tile-text { color: var(--night-ink-2); }
.tile-dark .tile-note { color: #6e6e73; }
.tile-dark .link-more { color: var(--link-on-dark); }
.tile-dark .stat dt { color: var(--night-ink-2); }

/* Work is listed one project per row. */
.tiles-stack { grid-template-columns: minmax(0, 1fr); }
.tiles-stack > .tile { min-height: 0; }

/* A full-row tile with a cover image puts the image beside the text. */
@media (min-width: 900px) {
    .tiles > .tile:first-child:nth-last-child(2n + 1):has(.tile-media),
    .tiles-stack > .tile:has(.tile-media) {
        flex-direction: row;
        align-items: center;
        gap: 48px;
        min-height: 520px;
    }
    .tiles > .tile:first-child:nth-last-child(2n + 1) .tile-body,
    .tiles-stack > .tile .tile-body { flex: 0 0 38%; }
    .tiles > .tile:first-child:nth-last-child(2n + 1) .tile-media,
    .tiles-stack > .tile .tile-media {
        flex: 1;
        align-self: stretch;
        margin: calc(clamp(32px, 4vw, 52px) * -1) calc(clamp(32px, 4vw, 52px) * -1) calc(clamp(32px, 4vw, 52px) * -1) 0;
        padding: 48px 0 0;
        overflow: hidden;
    }
    .tiles > .tile:first-child:nth-last-child(2n + 1) .tile-media img,
    .tiles-stack > .tile .tile-media img {
        height: 100%;
        aspect-ratio: auto;
        object-fit: cover;
        object-position: left top;
        border-radius: 14px 0 0 0;
    }
}


/* ---------- Page heads ---------- */

.page-head {
    padding-top: clamp(72px, 10vw, 128px);
    padding-bottom: clamp(48px, 6vw, 80px);
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(48px, 7.4vw, 96px);
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: -0.045em;
}

.page-lede {
    margin-top: 20px;
    max-width: 30em;
    font-size: clamp(19px, 2.1vw, 24px);
    line-height: 1.38;
    color: var(--ink-2);
}

/* ---------- Research index ---------- */

.index-list { border-top: 1px solid var(--ink); }

.index-list li { border-bottom: 1px solid var(--line); }

.index-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 180px;
    gap: 32px;
    padding: 32px 0;
    align-items: baseline;
}

.index-title {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.4vw, 28px);
    line-height: 1.18;
    font-weight: 600;
    letter-spacing: -0.03em;
    transition: color 0.2s var(--ease);
}

.index-row:hover .index-title { color: var(--link); }

.index-text {
    margin-top: 10px;
    max-width: 40em;
    color: var(--ink-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.index-meta { font-size: 14px; color: var(--ink-2); }

/* ---------- Article (detail) ---------- */

.article-head {
    padding-top: clamp(48px, 7vw, 88px);
    padding-bottom: clamp(48px, 6vw, 72px);
}

.article-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 6.2vw, 80px);
    line-height: 1.04;
    font-weight: 700;
    letter-spacing: -0.042em;
    max-width: 14em;
}

.article-lede {
    margin-top: 28px;
    max-width: 32em;
    font-size: clamp(19px, 2.1vw, 24px);
    line-height: 1.4;
    color: var(--ink-2);
}

.article-head .button { margin-top: 32px; }

.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 64px;
    margin-top: clamp(48px, 6vw, 72px);
    padding-top: 20px;
    border-top: 1px solid var(--ink);
}

.facts > div { min-width: 120px; max-width: 420px; }

.facts dt {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 6px;
}

.facts dd { font-size: 15px; line-height: 1.45; }

.article-media { margin-bottom: clamp(56px, 7vw, 88px); }
.article-media img { width: 100%; border-radius: var(--radius); }

.prose { padding-bottom: 40px; }

.prose h3 {
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 56px 0 16px;
}

.prose h3:first-child { margin-top: 0; }

.prose h4 {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 32px 0 10px;
}

.prose p { font-size: 19px; line-height: 1.58; margin-bottom: 18px; }

.prose ul { margin: 0 0 24px; }

.prose li {
    position: relative;
    padding-left: 22px;
    font-size: 19px;
    line-height: 1.55;
    margin-bottom: 10px;
}

.prose li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.68em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ink-3);
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0 24px; border-top: 1px solid var(--line); }

.tags li {
    padding: 6px 14px;
    border-radius: 980px;
    background: var(--paper-2);
    font-size: 14px;
    color: var(--ink-2);
}

.article-foot {
    padding-top: 32px;
    padding-bottom: clamp(88px, 11vw, 140px);
}

/* ---------- Key numbers ---------- */

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 28px 56px;
    margin-top: clamp(40px, 5vw, 56px);
}

.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; max-width: 15em; }

.stat dd {
    font-family: var(--font-display);
    font-size: clamp(36px, 4.4vw, 56px);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.stat dt { margin-top: 10px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }

.tile .stats { margin-top: 36px; }
.tile .stat dd { font-size: clamp(36px, 4vw, 48px); }

/* ---------- Figures ---------- */

.fig {
    margin: 40px 0 48px;
    padding: clamp(20px, 3.4vw, 32px);
    border-radius: 18px;
    background: var(--paper-2);
}

.fig-title { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 18px; }

.fig figcaption { margin-top: 18px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }

.fig-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: -6px 0 24px; font-size: 13px; color: var(--ink-2); }
.fig-legend li { display: flex; align-items: center; gap: 8px; }
.fig-swatch { width: 10px; height: 10px; border-radius: 3px; }

.fig-mark { outline: none; }
.fig-mark:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }

/* Columns */
.cols { position: relative; height: 240px; margin-top: 28px; }
.cols ul { display: flex; height: 100%; border-bottom: 1px solid #d2d2d7; }
.cols li { flex: 1; position: relative; display: flex; justify-content: center; align-items: flex-end; }
.col-bar { position: relative; width: 24px; border-radius: 4px 4px 0 0; }
.col-value {
    position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
    padding-bottom: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--ink);
}
.col-label {
    position: absolute; top: 100%; left: 0; right: 0; padding-top: 10px;
    text-align: center; font-size: 13px; color: var(--ink-2);
}
.col-ref { position: absolute; left: 0; right: 0; border-top: 1px solid var(--ink-2); pointer-events: none; }
.col-ref span {
    position: absolute; right: 0; bottom: 4px; padding: 0 0 0 8px;
    font-size: 12px; color: var(--ink-2); background: var(--paper-2);
}
.fig-columns figcaption { margin-top: 44px; }

/* Horizontal bars */
.hbars { display: grid; gap: 14px; }
.hbars li { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); gap: 16px; align-items: center; }
.hbar-label { font-size: 14px; line-height: 1.35; }
.hbar-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hbar-fill { height: 20px; min-width: 3px; border-radius: 0 4px 4px 0; }
.hbar-value { flex: none; font-size: 13px; font-weight: 600; white-space: nowrap; }

.fig-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
.fig-panel-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.fig-panels .hbars li { grid-template-columns: minmax(0, 1fr); gap: 6px; }

/* SVG charts */
.fig-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fig-scroll svg { display: block; width: 100%; min-width: 540px; height: auto; overflow: visible; }
.fig svg text { font-family: var(--font); letter-spacing: -0.01em; }
.fig-axis { font-size: 13px; fill: var(--ink-2); }
.fig-label-strong { font-size: 15px; font-weight: 600; fill: var(--ink); }
.fig-cross { stroke: var(--ink-2); stroke-width: 1; opacity: 0; }
.fig-col:hover .fig-cross, .fig-col:focus .fig-cross { opacity: 0.5; }

/* Flow: a vertical stepper, so it never wraps awkwardly at any width */
.fig ol.flow { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.fig ol.flow li {
    position: relative;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    column-gap: 18px;
    padding: 0 0 22px;
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
}
.fig ol.flow li:last-child { padding-bottom: 0; }
.fig ol.flow li::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 34px;
    bottom: 2px;
    width: 1px;
    height: auto;
    background: #d2d2d7;
    border: 0;
    border-radius: 0;
    transform: none;
}
.fig ol.flow li:last-child::before { content: none; }
.fig ol.flow .flow-step {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0;
    border-radius: 50%;
    background: var(--paper);
    box-shadow: inset 0 0 0 1px #d2d2d7;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--ink);
}
.fig ol.flow .flow-title { margin: 5px 0 0; font-size: 16px; font-weight: 600; line-height: 1.35; letter-spacing: -0.02em; color: var(--ink); }
.fig ol.flow .flow-text { margin: 4px 0 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }

/* Image and table figures */
.fig-frame img { display: block; width: 100%; height: auto; }
.fig-image + .fig-image, .fig-image { padding-bottom: clamp(24px, 3.4vw, 36px); }

.fig-table { overflow-x: auto; }
.fig table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fig th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 0 12px 10px 0; border-bottom: 1px solid var(--ink); }
.fig td { padding: 12px 12px 12px 0; border-bottom: 1px solid #d2d2d7; font-variant-numeric: tabular-nums; }

.fig-data { margin-top: 16px; font-size: 13px; color: var(--ink-2); }
.fig-data summary { cursor: pointer; color: var(--link); width: max-content; }
.fig-data table { margin-top: 12px; font-size: 13px; color: var(--ink); }
.fig-data td { padding: 8px 12px 8px 0; }

/* Prose resets for figure internals */
.prose .fig ul, .prose .fig ol { margin: 0; }
.prose .fig li { padding-left: 0; font-size: inherit; line-height: inherit; margin: 0; }
.prose .fig li::before { content: none; }
.prose .fig p { margin-bottom: 0; }
.prose .fig .fig-title { margin-bottom: 18px; font-size: 17px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.gallery li.wide { grid-column: 1 / -1; }
.gallery img { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06); }
.gallery p { margin-top: 10px; font-size: 13px; color: var(--ink-2); text-align: center; }
.prose .fig .gallery p { margin-top: 10px; font-size: 13px; line-height: 1.4; }

/* Wide figures can break out of the reading column on large screens. */
@media (min-width: 1100px) {
    .prose .fig-wide { margin-left: -140px; margin-right: -140px; }
}
@media (min-width: 1240px) {
    /* Full width of the page grid: (1180 - 2 * 24 - 652) / 2 */
    .prose .fig-wide { margin-left: -240px; margin-right: -240px; }
}

/* Tooltip */
.tip {
    position: fixed; z-index: 20; max-width: 280px; padding: 8px 12px; border-radius: 10px;
    background: rgba(29, 29, 31, 0.92); color: #fff; font-size: 13px; line-height: 1.4;
    pointer-events: none; opacity: 0; transition: opacity 0.12s var(--ease);
}
.tip.is-on { opacity: 1; }

/* ---------- People ---------- */

.group-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
    padding-top: 20px;
    margin-bottom: 32px;
    border-top: 1px solid var(--ink);
}

.people {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 48px 24px;
    margin-bottom: 96px;
}

.people-lg { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 32px; }

.person-photo {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 5;
    margin-bottom: 18px;
    border-radius: 16px;
    background: var(--paper-2);
    overflow: hidden;
}

.person-photo img { width: 100%; height: 100%; object-fit: cover; }

.person-photo span {
    font-family: var(--font-display);
    font-size: 64px;
    font-weight: 600;
    color: var(--line);
}

.person-name { font-size: 21px; font-weight: 600; letter-spacing: -0.025em; }
.person-role { margin-top: 2px; font-size: 15px; color: var(--ink-2); }
.person-bio { margin-top: 14px; font-size: 15px; line-height: 1.5; }
.person-note { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.person-links { display: flex; gap: 18px; margin-top: 14px; font-size: 14px; }
.person-links a { color: var(--link); }
.person-links a:hover { text-decoration: underline; }

/* ---------- Closing band ---------- */

.closing {
    background: var(--paper-2);
    padding: clamp(88px, 11vw, 140px) 0;
    text-align: center;
}

.closing-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.closing-text {
    margin: 18px auto 32px;
    max-width: 28em;
    font-size: 19px;
    color: var(--ink-2);
}

/* ---------- Footer ---------- */

.footer {
    background: var(--paper-2);
    border-top: 1px solid var(--line);
    padding: 28px 0 40px;
    font-size: 12px;
    color: var(--ink-2);
    letter-spacing: -0.01em;
}

.closing + .footer { border-top: 0; }
.closing + .footer .wrap { border-top: 1px solid var(--line); padding-top: 28px; }

.footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.footer-brand { font-size: 13px; font-weight: 600; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Reveal on scroll (only when JS runs) ---------- */

.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .tile, .tile:hover { transition: none; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .index-row { grid-template-columns: minmax(0, 1fr) 140px; }
    .index-row .index-meta:last-child { display: none; }
    .people { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .people-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 734px) {
    :root { --gutter: 16px; --radius: 18px; }
    body { font-size: 16px; }
    .nav-inner { height: 56px; }
    .wordmark { font-size: 18px; }
    .nav-links { gap: 22px; }
    .nav-links a { font-size: 14px; }
    .tiles { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .tile { min-height: 0; }
    .index-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 24px 0; }
    .index-row .index-meta:last-child { display: block; }
    .index-meta { font-size: 13px; }
    .people, .people-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 16px; }
    .prose p, .prose li { font-size: 17px; }
    .prose h3 { font-size: 24px; margin-top: 44px; }
    .fig-panels { grid-template-columns: minmax(0, 1fr); }
    .gallery { grid-template-columns: minmax(0, 1fr); }
    /* Diagrams keep a readable size on phones and scroll sideways instead. */
    .fig-frame { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .fig-frame img { min-width: 640px; }
    .hbars li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .stats { gap: 24px 36px; }
    .col-value { font-size: 11px; }
    .col-label { font-size: 12px; }
}
