/* --- GLOBAL VARIABLES --- */
:root {
    --bg-color: #050505;
    --card-bg: #121212;
    --text-main: #e0e0e0;
    --text-muted: #888888;
    --accent-gold: #f5c542;
    --accent-dark: #b8860b;
    --alert-red: #ff4444;
    --neon-green: #00ff41;
    --border-color: #333333;
    --toolbar-bg: #1a1a1a;
}


body { 
    font-family: 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif; 
    text-align: center; 
    background-color: var(--bg-color); 
    color: var(--text-main);
    background-image: 
        linear-gradient(rgba(20, 20, 20, 0.8) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 20, 20, 0.8) 1px, transparent 1px);
    background-size: 40px 40px;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1; /* Pushes footer down */
    padding: 40px 20px;
}

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

/* --- CARD COMPONENT --- */
.card { 
    background: var(--card-bg); 
    padding: 0; 
    border: 1px solid var(--accent-dark); 
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(245, 197, 66, 0.1); 
    max-width: 600px; 
    margin: auto; 
    overflow: hidden; 
    position: relative;
    text-align: left; /* Reset text align for form elements */
}

/* Result Card is wider */
.card.wide { max-width: 900px; padding: 40px; text-align: center; }

.card::before { content: ""; position: absolute; top: 0; left: 0; width: 10px; height: 10px; border-top: 2px solid var(--accent-gold); border-left: 2px solid var(--accent-gold); }
.card::after { content: ""; position: absolute; bottom: 0; right: 0; width: 10px; height: 10px; border-bottom: 2px solid var(--accent-gold); border-right: 2px solid var(--accent-gold); }

/* --- HEADER (Now part of Layout and responsive) --- */
.site-header {
    padding: 30px 20px;
    background: linear-gradient(180deg, rgba(245, 197, 66, 0.05) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
    
    /* FORCE VERTICAL STACKING */
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    gap: 15px; /* Space between Logo layer and Status layer */
}

.logo-container { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    text-decoration: none;
    transition: transform 0.2s;
    /* Ensure logo stays centered if screen is tiny */
    justify-content: center;
    flex-wrap: wrap; 
}

.logo-container:hover { transform: scale(1.02); }

.custom-logo { width: 60px; height: 60px; filter: drop-shadow(0 0 5px var(--accent-gold)); }

.header-title { 
    margin: 0; 
    font-size: 2rem; /* Made slightly bigger since it has its own row now */
    font-weight: 300; 
    letter-spacing: 3px; 
    text-transform: uppercase; 
    color: var(--accent-gold); 
    text-shadow: 0 0 10px rgba(245, 197, 66, 0.3);
    text-align: center;
}

/* Stats Bar - Centered on its own row */
.stats-bar { 
    background: rgba(0, 0, 0, 0.6); 
    padding: 8px 20px; 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    border: 1px solid var(--border-color); 
    border-radius: 4px; 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Courier New', monospace; 
    backdrop-filter: blur(5px);
    width: auto; /* Let it shrink to fit content */
}

.stats-val { font-weight: bold; color: var(--accent-gold); }
.stats-offline { color: var(--alert-red); font-weight: bold; animation: blink 1.5s infinite; }
.stats-online { color: var(--neon-green); font-weight: bold; text-shadow: 0 0 5px rgba(0, 255, 65, 0.5); }
@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 20px;
    }
    
    .header-title { font-size: 1.2rem; }
    
    .stats-bar {
        font-size: 0.75rem;
        width: 100%;
        justify-content: center;
    }
    
    .card { max-width: 95%; margin: 10px auto; }
    
    /* Footer Mobile Stack */
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .footer-col h4 { border-left: none; padding-left: 0; border-bottom: 2px solid var(--accent-gold); display: inline-block; padding-bottom: 5px;}
    .footer-brand p { margin: 15px auto; } /* Center text */

    /* Stack the bottom copyright text on mobile */
    .footer-bottom-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        align-items: center;
    }
}

/* --- FOOTER (Cyberpunk / AdGuard Style) --- */
.site-footer {
    background-color: #0a0a0a;
    border-top: 1px solid var(--border-color);
    padding: 40px 20px 20px;
    margin-top: auto;
    font-size: 0.9rem;
    text-align: left;
    box-sizing: border-box;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    max-width: 1100px;
    margin: 0 auto;
    gap: 40px;
}

.footer-col h4 {
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    font-size: 1rem;
    border-left: 3px solid var(--accent-gold);
    padding-left: 10px;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { color: var(--text-muted); transition: 0.3s; }
.footer-col a:hover { color: var(--accent-gold); text-shadow: 0 0 5px var(--accent-gold); }

.footer-brand p { color: var(--text-muted); line-height: 1.6; margin-top: 15px; max-width: 300px; }
.footer-brand .mini-logo { width: 30px; vertical-align: middle; margin-right: 10px; }

.footer-bottom {
    width: 100%;             /* Span full container width */
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #222;
}

.footer-bottom-inner {
    max-width: 1100px;       
    margin: 0 auto;          
    display: flex;
    justify-content: space-between;
    color: #555;
    font-size: 0.8rem;
}

/* --- TABS --- */
.tabs { display: flex; background: #000; border-bottom: 1px solid var(--border-color); }
.tab { 
    flex: 1; 
    padding: 10px; 
    font-weight: 500; 
    color: var(--text-muted); 
    cursor: pointer; 
    transition: 0.3s; 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    text-align: center;
    
    /* NEW: Reset Button Styles */
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent; /* Keep bottom border logic */
    border-radius: 0;
    font-family: inherit; /* Use site font, not system UI font */
    appearance: none;
    -webkit-appearance: none;
}
.tab:hover { color: var(--accent-gold); background: transparent !important; box-shadow: none !important; }
.tab.active { color: var(--accent-gold); background: transparent !important; border-bottom: 2px solid var(--accent-gold); border: none !important; box-shadow: none !important; }
/* Ensure tab contents still fade in correctly */
.tab-content { display: none; padding: 30px 30px; }
.tab-content.active { display: block; animation: fadeIn 0.4s; }

/* --- FORMS & INPUTS --- */
label { font-weight: bold; display: block; margin-top: 10px; margin-bottom: 8px; color: var(--text-main); font-size: 0.9rem; }
select, input[type="file"], input[type="number"] { 
    width: 100%; padding: 12px; margin-bottom: 5px; background: #000; border: 1px solid var(--border-color); 
    color: #fff; border-radius: 2px; box-sizing: border-box; outline: none; transition: border 0.3s;
}
select:focus, input:hover { border-color: var(--accent-gold); }

input[type="file"]::file-selector-button {
    background-color: #000; color: var(--accent-gold); border: 1px solid var(--accent-gold);
    border-right: 1px solid var(--accent-gold); padding: 8px 15px; margin-right: 15px;
    border-radius: 2px; cursor: pointer; font-family: 'Courier New', monospace;
    font-weight: bold; transition: 0.3s; text-transform: uppercase;
}
input[type="file"]::file-selector-button:hover {
    background-color: var(--accent-gold); color: #000; box-shadow: 0 0 10px rgba(245, 197, 66, 0.4);
}

/* --- CYBERPUNK DROP ZONE --- */
.drop-zone {
    width: 100%;
    height: 190px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    transition: 0.3s ease;
    margin-bottom: 10px;
    overflow: hidden;
    box-sizing: border-box; /* Ensures padding doesn't break width */
}

/* --- DISABLED STATE FOR DROPZONE --- */
.drop-zone.locked {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
    border-color: #555;
    background: rgba(0,0,0,0.5);
}

/* Hover & Drag State */
.drop-zone:hover, .drop-zone.drop-zone--over {
    border-color: var(--accent-gold);
    background: rgba(245, 197, 66, 0.05);
    box-shadow: inset 0 0 20px rgba(245, 197, 66, 0.1);
}

/* The actual file input (Invisible but clickable) */
.drop-zone__input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

/* The Prompt Text & Icon Container */
.drop-zone__prompt {
    z-index: 1;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    pointer-events: none;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* --- THE FIX IS HERE: Constrain Icon Size --- */
.upload-icon {
    width: 50px;   /* Forces icon to be small */
    height: 50px;  /* Forces icon to be small */
    stroke: var(--text-muted);
    transition: 0.3s;
    margin-bottom: 5px;
}

.drop-zone:hover .drop-zone__prompt { color: var(--accent-gold); }

.drop-zone:hover .upload-icon {
    stroke: var(--accent-gold);
    filter: drop-shadow(0 0 5px var(--accent-gold));
}

/* File Selected State */
.drop-zone.has-file {
    border-style: solid;
    border-color: var(--neon-green);
    background: rgba(0, 255, 65, 0.05);
}
.drop-zone.has-file .upload-icon { stroke: var(--neon-green); }
.drop-zone.has-file .drop-zone__prompt { color: var(--neon-green); }

/* File card: shown once a file is selected — a thumbnail (PDF first page, or a real
   image/svg/gif preview, or a type badge) plus name, size (+ page count for PDF) and an
   inline remove. Built as one card per file so multi-file later is a grid, not a rewrite.
   It layers above the invisible input (z-index 2) so the card is interactive and clicking
   it doesn't re-open the picker. */
/* Compact, left-aligned tile. Default view is just thumbnail + a one-line (ellipsised)
   name; the full name, size and page count show in a hover tip. overflow:visible on the
   filled zone lets that tip escape the box. */
/* Keep the same box height as the empty drop-zone (base height:190px) so it doesn't
   resize when a file is added; the tile sits left, vertically centred, and the hover
   tip escapes via overflow:visible. */
.drop-zone.has-file { padding: 12px; overflow: visible; justify-content: flex-start; align-items: center; }
.drop-zone.has-file .drop-zone__prompt { display: none; }
.drop-zone.has-file .drop-zone__input { pointer-events: none; }
.drop-zone.has-file:hover { border-color: var(--neon-green); background: rgba(0, 255, 65, 0.05); box-shadow: none; }
.file-card {
    position: relative; z-index: 3; display: none;
    flex-direction: column; align-items: flex-start; gap: 6px;
    width: 120px; padding: 6px;
    background: rgba(0, 0, 0, 0.35); border: 1px solid var(--border-color); border-radius: 6px;
}
.drop-zone.has-file .file-card { display: flex; }
.file-card__thumb {
    width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-color); border-radius: 4px; overflow: hidden;
}
.file-card__thumb img, .file-card__thumb canvas { max-width: 100%; max-height: 126px; height: auto; display: block; }
.file-card__ph { padding: 18px 10px; font-family: 'Courier New', monospace; font-size: 0.8rem; letter-spacing: 1px; color: var(--accent-gold); }
.file-card__name {
    display: block; width: 100%;
    color: var(--neon-green); font-family: 'Courier New', monospace; font-size: 0.78rem; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Hover tip: full name + size (+ pages), a small popover above the tile. */
.file-card__tip {
    position: absolute; bottom: 100%; left: 0; margin-bottom: 8px;
    display: none; width: max-content; max-width: 260px; padding: 6px 10px; z-index: 5;
    background: #0d0d0d; border: 1px solid var(--accent-gold); border-radius: 4px;
    font-family: 'Courier New', monospace; font-size: 0.72rem; line-height: 1.45; text-align: left;
    color: var(--accent-gold); white-space: normal; word-break: break-word; pointer-events: none;
}
.file-card:hover .file-card__tip, .file-card:focus-within .file-card__tip { display: block; }
.file-card__tip b { color: var(--neon-green); }
.file-card__remove {
    position: absolute; top: 4px; right: 4px; z-index: 4;
    width: 22px; height: 22px; margin: 0; padding: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; line-height: 1; text-transform: none; letter-spacing: normal;
    border: 1px solid var(--alert-red); border-radius: 50%;
    background: #1a1a1a; color: var(--alert-red); cursor: pointer;
    opacity: 0; transition: opacity 0.15s ease;   /* revealed on hover; opacity (not display) keeps it tab-focusable */
}
.file-card:hover .file-card__remove, .file-card__remove:focus { opacity: 1; }
.file-card__remove:hover, .file-card__remove:focus { background: var(--alert-red); color: #111; box-shadow: none; }

/* Rejected / unsupported file state */
.drop-zone.invalid {
    border-style: solid;
    border-color: var(--alert-red);
    background: rgba(255, 68, 68, 0.05);
}
.drop-zone.invalid .upload-icon { stroke: var(--alert-red); }
.drop-zone.invalid .drop-zone__prompt { color: var(--alert-red); }

/* --- BUTTONS --- */
button, .btn-download { 
    width: 100%; padding: 14px; background: transparent; color: var(--accent-gold); 
    border: 1px solid var(--accent-gold); border-radius: 2px; font-size: 16px; 
    cursor: pointer; transition: 0.3s; margin-top: 20px; font-weight: bold; 
    text-transform: uppercase; letter-spacing: 2px; position: relative; overflow: hidden;
    display: flex; justify-content: center; align-items: center; gap: 10px;
}
button:hover, .btn-download:hover { background: var(--accent-gold); color: #000; box-shadow: 0 0 15px rgba(245, 197, 66, 0.4); }
button:disabled { border-color: #444; color: #444; cursor: not-allowed; background: transparent; box-shadow: none; }
.btn-download { background: var(--accent-gold); color: #000; border: none; margin-top: 0; }

.btn-cancel {
    width: 100%; margin-top: 15px; padding: 10px; font-size: 0.8rem;
    color: var(--alert-red); border: 1px solid var(--alert-red);
    background: transparent; cursor: pointer; text-transform: uppercase; transition: 0.3s;
}
.btn-cancel:hover { background: var(--alert-red); color: #fff; box-shadow: 0 0 10px rgba(255, 68, 68, 0.4); }

/* --- PROGRESS & TARGETS --- */
.progress-container { display: none; margin-top: 25px; text-align: left; padding: 0 30px; }
.progress-label { font-size: 0.85rem; color: var(--accent-gold); margin-bottom: 5px; display: flex; justify-content: space-between; font-family: 'Courier New', monospace; }
.progress-bar-bg { width: 100%; background-color: #000; border: 1px solid var(--border-color); height: 12px; overflow: hidden; }
.progress-bar-fill { height: 100%; background-color: var(--accent-gold); width: 0%; transition: width 0.2s; box-shadow: 0 0 10px var(--accent-gold); }
.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.3) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.3) 75%, transparent 75%, transparent);
    background-size: 20px 20px; animation: progress-bar-stripes 1s linear infinite;
}
.processing-timer { font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; margin-bottom: 15px; font-family: 'Courier New', monospace; }
@keyframes progress-bar-stripes { 0% { background-position: 20px 0; } 100% { background-position: 0 0; } }

.target-wrapper { margin-top: 0px; padding: 15px; border: 1px dashed var(--border-color); background: rgba(255,255,255,0.02); }
.target-controls { display: none; margin-top: 15px; }
.show-target .target-controls { display: block; }
/* Target size is locked until a valid file is chosen — the toggle reads disabled + a hint. */
.target-locked .toggle-label { opacity: 0.5; cursor: not-allowed; }
.target-locked .toggle-label input { cursor: not-allowed; }
.target-locked .toggle-label::after { content: " — add a file to enable"; color: var(--text-muted, #888); font-size: 0.8rem; margin-left: 6px; text-transform: none; letter-spacing: normal; }
/* Presets larger than the chosen file are pointless — grey them out. */
.preset-btn:disabled, .preset-btn.preset-disabled { opacity: 0.35; cursor: not-allowed; }
.show-target .level-group { display: none; }
.slider-container { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
input[type=range] { appearance: none; -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background: var(--accent-gold); cursor: pointer; margin-top: -6px; box-shadow: 0 0 5px var(--accent-gold); }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 4px; cursor: pointer; background: #333; }
input.target-number { width: 80px; text-align: center; color: var(--accent-gold); font-weight: bold; }
/* Keep the slider, number and unit on ONE row: the shared select/input{width:100%}
   and input[type=range]{width:100%} rules otherwise stretch each to full width and
   stack them. Scoped overrides win on specificity; presets still wrap to their own row. */
.slider-container .target-slider { flex: 1 1 140px; width: auto; min-width: 120px; margin: 0; }
/* Number input and the KB/MB dropdown share one height so they line up as a pair. */
.slider-container input.target-number { flex: 0 0 84px; width: 84px; height: 42px; padding: 0 12px; margin: 0; box-sizing: border-box; }
.slider-container .unit-select { flex: 0 0 auto; width: auto; height: 42px; padding: 0 10px; margin: 0; box-sizing: border-box; }

/* --- HELPERS --- */
.info { font-size: 0.8rem; color: var(--text-muted); background: rgba(255,255,255,0.03); padding: 15px; border-left: 2px solid var(--accent-gold); margin-top: 25px; line-height: 1.5; }
.spinner { display: none; width: 20px; height: 20px; border: 2px solid rgba(245, 197, 66, 0.3); border-radius: 50%; border-top-color: var(--accent-gold); animation: spin 1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- RESULT PAGE SPECIFICS --- */
.status-icon { width: 32px; height: 32px; filter: drop-shadow(0 0 5px var(--accent-gold)); }
.success-header { color: var(--accent-gold); text-shadow: 0 0 10px rgba(245, 197, 66, 0.4); }
.fail-header { color: var(--alert-red); text-shadow: 0 0 10px rgba(255, 68, 68, 0.4); }
.stat-box { display: flex; justify-content: space-between; align-items: center; margin: 20px 0; padding: 20px; background: rgba(0,0,0,0.3); border: 1px solid var(--border-color); }
.stat { text-align: center; flex: 1; }
.stat-val { font-size: 1.4rem; font-weight: bold; color: #fff; font-family: 'Courier New', monospace; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; margin-top: 5px; }
.arrow { font-size: 1.5rem; color: var(--accent-gold); animation: slide 1.5s infinite; }
@keyframes slide { 0% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 100% { transform: translateX(-5px); } }

.preview-container { border: 1px solid var(--border-color); background: #000; margin-bottom: 20px; }
.preview-toolbar { background: var(--toolbar-bg); padding: 10px 20px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; min-height: 35px; }
.preview-title { font-family: 'Courier New', monospace; color: var(--text-muted); font-size: 0.9rem; letter-spacing: 1px; font-weight: bold; }
.toolbar-btn { background: var(--accent-gold); color: #000; text-decoration: none; padding: 5px 15px; border-radius: 2px; font-size: 0.85rem; font-weight: bold; display: flex; align-items: center; gap: 8px; transition: 0.3s; text-transform: uppercase; }
.toolbar-btn:hover { background: #ffe066; box-shadow: 0 0 10px rgba(245, 197, 66, 0.4); }
.media-wrapper { background: #000; width: 100%; display: flex; justify-content: center; overflow: hidden; }
.preview-media { max-width: 100%; display: block; }
iframe.preview-media { width: 100%; height: 600px; border: none; }
video.preview-media { width: 100%; max-height: 500px; }
img.preview-media { max-height: 600px; padding: 20px; box-sizing: border-box; }
.back-link { display: inline-block; margin-top: 10px; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: 0.3s; }
.back-link:hover { color: var(--accent-gold); text-decoration: underline; }
.result-text.fail { font-size: 1.2rem; font-weight: bold; margin-bottom: 20px; font-family: 'Courier New', monospace; color: var(--alert-red); }
.result-text.success { font-size: 1.2rem; font-weight: bold; margin-bottom: 20px; font-family: 'Courier New', monospace; color: var(--accent-gold); }
.warning-box { background: rgba(255, 68, 68, 0.15); color: #ffffff; padding: 15px; border: 1px solid var(--alert-red); font-size: 0.85rem; text-align: left; margin-top: -10px; margin-bottom: 30px; }

/* Maintenance */
.maintenance-container { padding: 60px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gear-icon { width: 80px; height: 80px; margin-bottom: 20px; animation: spin-slow 4s infinite linear; }
@keyframes spin-slow { 100% { transform: rotate(360deg); } }
.maintenance-title { color: var(--alert-red); font-size: 1.5rem; letter-spacing: 2px; margin-bottom: 10px; text-transform: uppercase; }
.maintenance-desc { color: var(--text-muted); font-family: 'Courier New', monospace; font-size: 0.9rem; }

@keyframes pulse-text {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}
.pulse-animation {
    animation: pulse-text 1.5s infinite;
}

/* --- Target-size units + presets + feedback (Workstream H) --- */
.unit-select{background:var(--toolbar-bg,#1a1a1a);color:var(--accent-gold,#f5c542);border:1px solid #333;border-radius:4px;padding:4px 6px;font-family:'Courier New',monospace;}
.target-presets{display:flex;flex-wrap:wrap;gap:10px;width:100%;flex-basis:100%;margin-top:12px;justify-content:flex-start;}
.preset-btn{flex:0 0 auto;width:auto;margin-top:0;text-transform:none;letter-spacing:normal;background:transparent;color:var(--accent-gold,#f5c542);border:1px solid var(--accent-gold,#f5c542);border-radius:4px;padding:5px 12px;font-family:'Courier New',monospace;font-size:0.8rem;cursor:pointer;}
.preset-btn:hover,.preset-btn:focus{background:var(--accent-gold,#f5c542);color:#111;}
.target-ok{color:var(--neon-green,#39ff14);}
.target-miss{border-color:var(--alert-red,#ff4444);}

/* --- SEO/AEO FAQ section --- */
.seo-faq{max-width:820px;margin:30px auto 10px;padding:0 20px;color:#ccc;line-height:1.6;text-align:left;}
.seo-faq h2{color:var(--accent-gold,#f5c542);font-size:1.2rem;}
.seo-faq h3{color:#fff;font-size:1rem;margin-top:18px;}
.seo-faq details{border:1px solid #333;border-radius:4px;padding:8px 12px;margin:8px 0;background:rgba(255,255,255,0.02);}
.seo-faq summary{cursor:pointer;color:var(--accent-gold,#f5c542);font-family:'Courier New',monospace;}

/* target-size helper hint (hidden by JS for gif/audio/svg) */
.target-hint{max-width:820px;margin:16px auto 0;padding:0 20px;color:#bbb;font-size:0.9rem;line-height:1.5;text-align:center;}
.target-hint a{color:var(--accent-gold,#f5c542);}

/* --- Consent banner + draft banner + legal body (consent framework) --- */
.legal-body{padding:20px;text-align:left;color:#ccc;line-height:1.6;}
.legal-body h3{color:var(--accent-gold,#f5c542);margin-top:18px;}
/* In-content links (contact us, Privacy Policy, etc.) must read as links, not text
   (the global `a{color:inherit}` otherwise makes them the body's grey). */
.legal-body a{color:var(--accent-gold,#f5c542);text-decoration:underline;}
.legal-body a:hover,.legal-body a:focus{text-shadow:0 0 5px var(--accent-gold,#f5c542);}
.upload-consent-note{max-width:820px;margin:0 auto 14px;color:#bbb;font-size:0.82rem;line-height:1.5;text-align:center;}
.upload-consent-note a{color:var(--accent-gold,#f5c542);}
/* Consent gate modal (centered, blocking) */
/* Opaque backdrop that matches the app's textured base black exactly (seamless
   gate -> loading -> reveal; the app is NOT visible behind the gate). */
.consent-overlay{position:fixed;inset:0;z-index:2000;overflow:auto;background-color:var(--bg-color);background-image:linear-gradient(rgba(20,20,20,0.8) 1px, transparent 1px),linear-gradient(90deg, rgba(20,20,20,0.8) 1px, transparent 1px);background-size:40px 40px;display:flex;flex-direction:column;padding:0;}
/* The gate carries the real site header so it reads as part of the site, not a bare
   modal. Header sits at the top full-bleed; the notice card centers in the space below. */
.consent-overlay .consent-header{width:100%;flex:0 0 auto;}
.consent-body{flex:1;display:flex;align-items:center;justify-content:center;padding:16px;width:100%;}
.consent-modal{background:#161616;border:2px solid var(--accent-gold,#f5c542);border-radius:8px;max-width:520px;width:100%;padding:24px 22px;box-shadow:0 10px 40px rgba(0,0,0,0.6);text-align:center;color:#e8e8e8;}
.consent-title{color:var(--accent-gold,#f5c542);font-size:1.15rem;margin:0 0 10px;}
.consent-desc{color:#ddd;font-size:0.9rem;line-height:1.55;margin:0 0 14px;}
.consent-links{margin:0 0 16px;font-size:0.85rem;}
.consent-links a{color:var(--accent-gold,#f5c542);}
.consent-accept{display:inline-block;background:var(--accent-gold,#f5c542);color:#111;border:none;border-radius:4px;padding:8px 20px;font-family:'Courier New',monospace;font-weight:bold;font-size:0.9rem;cursor:pointer;}
.consent-accept:hover,.consent-accept:focus{filter:brightness(1.1);outline:2px solid #fff;outline-offset:2px;}
.consent-loading{position:fixed;inset:0;z-index:2100;background-color:var(--bg-color);background-image:linear-gradient(rgba(20,20,20,0.8) 1px, transparent 1px),linear-gradient(90deg, rgba(20,20,20,0.8) 1px, transparent 1px);background-size:40px 40px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--accent-gold,#f5c542);font-family:'Courier New',monospace;gap:14px;transition:opacity 0.35s ease;}
/* CRITICAL: the display:flex above must NOT override the `hidden` attribute, or the
   loading screen shows immediately and blocks the modal (app stuck on "Loading…"). */
.consent-loading[hidden]{display:none !important;}
/* Fade the black loading overlay out to reveal the app intentionally. */
.consent-loading.fade-out{opacity:0;pointer-events:none;}
.consent-spinner{width:42px;height:42px;border:4px solid rgba(245,197,66,0.25);border-top-color:var(--accent-gold,#f5c542);border-radius:50%;animation:consent-spin 0.8s linear infinite;}
@keyframes consent-spin{to{transform:rotate(360deg);}}

/* --- What's new dialog (returning users, once per release; dismissible/fail-open) ---
   Deliberately DISTINCT from the consent gate: a TRANSLUCENT backdrop (the app is dimmed
   but visible -- it is not a hard gate), a left-aligned benefit checklist, and a close X. */
.whatsnew-overlay{position:fixed;inset:0;z-index:1900;background:rgba(5,5,5,0.74);display:flex;align-items:center;justify-content:center;padding:16px;animation:whatsnew-fade 0.25s ease;}
@keyframes whatsnew-fade{from{opacity:0;}to{opacity:1;}}
.whatsnew-modal{position:relative;background:#141414;border:1px solid var(--accent-gold,#f5c542);border-radius:10px;max-width:540px;width:100%;padding:26px 24px 22px;box-shadow:0 12px 48px rgba(0,0,0,0.65);color:#e8e8e8;text-align:left;}
.whatsnew-close{position:absolute;top:8px;right:14px;color:#999;text-decoration:none;font-size:1.6rem;line-height:1;transition:0.2s;}
.whatsnew-close:hover,.whatsnew-close:focus{color:var(--accent-gold,#f5c542);outline:none;}
.whatsnew-title{color:var(--accent-gold,#f5c542);font-size:1.2rem;margin:0 0 4px;font-family:'Courier New',monospace;}
.whatsnew-sub{color:#8f8f8f;font-size:0.8rem;margin:0 0 16px;}
.whatsnew-list{list-style:none;margin:0 0 18px;padding:0;}
.whatsnew-list li{position:relative;padding:0 0 12px 26px;font-size:0.88rem;line-height:1.5;color:#d5d5d5;}
.whatsnew-list li::before{content:"\2713";position:absolute;left:0;top:0;color:var(--accent-gold,#f5c542);font-weight:bold;}
.whatsnew-list strong{color:#fff;font-weight:bold;}
.whatsnew-gotit{display:inline-block;background:var(--accent-gold,#f5c542);color:#111;text-decoration:none;border-radius:4px;padding:8px 22px;font-family:'Courier New',monospace;font-weight:bold;font-size:0.9rem;}
.whatsnew-gotit:hover,.whatsnew-gotit:focus{filter:brightness(1.1);outline:2px solid #fff;outline-offset:2px;}
.whatsnew-more{margin-top:12px;font-size:0.8rem;}
.whatsnew-more a{color:var(--accent-gold,#f5c542);}
/* /whats-new page: reverse-chronological changelog grouped by release id/version */
.whatsnew-page .whatsnew-release{margin:0 0 28px;padding-bottom:6px;border-bottom:1px solid rgba(245,197,66,0.15);}
.whatsnew-page .whatsnew-release h3{font-size:1rem;margin:0 0 2px;font-family:'Courier New',monospace;}
.whatsnew-page .whatsnew-relid{color:var(--accent-gold,#f5c542);font-weight:bold;}
.whatsnew-page .whatsnew-date{color:#8f8f8f;font-weight:normal;font-size:0.85rem;}
.whatsnew-page .whatsnew-reltitle{color:#cfcfcf;font-style:italic;margin:0 0 12px;font-size:0.9rem;}
.whatsnew-page .whatsnew-list li{padding-bottom:14px;}
