.hvo-card,
.hvo-card-shell {
    position: relative;
    overflow: hidden;
    background: var(--shell-card-background);
    color: var(--shell-card-foreground);
    border: 1px solid var(--shell-card-border);
    border-radius: 24px;
    padding: 1.25rem;
    box-shadow: inset 0 1px 0 var(--shell-card-inner-border), var(--shell-card-shadow);
}

.hvo-card-large {
    border-radius: 30px;
    padding: 1.5rem;
}

.hvo-card-primary {
    box-shadow: inset 4px 0 0 var(--mud-palette-primary, var(--shell-action-color)), var(--shell-card-shadow);
}

.hvo-card-note {
    background: var(--shell-overlay-panel);
    border-color: var(--shell-overlay-panel-border);
}

.hvo-card-title {
    margin: 0 0 0.75rem;
    color: var(--shell-card-foreground);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.25;
}

.hvo-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.hvo-section-head h2 {
    margin: 0.25rem 0 0;
    color: var(--shell-card-foreground);
    font-size: clamp(1.25rem, 1.8vw, 1.8rem);
    line-height: 1.12;
}

.hvo-eyebrow {
    margin-bottom: 0.25rem;
    color: var(--shell-pill-text);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.hvo-stack {
    display: grid;
    gap: 0.85rem;
}

.hvo-grid,
.hvo-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.hvo-action-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hvo-field {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.hvo-field-label {
    color: var(--shell-pill-text);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hvo-control {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    box-sizing: border-box;
    padding: 0.55rem 0.75rem;
    border-radius: 14px;
    border: 1px solid var(--shell-overlay-panel-border);
    background: var(--shell-overlay-panel);
    color: var(--shell-card-foreground);
    font: inherit;
    outline: none;
    color-scheme: dark;
}

.shell-theme-light .hvo-control {
    color-scheme: light;
}

.hvo-control:focus {
    border-color: var(--shell-pill-active-border);
    box-shadow: 0 0 0 3px var(--shell-card-inner-border);
}

.hvo-control[readonly],
.hvo-control:disabled {
    cursor: default;
    opacity: 0.7;
}

.hvo-control::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(0.82);
}

.shell-theme-light .hvo-control::-webkit-calendar-picker-indicator {
    filter: none;
}

.hvo-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0 1rem;
    border-radius: 999px;
    border: 1px solid var(--shell-pill-border);
    background: var(--shell-pill-background);
    color: var(--shell-action-color);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.hvo-button:hover {
    background: var(--shell-pill-hover-background);
    color: var(--shell-pill-hover-text);
    border-color: var(--shell-pill-hover-border);
}

.hvo-button-primary,
.hvo-button-success {
    color: var(--shell-pill-active-text);
    background: var(--shell-pill-active-background);
    border-color: var(--shell-pill-active-border);
    box-shadow: var(--shell-pill-active-shadow);
}

.hvo-button-danger {
    color: var(--shell-card-foreground);
    background: color-mix(in srgb, var(--shell-card-background) 72%, #f38ba8 28%);
    border-color: color-mix(in srgb, var(--shell-card-border) 60%, #f38ba8 40%);
}

.hvo-button:disabled {
    cursor: default;
    opacity: 0.58;
}

.hvo-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hvo-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--shell-overlay-panel-border);
    border-radius: 999px;
    background: var(--shell-overlay-panel);
    color: var(--shell-card-foreground);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hvo-chip-success,
.hvo-chip-online {
    background: color-mix(in srgb, var(--shell-overlay-panel) 74%, #57d38d 26%);
    border-color: color-mix(in srgb, var(--shell-overlay-panel-border) 62%, #57d38d 38%);
}

.hvo-chip-warning {
    background: color-mix(in srgb, var(--shell-overlay-panel) 74%, #ffcf66 26%);
    border-color: color-mix(in srgb, var(--shell-overlay-panel-border) 62%, #ffcf66 38%);
}

.hvo-chip-danger,
.hvo-chip-error {
    background: color-mix(in srgb, var(--shell-overlay-panel) 74%, #f38ba8 26%);
    border-color: color-mix(in srgb, var(--shell-overlay-panel-border) 62%, #f38ba8 38%);
}

.hvo-list-item {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--shell-overlay-panel-border);
    background: var(--shell-overlay-panel);
    color: var(--shell-card-foreground);
}

.hvo-list-item span {
    color: var(--shell-pill-text);
}

.hvo-list-item strong {
    min-width: 0;
    color: var(--shell-card-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
}

.hvo-callout {
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--shell-overlay-panel-border);
    background: var(--shell-overlay-panel);
    color: var(--shell-pill-text);
}

.hvo-callout-success {
    border-color: color-mix(in srgb, var(--shell-overlay-panel-border) 62%, #57d38d 38%);
    color: color-mix(in srgb, var(--shell-card-foreground) 72%, #57d38d 28%);
}

.hvo-callout-error {
    border-color: color-mix(in srgb, var(--shell-overlay-panel-border) 62%, #f38ba8 38%);
    color: color-mix(in srgb, var(--shell-card-foreground) 72%, #f38ba8 28%);
}

.hvo-callout-info {
    color: var(--shell-pill-text);
}

.hvo-table-wrap {
    overflow-x: auto;
}

.hvo-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--shell-card-foreground);
    font-size: 0.9rem;
}

.hvo-table th,
.hvo-table td {
    padding: 0.75rem 0.8rem;
    border-bottom: 1px solid var(--shell-overlay-panel-border);
    text-align: left;
    vertical-align: top;
}

.hvo-table th {
    color: var(--shell-pill-text);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hvo-mono {
    font-family: var(--shell-font-mono);
    font-variant-numeric: tabular-nums;
}

/* ── Visually hidden (accessible screen-reader text, not visible) ── */
.hvo-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hvo-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--shell-card-foreground);
    font-weight: 700;
}

.hvo-toggle-track {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--shell-overlay-panel-border) 60%, #57d38d 40%);
    background: color-mix(in srgb, var(--shell-overlay-panel) 74%, #57d38d 26%);
    box-shadow: inset 18px 0 0 var(--shell-card-foreground);
}

.hvo-ring-gauge {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(148, 231, 185, 0.28);
    border-radius: 50%;
    background:
        radial-gradient(circle at center, var(--shell-card-background) 58%, transparent 59%),
        conic-gradient(var(--hvo-ring-color, #57d38d) var(--hvo-ring-level, 0%), rgba(126, 157, 196, 0.16) 0);
    box-shadow: var(--shell-card-shadow);
}

.hvo-ring-gauge-value {
    color: var(--shell-card-foreground);
    font-family: var(--shell-font-mono);
    font-size: 1.45rem;
    font-weight: 800;
}

.hvo-gauge-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    justify-items: center;
}

.hvo-cell-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    gap: 0.5rem;
}

.hvo-cell-tile {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.45rem 0.35rem;
    border: 1px solid var(--shell-overlay-panel-border);
    border-radius: 10px;
    background: var(--shell-overlay-panel);
    font-family: var(--shell-font-mono);
}

.hvo-cell-tile-high {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(255, 127, 127, 0.55);
}

.hvo-cell-tile-low {
    background: rgba(109, 165, 255, 0.12);
    border-color: rgba(109, 165, 255, 0.55);
}

.hvo-cell-num {
    color: var(--shell-pill-text);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hvo-cell-v {
    color: var(--shell-card-foreground);
    font-size: 0.85rem;
    font-weight: 700;
}

.hvo-device-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hvo-device-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hvo-device-meta-caption {
    color: var(--shell-pill-text);
    font-size: 0.75rem;
}

.hvo-surface-panel {
    background: var(--shell-overlay-panel);
    border: 1px solid var(--shell-overlay-panel-border);
    border-radius: 12px;
    color: var(--shell-card-foreground);
}

.hvo-state-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    gap: 0.75rem;
    padding: 2rem;
    border: 2px dashed var(--shell-card-border);
    border-radius: 12px;
    color: var(--shell-pill-text);
    text-align: center;
}

.hvo-state-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    gap: 0.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: 12px;
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
    text-align: center;
}

.jk-card,
.jk-hero,
.jk-table-shell,
.smartshunt-card,
.smartshunt-hero,
.solar-card,
.solar-hero-card,
.kasa-panel,
.kasa-device-card,
.kasa-card-dialog {
    background: var(--shell-card-background) !important;
    border-color: var(--shell-card-border) !important;
    color: var(--shell-card-foreground) !important;
    border-radius: 12px !important;
    box-shadow: var(--shell-card-shadow) !important;
}

.smartshunt-card-primary {
    box-shadow: inset 4px 0 0 var(--mud-palette-primary, var(--shell-action-color)), var(--shell-card-shadow) !important;
}

.smartshunt-card-note {
    background: var(--shell-overlay-panel) !important;
    border-color: var(--shell-overlay-panel-border) !important;
}

.jk-stat-chip,
.jk-metric,
.jk-detail-block,
.jk-highlight-card,
.jk-ataglance-card,
.jk-bank-card,
.jk-bank-stat,
.jk-ataglance-stat,
.smartshunt-stat-chip,
.smartshunt-metric-tile,
.solar-detail-row,
.solar-metric-tile,
.solar-hero-panel,
.kasa-control-surface,
.kasa-card-stats div,
.kasa-light-summary div,
.kasa-outlet-summary div,
.kasa-details-chip-groups > div,
.kasa-outlet-row,
.kasa-preferred-state-row,
.kasa-config-grid div {
    background: var(--shell-overlay-panel) !important;
    border-color: var(--shell-overlay-panel-border) !important;
    color: var(--shell-card-foreground) !important;
}

.jk-card-kicker,
.jk-eyebrow,
.jk-stat-chip span,
.jk-metric span,
.jk-detail-label,
.jk-highlight-label,
.jk-bank-stat-label,
.smartshunt-card-kicker,
.smartshunt-eyebrow,
.smartshunt-stat-chip span,
.smartshunt-metric-tile span,
.solar-eyebrow,
.solar-muted,
.solar-detail-row span,
.solar-metric-tile span,
.kasa-eyebrow,
.kasa-muted,
.kasa-card-stats span,
.kasa-light-summary span,
.kasa-outlet-summary span,
.kasa-config-grid span {
    color: var(--shell-pill-text) !important;
}

.jk-card-head h2,
.smartshunt-card-head h2,
.solar-card-title,
.kasa-title,
.jk-metric strong,
.jk-detail-value,
.jk-bank-stat-value,
.smartshunt-stat-chip strong,
.smartshunt-metric-tile strong,
.solar-detail-row strong,
.solar-metric-tile strong,
.kasa-card-stats strong,
.kasa-light-summary strong,
.kasa-outlet-summary strong,
.kasa-config-grid strong {
    color: var(--shell-card-foreground) !important;
}

.jk-summary-pill,
.smartshunt-badge,
.smartshunt-inline-badge,
.kasa-capability-pill {
    background: var(--shell-overlay-panel) !important;
    border-color: var(--shell-overlay-panel-border) !important;
    color: var(--shell-card-foreground) !important;
}

/* ── Pressure Gauge (Barometer) ─────────────────────────────────────────── */

.hvo-barometer {
    display: grid;
    gap: 14px;
}

.hvo-barometer-reading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.hvo-barometer-reading-value {
    color: var(--shell-card-foreground);
    font-family: var(--shell-font-mono);
    font-size: 2rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.hvo-barometer-reading-label {
    color: var(--shell-pill-text);
    font-size: 0.92rem;
}

.hvo-barometer-scale {
    display: grid;
    gap: 8px;
}

.hvo-barometer-band {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, #6da5ff 18%, transparent),
        color-mix(in srgb, #ffcf66 28%, transparent),
        color-mix(in srgb, #57d38d 20%, transparent)
    );
}

.hvo-barometer-marker {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--shell-chart-marker-fill);
    border: 2.5px solid #6da5ff;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 3px rgba(109, 165, 255, 0.25);
}

.hvo-barometer-tick-row {
    display: flex;
    justify-content: space-between;
    color: var(--shell-pill-text);
    font-family: var(--shell-font-mono);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.hvo-barometer-meta {
    display: grid;
    gap: 6px;
}

.hvo-barometer-row {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    color: var(--shell-pill-text);
    font-size: 0.84rem;
}

.hvo-barometer-row strong {
    color: var(--shell-card-foreground);
    font-family: var(--shell-font-mono);
    font-size: 0.84rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    justify-self: end;
    text-align: right;
}
