/* ============================================================
   THEME — Legacy Ballot  (route /legacy-ballot)
   ------------------------------------------------------------
   A bespoke skin for this brand only. Everything is scoped under
   .brand-page.ballot so the shared sub-brand layout (brand-pages.css)
   and the other brands are never touched.

   CONCEPT — "The Official Ballot." A real paper ballot: warm
   cream cardstock, a gold guilloché seal, registration crop-marks,
   a perforated tear-line and red voter's INK — laid on a dark desk,
   but rendered with futuristic precision (crisp hairlines, mono
   registrar microcopy, a live digital tabulation).

   The material inversion is the point: LIGHT paper on a DARK stage,
   not dark panels with glowing accents. Colour roles are strict —
     · BLACK  = printed ballot type & rules (the registrar's ink)
     · RED    = the voter's marks (ovals filled, props certified)
     · GOLD   = officialdom (the seal, the certified winner)

   Display face is Bodoni Moda (engraved-certificate Didone, loaded
   in App.razor for this brand); registrar microcopy is IBM Plex Mono.
   ============================================================ */
.brand-page.ballot {
    /* — the dark desk the ballot lies on — */
    --desk: #17120d;
    --desk-deep: #0d0a07;
    --desk-glow: rgba(198, 162, 66, 0.10);

    /* — the paper — */
    --paper: #f3ead4;
    --paper-hi: #f8f1de;
    --paper-edge: #e3d5b2;
    --paper-shade: #e9ddc0;
    --rule: #cdbb91;            /* printed hairlines */
    --rule-soft: #ddceaa;

    /* — printed ink (registrar black-brown) — */
    --ink: #241b0f;
    --ink-soft: #6e5e44;
    --ink-faint: #9a8a6c;

    /* — the voter's red ink — */
    --mark: #c0382a;
    --mark-deep: #8f2417;
    --mark-bright: #d8442f;
    --mark-wash: rgba(192, 56, 42, 0.12);

    /* — gold foil (officialdom, legacy) — */
    --foil: #c19a3b;
    --foil-bright: #e6c869;
    --foil-deep: #8a6a20;
    --foil-ink: #2a1f06;

    /* — contribution-graph segment colours (profile pages) — */
    --seg-gold: #c19a3b;
    --seg-red: #c0382a;
    --seg-ink: #2c2415;
    --seg-bronze: #7d5f28;
    --seg-tan: #b58a52;

    /* — 8-step composition palette (warm, distinguishable on cream) — */
    --seg-1: #c19a3b;
    --seg-2: #c0382a;
    --seg-3: #2c2415;
    --seg-4: #7d5f28;
    --seg-5: #b58a52;
    --seg-6: #8c2f22;
    --seg-7: #9a8748;
    --seg-8: #5e4a2c;

    /* — tokens consumed by the shared brand-pages.css — */
    --bg: var(--desk);
    --fg: var(--paper);
    --muted: #b7a988;
    --border: #3a2f1e;
    --accent: var(--foil);
    --accent-hover: var(--foil-bright);
    --accent-fg: var(--foil-ink);
    --glow: var(--desk-glow);

    isolation: isolate;
    interpolate-size: allow-keywords;
    border: none;
    border-radius: 0;
    background: var(--desk);
    color: var(--paper);
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
}

/* ---- the desk: a warm pool of light + a deep grain ---- */
.brand-page.ballot::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(120% 70% at 50% -8%, var(--desk-glow), transparent 60%),
        radial-gradient(100% 120% at 50% 120%, rgba(0, 0, 0, 0.5), transparent 60%),
        linear-gradient(180deg, var(--desk), var(--desk-deep));
}
.brand-page.ballot::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}
.brand-page.ballot > * { position: relative; z-index: 1; }

/* ============================================================
   HERO / LETTERHEAD
   ============================================================ */
.brand-page.ballot .lb-hero {
    padding-top: clamp(3rem, 6vw, 4.5rem);
    padding-bottom: clamp(2rem, 4vw, 3rem);
    text-align: center;
}
.brand-page.ballot .lb-letterhead { display: flex; flex-direction: column; align-items: center; }

/* the gold guilloché seal — concentric foil rings + the emblem struck in the centre */
.brand-page.ballot .lb-crest,
.brand-page.ballot .ballot-seal {
    position: relative;
    width: clamp(5rem, 13vw, 6.5rem);
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        repeating-radial-gradient(circle at 50% 50%,
            rgba(193, 154, 59, 0.0) 0 3px,
            rgba(193, 154, 59, 0.45) 3px 4px);
    box-shadow:
        0 0 0 1px var(--foil-deep) inset,
        0 0 0 4px rgba(193, 154, 59, 0.18),
        0 0 0 5px var(--foil-deep);
}
.brand-page.ballot .lb-crest::after,
.brand-page.ballot .ballot-seal::after {
    content: "";
    position: absolute;
    inset: 14%;
    border-radius: 50%;
    border: 1px solid var(--foil-deep);
}
.brand-page.ballot .lb-crest-emblem,
.brand-page.ballot .ballot-seal-emblem {
    position: relative;
    z-index: 1;
    width: 58%; height: 58%;
    background: linear-gradient(170deg, var(--foil-bright), var(--foil) 55%, var(--foil-deep));
    -webkit-mask: url("/brands/legacy-ballot.svg") center / contain no-repeat;
            mask: url("/brands/legacy-ballot.svg") center / contain no-repeat;
}

.brand-page.ballot .lb-kicker {
    margin: 1.6rem 0 0;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--foil-bright);
}
.brand-page.ballot .lb-wordmark {
    margin-top: 0.4rem;
    line-height: 0.92;
    font-family: 'Bodoni Moda', Didot, 'Times New Roman', serif;
}
.brand-page.ballot .lb-wordmark-1,
.brand-page.ballot .lb-wordmark-2 {
    display: block;
    font-weight: 500;
    font-size: clamp(3.2rem, 11vw, 6.5rem);
    letter-spacing: 0.01em;
    background: linear-gradient(180deg, var(--paper-hi) 30%, #d8c9a6 100%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}
.brand-page.ballot .lb-wordmark-2 {
    font-style: italic;
    font-weight: 600;
    background: linear-gradient(180deg, var(--foil-bright), var(--foil) 60%, var(--foil-deep));
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}

.brand-page.ballot .lb-desc {
    margin: 2rem auto 0;
    max-width: 42rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    font-size: 1.12rem;
    line-height: 1.66;
    color: var(--muted);
}
.brand-page.ballot .lb-desc p { margin: 0; }
.brand-page.ballot .lb-desc .lit,
.brand-page.ballot .lb-cert-p .lit { color: var(--foil-bright); font-weight: 600; }

.brand-page.ballot .lb-actions {
    margin-top: 2.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.3rem;
}
.brand-page.ballot .lb-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1.6rem;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--foil-bright), var(--foil-deep));
    color: var(--foil-ink);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 1px 0 rgba(255, 240, 200, 0.5) inset, 0 10px 28px -12px rgba(193, 154, 59, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.brand-page.ballot .lb-cta:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,240,200,0.6) inset, 0 14px 32px -10px rgba(193,154,59,0.7); }
.brand-page.ballot .lb-specimen {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--mark-bright);
    padding: 0.35rem 0.7rem;
    border: 1px dashed color-mix(in srgb, var(--mark) 55%, transparent);
    border-radius: 2px;
}

/* ============================================================
   VOTING INSTRUCTIONS — a printed instruction strip (paper band)
   ============================================================ */
.brand-page.ballot .lb-instructions-section { padding-bottom: clamp(1rem, 3vw, 2rem); }
.brand-page.ballot .lb-instructions {
    position: relative;
    background:
        linear-gradient(180deg, var(--paper-hi), var(--paper));
    color: var(--ink);
    border-radius: 3px;
    padding: clamp(1.5rem, 3.5vw, 2.2rem);
    box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 18px 40px -26px rgba(0,0,0,0.8);
    overflow: hidden;
}
/* a red ruling along the very top, like an official form band */
.brand-page.ballot .lb-instructions::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: repeating-linear-gradient(90deg, var(--mark) 0 14px, var(--mark-deep) 14px 28px);
}
.brand-page.ballot .lb-instructions-head {
    margin: 0.3rem 0 1.3rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--mark-deep);
}
.brand-page.ballot .lb-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.3rem;
}
@media (min-width: 720px) { .brand-page.ballot .lb-steps { grid-template-columns: repeat(3, 1fr); } }
.brand-page.ballot .lb-step {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}
.brand-page.ballot .lb-step + .lb-step { padding-left: 1.3rem; border-left: 1px solid var(--rule-soft); }
@media (max-width: 719px) {
    .brand-page.ballot .lb-step + .lb-step { padding-left: 0; border-left: 0; padding-top: 1.3rem; border-top: 1px solid var(--rule-soft); }
}
/* the step bullet is a filled red oval — a completed mark */
.brand-page.ballot .lb-step-no {
    flex: 0 0 auto;
    margin-top: 0.35rem;
    width: 20px; height: 13px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, var(--mark-bright), var(--mark) 55%, var(--mark-deep));
    box-shadow: 0 0 0 1.5px var(--ink) inset;
}
.brand-page.ballot .lb-step-h {
    margin: 0;
    font-family: 'Bodoni Moda', Didot, serif;
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: 0.005em;
    color: var(--ink);
}
.brand-page.ballot .lb-step-p {
    margin: 0.3rem 0 0;
    font-size: 0.96rem;
    line-height: 1.55;
    color: var(--ink-soft);
}

/* ============================================================
   THE BALLOT — the paper card (input + tally on one sheet)
   ============================================================ */
.brand-page.ballot .lb-ballot-section { padding-block: clamp(1rem, 3vw, 2rem); scroll-margin-top: 4.5rem; }

.brand-page.ballot .ballot {
    position: relative;
    max-width: 46rem;
    margin: 0 auto;
    padding: clamp(1.6rem, 4vw, 2.8rem) clamp(1.4rem, 4vw, 2.6rem) clamp(2rem, 4vw, 2.6rem);
    color: var(--ink);
    border-radius: 3px;
    background:
        /* faint paper fibres */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.04'/%3E%3C/svg%3E"),
        radial-gradient(120% 80% at 50% 0%, var(--paper-hi), var(--paper) 55%, var(--paper-shade) 100%);
    box-shadow:
        0 0 0 1px var(--paper-edge),
        0 2px 0 0 var(--paper-edge),
        0 50px 90px -40px rgba(0, 0, 0, 0.85),
        0 18px 40px -30px rgba(0, 0, 0, 0.7);
}
/* registration crop-marks in the corners — print precision */
.brand-page.ballot .ballot::before,
.brand-page.ballot .ballot::after {
    content: "";
    position: absolute;
    width: 12px; height: 12px;
    opacity: 0.55;
}
.brand-page.ballot .ballot::before { top: 9px; left: 9px; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.brand-page.ballot .ballot::after  { top: 9px; right: 9px; border-top: 1px solid var(--ink); border-right: 1px solid var(--ink); }

/* ---- letterhead ---- */
.brand-page.ballot .ballot-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 2px solid var(--ink);
}
.brand-page.ballot .ballot-seal { width: 3.6rem; box-shadow: 0 0 0 1px var(--foil-deep) inset, 0 0 0 3px rgba(193,154,59,0.2), 0 0 0 4px var(--foil-deep); }
.brand-page.ballot .ballot-head-title { display: flex; flex-direction: column; gap: 0.1rem; }
.brand-page.ballot .ballot-head-official {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.34em;
    color: var(--mark-deep);
}
.brand-page.ballot .ballot-head-name {
    font-family: 'Bodoni Moda', Didot, serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    line-height: 1;
    color: var(--ink);
}
.brand-page.ballot .ballot-head-sub {
    margin-top: 0.2rem;
    font-size: 0.82rem;
    font-style: italic;
    color: var(--ink-soft);
    font-family: 'Bodoni Moda', Didot, serif;
}
.brand-page.ballot .ballot-head-meta {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    text-align: right;
}
.brand-page.ballot .ballot-head-meta div { display: flex; gap: 0.5rem; justify-content: flex-end; align-items: baseline; }
.brand-page.ballot .ballot-head-meta dt {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-faint);
}
.brand-page.ballot .ballot-head-meta dd {
    margin: 0;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    min-width: 4.2ch;
}
@media (max-width: 560px) {
    .brand-page.ballot .ballot-head { grid-template-columns: auto 1fr; }
    .brand-page.ballot .ballot-head-meta { grid-column: 1 / -1; flex-direction: row; gap: 1.1rem; text-align: left; }
    .brand-page.ballot .ballot-head-meta div { justify-content: flex-start; }
}

/* ---- sections ---- */
.brand-page.ballot .ballot-section { padding-top: 1.6rem; }
.brand-page.ballot .ballot-section-head {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    column-gap: 0.7rem;
    margin-bottom: 1.2rem;
}
.brand-page.ballot .ballot-section-no {
    grid-row: span 2;
    align-self: center;
    width: 1.9rem; height: 1.9rem;
    display: grid; place-items: center;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    font-family: 'Bodoni Moda', Didot, serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
}
.brand-page.ballot .ballot-section-title {
    margin: 0;
    font-family: 'Bodoni Moda', Didot, serif;
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 0.005em;
    color: var(--ink);
}
.brand-page.ballot .ballot-section-rule {
    grid-column: 2;
    margin: 0.1rem 0 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--ink-soft);
}

/* ---- the measures (oval fill scales) ---- */
.brand-page.ballot .measures { display: flex; flex-direction: column; }
.brand-page.ballot .measure { padding: 0.85rem 0; border-bottom: 1px dotted var(--rule); }
.brand-page.ballot .measure:last-child { border-bottom: 0; }
.brand-page.ballot .measure-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}
.brand-page.ballot .measure-name {
    font-family: 'Bodoni Moda', Didot, serif;
    font-weight: 500;
    font-size: 1.12rem;
    color: var(--ink);
}
.brand-page.ballot .measure-read {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 1rem;
    font-weight: 500;
    color: var(--mark);
    font-variant-numeric: tabular-nums;
}
.brand-page.ballot .measure-read-max { color: var(--ink-faint); }

.brand-page.ballot .ovals { display: flex; gap: 0.55rem; }
.brand-page.ballot .oval {
    position: relative;
    flex: 0 0 auto;
    width: 2.4rem; height: 1.5rem;
    padding: 0;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.08s ease;
}
.brand-page.ballot .oval::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 32%, var(--mark-bright), var(--mark) 52%, var(--mark-deep));
    transform: scale(0);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand-page.ballot .oval.is-filled::before { transform: scale(1); }
.brand-page.ballot .oval:hover { border-color: var(--mark-deep); }
.brand-page.ballot .oval:active { transform: scale(0.94); }
.brand-page.ballot .oval:focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; }
@media (max-width: 480px) {
    .brand-page.ballot .ovals { gap: 0.4rem; }
    .brand-page.ballot .oval { flex: 1 1 0; width: auto; }
}

/* ---- the propositions ---- */
.brand-page.ballot .props { display: flex; flex-direction: column; gap: 0.7rem; }
.brand-page.ballot .prop {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    width: 100%;
    text-align: left;
    padding: 0.9rem 1rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    font: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.brand-page.ballot .prop:hover { border-color: var(--ink-soft); background: rgba(255, 255, 255, 0.45); }
.brand-page.ballot .prop:focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; }
/* the fill-to-certify box */
.brand-page.ballot .prop-box {
    flex: 0 0 auto;
    margin-top: 0.1rem;
    position: relative;
    width: 1.35rem; height: 1.35rem;
    border: 1.5px solid var(--ink);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.4);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.brand-page.ballot .prop-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 38% 30%, var(--mark-bright), var(--mark) 55%, var(--mark-deep));
    transform: scale(0);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand-page.ballot .prop-check {
    position: relative;
    z-index: 1;
    color: var(--paper-hi);
    font-size: 0.9rem;
    font-weight: 700;
    transform: scale(0);
    transition: transform 0.2s ease 0.08s;
}
.brand-page.ballot .prop.is-certified .prop-box::before { transform: scale(1); }
.brand-page.ballot .prop.is-certified .prop-check { transform: scale(1); }

.brand-page.ballot .prop-text { display: flex; flex-direction: column; gap: 0.12rem; min-width: 0; }
.brand-page.ballot .prop-no {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--mark-deep);
}
.brand-page.ballot .prop-name {
    font-family: 'Bodoni Moda', Didot, serif;
    font-weight: 600;
    font-size: 1.08rem;
    color: var(--ink);
}
.brand-page.ballot .prop-desc { font-size: 0.86rem; line-height: 1.45; color: var(--ink-soft); }

/* the certified stamp — slammed down at an angle */
.brand-page.ballot .prop-stamp {
    position: absolute;
    top: 50%; right: 1rem;
    transform: translateY(-50%) rotate(-12deg) scale(0.6);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--mark);
    padding: 0.2rem 0.5rem;
    border: 2px solid var(--mark);
    border-radius: 3px;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.18s ease;
}
.brand-page.ballot .prop.is-certified { border-color: var(--mark); background: var(--mark-wash); }
.brand-page.ballot .prop.is-certified .prop-stamp { opacity: 0.92; transform: translateY(-50%) rotate(-12deg) scale(1); }
@media (max-width: 560px) { .brand-page.ballot .prop-stamp { display: none; } }

/* the narrative-weight emphasis scale (uses red ovals like the marks) */
.brand-page.ballot .measure-emphasis {
    margin-top: 1.3rem;
    padding: 1rem;
    border: 1px dashed var(--rule);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    transition: opacity 0.25s ease;
}
.brand-page.ballot .measure-emphasis.is-dim { opacity: 0.45; }
.brand-page.ballot .measure-emphasis .measure-name { font-size: 0.98rem; }

/* clear / spoil */
.brand-page.ballot .ballot-clear {
    margin-top: 1.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.brand-page.ballot .ballot-clear:hover { color: var(--mark); border-color: var(--mark); }

/* ============================================================
   THE PERFORATED TEAR-LINE
   ============================================================ */
.brand-page.ballot .ballot-perf {
    position: relative;
    margin: 2rem -0.6rem 0.4rem;
    height: 1px;
    text-align: center;
    /* dashed perforation */
    background-image: repeating-linear-gradient(90deg, var(--rule) 0 7px, transparent 7px 14px);
}
/* the little punched holes riding the line */
.brand-page.ballot .ballot-perf::before {
    content: "";
    position: absolute;
    inset: -3px 0 auto;
    height: 7px;
    background-image: radial-gradient(circle, var(--paper-shade) 0 2.5px, transparent 3px);
    background-size: 22px 7px;
    background-position: 6px center;
    opacity: 0.8;
}
.brand-page.ballot .ballot-perf-label {
    position: relative;
    display: inline-block;
    transform: translateY(-50%);
    padding: 0 0.8rem;
    background: var(--paper);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ink-faint);
}

/* ============================================================
   THE CERTIFIED TALLY — futuristic returns printed on the stub
   ============================================================ */
.brand-page.ballot .tally-live { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--mark-deep); font-weight: 500; }
.brand-page.ballot .tally-live-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--mark);
    animation: lb-pulse 2.2s ease-in-out infinite;
}
@keyframes lb-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.75); } }

.brand-page.ballot .tally { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.brand-page.ballot .tally-row {
    position: relative;
    display: grid;
    grid-template-columns: 2.2rem 1fr auto;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--rule-soft);
}
.brand-page.ballot .tally-row:last-child { border-bottom: 0; }
.brand-page.ballot .tally-rank {
    font-family: 'Bodoni Moda', Didot, serif;
    font-weight: 600;
    font-size: 1.15rem;
    text-align: center;
    color: var(--ink-soft);
    font-variant-numeric: lining-nums;
}
.brand-page.ballot .tally-body { min-width: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.brand-page.ballot .tally-id { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.3rem 0.7rem; }
.brand-page.ballot .tally-name {
    font-family: 'Bodoni Moda', Didot, serif;
    font-weight: 600;
    font-size: 1.18rem;
    color: var(--ink);
    text-decoration: none;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}
a.tally-name:hover { color: var(--mark); text-decoration: underline; text-decoration-thickness: 1px; }
a.tally-name:focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; border-radius: 1px; }
.brand-page.ballot .tally-era {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.64rem;
    letter-spacing: 0.04em;
    color: var(--ink-faint);
}
.brand-page.ballot .tally-tag {
    margin-left: auto;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
}
.brand-page.ballot .tally-bar {
    height: 6px;
    border-radius: 1px;
    background: var(--paper-shade);
    box-shadow: 0 0 0 1px var(--rule-soft) inset;
    overflow: hidden;
}
.brand-page.ballot .tally-fill {
    display: block;
    height: 100%;
    background: repeating-linear-gradient(90deg, var(--ink) 0 1px, var(--ink-soft) 1px 2px, var(--ink) 2px 6px);
    background-color: var(--ink-soft);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.brand-page.ballot .tally-score {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    min-width: 2.6ch;
    text-align: right;
}

/* — the certified winner: struck in gold foil — */
.brand-page.ballot .tally-row.is-winner { padding-right: 5.2rem; }
.brand-page.ballot .tally-row.is-winner .tally-rank {
    color: var(--foil-ink);
    background: linear-gradient(180deg, var(--foil-bright), var(--foil-deep));
    border-radius: 2px;
    padding: 0.2rem 0;
    box-shadow: 0 1px 0 rgba(255,240,200,0.5) inset;
}
.brand-page.ballot .tally-row.is-winner .tally-name { color: var(--foil-deep); }
.brand-page.ballot .tally-row.is-winner .tally-fill {
    background: linear-gradient(90deg, var(--foil-deep), var(--foil) 60%, var(--foil-bright));
}
/* the gold wax/foil seal on the winner */
.brand-page.ballot .tally-winner-seal {
    position: absolute;
    top: 50%; right: 0;
    transform: translateY(-50%) rotate(-8deg);
    width: 4.4rem; height: 4.4rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        repeating-radial-gradient(circle at 50% 50%, rgba(138,106,32,0) 0 2.5px, rgba(138,106,32,0.4) 2.5px 3.5px),
        radial-gradient(circle at 42% 36%, var(--foil-bright), var(--foil) 60%, var(--foil-deep));
    box-shadow: 0 0 0 1px var(--foil-deep), 0 4px 10px -3px rgba(0,0,0,0.5);
    animation: lb-seal-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand-page.ballot .tally-winner-emblem {
    position: absolute;
    width: 52%; height: 52%;
    top: 12%;
    background: var(--foil-ink);
    -webkit-mask: url("/brands/legacy-ballot.svg") center / contain no-repeat;
            mask: url("/brands/legacy-ballot.svg") center / contain no-repeat;
    opacity: 0.8;
}
.brand-page.ballot .tally-winner-word {
    position: absolute;
    bottom: 0.45rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.42rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--foil-ink);
}
@keyframes lb-seal-in { from { transform: translateY(-50%) rotate(-30deg) scale(0.4); opacity: 0; } to { transform: translateY(-50%) rotate(-8deg) scale(1); opacity: 1; } }
@media (max-width: 560px) {
    .brand-page.ballot .tally-row.is-winner { padding-right: 0; }
    .brand-page.ballot .tally-winner-seal { width: 3.2rem; height: 3.2rem; top: 0.2rem; transform: rotate(-8deg); }
}

/* ============================================================
   THE CERTIFICATION — a torn sworn-statement slip
   ============================================================ */
.brand-page.ballot .lb-cert-section { padding-top: clamp(1rem, 3vw, 2rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.brand-page.ballot .lb-cert {
    position: relative;
    max-width: 44rem;
    margin: 0 auto;
    padding: clamp(1.6rem, 3.5vw, 2.3rem);
    color: var(--ink);
    background: linear-gradient(180deg, var(--paper-hi), var(--paper));
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 22px 50px -32px rgba(0,0,0,0.85);
    /* a torn bottom edge */
    -webkit-mask:
        linear-gradient(#000 0 0) top / 100% calc(100% - 9px) no-repeat,
        radial-gradient(circle at 6px -2px, transparent 5px, #000 5.5px) bottom left / 14px 11px repeat-x;
            mask:
        linear-gradient(#000 0 0) top / 100% calc(100% - 9px) no-repeat,
        radial-gradient(circle at 6px -2px, transparent 5px, #000 5.5px) bottom left / 14px 11px repeat-x;
}
.brand-page.ballot .lb-cert-head {
    margin: 0 0 0.8rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--mark-deep);
}
.brand-page.ballot .lb-cert-p {
    margin: 0;
    max-width: 40rem;
    font-family: 'Bodoni Moda', Didot, serif;
    font-size: 1.26rem;
    line-height: 1.55;
    color: var(--ink);
}
.brand-page.ballot .lb-cert-p .lit { color: var(--mark-deep); font-style: italic; }
.brand-page.ballot .lb-cert-sign { margin-top: 1.9rem; display: flex; flex-direction: column; gap: 0.35rem; max-width: 20rem; }
.brand-page.ballot .lb-cert-line { height: 1px; background: var(--ink); }
.brand-page.ballot .lb-cert-label {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-faint);
}

/* ============================================================
   READ-MORE NOTES — printed marginalia under each ballot section
   ============================================================ */
.brand-page.ballot .ballot-note { margin-top: 1.4rem; border-top: 1px dotted var(--rule); }
.brand-page.ballot .ballot-note-summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding-top: 0.95rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-soft);
    transition: color 0.2s ease;
}
.brand-page.ballot .ballot-note-summary::-webkit-details-marker { display: none; }
.brand-page.ballot .ballot-note-summary:hover { color: var(--mark); }
.brand-page.ballot .ballot-note-summary:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; }
.brand-page.ballot .ballot-note-caret {
    flex: 0 0 auto;
    width: 0.48rem; height: 0.48rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}
.brand-page.ballot .ballot-note[open] .ballot-note-caret { transform: rotate(-135deg); }

.brand-page.ballot .ballot-note::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size 0.4s ease, content-visibility 0.4s allow-discrete;
}
.brand-page.ballot .ballot-note[open]::details-content { block-size: auto; }

.brand-page.ballot .ballot-note-body { padding-top: 0.3rem; }
.brand-page.ballot .ballot-note-body p {
    margin: 0.7rem 0 0;
    max-width: 40rem;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--ink-soft);
}
.brand-page.ballot .ballot-note-body strong { color: var(--ink); font-weight: 600; }
.brand-page.ballot .ballot-note-body em { color: var(--ink); font-style: italic; }
.brand-page.ballot .ballot-eg {
    display: block;
    margin-top: 0.85rem !important;
    padding: 0.75rem 0.95rem;
    background: var(--mark-wash);
    border-left: 2px solid var(--mark);
    border-radius: 0 3px 3px 0;
    color: var(--ink) !important;
}
.brand-page.ballot .ballot-eg-label {
    display: inline-block;
    margin-right: 0.55rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.56rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--mark-deep);
}

/* ============================================================
   METHODOLOGY — the fine print at the bottom of the ballot
   ============================================================ */
.brand-page.ballot .lb-methodology-section { padding-top: clamp(1rem, 3vw, 2rem); padding-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.brand-page.ballot .lb-methodology {
    max-width: 46rem;
    margin: 0 auto;
    padding: clamp(1.6rem, 3.5vw, 2.4rem);
    color: var(--ink);
    background: linear-gradient(180deg, var(--paper-hi), var(--paper));
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 22px 50px -32px rgba(0, 0, 0, 0.85);
}
.brand-page.ballot .lb-method-eyebrow {
    margin: 0 0 0.5rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--mark-deep);
}
.brand-page.ballot .lb-method-title {
    margin: 0;
    font-family: 'Bodoni Moda', Didot, serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--ink);
}
.brand-page.ballot .lb-method-lead {
    margin: 0.9rem 0 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink-soft);
}
.brand-page.ballot .lb-method-lead .lit { color: var(--mark-deep); font-weight: 600; }
.brand-page.ballot .lb-formula {
    margin: 1.3rem 0 0;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.45);
    overflow-x: auto;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--ink);
    white-space: pre;
}
.brand-page.ballot .lb-formula code { font: inherit; color: inherit; }
.brand-page.ballot .lb-method-notes { margin: 1.5rem 0 0; display: flex; flex-direction: column; gap: 1.1rem; }
.brand-page.ballot .lb-method-notes div { display: flex; flex-direction: column; gap: 0.3rem; }
.brand-page.ballot .lb-method-notes dt {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--mark-deep);
}
.brand-page.ballot .lb-method-notes dd {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ink-soft);
}
.brand-page.ballot .lb-method-notes dd strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   PLAYER PROFILE — the "official record" dossier
   ============================================================ */
.brand-page.ballot .lb-profile-section { padding-block: clamp(2.25rem, 5vw, 3.75rem); }

.brand-page.ballot .lb-back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1.4rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--foil-bright);
    text-decoration: none;
    transition: color 0.2s ease, gap 0.2s ease;
}
.brand-page.ballot .lb-back:hover { color: #fff; gap: 0.7rem; }

.brand-page.ballot .lb-dossier {
    position: relative;
    max-width: 48rem;
    margin: 0 auto;
    padding: clamp(1.6rem, 4vw, 2.8rem);
    color: var(--ink);
    border-radius: 3px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.04'/%3E%3C/svg%3E"),
        radial-gradient(120% 80% at 50% 0%, var(--paper-hi), var(--paper) 55%, var(--paper-shade) 100%);
    box-shadow: 0 0 0 1px var(--paper-edge), 0 50px 90px -40px rgba(0, 0, 0, 0.85), 0 18px 40px -30px rgba(0, 0, 0, 0.7);
}
.brand-page.ballot .lb-dossier::before,
.brand-page.ballot .lb-dossier::after {
    content: "";
    position: absolute;
    width: 12px; height: 12px;
    opacity: 0.5;
}
.brand-page.ballot .lb-dossier::before { top: 9px; left: 9px; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.brand-page.ballot .lb-dossier::after { top: 9px; right: 9px; border-top: 1px solid var(--ink); border-right: 1px solid var(--ink); }

/* header */
.brand-page.ballot .lb-dossier-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.2rem;
    padding-bottom: 1.3rem;
    border-bottom: 2px solid var(--ink);
}
.brand-page.ballot .lb-portrait {
    width: 4.4rem; height: 4.4rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 40% 34%, var(--paper-hi), var(--paper-shade));
    box-shadow: 0 0 0 1px var(--foil-deep), 0 0 0 4px rgba(193, 154, 59, 0.18), 0 0 0 5px var(--foil-deep);
}
.brand-page.ballot .lb-portrait span {
    font-family: 'Bodoni Moda', Didot, serif;
    font-weight: 600;
    font-size: 1.55rem;
    color: var(--ink);
    letter-spacing: 0.02em;
}
.brand-page.ballot .lb-dossier-id { min-width: 0; }
.brand-page.ballot .lb-dossier-eyebrow {
    margin: 0;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--mark-deep);
}
.brand-page.ballot .lb-dossier-name {
    font-family: 'Bodoni Moda', Didot, serif;
    font-weight: 600;
    font-size: clamp(1.7rem, 5vw, 2.6rem);
    line-height: 1.02;
    color: var(--ink);
}
.brand-page.ballot .lb-dossier-era {
    margin: 0.25rem 0 0;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}
.brand-page.ballot .lb-dossier-index { text-align: right; }
.brand-page.ballot .lb-dossier-index-num {
    display: block;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 2.1rem;
    font-weight: 500;
    line-height: 1;
    color: var(--foil-deep);
    font-variant-numeric: tabular-nums;
}
.brand-page.ballot .lb-dossier-index-label {
    display: block;
    margin-top: 0.25rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.56rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-faint);
}
@media (max-width: 560px) {
    .brand-page.ballot .lb-dossier-head { grid-template-columns: auto 1fr; }
    .brand-page.ballot .lb-dossier-index { grid-column: 1 / -1; text-align: left; }
}

.brand-page.ballot .lb-dossier-record {
    margin: 1.3rem 0 0;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.78rem;
    line-height: 1.6;
    letter-spacing: 0.02em;
    color: var(--mark-deep);
}
.brand-page.ballot .lb-dossier-blurb {
    margin: 0.9rem 0 0;
    max-width: 42rem;
    font-family: 'Bodoni Moda', Didot, serif;
    font-size: 1.26rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--ink);
}
.brand-page.ballot .lb-inline-link { color: var(--mark-deep); text-underline-offset: 3px; }
.brand-page.ballot .lb-inline-link:hover { color: var(--mark); }

/* section headings inside the dossier */
.brand-page.ballot .lb-h2 {
    margin: 2.2rem 0 0;
    padding-top: 1.4rem;
    border-top: 1px solid var(--rule);
    font-family: 'Bodoni Moda', Didot, serif;
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--ink);
}
.brand-page.ballot .lb-breakdown-note {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--ink-soft);
}

/* the 100% stacked contribution graph */
.brand-page.ballot .lb-stack {
    display: flex;
    margin-top: 1.3rem;
    height: 2.1rem;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--rule) inset;
    background: var(--paper-shade);
}
.brand-page.ballot .lb-stack-seg {
    height: 100%;
    min-width: 2px;
    border-right: 1px solid rgba(243, 234, 212, 0.55);
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.brand-page.ballot .lb-stack-seg:last-child { border-right: 0; }

.brand-page.ballot .lb-legend {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: 0.5rem 1.1rem;
}
.brand-page.ballot .lb-legend-item { display: flex; align-items: center; gap: 0.5rem; }
.brand-page.ballot .lb-legend-swatch { width: 0.8rem; height: 0.8rem; border-radius: 2px; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(0,0,0,0.15) inset; }
.brand-page.ballot .lb-legend-name { font-size: 0.86rem; color: var(--ink-soft); }
.brand-page.ballot .lb-legend-pct {
    margin-left: auto;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

/* the measures table */
.brand-page.ballot .lb-mrow { padding: 1rem 0; border-bottom: 1px dotted var(--rule); }
.brand-page.ballot .lb-mrow:last-child { border-bottom: 0; }
.brand-page.ballot .lb-mrow-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.brand-page.ballot .lb-mrow-name { font-family: 'Bodoni Moda', Didot, serif; font-weight: 500; font-size: 1.12rem; color: var(--ink); }
.brand-page.ballot .lb-mrow-rating {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.brand-page.ballot .lb-mrow-rating-max { color: var(--ink-faint); }
.brand-page.ballot .lb-mrow-bar {
    margin-top: 0.55rem;
    height: 6px;
    border-radius: 1px;
    background: var(--paper-shade);
    box-shadow: 0 0 0 1px var(--rule-soft) inset;
    overflow: hidden;
}
.brand-page.ballot .lb-mrow-bar span { display: block; height: 100%; border-radius: 1px; transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.brand-page.ballot .lb-mrow-blurb { margin: 0.6rem 0 0; font-size: 0.88rem; line-height: 1.5; color: var(--ink-soft); }
.brand-page.ballot .lb-mrow-meta {
    margin-top: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.1rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
}

/* narrative fit */
.brand-page.ballot .lb-nrow { padding: 0.9rem 0; border-bottom: 1px dotted var(--rule); }
.brand-page.ballot .lb-nrow:last-child { border-bottom: 0; }
.brand-page.ballot .lb-nrow-head { display: flex; align-items: baseline; gap: 0.6rem; }
.brand-page.ballot .lb-nrow-no {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--mark-deep);
}
.brand-page.ballot .lb-nrow-name { font-family: 'Bodoni Moda', Didot, serif; font-weight: 500; font-size: 1.05rem; color: var(--ink); }
.brand-page.ballot .lb-nrow-val {
    margin-left: auto;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.92rem;
    color: var(--mark);
    font-variant-numeric: tabular-nums;
}
.brand-page.ballot .lb-nrow-bar {
    margin-top: 0.5rem;
    height: 5px;
    border-radius: 1px;
    background: var(--paper-shade);
    box-shadow: 0 0 0 1px var(--rule-soft) inset;
    overflow: hidden;
}
.brand-page.ballot .lb-nrow-bar span {
    display: block; height: 100%;
    background: repeating-linear-gradient(90deg, var(--mark) 0 5px, var(--mark-deep) 5px 6px);
    background-color: var(--mark);
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.brand-page.ballot .lb-nrow-desc { margin: 0.5rem 0 0; font-size: 0.86rem; line-height: 1.5; color: var(--ink-soft); }

/* the rest of the field — chips on the dark desk */
.brand-page.ballot .lb-roster { max-width: 48rem; margin: 1.8rem auto 0; }
.brand-page.ballot .lb-roster-label {
    margin: 0 0 0.8rem;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
}
.brand-page.ballot .lb-roster-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.brand-page.ballot .lb-roster-chip {
    padding: 0.5rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: rgba(243, 234, 212, 0.04);
    color: var(--paper);
    font-family: 'Bodoni Moda', Didot, serif;
    font-size: 0.98rem;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.brand-page.ballot .lb-roster-chip:hover { border-color: var(--foil); color: var(--foil-bright); background: rgba(193, 154, 59, 0.08); }

/* ============================================================
   JURISDICTION SEALS — choose the league
   ============================================================ */
.brand-page.ballot .ballot-leagues {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.4rem;
    padding-bottom: 1.3rem;
    border-bottom: 1px dashed var(--rule);
}
.brand-page.ballot .ballot-leagues-label {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--ink-faint);
}
.brand-page.ballot .ballot-seals { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.brand-page.ballot .league-seal {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.55rem 2.1rem 0.6rem 0.95rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.brand-page.ballot .league-seal-ring {
    position: absolute;
    top: 0.6rem; right: 0.65rem;
    width: 0.85rem; height: 0.85rem;
    border-radius: 50%;
    border: 1px solid var(--rule);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.brand-page.ballot .league-seal-name {
    font-family: 'Bodoni Moda', Didot, serif;
    font-weight: 600;
    font-size: 1.02rem;
    color: var(--ink-soft);
}
.brand-page.ballot .league-seal-sport {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.56rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-faint);
}
.brand-page.ballot .league-seal:hover { border-color: var(--foil); }
.brand-page.ballot .league-seal.is-active {
    border-color: var(--foil-deep);
    background: rgba(193, 154, 59, 0.1);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 2px 0 rgba(193, 154, 59, 0.25);
}
.brand-page.ballot .league-seal.is-active .league-seal-name { color: var(--ink); }
.brand-page.ballot .league-seal.is-active .league-seal-ring {
    background: radial-gradient(circle at 38% 32%, var(--foil-bright), var(--foil-deep));
    border-color: var(--foil-deep);
    box-shadow: 0 0 0 2px rgba(193, 154, 59, 0.2);
}

/* ============================================================
   CASE-FILE PILLAR TABS
   ============================================================ */
.brand-page.ballot .pillar-tabs {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 0.35rem;
    margin-top: 1.6rem;
    padding-left: 0.3rem;
}
.brand-page.ballot .pillar-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.05rem 0.7rem;
    border: 1px solid var(--rule);
    border-bottom: none;
    border-radius: 7px 7px 0 0;
    background: linear-gradient(180deg, var(--paper-shade), var(--paper-edge));
    color: var(--ink-soft);
    cursor: pointer;
    font-family: 'Bodoni Moda', Didot, serif;
    font-size: 1.02rem;
    transform: translateY(3px);
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.brand-page.ballot .pillar-tab:hover { color: var(--ink); }
.brand-page.ballot .pillar-tab-no {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
}
.brand-page.ballot .pillar-tab.is-active {
    transform: translateY(0);
    background: linear-gradient(180deg, var(--paper-hi), var(--paper));
    color: var(--ink);
    border-top: 2px solid var(--foil-deep);
    box-shadow: 0 -3px 8px -5px rgba(0, 0, 0, 0.4);
}
.brand-page.ballot .pillar-tab.pillar-findings.is-active { border-top-color: var(--seg-bronze); }
.brand-page.ballot .pillar-tab.pillar-testimony.is-active { border-top-color: var(--mark); }
.brand-page.ballot .pillar-tab.is-active .pillar-tab-no { color: var(--foil-deep); }
.brand-page.ballot .pillar-tab.pillar-testimony.is-active .pillar-tab-no { color: var(--mark); }

.brand-page.ballot .pillar-panel {
    position: relative;
    z-index: 0;
    border: 1px solid var(--rule);
    border-radius: 0 5px 5px 5px;
    background: linear-gradient(180deg, var(--paper-hi), var(--paper));
    padding: clamp(1.2rem, 3vw, 1.85rem);
    box-shadow: 0 14px 30px -26px rgba(0, 0, 0, 0.6) inset;
}
.brand-page.ballot .pillar-panel-rule {
    margin: 0 0 1.4rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--ink-soft);
}
.brand-page.ballot .pillar-panel-legal {
    font-family: 'Bodoni Moda', Didot, serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--ink);
}

/* categories inside a pillar tab */
.brand-page.ballot .cats { display: flex; flex-direction: column; gap: 1.6rem; }
.brand-page.ballot .cat-measures {
    list-style: none;
    margin: 0.7rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.brand-page.ballot .cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.6rem;
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35);
}
.brand-page.ballot .cat-chip-name { font-size: 0.76rem; color: var(--ink-soft); }
.brand-page.ballot .cat-chip-prestige {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.6rem;
    color: var(--foil-deep);
    background: rgba(193, 154, 59, 0.16);
    padding: 0.05rem 0.35rem;
    border-radius: 2px;
}

/* proposition sponsor "affidavit" tags */
.brand-page.ballot .prop-voices { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.65rem; }
.brand-page.ballot .prop-voice,
.brand-page.ballot .lb-voice {
    display: inline-flex;
    flex-direction: column;
    padding: 0.32rem 0.6rem;
    border: 1px solid var(--rule);
    border-left-width: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
}
.brand-page.ballot .prop-voice.is-shoot,
.brand-page.ballot .lb-voice.is-shoot { border-left-color: var(--ink); }
.brand-page.ballot .prop-voice.is-kayfabe,
.brand-page.ballot .lb-voice.is-kayfabe { border-left-color: var(--mark); }
.brand-page.ballot .prop-voice-tag {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-faint);
}
.brand-page.ballot .prop-voice-name,
.brand-page.ballot .lb-voice-name {
    font-family: 'Bodoni Moda', Didot, serif;
    font-size: 0.9rem;
    color: var(--ink);
}
.brand-page.ballot .prop-voice-role,
.brand-page.ballot .lb-voice-role {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.54rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-soft);
}

/* ============================================================
   PROFILE additions — badges, category breakdown, voices
   ============================================================ */
.brand-page.ballot .lb-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.1rem 0 0; padding: 0; }
.brand-page.ballot .lb-badge {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--foil-deep);
    border-radius: 999px;
    color: var(--foil-deep);
    background: rgba(193, 154, 59, 0.08);
}

.brand-page.ballot .lb-cat { padding: 0.9rem 0; border-bottom: 1px dotted var(--rule); }
.brand-page.ballot .lb-cat:last-child { border-bottom: 0; }
.brand-page.ballot .lb-cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.brand-page.ballot .lb-cat-name { font-family: 'Bodoni Moda', Didot, serif; font-weight: 500; font-size: 1.06rem; color: var(--ink); }
.brand-page.ballot .lb-cat-weight {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
}
.brand-page.ballot .lb-cat-lines { list-style: none; margin: 0.55rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.brand-page.ballot .lb-cat-line {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 0.5rem 1rem;
    align-items: baseline;
    font-size: 0.85rem;
}
.brand-page.ballot .lb-cat-line-name { color: var(--ink-soft); min-width: 0; }
.brand-page.ballot .lb-cat-line-count { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink); font-variant-numeric: tabular-nums; }
.brand-page.ballot .lb-cat-line-prestige {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
}
.brand-page.ballot .lb-cat-line-pts { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: var(--foil-deep); font-variant-numeric: tabular-nums; text-align: right; }
.brand-page.ballot .lb-cat-line.is-zero { opacity: 0.38; }
@media (max-width: 540px) {
    .brand-page.ballot .lb-cat-line { grid-template-columns: 1fr auto; }
    .brand-page.ballot .lb-cat-line-prestige { display: none; }
}
.brand-page.ballot .lb-nrow-voices { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.55rem; }

.brand-page.ballot .tally-topten {
    display: inline-block;
    margin-left: 0.6rem;
    vertical-align: middle;
    padding: 0.18rem 0.55rem;
    border: 1px solid var(--foil-deep);
    border-radius: 999px;
    background: rgba(193, 154, 59, 0.12);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.56rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--foil-deep);
}

/* ============================================================
   Reduced motion — calm everything down
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .brand-page.ballot *,
    .brand-page.ballot *::before,
    .brand-page.ballot *::after {
        animation: none !important;
        transition-duration: 0.001ms !important;
    }
}
