:root {
    --ink: #10221f;
    --ink-soft: #39524d;
    --paper: #f4f1e9;
    --paper-deep: #eae5d8;
    --card: #fffdf7;
    --lime: #c8f04b;
    --lime-deep: #95bf17;
    --coral: #ff765e;
    --aqua: #69d5c7;
    --line: rgba(16, 34, 31, 0.14);
    --shadow: 0 24px 70px rgba(16, 34, 31, 0.10);
    --surface-card: rgba(255, 253, 247, 0.78);
    --surface-field: rgba(255, 255, 255, 0.76);
    --surface-muted: rgba(255, 255, 255, 0.48);
    --surface-hover: #ffffff;
    --topbar-bg: rgba(244, 241, 233, 0.84);
    --select-arrow: #39524d;
    --radius-lg: 30px;
    --radius-md: 18px;
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
    --ink: #edf7f1;
    --ink-soft: #a9c0b9;
    --paper: #091411;
    --paper-deep: #162620;
    --card: #13231f;
    --lime-deep: #b7df39;
    --line: rgba(221, 244, 235, 0.15);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    --surface-card: rgba(18, 34, 29, 0.88);
    --surface-field: rgba(31, 51, 44, 0.88);
    --surface-muted: rgba(237, 247, 241, 0.08);
    --surface-hover: rgba(237, 247, 241, 0.13);
    --topbar-bg: rgba(9, 20, 17, 0.88);
    --select-arrow: #b8cec7;
    color-scheme: dark;
    scrollbar-color: rgba(221, 244, 235, .30) transparent;
}

* { box-sizing: border-box; }

html {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    background: var(--paper);
    scrollbar-color: rgba(16, 34, 31, 0.34) transparent;
    scrollbar-width: thin;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    overflow-x: clip;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 7%, rgba(200, 240, 75, 0.20), transparent 25rem),
        radial-gradient(circle at 90% 72%, rgba(105, 213, 199, 0.12), transparent 30rem),
        var(--paper);
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: rgba(16, 34, 31, 0.30); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(16, 34, 31, 0.48); background-clip: padding-box; }

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    font-size: 1.02rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.brand strong { color: var(--lime-deep); }

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: end;
    gap: 3px;
    padding: 7px;
    border-radius: 11px;
    color: var(--ink);
    background: var(--lime);
    box-shadow: 0 8px 22px rgba(149, 191, 23, 0.25);
}

.brand-mark i { display: block; background: currentColor; border-radius: 5px; }
.brand-mark i:nth-child(1) { height: 34%; }
.brand-mark i:nth-child(2) { height: 62%; }
.brand-mark i:nth-child(3) { height: 92%; }

.eyebrow {
    margin: 0 0 12px;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.muted { color: var(--ink-soft); }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border: 0;
    border-radius: 14px;
    padding: 0 22px;
    cursor: pointer;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:focus-visible, input:focus-visible, select:focus-visible, .text-button:focus-visible, .reel-link:focus-visible {
    outline: 3px solid rgba(105, 213, 199, 0.48);
    outline-offset: 3px;
}

.button-primary {
    color: #13231f;
    background: var(--lime);
    box-shadow: 0 12px 24px rgba(149, 191, 23, 0.23);
}

.button-primary:hover { background: #d6fa68; box-shadow: 0 15px 30px rgba(149, 191, 23, 0.28); }
.button-secondary { border: 1px solid var(--line); color: var(--ink); background: rgba(255,255,255,.62); box-shadow: none; }
.button-secondary:hover { background: white; }
.button-danger { color: white; background: #a83a2a; box-shadow: 0 10px 25px rgba(168,58,42,.18); }
.button-danger:hover { background: #8f2e20; }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.button-small { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: .72rem; }
.button:disabled { cursor: wait; opacity: 0.65; transform: none; }

.notice {
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 12px 14px;
    font-size: 0.9rem;
    line-height: 1.45;
}
.notice-error { border-color: rgba(207, 64, 41, 0.28); color: #8d2a1a; background: #fff0ec; }
.notice-warning { margin-bottom: 18px; border-color: rgba(185, 125, 0, 0.28); color: #714d00; background: #fff4d5; }
.notice-success { border-color: rgba(74,139,50,.25); color: #2f6527; background: #eff8df; }
.form-switch { margin: 0; color: var(--ink-soft); font-size: .82rem; text-align: center; }
.form-switch a, .signup-footnote a { color: #23685a; font-weight: 800; }
.form-help { color: var(--ink-soft); font-size: .73rem; line-height: 1.5; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.honeypot { position: absolute !important; left: -9999px !important; }

/* Login */
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr); }

.brand-panel {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(30px, 5vw, 72px);
    color: #eff8e3;
    background:
        radial-gradient(circle at 80% 10%, rgba(200, 240, 75, 0.18), transparent 26rem),
        linear-gradient(150deg, #0e2721, #183f36 65%, #125245);
}

.brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, transparent, #000 30%, #000);
}

.brand-panel > * { position: relative; z-index: 1; }
.brand-panel .brand strong { color: var(--lime); }
.brand-panel .eyebrow { color: rgba(239, 248, 227, 0.68); }

.brand-copy { max-width: 780px; margin: auto 0; padding: 70px 0; }
.brand-copy h1 {
    max-width: 720px;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.4rem, 7.4vw, 7.4rem);
    font-weight: 500;
    line-height: 0.92;
    letter-spacing: -0.055em;
}
.brand-copy > p:last-child { max-width: 600px; margin: 30px 0 0; color: rgba(239,248,227,.76); font-size: 1.08rem; line-height: 1.7; }

.signal-strip { height: 82px; display: flex; align-items: end; gap: 8px; }
.signal-strip span { width: min(28px, 3.1vw); height: var(--h); min-height: 8px; border-radius: 6px 6px 2px 2px; background: linear-gradient(to top, var(--aqua), var(--lime)); opacity: 0.82; }

.login-panel { display: grid; place-items: center; padding: 40px; }
.login-card {
    width: min(100%, 430px);
    display: grid;
    gap: 22px;
    padding: clamp(26px, 5vw, 46px);
    border: 1px solid rgba(255,255,255,.8);
    border-radius: var(--radius-lg);
    background: rgba(255, 253, 247, 0.76);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}
.login-card h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 2.5rem; font-weight: 500; letter-spacing: -0.04em; }
.login-card .muted { margin: 8px 0 0; }
.login-card label { display: grid; gap: 8px; font-size: 0.86rem; font-weight: 700; }
.login-card input {
    width: 100%;
    height: 52px;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 0 15px;
    color: var(--ink);
    background: rgba(255,255,255,.72);
}

/* Dashboard */
.topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 clamp(20px, 5vw, 72px);
    border-bottom: 1px solid var(--line);
    background: rgba(244, 241, 233, 0.84);
    backdrop-filter: blur(18px);
}
.topbar-actions { min-width: 0; display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); }
.topnav { min-width: 0; display: flex; align-items: center; gap: 5px; }
.nav-link { padding: 8px 11px; border-radius: 10px; color: var(--ink-soft); font-size: .8rem; font-weight: 800; text-decoration: none; }
.nav-link:hover, .nav-link.is-active { color: var(--ink); background: rgba(255,255,255,.56); }
.nav-count { display: inline-grid; min-width: 18px; height: 18px; margin-left: 5px; place-items: center; border-radius: 999px; color: white; background: var(--coral); font-size: .61rem; }
.account-menu { display: flex; align-items: center; gap: 18px; color: var(--ink-soft); font-size: .85rem; }
.account-menu form { margin: 0; }
.account-link { overflow: hidden; max-width: 190px; color: var(--ink-soft); font-size: .82rem; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.account-link:hover { color: var(--ink); }
.text-button { border: 0; padding: 7px 0; color: var(--ink); background: transparent; cursor: pointer; font-weight: 800; }

.theme-toggle {
    min-width: 76px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 12px;
    color: var(--ink);
    background: var(--surface-muted);
    cursor: pointer;
    font-size: .7rem;
    font-weight: 850;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.theme-toggle:hover { border-color: rgba(105, 213, 199, .42); background: var(--surface-hover); transform: translateY(-1px); }
.theme-toggle:focus-visible { outline: 3px solid rgba(105, 213, 199, .48); outline-offset: 3px; }
.theme-toggle-icon { width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%); transform: rotate(-32deg); }
html[data-theme="dark"] .theme-toggle-icon { background: transparent; box-shadow: inset -4px -2px 0 -1px var(--lime); }
.theme-toggle-floating { position: fixed; z-index: 20; top: 20px; right: 20px; color: #eff8e3; background: rgba(14, 39, 33, .82); backdrop-filter: blur(14px); }

.dashboard { width: min(1420px, calc(100% - 40px)); margin: 0 auto; padding: clamp(44px, 7vw, 96px) 0 80px; }
.search-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: center; gap: 50px; }
.search-hero h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.8rem, 8vw, 7.8rem);
    font-weight: 500;
    line-height: 0.88;
    letter-spacing: -0.062em;
}
.search-hero h1 span { color: #327b6c; font-style: italic; }
.hero-copy { max-width: 660px; margin: 30px 0 0; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.7; }

.pulse-orbit { position: relative; width: 260px; height: 260px; justify-self: end; display: grid; place-items: center; }
.pulse-core { position: relative; z-index: 2; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); font-family: Georgia, serif; font-size: 2rem; font-weight: 700; box-shadow: 0 0 0 14px rgba(200,240,75,.17), 0 20px 50px rgba(50,123,108,.22); }
.orbit { position: absolute; inset: 22px; border: 1px solid rgba(50,123,108,.35); border-radius: 50%; }
.orbit::after { content: ""; position: absolute; top: 50%; left: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 8px rgba(255,118,94,.14); }
.orbit-two { inset: 0; transform: rotate(68deg); opacity: .55; }

.search-card {
    margin-top: clamp(42px, 7vw, 78px);
    padding: 18px;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 25px;
    background: rgba(255,253,247,.78);
    box-shadow: var(--shadow);
}
.search-form { display: grid; grid-template-columns: minmax(240px, 1fr) 190px 170px 154px; gap: 10px; }
.search-field input, .platform-field select, .period-field select {
    width: 100%;
    height: 56px;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 0 17px;
    color: var(--ink);
    background: rgba(255,255,255,.72);
}
.search-field input { font-size: 1rem; }
.platform-field select, .period-field select { cursor: pointer; }
.search-button { height: 56px; }
.search-options { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 4px 0; color: var(--ink-soft); font-size: .78rem; }
.toggle-label { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.toggle-label input { position: absolute; opacity: 0; pointer-events: none; }
.toggle { width: 32px; height: 18px; border-radius: 30px; padding: 3px; background: #c7c5bd; transition: background .16s ease; }
.toggle::after { content: ""; display: block; width: 12px; height: 12px; border-radius: 50%; background: white; transition: transform .16s ease; }
.toggle-label input:checked + .toggle { background: #327b6c; }
.toggle-label input:checked + .toggle::after { transform: translateX(14px); }
.toggle-label input:focus-visible + .toggle { outline: 3px solid rgba(105,213,199,.48); outline-offset: 3px; }
.recent-searches { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; padding: 14px 4px 0; border-top: 1px solid var(--line); }
.recent-searches > span { padding-top: 7px; color: var(--ink-soft); font-size: .67rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.recent-search-list { display: flex; flex-wrap: wrap; gap: 7px; }
.recent-search { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; color: var(--ink); background: rgba(255,255,255,.52); cursor: pointer; font-size: .74rem; font-weight: 750; }
.recent-search:hover { border-color: rgba(50,123,108,.34); background: white; }
.recent-search small { color: var(--ink-soft); font-size: .62rem; font-weight: 650; }

.results-section { margin-top: 64px; }
.results-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 24px; }
.results-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.pulse-track-button { min-height: 38px; padding: 0 14px; white-space: nowrap; }
.pulse-track-button.is-tracked { color: #245c25; background: #e9f6d6; }
.results-heading h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.2rem, 4vw, 3.6rem); font-weight: 500; letter-spacing: -.04em; }
.results-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.meta-pill { padding: 7px 10px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink-soft); background: rgba(255,255,255,.4); font-size: .75rem; font-weight: 700; }
.results-insights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.insight-card { min-width: 0; padding: 16px; border: 1px solid rgba(255,255,255,.74); border-radius: 16px; background: rgba(255,253,247,.62); box-shadow: 0 10px 30px rgba(16,34,31,.05); }
.insight-card strong, .insight-card span, .insight-card small { display: block; }
.insight-card strong { overflow: hidden; color: var(--ink); font-family: Georgia, serif; font-size: 1.35rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.insight-card span { margin-top: 5px; font-size: .68rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.insight-card small { margin-top: 7px; overflow: hidden; color: var(--ink-soft); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.results-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.35); }
.results-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.results-filters label { display: grid; gap: 5px; color: var(--ink-soft); font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.results-filters select { min-width: 170px; height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 30px 0 10px; color: var(--ink); background: rgba(255,255,255,.74); cursor: pointer; font-size: .77rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.visible-result-count { flex: 0 0 auto; padding-bottom: 10px; color: var(--ink-soft); font-size: .73rem; font-weight: 750; }

.results-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.reel-card { overflow: hidden; display: flex; flex-direction: column; min-height: 360px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); box-shadow: 0 12px 35px rgba(16,34,31,.06); }
.reel-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #183f36, #327b6c); }
.reel-media-placeholder { position: absolute; inset: 0; display: grid; place-content: center; gap: 5px; text-align: center; color: rgba(239,248,227,.78); background: radial-gradient(circle at 50% 35%, rgba(200,240,75,.12), transparent 35%), linear-gradient(135deg, #183f36, #28685a); }
.reel-media-placeholder::before { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(239,248,227,.12); border-radius: 50%; }
.reel-media-placeholder strong { position: relative; font-family: Georgia, serif; font-size: 1.65rem; color: var(--lime); }
.reel-media-placeholder span { position: relative; font-size: .68rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.reel-media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.reel-card:hover .reel-media img { transform: scale(1.025); }
.score-badge { position: absolute; z-index: 2; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 12px; color: var(--ink); background: rgba(244,241,233,.92); backdrop-filter: blur(8px); font-size: .77rem; font-weight: 850; }
.score-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime-deep); box-shadow: 0 0 0 4px rgba(149,191,23,.18); }
.score-badge[data-label="Hot now"]::before, .score-badge[data-label="Breakout"]::before { background: var(--coral); box-shadow: 0 0 0 4px rgba(255,118,94,.18); }
.reel-body { flex: 1; display: flex; flex-direction: column; padding: 18px; }
.creator { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.creator-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .83rem; font-weight: 800; }
.age { flex: 0 0 auto; color: var(--ink-soft); font-size: .75rem; }
.caption { display: -webkit-box; margin: 0; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; color: var(--ink-soft); line-height: 1.5; font-size: .91rem; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: auto; padding-top: 20px; }
.metric { padding: 10px; border-radius: 12px; background: #f4f1e9; }
.metric strong, .metric span { display: block; }
.metric strong { font-size: .94rem; }
.metric span { margin-top: 3px; color: var(--ink-soft); font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; }
.reel-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.reach-note { color: var(--ink-soft); font-size: .75rem; }
.reel-link { color: #23685a; font-size: .8rem; font-weight: 850; text-decoration: none; }
.reel-link:hover { text-decoration: underline; }

.empty-state { grid-column: 1 / -1; padding: 60px 24px; border: 1px dashed rgba(16,34,31,.2); border-radius: var(--radius-md); text-align: center; color: var(--ink-soft); }
.empty-state strong { display: block; margin-bottom: 8px; color: var(--ink); font-family: Georgia, serif; font-size: 1.6rem; }

/* Admin system view */
.admin-main { width: min(1320px, calc(100% - 40px)); margin: 0 auto; padding: clamp(42px, 6vw, 82px) 0 80px; }
.admin-hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.admin-hero h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(3rem, 6vw, 5.6rem); font-weight: 500; letter-spacing: -.055em; line-height: .95; }
.admin-hero-copy { max-width: 540px; margin: 16px 0 0; color: var(--ink-soft); line-height: 1.65; }
.system-status { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 7px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.48); font-size: .75rem; font-weight: 800; }
.system-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--lime-deep); box-shadow: 0 0 0 5px rgba(149,191,23,.16); }
.system-status.has-errors::before { background: var(--coral); box-shadow: 0 0 0 5px rgba(255,118,94,.16); }
.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.admin-stat { min-height: 148px; padding: 20px; border: 1px solid rgba(255,255,255,.78); border-radius: 20px; background: rgba(255,253,247,.7); box-shadow: 0 15px 42px rgba(16,34,31,.06); }
.admin-stat strong, .admin-stat span, .admin-stat small { display: block; }
.admin-stat strong { font-family: Georgia, serif; font-size: 2.25rem; font-weight: 500; letter-spacing: -.04em; }
.admin-stat span { margin-top: 8px; font-size: .69rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.admin-stat small { margin-top: 12px; color: var(--ink-soft); font-size: .73rem; line-height: 1.45; }
.admin-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.admin-panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,253,247,.7); }
.admin-panel-header { display: flex; justify-content: space-between; gap: 20px; padding: 20px; border-bottom: 1px solid var(--line); }
.admin-panel-header h2 { margin: 0; font-family: Georgia, serif; font-size: 1.55rem; font-weight: 500; }
.admin-panel-header span { color: var(--ink-soft); font-size: .72rem; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .73rem; }
.admin-table th, .admin-table td { padding: 12px 16px; border-bottom: 1px solid rgba(16,34,31,.08); text-align: left; white-space: nowrap; }
.admin-table th { color: var(--ink-soft); background: rgba(234,229,216,.45); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; color: #245c25; background: #e9f6d6; font-size: .66rem; font-weight: 800; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #69a627; }
.status-pill.is-error { color: #8d2a1a; background: #fff0ec; }
.status-pill.is-error::before { background: var(--coral); }
.status-pill.status-pending { color: #775200; background: #fff4d5; }
.status-pill.status-pending::before { background: #d59b20; }
.status-pill.status-suspended { color: #8d2a1a; background: #fff0ec; }
.status-pill.status-suspended::before { background: var(--coral); }
.admin-panel-wide { grid-column: 1 / -1; }

/* Signup */
.signup-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, .85fr) minmax(0, 1.15fr); }
.signup-intro { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; gap: 50px; padding: clamp(30px, 5vw, 70px); color: #eff8e3; background: radial-gradient(circle at 80% 10%, rgba(200,240,75,.17), transparent 25rem), linear-gradient(150deg, #0e2721, #183f36 70%, #125245); }
.signup-intro .brand strong { color: var(--lime); }
.signup-intro h1 { max-width: 640px; margin: 0; font-family: Georgia, serif; font-size: clamp(3rem, 6.4vw, 6.4rem); font-weight: 500; letter-spacing: -.055em; line-height: .94; }
.signup-intro div > p:last-child { max-width: 550px; margin: 24px 0 0; color: rgba(239,248,227,.74); font-size: 1rem; line-height: 1.7; }
.signup-intro .eyebrow { color: rgba(239,248,227,.66); }
.signup-footnote { margin: 0; color: rgba(239,248,227,.72); font-size: .84rem; }
.signup-footnote a { color: var(--lime); }
.signup-panel { display: grid; place-items: center; padding: 40px; }
.signup-card { position: relative; width: min(100%, 620px); display: grid; gap: 20px; padding: clamp(26px, 5vw, 46px); border: 1px solid rgba(255,255,255,.8); border-radius: var(--radius-lg); background: rgba(255,253,247,.78); box-shadow: var(--shadow); }
.signup-card h2 { margin: 0; font-family: Georgia, serif; font-size: 2.7rem; font-weight: 500; letter-spacing: -.04em; }
.signup-card .muted { margin: 8px 0 0; }
.signup-card label, .account-card label, .form-section-fields label { display: grid; gap: 8px; font-size: .78rem; font-weight: 800; }
.signup-card input, .account-card input, .form-section-fields input, .form-section-fields select, .user-search input { width: 100%; height: 50px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; color: var(--ink); background: rgba(255,255,255,.76); }
.signup-success { align-content: center; min-height: 440px; text-align: center; }
.signup-success p { max-width: 450px; margin: 0 auto; color: var(--ink-soft); line-height: 1.65; }
.signup-success .button { margin-top: 10px; }
.success-mark { width: 62px; height: 62px; display: grid; margin: 0 auto; place-items: center; border-radius: 50%; color: var(--ink); background: var(--lime); font-size: 1.7rem; font-weight: 900; box-shadow: 0 0 0 12px rgba(200,240,75,.15); }

/* Profile and user management */
.account-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: clamp(42px, 6vw, 80px) 0 80px; }
.account-hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.account-hero h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(3rem, 6vw, 5.5rem); font-weight: 500; letter-spacing: -.055em; line-height: .96; }
.account-hero p:last-child { max-width: 650px; margin: 16px 0 0; color: var(--ink-soft); line-height: 1.65; }
.compact-hero h1 { font-size: clamp(2.8rem, 5vw, 4.6rem); }
.role-badge { display: inline-flex; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: #23685a; background: rgba(255,255,255,.52); font-size: .68rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.role-small { font-size: .61rem; }
.usage-overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 18px 0; }
.usage-card { padding: 18px; border: 1px solid rgba(255,255,255,.78); border-radius: 18px; background: rgba(255,253,247,.72); box-shadow: 0 12px 34px rgba(16,34,31,.05); }
.usage-card > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.usage-card span { font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.usage-card strong { font-family: Georgia, serif; font-size: 1.6rem; font-weight: 600; }
.usage-card strong small { color: var(--ink-soft); font-family: Inter, sans-serif; font-size: .72rem; }
.usage-track { height: 7px; margin-top: 15px; overflow: hidden; border-radius: 999px; background: var(--paper-deep); }
.usage-track i { display: block; width: var(--usage); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--aqua), var(--lime-deep)); }
.usage-card p { margin: 10px 0 0; color: var(--ink-soft); font-size: .68rem; line-height: 1.45; }
.verification-banner { display: flex; align-items: center; justify-content: space-between; gap: 26px; margin: 18px 0; padding: 20px 24px; border: 1px solid rgba(185,125,0,.24); border-radius: 18px; background: rgba(255,244,213,.72); }
.verification-banner h2 { margin: 2px 0 5px; font-family: Georgia, serif; font-size: 1.55rem; font-weight: 500; }
.verification-banner p:last-child { margin: 0; color: var(--ink-soft); font-size: .76rem; }
.verification-banner form { flex: 0 0 auto; margin: 0; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.account-card { display: grid; align-content: start; gap: 18px; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: 22px; background: rgba(255,253,247,.72); }
.account-card h2, .form-section h2, .danger-zone h2 { margin: 0; font-family: Georgia, serif; font-size: 2rem; font-weight: 500; letter-spacing: -.035em; }
.account-card .muted { margin: 7px 0 0; font-size: .84rem; line-height: 1.55; }
.account-footnote { margin: 22px 0 0; color: var(--ink-soft); font-size: .74rem; text-align: center; }
.users-main { width: min(1420px, calc(100% - 40px)); }
.users-hero { margin-bottom: 20px; }
.user-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 18px 0 12px; color: var(--ink-soft); font-size: .74rem; }
.user-search { flex: 1; max-width: 580px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.user-list { display: grid; gap: 9px; }
.user-row { display: grid; grid-template-columns: minmax(240px, 1.2fr) auto minmax(220px, .7fr) auto; align-items: center; gap: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,253,247,.72); }
.user-identity { min-width: 0; display: flex; align-items: center; gap: 12px; }
.avatar { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--ink); background: linear-gradient(135deg, var(--lime), var(--aqua)); font-size: .76rem; font-weight: 900; }
.user-identity div { min-width: 0; }
.user-identity > div > strong, .user-identity > div > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-identity > div > strong { font-size: .82rem; }
.user-identity > div > span { margin-top: 3px; color: var(--ink-soft); font-size: .72rem; }
.user-badges, .user-actions { display: flex; align-items: center; gap: 7px; }
.verification-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 9px; border-radius: 999px; color: #2f6527; background: #eff8df; font-size: .61rem; font-weight: 850; text-transform: uppercase; }
.verification-pill.is-unverified { color: #775200; background: #fff4d5; }
.user-usage { display: grid; gap: 5px; color: var(--ink-soft); font-size: .69rem; }
.user-usage strong { color: var(--ink); }
.user-actions form { margin: 0; }
.action-button { color: #775200; font-size: .7rem; }
.admin-user-main { width: min(1120px, calc(100% - 40px)); }
.admin-user-form { display: grid; gap: 12px; margin-top: 18px; }
.form-section { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr); gap: 32px; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: 22px; background: rgba(255,253,247,.72); }
.form-section-copy p:last-child { margin: 10px 0 0; color: var(--ink-soft); font-size: .8rem; line-height: 1.55; }
.form-section-fields { display: grid; gap: 14px; }
.form-section-fields label > span { display: flex; justify-content: space-between; gap: 12px; }
.form-section-fields label small { color: var(--ink-soft); font-weight: 650; }
.form-section-fields .checkbox-field { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.5); }
.form-section-fields .checkbox-field input { width: 18px; height: 18px; margin: 0; padding: 0; accent-color: #76a81d; }
.form-section-fields .checkbox-field span { display: inline; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 10px 0; }
.usage-history { margin-top: 22px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 18px; padding: 24px; border: 1px solid rgba(168,58,42,.25); border-radius: 22px; background: rgba(255,240,236,.55); }
.danger-zone p:last-child { margin: 8px 0 0; color: var(--ink-soft); font-size: .8rem; }
.danger-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.danger-actions form { margin: 0; }

/* Integration settings */
.integrations-main { width: min(1260px, calc(100% - 40px)); }
.security-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 13px; border: 1px solid rgba(50,123,108,.24); border-radius: 999px; color: #23685a; background: rgba(105,213,199,.12); font-size: .7rem; font-weight: 850; white-space: nowrap; }
.integration-grid { display: grid; grid-template-columns: .86fr 1.14fr; align-items: start; gap: 16px; margin-top: 18px; }
.integration-card { display: grid; gap: 20px; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: 24px; background: rgba(255,253,247,.76); box-shadow: 0 18px 48px rgba(16,34,31,.06); }
.integration-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.integration-header h2, .test-mail-card h2 { margin: 0; font-family: Georgia, serif; font-size: 2.15rem; font-weight: 500; letter-spacing: -.04em; }
.integration-state { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border: 1px solid rgba(168,58,42,.20); border-radius: 999px; color: #8d2a1a; background: #fff0ec; font-size: .65rem; font-weight: 850; white-space: nowrap; }
.integration-state::before { content: ""; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: currentColor; }
.integration-state.is-ready { border-color: rgba(74,139,50,.22); color: #2f6527; background: #eff8df; }
.integration-copy { margin: -4px 0 0; color: var(--ink-soft); font-size: .84rem; line-height: 1.65; }
.integration-form { display: grid; gap: 15px; }
.integration-form > label:not(.toggle-label), .integration-form .form-columns label { display: grid; gap: 8px; color: var(--ink); font-size: .78rem; font-weight: 800; }
.integration-form label > span { display: flex; justify-content: space-between; gap: 12px; }
.integration-form label small { color: var(--ink-soft); font-weight: 650; }
.integration-form input:not([type="checkbox"]), .integration-form select, .test-mail-card input { width: 100%; height: 50px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; color: var(--ink); background: rgba(255,255,255,.78); }
.integration-form .button { justify-self: start; }
.setting-toggle { color: var(--ink-soft); font-size: .78rem; line-height: 1.45; }
.field-help { margin: -3px 0 0; color: var(--ink-soft); font-size: .7rem; line-height: 1.55; }
.integration-remove { padding-top: 15px; border-top: 1px solid var(--line); }
.integration-remove .text-button { color: #8d2a1a; font-size: .72rem; }
.integration-doc-link { margin: -8px 0 0; font-size: .72rem; }
.integration-doc-link a { color: #23685a; font-weight: 800; }
.test-mail-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 16px; padding: 24px 28px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,253,247,.66); }
.test-mail-card p:last-child { margin: 7px 0 0; color: var(--ink-soft); font-size: .78rem; }
.test-mail-card form { min-width: min(100%, 480px); display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: 9px; }
.mail-log-panel { margin-top: 18px; }
.diagnostic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 16px; }
.diagnostic-item { display: grid; gap: 4px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.5); }
.diagnostic-item span { color: var(--ink-soft); font-size: .68rem; font-weight: 750; }
.diagnostic-item strong { color: #2f6527; font-size: .78rem; }
.diagnostic-item small { overflow: hidden; color: var(--ink-soft); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.diagnostic-warning strong { color: #775200; }
.diagnostic-error strong { color: #8d2a1a; }

/* Pulse watchlists */
.pulse-main { width: min(1260px, calc(100% - 40px)); margin: 0 auto; padding: clamp(42px, 6vw, 80px) 0 90px; }
.pulse-hero { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.pulse-hero h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(3.4rem, 7vw, 6.4rem); font-weight: 500; letter-spacing: -.06em; line-height: .92; }
.pulse-hero p:last-child { max-width: 680px; margin: 18px 0 0; color: var(--ink-soft); line-height: 1.65; }
.pulse-credit-chip { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 38px; margin-bottom: 6px; padding: 0 13px; border: 1px solid rgba(50,123,108,.24); border-radius: 999px; color: #23685a; background: rgba(105,213,199,.12); font-size: .7rem; font-weight: 850; white-space: nowrap; }
.pulse-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin: 18px 0; }
.pulse-stat { min-height: 140px; padding: 20px; border: 1px solid rgba(255,255,255,.78); border-radius: 20px; background: rgba(255,253,247,.72); box-shadow: 0 14px 38px rgba(16,34,31,.05); }
.pulse-stat strong, .pulse-stat span, .pulse-stat small { display: block; }
.pulse-stat strong { font-family: Georgia, serif; font-size: 2.2rem; font-weight: 500; letter-spacing: -.04em; }
.pulse-stat span { margin-top: 8px; font-size: .68rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.pulse-stat small { margin-top: 12px; color: var(--ink-soft); font-size: .72rem; line-height: 1.45; }
.pulse-create-panel, .pulse-board, .pulse-activity { margin-top: 18px; padding: clamp(22px, 4vw, 32px); border: 1px solid var(--line); border-radius: 24px; background: rgba(255,253,247,.72); }
.pulse-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.pulse-section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; letter-spacing: -.04em; }
.pulse-section-heading > p { max-width: 430px; margin: 0; color: var(--ink-soft); font-size: .76rem; line-height: 1.55; text-align: right; }
.pulse-create-form { display: grid; grid-template-columns: minmax(260px, 1fr) 190px 180px auto; gap: 9px; }
.pulse-create-form input, .pulse-create-form select { width: 100%; height: 54px; border: 1px solid var(--line); border-radius: 13px; padding: 0 15px; color: var(--ink); background: var(--surface-field); }
.pulse-create-form .button { min-height: 54px; white-space: nowrap; }
.pulse-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pulse-card { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface-card); box-shadow: 0 12px 36px rgba(16,34,31,.04); }
.pulse-card.is-paused { opacity: .72; }
.pulse-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.pulse-card-header h3 { margin: 5px 0 0; overflow-wrap: anywhere; font-family: Georgia, serif; font-size: 1.75rem; font-weight: 500; letter-spacing: -.03em; }
.pulse-platform { color: #23685a; font-size: .64rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.pulse-card-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 19px 0; }
.pulse-card-metrics > div { padding: 11px; border-radius: 12px; background: var(--surface-muted); }
.pulse-card-metrics strong, .pulse-card-metrics span { display: block; }
.pulse-card-metrics strong { font-size: 1rem; }
.pulse-card-metrics span { margin-top: 3px; color: var(--ink-soft); font-size: .61rem; letter-spacing: .06em; text-transform: uppercase; }
.pulse-schedule { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pulse-schedule div { min-width: 0; }
.pulse-schedule dt { color: var(--ink-soft); font-size: .61rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pulse-schedule dd { margin: 4px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .74rem; font-weight: 750; }
.pulse-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; color: #8d2a1a; background: rgba(255,118,94,.10); font-size: .7rem; line-height: 1.45; }
.pulse-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 16px; }
.pulse-card-actions form { margin: 0; }
.pulse-card-actions .button { margin-right: auto; }
.pulse-card-actions .text-button { font-size: .7rem; }
.pulse-delete { color: #8d2a1a; }
.pulse-alert-list { display: grid; gap: 9px; }
.pulse-alert { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 15px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-card); }
.pulse-alert-mark { width: 11px; height: 11px; border-radius: 50%; background: var(--lime-deep); box-shadow: 0 0 0 6px rgba(149,191,23,.14); }
.pulse-alert-breakout .pulse-alert-mark { background: var(--coral); box-shadow: 0 0 0 6px rgba(255,118,94,.14); }
.pulse-alert-copy { min-width: 0; }
.pulse-alert-copy p { margin: 0 0 4px; color: #23685a; font-size: .61rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.pulse-alert-copy h3 { margin: 0; font-size: .88rem; }
.pulse-alert-copy span { display: block; margin-top: 5px; color: var(--ink-soft); font-size: .74rem; line-height: 1.45; }
.pulse-alert-meta { display: grid; justify-items: end; gap: 8px; color: var(--ink-soft); font-size: .68rem; white-space: nowrap; }
.pulse-alert-meta a { color: #23685a; font-weight: 800; text-decoration: none; }
.pulse-alert-meta a:hover { text-decoration: underline; }

/* Select controls and progressive customizable dropdowns */
select:not([multiple]) {
    appearance: none;
    padding-right: 48px !important;
    background-color: var(--surface-field) !important;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--select-arrow) 50%),
        linear-gradient(135deg, var(--select-arrow) 50%, transparent 50%);
    background-position:
        calc(100% - 21px) calc(50% - 1px),
        calc(100% - 15px) calc(50% - 1px);
    background-repeat: no-repeat;
    background-size: 6px 6px, 6px 6px;
}
select:not([multiple]) option { padding: 11px 14px; color: var(--ink); background: var(--card); }
select:not([multiple]) option:checked { color: #13231f; background: var(--lime); font-weight: 800; }

@supports (appearance: base-select) {
    select:not([multiple]), ::picker(select) { appearance: base-select; }
    select:not([multiple]) {
        display: flex;
        align-items: center;
        overflow: hidden;
        line-height: 1.25;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    select:not([multiple])::picker-icon { display: none; }
    ::picker(select) {
        inset: auto;
        top: calc(anchor(bottom) + 7px);
        left: anchor(left);
        min-inline-size: anchor-size(width);
        max-block-size: min(340px, calc(100vh - anchor(bottom) - 24px));
        margin: 0;
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 6px;
        color: var(--ink);
        background: var(--card);
        box-shadow: var(--shadow);
    }
    select:not([multiple]) option {
        display: flex;
        align-items: center;
        min-height: 42px;
        border-radius: 9px;
        padding: 10px 13px;
        line-height: 1.25;
        white-space: nowrap;
    }
    select:not([multiple]) option:hover { background: var(--surface-hover); }
    select:not([multiple]) option:checked { background: var(--lime); }
}

/* Dark theme surfaces */
html[data-theme="dark"] body {
    background:
        radial-gradient(circle at 8% 7%, rgba(200, 240, 75, 0.10), transparent 25rem),
        radial-gradient(circle at 90% 72%, rgba(105, 213, 199, 0.09), transparent 30rem),
        var(--paper);
}
html[data-theme="dark"] .topbar { background: var(--topbar-bg); }
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .signup-card,
html[data-theme="dark"] .search-card,
html[data-theme="dark"] .insight-card,
html[data-theme="dark"] .admin-stat,
html[data-theme="dark"] .admin-panel,
html[data-theme="dark"] .usage-card,
html[data-theme="dark"] .account-card,
html[data-theme="dark"] .user-row,
html[data-theme="dark"] .form-section,
html[data-theme="dark"] .integration-card,
html[data-theme="dark"] .test-mail-card,
html[data-theme="dark"] .diagnostic-item { border-color: var(--line); background: var(--surface-card); }
html[data-theme="dark"] .pulse-stat,
html[data-theme="dark"] .pulse-create-panel,
html[data-theme="dark"] .pulse-board,
html[data-theme="dark"] .pulse-activity,
html[data-theme="dark"] .pulse-card,
html[data-theme="dark"] .pulse-alert { border-color: var(--line); background: var(--surface-card); }
html[data-theme="dark"] .login-card input,
html[data-theme="dark"] .search-field input,
html[data-theme="dark"] .signup-card input,
html[data-theme="dark"] .account-card input,
html[data-theme="dark"] .form-section-fields input,
html[data-theme="dark"] .user-search input,
html[data-theme="dark"] .integration-form input:not([type="checkbox"]),
html[data-theme="dark"] .test-mail-card input { color: var(--ink); background: var(--surface-field); }
html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.is-active,
html[data-theme="dark"] .recent-search,
html[data-theme="dark"] .meta-pill,
html[data-theme="dark"] .results-toolbar,
html[data-theme="dark"] .system-status,
html[data-theme="dark"] .role-badge,
html[data-theme="dark"] .form-section-fields .checkbox-field { background: var(--surface-muted); }
html[data-theme="dark"] .button-secondary:hover,
html[data-theme="dark"] .recent-search:hover { background: var(--surface-hover); }
html[data-theme="dark"] .metric { background: var(--paper-deep); }
html[data-theme="dark"] .score-badge { color: var(--ink); background: rgba(19, 35, 31, .94); }
html[data-theme="dark"] .admin-table th { background: rgba(6, 15, 12, .55); }
html[data-theme="dark"] .admin-table th,
html[data-theme="dark"] .admin-table td { border-bottom-color: rgba(221, 244, 235, .09); }
html[data-theme="dark"] .search-hero h1 span,
html[data-theme="dark"] .reel-link,
html[data-theme="dark"] .form-switch a,
html[data-theme="dark"] .integration-doc-link a,
html[data-theme="dark"] .role-badge,
html[data-theme="dark"] .security-chip { color: #7bd8c8; }
html[data-theme="dark"] .pulse-platform,
html[data-theme="dark"] .pulse-alert-copy p,
html[data-theme="dark"] .pulse-alert-meta a,
html[data-theme="dark"] .pulse-credit-chip { color: #7bd8c8; }
html[data-theme="dark"] .notice-error,
html[data-theme="dark"] .status-pill.is-error,
html[data-theme="dark"] .status-pill.status-suspended,
html[data-theme="dark"] .integration-state { color: #ffab9d; background: rgba(255, 118, 94, .12); }
html[data-theme="dark"] .notice-warning,
html[data-theme="dark"] .status-pill.status-pending,
html[data-theme="dark"] .verification-pill.is-unverified { color: #f2c86d; background: rgba(213, 155, 32, .13); }
html[data-theme="dark"] .notice-success,
html[data-theme="dark"] .status-pill,
html[data-theme="dark"] .verification-pill,
html[data-theme="dark"] .integration-state.is-ready { color: #c9ed8c; background: rgba(105, 166, 39, .14); }
html[data-theme="dark"] .verification-banner { background: rgba(213, 155, 32, .10); }
html[data-theme="dark"] .danger-zone { background: rgba(255, 118, 94, .08); }
html[data-theme="dark"] .empty-state { border-color: var(--line); }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(221, 244, 235, .26); background-clip: padding-box; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: rgba(221, 244, 235, .42); background-clip: padding-box; }

@media (max-width: 1060px) {
    .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .results-insights, .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-panels { grid-template-columns: 1fr; }
    .search-hero { grid-template-columns: minmax(0, 1fr) 220px; }
    .pulse-orbit { width: 200px; height: 200px; }
    .user-row { grid-template-columns: minmax(220px, 1fr) auto; }
    .user-usage { grid-column: 1; }
    .user-actions { grid-column: 2; grid-row: 2; }
    .diagnostic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pulse-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pulse-create-form { grid-template-columns: minmax(240px, 1fr) 180px; }
    .pulse-create-form .button { width: 100%; }
}

@media (max-width: 820px) {
    .login-layout { grid-template-columns: 1fr; }
    .brand-panel { min-height: auto; padding-bottom: 42px; }
    .brand-copy { padding: 80px 0 56px; }
    .brand-copy h1 { font-size: clamp(3.2rem, 15vw, 5.5rem); }
    .signal-strip { display: none; }
    .login-panel { min-height: 50vh; padding: 28px 18px 50px; }
    .search-hero { grid-template-columns: 1fr; }
    .pulse-orbit { display: none; }
    .search-form { grid-template-columns: 1fr 1fr; }
    .search-field { grid-column: 1 / -1; }
    .search-button { grid-column: 1 / -1; }
    .search-options { align-items: flex-start; flex-direction: column; }
    .topbar-actions { gap: 10px; }
    .account-menu { gap: 10px; }
    .admin-hero { align-items: flex-start; flex-direction: column; }
    .signup-layout { grid-template-columns: 1fr; }
    .signup-intro { min-height: auto; }
    .signup-intro h1 { font-size: clamp(3rem, 12vw, 5rem); }
    .signup-panel { padding: 28px 18px 50px; }
    .account-hero { align-items: flex-start; flex-direction: column; }
    .usage-overview, .account-grid { grid-template-columns: 1fr; }
    .form-section { grid-template-columns: 1fr; gap: 20px; }
    .danger-zone { align-items: flex-start; flex-direction: column; }
    .verification-banner { align-items: flex-start; flex-direction: column; }
    .danger-actions { justify-content: flex-start; }
    .pulse-hero { align-items: flex-start; flex-direction: column; }
    .pulse-section-heading { align-items: flex-start; flex-direction: column; }
    .pulse-section-heading > p { text-align: left; }
    .pulse-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .topbar { min-height: 68px; gap: 8px; padding: 0 16px; }
    .topbar-actions { flex: 1; justify-content: flex-end; }
    .account-menu > span { display: none; }
    .brand > span:last-child { display: none; }
    .topnav { max-width: calc(100vw - 158px); gap: 0; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
    .topnav::-webkit-scrollbar { display: none; }
    .nav-link { flex: 0 0 auto; padding: 7px 6px; font-size: .65rem; }
    .account-link { display: none; }
    .theme-toggle { min-width: 36px; width: 36px; padding: 0; }
    .theme-toggle-label { display: none; }
    .dashboard { width: min(100% - 28px, 1420px); padding-top: 48px; }
    .search-hero h1 { font-size: clamp(3.3rem, 18vw, 5rem); }
    .search-card { padding: 12px; border-radius: 20px; }
    .search-form { grid-template-columns: 1fr; }
    .search-field { grid-column: auto; }
    .search-button { grid-column: auto; }
    .results-heading { align-items: flex-start; flex-direction: column; }
    .results-heading-actions { justify-content: flex-start; }
    .results-meta { justify-content: flex-start; }
    .results-insights, .admin-stats { grid-template-columns: 1fr; }
    .results-toolbar { align-items: flex-start; flex-direction: column; }
    .results-filters { width: 100%; }
    .results-filters label, .results-filters select { width: 100%; }
    .visible-result-count { padding-bottom: 0; }
    .results-grid { grid-template-columns: 1fr; }
    .reel-card { min-height: 330px; }
    .recent-searches { align-items: flex-start; flex-direction: column; }
    .admin-main { width: min(100% - 28px, 1320px); padding-top: 48px; }
    .account-main, .admin-user-main, .users-main { width: min(100% - 28px, 1180px); padding-top: 48px; }
    .form-columns { grid-template-columns: 1fr; }
    .integration-grid { grid-template-columns: 1fr; }
    .test-mail-card { align-items: flex-start; flex-direction: column; }
    .test-mail-card form { width: 100%; }
    .user-toolbar { align-items: flex-start; flex-direction: column; }
    .user-search { width: 100%; }
    .user-row { grid-template-columns: 1fr; }
    .user-badges, .user-usage, .user-actions { grid-column: 1; grid-row: auto; }
    .user-actions { flex-wrap: wrap; }
    .form-actions { align-items: stretch; flex-direction: column; }
    .integration-header { align-items: flex-start; flex-direction: column; }
    .integration-form .button { width: 100%; }
    .test-mail-card form { grid-template-columns: 1fr; }
    .danger-actions { width: 100%; }
    .danger-actions form, .danger-actions .button { width: 100%; }
    .diagnostic-grid { grid-template-columns: 1fr; }
    .pulse-main { width: min(100% - 28px, 1260px); padding-top: 48px; }
    .pulse-stats { grid-template-columns: 1fr; }
    .pulse-create-form { grid-template-columns: 1fr; }
    .pulse-alert { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
    .pulse-alert-meta { grid-column: 2; justify-items: start; }
}

/* 0.10.0 saved research, shared feedback, and cross-platform intelligence */
.saved-search-title { align-items: flex-start; }
.saved-search-title > div { min-width: 0; }
.saved-search-title .meta-pill { display: inline-flex; min-height: 36px; flex: 0 0 auto; align-items: center; justify-content: center; padding: 8px 11px; white-space: nowrap; }
.saved-search-body { gap: 8px; }
.saved-search-body > p { margin: 0; line-height: 1.55; }
.saved-results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.saved-results-toolbar > span { color: var(--ink-soft); font-size: .75rem; font-weight: 750; }
.saved-results-toolbar .view-switch { margin: 0; }
.saved-results-table { min-width: 1120px; table-layout: fixed; }
.results-table.saved-results-table th:nth-child(1),.results-table.saved-results-table td:nth-child(1) { width: 60px; }
.results-table.saved-results-table th:nth-child(2),.results-table.saved-results-table td:nth-child(2) { width: 150px; }
.results-table.saved-results-table th:nth-child(3),.results-table.saved-results-table td:nth-child(3) { width: 300px; }
.results-table.saved-results-table th:nth-child(4),.results-table.saved-results-table td:nth-child(4) { width: 150px; }
.results-table.saved-results-table th:nth-child(5),.results-table.saved-results-table td:nth-child(5),
.results-table.saved-results-table th:nth-child(6),.results-table.saved-results-table td:nth-child(6),
.results-table.saved-results-table th:nth-child(7),.results-table.saved-results-table td:nth-child(7) { width: 100px; }
.results-table.saved-results-table th:nth-child(8),.results-table.saved-results-table td:nth-child(8) { width: 70px; }
.results-table.saved-results-table th:nth-child(9),.results-table.saved-results-table td:nth-child(9) { width: 90px; text-align: center; }
.saved-results-table th[data-sort][data-direction="asc"]::after { content: ' ↑'; opacity: 1; }
.saved-results-table th[data-sort][data-direction="desc"]::after { content: ' ↓'; opacity: 1; }
.saved-results-table th[data-sort]:focus-visible { outline: 3px solid rgba(105,213,199,.45); outline-offset: -3px; }

.notice { position: relative; display: flex; min-height: 50px; align-items: center; padding: 13px 50px 13px 16px; line-height: 1.5; transition: opacity .2s ease, transform .2s ease; }
.notice-close { position: absolute; top: 50%; right: 12px; display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid currentColor; border-radius: 50%; padding: 0; color: inherit; background: transparent; opacity: .72; cursor: pointer; transform: translateY(-50%); }
.notice-close:hover { opacity: 1; background: rgba(255,255,255,.28); }
.notice-close span::before,.notice-close span::after { content: ''; position: absolute; top: 50%; left: 50%; width: 11px; height: 1.5px; border-radius: 2px; background: currentColor; transform: translate(-50%,-50%) rotate(45deg); }
.notice-close span::after { transform: translate(-50%,-50%) rotate(-45deg); }
.notice.is-hiding { opacity: 0; transform: translateY(-5px); }

.tool-route { display: grid; grid-template-rows: auto minmax(46px,auto) auto; align-content: start; }
.tool-route > p { min-height: 46px; margin: 7px 0 16px; line-height: 1.5; }
.tool-route .form-columns { align-items: start; }
.tool-route .form-columns > label { display: grid; min-width: 0; grid-template-rows: auto 50px minmax(1.1em,auto); align-content: start; }
.tool-route .form-columns select { width: 100%; height: 50px; min-width: 0; }

.details-media { isolation: isolate; }
.details-video-frame { position: absolute; z-index: 4; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.details-play-button { position: absolute; z-index: 3; right: 12px; bottom: 12px; display: inline-flex; min-height: 40px; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.82); border-radius: 999px; padding: 0 14px; color: #10221f; background: var(--lime); box-shadow: 0 8px 24px rgba(0,0,0,.24); font: inherit; font-size: .72rem; font-weight: 900; cursor: pointer; }
.details-play-button span { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid currentColor; }
.details-media.is-playing { min-height: 220px; background: #000; }

.cross-platform-intelligence { margin: 18px 0; border: 1px solid var(--line); border-radius: 20px; padding: 22px; background: linear-gradient(135deg,rgba(200,240,75,.12),rgba(105,213,199,.12)),var(--surface-card); }
.cross-platform-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.cross-platform-heading h3 { margin: 4px 0 0; font-family: var(--display-font); font-size: clamp(1.5rem,3vw,2.1rem); font-weight: 500; }
.cross-platform-heading > span { color: var(--ink-soft); font-size: .72rem; }
.cross-platform-clusters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.cross-platform-cluster { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--card); }
.cross-platform-cluster-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.cross-platform-cluster-heading h4 { margin: 5px 0 0; font-family: var(--display-font); font-size: 1.35rem; font-weight: 500; }
.cross-platform-cluster > p { margin: 0; color: var(--ink-soft); font-size: .72rem; line-height: 1.55; }
.cross-status { color: var(--teal); font-size: .61rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.spread-score { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #10221f; background: var(--lime); font-family: var(--display-font); font-size: 1.15rem; }
.spread-route { display: flex; align-items: center; gap: 9px; font-size: .72rem; font-weight: 850; }
.spread-route i { color: var(--teal); font-style: normal; }
.cross-platform-card-label { position: absolute; z-index: 3; right: 12px; bottom: 12px; border-radius: 999px; padding: 6px 9px; color: #10221f; background: rgba(255,255,255,.9); font-size: .62rem; font-weight: 900; }

@media (max-width: 820px) {
    .cross-platform-clusters { grid-template-columns: 1fr; }
    .cross-platform-heading { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* 0.8 content intelligence */
.search-form { grid-template-columns: minmax(240px, 1fr) 160px 190px 160px 154px; }
.pulse-create-form { grid-template-columns: minmax(230px,1fr) 145px 170px 145px 150px; }
.search-field input, .platform-field select, .scope-field select, .period-field select {
    width: 100%; height: 56px; border: 1px solid var(--line); border-radius: 15px;
    padding: 0 38px 0 17px; color: var(--ink); background-color: var(--surface-field); cursor: pointer;
}
.search-field input { padding-right: 17px; cursor: text; }
.trend-radar { margin: 12px 0 34px; padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface-card); box-shadow: 0 18px 50px rgba(16,34,31,.06); }
.radar-heading { display: flex; align-items: end; justify-content: space-between; gap: 26px; margin-bottom: 18px; }
.radar-heading h2 { margin: 2px 0 5px; font-family: Georgia,serif; font-size: clamp(2rem,4vw,3rem); font-weight: 500; letter-spacing: -.04em; }
.radar-heading p:last-child { max-width: 720px; margin: 0; color: var(--ink-soft); line-height: 1.55; }
.radar-tabs,.view-switch { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-muted); }
.radar-tabs button,.view-switch button { min-height: 34px; border: 0; border-radius: 9px; padding: 0 12px; color: var(--ink-soft); background: transparent; cursor: pointer; font-size: .75rem; font-weight: 800; }
.radar-tabs button.is-active,.view-switch button.is-active { color: #10221f; background: var(--lime); }
.radar-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.radar-card { min-width: 0; overflow: hidden; display: grid; grid-template-columns: 92px minmax(0,1fr); min-height: 112px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: var(--card); text-decoration: none; transition: transform .16s ease,border-color .16s ease; }
.radar-card:hover { transform: translateY(-2px); border-color: rgba(105,213,199,.6); }
.radar-media { position: relative; display: grid; place-items: center; overflow: hidden; color: var(--lime); background: #183f36; }
.radar-media img { width: 100%; height: 100%; object-fit: cover; }
.radar-media em { position: absolute; left: 7px; top: 7px; padding: 4px 7px; border-radius: 8px; color: #10221f; background: var(--lime); font-style: normal; font-size: .7rem; font-weight: 900; }
.radar-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 11px; }
.radar-copy small { color: var(--ink-soft); font-size: .6rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.radar-copy strong,.radar-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radar-copy strong { font-size: .78rem; }.radar-copy span { color: var(--ink-soft); font-size: .72rem; }.radar-copy b { margin-top: auto; color: var(--ink); font-size: .65rem; }
.view-switch.compact { margin-left: auto; }.view-switch.compact button { min-height: 30px; }
.results-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 17px; background: var(--card); box-shadow: 0 12px 35px rgba(16,34,31,.05); }
.results-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.results-table th,.results-table td { padding: 14px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.results-table th { position: sticky; top: 0; color: var(--ink-soft); background: var(--card); cursor: default; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.results-table th[data-sort] { cursor: pointer; }.results-table th[data-sort]::after { content: ' ↕'; opacity: .55; }
.results-table td { max-width: 340px; color: var(--ink-soft); font-size: .79rem; }.results-table td:first-child { color: var(--ink); font-weight: 900; }.results-table td a { color: var(--ink); font-weight: 750; }
.saved-search-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.saved-search-card { overflow: hidden; display: grid; grid-template-columns: 180px minmax(0,1fr); min-height: 190px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: 0 14px 40px rgba(16,34,31,.06); }
.saved-search-preview { display: grid; place-items: center; overflow: hidden; color: var(--lime); background: #183f36; font-family: Georgia,serif; font-size: 2rem; }.saved-search-preview img { width: 100%; height: 100%; object-fit: cover; }
.saved-search-body { display: flex; flex-direction: column; padding: 20px; }.saved-search-title { display: flex; justify-content: space-between; gap: 12px; }.saved-search-title h2 { margin: 5px 0; font-family: Georgia,serif; font-size: 1.8rem; font-weight: 500; }.saved-search-title h2 a { text-decoration: none; }.saved-search-body>p { color: var(--ink-soft); font-size: .78rem; }.saved-search-body .inline-actions { margin-top: auto; }
.saved-detail { max-width: 1420px; }.view-switch { margin: 0 0 16px auto; width: max-content; }
.email-studio { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 18px; }.template-list { display: flex; flex-direction: column; gap: 7px; }.template-list-item { display: flex; justify-content: space-between; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface-card); text-decoration: none; }.template-list-item small { color: var(--ink-soft); }.template-list-item.is-active { border-color: var(--lime-deep); background: rgba(200,240,75,.13); }
.template-editor textarea,.editor-settings input { width: 100%; }.variable-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 18px; color: var(--ink-soft); font-size: .75rem; }.variable-chips code { padding: 5px 7px; border-radius: 7px; color: var(--ink); background: var(--surface-muted); }
.tool-route { margin-bottom: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-muted); }.tool-route>p { margin: 6px 0 14px; color: var(--ink-soft); font-size: .82rem; }
.inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }.inline-form { display: grid; grid-template-columns: minmax(220px,1fr) auto; gap: 10px; }
.integration-hub-links { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }.integration-hub-links .integration-card { color:var(--ink); text-decoration:none; }.integration-hub-links .integration-card strong { margin-top:auto; color:var(--lime-deep); font-size:.8rem; }
.notification-feed { display: grid; gap: 12px; }.notification-card { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 15px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }.notification-card.is-unread { border-left: 5px solid var(--lime-deep); }.notification-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #10221f; background: var(--lime); font-weight: 900; }.notification-title { display: flex; justify-content: space-between; gap: 20px; }.notification-title h2 { margin: 3px 0 0; font-family: Georgia,serif; font-size: 1.55rem; font-weight: 500; }.notification-title time { flex: none; color: var(--ink-soft); font-size: .7rem; }.notification-body { color: var(--ink-soft); line-height: 1.55; }.notification-body p:first-child { margin-top: 8px; }
.notification-count { display:inline-grid; place-items:center; min-width:18px; height:18px; margin-left:4px; border-radius:999px; padding:0 5px; color:#10221f; background:var(--lime); font-size:.58rem; font-weight:900; }

html[data-theme="dark"] .search-card,html[data-theme="dark"] .insight-card,html[data-theme="dark"] .recent-search { background: var(--surface-card); border-color: var(--line); }

@media(max-width:1180px){.search-form{grid-template-columns:minmax(220px,1fr) 150px 175px 150px}.search-button{grid-column:4}.scope-field{grid-column:2}.platform-field{grid-column:1}.period-field{grid-column:3}.radar-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:820px){.search-form{grid-template-columns:1fr 1fr}.search-field{grid-column:1/-1}.platform-field,.scope-field,.period-field,.search-button{grid-column:auto}.radar-heading{align-items:flex-start;flex-direction:column}.saved-search-grid{grid-template-columns:1fr}.email-studio{grid-template-columns:1fr}.template-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}.integration-hub-links{grid-template-columns:1fr}}
@media(max-width:620px){.radar-grid{grid-template-columns:1fr}.search-form{grid-template-columns:1fr}.platform-field,.scope-field,.period-field,.search-button{grid-column:auto}.saved-search-card{grid-template-columns:1fr}.saved-search-preview{height:170px}.template-list{grid-template-columns:1fr}.inline-form{grid-template-columns:1fr}.notification-title{flex-direction:column;gap:4px}}

/* 0.8.1 application shell and workspace polish */
[hidden] { display: none !important; }

.topbar {
    position: sticky;
    z-index: 50;
    top: 0;
    min-height: 72px;
    padding-inline: clamp(18px, 3.5vw, 54px);
}
.topbar-actions { gap: 10px; }
.topnav { gap: 3px; }
.nav-link { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.nav-dropdown { position: relative; }
.nav-dropdown-trigger,
.account-trigger {
    border: 0;
    font-family: inherit;
    cursor: pointer;
}
.nav-dropdown-trigger > span { position: relative; top: -1px; font-size: .95rem; }
.nav-dropdown-menu {
    position: absolute;
    z-index: 80;
    top: calc(100% + 10px);
    right: 0;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-7px);
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--ink);
    background: var(--card);
    box-shadow: 0 24px 65px rgba(10, 28, 24, .2);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu,
.nav-dropdown.is-open > .nav-dropdown-menu { visibility: visible; opacity: 1; transform: translateY(0); }
.admin-dropdown-menu { width: min(520px, calc(100vw - 28px)); padding: 14px; }
.nav-dropdown-heading { padding: 8px 8px 13px; border-bottom: 1px solid var(--line); }
.nav-dropdown-heading strong,
.nav-dropdown-heading span { display: block; }
.nav-dropdown-heading strong { font-size: .82rem; }
.nav-dropdown-heading span { margin-top: 3px; color: var(--ink-soft); font-size: .68rem; }
.nav-dropdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding-top: 8px; }
.nav-dropdown-item,
.account-menu-link {
    display: grid;
    gap: 3px;
    border-radius: 11px;
    padding: 11px 12px;
    color: var(--ink);
    text-align: left;
    text-decoration: none;
}
.nav-dropdown-item:hover,
.nav-dropdown-item.is-active,
.account-menu-link:hover,
.account-menu-link.is-active { background: var(--surface-hover); }
.nav-dropdown-item strong,
.account-menu-link strong { font-size: .76rem; }
.nav-dropdown-item span,
.account-menu-link span { color: var(--ink-soft); font-size: .65rem; line-height: 1.35; }
.account-menu { display: block; color: var(--ink); }
.account-trigger {
    min-height: 42px;
    max-width: 210px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 13px;
    padding: 4px 8px 4px 5px;
    color: var(--ink);
    background: transparent;
}
.account-trigger:hover,
.account-trigger.is-active,
.account-menu.is-open .account-trigger { border-color: var(--line); background: var(--surface-muted); }
.account-avatar { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: #10221f; background: linear-gradient(145deg, var(--lime), #69d5c7); font-size: .72rem; font-weight: 900; }
.account-name { overflow: hidden; color: var(--ink-soft); font-size: .73rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.account-chevron { color: var(--ink-soft); }
.account-dropdown-menu { width: 230px; padding: 8px; }
.account-dropdown-menu form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }
.account-menu-link { width: 100%; border: 0; font-family: inherit; background: transparent; cursor: pointer; }
.theme-toggle { min-width: 68px; }

.dashboard { width: min(1320px, calc(100% - 40px)); padding: 30px 0 72px; }
.search-hero-compact { grid-template-columns: minmax(0, 1fr) 170px; gap: 30px; min-height: 188px; }
.search-hero-compact h1 { max-width: 920px; font-size: clamp(3.2rem, 6.3vw, 5.8rem); line-height: .91; }
.search-hero-compact .hero-copy { max-width: 760px; margin-top: 16px; font-size: .98rem; line-height: 1.6; }
.search-hero-compact .pulse-orbit { width: 160px; height: 160px; }
.search-hero-compact .pulse-core { width: 68px; height: 68px; font-size: 1.5rem; box-shadow: 0 0 0 10px rgba(200,240,75,.15), 0 16px 36px rgba(50,123,108,.18); }
.search-hero-compact .orbit { inset: 15px; }
.search-hero-compact .orbit-two { inset: 0; }
.search-card { margin-top: 28px; }

.trend-radar { margin: 26px 0 0; padding: clamp(20px, 2.4vw, 30px); }
.radar-heading { align-items: center; }
.radar-heading h2 { font-size: clamp(2rem, 3.2vw, 2.8rem); }
.radar-heading p:last-child { max-width: 660px; }
.radar-tabs { flex: 0 0 auto; }
.radar-tabs button { min-height: 38px; padding-inline: 14px; }
.radar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.radar-card { grid-template-columns: 124px minmax(0, 1fr); min-height: 156px; border-radius: 18px; }
.radar-media { min-height: 156px; }
.radar-media img { position: relative; z-index: 1; display: block; }
.radar-placeholder { position: absolute; inset: 0; display: grid; place-content: center; gap: 5px; color: rgba(239,248,227,.72); text-align: center; background: radial-gradient(circle at 50% 35%, rgba(200,240,75,.15), transparent 40%), linear-gradient(145deg,#183f36,#28685a); }
.radar-placeholder strong { color: var(--lime); font-family: Georgia,serif; font-size: 1.5rem; }
.radar-placeholder small { font-size: .53rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.radar-media em { z-index: 2; left: 9px; top: 9px; padding: 5px 8px; }
.radar-copy { gap: 6px; padding: 14px; }
.radar-copy small { font-size: .62rem; }
.radar-copy strong { font-size: .83rem; }
.radar-copy > span:not(.radar-metrics) { display: -webkit-box; overflow: hidden; color: var(--ink-soft); font-size: .75rem; line-height: 1.42; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.radar-metrics { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.radar-metrics b { padding: 5px 7px; border-radius: 8px; color: var(--ink); background: var(--surface-muted); font-size: .62rem; }

.results-toolbar { padding: 16px 18px; }
.results-table-wrap { padding-top: 0; }
.results-table { table-layout: fixed; min-width: 970px; }
.results-table th:first-child,
.results-table td:first-child { width: 118px; }
.results-table th:nth-child(2),
.results-table td:nth-child(2) { width: 280px; }
.results-table th:nth-child(3),
.results-table td:nth-child(3) { width: 165px; }
.results-table th,
.results-table td { padding: 12px 14px; }
.table-score { display: flex; align-items: center; gap: 10px; }
.table-thumb { position: relative; flex: 0 0 50px; width: 50px; height: 50px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; color: var(--lime); background: #183f36; }
.table-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.table-score-value { font-size: .9rem; }
.table-content-cell { height: 76px; }
.table-content { display: -webkit-box; max-height: 3.9em; overflow: hidden; line-height: 1.3; white-space: normal; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

.settings-page { width: min(1280px, calc(100% - 40px)); padding-top: 44px; }
.settings-hero { margin-bottom: 24px; }
.settings-hero h1 { font-size: clamp(2.8rem, 5vw, 4.8rem); }
.settings-section { margin-bottom: 20px; }
.settings-section-header { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 14px; padding: 0 3px; }
.settings-section-header h2 { margin: 2px 0 0; font-family: Georgia,serif; font-size: 2rem; font-weight: 500; }
.settings-section-header > p { max-width: 520px; margin: 0; color: var(--ink-soft); font-size: .78rem; line-height: 1.55; }
.provider-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.provider-config-card { padding: clamp(22px, 2.8vw, 30px); }
.provider-config-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.provider-config-header h3 { margin: 4px 0 0; font-family: Georgia,serif; font-size: 2rem; font-weight: 500; }
.provider-config-card > p { min-height: 42px; margin: 18px 0; color: var(--ink-soft); font-size: .82rem; line-height: 1.55; }
.field-stack { display: grid; gap: 8px; color: var(--ink); font-size: .76rem; font-weight: 800; }
.field-stack input,
.field-stack textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; color: var(--ink); background: var(--surface-field); font: inherit; font-weight: 500; }
.field-stack input { height: 50px; }
.field-stack textarea { min-height: 260px; padding-block: 13px; resize: vertical; }
.provider-config-card .setting-toggle { margin-top: 18px; }
.settings-save-bar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px 13px 18px; background: var(--surface-card); }
.settings-save-bar p { margin: 0; color: var(--ink-soft); font-size: .75rem; }
.provider-utilities { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.provider-utilities form { margin: 0; }
.routing-panel { margin-top: 28px; }
.routing-panel .admin-panel-header { align-items: center; padding: 24px 28px; }
.routing-panel .admin-panel-header p:last-child { margin: 7px 0 0; color: var(--ink-soft); font-size: .76rem; }
.routing-form { padding: 24px 28px 28px; }
.tool-route-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.tool-route { margin: 0; padding: 20px; }

.email-page { width: min(1480px, calc(100% - 32px)); }
.email-workspace { display: grid; grid-template-columns: 225px minmax(480px, 1fr) minmax(340px, 420px); align-items: start; gap: 15px; }
.template-sidebar { position: sticky; top: 88px; min-width: 0; }
.template-sidebar-heading { margin-bottom: 10px; padding: 2px 4px 9px; }
.template-sidebar-heading strong { font-size: .82rem; }
.template-list { display: flex; flex-direction: column; gap: 6px; }
.template-list-item { align-items: flex-start; border-radius: 14px; padding: 13px; }
.template-list-item > span { min-width: 0; display: grid; gap: 5px; }
.template-list-item strong { font-size: .75rem; }
.template-list-item small { display: -webkit-box; overflow: hidden; font-size: .64rem; line-height: 1.38; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.template-status { flex: 0 0 auto; border-radius: 999px; padding: 4px 6px; color: var(--ink-soft); background: var(--surface-muted); font-size: .58rem; font-style: normal; font-weight: 850; }
.template-status.is-enabled { color: #245c25; background: #e9f6d6; }
.template-editor-panel { overflow: visible; }
.email-panel-header,
.email-preview-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.email-panel-header h2,
.email-preview-header h2 { margin: 3px 0 0; font-family: Georgia,serif; font-size: 1.75rem; font-weight: 500; }
.email-panel-header p:last-child { margin: 7px 0 0; color: var(--ink-soft); font-size: .72rem; line-height: 1.45; }
.email-editor-form { display: grid; gap: 17px; padding: 22px 24px 16px; }
.variable-chips { margin: 0; }
.variable-chips button { border: 0; border-radius: 8px; padding: 0; background: transparent; cursor: pointer; }
.variable-chips button:hover code { background: rgba(200,240,75,.24); }
.editor-tabs,
.preview-size-switch { display: inline-flex; width: max-content; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 4px; background: var(--surface-muted); }
.editor-tabs button,
.preview-size-switch button { min-height: 32px; border: 0; border-radius: 8px; padding: 0 11px; color: var(--ink-soft); background: transparent; cursor: pointer; font-size: .68rem; font-weight: 800; }
.editor-tabs button.is-active,
.preview-size-switch button.is-active { color: #10221f; background: var(--lime); }
.editor-tab-panel { min-width: 0; }
.editor-tab-panel > .field-stack textarea { min-height: 480px; }
.email-save-bar { margin-top: 2px; }
.reset-template-form { padding: 0 24px 20px; }
.email-preview-panel { position: sticky; top: 88px; }
.email-preview-header { align-items: center; padding: 18px; }
.email-preview-header h2 { font-size: 1.4rem; }
.preview-size-switch button { min-height: 29px; padding-inline: 8px; font-size: .61rem; }
.preview-envelope { padding: 16px; }
.preview-envelope-row { display: grid; gap: 5px; margin-bottom: 12px; border-radius: 12px; padding: 12px; background: var(--surface-muted); }
.preview-envelope-row span { color: var(--ink-soft); font-size: .61rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.preview-envelope-row strong { overflow: hidden; font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.email-preview-stage { display: flex; justify-content: center; overflow: auto; min-height: 610px; border-radius: 14px; padding: 0; background: #e8e5dc; }
.email-preview-stage iframe { width: 100%; min-height: 610px; border: 0; background: white; transition: width .18s ease; }
.email-preview-stage.is-mobile iframe { width: 360px; }
.tox-tinymce { border-color: var(--line) !important; border-radius: 13px !important; }

.notice-composer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); align-items: start; gap: 16px; }
.notice-composer-panel .admin-panel-header,
.notice-preview-panel .admin-panel-header { padding: 22px 24px; }
.notice-composer-panel .admin-panel-header p:last-child,
.notice-preview-panel .admin-panel-header p:last-child { margin: 7px 0 0; color: var(--ink-soft); font-size: .74rem; }
.notice-form { padding: 22px 24px 24px; }
.notice-preview-panel { position: sticky; top: 88px; }
.notice-preview-stage { padding: 24px; background: var(--surface-muted); }
.notice-live-preview { grid-template-columns: 44px minmax(0, 1fr); margin: 0; background: var(--card); }
.notice-live-preview .button { display: inline-flex; width: max-content; min-height: 36px; margin-top: 12px; padding: 0 12px; }
.notice-history-panel { margin-top: 18px; }
.notice-history-table td:first-child { min-width: 240px; white-space: normal; }

html[data-theme="dark"] .nav-dropdown-menu,
html[data-theme="dark"] .settings-save-bar,
html[data-theme="dark"] .provider-config-card { background: var(--card); }
html[data-theme="dark"] .template-status.is-enabled { color: #dff3b1; background: rgba(105,166,39,.18); }

@media (max-width: 1260px) {
    .email-workspace { grid-template-columns: 210px minmax(0, 1fr); }
    .email-preview-panel { position: static; grid-column: 1 / -1; }
    .email-preview-stage { min-height: 560px; }
    .email-preview-stage iframe { min-height: 560px; }
}
@media (max-width: 1040px) {
    .topbar .brand > span:last-child { display: none; }
    .account-name { display: none; }
    .radar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-route-grid { grid-template-columns: 1fr; }
    .notice-composer-grid { grid-template-columns: 1fr; }
    .notice-preview-panel { position: static; }
}
@media (max-width: 820px) {
    .topbar { flex-wrap: wrap; min-height: 68px; padding-block: 8px; }
    .topbar-actions { flex: 1; justify-content: flex-end; }
    .topnav { order: 3; width: 100%; overflow-x: auto; }
    .admin-dropdown-menu { position: fixed; top: 68px; right: 14px; }
    .search-hero-compact { grid-template-columns: 1fr; min-height: 0; }
    .search-hero-compact .pulse-orbit { display: none; }
    .radar-heading { align-items: flex-start; }
    .radar-tabs { max-width: 100%; overflow-x: auto; }
    .provider-settings-grid { grid-template-columns: 1fr; }
    .settings-section-header { align-items: flex-start; flex-direction: column; gap: 8px; }
    .email-workspace { grid-template-columns: 1fr; }
    .template-sidebar { position: static; }
    .template-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .topbar-actions { gap: 4px; }
    .theme-toggle { min-width: 38px; width: 38px; padding: 0; }
    .theme-toggle-label { display: none; }
    .account-trigger { padding-right: 5px; }
    .account-chevron { display: none; }
    .nav-dropdown-grid { grid-template-columns: 1fr; }
    .dashboard { width: min(100% - 24px, 1320px); padding-top: 22px; }
    .search-hero-compact h1 { font-size: clamp(3rem, 16vw, 4.4rem); }
    .radar-grid { grid-template-columns: 1fr; }
    .radar-card { grid-template-columns: 104px minmax(0, 1fr); }
    .settings-page,.email-page { width: min(100% - 24px, 1280px); }
    .settings-save-bar { align-items: stretch; flex-direction: column; }
    .settings-save-bar .button { width: 100%; }
    .template-list { grid-template-columns: 1fr; }
    .email-panel-header,.email-preview-header { align-items: flex-start; flex-direction: column; }
}

/* 0.9.0 content intelligence, outliers, and delivery tools */
.search-hero-compact h1 { font-size: clamp(2.8rem, 5vw, 4.65rem); line-height: .94; }
.model-route-note { display: block; min-height: 1.1em; margin-top: 7px; color: var(--ink-soft); font-size: .66rem; font-weight: 650; line-height: 1.4; }
.tool-route select[data-ai-model] { width: 100%; min-width: 0; }

.email-test-panel { display: grid; gap: 14px; margin: 0 16px 16px; border-top: 1px solid var(--line); padding: 18px 0 2px; }
.email-test-panel h3 { margin: 3px 0 5px; font-family: var(--display-font); font-size: 1.22rem; font-weight: 500; }
.email-test-panel p { margin: 0; color: var(--ink-soft); font-size: .7rem; line-height: 1.5; }
.email-test-panel .button { width: 100%; }

.reel-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.details-button,.table-details-button { border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; color: var(--ink); background: var(--card); font: inherit; font-size: .7rem; font-weight: 850; cursor: pointer; }
.details-button:hover,.table-details-button:hover { border-color: var(--teal); color: var(--teal); }
.outlier-badge { position: absolute; top: 12px; right: 12px; z-index: 3; border: 1px solid rgba(255,255,255,.7); border-radius: 999px; padding: 7px 10px; color: #fff; background: #8c3df0; box-shadow: 0 8px 24px rgba(69,22,133,.24); font-size: .68rem; font-weight: 900; }
.table-score-copy { display: grid; gap: 3px; }
.table-outlier-label { width: max-content; border-radius: 999px; padding: 2px 6px; color: #6b25b9; background: #f1e6ff; font-size: .54rem; font-weight: 900; text-transform: uppercase; }
.results-table { min-width: 1080px; }
.results-table th:last-child,.results-table td:last-child { width: 92px; text-align: center; }

.content-details-dialog { width: min(1040px, calc(100% - 28px)); max-width: none; max-height: min(92vh, 960px); margin: auto; overflow: hidden; border: 0; border-radius: 25px; padding: 0; color: var(--ink); background: var(--card); box-shadow: 0 34px 110px rgba(8,22,19,.3); }
.content-details-dialog::backdrop { background: rgba(7,20,18,.7); backdrop-filter: blur(5px); }
.details-modal-shell { display: flex; max-height: min(92vh, 960px); flex-direction: column; }
.details-modal-header,.details-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-color: var(--line); background: var(--card); }
.details-modal-header { border-bottom: 1px solid var(--line); padding: 22px 26px; }
.details-modal-header h2 { margin: 3px 0 2px; font-family: var(--display-font); font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 500; }
.details-modal-header p:last-child { margin: 0; color: var(--ink-soft); font-size: .76rem; }
.details-modal-close { width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--surface-muted); font-size: 1.5rem; cursor: pointer; }
.details-modal-body { display: grid; gap: 20px; overflow-y: auto; padding: 24px 26px 30px; }
.details-content-summary { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: stretch; gap: 20px; }
.details-media { position: relative; display: grid; min-height: 190px; place-items: center; overflow: hidden; border-radius: 18px; color: var(--lime); background: #123e36; font-family: var(--display-font); font-size: 2rem; }
.details-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.details-badges,.detail-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.details-content-summary > div:last-child > p:not(.details-method-note) { margin: 18px 0 12px; font-family: var(--display-font); font-size: clamp(1.15rem, 2.4vw, 1.6rem); line-height: 1.35; }
.details-method-note { margin: 0; color: var(--ink-soft); font-size: .67rem; line-height: 1.55; }
.detail-chip { display: inline-flex; align-items: center; min-height: 28px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; color: var(--ink-soft); background: var(--surface-muted); font-size: .62rem; font-weight: 800; }
.detail-chip.is-score { color: var(--ink); background: var(--lime); }
.details-section-heading h3,.details-panel h3 { margin: 4px 0 0; font-family: var(--display-font); font-size: 1.42rem; font-weight: 500; }
.details-score-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.details-score-card { position: relative; display: grid; min-height: 132px; align-content: start; gap: 4px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; padding: 17px 15px 20px; background: var(--surface-muted); }
.details-score-card::after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 5px; background: linear-gradient(90deg,var(--lime) var(--score),rgba(16,34,31,.1) var(--score)); }
.details-score-card strong { font-family: var(--display-font); font-size: 2rem; font-weight: 550; }
.details-score-card span { font-size: .7rem; font-weight: 900; text-transform: uppercase; }
.details-score-card small { color: var(--ink-soft); font-size: .62rem; line-height: 1.4; }
.details-outlier-callout { display: grid; gap: 5px; border: 1px solid var(--line); border-left: 5px solid var(--teal); border-radius: 15px; padding: 16px 18px; background: var(--surface-muted); }
.details-outlier-callout.is-outlier { border-left-color: #8c3df0; background: #f8f1ff; }
.details-outlier-callout strong { font-size: .82rem; }
.details-outlier-callout span { color: var(--ink-soft); font-size: .72rem; line-height: 1.5; }
.details-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.details-panel { border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: var(--card); }
.details-list { display: grid; gap: 9px; margin: 15px 0 0; padding: 0; list-style: none; }
.details-list li { position: relative; padding-left: 18px; color: var(--ink-soft); font-size: .72rem; line-height: 1.55; }
.details-list li::before { content: ''; position: absolute; top: .55em; left: 1px; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(200,240,75,.18); }
.details-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 15px; }
.details-metric-grid > div { display: grid; gap: 3px; border-radius: 12px; padding: 11px; background: var(--surface-muted); }
.details-metric-grid strong { font-size: .82rem; }
.details-metric-grid span,.details-label { color: var(--ink-soft); font-size: .56rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.details-panel .details-label { display: block; margin: 16px 0 7px; }
.monetization-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.monetization-heading > span { border-radius: 999px; padding: 8px 10px; color: #113f34; background: var(--lime); font-size: .67rem; font-weight: 900; white-space: nowrap; }
.details-modal-footer { border-top: 1px solid var(--line); padding: 15px 26px; }
.has-open-dialog { overflow: hidden; }

html[data-theme="dark"] .details-outlier-callout.is-outlier { background: rgba(140,61,240,.12); }
html[data-theme="dark"] .table-outlier-label { color: #d9b6ff; background: rgba(140,61,240,.18); }

/* 0.9.1 interaction and pagination polish */
.details-modal-close { position: relative; display: grid; place-items: center; padding: 0; font-size: 0; line-height: 1; }
.details-modal-close::before,.details-modal-close::after { content: ''; position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; border-radius: 2px; background: currentColor; transform: translate(-50%,-50%) rotate(45deg); }
.details-modal-close::after { transform: translate(-50%,-50%) rotate(-45deg); }
.details-modal-footer .button { min-width: 142px; text-decoration: none; }
.table-thumb-link { display: inline-flex; flex: 0 0 auto; border-radius: 10px; text-decoration: none; }
.table-thumb-link:focus-visible { outline: 3px solid rgba(105,213,199,.48); outline-offset: 3px; }
.table-content { display: -webkit-box; overflow: hidden; min-width: 190px; max-height: 3.15em; color: var(--ink-soft); line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.results-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: var(--surface-card); }
.results-pagination .button { min-width: 210px; }
.results-pagination .button:disabled { cursor: default; }
.results-pagination span { color: var(--ink-soft); font-size: .72rem; line-height: 1.5; }
.radar-open { color: inherit; text-decoration: none; }
.radar-copy { min-height: 0; }
.radar-card-footer { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: auto; }
.radar-card-footer .radar-metrics { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.radar-details-button { flex: 0 0 auto; min-height: 28px; border: 1px solid var(--line); border-radius: 999px; padding: 0 9px; color: var(--ink); background: var(--surface-muted); cursor: pointer; font: inherit; font-size: .62rem; font-weight: 850; line-height: 1; }
.radar-details-button:hover { border-color: var(--teal); color: var(--teal); background: var(--surface-hover); }
.notice-client-status { margin: 0 24px 18px; }
.notification-card .button,.notice-live-preview .button { align-items: center; justify-content: center; text-decoration: none; line-height: 1.1; }

@media (max-width: 820px) {
    .details-content-summary { grid-template-columns: 120px minmax(0,1fr); }
    .details-media { min-height: 140px; }
    .details-score-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .details-score-card:last-child { grid-column: 1 / -1; }
    .details-two-column { grid-template-columns: 1fr; }
    .results-pagination { align-items: stretch; flex-direction: column; text-align: center; }
    .results-pagination .button { width: 100%; }
}
@media (max-width: 620px) {
    .search-hero-compact h1 { font-size: clamp(2.65rem, 14vw, 4rem); }
    .details-modal-header,.details-modal-body,.details-modal-footer { padding-inline: 16px; }
    .details-content-summary { grid-template-columns: 1fr; }
    .details-media { min-height: 210px; }
    .details-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .details-modal-footer { align-items: stretch; flex-direction: column-reverse; }
    .details-modal-footer .button { width: 100%; }
}
