:root {
    color-scheme: light;
    --bg-body: #f8fafc;
    --bg-card: #fff;
    --bg-soft: #f1f5f9;
    --bg-chip: rgba(15, 23, 42, .04);
    --text-main: #0f172a;
    --text-sub: #334155;
    --text-muted: #64748b;
    --accent: #0284c7;
    --accent-strong: #0369a1;
    --accent-light: rgba(2, 132, 199, .10);
    --page-width: 760px;
    --radius-card: 18px;
    --radius-inner: 13px;
    --title-size: clamp(2.7rem, 7vw, 4rem);
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg-body: #070d16;
        --bg-card: #0f172a;
        --bg-soft: #121c2e;
        --bg-chip: rgba(255, 255, 255, .06);
        --text-main: #f8fafc;
        --text-sub: #cbd5e1;
        --text-muted: #94a3b8;
        --accent: #38bdf8;
        --accent-strong: #7dd3fc;
        --accent-light: rgba(56, 189, 248, .12);
    }
}

:root[data-theme=light] {
    color-scheme: light;
    --bg-body: #f8fafc;
    --bg-card: #fff;
    --bg-soft: #f1f5f9;
    --bg-chip: rgba(15, 23, 42, .04);
    --text-main: #0f172a;
    --text-sub: #334155;
    --text-muted: #64748b;
    --accent: #0284c7;
    --accent-strong: #0369a1;
    --accent-light: rgba(2, 132, 199, .10);
}

:root[data-theme=dark] {
    color-scheme: dark;
    --bg-body: #070d16;
    --bg-card: #0f172a;
    --bg-soft: #121c2e;
    --bg-chip: rgba(255, 255, 255, .06);
    --text-main: #f8fafc;
    --text-sub: #cbd5e1;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-strong: #7dd3fc;
    --accent-light: rgba(56, 189, 248, .12);
}

/* Whole-UI scale for small screens: the user confirmed manually zooming their phone
   browser to 133% made the app "look perfect" — meaning the issue was never just text
   size, it was the whole layout (padding, card spacing, icons, gaps) reading too dense
   at native scale. `zoom` reproduces exactly what browser page-zoom does (unlike
   font-size, which only affects rem/em text and leaves every hardcoded px value in
   this file and in app.js's inline-styled cards untouched). Reuses the app's existing
   720px mobile breakpoint rather than inventing a new one. Desktop is left at native
   scale since only the phone experience was reported as too small. Added 18 Aug 2026. */
@media (max-width: 720px) {
    body {
        zoom: 1.3;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, .08), transparent 30rem), var(--bg-body);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.app-shell {
    width: min(100%, var(--page-width));
    margin: 0 auto;
    padding: 8px 14px 34px;
}

.hero-card,
.info-card,
.site-footer {
    background: var(--bg-card);
    border-radius: var(--radius-card);
}

.hero-card {
    padding: 15px;
    margin-bottom: 6px;
}

.brand-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: var(--title-size);
    line-height: .88;
    letter-spacing: -.08em;
}

.subtitle {
    margin: 5px 0 0;
    color: var(--text-sub);
}

.top-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.status-pill,
.theme-toggle {
    background: var(--accent-light);
    color: var(--accent-strong);
    border: none;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: .68rem;
    font-weight: 900;
    cursor: pointer;
}

.theme-toggle::after {
    content: "↻";
    margin-left: 6px;
}

.search-box {
    display: flex;
    gap: 7px;
    margin-top: 9px;
}

.search-input {
    flex: 1;
    height: 42px;
    background: var(--bg-body);
    color: var(--text-main);
    border: none;
    border-radius: var(--radius-inner);
    padding: 0 13px;
    outline: none;
    font-size: .94rem;
}

.search-input:focus {
    box-shadow: 0 0 0 2px var(--accent);
}

.search-button {
    height: 42px;
    min-width: 88px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-inner);
    font-weight: 800;
    cursor: pointer;
}

.controls-bar {
    display: flex;
    justify-content: space-between;
    gap: 7px;
    padding: 7px;
    background: var(--bg-soft);
    border-radius: var(--radius-inner);
    margin-top: 8px;
}

.filter-group {
    display: flex;
    gap: 5px;
    align-items: center;
}

.filter-label {
    font-size: .66rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.pill-btn,
.toggle-pill {
    background: var(--bg-chip);
    color: var(--text-sub);
    border: none;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: .72rem;
    font-weight: 800;
}

.pill-btn.active {
    background: var(--accent);
    color: #fff;
}

.microcopy,
.site-footer {
    color: var(--text-muted);
    font-size: .72rem;
}

.results-section {
    padding: 8px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.info-card {
    padding: 9px;
    background: var(--bg-soft);
}

.info-card h2 {
    margin: 0;
    font-size: .8rem;
}

.info-card p {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: .7rem;
}

.site-footer {
    text-align: center;
    background: transparent;
    padding: 10px 12px;
}

.footer-links {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    font-size: .85rem;
}

.footer-links a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-links a:hover {
    opacity: .75;
}

.info-bubble-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .48);
}

#arbiInfoBubble {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.info-bubble-panel {
    position: relative;
    width: min(92vw, 560px);
    max-height: 78vh;
    overflow: auto;
    margin: 10vh auto 0;
    background: var(--bg-card);
    border-radius: 18px;
    padding: 16px;
}

.info-bubble-header {
    display: flex;
    justify-content: space-between;
}

.info-bubble-close {
    border: none;
    border-radius: 999px;
    background: var(--accent-light);
    color: var(--accent-strong);
    font-size: 1.3rem;
}

@media (max-width: 720px) {

    .brand-row,
    .search-box {
        flex-direction: column;
    }

    .controls-bar {
        flex-direction: column;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .filter-group {
        flex-wrap: wrap;
    }
}