/* The Compendium — shared structural stylesheet. Theme-agnostic: every
   color here is a CSS custom property, defined per-theme by the
   server-rendered <style>:root{...}</style> block (see
   resources/views/components/theme-vars.blade.php). This file only owns
   layout/structure — grid, vote column, card shape, sort tabs, flair chip
   mechanics — never a literal color. */

* { box-sizing: border-box; }

body {
    margin: 0;
    background-color: var(--bg, #14110d);
    /* --bg-texture: a theme-provided data-URI SVG (feTurbulence grain) or
       'none'. --bg-vignette: a theme-provided radial-gradient() or
       'none'. Both live entirely in a theme's css_variables JSON — no
       static per-theme background asset to manage. */
    background-image: var(--bg-texture, none), var(--bg-vignette, none);
    background-repeat: repeat, no-repeat;
    /* auto, not cover, on the vignette layer — a theme's --bg-vignette
       gradient carries its own explicit shape/size (e.g. the D&D
       theme's "1200px 500px at 50% -10%" top-of-page glow); `cover`
       would stretch that past its intended proportions. A gradient
       with no explicit size (grimoire-classic's full-bleed ellipse)
       still renders full-bleed under auto, since a generated image's
       "intrinsic size" is the size of the background positioning area
       when the gradient itself doesn't specify one. */
    background-size: auto, auto;
    background-attachment: fixed, fixed;
    color: var(--text, #ece2c8);
    font-family: var(--font-body, 'Alegreya', serif);
    line-height: 1.5;
    min-height: 100vh;
}

.panel-lifted {
    box-shadow: var(--panel-shadow, 0 8px 24px rgba(0,0,0,0.4));
}

a { color: var(--gold, #c9a15a); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, .display {
    font-family: var(--font-display, 'Cinzel', serif);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Brand bar — "title on the cover": a foil-stamped wordmark over a
   subtly lighter band than the page background, with the account/
   community nav as its own uppercase-Cinzel row underneath (not mixed
   into the same line as the title). */
.site-header {
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg-panel, #262019) 85%, white 8%), var(--bg-panel, #262019));
    border-bottom: 1px solid var(--bronze-dk, var(--border, rgba(255,255,255,0.08)));
    box-shadow: 0 1px 0 rgba(0,0,0,0.4);
}
.brand-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.1rem 1.25rem 0.7rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-title {
    font-size: 1.7rem;
    margin: 0;
    letter-spacing: 0.06em;
}
.site-title a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    /* Gold-foil title treatment: every theme defines --title-gradient
       (a flat two-stop "gradient" for grimoire-classic, a real
       multi-stop sweep for the D&D theme) so this clip technique is
       always active rather than conditionally enabled per theme. Only
       affects the text node — the logo <img> below renders normally,
       since background-clip:text + transparent color has no effect on
       a replaced element like <img>. */
    background-image: var(--title-gradient, linear-gradient(var(--gold-hi, #e8c988), var(--gold-hi, #e8c988)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.site-logo {
    height: 2.4rem;
    width: auto;
    display: block;
}
.site-tagline {
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-dim, var(--text, #ece2c8));
    opacity: 0.85;
}

.site-nav {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.25rem 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-wrap: wrap;
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.site-nav a, .site-nav button.linklike {
    color: var(--ink-dim, var(--text, #ece2c8));
    padding: 0.35rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 3px;
}
.site-nav a:hover, .site-nav button.linklike:hover {
    color: var(--gold-hi, #e8c988);
    border-color: var(--bronze-dk, var(--border));
    background: rgba(217, 180, 91, 0.06);
    text-decoration: none;
}
.site-nav form { display: inline; }
.site-nav button.linklike {
    background: none;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}

.uncustomized-note {
    font-style: italic;
    font-size: 0.85rem;
    opacity: 0.75;
    padding: 0.5rem 1.5rem 0;
}

.flash {
    margin: 1rem 1.5rem 0;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    background: var(--bg-panel, #262019);
    border: 1px solid var(--gold, #c9a15a);
}
.flash.error { border-color: #b0453e; }

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}

.container-wide { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

/* Two-column page layout (feed + sidebar) — used only where a $sidebar
   slot is actually passed to the layout (see
   components/layouts/compendium.blade.php); every other page keeps the
   plain single-column .container above. */
.page-layout {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.6rem;
    align-items: start;
}
@media (max-width: 860px) {
    .page-layout { grid-template-columns: 1fr; }
}

/* Sort tabs */
.sort-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: baseline;
}
.sort-tabs a {
    padding: 0.5rem 0.9rem;
    border-radius: 6px 6px 0 0;
    color: var(--text, #ece2c8);
    opacity: 0.7;
}
.sort-tabs a.active {
    opacity: 1;
    color: var(--gold-hi, #e8c988);
    border-bottom: 2px solid var(--gold, #c9a15a);
}
.sort-hint { font-size: 0.8rem; opacity: 0.65; margin: -0.5rem 0 1rem; }

.period-toggle { display: flex; gap: 0.5rem; margin-bottom: 1rem; font-size: 0.85rem; }
.period-toggle a { padding: 0.2rem 0.6rem; border: 1px solid var(--border, rgba(255,255,255,0.08)); border-radius: 4px; }
.period-toggle a.active { border-color: var(--gold, #c9a15a); color: var(--gold-hi, #e8c988); }

.admin-nav {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.admin-nav a {
    padding: 0.5rem 0.9rem;
    border-radius: 6px 6px 0 0;
    color: var(--text, #ece2c8);
    opacity: 0.7;
}
.admin-nav a.active {
    opacity: 1;
    color: var(--gold-hi, #e8c988);
    border-bottom: 2px solid var(--gold, #c9a15a);
}

/* Post card */
.post-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    margin-bottom: 0.4rem;
    background: var(--bg-post, var(--bg-panel, #262019));
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    border-radius: 6px;
    transition: background 0.12s, border-color 0.12s;
}
/* "Stretched link" pattern — the title's own <a> grows an invisible
   overlay covering the whole card via ::after, so clicking anywhere on
   the row opens the post, with no JS and no risk of double-navigating.
   Elements that need to stay independently clickable (vote buttons,
   the thumbnail, the author link, the comments link) get position:
   relative + a z-index above this overlay, so the browser resolves
   clicks on THEM first wherever they visually sit on top of it. */
/* Deliberately NOT position:relative on .post-title a itself — that
   would make the ::after's "inset:0" resolve against the tiny title
   link's own box instead of escaping up to .post-card (the nearest
   OTHER positioned ancestor), which is what actually needs to be
   covered. */
.post-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.post-card-left, .post-details a, .post-actions a { position: relative; z-index: 2; }
.post-card:hover {
    background: var(--bg-post-h, var(--bg-panel, #262019));
    border-left-color: var(--bronze, var(--gold, #c9a15a));
}
.post-card.sponsored { border-color: var(--gold, #c9a15a); }
/* DM's Decree / stickied posts — a warm gold-tinted wash and a
   permanent (not hover-only) gold left border, so a pinned post reads
   as pinned even before you touch it. */
.post-card.pinned {
    background: linear-gradient(90deg, rgba(217,180,91,0.07), transparent 60%), var(--bg-post, var(--bg-panel, #262019));
    border-left-color: var(--gold, #c9a15a);
    outline: 1px solid var(--rule, var(--border, rgba(255,255,255,0.08)));
    outline-offset: -1px;
}

/* align-items: stretch (flex default) makes the thumbnail match
   .vote-column's own rendered height exactly, whatever that computes
   to — comparing only these two against each other, not against the
   (usually taller) title/meta content column next to them. That only
   works if .post-card-left's OWN height is intrinsic first, though —
   .post-card is a grid, and grid's own default stretch would otherwise
   inflate .post-card-left itself to match the content column's height
   (e.g. a long wrapped title), which the inner flex-stretch would then
   dutifully match too, well past vote-column's real size. align-self:
   start opts this cell out of that outer stretch. */
.post-card-left {
    display: flex;
    align-items: stretch;
    align-self: start;
    gap: 0.5rem;
}

.post-thumb {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg, #14110d);
    flex-shrink: 0;
}
.post-thumb img {
    display: block;
    /* Explicit fixed size, not height:100%/aspect-ratio — percentage
       heights depend on the parent having a genuinely DEFINITE height,
       and that chained through flex align-items:stretch turned out not
       to resolve reliably (two prior attempts here both rendered at
       the image's full intrinsic size instead of being constrained).
       4.6rem is .vote-column's own computed height: padding-top
       (0.15rem) + two .vote-btn (line-height 1 × 1.1rem font +
       0.15rem top/bottom padding = 1.4rem each) + .vote-score (this
       app's global 1.5 line-height × 0.9rem font = 1.35rem) + two
       0.15rem gaps. Square, not 16:9 — a compact tile sitting right
       against the vote column (Voat/greatawakening-style feed row),
       not a wide video-preview rectangle. */
    width: 4.6rem;
    height: 4.6rem;
    object-fit: cover;
}

.post-video-tag {
    /* No font-family override needed — inherits .post-title's Cinzel
       display font from the h1/h2/h3/.display rule, same as
       .post-domain right next to it. */
    opacity: 0.75;
    margin-left: 0.3rem;
}

.vote-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding-top: 0.15rem;
}
.vote-column form { margin: 0; line-height: 0; }
.vote-btn {
    background: none; border: none; cursor: pointer;
    color: var(--ink-faint, var(--text, #ece2c8)); opacity: 0.8; line-height: 0;
    padding: 0.15rem;
}
.vote-btn svg { width: 1.1rem; height: 1.1rem; display: block; }
.vote-btn:hover { opacity: 1; color: var(--gold-hi, #c9a15a); }
.vote-btn.voted-up { opacity: 1; color: #7fbf6a; }
.vote-btn.voted-down { opacity: 1; color: #c96a5a; }
.vote-score {
    font-family: var(--font-display, 'Cinzel', serif);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink-dim, var(--text));
    padding: 0.1rem 0;
}

/* .post-top: title + domain + flair chips together on one wrapping
   line, matching a rulebook's own contents-line typesetting rather
   than stacking each as its own row. */
.post-top { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.post-title { margin: 0; font-size: 1.08rem; font-weight: 700; }
.post-title a { color: var(--gold-hi, #e8c988); opacity: 0.92; }
.post-title a:hover { opacity: 1; text-decoration: none; }

.post-details { margin-top: 0.35rem; font-size: 0.86rem; color: var(--ink-dim, var(--text)); opacity: 0.9; }
.post-actions { margin-top: 0.4rem; font-size: 0.86rem; }
.post-actions a { color: var(--ink-dim, var(--text)); }
.post-actions a:hover { color: var(--gold, #c9a15a); }

.post-meta { font-size: 0.8rem; opacity: 0.75; }
.post-meta a { color: inherit; text-decoration: underline; }
.post-domain { color: var(--ink-faint, var(--text)); opacity: 0.8; font-size: 0.92em; }

.avatar { border-radius: 50%; vertical-align: middle; object-fit: cover; margin-right: 0.35rem; }

/* "fleuron" typography — small-caps-style uppercase Cinzel chips, per
   the D&D-cover-lettering theme; background/border/text colors stay
   entirely per-flair (from the flairs table, via inline style — see
   post-card.blade.php), never theme variables, per the spec's "flairs
   are independent of theme" rule. This block only owns shape/type. */
.flair-chip {
    display: inline-block;
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.15rem 0.55rem 0.1rem;
    border-radius: 3px;
    border: 1px solid;
    line-height: 1.4;
    white-space: nowrap;
}

.sponsored-badge, .affiliate-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.4rem;
    background: var(--badge-bg, rgba(255,255,255,0.08));
    opacity: 0.85;
}

.post-body { margin-top: 0.6rem; }
.post-image img { max-width: 100%; border-radius: 8px; }
.post-embed { position: relative; padding-top: 56.25%; margin-top: 0.6rem; }
.post-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }

/* Comment tree */
.comment-tree { list-style: none; margin: 0; padding: 0; }
.comment-tree .comment-tree { margin-left: 1.25rem; border-left: 1px solid var(--border, rgba(255,255,255,0.08)); padding-left: 0.75rem; }
.comment {
    padding: 0.5rem 0;
}
.comment-meta { font-size: 0.8rem; opacity: 0.7; }
.comment-body { margin: 0.25rem 0; }
.comment-buried { font-style: italic; opacity: 0.6; }
.continue-thread { font-size: 0.85rem; }

.rank-badge {
    font-size: 0.75rem;
    opacity: 0.8;
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 4px;
    padding: 0 0.35rem;
    margin-left: 0.3rem;
}

form.inline-form { display: inline; }

.btn {
    display: inline-block;
    background: var(--gold, #c9a15a);
    color: #1a1409;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.btn.secondary { background: transparent; color: var(--text, #ece2c8); border: 1px solid var(--border, rgba(255,255,255,0.08)); }

.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: 0.25rem; font-size: 0.9rem; }
.field input:not([type="checkbox"]), .field textarea, .field select {
    width: 100%;
    padding: 0.5rem;
    background: var(--bg, #14110d);
    color: var(--text, #ece2c8);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 6px;
    font-family: inherit;
}
.field-error { color: #d98b7f; font-size: 0.8rem; margin-top: 0.2rem; list-style: none; padding: 0; }
.auth-status { color: #7fbf6a; font-size: 0.9rem; margin-bottom: 1rem; }

/* Auth pages (login/register/password reset/etc.) — a centered card on
   the same themed backdrop as the rest of the site, replacing Breeze's
   stock Tailwind guest layout + Laravel logo. */
.auth-wrap {
    min-height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.auth-wordmark {
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}
.auth-wordmark a {
    background-image: var(--title-gradient, linear-gradient(var(--gold-hi, #e8c988), var(--gold-hi, #e8c988)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.auth-card {
    width: 100%;
    max-width: 26rem;
    padding: 1.75rem;
    background: var(--bg-panel, #262019);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 10px;
    box-shadow: var(--panel-shadow, 0 8px 24px rgba(0,0,0,0.4));
}
.auth-card p { font-size: 0.9rem; opacity: 0.85; }
.auth-card .field-row { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; gap: 1rem; }
.auth-card label.checkbox { display: flex; align-items: center; justify-content: flex-start; gap: 0.4rem; font-size: 0.9rem; text-align: left; }
.auth-card label.checkbox span { white-space: nowrap; }

.post-type-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.post-type-tabs button {
    flex: 1;
    padding: 0.5rem;
    background: var(--bg-panel, #262019);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    color: var(--text, #ece2c8);
    cursor: pointer;
    border-radius: 6px;
}
.post-type-tabs button.active { border-color: var(--gold, #c9a15a); color: var(--gold-hi, #e8c988); }

table.admin-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
table.admin-table th, table.admin-table td {
    text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
    font-size: 0.9rem;
}

.community-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.community-tile {
    padding: 1rem; border-radius: 10px; background: var(--bg-panel, #262019);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
}

.pagination { display: flex; gap: 0.5rem; margin-top: 1rem; font-size: 0.9rem; }

/* ============ SIDEBAR — "community card" framed like a book ============ */
.card {
    background: var(--bg-panel, #262019);
    border: 1px solid var(--bronze-dk, var(--border, rgba(255,255,255,0.08)));
    /* Double frame — an outset outline a few px past the border, like a
       gilded cover edge peeking past the page block. */
    outline: 1px solid var(--rule, rgba(0,0,0,0.3));
    outline-offset: 4px;
    border-radius: 6px;
    padding: 1.25rem 1.1rem;
    margin-bottom: 1.5rem;
}
.card .crest { display: flex; justify-content: center; margin-bottom: 0.6rem; }
.card .crest img { width: 4.5rem; height: auto; display: block; }
.card h2 {
    font-size: 1.05rem;
    text-align: center;
    letter-spacing: 0.1em;
    color: var(--gold, #c9a15a);
    margin: 0;
}
.card .member-count { text-align: center; color: var(--ink-faint, var(--text)); font-size: 0.8rem; margin: 0.25rem 0 0.75rem; }
.card p.blurb { font-size: 0.92rem; color: var(--ink-dim, var(--text)); line-height: 1.55; margin: 0 0 0.9rem; }

.card h3 {
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold, #c9a15a);
    margin: 1.1rem 0 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--rule, var(--border, rgba(255,255,255,0.08)));
}
.rules { list-style: none; margin: 0; padding: 0; }
.rules li {
    font-size: 0.9rem; color: var(--ink-dim, var(--text));
    padding: 0.4rem 0 0.4rem 1.25rem; position: relative; line-height: 1.4;
}
.rules li::before { content: "◆"; position: absolute; left: 0.15rem; top: 0.55rem; color: var(--bronze, var(--gold)); font-size: 0.55rem; }

.legend { list-style: none; margin: 0; padding: 0; }
.legend li { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0; font-size: 0.86rem; color: var(--ink-dim, var(--text)); }
.legend .flair-chip { flex: none; }
.legend .meaning { color: var(--ink-faint, var(--text)); font-size: 0.8rem; }

.mod-list { list-style: none; margin: 0; padding: 0; }
.mod-list li { font-size: 0.9rem; padding: 0.25rem 0; }
.mod-list a { color: var(--ink-dim, var(--text)); }
.mod-list-footer { display: block; margin-top: 0.6rem; font-size: 0.82rem; text-align: center; }

.sidebar-legal { margin-top: 1.1rem; padding-top: 0.75rem; border-top: 1px solid var(--rule, var(--border, rgba(255,255,255,0.08))); text-align: center; font-size: 0.76rem; }
.sidebar-legal a { color: var(--ink-faint, var(--text)); }

/* ============ FOOTER — the WotC-ribbon-style closer ============ */
.site-footer {
    margin-top: 1.5rem;
    background: linear-gradient(180deg, color-mix(in srgb, var(--red, #8a3a32) 90%, white 8%), var(--red, #8a3a32) 60%, color-mix(in srgb, var(--red, #8a3a32) 80%, black 25%));
    border-top: 2px solid var(--bronze, var(--gold, #c9a15a));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.site-footer-inner {
    max-width: 1080px; margin: 0 auto; padding: 0.75rem 1.25rem;
    display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
    font-family: var(--font-display, 'Cinzel', serif);
    font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: #ffe9d0;
}
.site-footer-inner span.dim { color: rgba(255,233,208,0.6); }

/* Top utility bar — a plain, theme-independent strip above the themed
   site header: cross-community navigation + the light/dark toggle.
   Deliberately neutral gray rather than driven by the active
   community's theme variables, since its whole point is to look and
   sit the same way on every community. */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 1rem;
    background: #2b2b2b;
    color: #ccc;
    font-size: 0.78rem;
    overflow-x: auto;
    white-space: nowrap;
}
.top-bar-communities { display: flex; align-items: center; gap: 0.75rem; }
.top-bar-label { opacity: 0.7; }
.top-bar a { color: #ccc; }
.top-bar a:hover { color: #fff; }
.top-bar a.current { color: #fff; font-weight: 600; text-decoration: underline; }

.theme-toggle {
    flex-shrink: 0;
    background: none;
    border: 1px solid #555;
    color: #ccc;
    border-radius: 999px;
    width: 1.6rem;
    height: 1.6rem;
    line-height: 1;
    cursor: pointer;
    font-size: 0.85rem;
}
.theme-toggle:hover { border-color: #999; color: #fff; }

/* Light mode — a universal override layer, not a per-theme redesign.
   Higher specificity than a theme's own plain `:root{}` block (see
   theme-vars.blade.php) beats it regardless of load order, so this
   correctly overrides whatever the active theme set, without needing
   the theme itself to know about light mode at all. */
:root[data-theme="light"] {
    --bg: #f4ecd8;
    --bg-panel: #fffdf8;
    --bg-post: #fbf6ea;
    --bg-post-h: #f5ecd6;
    --text: #241a0f;
    --border: rgba(0,0,0,0.18);
    --bg-texture: none;
    --bg-vignette: none;
    --panel-shadow: 0 4px 14px rgba(0,0,0,0.12);
    /* Darker than the dark-mode gold on purpose — this is the PRIMARY
       link/accent color (every <a>, active tab, button), so it has to
       clear normal-text contrast against a near-white panel. The
       original #8a6a3a here measured well under WCAG AA on #fffdf8.
       --gold-hi (used for less text-heavy highlight accents) can stay
       a shade lighter. */
    --gold: #5c4520;
    --gold-hi: #7a5c30;
    --bronze: #8a6a3a;
    --bronze-dk: #6b531f;
    --red: #a83a32;
    /* All measured well above WCAG AA (6.6–11:1) against #fffdf8. */
    --ink-dim: #4a3826;
    --ink-faint: #6b5842;
    --rule: rgba(0,0,0,0.14);
    --title-gradient: linear-gradient(#5c4520, #5c4520);
    --badge-bg: rgba(0,0,0,0.08);
}
/* Several rules dim secondary text via `opacity` rather than a fixed
   muted color — that reads fine fading light text toward a dark
   background, but fades dark text toward washed-out gray on a light
   one. Bumped back up specifically for light mode rather than touching
   the dark-mode values, which were already fine. */
:root[data-theme="light"] .post-meta,
:root[data-theme="light"] .uncustomized-note,
:root[data-theme="light"] .comment-meta,
:root[data-theme="light"] .auth-card p,
:root[data-theme="light"] .sponsored-badge,
:root[data-theme="light"] .affiliate-badge {
    opacity: 0.92;
}
:root[data-theme="light"] .post-domain,
:root[data-theme="light"] .sort-hint,
:root[data-theme="light"] .sort-tabs a,
:root[data-theme="light"] .rank-badge,
:root[data-theme="light"] .post-video-tag {
    opacity: 0.88;
}
:root[data-theme="light"] .vote-btn {
    opacity: 0.75;
}
