:root {
    --ink: #14171a;
    --paper: #eef1ea;
    --paper-2: #e2e7db;
    --paper-line: #c7d0bd;
    --charcoal: #1a1f1c;
    --charcoal-2: #232924;
    --text-on-charcoal: #eef1ea;
    --text-on-charcoal-dim: #9aa799;
    --red: #b3251a;
    --red-ink: #8c1c14;
    --green: #2f6d4a;
    --green-text: #eafff0;
    --amber: #b8791a;

    --font-text: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

    --max-width: 1180px;
    --edge: 1px solid var(--paper-line);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { overflow-x: hidden; max-width: 100%; }

body {
    margin: 0;
    font-family: var(--font-text);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.hero-head, .module-row, .disc-row, .step, .footer-grid,
.masthead-bar, .brand, .hero-proof .stat, .bulletin-meta, .bulletin-head {
    min-width: 0;
}

.hero-head > *, .module-row > *, .disc-row > *, .step > *, .footer-grid > *,
.masthead-bar > *, .brand > *, .hero-proof .stat > *, .bulletin-meta > *, .bulletin-head > * {
    min-width: 0;
}

a { color: inherit; text-decoration: none; }

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

::selection { background: var(--red); color: var(--paper); }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--paper-line); border: 3px solid var(--paper-2); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b8ac8c; }

:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

.num, .mono, .mark-time, table.bulletin td, .stat b, .doc-id {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 28px;
}

/* ---------- Masthead ---------- */
header.masthead {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--paper);
    border-bottom: 3px solid var(--ink);
}

.masthead-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    gap: 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.brand .wordmark {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.brand .subtitle {
    font-family: var(--font-mono);
    color: var(--red-ink);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    padding-left: 12px;
    border-left: var(--edge);
}

nav.links {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav.links a {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink);
    position: relative;
    padding: 4px 0;
}

nav.links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 0;
    height: 2px;
    background: var(--red);
    transition: right 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

nav.links a:hover::after { right: 0; }

.masthead-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid var(--ink);
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
    border-radius: 2px;
}

.btn-primary {
    background: var(--ink);
    color: var(--paper);
}

.btn-primary:hover {
    background: var(--red-ink);
    border-color: var(--red-ink);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -8px rgba(20, 23, 26, 0.5);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--paper-line);
}

.btn-ghost:hover { border-color: var(--ink); }

.btn-lg { padding: 15px 28px; font-size: 0.98rem; }

.menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--ink);
    border-radius: 2px;
    color: var(--ink);
    width: 42px;
    height: 42px;
    cursor: pointer;
    position: relative;
}

.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    height: 2px;
    background: var(--ink);
}
.menu-toggle span { top: 50%; transform: translateY(-50%); }
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }

/* ---------- Hero: the bulletin ---------- */
.hero {
    position: relative;
    padding: 64px 28px 88px;
    border-bottom: var(--edge);
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ---------- Hero carousel ---------- */
.hero-carousel {
    position: relative;
}

.hero-slide {
    display: none;
    grid-template-columns: 1fr;
    gap: 44px;
}

.hero-slide.is-active {
    display: grid;
    animation: hero-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hero-slide-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.carousel-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--paper-line);
    color: var(--ink);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.carousel-arrow:hover {
    border-color: var(--ink);
    background: var(--paper-2);
}

.carousel-dots {
    display: flex;
    align-items: center;
    gap: 10px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--paper-line);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.carousel-dot:hover { background: #a89f8d; }

.carousel-dot.is-active {
    background: var(--red);
    transform: scale(1.25);
}

.hero-head {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    align-items: end;
}

.hero h1 {
    font-size: clamp(2.3rem, 4vw, 3.5rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
    margin: 0 0 22px;
    font-weight: 800;
}

.hero h1 em {
    font-style: italic;
    font-weight: 500;
    color: var(--red-ink);
}

.hero p.lead {
    color: #4a4437;
    font-size: 1.1rem;
    max-width: 52ch;
    margin: 0 0 30px;
}

.hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-cta-main {
    justify-content: center;
    margin-top: 32px;
}

.hero-proof {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 0 4px;
    border-top: var(--edge);
}

.hero-proof .stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.94rem;
}

.hero-proof .stat b {
    font-weight: 600;
    color: var(--ink);
    font-size: 0.9rem;
}

.hero-proof .stat span {
    color: #6b6353;
}

/* ---------- Result bulletin panel ---------- */
.bulletin {
    background: var(--charcoal);
    color: var(--text-on-charcoal);
    border-radius: 3px;
    box-shadow: 0 40px 70px -30px rgba(20, 17, 15, 0.45);
    overflow: hidden;
    position: relative;
}

.bulletin::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(244, 240, 231, 0.08);
    pointer-events: none;
    border-radius: 3px;
}

.bulletin-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid rgba(244, 240, 231, 0.14);
}

.bulletin-event {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.bulletin-event small {
    display: block;
    font-family: var(--font-mono);
    color: var(--text-on-charcoal-dim);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    margin-top: 5px;
}

.live-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--green-text);
    background: var(--green);
    padding: 6px 11px 6px 9px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.live-tag .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-text);
}

.bulletin-meta {
    display: flex;
    gap: 18px;
    padding: 12px 24px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-on-charcoal-dim);
    border-bottom: 1px solid rgba(244, 240, 231, 0.14);
    letter-spacing: 0.01em;
}

.bulletin-meta b { color: var(--text-on-charcoal); font-weight: 600; }

table.bulletin {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table.bulletin th {
    text-align: left;
    color: var(--text-on-charcoal-dim);
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 24px 8px;
    border-bottom: 1px solid rgba(244, 240, 231, 0.14);
}

table.bulletin th:first-child, table.bulletin td:first-child { padding-left: 24px; width: 44px; }
table.bulletin th:last-child, table.bulletin td:last-child { padding-right: 24px; text-align: right; }

table.bulletin td {
    padding: 12px 8px;
    border-bottom: 1px solid rgba(244, 240, 231, 0.08);
    font-family: var(--font-text);
}

table.bulletin tr:last-child td { border-bottom: none; }

.pos-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.8rem;
    background: rgba(244, 240, 231, 0.08);
    color: var(--text-on-charcoal-dim);
    border-radius: 2px;
}

.pos-num.first { background: var(--red); color: #fff2ef; }

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

.schedule-event-link {
    color: var(--text-on-charcoal);
    text-decoration: none;
    border-bottom: 1px solid rgba(244, 240, 231, 0.3);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.schedule-event-link:hover {
    color: var(--red);
    border-color: var(--red);
}

.record-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--amber);
    letter-spacing: 0.02em;
    margin-left: 8px;
}

.record-tag::before { content: "["; }
.record-tag::after { content: "]"; }

.mark-time { font-weight: 700; font-size: 0.95rem; }

.state-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.state-tag.is-ok { color: var(--green); }
.state-tag.is-pending { color: var(--amber); }

.bulletin-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 24px 18px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-on-charcoal-dim);
    letter-spacing: 0.01em;
}

.stamp {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: #e3877e;
    padding: 6px 12px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.06em;
    transform: rotate(-3deg);
}

.stamp::before, .stamp::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    border-top: 1px solid rgba(227, 135, 126, 0.7);
    border-bottom: 1px solid rgba(227, 135, 126, 0.7);
}

.stamp::before {
    left: 0;
    border-left: 1px solid rgba(227, 135, 126, 0.7);
}

.stamp::after {
    right: 0;
    border-right: 1px solid rgba(227, 135, 126, 0.7);
}

.bulletin-note {
    padding: 12px 24px 4px;
    font-size: 0.78rem;
    color: var(--text-on-charcoal-dim);
    font-style: italic;
}

/* ---------- Section rhythm ---------- */
section { padding: 96px 28px; border-bottom: var(--edge); }
section:last-of-type { border-bottom: none; }

.section-head {
    max-width: 640px;
    margin: 0 auto 52px;
}

.section-head h2 {
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    font-weight: 800;
}

.section-head p {
    color: #4a4437;
    font-size: 1.06rem;
    margin: 0;
    max-width: 58ch;
}

/* ---------- Modules: bulletin sections, not icon cards ---------- */
.modules {
    max-width: var(--max-width);
    margin: 0 auto;
    border-top: 2px solid var(--ink);
}

.module-row {
    display: grid;
    grid-template-columns: 100px 1fr 1.3fr;
    gap: 32px;
    padding: 30px 0;
    border-bottom: var(--edge);
    align-items: baseline;
}

.module-row .m-id {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--red-ink);
    font-weight: 700;
    letter-spacing: 0.01em;
    align-self: start;
    padding-top: 3px;
}

.module-row h3 {
    font-size: 1.15rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.module-row p {
    color: #4a4437;
    margin: 0;
    font-size: 0.96rem;
    max-width: 52ch;
}

/* ---------- Tool index (hero slide 1) ---------- */
.tool-index {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.tool-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(244, 240, 231, 0.12);
}

.tool-row:nth-last-child(-n+1) { border-bottom: none; }

.tool-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 26px;
    padding: 0 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: rgba(244, 240, 231, 0.08);
    color: var(--text-on-charcoal-dim);
    border-radius: 2px;
    flex-shrink: 0;
}

.tool-name {
    font-weight: 600;
    font-size: 0.92rem;
}

@media (max-width: 560px) {
    .tool-index { grid-template-columns: 1fr; }
    .tool-row:nth-last-child(-n+1) { border-bottom: 1px solid rgba(244, 240, 231, 0.12); }
    .tool-row:last-child { border-bottom: none; }
}

/* ---------- Discipline index ---------- */
.disciplines {
    background: var(--charcoal);
    color: var(--text-on-charcoal);
}

.disc-index {
    max-width: var(--max-width);
    margin: 0 auto;
    border-top: 1px solid rgba(244, 240, 231, 0.16);
}

.disc-row {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(244, 240, 231, 0.12);
}

.disc-row .d-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-on-charcoal-dim);
}

.disc-row .d-name {
    font-weight: 600;
    font-size: 1rem;
}

.disc-row .d-events {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-on-charcoal-dim);
    text-align: right;
}

.disciplines .section-head p { color: var(--text-on-charcoal-dim); }
.disciplines .section-head h2 { color: var(--text-on-charcoal); }

/* ---------- How it works: procedure list ---------- */
.steps {
    max-width: var(--max-width);
    margin: 0 auto;
    counter-reset: step;
}

.step {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 24px;
    padding: 26px 0;
    border-bottom: var(--edge);
}

.step:last-child { border-bottom: none; }

.step .num {
    counter-increment: step;
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--paper-line);
}

.step .num::before {
    content: counter(step, decimal-leading-zero);
}

.step h3 {
    font-size: 1.05rem;
    margin: 0 0 6px;
    font-weight: 700;
}

.step p {
    color: #4a4437;
    font-size: 0.94rem;
    margin: 0;
    max-width: 55ch;
}

/* CTA band */
.cta-band {
    max-width: var(--max-width);
    margin: 0 auto;
    background: var(--ink);
    color: var(--paper);
    border-radius: 3px;
    padding: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.cta-band h2 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    margin: 0 0 10px;
    font-weight: 800;
    color: var(--paper);
}

.cta-band p {
    color: #b8ac8c;
    margin: 0;
    max-width: 460px;
}

.cta-band .btn-primary {
    background: var(--red);
    border-color: var(--red);
    color: #fff2ef;
}

.cta-band .btn-primary:hover {
    background: var(--red-ink);
    border-color: var(--red-ink);
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.55);
}

.cta-band .btn-ghost {
    border-color: #4a4437;
    color: var(--paper);
}

.cta-band .btn-ghost:hover { border-color: var(--paper); }

/* ---------- Palette selector ---------- */
.palette-row {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--paper-line);
    border: 1px solid var(--paper-line);
}

.palette-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px 20px;
    background: var(--paper);
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.palette-btn .p-swatches {
    display: flex;
    gap: 6px;
}

.palette-btn .p-swatch {
    width: 20px;
    height: 20px;
    border-radius: 2px;
}

.p-swatch--red { background: var(--red); }
.p-swatch--amber { background: var(--amber); }
.p-swatch--green { background: var(--green); }
.p-swatch--charcoal { background: var(--charcoal); }

.palette-btn .p-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink);
}

.palette-btn .p-desc {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #6b6353;
    letter-spacing: 0.01em;
}

.palette-btn .p-check {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 18px;
    height: 18px;
    border: 1px solid var(--red);
    display: none;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--red);
}

.palette-btn.active .p-check { display: flex; }
.palette-btn.active { background: var(--paper-2); }

@media (max-width: 720px) {
    .palette-row { grid-template-columns: 1fr 1fr; }
}

/* Footer */
footer {
    padding: 56px 28px 32px;
    background: var(--paper-2);
}

.footer-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 40px;
}

.footer-grid .footer-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5c5648;
    margin: 0 0 16px;
    font-weight: 600;
}

.footer-grid ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-grid a {
    color: #4a4437;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.footer-grid a:hover { color: var(--ink); }

.footer-bottom {
    max-width: var(--max-width);
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: var(--edge);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: #6b6353;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .hero-head { grid-template-columns: 1fr; }
    .module-row { grid-template-columns: 60px 1fr; }
    .module-row h3 { grid-column: 2; }
    .module-row p { grid-column: 2; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    nav.links, .masthead-actions .btn-ghost, .brand .subtitle { display: none; }
    .menu-toggle { display: inline-flex; }
    .module-row { grid-template-columns: 1fr; gap: 8px; }
    .module-row .m-id { padding-top: 0; grid-column: 1; }
    .module-row h3 { grid-column: 1; }
    .module-row p { grid-column: 1; }
    .disc-row { grid-template-columns: 40px 1fr; }
    .disc-row .d-events { grid-column: 2; text-align: left; }
    .footer-grid { grid-template-columns: 1fr; }
    .cta-band { padding: 36px 24px; flex-direction: column; text-align: center; }
    .cta-band p { max-width: none; }
    section { padding: 64px 20px; }
    .bulletin-meta { flex-wrap: wrap; gap: 10px 18px; }
    table.bulletin:not(.table-org):not(.scores-table) th:nth-child(3), table.bulletin:not(.table-org):not(.scores-table) td:nth-child(3) { display: none; }
    table.bulletin th, table.bulletin td { padding-left: 6px; padding-right: 6px; }
    table.bulletin:not(.table-org) th:first-child, table.bulletin:not(.table-org) td:first-child { padding-left: 16px; width: 34px; }
    table.bulletin th:first-child { padding-left: 16px; }
    table.bulletin th:last-child, table.bulletin td:last-child { padding-right: 16px; }
    table.bulletin.table-org th:nth-child(2), table.bulletin.table-org td:nth-child(2) { display: none; }
    table.scores-table th:nth-child(2), table.scores-table td:nth-child(2) { display: none; }
    .bulletin-head, .bulletin-meta, .bulletin-note, .bulletin-foot { padding-left: 16px; padding-right: 16px; }
    .hero-proof .stat { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ---------- Page header (non-hero surfaces) ---------- */
.page-header {
    padding: 56px 28px 40px;
    border-bottom: var(--edge);
}

.page-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: clamp(2rem, 3.4vw, 2.8rem);
    letter-spacing: -0.02em;
    margin: 0 0 12px;
    font-weight: 800;
}

.page-header p {
    color: #4a4437;
    font-size: 1.02rem;
    margin: 0;
    max-width: 52ch;
}

.page-header-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #6b6353;
    text-align: right;
    white-space: nowrap;
}

/* El sello está pensado para fondo oscuro (bulletin); sobre papel necesita la tinta roja fuerte */
.page-header-meta .stamp {
    display: flex;
    width: fit-content;
    margin: 0 0 12px auto;
    color: var(--red-ink);
    font-size: 1rem;
}

.page-header-meta .stamp::before, .page-header-meta .stamp::after { border-color: currentColor; }

/* ---------- Calendar toolbar: filters + view switch ---------- */
.cal-toolbar {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    border-bottom: var(--edge);
}

.cal-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cal-filter {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #4a4437;
    background: transparent;
    border: 1px solid var(--paper-line);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.cal-filter:hover { border-color: var(--ink); }

.cal-filter.is-active {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

.cal-view-switch {
    display: inline-flex;
    border: 1px solid var(--paper-line);
}

.cal-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #4a4437;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.cal-view-btn:not(:last-child) { border-right: 1px solid var(--paper-line); }

.cal-view-btn.is-active {
    background: var(--ink);
    color: var(--paper);
}

/* ---------- Calendar: agenda / list view ---------- */
.cal-agenda {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 28px 96px;
}

.cal-month-group {
    margin-top: 48px;
}

.cal-month-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--red-ink);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ink);
    margin-bottom: 4px;
}

.cal-event-row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 20px 0;
    border-bottom: var(--edge);
}

.cal-event-row:last-child { border-bottom: none; }

.cal-event-date {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
}

.cal-event-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.cal-event-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: #6b6353;
}

.cal-event-status {
    justify-self: end;
}

/* ---------- Calendar: grid view ---------- */
.cal-grid-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 28px 96px;
}

.cal-grid-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 28px;
}

.cal-grid-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--paper-line);
    background: transparent;
    color: var(--ink);
    font-size: 1.1rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.cal-grid-nav:hover { border-color: var(--ink); background: var(--paper-2); }

.cal-grid-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    min-width: 220px;
    text-align: center;
}

.cal-grid {
    border-top: 2px solid var(--ink);
    border-left: var(--edge);
}

.cal-grid-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: var(--edge);
}

.cal-grid-weekdays span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b6353;
    padding: 10px 12px;
    border-right: var(--edge);
}

.cal-grid-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 108px;
}

.cal-grid-day {
    border-right: var(--edge);
    border-bottom: var(--edge);
    padding: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cal-grid-day.is-muted { background: var(--paper-2); }

.cal-grid-day .day-num {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #6b6353;
}

.cal-grid-day.is-muted .day-num { color: #b3a98f; }

.cal-grid-day .day-event {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 3px 6px;
    background: var(--ink);
    color: var(--paper);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-grid-day .day-event.is-live { background: var(--green); color: var(--green-text); }
.cal-grid-day .day-event.is-cycling { background: var(--red); color: #fff2ef; }

@media (max-width: 960px) {
    .cal-grid-days { grid-auto-rows: 84px; }
    .cal-grid-day .day-event { display: none; }
    .cal-grid-day.has-event::after {
        content: "";
        position: absolute;
        bottom: 8px;
        left: 8px;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--red);
    }
}

@media (max-width: 720px) {
    .page-header-inner { flex-direction: column; align-items: flex-start; }
    .page-header-meta { text-align: left; }
    .page-header-meta .stamp { margin-left: 0; }
    .cal-toolbar { flex-direction: column; align-items: stretch; }
    .cal-event-row { grid-template-columns: 1fr; gap: 8px; }
    .cal-event-status { justify-self: start; }
    .cal-grid-title { min-width: 0; font-size: 1.1rem; }
    .cal-grid-weekdays span { padding: 8px 4px; font-size: 0.62rem; }
    .cal-grid-days { grid-auto-rows: 64px; }
    .cal-grid-day { padding: 4px; }
}

/* ---------- Championships directory ---------- */
.champ-list {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 8px 28px 96px;
    border-top: 2px solid var(--ink);
}

.champ-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 28px 0;
    border-bottom: var(--edge);
    color: inherit;
}

.champ-row:last-child { border-bottom: none; }

.champ-row-logo {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--paper-2);
    border: 1px solid var(--paper-line);
}

.champ-row-body {
    min-width: 0;
    flex: 1;
}

.champ-row-logo--placeholder {
    background-image: repeating-linear-gradient(
        135deg,
        var(--paper-2),
        var(--paper-2) 4px,
        var(--paper-line) 4px,
        var(--paper-line) 5px
    );
}

.champ-row-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 10px;
}

.champ-row h3 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
    transition: color 0.15s ease;
}

.champ-row:hover h3 { color: var(--red-ink); }

.champ-row-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #6b6353;
    margin-bottom: 14px;
}

.champ-row-meta b { color: var(--ink); font-weight: 600; }

.champ-modules {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.champ-mod {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 4px 9px;
    border: 1px solid var(--paper-line);
    color: #4a4437;
}

.champ-mod.is-open { border-color: var(--green); color: var(--green); }
.champ-mod.is-closed { border-color: var(--paper-line); color: #a89f8d; }
.champ-mod.is-live { border-color: var(--red); color: var(--red-ink); }

@media (max-width: 720px) {
    .champ-row-top { flex-direction: column; gap: 6px; }
    .champ-list { padding: 8px 20px 64px; }
    .champ-row { gap: 14px; }
    .champ-row-logo { width: 44px; height: 44px; }
}

/* ---------- Championship detail ---------- */
.champ-detail-header {
    padding: 40px 28px 0;
    border-bottom: var(--edge);
}

.champ-detail-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.champ-back {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b6353;
    margin-bottom: 20px;
    transition: color 0.15s ease;
}

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

.champ-detail-top {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.champ-detail-top h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    letter-spacing: -0.02em;
    margin: 0;
    font-weight: 800;
}

.champ-detail-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #6b6353;
    margin-bottom: 18px;
}

.champ-detail-meta b { color: var(--ink); font-weight: 600; }

/* ---------- Championship detail: page-level Horario / Resultados tabs ---------- */
.champ-page-tabs {
    display: flex;
    gap: 8px;
    margin: 18px -18px 0;
}

.champ-page-tab {
    display: inline-block;
    padding: 12px 18px;
    background: transparent;
    border: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b6353;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: color 0.15s ease;
}

.champ-page-tab:hover { color: var(--ink); }

.champ-page-tab.is-active { color: var(--ink); }

.champ-page-tab.is-active::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: -1px;
    height: 2px;
    background: var(--red);
}

.champ-page-view--schedule {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 28px 96px;
}

table.schedule-table th:nth-child(1), table.schedule-table td:nth-child(1) { width: 84px; }
table.schedule-table th:last-child, table.schedule-table td:last-child { text-align: left; }

/* ---------- Championship detail: events nav + panels ---------- */
.champ-detail-body {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 28px 96px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
}

.champ-detail-body--single {
    grid-template-columns: 1fr;
}

.champ-events-nav {
    display: flex;
    flex-direction: column;
    border-top: 2px solid var(--ink);
    position: sticky;
    top: 90px;
}

.champ-events-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b6353;
    margin: 14px 0 6px;
}

/* ---------- Championship results: search bar + card grid ---------- */
.champ-results-layout {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 28px 96px;
}

.champ-search-bar {
    display: flex;
    gap: 10px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--ink);
}

.champ-search-input {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--paper-line);
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-text);
    font-size: 0.92rem;
}

.champ-search-input::placeholder { color: #a89f8d; }

.champ-search-input:focus {
    outline: none;
    border-color: var(--red-ink);
}

.champ-search-select {
    padding: 11px 12px;
    border: 1px solid var(--paper-line);
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.champ-search-select:focus {
    outline: none;
    border-color: var(--red-ink);
}

.champ-results-grid {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.champ-event-card {
    display: block;
    padding: 18px;
    border: 1px solid var(--paper-line);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.champ-event-card:hover {
    border-color: var(--red-ink);
    background: var(--paper-2);
}

.champ-event-card-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.champ-event-card h3 {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}

.champ-event-card-meta {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: #6b6353;
}

/* ---------- Ranking ---------- */
.ranking-layout {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 8px 28px 96px;
}

.ranking-panel { display: none; }

.ranking-panel.is-active {
    display: block;
    animation: hero-slide-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 720px) {
    .ranking-layout { padding: 8px 20px 64px; }
}

/* ---------- Championship scores (school ranking + breakdown) ---------- */
table.scores-table th:first-child, table.scores-table td:first-child {
    width: 40px;
    padding-left: 24px;
    padding-right: 0;
}

table.scores-table th:nth-child(2), table.scores-table td:nth-child(2) { width: 44px; }

.scores-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: transparent;
    border: 1px solid rgba(244, 240, 231, 0.2);
    border-radius: 2px;
    color: var(--text-on-charcoal-dim);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.scores-toggle:hover {
    color: var(--text-on-charcoal);
    border-color: var(--red);
}

.scores-toggle-arrow {
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.scores-row.is-open .scores-toggle-arrow { transform: rotate(90deg); }
.scores-row.is-open .scores-toggle { color: var(--text-on-charcoal); border-color: var(--red); }

.scores-breakdown-row td {
    padding: 0;
    border-bottom: none;
}

.scores-breakdown {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px 16px 62px;
}

.scores-breakdown-row.is-open .scores-breakdown {
    display: flex;
    animation: hero-slide-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.scores-breakdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid rgba(244, 240, 231, 0.14);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-on-charcoal-dim);
}

.scores-breakdown-item b { color: var(--text-on-charcoal); font-weight: 700; }

@media (max-width: 720px) {
    .scores-breakdown { padding: 0 16px 14px 46px; }
}

.champ-event-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 4px;
    border-bottom: var(--edge);
    background: transparent;
    text-align: left;
    font-family: var(--font-text);
    font-size: 0.92rem;
    font-weight: 600;
    color: #4a4437;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

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

.champ-event-link.is-active { color: var(--red-ink); }

.live-tag--sm {
    background: transparent;
    padding: 0;
    font-size: 0;
}

.live-tag--sm .dot {
    width: 7px;
    height: 7px;
    background: var(--red);
}

.state-tag.is-pending-sm, .state-tag.is-done-sm {
    font-size: 0.68rem;
}

.state-tag.is-pending-sm { color: var(--amber); }
.state-tag.is-done-sm { color: #a89f8d; }

.champ-events-panels, .champ-events-placeholder {
    min-width: 0;
}

.champ-event-empty {
    padding: 40px 24px;
    text-align: center;
}

.champ-event-empty p {
    color: var(--text-on-charcoal-dim);
    font-size: 0.92rem;
    margin: 0;
    max-width: 46ch;
    margin-left: auto;
    margin-right: auto;
}

.champ-gender-switch {
    display: flex;
    gap: 6px;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(244, 240, 231, 0.14);
}

.champ-gender-btn {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid rgba(244, 240, 231, 0.2);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-on-charcoal-dim);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.champ-gender-btn:hover { color: var(--text-on-charcoal); }

.champ-gender-btn.is-active {
    color: var(--text-on-charcoal);
    border-color: var(--red);
    background: rgba(232, 69, 28, 0.12);
}

.champ-gender-view { display: none; }

.champ-gender-view.is-active {
    display: block;
    animation: hero-slide-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 720px) {
    .champ-gender-switch { padding: 14px 16px; }
}

@media (max-width: 960px) {
    .champ-detail-body { grid-template-columns: 1fr; }
    .champ-events-nav {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        border-top: none;
        border-bottom: 2px solid var(--ink);
        gap: 4px;
        padding-bottom: 4px;
    }
    .champ-events-label { display: none; }
    .champ-event-link {
        border-bottom: none;
        white-space: nowrap;
        padding: 10px 14px;
        border: 1px solid var(--paper-line);
    }
    .champ-event-link.is-active { border-color: var(--red-ink); background: var(--paper-2); }

    .champ-results-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    .champ-detail-header { padding: 32px 20px 0; }
    .champ-detail-body { padding: 32px 20px 64px; gap: 24px; }
    .champ-page-tabs { margin: 18px -20px 0; }
    .champ-page-view--schedule { padding: 24px 20px 64px; }
    table.schedule-table th:nth-child(3), table.schedule-table td:nth-child(3) { display: none; }
    .champ-results-layout { padding: 32px 20px 64px; }
    .champ-search-bar { flex-wrap: wrap; }
    .champ-search-input { flex-basis: 100%; }
    .champ-results-grid { grid-template-columns: 1fr; }
}

/* ---------- Auth: login + register ---------- */
.auth-layout {
    max-width: 460px;
    margin: 0 auto;
    padding: 64px 28px 96px;
}

.auth-panel {
    padding: 36px 32px 32px;
}

.auth-panel-head {
    margin-bottom: 28px;
}

.auth-kicker {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 10px;
}

.auth-panel-head h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 8px;
}

.auth-panel-head p {
    font-size: 0.9rem;
    color: var(--text-on-charcoal-dim);
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-field label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-on-charcoal-dim);
}

.auth-field-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.auth-inline-link {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-on-charcoal-dim);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.auth-inline-link:hover { color: var(--text-on-charcoal); }

.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="text"] {
    padding: 11px 14px;
    border: 1px solid rgba(244, 240, 231, 0.2);
    background: var(--charcoal-2);
    color: var(--text-on-charcoal);
    font-family: var(--font-text);
    font-size: 0.92rem;
}

.auth-field input::placeholder { color: #6b6864; }

.auth-field input:focus {
    outline: none;
    border-color: var(--red);
}

.auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 0.82rem;
    color: var(--text-on-charcoal-dim);
    cursor: pointer;
    line-height: 1.4;
}

.auth-checkbox input {
    margin-top: 3px;
    accent-color: var(--red);
    flex-shrink: 0;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 1px solid;
    border-radius: var(--radius-hairline, 2px);
    font-size: 0.85rem;
    line-height: 1.4;
}

.auth-alert-message { flex: 1; min-width: 0; }

.auth-alert-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0 2px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.auth-alert-close:hover { opacity: 1; }

.auth-alert--error,
.auth-alert--danger {
    background: rgba(179, 37, 26, 0.12);
    border-color: var(--red);
    color: #ffb3ab;
}

.auth-alert--success {
    background: rgba(47, 109, 74, 0.15);
    border-color: var(--green);
    color: var(--green-text);
}

.auth-alert--warning {
    background: rgba(184, 121, 26, 0.15);
    border-color: var(--amber);
    color: #ffd9a0;
}

.auth-alert--info,
.auth-alert--debug {
    background: rgba(244, 240, 231, 0.08);
    border-color: rgba(244, 240, 231, 0.25);
    color: var(--text-on-charcoal);
}

.auth-checkbox a {
    color: var(--text-on-charcoal);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-submit {
    width: 100%;
    margin-top: 4px;
    border-color: var(--text-on-charcoal);
}

.auth-switch {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid rgba(244, 240, 231, 0.14);
    font-size: 0.88rem;
    color: var(--text-on-charcoal-dim);
}

.auth-switch a {
    color: var(--text-on-charcoal);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 720px) {
    .auth-layout { padding: 40px 20px 64px; }
    .auth-panel { padding: 28px 22px 24px; }
}

/* ---------- Dashboard ---------- */
.dash-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.dash-stat-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    border: var(--edge);
    border-radius: 3px;
    min-width: 0;
}

.dash-stat-card-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b6353;
}

.dash-stat-card-value {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.dash-stat-card-link {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    color: #6b6353;
    text-decoration: none;
    transition: color 0.15s ease;
}

.dash-stat-card-link:hover { color: var(--red-ink); }

.dash-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    min-width: 0;
    margin-bottom: 24px;
}

.dash-grid > * { min-width: 0; }

.dash-card {
    border: var(--edge);
    border-radius: 3px;
    padding: 24px 26px;
}

.dash-card h2 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 18px;
}

.dash-info-grid { margin: 0; }

.dash-info-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--paper-line);
}

.dash-info-row:last-child { border-bottom: none; }

.dash-info-row dt {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b6353;
    flex-shrink: 0;
}

.dash-info-row dd {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 500;
    text-align: right;
}

.dash-edit-link { margin-top: 20px; display: inline-block; }

.dash-permission-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-permission-list li {
    font-size: 0.9rem;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--paper-line);
}

.dash-permission-list li:last-child { border-bottom: none; padding-bottom: 0; }

.dash-permission-more {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--paper-line);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #6b6353;
}

.dash-empty-note {
    margin: 0;
    font-size: 0.9rem;
    color: #6b6353;
}

.dash-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.dash-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border: var(--edge);
    border-radius: 2px;
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.15s ease;
}

.dash-action:hover { border-color: var(--ink); }

.dash-action-code {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--red-ink);
    flex-shrink: 0;
}

.dash-action-title {
    font-size: 0.9rem;
    font-weight: 600;
}

@media (max-width: 960px) {
    .dash-grid { grid-template-columns: 1fr; }
    .dash-stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    .dash-card { padding: 20px; }
    .dash-info-row { flex-direction: column; align-items: flex-start; gap: 4px; }
    .dash-info-row dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
