:root {
    --navy-1000: #03122d;
    --navy-950: #071f4c;
    --navy-900: #0a2c67;
    --blue-700: #075fd0;
    --blue-600: #0b7fe8;
    --cyan-500: #10a8dc;
    --teal-500: #18c4b5;
    --teal-300: #76dfd5;
    --ink: #10233f;
    --muted: #6a7a91;
    --line: rgba(13, 48, 93, .11);
    --surface: rgba(255, 255, 255, .86);
    --surface-solid: #ffffff;
    --good: #0f9f75;
    --warn: #d68b11;
    --poor: #d34747;
    --shadow-lg: 0 28px 80px rgba(8, 37, 84, .14);
    --shadow-md: 0 16px 42px rgba(8, 37, 84, .09);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #eef5fb; }
body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background:
        radial-gradient(circle at 4% 8%, rgba(11,127,232,.11), transparent 28%),
        radial-gradient(circle at 92% 18%, rgba(24,196,181,.12), transparent 30%),
        linear-gradient(180deg, #f7fbff 0%, #eef5fb 48%, #f8fbfd 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }

.page-atmosphere { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.atmosphere-orb { position: absolute; border-radius: 999px; filter: blur(8px); opacity: .55; }
.atmosphere-orb-one { width: 460px; height: 460px; left: -220px; top: 100px; background: rgba(7,95,208,.09); }
.atmosphere-orb-two { width: 520px; height: 520px; right: -260px; top: 420px; background: rgba(24,196,181,.09); }
.mesh-line { position: absolute; width: 540px; height: 1px; background: linear-gradient(90deg, transparent, rgba(7,95,208,.16), rgba(24,196,181,.18), transparent); transform: rotate(-15deg); }
.mesh-line-one { right: -60px; top: 150px; }
.mesh-line-two { left: -120px; bottom: 260px; transform: rotate(16deg); }

.app-shell { position: relative; width: min(100% - 34px, 1540px); margin: 0 auto; padding: 18px 0 32px; }
.app-header {
    position: sticky;
    top: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 96px;
    padding: 14px 18px;
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 24px;
    background: rgba(250,253,255,.82);
    box-shadow: 0 14px 42px rgba(8,37,84,.09);
    backdrop-filter: blur(20px);
}
.brand { display: inline-flex; align-items: center; min-width: 0; text-decoration: none; }
.brand-logo { display: block; width: 270px; max-width: 100%; height: 68px; object-fit: contain; object-position: left center; }
.header-actions, .header-status-cluster { display: flex; align-items: center; gap: 12px; }
.header-status-cluster { gap: 8px; }
.device-status, .source-chip, .header-clock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #43546b;
    background: rgba(255,255,255,.8);
    font-size: 12px;
    font-weight: 800;
}
.source-chip { color: var(--blue-700); background: rgba(7,95,208,.06); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(148,163,184,.13); background: #94a3b8; }
.status-dot.online { background: var(--good); box-shadow: 0 0 0 4px rgba(15,159,117,.13); }
.status-dot.offline { background: #94a3b8; }
.header-clock { color: var(--navy-900); }
.refresh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--blue-700), var(--cyan-500));
    box-shadow: 0 10px 24px rgba(7,95,208,.22);
    font-size: 12px;
    font-weight: 900;
}
.refresh-button:hover { transform: translateY(-1px); }
.refresh-button:disabled { opacity: .65; cursor: wait; }
.refresh-button.refreshing .refresh-icon { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.dashboard { display: grid; gap: 22px; margin-top: 22px; }
.hero-panel, .home-overview-panel, .environment-panel, .insights-panel, .trends-panel {
    border: 1px solid rgba(255,255,255,.82);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
}
.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
    gap: 34px;
    align-items: stretch;
    padding: 34px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}
.hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(7,95,208,.035), transparent 54%, rgba(24,196,181,.045));
    pointer-events: none;
}
.hero-copy, .hero-score-card { position: relative; z-index: 1; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 10px 4px; }
.hero-kicker-row { display: flex; align-items: center; gap: 12px; }
.section-eyebrow { margin: 0 0 9px; color: var(--blue-700); font-size: 11px; font-weight: 950; letter-spacing: .15em; text-transform: uppercase; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 9px; padding: 5px 9px; border-radius: 999px; color: var(--good); background: rgba(15,159,117,.09); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.live-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(15,159,117,.12); }
.hero-copy h1 { max-width: 820px; margin: 0; color: var(--navy-950); font-size: clamp(42px, 5vw, 72px); line-height: .98; letter-spacing: -.055em; }
.hero-description { max-width: 820px; margin: 22px 0 0; color: var(--muted); font-size: 17px; line-height: 1.68; }
.hero-status-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 26px; }
.api-message { color: var(--navy-900); font-size: 13px; font-weight: 850; }
.last-updated { margin: 0; color: var(--muted); font-size: 12px; }
.hero-feature-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero-feature-row span { padding: 7px 10px; border: 1px solid rgba(7,95,208,.09); border-radius: 999px; color: #52647b; background: rgba(255,255,255,.66); font-size: 11px; font-weight: 800; }

.hero-score-card {
    display: grid;
    justify-items: center;
    align-content: start;
    min-height: 370px;
    padding: 26px;
    border-radius: 26px;
    color: white;
    background:
        radial-gradient(circle at 78% 18%, rgba(24,196,181,.28), transparent 30%),
        linear-gradient(150deg, #0b3476 0%, #071f4c 58%, #03122d 100%);
    box-shadow: 0 22px 55px rgba(3,18,45,.24);
    overflow: visible;
}
.score-card-heading { width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.hero-score-card .section-eyebrow { color: var(--teal-300); }
.score-card-caption { margin: 0; color: rgba(255,255,255,.62); font-size: 12px; }
.score-ring {
    --score: 0;
    display: grid;
    place-items: center;
    width: 232px;
    aspect-ratio: 1;
    margin: 12px auto 8px;
    border-radius: 50%;
    background: conic-gradient(var(--score-color, var(--teal-500)) calc(var(--score) * 1%), rgba(255,255,255,.10) 0);
    position: relative;
    filter: drop-shadow(0 16px 34px rgba(0,0,0,.20));
}
.score-ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: linear-gradient(160deg, #0a2c67, #041734); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.score-ring-inner { position: relative; z-index: 1; display: grid; justify-items: center; }
.score-value { font-size: 76px; line-height: .9; font-weight: 850; letter-spacing: -.07em; }
.score-scale { margin-top: 9px; color: rgba(255,255,255,.60); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.status-pill { min-width: 105px; padding: 8px 13px; border-radius: 999px; text-align: center; font-size: 11px; font-weight: 950; }
.status-pill.good { color: #bffbe8; background: rgba(15,159,117,.24); }
.status-pill.warn { color: #ffe1a5; background: rgba(214,139,17,.25); }
.status-pill.poor { color: #ffd0d0; background: rgba(211,71,71,.24); }
.status-pill.neutral { color: rgba(255,255,255,.74); background: rgba(255,255,255,.10); }
.score-range-guide {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    margin-top: 12px;
}
.score-range {
    min-width: 0;
    padding: 10px 8px 9px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;
    background: rgba(255,255,255,.05);
    opacity: .50;
    transform: translateY(0);
    transition: opacity .25s ease, transform .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.score-range.active {
    opacity: 1;
    transform: translateY(-2px);
    border-color: rgba(255,255,255,.28);
    background: rgba(255,255,255,.13);
}
.score-range-label {
    display: block;
    overflow: hidden;
    color: #ffffff;
    font-size: 9px;
    font-weight: 950;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: .07em;
}
.score-range-values {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.60);
    font-size: 9px;
    font-weight: 800;
}
.score-range-poor { box-shadow: inset 0 3px 0 rgba(211,71,71,.92); }
.score-range-fair { box-shadow: inset 0 3px 0 rgba(214,139,17,.95); }
.score-range-good { box-shadow: inset 0 3px 0 rgba(46,181,139,.95); }
.score-range-excellent { box-shadow: inset 0 3px 0 rgba(118,223,213,.98); }
.score-meaning {
    width: 100%;
    min-height: 34px;
    margin: 11px 0 0;
    color: rgba(255,255,255,.66);
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

.environment-overview { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(360px, .8fr); gap: 22px; }
.environment-panel { border-radius: var(--radius-xl); padding: 28px; }
.panel-heading-row, .section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.panel-heading-row h2, .section-heading h2 { margin: 0; color: var(--navy-950); font-size: clamp(24px, 2.3vw, 34px); letter-spacing: -.035em; }
.panel-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.panel-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 999px; color: var(--blue-700); background: rgba(7,95,208,.08); font-size: 10px; font-weight: 950; text-transform: uppercase; letter-spacing: .09em; }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.panel-badge-external { color: #078477; background: rgba(24,196,181,.10); }
.metric-grid { display: grid; gap: 13px; margin-top: 22px; }
.metric-grid-indoor { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(155deg, rgba(255,255,255,.98), rgba(246,250,253,.94));
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .28s ease;
}
.metric-card:hover { transform: translateY(-2px); border-color: rgba(13,147,223,.25); box-shadow: 0 15px 30px rgba(8,37,84,.08); }
.metric-card-primary { background: linear-gradient(145deg, rgba(7,95,208,.08), rgba(24,196,181,.08)); }

/* v1.14.0: calm severity tinting for room-specific metric cards. */
.metric-card.severity-excellent {
    background: linear-gradient(145deg, rgba(128,222,207,.16), rgba(232,250,247,.72));
    border-color: rgba(52,184,164,.24);
}
.metric-card.severity-good {
    background: linear-gradient(145deg, rgba(119,188,245,.13), rgba(238,247,255,.76));
    border-color: rgba(89,154,214,.22);
}
.metric-card.severity-fair {
    background: linear-gradient(145deg, rgba(246,196,91,.15), rgba(255,249,232,.78));
    border-color: rgba(214,158,40,.23);
}
.metric-card.severity-poor {
    background: linear-gradient(145deg, rgba(242,151,78,.15), rgba(255,242,232,.78));
    border-color: rgba(210,111,37,.24);
}
.metric-card.severity-verypoor {
    background: linear-gradient(145deg, rgba(226,101,101,.15), rgba(255,238,238,.80));
    border-color: rgba(193,72,72,.24);
}
.metric-card.severity-neutral {
    background: linear-gradient(155deg, rgba(255,255,255,.98), rgba(246,250,253,.94));
}
.metric-card.severity-excellent .metric-icon { color: #138b7e; background: rgba(32,172,151,.10); }
.metric-card.severity-good .metric-icon { color: #2f72ae; background: rgba(71,145,213,.10); }
.metric-card.severity-fair .metric-icon { color: #9b6a08; background: rgba(214,158,40,.11); }
.metric-card.severity-poor .metric-icon { color: #ad5b19; background: rgba(210,111,37,.11); }
.metric-card.severity-verypoor .metric-icon { color: #b54444; background: rgba(193,72,72,.11); }
.metric-card.severity-excellent .metric-description { color: #287f74; }
.metric-card.severity-good .metric-description { color: #4a7195; }
.metric-card.severity-fair .metric-description { color: #916b22; }
.metric-card.severity-poor .metric-description { color: #a05b27; }
.metric-card.severity-verypoor .metric-description { color: #a64a4a; }
.metric-card-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 850; }

.metric-label-with-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}
.metric-help {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    padding: 0;
    border: 1px solid rgba(7,95,208,.18);
    border-radius: 50%;
    color: var(--blue-700);
    background: rgba(7,95,208,.07);
    font-size: 10px;
    font-weight: 950;
    line-height: 1;
    cursor: help;
}
.metric-help:hover,
.metric-help:focus-visible {
    color: #ffffff;
    border-color: var(--blue-700);
    background: var(--blue-700);
    outline: none;
}
.metric-tooltip {
    position: absolute;
    left: 0;
    bottom: calc(100% + 12px);
    z-index: 40;
    width: min(280px, calc(100vw - 56px));
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 13px;
    color: #ffffff;
    background: rgba(3,18,45,.97);
    box-shadow: 0 15px 34px rgba(3,18,45,.24);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.55;
    opacity: 0;
    pointer-events: none;
    transform: translateY(5px);
    transition: opacity .18s ease, transform .18s ease;
}
.metric-tooltip::after {
    content: "";
    position: absolute;
    left: 20px;
    top: 100%;
    border: 7px solid transparent;
    border-top-color: rgba(3,18,45,.97);
}
.metric-help:hover + .metric-tooltip,
.metric-help:focus + .metric-tooltip,
.metric-help:focus-visible + .metric-tooltip,
.metric-label-with-help:hover .metric-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.metric-help[aria-expanded="true"] + .metric-tooltip {
    opacity: 1;
    transform: translateY(0);
}
.metric-icon { display: inline-grid; place-items: center; min-width: 38px; height: 30px; padding: 0 8px; border-radius: 10px; color: var(--blue-700); background: rgba(7,95,208,.07); font-size: 10px; font-weight: 950; }
.metric-reading { display: flex; align-items: baseline; gap: 7px; margin-top: 16px; color: var(--navy-950); }
.metric-reading > span:first-child { font-size: clamp(31px, 3vw, 45px); line-height: 1; font-weight: 850; letter-spacing: -.055em; }
.metric-unit { color: var(--muted); font-size: 11px; font-weight: 750; }
.metric-description { margin: 10px 0 0; color: var(--muted); font-size: 12px; }

.outdoor-panel { background: radial-gradient(circle at 88% 18%, rgba(24,196,181,.32), transparent 28%), linear-gradient(155deg, rgba(7,95,208,.98), rgba(6,26,58,.99)); color: white; position: relative; overflow: hidden; }
.outdoor-panel::after { content: ""; position: absolute; width: 290px; height: 290px; border: 1px solid rgba(118,223,213,.22); border-radius: 50%; right: -105px; top: 130px; box-shadow: 0 0 0 50px rgba(118,223,213,.04), 0 0 0 100px rgba(118,223,213,.03); }
.outdoor-panel .section-eyebrow { color: var(--teal-300); }
.outdoor-panel h2 { color: white; }
.outdoor-panel .panel-subtitle { color: rgba(255,255,255,.60); }
.outdoor-aqi-card { margin-top: 24px; min-height: 164px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px; border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-lg); background: rgba(255,255,255,.08); backdrop-filter: blur(10px); position: relative; z-index: 1; }
.outdoor-label { margin: 0 0 8px; color: rgba(255,255,255,.68); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .13em; }
.outdoor-aqi-reading { display: flex; align-items: center; gap: 14px; }
#outdoorAqi { font-size: 76px; line-height: .9; font-weight: 850; letter-spacing: -.075em; }
.aqi-category { padding: 8px 11px; border-radius: 999px; background: rgba(255,255,255,.13); font-size: 11px; font-weight: 950; }
.aqi-category.good { color: #bffbe8; background: rgba(15,159,117,.25); }
.aqi-category.moderate { color: #ffe2a4; background: rgba(214,139,17,.25); }
.aqi-category.poor { color: #ffd0d0; background: rgba(211,71,71,.25); }
.aqi-orbit { width: 88px; height: 88px; border: 1px solid rgba(118,223,213,.34); border-radius: 50%; position: relative; }
.aqi-orbit::before, .aqi-orbit::after { content: ""; position: absolute; inset: 15px; border: 1px solid rgba(118,223,213,.25); border-radius: 50%; }
.aqi-orbit::after { inset: 31px; background: var(--teal-500); border: 0; box-shadow: 0 0 26px rgba(24,196,181,.78); }
.aqi-orbit span { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--teal-300); }
.aqi-orbit span:nth-child(1) { top: 4px; left: 40px; } .aqi-orbit span:nth-child(2) { right: 2px; bottom: 22px; } .aqi-orbit span:nth-child(3) { left: 7px; bottom: 11px; }
.outdoor-details { margin: 16px 0; position: relative; z-index: 1; }
.outdoor-details > div { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 13px 2px; border-bottom: 1px solid rgba(255,255,255,.11); }
.outdoor-details dt { color: rgba(255,255,255,.60); font-size: 11px; }
.outdoor-details dd { margin: 0; max-width: 210px; text-align: right; font-size: 12px; font-weight: 900; }
.comparison-card { display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; padding: 16px; border-radius: 18px; background: rgba(255,255,255,.09); position: relative; z-index: 1; }
.comparison-card.good { background: rgba(15,159,117,.22); } .comparison-card.warn { background: rgba(214,139,17,.22); }
.comparison-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 12px; background: rgba(255,255,255,.12); }
.comparison-label { margin: 0 0 4px; color: rgba(255,255,255,.60); font-size: 9px; text-transform: uppercase; font-weight: 950; letter-spacing: .12em; }
#environmentComparisonText { margin: 0; font-size: 12px; line-height: 1.55; }

.insights-panel, .trends-panel { border-radius: var(--radius-xl); padding: 28px; }
.section-description { max-width: 520px; margin: 3px 0 0; color: var(--muted); line-height: 1.55; text-align: right; font-size: 13px; }
.insights-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 14px; margin-top: 22px; }
.supporting-insights { display: grid; gap: 12px; }
.insight-card { display: flex; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; }
.insight-featured { min-height: 100%; padding: 26px; background: linear-gradient(145deg, rgba(7,95,208,.06), rgba(24,196,181,.06)); }
.insight-indicator { width: 5px; flex: 0 0 5px; border-radius: 999px; background: #94a3b8; }
.insight-good .insight-indicator { background: var(--good); } .insight-moderate .insight-indicator { background: var(--warn); } .insight-warning .insight-indicator { background: var(--poor); }
.insight-content { min-width: 0; flex: 1; }
.insight-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.insight-category { margin: 0; color: var(--blue-700); font-size: 9px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.insight-status { color: var(--muted); font-size: 10px; font-weight: 850; }
.insight-card h3 { margin: 13px 0 7px; color: var(--navy-950); font-size: 20px; letter-spacing: -.025em; }
.insight-featured h3 { font-size: 28px; }
.insight-message, .insights-empty { margin: 0; color: var(--muted); line-height: 1.62; font-size: 13px; }

.trend-heading { align-items: center; }
.chart-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.chart-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.control-group { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: #eef3f8; }
.control-button { border: 0; border-radius: 10px; padding: 8px 11px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 850; }
.control-button:hover { color: var(--navy-900); background: rgba(255,255,255,.72); }
.control-button.active { color: white; background: var(--navy-900); box-shadow: 0 5px 12px rgba(8,37,84,.18); }
.chart-frame { margin-top: 20px; min-height: 330px; padding: 10px 8px 4px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(180deg, #fbfdff, #f8fbfd); }
#trendChart { display: block; width: 100%; height: 300px; }
.app-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 8px 0; color: var(--muted); font-size: 11px; }
.app-footer strong { color: var(--navy-900); }

@media (max-width: 1120px) {
    .environment-overview { grid-template-columns: 1fr; }
    .metric-grid-indoor { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .app-shell { width: min(100% - 22px, 1540px); padding-top: 11px; }
    .app-header { position: static; align-items: flex-start; }
    .brand-logo { width: 220px; height: 58px; }
    .header-actions { flex-wrap: wrap; justify-content: flex-end; }
    .source-chip, .header-clock { display: none; }
    .hero-panel { grid-template-columns: 1fr; }
    .hero-score-card { min-height: 330px; }
    .metric-grid-indoor { grid-template-columns: repeat(2, 1fr); }
    .section-heading, .trend-heading { flex-direction: column; }
    .section-description { text-align: left; }
    .chart-controls { justify-content: flex-start; }
    .insights-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .app-header { flex-direction: column; }
    .header-actions { width: 100%; justify-content: space-between; }
    .header-status-cluster { min-width: 0; }
    .device-status { max-width: calc(100vw - 170px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hero-panel, .home-overview-panel, .environment-panel, .insights-panel, .trends-panel { padding: 20px; border-radius: 22px; }
    .hero-copy h1 { font-size: 42px; }
    .hero-feature-row { display: none; }
    .hero-score-card { min-height: 300px; padding: 20px; }
    .score-ring { width: 205px; }
    .score-range-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .score-meaning { text-align: left; }
    .metric-grid-indoor { grid-template-columns: 1fr; }
    .outdoor-aqi-reading { align-items: flex-start; flex-direction: column; gap: 8px; }
    #outdoorAqi { font-size: 64px; }
    .aqi-orbit { display: none; }
    .outdoor-details dd { max-width: 160px; }
    .chart-controls { width: 100%; }
    .control-group { width: 100%; overflow-x: auto; }
    .app-footer { flex-direction: column; }
}


/* AirMesh Dashboard v1.1 — Whole-home concept */
.home-overview-panel {
    padding: 28px;
    border: 1px solid rgba(255,255,255,.82);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
}
.home-overview-heading { align-items: center; }
.home-device-summary {
    display: grid;
    justify-items: end;
    padding: 12px 15px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.72);
}
.summary-value { color: var(--navy-950); font-size: 25px; line-height: 1; font-weight: 900; }
.summary-label { margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.room-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-top: 22px; }
.room-card {
    min-height: 215px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(155deg, rgba(255,255,255,.98), rgba(246,250,253,.94));
    position: relative;
    overflow: hidden;
}
.room-card-live {
    color: white;
    border-color: transparent;
    background: radial-gradient(circle at 82% 18%, rgba(24,196,181,.30), transparent 34%), linear-gradient(150deg, #0b3476 0%, #071f4c 62%, #03122d 100%);
    box-shadow: 0 18px 40px rgba(3,18,45,.18);
}
.room-card-placeholder { border-style: dashed; }
.room-card-placeholder::after { content:""; position:absolute; width:120px; height:120px; right:-44px; bottom:-48px; border-radius:50%; border:1px solid rgba(7,95,208,.09); box-shadow:0 0 0 24px rgba(7,95,208,.025); }
.room-card-topline { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.room-icon { display:grid; place-items:center; width:38px; height:38px; border-radius:13px; color:var(--blue-700); background:rgba(7,95,208,.08); font-size:10px; font-weight:950; letter-spacing:.08em; }
.room-card-live .room-icon { color:var(--teal-300); background:rgba(255,255,255,.10); }
.room-state { padding:6px 9px; border-radius:999px; color:var(--muted); background:#eef3f8; font-size:9px; font-weight:950; text-transform:uppercase; letter-spacing:.08em; }
.room-state-online { display:inline-flex; align-items:center; gap:6px; color:#bffbe8; background:rgba(15,159,117,.24); }
.room-state-online i { width:6px; height:6px; border-radius:50%; background:var(--teal-300); box-shadow:0 0 0 3px rgba(118,223,213,.13); }
.room-card-content { position:relative; z-index:1; margin-top:20px; }
.room-label { margin:0; color:var(--navy-950); font-size:18px; font-weight:900; letter-spacing:-.025em; }
.room-card-live .room-label { color:white; }
.room-score-row { display:flex; align-items:baseline; gap:9px; margin-top:14px; }
.room-score { color:#ffffff; font-size:54px; line-height:.9; font-weight:850; letter-spacing:-.06em; }
.room-score-scale { color:rgba(255,255,255,.60); font-size:10px; font-weight:850; text-transform:uppercase; letter-spacing:.08em; }
.room-description { margin:13px 0 0; color:var(--muted); font-size:11px; line-height:1.55; }
.room-card-live .room-description { color:rgba(255,255,255,.65); }
.room-placeholder-mark { display:grid; place-items:center; width:42px; height:42px; margin-top:18px; border:1px dashed rgba(7,95,208,.26); border-radius:14px; color:var(--blue-700); background:rgba(7,95,208,.04); font-size:24px; font-weight:500; }
.whole-home-preview { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-top:16px; padding:17px 18px; border-radius:18px; background:linear-gradient(115deg, rgba(7,95,208,.06), rgba(24,196,181,.07)); }
.whole-home-preview p:last-child { margin:4px 0 0; color:var(--muted); font-size:12px; line-height:1.55; }
.preview-chip { flex:0 0 auto; padding:8px 11px; border-radius:999px; color:#078477; background:rgba(24,196,181,.12); font-size:10px; font-weight:950; text-transform:uppercase; letter-spacing:.08em; }

@media (max-width:1120px) { .room-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:700px) {
    .home-overview-heading { align-items:flex-start; }
    .home-device-summary { justify-items:start; }
    .room-grid { grid-template-columns:1fr; }
    .whole-home-preview { align-items:flex-start; flex-direction:column; }
}


.index-explainer { margin-top:14px; }
.index-info-button {
    display:inline-flex; align-items:center; gap:8px; padding:0; border:0;
    color:rgba(255,255,255,.84); background:transparent; font:inherit;
    font-size:12px; font-weight:850; cursor:pointer;
}
.index-info-button:hover, .index-info-button:focus-visible { color:#fff; outline:none; }
.index-info-icon {
    display:inline-grid; place-items:center; width:19px; height:19px;
    border:1px solid rgba(255,255,255,.28); border-radius:50%;
    font-size:11px; font-weight:950;
}
.index-info-panel {
    margin-top:10px; padding:13px 14px; border:1px solid rgba(255,255,255,.13);
    border-radius:14px; background:rgba(255,255,255,.07);
    color:rgba(255,255,255,.88); font-size:11px; line-height:1.55;
}
.index-info-panel p { margin:0; }
.index-info-panel p + p { margin-top:8px; }
.index-current-formula { color:rgba(255,255,255,.68); }
.score-breakdown {
    margin-top:12px; border:1px solid rgba(255,255,255,.13);
    border-radius:15px; background:rgba(2,15,40,.22); overflow:hidden;
}
.score-breakdown summary {
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:13px 14px; color:#fff; font-size:12px; font-weight:900;
    cursor:pointer; list-style:none;
}
.score-breakdown summary::-webkit-details-marker { display:none; }
.score-breakdown-chevron { transition:transform .18s ease; }
.score-breakdown[open] .score-breakdown-chevron { transform:rotate(180deg); }
.score-breakdown-content { padding:0 14px 14px; }
.score-breakdown-intro {
    margin:0 0 10px; color:rgba(255,255,255,.66);
    font-size:11px; line-height:1.45;
}
.score-factor-list { display:grid; gap:7px; }
.score-factor {
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:8px 9px; border-radius:10px; background:rgba(255,255,255,.06);
}
.score-factor-name { color:rgba(255,255,255,.84); font-size:11px; font-weight:750; }
.score-factor-status {
    flex:0 0 auto; padding:4px 7px; border-radius:999px;
    font-size:9px; font-weight:950; letter-spacing:.02em;
}
.score-factor-status.good { color:#bdfbe8; background:rgba(29,190,139,.17); }
.score-factor-status.fair { color:#ffe6a6; background:rgba(244,174,40,.17); }
.score-factor-status.poor { color:#ffd0d0; background:rgba(229,76,76,.18); }
.score-factor-status.neutral { color:rgba(255,255,255,.72); background:rgba(255,255,255,.09); }
.largest-score-impact {
    margin-top:10px; padding:10px 11px; border-left:3px solid var(--teal-300);
    border-radius:0 10px 10px 0; background:rgba(255,255,255,.06);
    color:rgba(255,255,255,.84); font-size:10px; font-weight:700; line-height:1.45;
}

.hero-score-card .index-explainer,
.hero-score-card .score-breakdown {
    width: 100%;
}


/* AirMesh Dashboard v1.4.0 — Refined hero presentation */
.hero-panel {
    grid-template-columns: minmax(0, 1.08fr) minmax(460px, .92fr);
    gap: clamp(34px, 4vw, 68px);
    padding: clamp(34px, 4vw, 58px);
    align-items: center;
}
.hero-panel::after {
    content: "";
    position: absolute;
    left: 2%;
    top: 16%;
    width: 54%;
    height: 70%;
    opacity: .42;
    pointer-events: none;
    background:
        radial-gradient(circle at 10% 20%, rgba(24,196,181,.12) 0 2px, transparent 3px),
        radial-gradient(circle at 82% 32%, rgba(7,95,208,.12) 0 2px, transparent 3px),
        radial-gradient(circle at 62% 75%, rgba(24,196,181,.10) 0 2px, transparent 3px);
}
.hero-copy {
    justify-content: center;
    padding: 8px 0;
}
.hero-kicker-row {
    gap: 10px;
    margin-bottom: 20px;
}
.hero-kicker-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(7,95,208,.08);
    border-radius: 14px;
    color: var(--blue-700);
    background: rgba(255,255,255,.82);
    box-shadow: 0 10px 24px rgba(7,31,76,.08);
    font-size: 22px;
    font-weight: 800;
}
.hero-kicker-row .section-eyebrow,
.hero-kicker-row .live-pill {
    margin-bottom: 0;
}
.hero-copy h1 {
    max-width: 760px;
    font-size: clamp(46px, 5.1vw, 78px);
    line-height: .98;
    letter-spacing: -.058em;
}
.hero-copy h1 span {
    display: inline-block;
}
.hero-accent-line {
    width: 48px;
    height: 4px;
    margin-top: 26px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--teal-500), #7be6da);
}
.hero-description {
    max-width: 650px;
    margin-top: 24px;
    font-size: 16px;
    line-height: 1.62;
}
.hero-status-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(150px, .45fr);
    align-items: center;
    gap: 18px;
    max-width: 660px;
    margin-top: 28px;
    padding: 18px 20px;
    border: 1px solid rgba(7,95,208,.08);
    border-radius: 18px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 14px 34px rgba(8,37,84,.08);
}
.hero-status-primary,
.hero-status-time {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}
.hero-status-icon,
.hero-time-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 900;
}
.hero-status-icon {
    color: #0f9f75;
    background: rgba(15,159,117,.11);
}
.hero-time-icon {
    color: var(--blue-700);
    background: rgba(7,95,208,.08);
}
.hero-status-divider {
    width: 1px;
    height: 44px;
    background: rgba(8,37,84,.10);
}
.hero-status-card .api-message {
    line-height: 1.42;
}
.hero-time-label {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.hero-status-card .last-updated {
    margin-top: 3px;
    color: var(--navy-900);
    font-weight: 800;
    line-height: 1.3;
}
.hero-feature-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 720px;
    margin-top: 18px;
}
.hero-feature-card {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 74px;
    padding: 14px;
    border: 1px solid rgba(7,95,208,.07);
    border-radius: 17px;
    background: rgba(255,255,255,.72);
    box-shadow: 0 10px 24px rgba(8,37,84,.045);
}
.hero-feature-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    font-size: 18px;
    font-weight: 950;
}
.feature-live { color:#126bd7; background:rgba(18,107,215,.10); }
.feature-context { color:#0f9f91; background:rgba(15,159,145,.11); }
.feature-trend { color:#7a47d5; background:rgba(122,71,213,.10); }
.hero-feature-card strong {
    display: block;
    color: var(--navy-900);
    font-size: 11px;
    line-height: 1.25;
}
.hero-feature-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.35;
}
@media (max-width: 1120px) {
    .hero-panel {
        grid-template-columns: 1fr;
    }
    .hero-copy {
        max-width: 820px;
    }
}
@media (max-width: 700px) {
    .hero-kicker-icon {
        display: none;
    }
    .hero-copy h1 {
        font-size: clamp(42px, 13vw, 58px);
    }
    .hero-status-card {
        grid-template-columns: 1fr;
    }
    .hero-status-divider {
        width: 100%;
        height: 1px;
    }
    .hero-feature-row {
        grid-template-columns: 1fr;
    }
}




/* AirMesh Dashboard v1.4.2 — Corrected animated brand mesh */
.app-header {
    min-height: 164px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.brand {
    display: inline-flex;
    align-items: center;
    overflow: visible;
    flex: 0 0 auto;
}

.brand-logo-stage {
    position: relative;
    display: block;
    width: 360px;
    aspect-ratio: 937 / 442;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 3px;
}

.brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: fill;
    object-position: center;
}

.brand-mesh-animation {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.mesh-pulse {
    fill: #25d4c6;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: airmeshMeshBreathe 5.2s ease-in-out infinite;
}

.mesh-pulse-1  { animation-delay: -4.8s; }
.mesh-pulse-2  { animation-delay: -3.9s; }
.mesh-pulse-3  { animation-delay: -3.1s; }
.mesh-pulse-4  { animation-delay: -2.3s; }
.mesh-pulse-5  { animation-delay: -1.5s; }
.mesh-pulse-6  { animation-delay: -.7s; }
.mesh-pulse-7  { animation-delay: -4.4s; }
.mesh-pulse-8  { animation-delay: -3.5s; }
.mesh-pulse-9  { animation-delay: -2.7s; }
.mesh-pulse-10 { animation-delay: -1.9s; }
.mesh-pulse-11 { animation-delay: -1.1s; }
.mesh-pulse-12 { animation-delay: -.3s; }

@keyframes airmeshMeshBreathe {
    0%, 68%, 100% {
        opacity: 0;
        transform: scale(.75);
        filter: drop-shadow(0 0 0 rgba(37,212,198,0));
    }
    78% {
        opacity: .88;
        transform: scale(1.35);
        filter:
            drop-shadow(0 0 4px rgba(37,212,198,.95))
            drop-shadow(0 0 10px rgba(30,121,236,.46));
    }
    88% {
        opacity: .18;
        transform: scale(.95);
        filter: drop-shadow(0 0 3px rgba(37,212,198,.28));
    }
}

@media (max-width: 980px) {
    .app-header {
        min-height: 140px;
    }

    .brand-logo-stage {
        width: 300px;
    }
}

@media (max-width: 760px) {
    .app-header {
        min-height: auto;
    }

    .brand-logo-stage {
        width: min(300px, 78vw);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mesh-pulse {
        animation: none;
        opacity: .12;
        transform: none;
        filter: none;
    }
}


/* AirMesh Dashboard v1.6.0 — POC Scenario Simulator */
.simulation-panel {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(520px, auto);
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    border: 1px solid rgba(122,71,213,.16);
    border-radius: 22px;
    background:
        radial-gradient(circle at 92% 18%, rgba(122,71,213,.10), transparent 28%),
        linear-gradient(120deg, rgba(255,255,255,.92), rgba(247,245,255,.94));
    box-shadow: var(--shadow-md);
}
.simulation-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.simulation-title-row .section-eyebrow { margin-bottom: 5px; }
.simulation-title-row h2 {
    margin: 0;
    color: var(--navy-950);
    font-size: 20px;
    letter-spacing: -.025em;
}
.simulation-lab-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 15px;
    color: #ffffff;
    background: linear-gradient(145deg, #7a47d5, #075fd0);
    box-shadow: 0 10px 24px rgba(91,65,190,.22);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .08em;
}
.simulation-status {
    margin: 9px 0 0 62px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}
.simulation-controls {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 9px;
}
.simulation-controls label {
    align-self: center;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.simulation-select,
.simulation-button {
    min-height: 40px;
    border-radius: 12px;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
}
.simulation-select {
    min-width: 180px;
    padding: 0 34px 0 12px;
    border: 1px solid rgba(8,37,84,.12);
    color: var(--navy-900);
    background: #ffffff;
}
.simulation-button {
    padding: 0 14px;
    border: 0;
}
.simulation-start {
    color: #ffffff;
    background: linear-gradient(135deg, #7a47d5, #075fd0);
    box-shadow: 0 8px 18px rgba(91,65,190,.20);
}
.simulation-stop {
    color: #6d3fc0;
    border: 1px solid rgba(122,71,213,.20);
    background: rgba(122,71,213,.08);
}
.simulation-button:disabled {
    opacity: .48;
    cursor: not-allowed;
    box-shadow: none;
}
.simulation-banner {
    grid-column: 1 / -1;
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px 17px;
    border: 1px solid rgba(122,71,213,.25);
    border-radius: 15px;
    color: #442172;
    background: rgba(122,71,213,.09);
    overflow: hidden;
}
.simulation-banner[hidden] { display: none; }
.simulation-banner strong {
    display: block;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .09em;
}
.simulation-banner span {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.45;
}
.simulation-disclosure {
    margin: 0 !important;
    padding: 6px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: #7a47d5;
    font-size: 9px !important;
    font-weight: 950;
    letter-spacing: .08em;
}
.simulation-progress-track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(122,71,213,.12);
}
.simulation-progress-track span {
    width: 0;
    height: 100%;
    margin: 0;
    background: linear-gradient(90deg, #7a47d5, #10a8dc, #18c4b5);
    transition: width 1.2s linear;
}
.simulation-header-badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 11px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #7a47d5, #075fd0);
    box-shadow: 0 7px 16px rgba(91,65,190,.20);
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.simulation-header-badge[hidden] { display: none; }
.simulation-active .hero-panel,
.simulation-active .environment-panel,
.simulation-active .insights-panel,
.simulation-active .trends-panel {
    outline: 1px solid rgba(122,71,213,.10);
}

@media (max-width: 1120px) {
    .simulation-panel {
        grid-template-columns: 1fr;
    }
    .simulation-controls {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}
@media (max-width: 700px) {
    .simulation-panel {
        padding: 18px;
    }
    .simulation-status {
        margin-left: 0;
    }
    .simulation-controls {
        align-items: stretch;
        flex-direction: column;
    }
    .simulation-controls label {
        align-self: flex-start;
    }
    .simulation-select,
    .simulation-button {
        width: 100%;
    }
    .simulation-banner {
        grid-template-columns: 1fr;
    }
    .simulation-disclosure {
        width: fit-content;
    }
}


/* AirMesh Dashboard v1.7.0 — Multi-room simulation */
.room-card-active {
    color: white;
    border-color: transparent;
    background:
        radial-gradient(circle at 84% 16%, rgba(24,196,181,.24), transparent 34%),
        linear-gradient(150deg, #123b7c 0%, #092657 64%, #041734 100%);
    box-shadow: 0 18px 40px rgba(3,18,45,.15);
}
.room-card-active .room-label,
.room-card-active .room-score {
    color: #ffffff;
}
.room-card-active .room-score-scale,
.room-card-active .room-description {
    color: rgba(255,255,255,.66);
}
.room-card-active .room-icon {
    color: var(--teal-300);
    background: rgba(255,255,255,.10);
}
.room-card-simulated {
    box-shadow:
        0 18px 40px rgba(3,18,45,.15),
        inset 0 0 0 1px rgba(122,71,213,.22);
}
.room-card-simulated::before {
    content: "SIMULATED";
    position: absolute;
    right: 15px;
    bottom: 14px;
    color: rgba(255,255,255,.38);
    font-size: 8px;
    font-weight: 950;
    letter-spacing: .10em;
}
.room-score-placeholder {
    color: var(--navy-950);
}
.room-card-placeholder .room-score-scale {
    color: var(--muted);
}


/* AirMesh Dashboard v1.8.0 — Guided simulation experience */
.simulation-guide-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid rgba(122,71,213,.17);
    border-radius: 12px;
    color: #5d3b91;
    background: rgba(122,71,213,.06);
    font-size: 10px !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}
.simulation-guide-option input {
    width: 15px;
    height: 15px;
    accent-color: #7a47d5;
}
.simulation-guide-option:has(input:disabled) {
    opacity: .55;
}

.simulation-tour {
    position: fixed;
    z-index: 90;
    right: 22px;
    bottom: 22px;
    width: min(420px, calc(100vw - 44px));
    padding: 18px;
    border: 1px solid rgba(122,71,213,.20);
    border-radius: 22px;
    color: var(--ink);
    background: rgba(255,255,255,.96);
    box-shadow: 0 22px 55px rgba(3,18,45,.22);
    backdrop-filter: blur(20px);
}
.simulation-tour[hidden] { display: none; }
.simulation-tour-topline,
.simulation-tour-actions,
.simulation-tour-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.simulation-tour-label {
    display: block;
    color: #7a47d5;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .10em;
    text-transform: uppercase;
}
.simulation-tour-topline strong {
    display: block;
    margin-top: 3px;
    color: var(--navy-950);
    font-size: 14px;
}
.simulation-tour-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    color: var(--muted);
    background: #eef3f8;
    font-size: 20px;
}
.simulation-tour-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 5px;
    margin-top: 14px;
}
.tour-step {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 8px 4px;
    border: 0;
    border-radius: 10px;
    color: var(--muted);
    background: #f1f4f8;
    font-size: 9px;
    font-weight: 900;
}
.tour-step span {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: #64748b;
    background: white;
}
.tour-step.active {
    color: #5e35a6;
    background: rgba(122,71,213,.11);
}
.tour-step.active span {
    color: white;
    background: #7a47d5;
}
.simulation-tour-copy {
    margin-top: 14px;
    padding: 15px;
    border-radius: 16px;
    background: linear-gradient(120deg, rgba(122,71,213,.07), rgba(16,168,220,.06));
}
.simulation-tour-counter {
    margin: 0;
    color: #7a47d5;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.simulation-tour-copy h3 {
    margin: 7px 0 5px;
    color: var(--navy-950);
    font-size: 18px;
}
.simulation-tour-copy p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}
.simulation-tour-actions { margin-top: 13px; }
.tour-action {
    min-height: 38px;
    padding: 0 13px;
    border-radius: 11px;
    font-size: 10px;
    font-weight: 900;
}
.tour-action.primary {
    flex: 1;
    border: 0;
    color: white;
    background: linear-gradient(135deg, #7a47d5, #075fd0);
}
.tour-action.secondary {
    border: 1px solid var(--line);
    color: var(--navy-900);
    background: white;
}
.tour-action:disabled { opacity: .4; }
.simulation-tour-links {
    justify-content: flex-start;
    margin-top: 11px;
}
.simulation-tour-links button {
    padding: 0;
    border: 0;
    color: #6c4aa2;
    background: transparent;
    font-size: 9px;
    font-weight: 900;
}
.simulation-tour-links button:last-child {
    margin-left: auto;
    color: var(--poor);
}

.simulation-tour-highlight {
    position: relative;
    scroll-margin-top: 190px;
    outline: 3px solid rgba(122,71,213,.48) !important;
    outline-offset: 5px;
    animation: simulationSectionPulse 1.7s ease-in-out 2;
}
@keyframes simulationSectionPulse {
    0%, 100% { outline-color: rgba(122,71,213,.34); }
    50% { outline-color: rgba(16,168,220,.72); }
}

.simulation-summary-drawer {
    position: fixed;
    z-index: 85;
    left: 22px;
    bottom: 22px;
    width: min(330px, calc(100vw - 44px));
    border: 1px solid rgba(122,71,213,.18);
    border-radius: 20px;
    background: rgba(6,28,64,.97);
    box-shadow: 0 20px 50px rgba(3,18,45,.25);
    overflow: hidden;
    backdrop-filter: blur(18px);
}
.simulation-summary-drawer[hidden] { display: none; }
.simulation-summary-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 15px;
    border: 0;
    color: white;
    background: transparent;
    text-align: left;
}
.simulation-summary-toggle small {
    display: block;
    color: var(--teal-300);
    font-size: 8px;
    font-weight: 950;
    letter-spacing: .10em;
    text-transform: uppercase;
}
.simulation-summary-toggle strong {
    display: block;
    margin-top: 3px;
    font-size: 13px;
}
.simulation-summary-body {
    padding: 0 15px 15px;
}
.simulation-summary-body[hidden] { display: none; }
.simulation-phase,
.simulation-primary-change {
    padding: 11px 12px;
    border-radius: 13px;
    background: rgba(255,255,255,.07);
}
.simulation-phase span,
.simulation-primary-change span {
    display: block;
    color: rgba(255,255,255,.55);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.simulation-phase strong {
    display: block;
    margin-top: 4px;
    color: white;
    font-size: 11px;
}
.simulation-room-summary {
    display: grid;
    gap: 8px;
    margin: 13px 0;
}
.simulation-room-row {
    display: grid;
    grid-template-columns: 88px 1fr 27px;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,.72);
    font-size: 9px;
}
.simulation-room-row strong {
    color: white;
    text-align: right;
    font-size: 10px;
}
.simulation-room-track {
    display: block;
    height: 7px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    overflow: hidden;
}
.simulation-room-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7a47d5, #18c4b5);
    transition: width .5s ease;
}
.simulation-primary-change p {
    margin: 5px 0 0;
    color: rgba(255,255,255,.80);
    font-size: 10px;
    line-height: 1.45;
}
.simulation-jump-button {
    width: 100%;
    min-height: 38px;
    margin-top: 11px;
    border: 1px solid rgba(118,223,213,.22);
    border-radius: 11px;
    color: #bffbf2;
    background: rgba(24,196,181,.10);
    font-size: 9px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .06em;
}

@media (max-width: 900px) {
    .simulation-tour {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }
    .simulation-summary-drawer {
        left: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }
    .simulation-active .simulation-tour:not([hidden]) +
    .simulation-summary-drawer {
        bottom: 300px;
    }
}
@media (max-width: 600px) {
    .simulation-tour {
        padding: 14px;
        border-radius: 18px;
    }
    .simulation-tour-steps {
        grid-template-columns: repeat(4, 1fr);
    }
    .tour-step {
        font-size: 8px;
    }
    .simulation-summary-drawer {
        border-radius: 17px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .simulation-tour-highlight {
        animation: none;
    }
}


/* AirMesh Dashboard v1.9.0 — Five-level score system and room explainability */
:root {
    --quality-excellent: #18c4b5;
    --quality-good: #24a95c;
    --quality-fair: #e19a19;
    --quality-poor: #d34747;
    --quality-critical: #7a47d5;
}

.status-pill.quality-excellent {
    color: #c9fff7;
    background: rgba(24,196,181,.24);
}
.status-pill.quality-good {
    color: #d5ffe2;
    background: rgba(36,169,92,.25);
}
.status-pill.quality-fair {
    color: #ffe7b0;
    background: rgba(225,154,25,.26);
}
.status-pill.quality-poor {
    color: #ffd0d0;
    background: rgba(211,71,71,.26);
}
.status-pill.quality-critical {
    color: #eadcff;
    background: rgba(122,71,213,.30);
}

.score-range-guide-five {
    grid-template-columns: repeat(5, minmax(0,1fr));
}
.score-range-critical {
    box-shadow: inset 0 3px 0 var(--quality-critical);
}
.score-range-poor {
    box-shadow: inset 0 3px 0 var(--quality-poor);
}
.score-range-fair {
    box-shadow: inset 0 3px 0 var(--quality-fair);
}
.score-range-good {
    box-shadow: inset 0 3px 0 var(--quality-good);
}
.score-range-excellent {
    box-shadow: inset 0 3px 0 var(--quality-excellent);
}

.room-card {
    min-height: 340px;
}
.room-index-visual {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 14px;
}
.room-score-ring {
    --room-score: 0;
    --score-color: var(--quality-excellent);
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    flex: 0 0 86px;
    border-radius: 50%;
    background:
        conic-gradient(
            var(--score-color)
            calc(var(--room-score) * 1%),
            rgba(148,163,184,.16) 0
        );
    position: relative;
    transition: background .35s ease;
}
.room-score-ring::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: #ffffff;
}
.room-card-live .room-score-ring::before,
.room-card-active .room-score-ring::before {
    background: #071f4c;
}
.room-score {
    position: relative;
    z-index: 1;
    color: var(--navy-950);
    font-size: 32px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -.055em;
}
.room-card-live .room-score,
.room-card-active .room-score {
    color: #ffffff;
}
.room-index-visual .room-score-scale {
    display: block;
    color: var(--muted);
}
.room-card-live .room-score-scale,
.room-card-active .room-score-scale {
    color: rgba(255,255,255,.60);
}
.room-quality-label {
    display: inline-flex;
    margin-top: 7px;
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(148,163,184,.12);
    font-size: 9px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.room-quality-label.quality-excellent {
    color: #087c71;
    background: rgba(24,196,181,.15);
}
.room-quality-label.quality-good {
    color: #16783b;
    background: rgba(36,169,92,.14);
}
.room-quality-label.quality-fair {
    color: #9b6300;
    background: rgba(225,154,25,.16);
}
.room-quality-label.quality-poor {
    color: #a62c2c;
    background: rgba(211,71,71,.15);
}
.room-quality-label.quality-critical {
    color: #6332ad;
    background: rgba(122,71,213,.15);
}
.room-card-live .room-quality-label,
.room-card-active .room-quality-label {
    color: #ffffff;
}
.room-quality-legend {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin-top: 13px;
}
.room-quality-legend i {
    display: block;
    height: 5px;
    border-radius: 999px;
}
.legend-critical { background: var(--quality-critical); }
.legend-poor { background: var(--quality-poor); }
.legend-fair { background: var(--quality-fair); }
.legend-good { background: var(--quality-good); }
.legend-excellent { background: var(--quality-excellent); }

.room-score-breakdown {
    margin-top: 13px;
    border: 1px solid rgba(8,37,84,.10);
    border-radius: 13px;
    background: rgba(255,255,255,.52);
    overflow: hidden;
}
.room-card-live .room-score-breakdown,
.room-card-active .room-score-breakdown {
    border-color: rgba(255,255,255,.13);
    background: rgba(255,255,255,.07);
}
.room-score-breakdown summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    padding: 11px 12px;
    list-style: none;
    color: var(--navy-900);
    cursor: pointer;
    font-size: 10px;
    font-weight: 900;
}
.room-score-breakdown summary::-webkit-details-marker {
    display: none;
}
.room-card-live .room-score-breakdown summary,
.room-card-active .room-score-breakdown summary {
    color: #ffffff;
}
.room-score-breakdown-content {
    padding: 0 11px 11px;
}
.room-factor-list {
    display: grid;
    gap: 5px;
}
.room-factor-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 7px;
    border-radius: 8px;
    color: var(--muted);
    background: rgba(8,37,84,.035);
    font-size: 9px;
}
.room-card-live .room-factor-list > div,
.room-card-active .room-factor-list > div {
    color: rgba(255,255,255,.75);
    background: rgba(255,255,255,.05);
}
.room-factor-status {
    padding: 3px 6px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 950;
}
.room-factor-status.good {
    color: #087c71;
    background: rgba(24,196,181,.14);
}
.room-factor-status.fair {
    color: #9b6300;
    background: rgba(225,154,25,.15);
}
.room-factor-status.poor {
    color: #a62c2c;
    background: rgba(211,71,71,.14);
}
.room-factor-status.neutral {
    color: var(--muted);
    background: rgba(148,163,184,.12);
}
.room-card-live .room-factor-status,
.room-card-active .room-factor-status {
    color: #ffffff;
}
.room-largest-impact {
    margin: 8px 0 0;
    padding: 8px 9px;
    border-left: 3px solid var(--score-color, var(--quality-excellent));
    border-radius: 0 8px 8px 0;
    color: var(--muted);
    background: rgba(8,37,84,.035);
    font-size: 9px;
    line-height: 1.4;
}
.room-card-live .room-largest-impact,
.room-card-active .room-largest-impact {
    color: rgba(255,255,255,.76);
    background: rgba(255,255,255,.05);
}
.whole-home-preview-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
}
.worst-room-alert {
    padding: 8px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 9px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.worst-room-alert.quality-poor {
    background: var(--quality-poor);
}
.worst-room-alert.quality-critical {
    background: var(--quality-critical);
}

@media (max-width: 700px) {
    .score-range-guide-five {
        grid-template-columns: repeat(5, minmax(52px,1fr));
        overflow-x: auto;
    }
    .room-card {
        min-height: 320px;
    }
    .whole-home-preview-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* AirMesh Dashboard v1.9.1 — live room synchronization fix */
.room-score-ring[data-quality="critical"] { --score-color: var(--quality-critical); }
.room-score-ring[data-quality="poor"] { --score-color: var(--quality-poor); }
.room-score-ring[data-quality="fair"] { --score-color: var(--quality-fair); }
.room-score-ring[data-quality="good"] { --score-color: var(--quality-good); }
.room-score-ring[data-quality="excellent"] { --score-color: var(--quality-excellent); }

.room-card[data-quality="critical"] .legend-critical,
.room-card[data-quality="poor"] .legend-poor,
.room-card[data-quality="fair"] .legend-fair,
.room-card[data-quality="good"] .legend-good,
.room-card[data-quality="excellent"] .legend-excellent {
    height: 8px;
    box-shadow: 0 0 0 2px rgba(255,255,255,.25);
}


/* ---------------------------------------------------------
   AirMesh v1.10.0 - Multi-room live node selection
   --------------------------------------------------------- */
.room-card-live,
.room-card-active {
    cursor: pointer;
}

.room-card-live:focus-visible,
.room-card-active:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.38);
    outline-offset: 3px;
}

.room-card-selected {
    transform: translateY(-2px);
    box-shadow:
        0 18px 40px rgba(3, 30, 66, 0.16),
        0 0 0 2px rgba(14, 165, 233, 0.32);
}

.room-card-selected .room-state-online {
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.10);
}


/* ---------------------------------------------------------
   AirMesh v1.11.0 - Three live room nodes
   H0-001 Great Room / H0-002 Daughter's Room / H0-003 Office
   --------------------------------------------------------- */


/* ---------------------------------------------------------
   AirMesh v1.12.0 - Whole-home AirMesh Index
   The hero index is the arithmetic mean of all live room
   AirMesh Index scores. Selected-room telemetry remains
   independently displayed below and in each room card.
   --------------------------------------------------------- */


/* AirMesh v1.12.1
   Fix: preserve Whole-home AirMesh Index after periodic refresh. */


/* ---------------------------------------------------------
   AirMesh v1.13.0
   Stable whole-home state:
   - only renderCurrentLiveView() writes the live hero index
   - room selection cannot overwrite the whole-home index
   - 30-second refresh cannot overwrite it with a room score
   - selected-card styling always uses that room's own score
   --------------------------------------------------------- */


/* AirMesh v1.13.1
   Global header reports whole-home room connectivity. */


/* ---------------------------------------------------------
   AirMesh v1.13.2
   Whole-home hero messaging:
   - hero status strip is reserved for whole-home index context
   - room selection never changes hero messaging
   - global header reports AirMesh node connectivity
   - logo asset is permanently cache-busted
   --------------------------------------------------------- */
