/* Warré Archive — one stylesheet, no build step.
   An archive of beekeeping correspondence: a reading environment first. */

/* Light only, on purpose. A summer apiary is a bright place and the archive
   should feel like one — sunlit cream, honey, plenty of air.

   Two honeys, because one cannot do both jobs: --honey is the bright
   decorative fill (bars, the hexagon, tints) and would fail contrast as
   text; --honey-deep is the readable one for links and hovers. */
:root {
    color-scheme: light;

    --paper: #fffdf6;          /* sunlit cream */
    --paper-raised: #ffffff;
    --paper-sunk: #fdf7e8;     /* soft wash for bands and hovers */
    --ink: #322e26;            /* 13.3:1 on --paper */
    --ink-soft: #6e6555;       /*  5.6:1 */
    /* Dates, counts and captions are set small, so the faint tone still has
       to clear 4.5:1 — and on --paper-sunk too, since rows use it on hover.
       A prettier, paler grey here would have been unreadable at 12 px. */
    --ink-faint: #756d5f;      /*  5.0:1 on --paper, 4.8:1 on --paper-sunk */
    --rule: #efe6d2;
    --control-border: #948a78; /* 3.4:1 on white: visible control boundary */
    --honey: #f2b632;          /* decorative only — 1.8:1, never used for text */
    --honey-deep: #8d5f09;     /*  5.5:1 on --paper, 5.0:1 on --honey-soft */
    --honey-soft: #fdf1d2;
    --shadow: 0 1px 2px rgba(93, 71, 20, 0.05), 0 6px 18px rgba(93, 71, 20, 0.06);

    --measure: 34rem;
    --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

/* Dark mode is parked, not deleted. Nothing sets data-theme, so this never
   applies; switching it back on later is one attribute on <html>. */
:root[data-theme="dark"] {
    color-scheme: dark;

    --paper: #16150f;
    --paper-raised: #1f1d16;
    --paper-sunk: #221f17;
    --ink: #e8e3d6;
    --ink-soft: #a49b87;
    --ink-faint: #78705f;
    --rule: #322e24;
    --control-border: #8f8777;
    --honey: #d9a83c;
    --honey-deep: #e2b656;
    --honey-soft: #2e2718;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.25);
}

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

.skip-link {
    position: absolute;
    left: -9999px;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 10;
    background: var(--paper-raised);
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
}

/* ---------------------------------------------------------------- chrome */

/* A band of warm light across the top — the one place the page is allowed
   to be openly cheerful. */
.site-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem clamp(1rem, 5vw, 3rem);
    background: linear-gradient(180deg, var(--honey-soft), var(--paper));
    border-bottom: 1px solid var(--rule);
}

.site-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}

.site-title strong {
    display: block;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

.site-title-app {
    flex: 0 0 auto;
    margin-right: 0.5rem;
}

.site-title em {
    display: block;
    font-style: normal;
    font-size: 0.78rem;
    color: var(--ink-faint);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.site-title-home em {
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 650;
}

/* The hive itself. A hexagon stood here before; it says "honey" in general,
   and this group spent twelve years arguing about one particular box.
   Its own file rather than the favicon's: the tab icon has to survive being
   16 pixels, where three boxes and a 1-pixel entrance close up into a blob,
   so the hexagon keeps that job and this drawing is made for 26. */
.mark {
    width: 26px;
    height: 26px;
    background: url("../hive.svg") center / contain no-repeat;
}

.site-nav {
    display: flex;
    gap: 1.4rem;
    font-size: 0.92rem;
}

.site-nav a {
    text-decoration: none;
    color: var(--ink-soft);
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--ink); }

.site-nav a[aria-current="page"] {
    color: var(--ink);
    border-bottom-color: var(--honey);
}

main {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2.2rem clamp(1rem, 5vw, 3rem) 4rem;
}

.site-footer {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.5rem clamp(1rem, 5vw, 3rem) 3rem;
    border-top: 1px solid var(--rule);
    color: var(--ink-faint);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem 2rem;
    flex-wrap: wrap;
}

.site-footer p { margin: 0; }

.site-footer a { color: inherit; }

.footer-legal {
    display: flex;
    gap: 0.65rem 1.2rem;
    flex-wrap: wrap;
}

/* -------------------------------------------------------------- privacy */

.privacy-page {
    max-width: 52rem;
}

.privacy-header {
    padding-bottom: 1.6rem;
    border-bottom: 1px solid var(--rule);
}

.privacy-updated {
    margin: 0.9rem 0 0;
    color: var(--ink-faint);
    font-size: 0.88rem;
}

.privacy-page section {
    margin-top: 2.2rem;
}

.privacy-page h2 {
    margin: 0 0 0.7rem;
    font-family: var(--serif);
    font-size: 1.45rem;
    line-height: 1.25;
}

.privacy-page p,
.privacy-page li {
    max-width: 48rem;
}

.privacy-page ul {
    padding-left: 1.25rem;
}

.privacy-page li + li {
    margin-top: 0.35rem;
}

.privacy-table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
}

.privacy-page table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.privacy-page th,
.privacy-page td {
    padding: 0.75rem;
    border: 1px solid var(--rule);
    text-align: left;
    vertical-align: top;
}

.privacy-page th {
    background: var(--paper-sunk);
}

.privacy-page code {
    white-space: nowrap;
}

.legal-page address {
    font-style: normal;
    line-height: 1.7;
}

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

.page-header { margin-bottom: 1.8rem; }

.page-header h1 {
    margin: 0 0 0.3rem;
    font-family: var(--serif);
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    font-weight: 600;
    line-height: 1.2;
}

.lede {
    margin: 0;
    color: var(--ink-soft);
    max-width: 42rem;
}

/* Authentication is a short task, not a reading page. Keep its heading
   close to both the site header and the first form control. */
.page-login main { padding-top: 1.25rem; }
.page-login .page-header { margin-bottom: 1rem; }

.breadcrumb { margin: 0 0 1.4rem; }

.back-link {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover { color: var(--ink); }

/* ----------------------------------------------------------- public home */

.home-page { width: 100%; }

.page-home main { max-width: 68rem; }

.home-hero {
    padding: clamp(0.65rem, 1.5vw, 1.2rem) 0 clamp(1.2rem, 2.25vw, 1.75rem);
    border-bottom: 1px solid var(--rule);
}

.home-hero h1 {
    max-width: 70rem;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.02;
}

.home-summary {
    max-width: 58rem;
    margin: 1.35rem 0 0;
    color: var(--ink-soft);
    font-size: 20px;
    line-height: 1.55;
}

.home-lede {
    max-width: 58rem;
    margin: 0.65rem 0 0;
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1.5;
}

.home-lede a { white-space: nowrap; }

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.8rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.7rem;
    /* The font's visual centre sits slightly above its line box. Keep the
       target unchanged, but bias the label down by about one pixel. */
    padding: 0.62rem 1.2rem 0.48rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
}

.button-primary { border-color: var(--honey-deep); background: var(--honey); color: var(--ink); }
.button-primary:hover { background: #e8a91f; }

.button-secondary {
    border-color: var(--control-border);
    background: var(--paper-raised);
    color: var(--ink);
}

.button-secondary:hover { border-color: var(--honey-deep); }

.home-entry-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
}

.home-entry-option {
    min-width: 0;
    padding: 1.2rem 1.3rem;
    border: 1px solid var(--rule);
    border-radius: 14px;
    background: var(--paper-raised);
}

.home-entry-option p {
    margin: 0 0 0.65rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.home-entry-option strong { color: var(--ink); }

.home-digests h2 {
    margin: 0 0 0.8rem;
    font-family: var(--serif);
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    font-weight: 600;
    line-height: 1.2;
}

.home-digests {
    padding-top: clamp(3rem, 7vw, 5rem);
    border-top: 1px solid var(--rule);
}

.home-digests > header { max-width: 48rem; }

.home-digests > header > p:last-child {
    margin: 0;
    color: var(--ink-soft);
}

@media (max-width: 48rem) {
    .home-hero h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
    .home-entry-actions { grid-template-columns: 1fr; }
}

@media (max-width: 34rem) {
    .public-entry-header {
        flex-wrap: nowrap;
        gap: 0.55rem;
        padding: 0.75rem 1rem;
    }

    .public-entry-header .site-title-home {
        min-width: 0;
        gap: 0.55rem;
    }

    .public-entry-header .site-title-home .mark { flex: 0 0 26px; }

    .public-entry-header .site-title-home em {
        overflow: hidden;
        font-size: 0.72rem;
        letter-spacing: 0.04em;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .public-entry-header .language-switch { display: none; }

    .public-entry-header .language-menu {
        display: block;
        flex: 0 0 2.75rem;
        margin-left: auto;
    }

    .public-entry-header .language-menu > summary {
        width: 2.75rem;
        height: 2.75rem;
    }

    .public-entry-header .language-menu-panel a {
        display: flex;
        min-height: 2.75rem;
        align-items: center;
        justify-content: center;
    }

    .page-home main {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }

    .home-hero {
        padding-top: 0;
        padding-bottom: 1rem;
    }

    .home-hero h1 {
        font-size: clamp(2rem, 9.3vw, 2.3rem);
        line-height: 1;
    }

    .home-summary {
        margin-top: 0.85rem;
        font-size: 17px;
        line-height: 1.42;
    }

    .home-lede {
        margin-top: 0.45rem;
        font-size: 0.92rem;
        line-height: 1.4;
    }

    .home-entry-actions {
        gap: 0.65rem;
        margin-top: 1.1rem;
        padding-top: 1rem;
    }

    .home-entry-option {
        display: flex;
        min-height: 4.5rem;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.8rem 1rem;
    }

    .home-entry-option p {
        margin: 0;
        line-height: 1.3;
    }

    .home-entry-option .button {
        min-height: 2.75rem;
        flex: 0 0 auto;
        padding-inline: 1rem;
    }
}

/* -------------------------------------------------------------- digests */

/* Digests are editorial reading pages rather than another archive listing.
   They get more measure and stronger hierarchy, while staying within the
   same quiet paper-and-honey language as the source material. */
.digest-index-header { max-width: 48rem; }

.digest-kicker {
    margin: 0 0 0.45rem;
    color: var(--honey-deep);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.digest-grid {
    list-style: none;
    margin: 2.5rem 0 3rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}

.digest-card { min-width: 0; }

.digest-card a {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    padding: 1.45rem;
    overflow: hidden;
    background: linear-gradient(145deg, var(--paper-raised) 60%, var(--honey-soft));
    border: 1px solid var(--rule);
    border-radius: 14px;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.digest-card a:hover {
    transform: translateY(-2px);
    border-color: #dfc98d;
    box-shadow: 0 2px 4px rgba(93, 71, 20, 0.07), 0 14px 28px rgba(93, 71, 20, 0.11);
}

.digest-card-status {
    margin-bottom: 1rem;
    color: var(--honey-deep);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.digest-card-title {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.15;
}

.digest-card-subtitle {
    margin-top: 0.35rem;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.4;
}

.digest-card-copy {
    margin: 1.1rem 0 1.4rem;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: 0.95rem;
    line-height: 1.55;
}

.digest-card-link {
    margin-top: auto;
    color: var(--honey-deep);
    font-size: 0.82rem;
    font-weight: 650;
}

.digest-method {
    max-width: 48rem;
    padding: 1.35rem 1.5rem;
    background: var(--paper-sunk);
    border-left: 3px solid var(--honey);
    border-radius: 0 10px 10px 0;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.digest-method h2 {
    margin: 0 0 0.45rem;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.15rem;
}

.digest-method p { margin: 0.45rem 0 0; }

.digest-article {
    width: 100%;
    max-width: none;
}

.digest-header {
    width: 100%;
    max-width: none;
    margin-bottom: 3.3rem;
}

.digest-header h1 {
    font-size: clamp(2.1rem, 6vw, 3.7rem);
    letter-spacing: -0.025em;
}

.digest-subtitle {
    margin: 0.55rem 0 0;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: clamp(1.08rem, 2vw, 1.35rem);
    line-height: 1.4;
}

.digest-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 1rem;
    margin: 1.35rem 0;
    color: var(--ink-faint);
    font-size: 0.78rem;
}

.digest-status {
    padding: 0.25rem 0.65rem;
    background: var(--honey-soft);
    border-radius: 999px;
    color: var(--honey-deep);
    font-weight: 700;
}

.digest-standfirst {
    width: 100%;
    max-width: none;
    margin: 1.25rem 0 0;
    font-family: var(--serif);
    font-size: clamp(1.15rem, 2.6vw, 1.45rem);
    line-height: 1.55;
}

.digest-section { margin: 0 0 3.6rem; }

.digest-section > h2 {
    margin: 0 0 1.25rem;
    font-family: var(--serif);
    font-size: clamp(1.45rem, 3vw, 1.9rem);
    font-weight: 600;
}

.digest-summary {
    width: 100%;
    padding-top: 2.1rem;
    border-top: 1px solid var(--rule);
}

.digest-summary-body {
    /* Editorial column flow, not a paragraph grid: reading continues down the
       first column and then into the second. */
    column-count: 2;
    column-gap: 3.25rem;
    column-rule: 1px solid color-mix(in srgb, var(--rule) 70%, transparent);
}

.digest-summary-body p {
    margin: 0 0 1.05rem;
    padding: 0;
    font-family: var(--serif);
    font-size: clamp(1rem, 1.35vw, 1.09rem);
    line-height: 1.72;
}

.digest-summary-body p + p { text-indent: 1.15em; }

.digest-arc {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    counter-reset: digest-phase;
}

.digest-arc::before {
    content: "";
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    height: 1px;
    background: var(--rule);
}

.digest-arc li {
    position: relative;
    padding-top: 2.6rem;
    counter-increment: digest-phase;
}

.digest-arc li::before {
    content: counter(digest-phase);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    background: var(--honey-soft);
    border: 1px solid #e8d59e;
    border-radius: 50%;
    color: var(--honey-deep);
    font-size: 0.76rem;
    font-weight: 750;
}

.digest-phase-label {
    color: var(--ink-faint);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.digest-arc h3 {
    margin: 0.25rem 0 0.55rem;
    font-family: var(--serif);
    font-size: 1.15rem;
    line-height: 1.3;
}

.digest-arc p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.digest-outcome-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.digest-outcome {
    padding: 1.3rem 1.4rem;
    border: 1px solid var(--rule);
    border-radius: 12px;
}

.digest-outcome.is-common { background: #fbf8e9; }
.digest-outcome.is-open { background: var(--paper-raised); }

.digest-outcome h3 {
    margin: 0 0 0.65rem;
    font-family: var(--serif);
    font-size: 1.15rem;
}

.digest-outcome ul {
    margin: 0;
    padding-left: 1.15rem;
}

.digest-outcome li { margin: 0.5rem 0; }

.digest-ending {
    max-width: 48rem;
    margin: 1.7rem 0 0;
    padding-left: 1rem;
    border-left: 3px solid var(--honey);
    font-family: var(--serif);
    font-size: 1.15rem;
}

.digest-caution {
    max-width: 48rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--rule);
    color: var(--ink-faint);
    font-size: 0.82rem;
}

.digest-caution strong { color: var(--ink-soft); }
.digest-caution p { margin: 0.25rem 0 0; }

.digest-citation-marker {
    margin-left: 0.12rem;
    font-family: var(--sans);
    font-size: 0.62em;
    font-weight: 700;
    line-height: 0;
    vertical-align: super;
}

.digest-citation-marker a {
    color: var(--honey-deep);
    text-decoration: none;
}

.digest-citation-marker a:hover,
.digest-citation-marker a:focus-visible { text-decoration: underline; }

.digest-citations {
    max-width: 48rem;
    margin-top: 3.8rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
}

.digest-citations h2 {
    margin: 0 0 0.35rem;
    font-family: var(--serif);
    font-size: 1.55rem;
}

.digest-citations header > p:last-child {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.digest-citations > ol {
    margin: 1.4rem 0 0;
    padding-left: 1.8rem;
}

.digest-citations > ol > li {
    margin: 0 0 1.35rem;
    padding: 0 0 1.2rem 0.35rem;
    border-bottom: 1px solid var(--rule);
}

.digest-citations > ol > li:target {
    background: linear-gradient(90deg, var(--honey-soft), transparent);
}

.digest-citations > ol > li > p { margin: 0.2rem 0 0.5rem; }

.digest-citation-type {
    color: var(--honey-deep);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.digest-citation-links {
    margin: 0.55rem 0 0;
    padding-left: 1.1rem;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.digest-citation-links li { margin: 0.3rem 0; }
.digest-citation-links a { color: var(--honey-deep); }

.digest-citation-stale {
    display: block;
    color: var(--danger, #8f2d1d);
    font-size: 0.75rem;
}

.digest-citation-back {
    color: var(--ink-faint);
    font-size: 0.75rem;
}

.digest-sources {
    margin-top: 3.8rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
}

.digest-sources > header { max-width: 42rem; }

.digest-sources h2 {
    margin: 0 0 0.35rem;
    font-family: var(--serif);
    font-size: 1.55rem;
}

.digest-sources header > p:last-child {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.digest-sources ol {
    list-style: none;
    margin: 1.35rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 1.4rem;
}

.digest-sources li { min-width: 0; }

.digest-sources a {
    display: block;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
}

.digest-source-title {
    display: block;
    overflow: hidden;
    font-family: var(--serif);
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.digest-sources a:hover .digest-source-title { color: var(--honey-deep); }

.digest-source-meta {
    display: block;
    margin-top: 0.15rem;
    color: var(--ink-faint);
    font-size: 0.72rem;
}

@media (max-width: 58rem) {
    .digest-grid { grid-template-columns: 1fr; }
    .digest-card a { min-height: 0; }
}

@media (max-width: 44rem) {
    .digest-arc,
    .digest-outcome-grid { grid-template-columns: 1fr; }

    .digest-summary-body {
        column-count: 1;
        column-rule: 0;
    }

    .digest-sources ol { grid-template-columns: 1fr; }

    .digest-arc { gap: 1.7rem; }

    .digest-arc::before {
        top: 1rem;
        bottom: 1rem;
        left: 1rem;
        right: auto;
        width: 1px;
        height: auto;
    }

    .digest-arc li { padding: 0 0 0 3rem; }
}

/* ------------------------------------------------------------- year rail */

.discussion-filters {
    margin: 0 0 2rem;
    padding: 1.1rem 1.2rem 1.2rem;
    border: 1px solid var(--rule);
    border-radius: 12px;
    background: var(--paper-raised);
}

.discussion-filters h2 {
    margin: 0 0 0.9rem;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.3;
}

/* The rail is a histogram you can click, not a pager. Two-digit labels
   (07, 08, 09 …) are page numbers to any eye, a horizontal scrollbar under
   the row made it worse, and it ran oldest-first under a listing that is
   newest-first. So: four digits, no scrolling, newest on the left.

   A grid, not a flex row. Flex wrapping puts whatever lands on the last
   line either stretched (with flex-grow) or ragged (without); grid columns
   are the same on every line, so a wrapped 2009–2007 sits under 2026–2024
   instead of drifting. */
.year-rail {
    display: grid;
    grid-template-columns: 3.7rem minmax(0, 1fr);
    align-items: flex-end;
    gap: 0.55rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--rule);
}

.page-albums .year-rail {
    margin-bottom: 1.5rem;
}

.rail-label {
    padding: 0 0 0.35rem;
    color: var(--ink-faint);
    font-size: 0.88rem;
    white-space: nowrap;
}

.year-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(2.8rem, 1fr));
    gap: 2px;
}

.year {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    height: 2.75rem;
    padding: 0.25rem 0.15rem;
    border-radius: 5px;
    text-decoration: none;
    color: var(--ink-faint);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

/* The body line-height would spend a third of the cell on one line of four
   digits, and the bar gets whatever the label leaves. */
.year-label { line-height: 1.2; }

.year:hover { background: var(--honey-soft); color: var(--ink); }

.year.is-active {
    background: var(--honey-soft);
    color: var(--ink);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px var(--honey-deep);
}

.year-bar {
    display: block;
    flex: none;
    width: 100%;
    max-width: 1.6rem;
    /* Decorative fill, so --honey rather than a grey; at rest it is faded
       far enough not to compete with the text it sits above. */
    background: var(--honey);
    opacity: 0.4;
    border-radius: 2px 2px 0 0;
}

/* Ten steps rather than an exact pixel height, because the exact height
   would have to arrive as style="height: 14px" — and the archive sends
   style-src 'self' with no 'unsafe-inline', so the browser dropped every
   one of those attributes. The bars were in the markup and had been
   invisible from the day the CSP header was added. Buckets are plenty for
   a shape you read at a glance. */
.year-bar.h1  { height: 2px }
.year-bar.h2  { height: 4px }
.year-bar.h3  { height: 5px }
.year-bar.h4  { height: 7px }
.year-bar.h5  { height: 9px }
.year-bar.h6  { height: 11px }
.year-bar.h7  { height: 13px }
.year-bar.h8  { height: 14px }
.year-bar.h9  { height: 16px }
.year-bar.h10 { height: 18px }

.year:hover .year-bar, .year.is-active .year-bar { opacity: 1; }

/* ------------------------------------------------------------- tag rail */

/* The busiest terms remain visible; the complete vocabulary is one native
   disclosure away. An active term is always pinned to the visible row. */
.tag-rail {
    display: grid;
    grid-template-columns: 3.7rem minmax(0, 1fr);
    align-items: start;
    gap: 0.55rem;
}

.tag-controls {
    min-width: 0;
}

.tag-grid {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tag {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
    padding: 0.12rem 0.5rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 0.8rem;
    white-space: nowrap;
}

.tag:hover { border-color: var(--honey); color: var(--ink); }

.tag.is-active {
    background: var(--honey-soft);
    border-color: var(--honey-deep);
    color: var(--ink);
    font-weight: 600;
}

/* Greyed, never removed. That a term holds nothing in the year you picked is
   a fact about the archive, and a rail that drops entries cannot state it. */
.tag.is-empty {
    border-style: dashed;
    color: var(--ink-faint);
    opacity: 0.55;
}

.tag-count {
    color: var(--ink-faint);
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
}

.tag.is-active .tag-count { color: var(--honey-deep); }

.topic-more { margin-top: 0.55rem; }

.topic-more > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--honey-deep);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.topic-more > summary::-webkit-details-marker { display: none; }

.topic-more > summary::after { content: "↓"; }

.topic-more[open] > summary::after { content: "↑"; }

.topic-more > summary:hover {
    border-color: var(--rule);
    background: var(--honey-soft);
    color: var(--ink);
}

.topic-more[open] > summary { margin-bottom: 0.65rem; }

/* A year the tag selection empties: same rule as a term at zero. */
.year.is-empty {
    opacity: 0.35;
    cursor: default;
}

/* ----------------------------------------------------------------- tools */

.list-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--rule);
    font-size: 0.88rem;
}

.sort-label {
    width: 3.7rem;
    flex: 0 0 3.7rem;
    color: var(--ink-faint);
}

.chip {
    padding: 0.2rem 0.7rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink-soft);
}

.chip:hover { border-color: var(--honey); color: var(--ink); }

.chip.is-active {
    background: var(--honey-soft);
    border-color: var(--honey-deep);
    color: var(--ink);
    font-weight: 600;
}

.filter-state {
    margin-right: 0.12rem;
    font-weight: 700;
}

.chip-clear { margin-left: auto; }

.discussion-result-count {
    margin-left: 0.45rem;
    color: var(--ink-faint);
    font-size: 0.84rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ----------------------------------------------------------- thread list */

.thread-list {
    list-style: none;
    max-width: 68rem;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--rule);
    border-radius: 12px;
    background: var(--paper-raised);
}

.thread-row {
    border-bottom: 1px solid var(--rule);
}

.thread-row:last-child { border-bottom: 0; }

.thread-row:hover { background: var(--honey-soft); }

.thread-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 1.5rem;
    padding: 1rem 1.1rem;
    text-decoration: none;
    min-width: 0;
}

.thread-link:focus-visible {
    outline: 2px solid var(--honey-deep);
    outline-offset: -3px;
    background: var(--honey-soft);
}

.thread-copy,
.thread-head { display: block; min-width: 0; }

.thread-subject {
    display: block;
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.4;
}

.thread-link:hover .thread-subject { color: var(--honey-deep); }

.thread-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 0.42rem;
    margin-left: 0.45rem;
    color: var(--ink-faint);
    font-size: 0.76rem;
    line-height: 1.35;
}

.thread-meta > * + *::before {
    content: "·";
    margin: 0 0.45rem;
}

/* The whole summary at the head of a thread, before the counts. */
.thread-summary-full {
    max-width: var(--measure);
    margin: 0.6rem 0 0.9rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.55;
}

/* Its own block under the label line, and indented to nothing: prose starts
   at the left edge like the subject above it, so the eye has one margin to
   follow down the page instead of one per row. */
.thread-summary {
    max-width: 74ch;
    margin-top: 0.28rem;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.thread-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.55rem;
}

.thread-topic {
    padding: 0.08rem 0.45rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--paper-sunk);
    color: var(--ink-faint);
    font-size: 0.7rem;
    line-height: 1.4;
}

.thread-count {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    color: var(--ink-faint);
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
}

.thread-count > span {
    padding: 0.22rem 0.55rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--paper-sunk);
}

.thread-count strong {
    display: inline;
    color: var(--ink);
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

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

/* ------------------------------------------------------------ pagination */

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    font-size: 0.9rem;
}

.page-step {
    padding: 0.45rem 1rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink-soft);
}

.page-step:hover { border-color: var(--honey); color: var(--ink); }

.page-step.is-disabled { opacity: 0.35; }

.page-status { color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- thread */

.thread { max-width: var(--measure); }

.thread-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--honey);
}

.thread-header h1 {
    margin: 0 0 0.4rem;
    font-family: var(--serif);
    font-size: clamp(1.5rem, 3.6vw, 2rem);
    font-weight: 600;
    line-height: 1.25;
}

.thread-facts {
    margin: 0;
    color: var(--ink-faint);
    font-size: 0.85rem;
}

.message {
    padding: 1.4rem 0;
    border-bottom: 1px solid var(--rule);
}

.message-header {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.message-author {
    font-weight: 600;
    font-size: 0.92rem;
}

.message-date {
    color: var(--ink-faint);
    font-size: 0.8rem;
    text-decoration: none;
}

.message-date:hover { color: var(--honey-deep); }

.message-body {
    font-family: var(--serif);
    font-size: 1.04rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.message-body p { margin: 0 0 0.9rem; }

.message-body p:last-child { margin-bottom: 0; }

.message-body a { color: var(--honey-deep); }

.message-empty {
    color: var(--ink-faint);
    font-family: var(--sans);
    font-size: 0.88rem;
    font-style: italic;
}

/* Quoted text: present, collapsed, never gone. */
.quoted {
    margin: 0 0 0.9rem;
    border-left: 2px solid var(--rule);
    padding-left: 0.9rem;
}

.quoted summary {
    cursor: pointer;
    color: var(--ink-faint);
    font-size: 0.8rem;
    list-style: none;
}

.quoted summary::-webkit-details-marker { display: none; }

.quoted summary::before {
    content: "▸ ";
    display: inline-block;
    transition: transform 0.15s;
}

.quoted[open] summary::before { content: "▾ "; }

.quoted summary:hover { color: var(--ink-soft); }

.quoted-body {
    margin-top: 0.6rem;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: 0.94rem;
    overflow-wrap: anywhere;
}

.quoted-body p { margin: 0 0 0.7rem; }

.signature {
    margin-top: 0.9rem;
    color: var(--ink-faint);
    font-size: 0.78rem;
    line-height: 1.45;
}

.signature p { margin: 0; }

.signature a { color: inherit; }

/* ------------------------------------------------------------ thread nav */

.thread-nav {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
}

.thread-nav-link {
    flex: 1;
    max-width: 20rem;
    text-decoration: none;
    color: var(--ink-soft);
}

.thread-nav-link.is-next { text-align: right; }

.thread-nav-link .dir {
    display: block;
    color: var(--ink-faint);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.thread-nav-link .subject {
    display: block;
    margin-top: 0.2rem;
    font-family: var(--serif);
    font-size: 0.95rem;
}

.thread-nav-link:hover .subject { color: var(--honey-deep); }

/* ---------------------------------------------------------------- mobile */

@media (max-width: 34rem) {
    body { font-size: 16px; }

    .discussion-filters { padding: 0.9rem; }

    .tag-rail,
    .year-rail { grid-template-columns: 1fr; gap: 0.35rem; }

    .rail-label { padding: 0; }

    .tag-grid-primary li:nth-child(n + 5) { display: none; }

    .list-tools { flex-wrap: wrap; }

    .sort-label { width: 100%; flex-basis: 100%; }

    .chip-clear { margin-left: 0; }

    .thread-link {
        grid-template-columns: 1fr;
        gap: 0.45rem;
        padding: 0.9rem;
    }

    .thread-count {
        justify-content: flex-start;
    }

    .thread-nav { flex-direction: column; }

    .thread-nav-link.is-next { text-align: left; }
}

/* --------------------------------------------------------------- albums */

.album-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.6rem 1.2rem;
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}

.album-card a {
    display: block;
    text-decoration: none;
}

.album-cover {
    display: block;
    aspect-ratio: 4 / 3;
    margin-bottom: 0.65rem;
    background: var(--paper-raised);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.album-card a:hover .album-cover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(93, 71, 20, 0.07), 0 12px 26px rgba(93, 71, 20, 0.12);
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.album-card a:hover .album-cover img { transform: scale(1.03); }

.album-cover-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0.5rem;
    color: var(--ink-faint);
    font-size: 0.75rem;
    text-align: center;
}

.album-card.is-empty .album-cover {
    box-shadow: none;
    border: 1px dashed var(--rule);
}

.album-card.is-empty .album-name { color: var(--ink-soft); }

.album-name {
    display: block;
    font-family: var(--serif);
    font-size: 1rem;
    line-height: 1.3;
}

.album-card a:hover .album-name { color: var(--honey-deep); }

.album-meta {
    display: block;
    margin-top: 0.15rem;
    color: var(--ink-faint);
    font-size: 0.78rem;
}

/* ---------------------------------------------------------------- photos */

.notice {
    margin: 0 0 1.5rem;
    padding: 0.75rem 1.1rem;
    background: var(--honey-soft);
    border-radius: 10px;
    color: var(--ink-soft);
    font-size: 0.85rem;
}

.photo-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.8rem 1.2rem;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}

.photo > figure { margin: 0; }

.photo img {
    width: 100%;
    height: auto;
    display: block;
    background: var(--paper-raised);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.photo a:hover img {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(93, 71, 20, 0.07), 0 12px 26px rgba(93, 71, 20, 0.12);
}

.photo-caption {
    margin-top: 0.45rem;
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.4;
}

/* ----------------------------------------------------------------- focus */

:where(a, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--honey-deep);
    outline-offset: 3px;
    border-radius: 3px;
}

/* --------------------------------------------------------------- byline */

.byline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
}

.byline-person {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0.7rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--paper-raised);
    text-decoration: none;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--ink-soft);
    cursor: pointer;
}

.byline-person:hover {
    border-color: var(--honey);
    background: var(--honey-soft);
    color: var(--ink);
}

.byline.is-collapsed li:nth-child(n+9) { display: none; }

.byline.is-collapsed li:last-child { display: block; }

.byline-more,
.admin-sync-more {
    padding: 0.25rem 0.7rem;
    border: 1px dashed var(--rule);
    border-radius: 999px;
    background: none;
    color: var(--ink-faint);
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
}

.byline-more:hover,
.admin-sync-more:hover { border-color: var(--honey); color: var(--ink); }

.byline-name { font-weight: 600; }

.byline-count {
    color: var(--ink-faint);
    font-variant-numeric: tabular-nums;
}

/* The photo count, not a badge. A marker would light up on nearly every
   name — 9 of 10 contributors in a typical thread own albums — and a signal
   that always fires carries no information. The number does: it separates
   someone with 300 photographs from someone with one. */
.byline-photos {
    display: inline-flex;
    align-items: baseline;
    color: var(--honey-deep);
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
}

.visually-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------- person */

.person-card {
    max-width: var(--measure);
    margin: 0 0 2rem;
}

.person-name {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.2;
}

.person-aliases {
    margin: 0.25rem 0 0;
    color: var(--ink-faint);
    font-size: 0.82rem;
}

.person-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
    margin: 1.2rem 0 0;
    padding: 0.9rem 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.person-stats div { margin: 0; }

.person-stats dt {
    color: var(--ink-faint);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.person-stats dd {
    margin: 0.1rem 0 0;
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
}

.person-subhead {
    margin: 1.6rem 0 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-faint);
}

.person-albums {
    display: grid;
    gap: 1rem 0.9rem;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.person-albums a { text-decoration: none; display: block; }

.person-album-cover {
    display: block;
    aspect-ratio: 4 / 3;
    margin-bottom: 0.4rem;
    background: var(--paper-sunk);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.person-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.person-album-name {
    display: block;
    font-family: var(--serif);
    font-size: 0.88rem;
    line-height: 1.3;
}

.person-albums a:hover .person-album-name { color: var(--honey-deep); }

.person-album-meta {
    display: block;
    color: var(--ink-faint);
    font-size: 0.74rem;
}

.person-more {
    margin: 0.8rem 0 0;
    color: var(--ink-faint);
    font-size: 0.82rem;
}

.person-more a { color: var(--honey-deep); }

.person-loading { color: var(--ink-faint); }

/* --------------------------------------------------------------- dialog */

.person-dialog {
    width: min(34rem, calc(100vw - 2rem));
    padding: 1.6rem 1.8rem 1.8rem;
    border: none;
    border-radius: 14px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 10px 50px rgba(60, 44, 12, 0.28);
}

.person-dialog::backdrop {
    background: rgba(52, 40, 16, 0.42);
}

.person-dialog .person-card { margin-bottom: 0; }

.person-dialog-close {
    position: absolute;
    top: 0.5rem;
    right: 0.7rem;
    padding: 0.2rem 0.5rem;
    border: none;
    background: none;
    color: var(--ink-faint);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
}

.person-dialog-close:hover { color: var(--ink); background: var(--paper-sunk); }

/* On a phone the same dialog becomes a bottom sheet: it arrives from the
   edge the thumb is already at, and it may grow no taller than the screen. */
@media (max-width: 34rem) {
    .person-dialog {
        width: 100%;
        max-width: none;
        max-height: 88vh;
        margin: auto auto 0;
        padding: 1.3rem 1.2rem 2rem;
        border-radius: 16px 16px 0 0;
        overflow-y: auto;
        animation: sheet-up 0.22s ease-out;
    }

    /* The grab handle sells "drag me", even though it is only decoration. */
    .person-dialog::before {
        content: "";
        display: block;
        width: 2.4rem;
        height: 0.25rem;
        margin: 0 auto 0.9rem;
        background: var(--rule);
        border-radius: 999px;
    }
}

@keyframes sheet-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .person-dialog { animation: none; }
}

/* --------------------------------------------------------------- search */

.header-search {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    /* The panel hangs off this box. */
    position: relative;
}

.header-search input {
    width: clamp(16rem, 20vw, 22rem);
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: var(--paper-raised);
    color: var(--ink);
    font: inherit;
    font-size: 0.85rem;
}

.header-search input:focus {
    outline: 2px solid var(--honey-deep);
    outline-offset: 1px;
    border-color: transparent;
}

/* The help, as a disclosure. A question mark rather than the word: the
   header already carries a name, two links and a language switch, and this
   is the least of them. */
.search-help > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    color: var(--ink-faint);
    font-size: 0.9rem;
    cursor: help;
    list-style: none;
    user-select: none;
}

.search-help > summary::-webkit-details-marker { display: none; }

.search-help > summary:hover,
.search-help[open] > summary {
    border-color: var(--honey);
    color: var(--ink);
}

.search-help > summary:focus-visible {
    outline: 2px solid var(--honey-deep);
    outline-offset: 1px;
}

.search-help-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.5rem);
    right: 0;
    width: min(26rem, calc(100vw - 2rem));
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--paper-raised);
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.10);
    color: var(--ink-soft);
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: left;
}

.search-help-panel p { margin: 0 0 0.6rem; }
.search-help-panel ul { margin: 0 0 0.6rem; padding-left: 1.1rem; }
.search-help-panel li { margin-bottom: 0.35rem; }
.search-help-panel p:last-child { margin-bottom: 0; }

.search-help-mobile-trigger {
    display: none;
}

.search-help-sheet {
    width: 100%;
    max-width: none;
    max-height: min(70dvh, 34rem);
    margin: auto 0 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--rule);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    background: var(--paper-raised);
    color: var(--ink);
    box-shadow: 0 -10px 30px rgb(0 0 0 / 0.14);
}

.search-help-sheet::backdrop {
    background: rgb(37 31 23 / 0.38);
}

.search-help-sheet-frame {
    max-height: min(70dvh, 34rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.45rem 1.1rem max(1.2rem, env(safe-area-inset-bottom));
}

.search-help-sheet-frame::before {
    content: "";
    display: block;
    width: 2.5rem;
    height: 0.25rem;
    margin: 0 auto 0.35rem;
    border-radius: 999px;
    background: var(--rule);
}

.search-help-sheet-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.25rem 0 0.65rem;
    background: none;
    border: 0;
}

.search-help-sheet-header h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.35rem;
}

.search-help-sheet-close {
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 2.75rem;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-size: 1.35rem;
    cursor: pointer;
}

.search-help-sheet-close:hover { border-color: var(--honey); color: var(--ink); }

.search-help-sheet-close:focus-visible {
    outline: 2px solid var(--honey-deep);
    outline-offset: 2px;
}

.search-help-sheet-body {
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.55;
}

.search-help-sheet-body p { margin: 0 0 0.75rem; }
.search-help-sheet-body ul { margin: 0 0 0.75rem; padding-left: 1.2rem; }
.search-help-sheet-body li { margin-bottom: 0.45rem; }
.search-help-sheet-body p:last-child { margin-bottom: 0; }

.has-search-help-sheet { overflow: hidden; }

.search-form {
    display: flex;
    gap: 0.6rem;
    margin: 0 0 1.6rem;
    max-width: 42rem;
}

.search-form input {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 1.1rem;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: var(--paper-raised);
    color: var(--ink);
    font: inherit;
    box-shadow: var(--shadow);
}

.search-form input:focus {
    outline: 2px solid var(--honey-deep);
    outline-offset: 1px;
    border-color: transparent;
}

.search-form button {
    padding: 0.7rem 1.4rem;
    border: none;
    border-radius: 999px;
    background: var(--honey-deep);
    color: #fffdf6;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.search-form button:hover { background: var(--ink); }

.search-hint {
    max-width: 42rem;
    padding: 1.1rem 1.3rem;
    background: var(--paper-sunk);
    border-radius: 12px;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.search-hint p { margin: 0 0 0.6rem; }

.search-hint ul { margin: 0 0 0.6rem; padding-left: 1.1rem; }

.search-hint li { margin-bottom: 0.35rem; }

.search-hint-syntax { margin-bottom: 0; font-size: 0.84rem; }

.search-hint code {
    padding: 0.05rem 0.35rem;
    background: var(--paper-raised);
    border-radius: 4px;
    font-size: 0.85em;
}

.search-empty {
    max-width: 42rem;
    padding: 1.2rem 1.4rem;
    background: var(--honey-soft);
    border-radius: 12px;
    color: var(--ink-soft);
}

.search-empty p { margin: 0 0 0.6rem; }

.search-empty p:last-child { margin-bottom: 0; }

.search-empty strong { color: var(--ink); }

.search-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.8rem;
    margin: 0 0 1.2rem;
    color: var(--ink-faint);
    font-size: 0.85rem;
}

.search-arms { display: flex; gap: 0.4rem; }

.arm {
    padding: 0.1rem 0.6rem;
    background: var(--honey-soft);
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.76rem;
}

.search-time { margin-left: auto; font-variant-numeric: tabular-nums; }

.result-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 44rem;
}

.result {
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--rule);
}

.result-link { text-decoration: none; }

.result-subject {
    font-family: var(--serif);
    font-size: 1.1rem;
    line-height: 1.3;
}

.result-link:hover .result-subject { color: var(--honey-deep); }

.result-meta {
    margin: 0.2rem 0 0.5rem;
    color: var(--ink-faint);
    font-size: 0.8rem;
}

.result-why, .result-both { color: var(--honey-deep); }

.result-snippet {
    margin: 0;
    font-family: var(--serif);
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--ink-soft);
    overflow-wrap: anywhere;
}

.result-snippet mark {
    background: var(--honey-soft);
    color: var(--ink);
    padding: 0 0.1em;
    border-radius: 3px;
}

@media (max-width: 34rem) {
    .app-header {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto auto auto;
        gap: 0.45rem;
        padding: 0.8rem 1rem;
    }

    .app-header .site-title-app {
        grid-column: 1;
        grid-row: 1;
        margin-right: 0;
    }

    .app-header .site-title-app strong {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .app-header .site-nav {
        grid-column: 2;
        grid-row: 1;
        gap: 0.65rem;
        min-width: 0;
        font-size: 0.8rem;
    }

    .app-header .site-nav a {
        display: inline-flex;
        min-height: 2.75rem;
        align-items: center;
    }

    .app-header .header-search {
        display: flex;
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        margin-left: 0;
    }

    .app-header .header-search form {
        flex: 1 1 auto;
        min-width: 0;
    }

    .app-header .header-search input { width: 100%; }

    .app-header .header-search input { min-height: 2.75rem; }

    .app-header .search-help > summary {
        width: 2.75rem;
        height: 2.75rem;
        flex-basis: 2.75rem;
    }

    .has-search-help-sheet-support .app-header .search-help { display: none; }

    .has-search-help-sheet-support .app-header .search-help-mobile-trigger {
        display: inline-flex;
        width: 2.75rem;
        height: 2.75rem;
        flex: 0 0 2.75rem;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid var(--control-border);
        border-radius: 999px;
        background: transparent;
        color: var(--ink-faint);
        font: inherit;
        cursor: pointer;
    }

    .app-header .search-help-mobile-trigger:hover {
        border-color: var(--honey);
        color: var(--ink);
    }

    .app-header .search-help-mobile-trigger:focus-visible {
        outline: 2px solid var(--honey-deep);
        outline-offset: 2px;
    }

    .search-form { flex-direction: column; }
    .search-form button { width: 100%; }
}

/* ------------------------------------------------------------- language */

.language-switch {
    display: flex;
    gap: 0;
    align-items: center;
    padding: 0.12rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--paper-raised);
}

.language-switch a {
    display: inline-flex;
    min-width: 2.1rem;
    min-height: 1.75rem;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink-faint);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.language-switch a:hover { background: var(--honey-soft); color: var(--ink); }

.language-switch a[aria-current="true"] {
    background: var(--honey-deep);
    color: #fffdf6;
}

.language-menu {
    display: none;
    position: relative;
}

.language-menu > summary {
    display: flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: var(--paper-raised);
    color: var(--ink);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    list-style: none;
}

.language-menu > summary::-webkit-details-marker { display: none; }

.language-menu > summary:focus-visible {
    outline: 2px solid var(--honey-deep);
    outline-offset: 2px;
}

.language-menu-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.4rem);
    right: 0;
    display: grid;
    min-width: 4.25rem;
    padding: 0.3rem;
    border: 1px solid var(--rule);
    border-radius: 9px;
    background: var(--paper-raised);
    box-shadow: 0 0.45rem 1.25rem rgba(62, 51, 35, 0.13);
}

.language-menu-panel a {
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    color: var(--ink-faint);
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-align: center;
    text-decoration: none;
}

.language-menu-panel a:hover { background: var(--honey-soft); color: var(--ink); }

.language-menu-panel a[aria-current="true"] {
    background: var(--honey-soft);
    color: var(--honey-deep);
}

/* A translation must never be mistaken for what someone wrote. The notice
   is stated plainly and the original is one click away, everywhere. */
.translation-notice {
    margin: 0.9rem 0 0;
    padding: 0.6rem 0.9rem;
    background: var(--honey-soft);
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.5;
}

.translation-notice strong { color: var(--ink); }

.translation-notice a { color: var(--honey-deep); }

.original {
    margin-top: 0.8rem;
    border-left: 2px solid var(--honey-soft);
    padding-left: 0.9rem;
}

.original summary {
    cursor: pointer;
    color: var(--ink-faint);
    font-size: 0.78rem;
    list-style: none;
}

.original summary::-webkit-details-marker { display: none; }

.original summary::before { content: "▸ "; }

.original[open] summary::before { content: "▾ "; }

.original summary:hover { color: var(--ink-soft); }

.original-body {
    margin-top: 0.5rem;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: 0.94rem;
    overflow-wrap: anywhere;
}

.original-body p { margin: 0 0 0.7rem; }

@media (max-width: 34rem) {
    .site-header:not(.app-header) .language-switch { order: 3; }
    .app-header .language-switch { display: none; }

    .app-header .language-menu {
        display: block;
        grid-column: 3;
        grid-row: 1;
    }

    .app-header .language-menu > summary {
        width: 2.75rem;
        height: 2.75rem;
    }

    .app-header .language-menu-panel a {
        display: flex;
        min-height: 2.75rem;
        align-items: center;
        justify-content: center;
    }

    .app-header .admin-link {
        grid-column: 4;
        grid-row: 1;
        width: 2.75rem;
        height: 2.75rem;
        flex-basis: 2.75rem;
    }

    .app-header .session-out {
        grid-column: 5;
        grid-row: 1;
    }

    .app-header .session-out button {
        height: 2.75rem;
        padding-inline: 0.75rem;
    }
}

/* Older 320 px phones cannot hold both archive navigation and all account
   controls on one line. Give navigation its own compact row instead of
   clipping a destination; search remains full-width directly below it. */
@media (max-width: 24rem) {
    .app-header { grid-template-columns: auto minmax(0, 1fr) auto auto; }

    .app-header .site-nav {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .app-header .language-menu {
        grid-column: 2;
        justify-self: end;
    }

    .app-header .admin-link { grid-column: 3; }
    .app-header .session-out { grid-column: 4; }

    .app-header .header-search { grid-row: 3; }
}

/* ---------------------------------------------------------- attachments */

/* Images sit in the message that carried them — the thing the Yahoo half
   could never say about its albums. */
.message-images {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
}

.message-images img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.message-images a:hover img {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(93, 71, 20, 0.07), 0 12px 26px rgba(93, 71, 20, 0.12);
}

.message-files {
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
    font-family: var(--sans);
    font-size: 0.85rem;
}

.file {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.35rem 0.7rem;
    margin-bottom: 0.25rem;
    background: var(--paper-sunk);
    border-radius: 7px;
}

.file::before {
    content: "▤";
    color: var(--honey-deep);
    font-size: 0.9em;
}

.file-pdf::before { content: "▦"; }
.file-video::before { content: "▶"; }
.file-archive::before { content: "▣"; }

.file a { color: var(--honey-deep); }

.file-size {
    margin-left: auto;
    color: var(--ink-faint);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.file-lost { color: var(--ink-faint); text-decoration: line-through; }

/* In the listing: how much is in a thread besides talk. */
.thread-media {
    display: inline;
    color: var(--honey-deep);
    font-size: 0.74rem;
    white-space: nowrap;
}

/* ------------------------------------------------------------------ access */

/* The login page carries the site's own face rather than a bare form: for a
   visitor who lands here from a search engine it is the only page there is,
   and a closed door that looks like the house is friendlier than one that
   looks like an error. */

.login-first-access {
    max-width: 34rem;
    margin: 1.5rem 0 0;
    padding: 1.15rem 1.25rem 1.25rem;
    border: 1px solid var(--rule);
    border-left: 4px solid var(--honey);
    border-radius: 8px;
    background: var(--honey-soft);
}

.login-first-access .eyebrow {
    margin: 0 0 0.25rem;
}

.login-first-access h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.35rem;
}

.login-first-access p:not(.eyebrow) {
    margin: 0.55rem 0 1rem;
    color: var(--ink-soft);
}

.login-first-access .button {
    display: inline-block;
}

.access-guidance {
    max-width: 34rem;
    margin: 1.5rem 0 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--rule);
    border-left: 4px solid var(--honey);
    border-radius: 8px;
    background: var(--honey-soft);
    color: var(--ink);
}

.access-guidance ul {
    margin: 0;
    padding-left: 1.15rem;
}

.access-guidance li + li { margin-top: 0.5rem; }

.access-guidance a {
    color: var(--honey-deep);
    font-weight: 600;
}

.login-form {
    display: grid;
    gap: 0.4rem;
    max-width: 22rem;
    margin-top: 1.25rem;
}

.login-form label {
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.login-form input {
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--control-border);
    border-radius: 7px;
    background: var(--paper-raised);
    color: var(--ink);
    font: inherit;
}

.login-form input:focus {
    outline: 2px solid var(--honey-deep);
    outline-offset: 1px;
}

.field-hint {
    margin: 0 0 0.15rem;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.login-form button {
    justify-self: start;
    margin-top: 0.6rem;
    padding: 0.5rem 1.4rem;
    border: 1px solid var(--honey-deep);
    border-radius: 999px;
    background: var(--honey);
    /* --honey is 1.8:1 and never carries text; --ink does, at 13.3:1 on it. */
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.login-form button:hover { background: #e8a91f; }

.login-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-top: 0.6rem;
}

.login-form-actions button { margin-top: 0; }

.login-form-actions a {
    color: var(--honey-deep);
    font-size: 0.88rem;
}

.login-error {
    max-width: 22rem;
    margin: 0;
    padding: 0.6rem 0.8rem;
    border-left: 3px solid var(--honey-deep);
    background: var(--honey-soft);
    color: var(--ink);
    font-size: 0.92rem;
}

.login-success {
    max-width: 32rem;
    margin: 1.4rem 0 0;
    padding: 0.75rem 0.9rem;
    border-left: 3px solid #657a37;
    background: #f1f3df;
    color: var(--ink);
    font-size: 0.92rem;
}

.auth-note {
    max-width: 32rem;
    margin: 1rem 0 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.auth-note a { color: var(--honey-deep); }

/* ---------------------------------------------------------- administration */

.admin-message { margin-bottom: 1.25rem; }

.admin-features,
.admin-sync,
.admin-add,
.admin-users {
    max-width: 68rem;
    margin-top: 2rem;
}

.admin-features h2,
.admin-sync h2,
.admin-add h2,
.admin-users h2 {
    margin: 0 0 0.9rem;
    font-family: var(--serif);
    font-size: 1.25rem;
}

.admin-features > p,
.admin-sync > p {
    max-width: 42rem;
    margin: -0.35rem 0 1rem;
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.admin-features form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    max-width: 42rem;
    padding: 1rem;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--paper-raised);
}

.admin-feature-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.admin-feature-toggle input {
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.15rem;
    accent-color: var(--honey-deep);
}

.admin-feature-toggle span { display: grid; gap: 0.2rem; }
.admin-feature-toggle strong { font-size: 0.92rem; }

.admin-feature-toggle small {
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.admin-features button {
    flex: 0 0 auto;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--honey-deep);
    border-radius: 999px;
    background: var(--honey);
    color: var(--ink);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.admin-features button:hover { border-color: var(--honey-deep); }

.admin-users h2 span {
    color: var(--ink-faint);
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 400;
}

.admin-sync-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.admin-sync-table th,
.admin-sync-table td {
    padding: 0.65rem 0.7rem;
    border-bottom: 1px solid var(--rule);
    text-align: left;
    vertical-align: top;
}

.admin-sync-more {
    margin-top: 0.6rem;
}

/* Belt and braces for the folded rows: some resets give table rows an
   explicit display, which would beat the browser default for [hidden]. */
.admin-sync-table tr[hidden] { display: none; }

.admin-sync-table thead th {
    color: var(--ink-faint);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-sync-table tbody tr:last-child > * { border-bottom: 0; }

.admin-sync-status {
    display: inline-block;
    padding: 0.18rem 0.42rem;
    border-radius: 999px;
    background: var(--paper-sunk);
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 650;
}

.admin-sync-status.is-success { background: #f1f3df; color: #4c6124; }
.admin-sync-status.is-warning,
.admin-sync-status.is-rejected,
.admin-sync-status.is-failed { background: #f7e7e3; color: #8a372b; }

.admin-users-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.admin-users-heading h2 { margin-bottom: 0; }

.admin-user-search {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.admin-user-search input {
    width: min(22rem, 42vw);
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--control-border);
    border-radius: 7px;
    background: var(--paper-raised);
    color: var(--ink);
    font: inherit;
    font-size: 0.84rem;
}

.admin-user-search button {
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--honey-deep);
    border-radius: 999px;
    background: var(--honey);
    color: var(--ink);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.admin-user-search a {
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.admin-empty {
    padding: 0.8rem;
    border: 1px solid var(--rule);
    border-radius: 8px;
    background: var(--paper-raised);
    color: var(--ink-soft);
    font-size: 0.86rem;
}

.admin-add form {
    display: grid;
    grid-template-columns: minmax(24rem, 3fr) minmax(10rem, 1fr) auto;
    gap: 0.7rem;
    align-items: end;
    width: 100%;
    max-width: 58rem;
}

.admin-field {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.admin-field label {
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.admin-add input,
.admin-add select {
    width: 100%;
    min-width: 0;
    padding: 0.48rem 0.65rem;
    border: 1px solid var(--control-border);
    border-radius: 7px;
    background: var(--paper-raised);
    color: var(--ink);
    font: inherit;
}

.admin-add input:focus,
.admin-add select:focus {
    outline: 2px solid var(--honey-deep);
    outline-offset: 1px;
}

.admin-add button,
.admin-edit,
.admin-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--paper-raised);
    color: var(--ink);
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}

.admin-add button {
    border-color: var(--honey-deep);
    background: var(--honey);
    font-weight: 600;
}

.admin-add button:hover,
.admin-edit:hover { border-color: var(--honey-deep); }

.admin-form-actions,
.admin-row-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.admin-form-actions a {
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--paper-raised);
}

.admin-users table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.admin-users th,
.admin-users td {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--rule);
    text-align: left;
    vertical-align: middle;
}

.admin-users thead th {
    color: var(--ink-faint);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Sortable column headers. The link keeps the header's own faint tone
   rather than the site link colour — a row of blue reads as content, not
   as controls — and states itself on hover and focus instead. The column
   currently in force is plain text carrying the arrow, so the header never
   offers a link back to the order it is already in. */
.admin-users thead th a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
}

.admin-users thead th a:hover,
.admin-users thead th a:focus-visible {
    color: var(--ink);
    border-bottom-style: solid;
}

.admin-users thead th[aria-sort]::after {
    margin-left: 0.3rem;
    color: var(--honey-deep);
    content: "\2191";
}

.admin-users thead th[aria-sort="descending"]::after { content: "\2193"; }

.admin-users tbody tr:last-child > * { border-bottom: 0; }
.admin-users tbody th { font-weight: 600; }

.admin-users tbody th small {
    display: inline-block;
    margin-left: 0.35rem;
    color: var(--honey-deep);
    font-weight: 400;
}

.admin-remove {
    border-color: transparent;
    background: transparent;
    color: #8a372b;
}

.admin-remove:hover { border-color: #b66b5f; }

@media (max-width: 42rem) {
    .admin-features form { align-items: flex-start; flex-direction: column; }
    .admin-add form { grid-template-columns: 1fr; }
    .admin-form-actions { justify-self: start; }
    .admin-users-heading { align-items: stretch; flex-direction: column; }
    .admin-user-search { align-items: stretch; flex-wrap: wrap; }
    .admin-user-search input { width: 100%; }
}

/* Header, when signed in. Quiet on purpose — it is a state, not a feature. */
.admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 1.15rem;
    line-height: 1;
    text-decoration: none;
}

.admin-link:hover,
.admin-link[aria-current="page"] {
    border-color: var(--honey-deep);
    background: var(--honey-soft);
    color: var(--ink);
}

.admin-link:focus-visible {
    outline: 2px solid var(--honey-deep);
    outline-offset: 2px;
}

.session-out {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.session-out button {
    display: inline-flex;
    height: 2rem;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.7rem;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    cursor: pointer;
}

.session-out button:hover { border-color: var(--honey-deep); color: var(--ink); }

/* The Google years have no albums, so their pictures carry their own line
   of context: which message they came with, and from whom. */
.photo-meta {
    display: block;
    margin-top: 0.15rem;
    color: var(--ink-faint);
    font-size: 0.78rem;
}

/* --------------------------------------------------------- picture card */

/* The Google years have no albums, so a picture's caption is the message it
   was attached to. The card brings that message to the reader rather than
   sending them away from a grid of 158 pictures. Same dialog as the byline
   card — one mechanism, two contents. */

.picture-card-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    background: var(--paper-sunk);
}

.picture-card-subject {
    margin: 0.9rem 0 0.2rem;
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

.picture-card-subject a { color: inherit; text-decoration: none; }
.picture-card-subject a:hover { color: var(--honey-deep); }

.picture-card-meta {
    margin: 0 0 0.9rem;
    color: var(--ink-faint);
    font-size: 0.85rem;
}

.picture-card-text {
    max-width: var(--measure);
    color: var(--ink);
    font-size: 0.95rem;
}

.picture-card-siblings-label {
    margin: 1.1rem 0 0.4rem;
    color: var(--ink-faint);
    font-size: 0.82rem;
}

.picture-card-siblings {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.picture-card-siblings img {
    width: 5.5rem;
    height: auto;
    display: block;
    border-radius: 6px;
}

.picture-card-link {
    margin: 1.2rem 0 0;
    font-size: 0.92rem;
}

.picture-card-link a { color: var(--honey-deep); }

/* A year card in the "All" view is not an album — it stands for a Google
   year that never had one. Same shape, because clicking it does the same
   kind of thing; the year set in the reading face rather than the interface
   face is enough to say it is a date and not somebody's title. */
.album-card.is-era .album-name {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------- content curation */

.curation-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
}

.curation-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1.5rem 0;
}

.curation-statuses a,
.curation-state {
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.8rem;
    text-decoration: none;
}

.curation-statuses a[aria-current="page"] {
    border-color: var(--honey);
    background: var(--honey-soft);
    color: var(--ink);
}

.curation-statuses span { color: var(--ink-faint); }

.curation-patterns,
.curation-pattern-review,
.curation-list {
    max-width: 92rem;
    margin-top: 2rem;
}

.curation-patterns h2,
.curation-pattern-review h2,
.curation-list > h2 {
    margin: 0 0 0.5rem;
    font-family: var(--serif);
    font-size: 1.35rem;
}

.curation-patterns > p,
.curation-pattern-review p { color: var(--ink-soft); }

.curation-pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.7rem;
}

.curation-pattern-grid a {
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem;
    border: 1px solid var(--rule);
    border-radius: 9px;
    background: var(--paper-raised);
    color: var(--ink);
    text-decoration: none;
}

.curation-pattern-grid a:hover { border-color: var(--honey-deep); }
.curation-pattern-grid span,
.curation-pattern-grid small { color: var(--ink-faint); }

.curation-pattern-review {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--honey);
    border-radius: 10px;
    background: var(--honey-soft);
}

.curation-pattern-review > div { margin-right: auto; }
.curation-pattern-review h2,
.curation-pattern-review p { margin-top: 0; margin-bottom: 0.3rem; }

.curation-list > h2 span {
    color: var(--ink-faint);
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 400;
}

.curation-proposal {
    margin: 1rem 0 1.5rem;
    padding: 1rem;
    border: 1px solid var(--rule);
    border-left-width: 5px;
    border-radius: 10px;
    background: var(--paper-raised);
    scroll-margin-top: 1rem;
}

.curation-proposal:target {
    border-color: var(--honey-deep);
    box-shadow: 0 0 0 3px var(--honey-soft);
}

.curation-proposal.is-approved,
.curation-proposal.is-applied {
    border-left-color: #657a37;
    background: linear-gradient(90deg, #f1f3df 0, var(--paper-raised) 5rem);
}

.curation-proposal.is-rejected {
    border-left-color: #b66b5f;
    background: linear-gradient(90deg, #f7e7e3 0, var(--paper-raised) 5rem);
}

.curation-proposal.is-conflict,
.curation-proposal.is-failed {
    border-left-color: #b66b5f;
}

.curation-proposal > header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.curation-proposal h3 { margin: 0; font-family: var(--serif); }
.curation-meta,
.curation-audit { margin: 0.25rem 0 0; color: var(--ink-faint); font-size: 0.78rem; }
.curation-reason { max-width: 70rem; }
.curation-state { align-self: flex-start; }
.curation-state.is-approved,
.curation-state.is-applied { border-color: #657a37; color: #4c6124; }
.curation-state.is-rejected,
.curation-state.is-conflict,
.curation-state.is-failed { border-color: #b66b5f; color: #8a372b; }

.curation-diff-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.curation-diff-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.curation-diff-grid h4 {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.curation-copy {
    padding: 0.2rem 0.55rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--paper-raised);
    color: var(--ink-soft);
    font: inherit;
    font-size: 0.72rem;
    cursor: pointer;
}

.curation-copy:hover { border-color: var(--honey-deep); color: var(--ink); }
.curation-copy.is-copied { border-color: #657a37; color: #4c6124; }

.curation-diff {
    max-height: 32rem;
    margin: 0;
    padding: 0.8rem;
    overflow: auto;
    border: 1px solid var(--rule);
    border-radius: 7px;
    background: var(--paper-sunk);
    color: var(--ink);
    font: 0.82rem/1.5 var(--mono, monospace);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.curation-diff del { background: #f4c9c2; color: #702a20; text-decoration: line-through; }
.curation-diff ins { background: #dce9b8; color: #304510; text-decoration: none; }
.curation-invalid { color: #8a372b; font-weight: 700; }

.curation-actions {
    display: flex;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.curation-empty {
    padding: 1rem;
    border: 1px dashed var(--rule);
    border-radius: 8px;
    color: var(--ink-faint);
}

@media (max-width: 52rem) {
    .curation-header,
    .curation-pattern-review { align-items: flex-start; flex-direction: column; }
    .curation-diff-grid { grid-template-columns: 1fr; }
}
