/* ============================================================
   WHO'S THIS THEN? — THE CONFIDENCE AARDVARK
   Frontend Alpha | Dark, compact, readable, responsive
   ============================================================ */
:root {
    color-scheme: dark;
    --bg: #090f1b;
    --panel: #121e2e;
    --panel-soft: #17263a;
    --border: #2a3c51;
    --text: #edf5ff;
    --muted: #a8bdd2;
    --accent: #20bdd2;
    --accent-hover: #58d9e7;
    --warning: #f5c46b;
    --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
a { color: #8de8f5; }
:focus-visible { outline: 3px solid #8de8f5; outline-offset: 3px; }
[hidden] { display: none !important; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(9,15,27,.97); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px); }
.header-inner { max-width: 1440px; margin: auto; min-height: 74px; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none; }
.brand-mark { font-size: 32px; }
.brand strong { display: block; font-size: 19px; letter-spacing: .055em; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.stage-pill { color: #9ce7f0; border: 1px solid #276a76; background: #102e3b; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 6px 11px; white-space: nowrap; }
.shell { max-width: 1440px; padding: 22px 24px 45px; margin: 0 auto; }
.panel { border: 1px solid var(--border); background: var(--panel); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.section-heading, .results-top, .panel-title, .form-actions { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.eyebrow { color: var(--accent); letter-spacing: .12em; font-weight: 750; font-size: 11px; margin: 0 0 4px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(21px, 2vw, 27px); margin-bottom: 14px; }
h2 { font-size: 21px; margin-bottom: 0; }
h3 { font-size: 18px; margin-bottom: 3px; }
.helper, .subtle, .panel-title p, footer { color: var(--muted); }
.helper { font-size: 13px; }
.fields-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; color: #d4e5f4; font-weight: 650; font-size: 13px; }
.field em { font-weight: 400; color: var(--muted); font-style: normal; }
.field input { width: 100%; background: #0b1727; border: 1px solid #36506b; color: var(--text); border-radius: 8px; min-height: 42px; padding: 9px 12px; }
.field input::placeholder { color: #8199b1; }
.field input:focus { border-color: var(--accent); outline: 2px solid #20bdd244; }
.risk-details { margin-top: 17px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.risk-details summary { padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--panel-soft); font-weight: 700; cursor: pointer; }
.risk-details summary::marker { color: var(--accent); }
.risk-details summary .subtle { font-size: 12px; font-weight: 400; }
.risk-grid { padding: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.risk-question { border: 1px solid var(--border); border-radius: 9px; min-width: 0; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.risk-question legend { float: left; width: auto; max-width: 60%; font-size: 12px; font-weight: 600; line-height: 1.3; padding: 0; }
.choices { display: flex; gap: 3px; margin-left: auto; }
.choices label { position: relative; }
.choices input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choices span { display: block; min-width: 35px; text-align: center; padding: 6px 7px; border: 1px solid #3a5068; border-radius: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.choices input:checked + span { background: #176a7a; color: white; border-color: #2fc9dc; }
.choices input:focus-visible + span { outline: 3px solid #8de8f5; outline-offset: 2px; }
.form-actions { margin-top: 16px; }
.form-message { color: var(--muted); font-size: 12px; margin: 0; max-width: 650px; }
.action-buttons { display: flex; gap: 9px; flex-shrink: 0; }
.button { border: 1px solid #3b526a; border-radius: 9px; padding: 10px 15px; min-height: 42px; font-weight: 750; white-space: nowrap; }
.button-primary { background: var(--accent); border-color: var(--accent); color: #051622; }
.button-primary:hover { background: var(--accent-hover); }
.button-secondary { background: #20334a; color: var(--text); }
.button-secondary:hover, .button-ai:hover:not(:disabled) { background: #2a4059; }
.button-ai { background: #20334a; color: var(--text); font-size: 12px; }
.coming-soon { color: var(--muted); font-size: 10px; font-weight: 500; margin-left: 6px; }
.results { padding-bottom: 24px; }
.results-top { margin-bottom: 16px; }
.status-tag { font-size: 12px; color: var(--muted); background: var(--panel-soft); border: 1px solid var(--border); border-radius: 999px; padding: 5px 10px; }
.tab-bar { display: flex; gap: 8px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 700; padding: 11px 15px; white-space: nowrap; }
.tab:hover { color: white; }
.tab.active { border-bottom-color: var(--accent); color: #7de5f3; }
.panel-title { align-items: start; margin-bottom: 16px; }
.panel-title p { font-size: 13px; margin: 0; }
.empty-state { min-height: 170px; border: 1px dashed #3a526a; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.empty-state p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.empty-icon { font-size: 27px; color: #8fe1ed; margin-bottom: 5px; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.result-card { background: var(--panel-soft); border: 1px solid var(--border); border-radius: 10px; padding: 15px; }
.result-card h4 { margin: 0 0 9px; font-size: 14px; }
.result-card p { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.result-card p:last-child { margin-bottom: 0; }
.result-card ul { margin: 0; padding-left: 19px; }
.result-card li { margin-bottom: 6px; font-size: 13px; }
.result-card a { overflow-wrap: anywhere; }
.note { color: var(--warning) !important; }
.span-full { grid-column: 1 / -1; }
footer { font-size: 11px; text-align: center; }
@media (max-width: 1100px) { .fields-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .risk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .shell { padding: 14px 12px 28px; } .header-inner { padding: 10px 12px; } .brand strong { font-size: 15px; } .stage-pill { font-size: 9px; } .panel { padding: 14px; } .fields-grid, .risk-grid, .result-grid { grid-template-columns: 1fr; } .section-heading, .panel-title, .form-actions { align-items: stretch; flex-direction: column; gap: 10px; } .helper { margin: 0; } .action-buttons { justify-content: flex-end; } .risk-question legend { max-width: 66%; } .risk-details summary .subtle { display: none; } .button-ai { align-self: flex-start; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* Keep the Aardvark mascot under control */
.site-header .brand img.brand-mark {
    display: block;
    width: 64px;
    height: 64px;
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ==========================================
   GOOGLEY ZOO | THEME CONTROLS
   ========================================== */

.header-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.theme-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border, #354154);
    border-radius: 12px;
    background: var(--card, #151d2b);
}

.theme-option {
    appearance: none;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 17px;
    cursor: pointer;
    padding: 7px 10px;
    transition: background 0.2s ease;
}

.theme-option:hover {
    background: rgba(128, 128, 128, 0.2);
}

.theme-option[aria-pressed="true"] {
    background: rgba(128, 128, 128, 0.3);
    outline: 1px solid currentColor;
}

.theme-option:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* Robadox portrait: preserve original PNG */
.robadox-face {
    filter: none;
}

[data-theme="dark"] .robadox-face {
    filter: invert(1);
}

@media (max-width: 650px) {
    .header-controls {
        gap: 8px;
    }

    .theme-option {
        padding: 6px 8px;
    }
}

/* ==========================================
   GOOGLEY ZOO | LIGHT MODE
   ========================================== */

:root[data-theme="light"] {
    color-scheme: light;

    --bg: #f3f7fb;
    --panel: #ffffff;
    --panel-soft: #eaf1f8;
    --border: #cbd8e5;
    --text: #172638;
    --muted: #50657a;
    --accent: #087c90;
    --accent-hover: #0b96ad;
    --warning: #9b5700;
}

/* Header */
[data-theme="light"] .site-header {
    background: rgba(243, 247, 251, 0.97);
}

[data-theme="light"] .stage-pill {
    background: #dff5f7;
    color: #075665;
    border-color: #91cbd3;
}

/* Inputs */
[data-theme="light"] .field {
    color: var(--text);
}

[data-theme="light"] .field input {
    background: #ffffff;
    border-color: #aebfd0;
}

[data-theme="light"] .field input::placeholder {
    color: #64788b;
}

/* Radio selections */
[data-theme="light"] .choices span {
    border-color: #aebfd0;
}

[data-theme="light"] .choices input:checked + span {
    background: #087c90;
    color: #ffffff;
}

/* Buttons */
[data-theme="light"] .button-secondary,
[data-theme="light"] .button-ai {
    background: #e4edf5;
    color: var(--text);
    border-color: #b9cbd9;
}

[data-theme="light"] .button-secondary:hover,
[data-theme="light"] .button-ai:hover:not(:disabled) {
    background: #d3e3ef;
}

/* Tabs */
[data-theme="light"] .tab:hover {
    color: var(--text);
}

[data-theme="light"] .tab.active {
    color: #087c90;
}

/* Results */
[data-theme="light"] .empty-state {
    border-color: #aebfd0;
}

[data-theme="light"] .empty-icon {
    color: #087c90;
}

[data-theme="light"] a {
    color: #086b9b;
}

/* Theme selector */
[data-theme="light"] .theme-switcher {
    background: #e4edf5;
}


/* ==========================================
   A ROBADOX PRODUCTION
   ========================================== */

.site-footer {
    padding: 25px 12px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.robadox-credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.robadox-face {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.robadox-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 3px;
}

.robadox-text strong {
    color: var(--text);
    font-size: 15px;
    letter-spacing: 0.04em;
}

.robadox-text span {
    color: var(--muted);
    font-size: 11px;
}

.footer-meta {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 10px;
}

@media (max-width: 450px) {
    .robadox-credit {
        gap: 10px;
    }

    .robadox-face {
        width: 65px;
        height: 65px;
    }
}
.robadox-credit {
    align-items: center;
}

.footer-meta {
    text-align: left;
    margin: 5px 0 0;
}
/* Compact Robadox footer */
.shell {
    padding-bottom: 10px;
}

.site-footer {
    padding: 15px 12px 5px;
}

.robadox-credit {
    gap: 12px;
}