/* Permanent owner: Responsive page compositions below the desktop shell breakpoint. */

/* Overview mobile layout ───────────────────────────────────────────────── */

@media (max-width: 1100px) {
    .overview--mobile .hero,
    .overview--mobile .status-grid {
        display: none;
    }

    .overview-mobile {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 16px 16px 24px;
    }

    .overview-mobile-eyebrow {
        color: var(--color-text-muted);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        padding: 0 2px 4px;
    }

    /* 2×2 grid of compact summary cards */
    .overview-mobile-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    /* Domain preview stack */
    .overview-mobile-domains {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 4px;
    }

    /* ─── Variant A editorial overview ─── */

    .mob-ed {
        display: flex;
        flex-direction: column;
        width: min(100%, 600px);
        margin-inline: auto;
        padding-top: 2px;
    }

    .mob-ed-eyebrow {
        padding: 0 22px 3px;
        color: var(--color-text-faint);
        font-family: var(--font-mono);
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.18em;
        text-transform: uppercase;
    }

    .mob-ed-page-title {
        padding: 0 22px 14px;
        font-family: var(--font-display);
        font-size: 30px;
        font-weight: 700;
        line-height: 1.08;
        color: var(--color-text);
        letter-spacing: 0;
    }

    .mob-ed-hero {
        margin: 4px 16px 20px;
        padding: 22px 20px 18px;
        border-radius: 24px;
        background:
            radial-gradient(circle at 86% 12%, color-mix(in srgb, var(--color-solar) 20%, transparent), transparent 34%),
            linear-gradient(180deg, color-mix(in srgb, var(--color-solar) 8%, transparent), transparent 62%),
            linear-gradient(180deg, color-mix(in srgb, var(--color-surface) 94%, var(--color-bg) 6%), color-mix(in srgb, var(--color-bg) 92%, black 8%));
        border: 1px solid color-mix(in srgb, var(--color-solar) 24%, transparent);
        position: relative;
        overflow: hidden;
        box-shadow:
            0 18px 52px rgba(2, 6, 23, 0.22),
            0 1px 0 color-mix(in srgb, white 6%, transparent) inset;
    }

    .mob-ed-hero::before {
        content: '';
        position: absolute;
        inset: -120px -80px auto auto;
        width: 240px;
        height: 240px;
        border-radius: 50%;
        background: radial-gradient(closest-side, color-mix(in srgb, var(--color-solar) 28%, transparent), transparent 70%);
        pointer-events: none;
    }

    .mob-ed-hero-label {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--color-solar);
        font-family: var(--font-mono);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.16em;
        text-transform: uppercase;
    }

    .mob-ed-hero-label::before {
        content: '';
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--color-solar);
        box-shadow: 0 0 10px color-mix(in srgb, var(--color-solar) 70%, transparent);
        flex: none;
    }

    .mob-ed-hero-num {
        font-family: var(--font-mono);
        /* Geist Mono ligates `--` into a single elongated em-dash glyph
           that, at 60px + negative letter-spacing, visually splits into
           two separated dashes ("- -"). Disable ligatures on the hero
           number specifically so the missing-value placeholder reads
           cleanly as `--`. Live numbers don't have digit ligatures so this
           costs nothing for the populated case. */
        font-variant-ligatures: none;
        font-feature-settings: "liga" 0, "calt" 0;
        font-size: 58px;
        line-height: 1;
        font-weight: 500;
        color: var(--color-text);
        margin: 14px 0 4px;
        letter-spacing: 0;
        font-variant-numeric: tabular-nums;
    }

    .mob-ed-hero-num small {
        font-size: 20px;
        font-weight: 400;
        color: var(--color-text-muted);
    }

    .mob-ed-hero-sub {
        color: var(--color-text-soft);
        font-size: 13px;
        line-height: 1.45;
        margin-top: 4px;
    }

    .mob-ed-hero-flow {
        display: grid;
        grid-template-columns: 34px minmax(26px, 1fr) 34px minmax(26px, 1fr) 34px;
        align-items: center;
        gap: 8px;
        margin-top: 16px;
        padding: 10px 12px;
        border: 1px solid color-mix(in srgb, var(--color-line) 58%, transparent);
        border-radius: 18px;
        background: color-mix(in srgb, var(--color-bg) 34%, transparent);
    }

    .mob-ed-flow-node {
        display: inline-grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border-radius: 13px;
        color: var(--color-text-muted);
        background: color-mix(in srgb, var(--color-text-muted) 10%, transparent);
        border: 1px solid color-mix(in srgb, var(--color-line) 70%, transparent);
    }

    .mob-ed-flow-node svg {
        width: 17px;
        height: 17px;
    }

    .mob-ed-flow-node--solar {
        color: var(--color-solar);
        background: color-mix(in srgb, var(--color-solar) 14%, transparent);
        border-color: color-mix(in srgb, var(--color-solar) 24%, transparent);
    }

    .mob-ed-flow-node--home {
        color: var(--color-water);
        background: color-mix(in srgb, var(--color-water) 12%, transparent);
        border-color: color-mix(in srgb, var(--color-water) 20%, transparent);
    }

    .mob-ed-flow-node--export {
        color: var(--color-energy);
        background: color-mix(in srgb, var(--color-energy) 12%, transparent);
        border-color: color-mix(in srgb, var(--color-energy) 22%, transparent);
    }

    .mob-ed-flow-line {
        height: 2px;
        border-radius: 999px;
        background: color-mix(in srgb, var(--color-line-strong) 52%, transparent);
        position: relative;
        overflow: hidden;
    }

    .mob-ed-flow-line::after {
        content: '';
        position: absolute;
        inset: 0;
        width: 56%;
        border-radius: inherit;
        background: linear-gradient(90deg, transparent, currentColor, transparent);
        opacity: 0.72;
        transform: translateX(-100%);
    }

    .mob-ed-flow-line--solar,
    .mob-ed-flow-line--active {
        color: var(--color-energy);
    }

    .mob-ed-flow-line--solar::after,
    .mob-ed-flow-line--active::after {
        animation: mob-ed-flow 2.4s linear infinite;
    }

    .mob-ed-flow-line--idle::after {
        display: none;
    }

    .mob-ed-hero-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid var(--color-line);
    }

    .mob-ed-hero-stat .l {
        color: var(--color-text-faint);
        font-family: var(--font-mono);
        font-size: 9.5px;
        letter-spacing: 0.14em;
        text-transform: uppercase;
    }

    .mob-ed-hero-stat .v {
        color: var(--color-text);
        font-family: var(--font-mono);
        font-size: 17px;
        font-weight: 500;
        margin-top: 4px;
        letter-spacing: 0;
        font-variant-numeric: tabular-nums;
        /* Same `--` ligature suppression as .mob-ed-hero-num — placeholder
           dashes in stale/missing state should stay visually adjacent. */
        font-variant-ligatures: none;
        font-feature-settings: "liga" 0, "calt" 0;
    }

    .mob-ed-hero-stat .v small {
        color: var(--color-text-muted);
        font-weight: 400;
        margin-left: 1px;
        font-size: 0.72em;
    }

    .mob-ed-hero-stat .v--compact {
        font-size: 13px;
    }

    .mob-ed-section-h {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        padding: 4px 22px 10px;
    }

    .mob-ed-section-h h2 {
        font-family: var(--font-display);
        font-size: 18px;
        font-weight: 600;
        color: var(--color-text);
    }

    .mob-ed-section-h .more {
        color: var(--color-text-muted);
        font-family: var(--font-mono);
        font-size: 10px;
        letter-spacing: 0.14em;
        text-transform: uppercase;
    }

    .mob-ed-rows {
        display: flex;
        flex-direction: column;
        margin: 0 12px;
        border: 1px solid color-mix(in srgb, var(--color-line) 58%, transparent);
        border-radius: 22px;
        overflow: hidden;
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--color-surface) 46%, transparent), transparent),
            color-mix(in srgb, var(--color-bg) 40%, transparent);
    }

    .mob-ed-row {
        display: flex;
        align-items: center;
        min-height: 66px;
        padding: 13px 14px;
        /* `border: 0` clears button defaults; the `border-bottom` rule that
           follows re-applies the row separator. Without this reset, browsers
           render `<button class="mob-ed-row">` with a 4-side native button
           border that overlaps the row hairline. */
        border: 0;
        border-bottom: 1px solid color-mix(in srgb, var(--color-line) 75%, transparent);
        gap: 12px;
        cursor: pointer;
        transition: background 0.15s;
        text-decoration: none;
        color: inherit;
        /* Button-safety resets: .mob-ed-row is used as <div> (telemetry),
           <router-link> (navigation), and <button> (More.js Diensten +
           Uitloggen). The button form needs these or it inherits native
           buttonface background, system font, and centered text. */
        background: transparent;
        font: inherit;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
        appearance: none;
        -webkit-appearance: none;
    }

    .mob-ed-row:active {
        background: color-mix(in srgb, var(--color-surface) 44%, transparent);
    }

    .mob-ed-row:disabled {
        cursor: default;
        opacity: 0.58;
    }

    .mob-ed-row:disabled:active {
        background: transparent;
    }

    .mob-ed-row-icon {
        width: 42px;
        height: 42px;
        border-radius: 15px;
        display: grid;
        place-items: center;
        flex: none;
        background: color-mix(in srgb, var(--accent, var(--color-text-muted)) 15%, transparent);
        border: 1px solid color-mix(in srgb, var(--accent, var(--color-text-muted)) 18%, transparent);
        color: var(--accent, var(--color-text-muted));
    }

    .mob-ed-row-icon svg {
        width: 20px;
        height: 20px;
    }

    .mob-ed-row-body {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .mob-ed-row-title {
        font-weight: 600;
        color: var(--color-text);
        font-size: 15px;
    }

    .mob-ed-row-sub {
        color: var(--color-text-muted);
        font-size: 12px;
    }

    .mob-ed-row-val {
        font-family: var(--font-mono);
        font-size: 17px;
        font-weight: 500;
        color: var(--color-text);
        letter-spacing: 0;
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

    .mob-ed-row-val small {
        color: var(--color-text-faint);
        font-weight: 400;
        font-size: 11px;
        margin-left: 1px;
    }

    .mob-ed-row-right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }

    .mob-ed-device-block {
        border-bottom: 1px solid color-mix(in srgb, var(--color-line) 75%, transparent);
    }

    .mob-ed-device-block:last-child {
        border-bottom: 0;
    }

    .mob-ed-device-block > .mob-ed-row {
        border-bottom: 0;
        cursor: default;
    }

    .mobile-shelly-components {
        display: grid;
        gap: 8px;
        padding: 0 14px 14px 68px;
    }

    .shelly-component--mobile {
        border-radius: 14px;
        background: color-mix(in srgb, var(--color-surface) 62%, transparent);
    }

    .shelly-component--mobile .shelly-component-controls {
        padding-left: 0;
    }

    .shelly-component--mobile .shelly-control-field {
        min-width: min(100%, 180px);
    }

    .mob-ed-row-state {
        font-family: var(--font-mono);
        font-size: 11px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--color-text-muted);
        display: flex;
        align-items: center;
        gap: 5px;
        white-space: nowrap;
    }

    .mob-ed-row-state--live {
        color: var(--color-energy);
    }

    .mob-ed-row-state--live::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--color-energy);
        box-shadow: 0 0 6px color-mix(in srgb, var(--color-energy) 70%, transparent);
        display: inline-block;
        flex: none;
    }

    /* Stale row state — amber dot + amber text, no pulse (steady-state warning,
       not a "live and working" signal). Used when svcState.stale is true. */
    .mob-ed-row-state--stale {
        color: var(--color-warning);
    }

    .mob-ed-row-state--stale::before {
        content: '';
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: var(--color-warning);
        display: inline-block;
        flex: none;
    }

    .mob-ed-row-state--error {
        color: var(--color-error);
    }

    .mob-ed-row-state--error::before {
        content: '';
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: var(--color-error);
        display: inline-block;
        flex: none;
    }

    .mob-ed-row-state--mode,
    .mob-ed-row-state--quiet {
        font-family: inherit;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0;
        text-transform: none;
    }

    .mob-ed-row-state--mode {
        color: var(--color-text-soft);
    }

    .mob-ed-row-state--quiet {
        color: var(--color-text-muted);
    }

    /* Stale hero variant — applied when a solar source is silent (FoxCloud
       with frozen telemetry). Dims the card and replaces the accent glow
       with an amber warn glow so the user can't mistake the `--` value
       for "no production" (i.e. nighttime). */
    .mob-ed-hero--stale {
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--color-warning) 8%, transparent), transparent),
            linear-gradient(180deg, var(--color-surface), var(--color-bg));
        border-color: color-mix(in srgb, var(--color-warning) 22%, transparent);
        opacity: 0.92;
    }

    .mob-ed-hero--stale::before {
        background: radial-gradient(closest-side, color-mix(in srgb, var(--color-warning) 22%, transparent), transparent 70%);
    }

    .mob-ed-hero--stale .mob-ed-hero-label {
        color: var(--color-warning);
    }

    .mob-ed-hero--stale .mob-ed-hero-label::before {
        background: var(--color-warning);
        box-shadow: 0 0 10px color-mix(in srgb, var(--color-warning) 70%, transparent);
        animation: none;
    }

    .mob-ed-hero--stale .mob-ed-hero-num,
    .mob-ed-hero--stale .mob-ed-hero-stat .v {
        color: var(--color-text-muted);
    }

    /* Inline emphasis spans inside .mob-ed-hero-sub — class-driven colors so
       we never need inline `style="color:..."` (CSP-blocked). */
    .mob-ed-hero-sub-strong--export { color: var(--color-energy); }
    .mob-ed-hero-sub-strong--warn { color: var(--color-warning); }

    /* Net stat hero column highlights green when exporting (negative kW). */
    .mob-ed-hero-stat .v--export { color: var(--color-energy); }

    /* Energy.js (HomeWizard) hero export emphasis variants. Same job as
       .mob-ed-hero-sub-strong--export (mid-sentence emphasis), but the
       Energy hero applies it to the full sub line — net export is the
       primary signal on /energie. */
    .mob-ed-hero-sub--export {
        color: var(--color-energy);
        font-weight: 600;
    }

    /* Phase row + meter-totals export tint, matches .v--export. */
    .mob-ed-row-val--export { color: var(--color-energy); }

    .mob-ed-row-chevron {
        color: var(--color-text-muted);
        display: flex;
        align-items: center;
    }

    .mob-ed-row-chevron svg {
        width: 14px;
        height: 14px;
    }

    .mob-ed-strip {
        margin: 14px 16px 24px;
        padding: 14px 18px;
        background: rgba(255, 255, 255, 0.025);
        border: 1px solid color-mix(in srgb, var(--color-line) 75%, transparent);
        border-radius: 18px;
        display: flex;
        align-items: center;
        gap: 14px;
        cursor: pointer;
        text-decoration: none;
        color: inherit;
    }

    .mob-ed-strip:active {
        background: rgba(255, 255, 255, 0.04);
    }

    .mob-ed-strip-icon {
        flex: none;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: color-mix(in srgb, var(--color-solar) 16%, transparent);
        color: var(--color-solar);
        display: grid;
        place-items: center;
    }

    .mob-ed-strip-icon svg {
        width: 18px;
        height: 18px;
    }

    .mob-ed-strip-body {
        flex: 1;
        min-width: 0;
    }

    .mob-ed-strip-title {
        font-size: 13px;
        color: var(--color-text);
        font-weight: 600;
    }

    .mob-ed-strip-sub {
        font-size: 11.5px;
        color: var(--color-text-muted);
        margin-top: 1px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* ─── Variant A: Meer page (profile card + tile grid + logout row) ─── */

    .mob-ed--meer {
        padding-bottom: 24px;
    }

    .mob-ed-profile {
        display: flex;
        align-items: center;
        gap: 14px;
        margin: 4px 18px 20px;
        padding: 16px 18px;
        border-radius: 22px;
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--color-water) 8%, transparent), transparent),
            linear-gradient(180deg, var(--color-surface), var(--color-bg));
        border: 1px solid color-mix(in srgb, var(--color-water) 14%, transparent);
    }

    .mob-ed-profile-avatar {
        flex: none;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        background: color-mix(in srgb, var(--color-water) 22%, transparent);
        color: var(--color-water);
        font-family: var(--font-display);
        font-size: 20px;
        font-weight: 700;
    }

    .mob-ed-profile-body {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .mob-ed-profile-name {
        font-family: var(--font-display);
        font-size: 17px;
        font-weight: 600;
        color: var(--color-text);
        line-height: 1.2;
    }

    .mob-ed-profile-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--color-text-muted);
        font-size: 12px;
    }

    .mob-ed-profile-role {
        font-family: var(--font-mono);
        font-size: 10.5px;
        font-weight: 500;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--color-water);
    }

    .mob-ed-profile-sep {
        color: var(--color-text-faint);
    }

    .mob-ed-profile-edit {
        flex: none;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 1px solid var(--color-line);
        background: transparent;
        color: var(--color-text-muted);
        display: grid;
        place-items: center;
        cursor: pointer;
    }

    .mob-ed-profile-edit:active {
        background: rgba(255, 255, 255, 0.04);
    }

    .mob-ed-profile-edit svg {
        width: 18px;
        height: 18px;
    }

    /* Tile grid: 2 columns, big tap targets */
    .mob-ed-tile-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 18px 18px;
    }

    .mob-ed-tile {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-height: 110px;
        padding: 16px 14px 14px;
        border-radius: 18px;
        border: 1px solid color-mix(in srgb, var(--accent, var(--color-text-muted)) 18%, transparent);
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--accent, var(--color-text-muted)) 10%, transparent), transparent),
            var(--color-surface);
        color: var(--color-text);
        cursor: pointer;
        text-align: left;
        font-family: inherit;
        transition: transform 0.12s, background 0.15s;
    }

    .mob-ed-tile:active {
        transform: scale(0.98);
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--accent, var(--color-text-muted)) 16%, transparent), transparent),
            var(--color-surface);
    }

    .mob-ed-tile:disabled {
        cursor: not-allowed;
        opacity: 0.56;
    }

    .mob-ed-tile:disabled:active {
        transform: none;
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--accent, var(--color-text-muted)) 10%, transparent), transparent),
            var(--color-surface);
    }

    .mob-ed-tile-icon {
        display: inline-grid;
        place-items: center;
        width: 36px;
        height: 36px;
        border-radius: 12px;
        background: color-mix(in srgb, var(--accent, var(--color-text-muted)) 18%, transparent);
        color: var(--accent, var(--color-text-muted));
        margin-bottom: 6px;
    }

    .mob-ed-tile-icon svg {
        width: 20px;
        height: 20px;
    }

    .mob-ed-tile-label {
        font-family: var(--font-display);
        font-size: 15px;
        font-weight: 600;
        color: var(--color-text);
        line-height: 1.2;
    }

    .mob-ed-tile-sub {
        font-size: 11.5px;
        color: var(--color-text-muted);
        line-height: 1.3;
    }

    /* Logout row variant */
    .mob-ed-row--logout .mob-ed-row-title {
        color: var(--color-text);
    }

    .mob-ed-row--logout.is-armed {
        background: color-mix(in srgb, var(--color-error) 8%, transparent);
    }

    .mob-ed-row--logout.is-armed .mob-ed-row-title {
        color: var(--color-error);
        font-weight: 600;
    }

    /* .mob-ed-row--cancel is a neutral sibling row used in /meer for the
       Annuleren action when Uitloggen is armed. It uses the base .mob-ed-row
       chrome but a slightly muted title color to signal it's a back-out. */
    .mob-ed-row--cancel .mob-ed-row-title {
        color: var(--color-text-muted);
        font-weight: 500;
    }

    .mob-ed-section-h--context {
        padding-top: 0;
    }

    .mob-ed-context-card {
        margin: 0 18px 18px;
        border: 1px solid color-mix(in srgb, var(--color-line) 70%, transparent);
        border-radius: 22px;
        overflow: hidden;
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--color-surface) 54%, transparent), transparent),
            color-mix(in srgb, var(--color-bg) 46%, transparent);
    }

    .mob-ed-context-row,
    .mob-ed-context-option {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        border: 0;
        border-bottom: 1px solid color-mix(in srgb, var(--color-line) 72%, transparent);
        background: transparent;
        color: inherit;
        font: inherit;
        text-align: left;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
    }

    .mob-ed-context-row {
        min-height: 74px;
        padding: 14px 16px;
    }

    .mob-ed-context-row:active,
    .mob-ed-context-option:active {
        background: color-mix(in srgb, var(--color-surface) 42%, transparent);
    }

    .mob-ed-context-row:last-child,
    .mob-ed-context-options:last-child,
    .mob-ed-context-option:last-child {
        border-bottom: 0;
    }

    .mob-ed-context-icon,
    .mob-ed-context-option-icon {
        display: grid;
        place-items: center;
        flex: none;
        background: color-mix(in srgb, var(--accent, var(--color-text-muted)) 15%, transparent);
        border: 1px solid color-mix(in srgb, var(--accent, var(--color-text-muted)) 18%, transparent);
        color: var(--accent, var(--color-text-muted));
    }

    .mob-ed-context-icon {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .mob-ed-context-option-icon {
        width: 32px;
        height: 32px;
        border-radius: 11px;
    }

    .mob-ed-context-icon svg,
    .mob-ed-context-option-icon svg {
        width: 18px;
        height: 18px;
    }

    .mob-ed-context-body {
        display: flex;
        min-width: 0;
        flex: 1;
        flex-direction: column;
        gap: 2px;
    }

    .mob-ed-context-kicker {
        color: var(--color-text-faint);
        font-family: var(--font-mono);
        font-size: 9.5px;
        font-weight: 600;
        letter-spacing: 0.14em;
        text-transform: uppercase;
    }

    .mob-ed-context-title {
        overflow: hidden;
        color: var(--color-text);
        font-size: 14px;
        font-weight: 700;
        line-height: 1.22;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mob-ed-context-sub {
        overflow: hidden;
        color: var(--color-text-muted);
        font-size: 12px;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mob-ed-context-action {
        margin-left: auto;
        color: var(--color-text-muted);
        font-family: var(--font-mono);
        font-size: 10.5px;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .mob-ed-context-options {
        display: flex;
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid color-mix(in srgb, var(--color-line) 72%, transparent);
        background: color-mix(in srgb, var(--color-bg) 26%, transparent);
    }

    .mob-ed-context-option {
        min-height: 58px;
        padding: 10px 14px 10px 24px;
    }

    .mob-ed-context-option:disabled {
        cursor: default;
        opacity: 1;
    }

    .mob-ed-context-option--selected {
        background: color-mix(in srgb, var(--color-solar) 8%, transparent);
    }

    .mob-ed-rows--admin-tools {
        margin-bottom: 18px;
    }

    .mob-ed-platform-message {
        margin: -8px 18px 18px;
        padding: 10px 12px;
        border-radius: 12px;
        border: 1px solid color-mix(in srgb, var(--color-line) 75%, transparent);
        background: color-mix(in srgb, var(--color-surface) 86%, transparent);
        color: var(--color-text-muted);
        font-size: 12px;
    }

    .mob-ed-platform-message--error {
        border-color: color-mix(in srgb, var(--color-error) 35%, transparent);
        color: var(--color-error);
    }

    /* ─── Variant A: Automatisering page-level chrome ─── */

    .automations-page--mobile {
        padding: 0 0 80px;
    }

    .automations-page-mob-head {
        position: relative;
        padding-bottom: 8px;
    }

    .mob-ed-add-btn {
        margin: 4px 18px 16px;
        padding: 11px 18px;
        border-radius: 14px;
        border: 1px solid color-mix(in srgb, var(--color-solar) 30%, transparent);
        background: color-mix(in srgb, var(--color-solar) 14%, transparent);
        color: var(--color-solar);
        font-family: var(--font-mono);
        font-size: 11.5px;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        cursor: pointer;
        display: block;
        width: calc(100% - 36px);
        text-align: center;
    }

    .mob-ed-add-btn:active {
        background: color-mix(in srgb, var(--color-solar) 22%, transparent);
    }

    .mob-ed-add-btn--improvements {
        border-color: color-mix(in srgb, var(--improvements) 30%, transparent);
        background: color-mix(in srgb, var(--improvements) 14%, transparent);
        color: var(--improvements);
    }

    .mob-ed-add-btn--improvements:active {
        background: color-mix(in srgb, var(--improvements) 22%, transparent);
    }

    /* ─── Variant A: small empty state (used by /comfort with 0 rows) ─── */

    .mob-ed-empty {
        margin: 4px 18px 18px;
        padding: 24px 22px;
        border-radius: 18px;
        border: 1px dashed var(--color-line-strong);
        color: var(--color-text-muted);
        font-size: 13.5px;
        line-height: 1.5;
        text-align: center;
    }
    .mob-ed-empty--error {
        border-color: color-mix(in srgb, var(--color-error) 30%, transparent);
        color: var(--color-error);
    }

    /* ─── Variant A: Energie hero variant (green energy accent) ─── */

    .mob-ed-hero--energy {
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--color-energy) 10%, transparent), transparent),
            linear-gradient(180deg, var(--color-surface), var(--color-bg));
        border-color: color-mix(in srgb, var(--color-energy) 18%, transparent);
    }

    .mob-ed-hero--energy::before {
        background: radial-gradient(closest-side, color-mix(in srgb, var(--color-energy) 28%, transparent), transparent 70%);
    }

    .mob-ed-hero-label--energy {
        color: var(--color-energy);
    }

    .mob-ed-hero-label--energy::before {
        background: var(--color-energy);
        box-shadow: 0 0 10px color-mix(in srgb, var(--color-energy) 70%, transparent);
    }

    /* ─── Variant A: Netwerk hero variant (UniFi blue) ─── */

    .mob-ed-hero--unifi {
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--color-unifi) 10%, transparent), transparent),
            linear-gradient(180deg, var(--color-surface), var(--color-bg));
        border-color: color-mix(in srgb, var(--color-unifi) 18%, transparent);
    }

    .mob-ed-hero--unifi::before {
        background: radial-gradient(closest-side, color-mix(in srgb, var(--color-unifi) 28%, transparent), transparent 70%);
    }

    .mob-ed-hero-label--unifi {
        color: var(--color-unifi);
    }

    .mob-ed-hero-label--unifi::before {
        background: var(--color-unifi);
        box-shadow: 0 0 10px color-mix(in srgb, var(--color-unifi) 70%, transparent);
    }

    /* ─── Variant A: Netwerk device rows (online/offline groups) ─── */

    .mob-ed-rows-group-head {
        padding: 14px 24px 6px;
        font-family: var(--font-mono);
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--color-text-faint);
    }

    .mob-ed-rows-group-head--offline {
        color: color-mix(in srgb, var(--color-error) 80%, var(--color-text-faint));
    }

    .mob-ed-row-status-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        flex: none;
        background: var(--color-text-faint);
    }

    .mob-ed-row-status-dot--online { background: var(--color-energy); box-shadow: 0 0 6px color-mix(in srgb, var(--color-energy) 60%, transparent); }
    .mob-ed-row-status-dot--offline { background: var(--color-error); }
    .mob-ed-row-status-dot--updating { background: var(--color-solar); }

    .mob-ed-row-fw-badge {
        padding: 2px 8px;
        border-radius: 999px;
        background: color-mix(in srgb, var(--color-solar) 18%, transparent);
        color: var(--color-solar);
        font-family: var(--font-mono);
        font-size: 9.5px;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    /* ─── Variant A: Comfort hero variants (water/pool/climate/heatpump/tado) ─── */

    .mob-ed-hero--water {
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--color-water) 10%, transparent), transparent),
            linear-gradient(180deg, var(--color-surface), var(--color-bg));
        border-color: color-mix(in srgb, var(--color-water) 18%, transparent);
    }
    .mob-ed-hero--water::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--color-water) 28%, transparent), transparent 70%); }
    .mob-ed-hero-label--water { color: var(--color-water); }
    .mob-ed-hero-label--water::before { background: var(--color-water); box-shadow: 0 0 10px color-mix(in srgb, var(--color-water) 70%, transparent); }

    .mob-ed-hero--pool {
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--color-pool) 10%, transparent), transparent),
            linear-gradient(180deg, var(--color-surface), var(--color-bg));
        border-color: color-mix(in srgb, var(--color-pool) 18%, transparent);
    }
    .mob-ed-hero--pool::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--color-pool) 28%, transparent), transparent 70%); }
    .mob-ed-hero-label--pool { color: var(--color-pool); }
    .mob-ed-hero-label--pool::before { background: var(--color-pool); box-shadow: 0 0 10px color-mix(in srgb, var(--color-pool) 70%, transparent); }

    .mob-ed-hero--climate {
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--color-climate) 10%, transparent), transparent),
            linear-gradient(180deg, var(--color-surface), var(--color-bg));
        border-color: color-mix(in srgb, var(--color-climate) 18%, transparent);
    }
    .mob-ed-hero--climate::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--color-climate) 28%, transparent), transparent 70%); }
    .mob-ed-hero-label--climate { color: var(--color-climate); }
    .mob-ed-hero-label--climate::before { background: var(--color-climate); box-shadow: 0 0 10px color-mix(in srgb, var(--color-climate) 70%, transparent); }

    .mob-ed-hero--heatpump {
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--color-heatpump) 10%, transparent), transparent),
            linear-gradient(180deg, var(--color-surface), var(--color-bg));
        border-color: color-mix(in srgb, var(--color-heatpump) 18%, transparent);
    }
    .mob-ed-hero--heatpump::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--color-heatpump) 28%, transparent), transparent 70%); }
    .mob-ed-hero-label--heatpump { color: var(--color-heatpump); }
    .mob-ed-hero-label--heatpump::before { background: var(--color-heatpump); box-shadow: 0 0 10px color-mix(in srgb, var(--color-heatpump) 70%, transparent); }

    .mob-ed-hero--tado {
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--color-tado) 10%, transparent), transparent),
            linear-gradient(180deg, var(--color-surface), var(--color-bg));
        border-color: color-mix(in srgb, var(--color-tado) 18%, transparent);
    }
    .mob-ed-hero--tado::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--color-tado) 28%, transparent), transparent 70%); }
    .mob-ed-hero-label--tado { color: var(--color-tado); }
    .mob-ed-hero-label--tado::before { background: var(--color-tado); box-shadow: 0 0 10px color-mix(in srgb, var(--color-tado) 70%, transparent); }

    .mob-ed-hero--garden {
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--color-garden) 10%, transparent), transparent),
            linear-gradient(180deg, var(--color-surface), var(--color-bg));
        border-color: color-mix(in srgb, var(--color-garden) 18%, transparent);
    }
    .mob-ed-hero--garden::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--color-garden) 28%, transparent), transparent 70%); }
    .mob-ed-hero-label--garden { color: var(--color-garden); }
    .mob-ed-hero-label--garden::before { background: var(--color-garden); box-shadow: 0 0 10px color-mix(in srgb, var(--color-garden) 70%, transparent); }

    .mob-ed-hero--clean {
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--color-clean) 10%, transparent), transparent),
            linear-gradient(180deg, var(--color-surface), var(--color-bg));
        border-color: color-mix(in srgb, var(--color-clean) 18%, transparent);
    }
    .mob-ed-hero--clean::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--color-clean) 28%, transparent), transparent 70%); }
    .mob-ed-hero-label--clean { color: var(--color-clean); }
    .mob-ed-hero-label--clean::before { background: var(--color-clean); box-shadow: 0 0 10px color-mix(in srgb, var(--color-clean) 70%, transparent); }

    /* Immersive mobile hero — matches desktop content surfaces. Accent glow comes
       from the base/accent ::before. Added AFTER the accent modifiers so this
       surface wins the cascade. */
    .mob-ed-hero--immersive {
        background: var(--color-content-surface);
        border-color: var(--color-content-line);
    }
    .mob-ed-hero--immersive .mob-ed-hero-num { color: var(--color-content-text); }
    .mob-ed-hero--immersive .mob-ed-hero-num small { color: var(--color-content-text-muted); }
    .mob-ed-hero--immersive .mob-ed-hero-sub { color: var(--color-content-text-muted); }
    .mob-ed-hero--immersive .mob-ed-hero-stat .l { color: var(--color-content-text-faint); }
    .mob-ed-hero--immersive .mob-ed-hero-stat .v { color: var(--color-content-text); }
    .mob-ed-hero--immersive .mob-ed-hero-row { border-top-color: var(--color-content-line); }
    .mob-ed-hero-vis {
        margin-top: 18px;
        padding-top: 16px;
        border-top: 1px solid var(--color-content-line);
    }
    .mob-ed-hero-vis .hero-spark-svg { height: 58px; }

    /* ─── Variant A: Comfort control sections (power btn + mode pills wrapper) ─── */

    .mob-ed-controls {
        margin: 0 18px 18px;
        padding: 14px 16px;
        border-radius: 18px;
        background: var(--color-surface);
        border: 1px solid var(--color-line);
    }

    .mob-ed-controls-label {
        font-family: var(--font-mono);
        font-size: 10.5px;
        font-weight: 500;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--color-text-muted);
        margin-bottom: 10px;
    }

    /* ─── Variant A: Energie chart card (intraday + month chart wrapper) ─── */

    .mob-ed-energie-chart-card {
        margin: 4px 18px 24px;
        padding: 12px 14px 14px;
        border-radius: 22px;
        background: var(--color-card);
        border: 1px solid var(--color-line);
    }

    .mob-ed-energie-chart-pills {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        margin-bottom: 10px;
    }

    .mob-ed-energie-chart-pills .solar-mobile-pill {
        padding: 4px 10px;
        border-radius: 999px;
        background: color-mix(in srgb, var(--color-line) 60%, transparent);
        color: var(--color-text-soft);
        font-family: var(--font-mono);
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.04em;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .mob-ed-energie-chart-pills .pool-temp-range-btn {
        min-height: 25px;
        padding: 4px 10px;
        font-family: var(--font-mono);
        font-size: 10px;
        font-weight: 600;
    }

    .mob-ed-energie-chart-expand {
        margin-left: auto;
        flex: none;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        border: 1px solid var(--color-line);
        background: transparent;
        color: var(--color-text-muted);
        display: grid;
        place-items: center;
        cursor: pointer;
    }

    .mob-ed-energie-chart-expand:active {
        background: rgba(255, 255, 255, 0.04);
    }

    .mob-ed-energie-chart-expand svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 640px) {
    .overview-mobile {
        padding: 12px 12px 20px;
        gap: 10px;
    }

    .overview-mobile-cards {
        gap: 8px;
    }

    .overview-mobile-domains {
        gap: 8px;
    }
}

/* Solar mobile layout (Phase 3) ────────────────────────────────────────── */

@media (max-width: 1100px) {
    /* Outer scroll container */
    .solar-mobile {
        display: flex;
        flex-direction: column;
        gap: 24px;
        padding: 16px 16px 32px;
    }

    /* Each named section: Nu / Vandaag / Maand */
    .solar-mobile-section {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* Section eyebrow label */
    .solar-mobile-eyebrow {
        color: var(--color-text-muted);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        padding: 0 2px 2px;
    }

    /* 2×2 (or 3-cell flex) grid of SummaryCards */
    .solar-mobile-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    /* Stat rows block with card background */
    .solar-mobile-stat-block {
        padding: 4px 16px;
        border: 1px solid color-mix(in srgb, var(--color-line-strong) 62%, transparent);
        border-radius: 16px;
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--color-bg-alt) 10%, transparent), transparent 64%),
            var(--color-card);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.07),
            var(--shadow-soft);
    }

    /* Month navigation row */
    .solar-mobile-month-nav {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .solar-mobile-month-nav--inset {
        padding: 0 18px 12px;
    }

    .solar-mobile-month-label {
        flex: 1 1 0;
        text-align: center;
        font-family: var(--font-display);
        font-size: 0.96rem;
        font-weight: 700;
        letter-spacing: 0;
        color: var(--color-text);
    }

    .solar-mobile-nav-btn {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
        border: 1px solid var(--color-line-strong);
        border-radius: 12px;
        background: transparent;
        color: var(--color-text-soft);
        font-size: 1.3rem;
        line-height: 1;
        cursor: pointer;
        display: inline-grid;
        place-items: center;
        transition: background 140ms ease;
    }

    .solar-mobile-nav-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

    .solar-mobile-nav-btn:not(:disabled):active {
        background: transparent;
    }

    .month-chart-year-nav-btn--push-start {
        margin-right: auto;
    }

    .month-chart-year-nav-btn--flush-start {
        margin-left: 0;
    }

    /* Summary pill in InlineChartCard header */
    .solar-mobile-pill {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 3px 8px;
        border-radius: 999px;
        background: transparent;
        border: 1px solid var(--color-line);
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--color-text-soft);
        white-space: nowrap;
    }

    .solar-mobile-pill-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .solar-mobile-pill-dot--pv   { background: var(--chart-solar); }
    .solar-mobile-pill-dot--load { background: var(--chart-loads); }
    .solar-mobile-pill-dot--net,
    .solar-mobile-pill-dot--export { background: var(--chart-feedin); }
    .solar-mobile-pill-dot--import { background: var(--chart-grid-import); }

    .mob-ed-empty--error {
        border-color: color-mix(in srgb, var(--color-error) 30%, transparent);
        color: var(--color-error);
    }

    /* Inline chart preview wrapper — fills the InlineChartCard body slot */
    .solar-mobile-chart-preview {
        position: relative;
        width: 100%;
        overflow: hidden;
    }

    /* SVG in preview mode: scale to fit width, no scroll */
    .day-chart-svg--preview {
        display: block;
        width: 100%;
        height: auto;
    }

    /* In preview, hide y-axis labels and y-unit */
    .day-chart-svg--preview .chart-axis-label--y-preview,
    .solar-mobile-chart-preview .chart-axis-unit {
        display: none;
    }

    /* In preview, show only a sparse subset of time ticks (declared explicitly in template) */
    .chart-axis-label--time-preview {
        /* visible — but hidden if nested under .day-chart-svg--preview via selector below */
    }

    /* Month bar chart preview: fixed-height and no horizontal scroll */
    .solar-mobile-chart-preview--month {
        overflow: hidden;
    }

    .day-chart-svg--month-preview {
        display: block;
        width: 100%;
        height: auto;
    }

    .solar-mobile-analysis-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        width: 100%;
        padding: 16px;
        border: 1px solid var(--color-line);
        border-radius: 20px;
        background: var(--color-card);
        color: var(--color-text);
        text-align: left;
        cursor: pointer;
    }

    .solar-mobile-analysis-copy {
        display: grid;
        gap: 4px;
        min-width: 0;
    }

    .solar-mobile-analysis-title {
        font-family: var(--font-display);
        font-size: 0.96rem;
        font-weight: 700;
        letter-spacing: 0;
    }

    .solar-mobile-analysis-detail {
        color: var(--color-text-soft);
        font-size: 0.84rem;
        line-height: 1.4;
    }

    .solar-mobile-analysis-chevron {
        color: var(--color-text-muted);
        font-size: 1.3rem;
        font-weight: 700;
        flex-shrink: 0;
    }

    /* Fullscreen chart sheet contents */
    .solar-fs-chart-wrap {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
        flex: 1 1 0;
        min-height: 0;
    }

    .solar-fs-stat-block {
        flex-shrink: 0;
    }

    .solar-fs-month-nav {
        flex-shrink: 0;
    }

    /* Fullscreen chart scroll area for day chart (allows pinch-scroll on wide SVG) */
    .solar-fs-chart-scroll {
        flex: 1 1 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }

    .solar-fs-svg {
        display: block;
        width: 100%;
        min-width: 560px;
        height: auto;
    }

    /* Fullscreen month bars: horizontal scroll allowed */
    .solar-fs-chart-scroll--bars {
        overflow-x: auto;
    }

    .solar-fs-svg--bars {
        display: block;
        width: 100%;
        min-width: 560px;
        height: auto;
    }
}

@media (max-width: 640px) {
    .solar-mobile {
        padding: 12px 12px 28px;
        gap: 20px;
    }

    .solar-mobile-section {
        gap: 10px;
    }

    .solar-mobile-cards {
        gap: 8px;
    }
}

/* Phase 5 — Comfort mobile layouts ─────────────────────────────────────── */

@media (max-width: 1100px) {

    /* Shared comfort screen wrapper */
    .water-mobile,
    .pool-mobile,
    .climate-mobile,
    .heatpump-mobile {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding-bottom: 16px;
    }

    /* Stat block: wraps StatRows below controls */
    .comfort-stat-block {
        padding: 4px 16px;
        border: 1px solid var(--color-line);
        border-radius: 16px;
        background: var(--color-card);
    }

    /* Power toggle button — large touch target */
    .comfort-power-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 64px;
        height: 44px;
        padding: 0 18px;
        border-radius: 20px;
        border: 1.5px solid var(--color-line-strong);
        background: var(--color-line-strong);
        color: var(--color-text-soft);
        font-size: 0.88rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        cursor: pointer;
        transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
        -webkit-tap-highlight-color: transparent;
    }

    .comfort-power-btn:active {
        background: var(--color-line);
    }

    .comfort-power-btn--on {
        border-color: var(--color-success);
        background: var(--color-success-soft);
        color: var(--color-success);
    }

    .comfort-power-btn--small {
        min-width: 48px;
        height: 44px;
        padding: 0 12px;
        font-size: 0.80rem;
    }

    .comfort-power-btn:disabled {
        opacity: 0.45;
        pointer-events: none;
    }

    /* Mode pills — segmented-control style */
    .comfort-mode-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 44px;
        padding: 0 14px;
        border-radius: 20px;
        border: 1.5px solid var(--color-line);
        background: var(--color-bg-soft);
        color: var(--color-text-soft);
        font-size: 0.84rem;
        font-weight: 600;
        cursor: pointer;
        transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
        -webkit-tap-highlight-color: transparent;
        white-space: nowrap;
    }

    .comfort-mode-pill:active {
        background: var(--color-line);
    }

    .comfort-mode-pill--active {
        border-color: var(--color-water);
        background: var(--color-water-soft);
        color: var(--color-water);
    }

    .comfort-mode-pill:disabled {
        opacity: 0.35;
        pointer-events: none;
    }

    /* Multi-device list block */
    .climate-device-block {
        border: 1px solid var(--color-line);
        border-radius: 18px;
        background: var(--color-card);
        overflow: hidden;
    }

    /* Always-visible device row (tap to expand) */
    .climate-device-row {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }

    .climate-device-row:active {
        background: transparent;
    }

    /* Keyboard focus ring for the role="button" expandable rows (A11Y-05).
       Inset so it reads as the row's own focus state without overflowing. */
    .climate-device-row:focus-visible {
        outline: 2px solid var(--color-focus-outline);
        outline-offset: -2px;
    }

    .climate-device-row-info {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .climate-device-row-name {
        font-size: 0.92rem;
        font-weight: 700;
        color: var(--color-text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .climate-device-row-detail {
        font-size: 0.78rem;
        color: var(--color-text-soft);
    }

    .climate-device-row-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
    }

    .climate-device-expand-chevron {
        display: inline-block;
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--color-text-muted);
        transform: rotate(0deg);
        transition: transform 200ms ease;
        line-height: 1;
    }

    .climate-device-expand-chevron--open {
        transform: rotate(90deg);
    }

    /* Expanded controls area */
    .climate-device-expanded {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 0 12px 14px;
        border-top: 1px solid var(--color-line);
    }

    .climate-device-expanded .action-block {
        border-radius: 14px;
    }

    .climate-device-expanded .comfort-stat-block {
        border-radius: 12px;
    }
}

/* Climate history + usage insight panel ────────────────────────────────────── */
.climate-insight-panel {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-card);
}
.climate-insight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.climate-insight-device {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}
.climate-insight-tooltip {
    font-size: 0.82rem;
    color: var(--color-text);
    padding: 2px 0 6px;
}
.climate-range-pills {
    display: inline-flex;
    gap: 6px;
}
.climate-insight-header h2 {
    margin: 0;
    font-size: 1rem;
}
.climate-range-pills button {
    border: 1px solid var(--color-border);
    background: var(--surface-2);
    color: var(--color-text);
    border-radius: 999px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.82rem;
    font-family: inherit;
}
.climate-range-pills button:focus-visible {
    outline: 2px solid var(--color-climate);
    outline-offset: 2px;
}
.climate-range-pills button.active {
    border-color: var(--color-climate);
    color: var(--color-climate);
}
.climate-usage-svg {
    margin-top: 8px;
}

/* Reactief klimaat quick-entry panel ───────────────────────────────────────── */
.climate-reactive-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-card);
}
.climate-reactive-panel h2 {
    margin: 0;
    font-size: 1rem;
}
.climate-reactive-panel p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Mobile editorial chrome for the climate panels. NOTE: this block must stay
   AFTER the base rules above — media queries add no specificity, so an
   earlier override would lose to the later 8px base declaration. */
@media (max-width: 1100px) {
    .climate-insight-panel,
    .climate-reactive-panel {
        border-radius: 18px;
    }
}

/* Phase 6 — Settings / Users / Profile mobile layouts ────────────────────── */
@media (max-width: 1100px) {

    /* ── Shared mobile page shell ── */
    .mobile-settings-page {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding-bottom: calc(env(safe-area-inset-bottom) + 100px);
    }

    /* ── iOS-style grouped list sections ── */
    .mobile-list-section {
        margin: 20px 16px 0;
    }

    .mobile-list-section--flush {
        margin: 0;
    }

    .mobile-list-section--spaced {
        margin-top: 16px;
    }

    .mobile-list-header {
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--color-text-muted);
        padding: 0 4px 6px;
    }

    .mobile-list-body {
        background: var(--color-card);
        border: 1px solid var(--color-line);
        border-radius: 14px;
        overflow: hidden;
    }

    .mobile-list-body--sheet {
        border-radius: 12px;
    }

    .mobile-list-row {
        display: flex;
        align-items: center;
        min-height: 52px;
        padding: 10px 16px;
        /* border:0 clears button defaults; the border-bottom that follows
           re-applies the row separator. Without this, <button class="mobile-list-row">
           in the Integraties section renders with a native 4-side button border
           that overlaps the row hairline. */
        border: 0;
        border-bottom: 1px solid var(--color-line-strong);
        gap: 10px;
        background: transparent;
        width: 100%;
        text-align: left;
        color: var(--color-text);
        cursor: default;
        /* Button-safety resets: the row is used as both <div> (woningen) and
           <button> (integraties + chevron variant). The button form inherits
           native font + appearance without these. */
        font: inherit;
        box-sizing: border-box;
        appearance: none;
        -webkit-appearance: none;
    }

    .mobile-list-row:last-child {
        border-bottom: none;
    }

    button.mobile-list-row,
    .mobile-list-row--chevron {
        cursor: pointer;
        transition: background 120ms ease;
    }

    button.mobile-list-row:active,
    .mobile-list-row--chevron:active {
        background: var(--color-line);
    }

    .mobile-list-row--form {
        flex-direction: column;
        align-items: stretch;
        min-height: 64px;
        padding: 10px 16px 12px;
        gap: 4px;
    }

    .mobile-list-row--home {
        cursor: default;
    }

    .mobile-list-row--location {
        min-height: 58px;
        background: color-mix(in srgb, var(--color-surface) 38%, transparent);
    }

    .mobile-list-row--active .mobile-list-row-title {
        color: var(--color-solar);
    }

    .mobile-list-row-left {
        flex: 1;
        min-width: 0;
    }

    .mobile-list-row-title {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--color-text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-list-row-sub {
        font-size: 0.78rem;
        color: var(--color-text-muted);
        display: flex;
        align-items: center;
        gap: 5px;
        margin-top: 2px;
        flex-wrap: wrap;
    }

    .mobile-list-row-right {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    .mobile-list-row-right--actions {
        gap: 6px;
    }

    .mobile-list-chevron {
        font-size: 1.3rem;
        color: var(--color-text-muted);
        line-height: 1;
    }

    /* ── Form inputs inside rows ── */
    .mobile-form-label {
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--color-text-muted);
        letter-spacing: 0.02em;
        display: block;
    }

    .mobile-form-input {
        width: 100%;
        background: var(--color-line-strong);
        border: 1px solid var(--color-line-strong);
        border-radius: 8px;
        padding: 10px 12px;
        font-size: 1rem;
        color: var(--color-text);
        min-height: 44px;
        outline: none;
        transition: border-color 150ms ease;
        font-family: inherit;
    }

    .mobile-form-input:focus {
        border-color: var(--color-text-muted);
    }

    /* WCAG 2.4.7: outline: none above strips the default ring; restore a visible
       indicator for keyboard users on these inline mobile forms. */
    .mobile-form-input:focus-visible,
    .mobile-form-select:focus-visible {
        outline: 0;
        border-color: var(--color-focus-outline);
        box-shadow: 0 0 0 3px var(--color-focus-ring);
    }

    .mobile-form-select {
        background: var(--color-line-strong);
        border: 1px solid var(--color-line-strong);
        border-radius: 8px;
        padding: 8px 12px;
        font-size: 0.9rem;
        color: var(--color-text);
        min-height: 44px;
        outline: none;
        font-family: inherit;
    }

    .mobile-location-edit {
        display: grid;
        gap: 8px;
    }

    .mobile-location-results {
        display: grid;
        gap: 6px;
    }

    .mobile-location-result {
        width: 100%;
        min-height: 42px;
        padding: 8px 10px;
        border: 1px solid var(--color-line-strong);
        border-radius: 10px;
        background: var(--color-surface);
        color: var(--color-text);
        font: inherit;
        text-align: left;
    }

    /* ── Primary action button ── */
    .mobile-action-button {
        display: block;
        width: calc(100% - 32px);
        margin: 12px 16px 0;
        padding: 14px 20px;
        min-height: 52px;
        background: rgba(var(--color-water-light-rgb), 0.15);
        border: 1px solid rgba(var(--color-water-light-rgb), 0.25);
        border-radius: 14px;
        color: var(--color-water);
        font-size: 1rem;
        font-weight: 600;
        font-family: inherit;
        text-align: center;
        cursor: pointer;
        transition: background 120ms ease;
    }

    .mobile-action-button:active {
        background: rgba(var(--color-water-light-rgb), 0.22);
    }

    .mobile-action-button:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

    .mobile-action-button--secondary {
        background: var(--color-line);
        border-color: var(--color-line-strong);
        color: var(--color-text-soft);
    }

    .mobile-action-button--danger {
        background: rgba(var(--color-error-light-rgb), 0.12);
        border-color: rgba(var(--color-error-light-rgb), 0.25);
        color: var(--color-error);
    }

    /* ── Small row buttons ── */
    .mobile-row-btn {
        padding: 6px 12px;
        min-height: 44px;
        border-radius: 8px;
        background: var(--color-line);
        border: 1px solid var(--color-line-strong);
        color: var(--color-text-soft);
        font-size: 0.8rem;
        font-weight: 600;
        font-family: inherit;
        cursor: pointer;
        white-space: nowrap;
    }

    .mobile-row-btn--danger {
        background: rgba(var(--color-error-light-rgb), 0.1);
        border-color: rgba(var(--color-error-light-rgb), 0.2);
        color: var(--color-error);
    }

    /* ── Feedback messages ── */
    .mobile-section-feedback {
        margin: 8px 16px 0;
        padding: 10px 14px;
        border-radius: 10px;
        font-size: 0.85rem;
        background: var(--color-bg-alt);
        border: 1px solid var(--color-line);
    }

    .mobile-feedback-error {
        color: var(--color-error);
    }

    .mobile-feedback-success {
        color: var(--color-success);
    }

    /* ── BottomSheet confirm pattern ── */
    .mobile-sheet-confirm {
        padding: 4px 0 8px;
    }

    .mobile-sheet-confirm-text {
        font-size: 0.95rem;
        color: var(--color-text-soft);
        line-height: 1.5;
        margin-bottom: 20px;
    }

    .mobile-sheet-confirm-actions {
        display: flex;
        gap: 10px;
    }

    .mobile-sheet-btn {
        flex: 1;
        padding: 14px 16px;
        min-height: 52px;
        border-radius: 14px;
        font-size: 1rem;
        font-weight: 600;
        font-family: inherit;
        cursor: pointer;
        transition: background 120ms ease;
    }

    .mobile-sheet-btn--cancel {
        background: var(--color-line);
        border: 1px solid var(--color-line-strong);
        color: var(--color-text-soft);
    }

    .mobile-sheet-btn--danger {
        background: rgba(var(--color-error-light-rgb), 0.14);
        border: 1px solid rgba(var(--color-error-light-rgb), 0.28);
        color: var(--color-error);
    }

    /* ── Service icon in integration rows ──
       Mirrors desktop `.integration-icon` chrome: rounded bordered circle
       with the SVG centered inside, color-coded by connection state.
       state-active = green (Verbonden), state-error = red (Controleer),
       default = muted gray (Niet geconfigureerd / Laden). The bordered
       circle treatment is what was missing — without it, icons rendered
       at the default text color and looked the same in every state. */
    .mobile-svc-icon {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        border-radius: 999px;
        border: 1px solid var(--color-line-strong);
        background: transparent;
        display: grid;
        place-items: center;
        color: var(--color-text-muted);
    }

    .mobile-svc-icon svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
    }

    .mobile-svc-icon.state-active { border-color: var(--color-success-soft); color: var(--color-success); }
    .mobile-svc-icon.state-error  { border-color: var(--color-error-soft);   color: var(--color-error); }

    /* ── Profile hero ── */
    .mobile-profile-hero {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 24px 16px 8px;
    }

    .mobile-profile-avatar {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: rgba(var(--color-water-light-rgb), 0.15);
        border: 1px solid rgba(var(--color-water-light-rgb), 0.25);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        font-weight: 700;
        color: var(--color-water);
        flex-shrink: 0;
    }

    .mobile-profile-name {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--color-text);
    }

    .mobile-profile-role {
        font-size: 0.78rem;
        color: var(--color-text-muted);
        margin-top: 2px;
    }

    /* ── Shared admin mobile header ── */
    .mobile-page-header,
    .mobile-users-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 20px 16px 4px;
    }

    .mobile-page-header > div {
        min-width: 0;
    }

    .mobile-page-eyebrow {
        color: var(--color-text-faint);
        font-family: var(--font-mono);
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        margin-bottom: 3px;
    }

    .mobile-page-title,
    .mobile-users-title {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--color-text);
        line-height: 1.2;
    }

    .mobile-page-action,
    .mobile-users-add-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px 16px;
        min-height: 44px;
        border-radius: 10px;
        background: rgba(var(--color-water-light-rgb), 0.12);
        border: 1px solid rgba(var(--color-water-light-rgb), 0.22);
        color: var(--color-water);
        font-size: 0.88rem;
        font-weight: 600;
        font-family: inherit;
        cursor: pointer;
        text-decoration: none;
        white-space: nowrap;
    }

    .mobile-users-brief {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin: 12px 16px 0;
        padding: 12px;
        border: 1px solid var(--color-line);
        border-radius: var(--radius-sm);
        background:
            linear-gradient(180deg, color-mix(in srgb, var(--color-surface) 72%, transparent), transparent),
            var(--color-card);
    }

    .mobile-users-brief-item {
        min-width: 0;
    }

    .mobile-users-brief-item span {
        display: block;
        overflow: hidden;
        color: var(--color-text-faint);
        font-family: var(--font-mono);
        font-size: 9px;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-overflow: ellipsis;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .mobile-users-brief-item strong {
        display: block;
        margin-top: 5px;
        color: var(--color-text);
        font-size: 1rem;
        font-weight: 750;
        line-height: 1.1;
    }

    .mobile-users-brief-item em {
        display: block;
        overflow: hidden;
        margin-top: 2px;
        color: var(--color-text-muted);
        font-size: 0.68rem;
        font-style: normal;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-users-brief-item--attention strong {
        color: var(--color-warning-text);
    }

    /* ── User row ── */
    .mobile-user-row {
        cursor: pointer;
    }

    .mobile-user-row-meta {
        overflow: hidden;
        margin-top: 3px;
        color: var(--color-text-faint);
        font-size: 0.72rem;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-user-role-badge {
        display: inline-block;
        padding: 2px 7px;
        border-radius: 6px;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.03em;
    }

    .mobile-user-role-badge.admin {
        background: var(--color-heatpump-soft);
        color: var(--color-heatpump);
    }

    .mobile-user-role-badge.operator {
        background: var(--color-success-soft);
        color: var(--color-success);
    }

    .mobile-user-role-badge.viewer {
        background: var(--color-bg-soft);
        color: var(--color-text-muted);
    }

    .mobile-online-dot {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .mobile-online-dot.active {
        background: var(--color-success);
        box-shadow: 0 0 5px var(--color-success);
    }

    .mobile-online-dot.inactive {
        background: var(--color-text-muted);
    }

    .mobile-online-dot.never {
        background: var(--color-warning);
    }

    /* ── User detail sheet body ── */
    .mobile-sheet-user-detail {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding-bottom: 8px;
    }

    .mobile-sheet-danger-zone {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-top: 8px;
        border-top: 1px solid var(--color-line);
        padding-top: 8px;
    }

    .mobile-home-access-row {
        cursor: pointer;
    }

    .mobile-checkbox {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
        accent-color: var(--color-water);
    }

    .mobile-mono {
        font-family: var(--font-mono);
        font-size: 0.75rem;
    }

    /* ── Sheet service form padding ── */
    .mobile-sheet-service {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding-bottom: 8px;
    }

    .mobile-sheet-service-actions {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 640px) {
    .mobile-list-section {
        margin: 16px 12px 0;
    }

    .mobile-list-section--flush {
        margin: 0;
    }

    .mobile-list-section--spaced {
        margin-top: 16px;
    }

    .mobile-action-button {
        width: calc(100% - 24px);
        margin-left: 12px;
        margin-right: 12px;
    }

    .mobile-section-feedback {
        margin-left: 12px;
        margin-right: 12px;
    }

    .mobile-page-header,
    .mobile-users-header {
        padding-left: 12px;
        padding-right: 12px;
    }

    .mobile-profile-hero {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* On mobile, rise-in stagger (up to 780ms) causes perceived tab-switch lag.
   Collapse to a quick 120ms fade — no translateY, no long delays. */
@media (max-width: 1100px) {
    .hero,
    .day-chart-card,
    .settings-card,
    .settings-section,
    .audit-block,
    .device-card,
    .status-card,
    .services-section,
    .page-header {
        animation-duration: 120ms !important;
        animation-delay: 0ms !important;
    }

    @keyframes rise-in {
        from { opacity: 0; transform: none; }
        to   { opacity: 1; transform: none; }
    }
}


