/* =====================================================================
   Fonts (loaded via <link> in App.razor)
===================================================================== */

/* =====================================================================
   Theme Tokens
===================================================================== */
:root {
    --bg: #f4efe6;
    --bg-accent: #eef2f6;
    --ink: #0e1726;
    --muted: #4b5563;
    --brand: #0f766e;
    --brand-strong: #0b5e57;
    --brand-soft: #d7f3ef;
    --sun: #f59e0b;
    --card: #ffffff;
    --border: #e4ddd2;
    --shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

:root[data-theme="dark"] {
    --bg: #0b1220;
    --bg-accent: #101827;
    --ink: #e5edf7;
    --muted: #a6b1c2;
    --brand: #5eead4;
    --brand-strong: #2dd4bf;
    --brand-soft: #17343a;
    --sun: #fbbf24;
    --card: #0f1b2e;
    --border: #1c2b42;
    --shadow: 0 18px 50px rgba(4, 12, 24, 0.35);
}

/* =====================================================================
   Base
===================================================================== */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
}

body {
    background-image:
        radial-gradient(1200px 420px at 10% -10%, rgba(15, 118, 110, 0.16), transparent 60%),
        radial-gradient(900px 420px at 110% 10%, rgba(245, 158, 11, 0.12), transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-accent) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--brand-strong);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.6);
    outline-offset: 3px;
}

:root[data-theme="dark"] a:focus-visible,
:root[data-theme="dark"] button:focus-visible,
:root[data-theme="dark"] input:focus-visible,
:root[data-theme="dark"] select:focus-visible,
:root[data-theme="dark"] textarea:focus-visible,
:root[data-theme="dark"] summary:focus-visible,
:root[data-theme="dark"] [role="button"]:focus-visible {
    outline: 3px solid rgba(94, 234, 212, 0.7);
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Fraunces", "Times New Roman", serif;
    letter-spacing: -0.01em;
    color: inherit;
}

.h1, .h2, .h3, .h4, .h5, .h6 {
    color: inherit;
}

p {
    color: var(--muted);
}

main {
    min-width: 0;
}

/* =====================================================================
   Global UI
===================================================================== */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0.75rem;
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 2000;
}

.skip-link:focus {
    left: 1rem;
    outline: 0;
}

.page-shell {
    max-width: 1200px;
    margin: 0 auto;
}

.page-shell-wide {
    max-width: 1600px;
    margin: 0 auto;
}

.ls-1 {
    letter-spacing: 0.08em;
}

:root.nav-open,
:root.nav-open body {
    overflow: hidden;
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
}

.btn-primary:hover {
    background: var(--brand-strong);
    border-color: var(--brand-strong);
}

.btn-outline-dark {
    border-color: var(--ink);
    color: var(--ink);
}

.btn-outline-dark:hover {
    background: var(--ink);
    color: #fff;
}

:root[data-theme="dark"] .btn-outline-secondary {
    color: #f8fafc;
    border-color: rgba(248, 250, 252, 0.45);
    background: rgba(15, 23, 42, 0.35);
}

:root[data-theme="dark"] .btn-outline-secondary:hover {
    color: #fff;
    border-color: rgba(248, 250, 252, 0.7);
    background: rgba(248, 250, 252, 0.12);
}

.theme-toggle {
    white-space: nowrap;
}

.text-muted {
    color: var(--muted) !important;
}

:root[data-theme="dark"] .text-primary {
    color: var(--brand) !important;
}

:root[data-theme="dark"] .bg-primary-subtle {
    background-color: rgba(94, 234, 212, 0.18) !important;
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow);
    color: var(--ink);
}

.card.compact {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.card-title {
    color: inherit;
}

.soft-card {
    background: var(--bg-accent);
    border-color: var(--border);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

:root[data-theme="dark"] .soft-card {
    background: rgba(15, 27, 46, 0.85);
}

.tile {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.tile-title {
    font-weight: 700;
    color: var(--ink);
}

.tile-text {
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    background: var(--brand-soft);
    color: var(--brand-strong);
    border: 1px solid rgba(15, 118, 110, 0.2);
}

:root[data-theme="dark"] .chip {
    background: rgba(94, 234, 212, 0.18);
    border-color: rgba(94, 234, 212, 0.35);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.82rem;
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.22);
}

.impact-card {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.35rem;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.impact-card::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(15, 118, 110, 0.12);
    right: -70px;
    top: -70px;
}

.impact-card > * {
    position: relative;
    z-index: 1;
}

.impact-value {
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    font-weight: 700;
    color: var(--ink);
}

.impact-label {
    font-weight: 700;
    margin-top: 0.15rem;
}

.impact-meta {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.impact-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-strong);
}

.section {
    margin-top: 2.2rem;
}

.dense-sections .section {
    margin-top: 1.4rem;
}

.dense-sections .section-title {
    margin-bottom: 0.6rem;
}

.dense-sections .section-subtitle {
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 1.2rem;
}

.reveal {
    opacity: 1;
    transform: none;
}

:root.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: all 0.6s ease;
}

:root.js .reveal.reveal-in {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    :root.js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* =====================================================================
   Header + Navigation
===================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
    background: rgba(244, 239, 230, 0.9);
    border-bottom: 1px solid var(--border);
}

:root[data-theme="dark"] .site-header {
    background: rgba(11, 18, 32, 0.9);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
}

.brand-block {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.brand-title {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: var(--muted);
}

.header-nav {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.header-nav a {
    font-weight: 600;
    color: var(--muted);
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.nav-toggle-top {
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 10px;
    padding: 0.35rem 0.6rem;
    color: var(--ink);
    font-weight: 600;
}

:root[data-theme="dark"] .nav-toggle-top {
    color: #fff;
    border-color: rgba(226, 232, 240, 0.35);
    background: rgba(15, 23, 42, 0.6);
}

.app-shell {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 1rem;
    min-height: calc(100vh - 72px);
}

.nav-host {
    align-self: start;
    min-width: 0;
}

.content-area {
    min-width: 0;
    padding: 1.5rem 1.25rem 3rem;
}


.app-sidebar {
    position: sticky;
    top: 88px;
    width: 260px;
    padding: 1.2rem;
    transition: transform 0.22s ease;
    z-index: 1050;
    background: #0f172a;
    color: #e6edf7;
    transform: none;
    border-radius: var(--radius-lg);
    height: fit-content;
    margin: 1.5rem 0 0 1.25rem;
}

.app-sidebar.open {
    transform: translateX(0);
}

.app-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    font-weight: 600;
}

.app-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.sidebar-name {
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: 0.01em;
}

.sidebar-role {
    font-size: 0.82rem;
    color: rgba(226, 232, 240, 0.85);
    line-height: 1.25;
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 12, 24, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.nav-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.site-footer {
    padding: 1.5rem 1.25rem 2.5rem;
    color: var(--muted);
}

/* =====================================================================
   Hero
===================================================================== */
.hero {
    position: relative;
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    background: linear-gradient(125deg, rgba(15, 118, 110, 0.15), rgba(15, 23, 42, 0.08));
    overflow: hidden;
    border: 1px solid rgba(15, 118, 110, 0.2);
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(0);
    pointer-events: none;
    z-index: 0;
}

.hero::before {
    width: 280px;
    height: 280px;
    background: rgba(15, 118, 110, 0.2);
    top: -140px;
    right: 20px;
}

.hero::after {
    width: 200px;
    height: 200px;
    background: rgba(245, 158, 11, 0.18);
    bottom: -120px;
    left: 30px;
}

.hero-grid {
    display: grid;
    gap: 1.5rem;
}

.hero-title {
    font-size: clamp(2.1rem, 3vw, 3rem);
    color: var(--ink);
    margin-bottom: 0.8rem;
}

.hero-copy {
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-panel {
    background: var(--card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 1.2rem 1.4rem;
    box-shadow: var(--shadow);
}

.hero-metrics {
    display: grid;
    gap: 0.75rem;
}

.hero-metrics .metric {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
}

.metric-label {
    font-size: 0.85rem;
    color: var(--muted);
}

@media (min-width: 992px) {
    .hero-grid {
        grid-template-columns: 1.3fr 0.7fr;
        align-items: center;
    }
}

/* =====================================================================
   Resume
===================================================================== */
.resume-container {
    max-width: 1600px;
}

.resume-inner {
    width: 100%;
}

.resume-header {
    background: var(--card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow);
}

.resume-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 0.5rem;
    width: min(560px, 100%);
    justify-items: stretch;
}

.resume-contact-grid .chip {
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
    font-size: clamp(0.74rem, 0.9vw, 0.82rem);
    padding: 0.25rem 0.55rem;
}

@media (max-width: 991.98px) {
    .resume-contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }
    .resume-contact-grid .chip {
        text-align: left;
        justify-content: flex-start;
    }
}

.sect {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.exp {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.1rem;
    margin-bottom: 1rem;
}

.exp-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.exp-title {
    font-weight: 700;
}

.exp-sub {
    color: var(--muted);
}

.exp-bullets {
    margin: 0.5rem 0 0.2rem 1.1rem;
    color: var(--muted);
}

/* One-page summary styles */
.rs-header {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.6rem;
    margin-bottom: 0.8rem;
}

.rs-name {
    font-size: 1.4rem;
    font-weight: 700;
}

.rs-grid {
    display: grid;
    gap: 1rem;
}

.rs-label {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.rs-list {
    margin: 0.4rem 0 0 1rem;
}

.rs-bullets {
    margin: 0.4rem 0 0 1rem;
}

@media (min-width: 992px) {
    .rs-grid {
        grid-template-columns: 0.45fr 1fr;
    }
}

/* =====================================================================
   Visuals
===================================================================== */
.viz-hero {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.viz-card {
    background: var(--card);
}

.viz-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.viz-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.viz-legend .legend-item.off {
    opacity: 0.5;
}

.viz-legend .legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.viz-tip {
    background: rgba(15, 23, 42, 0.95);
    color: #f8fafc;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    font-size: 0.85rem;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.35);
    max-width: 220px;
}

/* =====================================================================
   Export Dropdown
===================================================================== */
.export-dd {
    position: relative;
    display: inline-block;
}

.export-dd-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 3500;
}

.export-dd > summary {
    list-style: none;
    cursor: pointer;
}

.export-dd > summary::-webkit-details-marker {
    display: none;
}

.export-dd .menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    display: none;
    z-index: 1000;
    min-width: 220px;
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 0.25rem;
}

.export-dd[open] > .menu {
    display: block;
}

.export-dd .dropdown-item {
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    display: block;
    text-decoration: none;
    color: var(--ink);
}

.export-dd .dropdown-item:hover {
    background: var(--bg-accent);
}

.export-dd .dropdown-divider {
    margin: 0.25rem 0.5rem;
    height: 1px;
    background-color: var(--border);
}

/* =====================================================================
   Error UI
===================================================================== */
#blazor-error-ui {
    color-scheme: light only;
    background: #fff7ed;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* =====================================================================
   Visuals dashboard
===================================================================== */
.viz-shell {
    --viz-ink: #0b1220;
    --viz-muted: #5b6472;
    --viz-accent: #0ea5e9;
    --viz-accent-strong: #0284c7;
    --viz-card: #ffffff;
    --viz-border: rgba(15, 23, 42, 0.08);
    --viz-axis: #d7e2f0;
    --viz-grid: #eef2f7;
    --viz-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    position: relative;
    color: var(--viz-ink);
    padding: clamp(1rem, 2vw, 1.75rem);
    border-radius: calc(var(--radius-lg) + 4px);
    background:
        radial-gradient(1200px 420px at 6% -10%, rgba(14, 165, 233, 0.18), transparent 60%),
        radial-gradient(1000px 500px at 110% 0%, rgba(34, 197, 94, 0.16), transparent 60%),
        linear-gradient(160deg, #f8fafc 0%, #eef2ff 45%, #f8fafc 100%);
    border: 1px solid rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.viz-shell::before,
.viz-shell::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
    border-radius: 999px;
    filter: blur(0);
}

.viz-shell::before {
    width: 420px;
    height: 420px;
    top: -220px;
    left: 60px;
    background: rgba(14, 165, 233, 0.16);
}

.viz-shell::after {
    width: 320px;
    height: 320px;
    right: 40px;
    bottom: -180px;
    background: rgba(34, 197, 94, 0.16);
}

.viz-shell > * {
    position: relative;
    z-index: 1;
}

:root[data-theme="dark"] .viz-shell {
    --viz-ink: #e5edf7;
    --viz-muted: #9fb0c7;
    --viz-card: #0f1c2f;
    --viz-border: rgba(148, 163, 184, 0.22);
    --viz-axis: rgba(148, 163, 184, 0.45);
    --viz-grid: rgba(148, 163, 184, 0.18);
    --viz-shadow: 0 20px 45px rgba(4, 10, 20, 0.5);
    background:
        radial-gradient(1200px 420px at 6% -10%, rgba(14, 165, 233, 0.2), transparent 60%),
        radial-gradient(1000px 500px at 110% 0%, rgba(34, 197, 94, 0.15), transparent 60%),
        linear-gradient(160deg, #0b1220 0%, #0f1b2e 50%, #0b1220 100%);
    border-color: rgba(148, 163, 184, 0.18);
}

.viz-shell .card {
    background: var(--viz-card);
    border: 1px solid var(--viz-border);
    box-shadow: var(--viz-shadow);
    color: var(--viz-ink);
}

.viz-shell .card-title {
    font-weight: 600;
}

.viz-shell p {
    color: var(--viz-muted);
}

.viz-shell .text-muted {
    color: var(--viz-muted) !important;
}

.viz-shell .text-primary {
    color: var(--viz-accent-strong) !important;
}

.viz-hero {
    display: block;
    margin-bottom: 1.5rem;
}

.viz-hero-grid {
    display: grid;
    gap: 1.2rem;
}

.viz-hero-card {
    background: linear-gradient(135deg, #0b1220 0%, #112544 55%, #0c1830 100%);
    color: #f8fafc;
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.35rem);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(3, 7, 18, 0.45);
    position: relative;
    overflow: hidden;
}

.viz-hero-card::after {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.22);
    top: -120px;
    right: 30px;
}

.viz-hero-title {
    font-size: clamp(2rem, 3vw, 3rem);
    margin: 0.5rem 0 0.75rem;
}

.viz-hero-copy {
    color: rgba(246, 250, 255, 0.96);
    font-size: 1.05rem;
}

:root[data-theme="light"] .viz-hero-copy {
    color: rgba(248, 251, 255, 0.98);
    text-shadow: 0 1px 2px rgba(4, 12, 24, 0.25);
}

.viz-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.2rem;
}

.viz-hero-chips .chip {
    background: rgba(255, 255, 255, 0.12);
    color: #e2f3ff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.viz-hero-card .tag {
    background: rgba(14, 165, 233, 0.2);
    color: #e2f6ff;
    border: 1px solid rgba(14, 165, 233, 0.35);
}

.viz-hero-metrics {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.4rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.hero-stat {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.85rem;
}

.hero-stat .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(226, 232, 240, 0.7);
}

.hero-stat .value {
    font-size: 1.35rem;
    font-weight: 700;
}

.hero-stat .meta {
    font-size: 0.75rem;
    color: rgba(226, 232, 240, 0.75);
}

.viz-hero-aside {
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.35rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

:root[data-theme="dark"] .viz-hero-aside {
    background: rgba(15, 23, 42, 0.82);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--viz-muted);
}

.pill {
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(14, 165, 233, 0.14);
    color: #0369a1;
    border: 1px solid rgba(14, 165, 233, 0.35);
}

:root[data-theme="dark"] .pill {
    color: #7dd3fc;
    background: rgba(14, 165, 233, 0.18);
}

.pulse-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.pulse-item {
    border-radius: var(--radius-md);
    padding: 0.65rem 0.75rem;
    border: 1px dashed var(--viz-border);
    background: rgba(255, 255, 255, 0.7);
}

:root[data-theme="dark"] .pulse-item {
    background: rgba(15, 23, 42, 0.6);
}

.pulse-item .label {
    font-size: 0.8rem;
    color: var(--viz-muted);
}

.pulse-item .value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--viz-ink);
}

.pulse-item .meta {
    font-size: 0.72rem;
    color: var(--viz-muted);
}

.pulse-footer {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--viz-border);
    display: grid;
    gap: 0.6rem;
}

.pulse-note {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--viz-muted);
}

.pulse-note strong {
    color: var(--viz-ink);
}

.viz-control {
    border-left: 4px solid rgba(14, 165, 233, 0.45);
}

.viz-shell .form-select {
    border-radius: 10px;
    border-color: var(--viz-border);
    background-color: rgba(255, 255, 255, 0.95);
}

:root[data-theme="dark"] .viz-shell .form-select {
    background-color: rgba(15, 23, 42, 0.8);
    color: var(--viz-ink);
}

.viz-shell .viz-card {
    border-radius: var(--radius-lg);
}

.viz-kpi .tile {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%);
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.viz-shell .table {
    font-size: 0.9rem;
}

.viz-shell .table thead th {
    border-bottom: 1px solid var(--viz-border);
}

.viz-loading {
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--viz-muted);
}

.viz-shell [data-viz-type].muted {
    opacity: 0.35;
    filter: saturate(0.6);
}

.viz-shell [data-viz-type].em {
    opacity: 1;
    filter: none;
}

@media (min-width: 992px) {
    .viz-hero-grid {
        grid-template-columns: 1.35fr 0.85fr;
    }
}

@media (max-width: 991.98px) {
    .viz-hero-card::after {
        width: 180px;
        height: 180px;
        top: -100px;
    }
}

/* =====================================================================
   Responsive tweaks
===================================================================== */
@media (max-width: 767.98px) {
    .header-nav {
        display: none;
    }

    .content-area {
        padding: 1.1rem 1rem 2.5rem;
    }
}

@media (min-width: 992px) {
    .nav-overlay {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .app-shell {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .nav-host {
        min-width: 0;
    }

    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(86vw, 280px);
        transform: translateX(-100%);
        border-radius: 0;
        margin: 0;
    }
}

@media (max-width: 767.98px) {
    #velocity-stack-chart .d3-axis-x text {
        text-anchor: end;
        transform: translateX(-8px) translateY(8px) rotate(-45deg);
    }
}
