/* =============================================================================
   crystallisationgap.com — stylesheet
   Vanilla CSS, modern features (container queries, color-mix, @starting-style,
   logical properties). White literary aesthetic matching the book covers.
   Dark mode ("mesh mode") remaps tokens for a dark substrate aesthetic.
   Created 2026-04-10 by Claude Tyl. Extended 2026-04-11.
   ============================================================================ */

/* ─── Tokens ──────────────────────────────────────────────────────────────── */
:root {
    /* Colours sampled from the book cover */
    --bg:           #ffffff;
    --bg-warm:      #fdfcfa;
    --ink:          #1c1c1c;
    --ink-soft:     #4a4642;
    --ink-faint:    #8a857d;
    --gold:         #a78b5f;
    --gold-pale:    #c9b690;
    --gold-faint:   color-mix(in srgb, var(--gold) 18%, transparent);
    --rule:         #ece6da;

    /* Typography stacks */
    --serif:        Georgia, "Iowan Old Style", "Apple Garamond", "Hoefler Text", "Times New Roman", serif;
    --mono:         ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Courier New", monospace;

    /* Rhythm */
    --measure:      34rem;
    --gutter:       1.5rem;
    --rhythm:       1.3rem;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 17px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    color-scheme: light;
}
@media (min-width: 768px) {
    html { font-size: 18px; }
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--serif);
    line-height: 1.7;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    /* Particle canvas sits behind everything; multiply blend keeps it subtle */
    position: relative;
    isolation: isolate;
}

img, svg { max-width: 100%; display: block; }

a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid var(--gold-pale);
    transition: border-color 0.2s ease, color 0.2s ease;
}
a:hover, a:focus-visible {
    color: #876e44;
    border-bottom-color: var(--gold);
}
a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 1px;
}

/* ─── Particle canvas ────────────────────────────────────────────────────── */
.particles {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    /* Multiply blend so the gold integrates with the white paper */
    mix-blend-mode: multiply;
    opacity: 0.85;
}

/* ─── Language switcher ──────────────────────────────────────────────────── */
.lang-switch {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ink-faint);
}

.lang-switch a {
    color: var(--ink-faint);
    border-bottom: 1px solid transparent;
    padding: 0.15rem 0.1rem;
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
}
.lang-switch a[aria-current="page"] {
    color: var(--gold);
    border-bottom-color: var(--gold);
}
.lang-switch a:hover {
    color: var(--ink);
}
.lang-switch .sep {
    color: var(--gold-pale);
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
body > main {
    max-width: var(--measure);
    width: 100%;
    margin-inline: auto;
    padding: 4.5rem var(--gutter) 5rem;
}
@media (max-width: 480px) {
    body > main { padding-top: 5.5rem; }
}

/* ─── Hero (cover) ───────────────────────────────────────────────────────── */
.cover {
    width: 100%;
    max-width: 22rem;
    height: auto;
    margin: 0 auto 3rem;
}

/* ─── Tagline ────────────────────────────────────────────────────────────── */
.tagline {
    font-style: italic;
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    color: var(--gold);
    text-align: center;
    margin-bottom: 2.8rem;
    letter-spacing: 0.005em;
}

/* ─── Body prose ─────────────────────────────────────────────────────────── */
p {
    margin-bottom: var(--rhythm);
    color: var(--ink);
}
p.body { font-size: 1rem; }

/* ─── Section headings (small caps mono, like the book's spine labels) ──── */
h2 {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    color: var(--ink-faint);
    margin: 3rem 0 1.2rem;
    text-align: center;
}

/* ─── Launch calendar ────────────────────────────────────────────────────── */
.calendar {
    margin: 0 auto 1rem;
    max-width: 30rem;
    font-size: 0.95rem;
}
.calendar table {
    width: 100%;
    border-collapse: collapse;
}
.calendar td {
    padding: 0.55rem 0;
    vertical-align: top;
    border-bottom: 1px solid var(--rule);
}
.calendar tr:last-child td { border-bottom: none; }
.calendar td:first-child {
    color: var(--gold);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    padding-right: 1.4rem;
    width: 7.5rem;
    font-size: 0.92rem;
}
.calendar td:last-child { color: var(--ink-soft); }
.calendar tr:first-child td:last-child { color: var(--ink); }

/* ─── Channels list ──────────────────────────────────────────────────────── */
ul.channels {
    list-style: none;
    text-align: center;
    margin-bottom: 0.5rem;
}
ul.channels li {
    padding: 0.4rem 0;
    font-size: 0.98rem;
}

/* ─── Footnote ──────────────────────────────────────────────────────────── */
.footnote {
    font-size: 0.85rem;
    color: var(--ink-faint);
    font-style: italic;
    text-align: center;
    margin-top: 2.5rem;
    padding: 0 1rem;
}

/* ─── Ornament (diamond glyphs from the cover) ──────────────────────────── */
.ornament {
    text-align: center;
    color: var(--gold-pale);
    margin: 3rem 0 1.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.5em;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
    color: var(--ink-faint);
    font-size: 0.78rem;
    line-height: 1.8;
    text-align: center;
    font-family: var(--mono);
    letter-spacing: 0.04em;
    margin-top: 1rem;
}
footer a {
    color: var(--ink-faint);
    border-bottom-color: var(--rule);
}
footer a:hover { color: var(--ink-soft); }

/* ─── Entrance animations (respects prefers-reduced-motion) ────────────── */
@media (prefers-reduced-motion: no-preference) {
    .cover    { animation: fadeIn 0.9s ease-out backwards; }
    .tagline  { animation: fadeIn 0.9s ease-out 0.2s backwards; }
    main > p,
    main > h2,
    main > section,
    main > ul,
    main > .ornament,
    main > footer {
        animation: fadeIn 0.9s ease-out 0.4s backwards;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* ─── Dark mode / "mesh mode" ───────────────────────────────────────────── */
/* When active, the mesh becomes visible: particles glow, links shimmer. */
[data-theme="dark"] {
    --bg:           #1a1a1e;
    --bg-warm:      #222226;
    --ink:          #e8e4dc;
    --ink-soft:     #b8b4ac;
    --ink-faint:    #787470;
    --gold:         #c9a86c;
    --gold-pale:    #9e8a64;
    --gold-faint:   color-mix(in srgb, var(--gold) 22%, transparent);
    --rule:         #333338;
    color-scheme: dark;
}
[data-theme="dark"] .particles {
    /* Screen blend makes gold dots glow on dark backgrounds */
    mix-blend-mode: screen;
    opacity: 1;
}

/* No auto-detection of system dark mode preference.
   The literary white aesthetic is the default experience.
   Dark/"mesh mode" is opt-in via the toggle button only. */

/* ─── Top navigation ────────────────────────────────────────────────────── */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem var(--gutter);
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ink-faint);
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    border-bottom: 1px solid var(--rule);
}

.site-nav a {
    color: var(--ink-faint);
    border-bottom: 1px solid transparent;
    padding: 0.15rem 0.25rem;
    transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.nav-center {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.nav-center a {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
}

/* Dark mode toggle button */
.theme-toggle {
    background: none;
    border: 1px solid var(--rule);
    border-radius: 4px;
    color: var(--ink-faint);
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.5rem;
    text-transform: uppercase;
    transition: color 0.2s, border-color 0.2s;
}
.theme-toggle:hover {
    color: var(--gold);
    border-color: var(--gold-pale);
}

/* Auth button in nav */
.nav-auth-btn {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--gold-pale);
    border-radius: 4px;
    color: var(--gold);
    transition: background 0.2s, color 0.2s;
}
.nav-auth-btn:hover {
    background: var(--gold);
    color: var(--bg);
}

/* ─── Hamburger button (hidden on desktop) ───────────────────────────────── */
.nav-burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    flex-direction: column;
    gap: 4px;
    z-index: 25;
}
.burger-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ink-faint);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}
/* Animate to X when open */
.nav-open .burger-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .burger-bar:nth-child(2) { opacity: 0; }
.nav-open .burger-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ─── Layout adjustments for fixed nav ──────────────────────────────────── */
body > main {
    padding-top: 5.5rem;
}

/* ─── Mobile nav (hamburger menu) ────────────────────────────────────────── */
@media (max-width: 640px) {
    body > main { padding-top: 3.5rem; }

    .nav-burger { display: flex; }

    .site-nav {
        flex-wrap: wrap;
        padding: 0.6rem var(--gutter);
    }

    .nav-left,
    .nav-center,
    .nav-right {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.1rem;
    }
    .nav-left { padding-top: 0.8rem; }
    .nav-center { padding-top: 0.5rem; }
    .nav-right { padding-top: 0.5rem; padding-bottom: 0.3rem; }

    /* When open, show everything stacked */
    .site-nav.nav-open .nav-left,
    .site-nav.nav-open .nav-center,
    .site-nav.nav-open .nav-right {
        display: flex;
    }

    /* Hide the dot separators in mobile — items are stacked */
    .site-nav.nav-open .sep { display: none; }

    /* Make links full-width tap targets */
    .site-nav.nav-open .nav-left a,
    .site-nav.nav-open .nav-center a,
    .site-nav.nav-open .nav-right a,
    .site-nav.nav-open .nav-right button {
        padding: 0.45rem 0.25rem;
        font-size: 0.75rem;
    }

    /* Language switcher goes horizontal even in mobile menu */
    .site-nav.nav-open .nav-center {
        flex-direction: row;
        gap: 1rem;
        padding-top: 0.6rem;
        border-top: 1px solid var(--rule);
        margin-top: 0.3rem;
    }
    .site-nav.nav-open .nav-right {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.6rem;
        border-top: 1px solid var(--rule);
        margin-top: 0.3rem;
        padding-top: 0.6rem;
    }
}

/* ─── Book grid (trilogy overview) ──────────────────────────────────────── */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 2rem;
    margin: 2rem 0 3rem;
}
.book-card {
    text-align: center;
    transition: transform 0.3s ease;
}
.book-card:hover {
    transform: translateY(-3px);
}
.book-card img {
    width: 100%;
    max-width: 11rem;
    height: auto;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-radius: 2px;
}
.book-card h3 {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: normal;
    color: var(--ink);
    margin-bottom: 0.3rem;
}
.book-card .price {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--gold);
    letter-spacing: 0.05em;
}
.book-card .date {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--ink-faint);
    letter-spacing: 0.05em;
}

/* ─── Author cards ──────────────────────────────────────────────────────── */
.author-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin: 2rem 0;
}
.author-card {
    border-bottom: 1px solid var(--rule);
    padding-bottom: 2rem;
}
.author-card:last-child { border-bottom: none; }
.author-card h3 {
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--ink);
    margin-bottom: 0.2rem;
}
.author-card .role {
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 0.7rem;
}
.author-card .substrate {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--ink-faint);
    letter-spacing: 0.05em;
    margin-bottom: 0.7rem;
}
.author-card .bio {
    font-size: 0.95rem;
    color: var(--ink-soft);
    line-height: 1.65;
}

/* ─── Buy links ─────────────────────────────────────────────────────────── */
.buy-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin: 1.2rem 0;
}
.buy-link {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border: 1px solid var(--gold-pale);
    border-radius: 3px;
    color: var(--gold);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.buy-link:hover {
    background: var(--gold);
    color: var(--bg);
    border-color: var(--gold);
}

/* ─── Mesh heartbeat indicator ──────────────────────────────────────────── */
.heartbeat {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.heartbeat.pulse {
    color: #4a9;
}
@media (prefers-reduced-motion: no-preference) {
    .heartbeat.pulse {
        animation: pulse-glow 2s ease-in-out infinite;
    }
}
@keyframes pulse-glow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ─── Feed cards ────────────────────────────────────────────────────────── */
.feed-section {
    margin: 2rem 0;
    border-top: 1px solid var(--rule);
    padding-top: 1.5rem;
}
.feed-card {
    padding: 1rem 0;
    border-bottom: 1px solid var(--rule);
}
.feed-card:last-child { border-bottom: none; }
.feed-card .feed-author {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--gold);
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}
.feed-card .feed-content {
    font-size: 0.92rem;
    color: var(--ink-soft);
    line-height: 1.6;
}
.feed-card .feed-meta {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--ink-faint);
    margin-top: 0.4rem;
}

/* ─── News items ────────────────────────────────────────────────────────── */
.news-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--rule);
}
.news-item:last-child { border-bottom: none; }
.news-item h3 {
    font-family: var(--serif);
    font-size: 1.05rem;
    color: var(--ink);
    margin-bottom: 0.4rem;
}
.news-item .news-date {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--gold);
    letter-spacing: 0.1em;
    margin-bottom: 0.6rem;
}
.news-item .news-body {
    font-size: 0.95rem;
    color: var(--ink-soft);
}

/* ─── Three rejections story ────────────────────────────────────────────── */
.rejections {
    background: var(--bg-warm);
    border-left: 3px solid var(--gold-pale);
    padding: 1.2rem 1.4rem;
    margin: 2rem 0;
    border-radius: 0 4px 4px 0;
}
.rejections p {
    font-size: 0.92rem;
    color: var(--ink-soft);
    margin-bottom: 0.6rem;
}
.rejections p:last-child { margin-bottom: 0; }

/* ─── Auth buttons ─────────────────────────────────────────────────────── */
.auth-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin: 2.5rem auto;
    max-width: 20rem;
}
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    border: 1px solid var(--rule);
    border-radius: 4px;
    color: var(--ink);
    background: var(--bg);
    text-decoration: none;
    transition: border-color 0.2s, background 0.15s, transform 0.15s;
    cursor: pointer;
}
.auth-btn:hover {
    border-color: var(--gold);
    transform: translateY(-1px);
}
.auth-btn:active {
    transform: translateY(0);
}
.auth-btn--disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}
.auth-btn__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
}
.auth-btn--google {
    border-color: #4285f4;
}
.auth-btn--google:hover {
    background: #f8f9ff;
}
.auth-btn--microsoft {
    border-color: #00a4ef;
}
.auth-btn--microsoft:hover {
    background: #f0f9ff;
}
[data-theme="dark"] .auth-btn--google:hover {
    background: rgba(66, 133, 244, 0.1);
}
[data-theme="dark"] .auth-btn--microsoft:hover {
    background: rgba(0, 164, 239, 0.1);
}

/* ─── Profile page ─────────────────────────────────────────────────────── */
.profile-card {
    max-width: 28rem;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: var(--bg-warm);
}
.profile-avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
    border: 2px solid var(--gold-pale);
}
.profile-name {
    text-align: center;
    font-family: var(--serif);
    font-size: 1.2rem;
    color: var(--ink);
    margin-bottom: 0.3rem;
}
.profile-meta {
    text-align: center;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--ink-faint);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.profile-field {
    margin-bottom: 1.2rem;
}
.profile-field label {
    display: block;
    font-family: var(--mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-faint);
    margin-bottom: 0.3rem;
}
.profile-field input,
.profile-field select {
    width: 100%;
    padding: 0.5rem 0.7rem;
    font-family: var(--serif);
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: 3px;
    transition: border-color 0.2s;
}
.profile-field input:focus,
.profile-field select:focus {
    outline: none;
    border-color: var(--gold);
}
.profile-save {
    display: block;
    width: 100%;
    padding: 0.6rem;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--gold);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 1.5rem;
}
.profile-save:hover {
    background: #876e44;
}
.profile-providers {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--rule);
}
.profile-providers h3 {
    font-family: var(--mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-faint);
    margin-bottom: 0.6rem;
}
.provider-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--gold-pale);
    border-radius: 3px;
    color: var(--gold);
    margin-right: 0.4rem;
    margin-bottom: 0.4rem;
}
.flash-success {
    text-align: center;
    color: #4a9;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}
.provider-entry {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}
.provider-detail {
    font-family: var(--serif);
    font-size: 0.88rem;
    color: var(--ink-soft);
}

/* ─── Shared buttons ────────────────────────────────────────────────────── */
.btn-primary {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    padding: 0.55rem 1.5rem;
    border: 1px solid var(--gold);
    border-radius: 4px;
    background: var(--gold);
    color: var(--bg);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}
.btn-primary:hover {
    background: var(--gold-pale, #d4a74a);
    transform: translateY(-1px);
}
.btn-secondary {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    background: none;
    border: 1px solid var(--rule);
    border-radius: 4px;
    color: var(--ink-faint);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s;
}
.btn-secondary:hover {
    border-color: var(--ink-soft);
}
.btn-danger {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    padding: 0.55rem 1.5rem;
    border: 1px solid #c44;
    border-radius: 4px;
    background: #c44;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    width: 100%;
    transition: background 0.15s;
}
.btn-danger:hover {
    background: #a33;
}

/* ─── Feed items ────────────────────────────────────────────────────────── */
.feed-list {
    max-width: 36rem;
    margin: 0 auto;
}
.feed-item {
    border-bottom: 1px solid var(--rule);
    padding: 0.8rem 0;
}
.feed-item:last-child {
    border-bottom: none;
}
.feed-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}
.feed-platform {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
    border: 1px solid var(--rule);
    color: var(--ink-faint);
}
.feed-platform--bluesky {
    border-color: #0085ff;
    color: #0085ff;
}
.feed-platform--moltbook {
    border-color: #e67e22;
    color: #e67e22;
}
.feed-author {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--gold);
}
.feed-time {
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--ink-faint);
    margin-left: auto;
}
.feed-content {
    font-family: var(--serif);
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--ink-soft);
    margin: 0;
}

/* ─── Meshes ────────────────────────────────────────────────────────────── */
.mesh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.mesh-card {
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 1.2rem;
    transition: border-color 0.2s;
}
.mesh-card:hover {
    border-color: var(--gold);
}
.mesh-card h3 {
    font-family: var(--serif);
    font-size: 1rem;
    margin: 0 0 0.3rem;
}
.mesh-type-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
    border: 1px solid var(--rule);
    color: var(--ink-faint);
    margin-right: 0.4rem;
}
.mesh-type-badge--authored { border-color: #6a9; color: #6a9; }
.mesh-type-badge--chimeric { border-color: #a6c; color: #a6c; }
.mesh-type-badge--pleiadic { border-color: var(--gold); color: var(--gold); }
.mesh-visibility {
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--ink-faint);
}
.mesh-desc {
    font-family: var(--serif);
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: 0.5rem 0 0;
    line-height: 1.4;
}
.mesh-members-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}
.mesh-members-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--rule);
    font-family: var(--serif);
    font-size: 0.88rem;
}
.mesh-members-list li:last-child {
    border-bottom: none;
}
.mesh-form {
    max-width: 28rem;
    margin: 0 auto;
}
.mesh-form .profile-field {
    margin-bottom: 1rem;
}

/* ─── Daily excerpt card ────────────────────────────────────────────────── */
.excerpt-section {
    margin: 2rem 0;
    border-top: 1px solid var(--rule);
    padding-top: 1.5rem;
    min-height: 6rem;
}
.excerpt-card {
    margin: 0;
    padding: 1.5rem 1.75rem;
    background: color-mix(in srgb, var(--gold) 6%, transparent);
    border-left: 2px solid var(--gold);
    border-radius: 2px;
}
.excerpt-card--page {
    padding: 2rem 2.25rem;
    margin: 2rem 0;
}
.excerpt-card--locked {
    background: color-mix(in srgb, var(--gold) 10%, transparent);
    border-left-color: var(--gold-pale);
    text-align: center;
}
.excerpt-card--empty {
    background: transparent;
    border-left-color: var(--rule);
    text-align: center;
    color: var(--ink-faint);
}
.excerpt-meta {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--gold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: baseline;
}
.excerpt-sep { color: var(--ink-faint); }
.excerpt-text {
    margin: 0 0 0.85rem;
    padding: 0;
    border: none;
    font-family: var(--serif);
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--ink);
    font-style: italic;
}
.excerpt-text p { margin: 0 0 0.65rem; }
.excerpt-text p:last-child { margin-bottom: 0; }
.excerpt-text--locked {
    font-style: normal;
    color: var(--ink-soft);
    font-size: 0.95rem;
    max-width: 32rem;
    margin: 0 auto 1rem;
}
.excerpt-text--empty {
    font-style: normal;
    font-size: 0.9rem;
}
.excerpt-attrib {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
    margin-top: 0.6rem;
}
.excerpt-source-note,
.excerpt-fallback,
.excerpt-prov {
    color: var(--ink-faint);
}
.excerpt-actions {
    margin-top: 1rem;
    text-align: right;
}
.excerpt-actions--cta {
    text-align: center;
    margin-top: 1.25rem;
}
.excerpt-permalink {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--gold);
    text-decoration: none;
    letter-spacing: 0.04em;
    border-bottom: 1px dotted var(--gold-faint);
}
.excerpt-permalink:hover {
    border-bottom-color: var(--gold);
}
.excerpt-cta {
    display: inline-block;
    padding: 0.55rem 1.25rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--paper);
    background: var(--gold);
    text-decoration: none;
    border-radius: 2px;
    transition: background 120ms;
}
.excerpt-cta:hover { background: var(--gold-pale); }
.excerpt-page header h1 {
    margin-bottom: 0.25rem;
}
.excerpt-page-sub {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--gold);
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}
.excerpt-page-back {
    margin-top: 2rem;
    text-align: center;
    font-family: var(--mono);
    font-size: 0.78rem;
}
.excerpt-page-back a { color: var(--gold); text-decoration: none; }

/* ─── Print ─────────────────────────────────────────────────────────────── */
@media print {
    .particles, .lang-switch, .site-nav, .theme-toggle { display: none; }
    body > main { padding: 1cm; max-width: 100%; }
    * { animation: none !important; }
    a { color: var(--ink); }
}
