/* CSS Variables */
:root {
    --thumb-ratio: 16/9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}

a {
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

button {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.stage-canvas {
    max-width: 1100px;
    margin: 0 auto;
    background: var(--bg-primary);
    min-height: 100vh;
}

/* Visually hidden - for SEO h1 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header Styles */
.capsule-header {
    padding-top: 20px;
}

.capsule-emblem {
    margin: 0 15px 15px;
}

.capsule-emblem a {
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    display: flex;
}

.capsule-emblem-core {
    color: var(--error);
}

.capsule-emblem-tail {
    color: var(--text-primary);
}

/* Navigation Styles */
.capsule-rail {
    background: var(--bg-secondary);
    text-transform: uppercase;
    border-top: none;
    padding: 10px;
    margin-bottom: 1px;
    -webkit-box-shadow: 0 0 10px var(--shadow);
    box-shadow: 0 0 10px var(--shadow);
}

.capsule-rail-row {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.capsule-rail-node {
    flex: 0 0 auto;
    text-align: left;
}

.capsule-rail-node:last-child {
    border-right: none;
}

.capsule-rail-node a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    padding: 12px 15px;
}

.capsule-rail-node a:hover,
.capsule-rail-node.active a {
    color: var(--accent);
}

/* Search Bar */
.probe-dock {
    margin: 15px 0;
    display: flex;
    width: 100%;
    padding: 0 15px;
    position: relative;
}

.probe-form {
    display: flex;
    width: 100%;
}

.probe-field {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-hover);
    color: var(--text-primary);
    font-size: 14px;
    border-radius: 4px 0 0 4px;
}

.probe-field::placeholder {
    color: var(--text-muted);
}

.probe-launch {
    padding: 0 20px;
    background: var(--accent);
    color: var(--text-contrast);
    border: none;
    font-weight: bold;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    transition: background 0.3s ease;
}

.probe-launch:hover {
    background: var(--accent-hover);
}

/* Main Content */
.stage-deck {
    padding: 10px;
}

/* Video Section */
.viewer-deck {
    margin-bottom: 40px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.viewer-caption {
    font-size: 28px;
    color: var(--text-primary);
    margin: 0 0 10px 10px;
    text-align: left;
}

.viewer-socket {
    position: relative;
    max-width: 830px;
    aspect-ratio: var(--thumb-aspect-ratio, 16/9);
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
}

.viewer-rig,
.viewer-rig .art-video-player,
.viewer-rig .art-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.viewer-rig .art-video {
    width: 100%;
    height: 100%;
}

.viewer-void {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 14px;
}

.viewer-console {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.feed-deck {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.server-btn {
    padding: 8px 16px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.server-btn:hover,
.server-btn.active {
    background: var(--accent);
    color: var(--text-contrast);
}

.gauge-deck {
    display: flex;
    align-items: center;
    gap: 15px;
}

.gauge-pulse {
    padding: 8px 12px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.gauge-pulse:hover,
.gauge-pulse.liked {
    background: var(--accent);
    color: var(--text-contrast);
}

.gauge-watch {
    color: var(--text-muted);
    font-size: 14px;
}

.viewer-synopsis {
    margin-bottom: 20px;
}

/* Fix nolink color - should match description text */
.synopsis-body strong {
    color: inherit;
    font-weight: 600;
}

.synopsis-body a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.synopsis-body a:hover {
    color: var(--accent);
}

.topic-tray {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.topic-tab {
    padding: 6px 12px;
    background: var(--border-strong);
    color: var(--text-secondary);
    border: 1px solid var(--border-muted);
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.topic-tab:hover {
    background: var(--accent);
    color: var(--text-contrast);
    border-color: var(--accent);
}

/* Movie Section */
.strip-deck {
    margin-bottom: 40px;
}

.strip-heading {
    font-size: 24px;
    margin-bottom: 20px;
}

.genre-note {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 14px 18px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px;
}

.genre-note p,
.genre-note div {
    margin-bottom: 10px;
}

.genre-note p:last-child,
.genre-note div:last-child {
    margin-bottom: 0;
}

/* Movie Grid */
.clip-wall {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.clip-unit {
    overflow: hidden;
    transition: transform 0.3s ease;
}

.clip-unit:hover {
    transform: translateY(-5px);
}

.clip-jump {
    text-decoration: none;
    color: inherit;
    display: block;
}

.clip-frame {
    position: relative;
    display: inline-block;
    width: 100%;
}

.clip-thumb {
    width: 100%;
    aspect-ratio: var(--thumb-aspect-ratio, 16/9);
    object-fit: cover;
    border-radius: 5px;
    display: block;
}

.clip-flag {
    font-size: 12px;
    position: absolute;
    top: 0;
    border-left: 3px solid var(--brand-red);
    background: var(--overlay-bg);
    padding: 0 4px;
    margin: 6px 4px;
    color: var(--text-primary);
}

.clip-caption {
    padding: 0 15px;
    font-size: 14px;
    text-align: left;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: calc(1.4em * 2);
}

/* Pagination */
.pager-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pager-step {
    padding: 10px 15px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pager-step:hover,
.pager-step.active {
    background: var(--accent);
    color: var(--text-contrast);
}

/* Load More */
.extend-deck {
    text-align: center;
    margin-top: 30px;
}

.extend-trigger {
    padding: 12px 30px;
    background: var(--accent);
    color: var(--text-contrast);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.extend-trigger:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}


/* Footer Bottom */
.footer-veil {
    padding-bottom: 10px;
}

.footer-index {
    background: var(--bg-secondary);
    padding: 10px 15px;
    margin-bottom: 1px;
    box-shadow: 0 0 10px var(--shadow);
    display: flex;
    flex-direction: column;
}

.footer-anchor {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
    padding: 5px 0;
    line-height: 1.4;
    border-bottom: 1px solid var(--bg-deep);
    transition: color 0.2s ease;
    text-transform: none;
}

.footer-anchor:last-child {
    border-bottom: none;
}

.footer-anchor:hover {
    color: var(--accent);
}

.footer-veil-base {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px 15px;
    border: 1px solid var(--bg-hover);
    -webkit-box-shadow: 0 0 10px var(--shadow);
    box-shadow: 0 0 10px var(--shadow);
    background: var(--bg-primary);
}

.copyright {
    color: var(--text-primary);
    font-size: 16px;
    margin: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stage-canvas {
        margin: 0 10px;
    }

    .clip-wall {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .capsule-rail-row {
        justify-content: center;
    }

    .capsule-rail-node {
        border-right: none;
        margin-bottom: 1px;
    }

    .capsule-rail-node:last-child {
        margin-bottom: 0;
    }

    .footer-veil-base {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .stage-deck {
        padding: 0;
    }
}

@media (max-width: 425px) {
    .clip-wall {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .strip-heading {
        font-size: 20px;
    }

    .pager-bar {
        gap: 5px;
    }

    .pager-step {
        padding: 8px 12px;
        font-size: 14px;
    }

    .stage-deck {
        padding: 0;
    }
}

/* Categories Popup Styles */
.atlas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.atlas-overlay.active {
    opacity: 1;
    visibility: visible;
}

.atlas-scrim {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-dark-80);
}

.atlas-sheet {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-tertiary);
    border-radius: 5px;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px var(--overlay-dark-70);
}

.atlas-sheet-cap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 15px;
}

.atlas-sheet-cap h3 {
    color: var(--text-primary);
    font-size: 24px;
    margin: 0;
}

.atlas-sheet-shut {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.atlas-sheet-shut:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.atlas-matrix {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.atlas-tile {
    display: block;
    padding: 12px 15px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border-strong);
}

.atlas-tile:hover {
    background: var(--accent);
    color: var(--text-contrast);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Responsive cho popup */
@media (max-width: 768px) {
    .atlas-matrix {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .atlas-sheet {
        padding: 20px;
        width: 95%;
    }

    .atlas-sheet-cap h3 {
        font-size: 20px;
    }

    .atlas-tile {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .atlas-matrix {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .atlas-sheet {
        padding: 15px;
    }

    .atlas-sheet-cap h3 {
        font-size: 18px;
    }

    .atlas-tile {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* Autocomplete Dropdown */
.probe-hintshelf {
    position: absolute;
    top: 100%;
    left: 15px;
    right: 15px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.probe-hintshelf.active {
    display: block;
}

.probe-hint {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.2s;
}

.probe-hint:hover,
.probe-hint.selected {
    background: var(--bg-hover);
    color: var(--accent);
}

.probe-hint svg {
    flex-shrink: 0;
    opacity: 0.5;
}

/* Breadcrumb */
.trail-mark {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 0;
    font-size: 14px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.trail-mark a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.trail-mark a:hover {
    color: var(--accent);
}

.trail-mark svg {
    opacity: 0.5;
}

/* Time Filters */
.span-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.span-chip {
    padding: 8px 16px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.span-chip:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.span-chip.active {
    background: var(--accent);
    color: var(--text-contrast);
}

/* 404 Error Page */
.lost-stage {
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lost-cabinet {
    width: 80vw;
    max-width: 900px;
    height: 80vh;
    max-height: 600px;
    background: var(--text-contrast);
    border: 15px solid var(--bg-hover);
    border-radius: 20px;
    position: relative;
    box-shadow: inset 0 0 20px var(--overlay-light-10), 0 0 30px var(--overlay-dark-80);
    display: flex;
    flex-direction: column;
}

.lost-cabinet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, var(--overlay-light-05) 2px, var(--overlay-light-05) 4px);
    border-radius: 5px;
    pointer-events: none;
}

.lost-cabinet-top {
    padding: 20px 30px;
    position: relative;
    z-index: 2;
}

.lost-cabinet-brand a {
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    display: flex;
}

.lost-cabinet-core {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 30px;
    position: relative;
    z-index: 2;
}

.lost-glitch {
    font-size: 48px;
    font-weight: 900;
    color: var(--text-primary);
    position: relative;
    margin: 0;
}

.lost-glitch::before,
.lost-glitch::after {
    content: '404';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lost-glitch::before {
    animation: glitch-1 1s infinite;
    color: var(--error);
    z-index: -1;
}

.lost-glitch::after {
    animation: glitch-2 1s infinite;
    color: var(--info);
    z-index: -2;
}

@keyframes glitch-1 {

    0%,
    14%,
    15%,
    49%,
    50%,
    99%,
    100% {
        transform: translate(0);
    }

    15%,
    49% {
        transform: translate(-2px, -2px);
    }
}

@keyframes glitch-2 {

    0%,
    20%,
    21%,
    62%,
    63%,
    99%,
    100% {
        transform: translate(0);
    }

    21%,
    62% {
        transform: translate(2px, 2px);
    }
}

.lost-signal {
    font-size: 12px;
    color: var(--accent);
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: blink 1.5s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0.3;
    }
}

.lost-heading {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--text-primary);
    margin: 20px 0 10px;
    font-weight: bold;
}

.lost-blurb {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--text-secondary);
    margin: 0 0 30px;
    line-height: 1.6;
    max-width: 500px;
}

.lost-gauge {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.lost-trigger {
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    text-transform: uppercase;
}

.lost-trigger-hero {
    background: var(--accent);
    color: var(--text-contrast);
}

.lost-trigger-hero:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.lost-trigger-ghost {
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.lost-trigger-ghost:hover {
    background: var(--border-strong);
    border-color: var(--accent);
}

/* Video Page Specific */
.viewer-deck {
    margin-bottom: 40px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.sidebar {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 20px;
}

/* ===== Back to Top Area ===== */
.ascend-deck {
    display: flex;
    justify-content: center;
    padding: 15px;
}

.ascend-dial {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    padding: 14px 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ascend-dial:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-contrast);
}

.ascend-dial:active {
    transform: scale(0.98);
}

.ascend-dial svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.ascend-dial:hover svg {
    transform: translateY(-2px);
}

/* Banner Ads */
.fv-header-banner,
.fv-footer-banner,
.fv-square-banner {
    text-align: center;
    margin: 20px auto;
    overflow: hidden;    z-index: 100;
}

/* ==========================================================================
   Age Gate Modal Styles (amber_glow style)
   ========================================================================== */
.age-gate {
    background: var(--modal-bg) !important;
    font-family: Arial, sans-serif !important;
}
.age-gate__content {
    background: var(--bg-primary) !important;
    border: 2px solid var(--accent) !important;
    border-radius: 4px !important;
    box-shadow: 0 0 25px rgba(var(--accent-rgb), 0.25), 0 20px 40px var(--overlay-dark-70) !important;
}
.age-gate__badge {
    text-align: center !important;
    line-height: 1 !important;
display: inline-flex !important; align-items: center !important; justify-content: center !important; 
    color: var(--accent) !important;
    border: 2px solid var(--accent) !important;
    background: rgba(var(--accent-rgb), 0.08) !important;
    text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.3) !important;
}
.age-gate__title {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}
.age-gate__desc {
    color: var(--text-secondary) !important;
}
.age-gate__btn {
    background: var(--accent) !important;
    color: var(--text-contrast) !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3) !important;
}
.age-gate__btn:hover {
    background: var(--accent-hover) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.5) !important;
    transform: translateY(-2px) !important;
}
.age-gate__btn:active {
    transform: translateY(0) !important;
}
/* Policy pages */
/* Policy pages */
.edict-deck {
    padding-top: 40px;
    padding-bottom: 40px;
}
.edict-scroll {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    padding: 32px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}
.edict-scroll h1 {
    margin-bottom: 24px;
    color: var(--text-primary);
    font-size: 28px;
    font-weight: bold;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
}
.edict-scroll h2 {
    margin: 28px 0 12px;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: bold;
}
.edict-scroll p {
    margin-bottom: 16px;
}
.edict-scroll ul {
    margin-bottom: 16px;
    padding-left: 20px;
}
.edict-scroll li {
    margin-bottom: 8px;
}
.edict-scroll a {
    color: var(--accent);
    text-decoration: underline;
    transition: color 0.2s ease;
}
.edict-scroll a:hover {
    color: var(--accent-hover);
}
.edict-form {
    display: grid;
    gap: 15px;
    max-width: 680px;
    margin: 0 auto;
}
.edict-form label {
    color: var(--text-secondary);
    font-weight: bold;
    margin-top: 5px;
}
.edict-form input:not([type=checkbox]),
.edict-form select,
.edict-form textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.edict-form input:not([type=checkbox]):focus,
.edict-form select:focus,
.edict-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 5px rgba(var(--accent-rgb), 0.3);
}
.edict-form textarea {
    min-height: 140px;
    resize: vertical;
}
.edict-form label.edict-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}
.edict-form input[type=checkbox] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.edict-form button {
    width: fit-content;
    padding: 12px 24px;
    background: var(--accent);
    color: var(--text-contrast);
    border: 0;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.edict-form button:hover {
    background: var(--accent-hover);
    color: var(--text-contrast);
}
.edict-receipt {
    min-height: 1.5em;
    color: var(--accent);
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
}

.edict-receipt[hidden] {
    display: none;
}

.edict-receipt.is-visible {
    display: block;
}
.edict-table {
    width: 100%;
    border-collapse: collapse;
    max-width: 680px;
    margin: 20px auto;
}
.edict-table caption {
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 12px;
    text-align: left;
    font-size: 18px;
}
.edict-table th,
.edict-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    color: var(--text-secondary);
}
.edict-table th[scope="col"] {
    color: var(--text-primary);
    font-weight: bold;
    border-bottom: 2px solid var(--accent);
}
.edict-tally {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 30px auto 0;
    max-width: 680px;
}
.edict-tally span {
    padding: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
}
.edict-tally b {
    display: block;
    font-size: 1.6rem;
    color: var(--accent);
    margin-top: 5px;
}
.edict-index {
    width: 100%;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 20px;
    padding: 15px 0 0 0 !important;
    border-top: 1px solid var(--border);
    background: transparent !important;
    box-shadow: none !important;
}
.edict-index .footer-anchor {
    display: inline-block !important;
    border-bottom: none !important;
    padding: 0 !important;
}

/* Exchange presentation: preserve hierarchy after subtree swap. */
.footer-veil > .edict-index {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    background: var(--bg-secondary) !important;
    text-transform: uppercase;
    border-top: none;
    padding: 10px !important;
    margin-top: 0;
    margin-bottom: 1px;
    box-shadow: 0 0 10px var(--shadow) !important;
}

.footer-veil > .edict-index .footer-anchor {
    display: block !important;
    color: var(--text-secondary) !important;
    font-size: 14px !important;
    font-weight: bold;
    white-space: nowrap;
    padding: 12px 15px !important;
    border-bottom: none !important;
    text-transform: uppercase;
}

.footer-veil-base > .capsule-rail {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 20px;
    margin-bottom: 0;
    padding: 15px 0 0;
    border-top: 1px solid var(--border);
    background: transparent;
    box-shadow: none;
    text-transform: none;
}

.footer-veil-base > .capsule-rail .capsule-rail-row {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
}

.footer-veil-base > .capsule-rail .capsule-rail-node a {
    display: inline-block;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: normal;
    white-space: normal;
    padding: 0;
    border-bottom: none;
    text-transform: none;
}
@media (max-width: 768px) {
    .edict-scroll {
        padding: 24px;
    }
    .edict-tally {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .edict-tally {
        grid-template-columns: 1fr;
    }
}

/* Policy cards and forms stay centered; selects use a theme-matched custom indicator. */
.edict-scroll { width: 100%; max-width: 900px; margin: 0 auto; }
.edict-form { margin: 0 auto; }
.edict-form select { appearance: none; -webkit-appearance: none; background-image: var(--select-arrow); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 42px; }

/* Former inline policy declarations, scoped with the theme DOM prefix. */
.edict-aside-note { margin-top: 24px; font-size: 0.9em; opacity: 0.8; }
