.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-shell { width: min(100%, 390px); }
.login-card {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background:
        radial-gradient(circle at 0 0, rgba(255,255,255,.045), transparent 45%),
        linear-gradient(145deg, rgba(24,27,29,.98), rgba(13,15,17,.99));
    box-shadow: 0 30px 80px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.03);
}
.login-logo { display: block; width: min(100%, 270px); height: auto; margin-bottom: 30px; }
.login-kicker {
    margin: 0 0 7px;
    color: var(--yellow);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.login-card h1 { margin: 0; font-size: 27px; letter-spacing: -.5px; }
.login-copy { margin: 8px 0 25px; color: var(--muted); font-size: 13px; }
.login-form { display: grid; gap: 9px; }
.login-form label { color: #c9cccb; font-size: 12px; font-weight: 650; }
.login-form input {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid #3a4043;
    border-radius: 8px;
    outline: none;
    color: white;
    background: #0c0f11;
    font: inherit;
}
.login-form input:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(246,184,23,.16); }
.login-form input[aria-invalid="true"] { border-color: var(--red); }
.login-error { margin: 0; color: #ff7777; font-size: 11px; }
.login-form button {
    height: 44px;
    margin-top: 7px;
    border: 0;
    border-radius: 8px;
    color: #17120a;
    background: linear-gradient(180deg, #ffd65a, #f6b817);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(246,184,23,.22);
}
.login-form button:hover { background: linear-gradient(180deg, #ffe078, #ffc400); }
.shell { width: min(1740px, calc(100% - 36px)); margin: auto; }
.topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    height: 58px;
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.5vw, 32px);
    background: rgba(9,11,13,.9);
    backdrop-filter: blur(14px);
}
.topbar::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #24282b 18%, #24282b 82%, transparent);
}
.brand {
    display: block;
    width: clamp(132px, 12vw, 172px);
    line-height: 0;
}
.brand img {
    display: block;
    width: 100%;
    height: auto;
}
.brand-fallback {
    position: relative;
    display: none;
    color: var(--yellow);
    font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
    font-size: clamp(27px, 2.8vw, 40px);
    font-style: italic;
    font-weight: 950;
    line-height: .9;
    letter-spacing: -1.5px;
    white-space: nowrap;
}
.brand-fallback::before, .brand-fallback::after {
    content: "";
    position: absolute;
    left: 0;
    width: 96%;
    height: 4px;
    background: var(--yellow);
    transform: skewX(-12deg);
}
.brand-fallback::before { top: -9px; }
.brand-fallback::after { bottom: -10px; }
.primary-nav {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid #2c3134;
    border-radius: 8px;
    background: rgba(15,18,20,.82);
}
.primary-nav a {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    border-radius: 5px;
    color: #929899;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}
.primary-nav a:hover { color: #e8e9e8; background: #1b1f22; }
.primary-nav a.active {
    color: #17120a;
    background: linear-gradient(180deg, #ffd65a, #f6b817);
    box-shadow: 0 4px 12px rgba(0,166,190,.24);
}
.selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
}
.selector select {
    height: 36px;
    min-width: 220px;
    padding: 0 36px 0 12px;
    border: 1px solid #2c3134;
    border-radius: 8px;
    color: var(--ink);
    background: linear-gradient(180deg, #171a1d, #111416);
    font-size: 13px;
    font-weight: 620;
    cursor: pointer;
    outline: none;
    box-shadow: inset 0 1px rgba(255,255,255,.02), 0 8px 24px rgba(0,0,0,.15);
}
.selector select:hover, .selector select:focus {
    border-color: var(--vision-dark);
    box-shadow: 0 0 0 3px rgba(85,214,210,.12);
}
.live {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid #2b302f;
    border-radius: 999px;
    color: #c9cccb;
    background: rgba(20,24,23,.7);
    font-size: 11px;
}
.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(77,169,61,.13);
}
.selector .live { flex: 0 0 auto; }
.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(250px, 1fr);
    gap: 14px;
    align-items: start;
}
.right-column {
    min-width: 0;
    display: grid;
    grid-auto-rows: max-content;
    align-self: start;
    gap: 14px;
}
.sensor-grid {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
}
.card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background:
        radial-gradient(circle at 0 0, rgba(255,255,255,.035), transparent 43%),
        linear-gradient(145deg, rgba(24,27,29,.98), rgba(13,15,17,.99));
    box-shadow: 0 14px 44px rgba(0,0,0,.16), inset 0 1px rgba(255,255,255,.02);
}
.hero {
    position: relative;
    min-width: 0;
    height: 520px;
    min-height: 520px;
    background:
        radial-gradient(circle at 50% 35%, #202428, #080a0b 72%);
}
.hero > a {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    touch-action: pan-y;
}
.hero > a.pannable {
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-color: rgba(255,255,255,.76) rgba(255,255,255,.12);
    scrollbar-width: thin;
}
.hero > a.pannable::-webkit-scrollbar { width: 8px; height: 8px; }
.hero > a.pannable::-webkit-scrollbar-track { background: rgba(255,255,255,.12); }
.hero > a.pannable::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255,255,255,.76);
}
.hero > a.pannable { cursor: grab; }
.hero > a.dragging { cursor: grabbing; }
.hero img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    filter: saturate(.92) contrast(1.04);
    cursor: inherit;
    user-select: none;
    -webkit-user-drag: none;
    transition: opacity .18s ease;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 0;
    padding: 11px 14px 10px;
    border-radius: 11px 0 9px 0;
    background: linear-gradient(135deg, rgba(21,28,39,.92), rgba(19,25,34,.75));
    backdrop-filter: blur(12px);
    line-height: 1.3;
    pointer-events: none;
    box-shadow: 8px 8px 22px rgba(0,0,0,.13);
}
.hero-overlay strong { display: block; margin-bottom: 2px; font-size: 13px; white-space: nowrap; }
.hero-overlay-camera { color: #b8bdbc; font-size: 10px; white-space: nowrap; }
.latest-action {
    position: absolute;
    z-index: 4;
    top: 16px;
    right: 16px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid #b98a00;
    border-radius: 999px;
    color: #fff6d6;
    background: linear-gradient(180deg, rgba(180,132,0,.96), rgba(104,76,0,.96));
    font-size: 12px;
    font-weight: 680;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(72,52,0,.34);
    backdrop-filter: blur(10px);
}
.latest-action:hover { border-color: #ffd65a; transform: translateY(-1px); }
.latest-action.is-latest {
    border-color: rgba(80,154,69,.45);
    color: #c9d3ca;
    background: rgba(12,22,15,.76);
    cursor: default;
    box-shadow: none;
}
.latest-action.is-latest:hover { transform: none; }
.latest-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #69c455;
    box-shadow: 0 0 0 4px rgba(77,169,61,.14);
}
.latest-action:not(.is-latest) .latest-dot {
    background: var(--yellow);
    box-shadow: 0 0 0 4px rgba(246,184,23,.14);
}
.hero-empty { height: 100%; display: grid; place-items: center; color: var(--muted); }
.hero-navigation {
    position: absolute;
    z-index: 3;
    right: 16px;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    background: rgba(9,12,14,.78);
    backdrop-filter: blur(12px);
}
.hero-navigation button {
    width: 32px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    color: #f0f1f0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.hero-navigation button:hover:not(:disabled) { background: rgba(255,255,255,.09); }
.hero-navigation button:disabled { color: #555a5c; cursor: default; }
.hero-navigation .timelapse-toggle {
    width: 38px;
    color: white;
    color: #17120a;
    background: linear-gradient(180deg, #ffd65a, #f6b817);
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(104,76,0,.3);
}
.timelapse-toggle .pause-icon { display: none; }
.timelapse-toggle.playing .play-icon { display: none; }
.timelapse-toggle.playing .pause-icon { display: inline; }
.hero-navigation .timelapse-toggle:hover:not(:disabled) { background: linear-gradient(180deg, #ffe078, #ffc400); }
.hero-tools {
    position: absolute;
    z-index: 3;
    bottom: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    background: rgba(9,12,14,.78);
    backdrop-filter: blur(12px);
}
.view-mode {
    height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: 5px;
    color: #aeb2b2;
    background: transparent;
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
}
.view-mode:hover { color: white; }
.view-mode.active {
    color: #061416;
    background: linear-gradient(180deg, #8ce7e3, var(--vision));
    box-shadow: 0 4px 12px rgba(22,143,145,.3);
}
.expand-image, .reset-position, .download-image {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 5px;
    color: #dadddc;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
}
.expand-image:hover, .reset-position:hover, .download-image:hover { color: white; background: rgba(255,255,255,.08); }
.expand-image svg, .reset-position svg, .download-image svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.drag-hint {
    position: absolute;
    z-index: 3;
    bottom: 68px;
    left: 50%;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    color: #d8dbda;
    background: rgba(9,12,14,.78);
    font-size: 11px;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    transition: opacity .25s ease, transform .25s ease;
    backdrop-filter: blur(10px);
}
.drag-hint.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.sensor {
    height: 91px;
    min-height: 0;
    padding: 9px 12px 8px;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    grid-template-rows: auto 1fr auto auto;
    column-gap: 12px;
    position: relative;
}
.sensor:nth-child(3) {
    grid-column: auto;
    height: 91px;
}
.sensor::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -55px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(246,184,23,.055), transparent 68%);
    pointer-events: none;
}
.card-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 670;
}
.info {
    display: inline-grid;
    width: 17px;
    height: 17px;
    place-items: center;
    border: 1px solid #666a6d;
    border-radius: 50%;
    color: #9ca09f;
    font-size: 11px;
    cursor: help;
    outline: none;
}
.info:focus-visible { border-color: var(--yellow); color: #ffd65a; box-shadow: 0 0 0 2px rgba(246,184,23,.2); }
.sensor-art {
    grid-column: 1;
    grid-row: 2 / 5;
    display: grid;
    place-items: center;
    color: #c8cbcb;
}
.sensor-art img {
    width: 38px;
    height: 38px;
    display: block;
    opacity: .82;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,.22));
}
.sensor-art.wind-art img { width: 38px; height: 38px; opacity: .9; }
.sensor-art.compass-art img { width: 42px; height: 42px; opacity: .95; }
.sensor-reading {
    grid-column: 2;
    align-self: end;
    margin: 0 0 2px;
    font-size: 23px;
    font-weight: 740;
    letter-spacing: -.7px;
}
.sensor-reading small { color: #d4d6d5; font-size: 16px; font-weight: 550; }
.wind-sensor .sensor-reading.wind-green { color: #70c260; }
.wind-sensor .sensor-reading.wind-amber { color: #eab645; }
.wind-sensor .sensor-reading.wind-red { color: #ff625d; }
.sensor-detail {
    grid-column: 2;
    min-height: 20px;
    margin: 0 0 3px;
    color: #c3c6c6;
    font-size: 11px;
}
.sensor-state {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 2px 0;
    border: 0;
    color: #858b8c;
    background: transparent;
    font-size: 10px;
}
.sensor-state::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6a7072;
}
.sensor:not(.wind-sensor) .sensor-reading { font-size: 22px; line-height: 1.05; }
.sensor:not(.wind-sensor) .sensor-detail {
    min-height: 13px;
    margin-bottom: 1px;
    font-size: 10px;
    line-height: 1.15;
}
.sensor:not(.wind-sensor) .sensor-state {
    padding: 0;
    font-size: 9px;
    line-height: 1.15;
}
.sensor:not(.wind-sensor) .sensor-state::before { width: 5px; height: 5px; }
.productivity-summary {
    height: 64px;
    min-height: 0;
    padding: 8px 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    align-items: center;
    position: relative;
}
.productivity-summary::after {
    content: "";
    position: absolute;
    right: -35px;
    bottom: -55px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(77,169,61,.07), transparent 68%);
    pointer-events: none;
}
.productivity-summary .card-title { grid-column: 1; font-size: 13px; }
.productivity-summary-value {
    grid-column: 2;
    grid-row: 1 / 3;
    font-size: 23px;
    letter-spacing: -.5px;
}
.productivity-summary-detail {
    grid-column: 1;
    color: #8f9595;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.overview {
    grid-column: 1 / -1;
    margin: 0 0 28px;
    padding: 4px 20px 14px;
}
.overview-head {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 2px;
}
.overview-head h1 { font-size: 16px; line-height: 1; }
.overview-head h1 { margin: 0 auto 0 0; font-size: 21px; letter-spacing: -.3px; }
.overview-title { display: flex; align-items: baseline; gap: 12px; margin-right: auto; }
.date-navigation {
    display: flex;
    align-items: center;
    gap: 6px;
}
.calendar-picker { position: relative; }
.topbar-calendar .date-picker { height: 36px; min-width: 132px; }
.topbar-calendar .calendar-popover { top: calc(100% + 7px); }
.date-picker, .date-step, .today-link {
    height: 42px;
    border: 1px solid var(--line);
    color: var(--ink);
    background: #121517;
}
.overview-head .date-picker, .overview-head .date-step { height: 26px; }
.overview-head .date-picker { min-width: 132px; padding: 0 9px; font-size: 12px; }
.overview-head .date-step { width: 30px; font-size: 19px; }
.overview-head .today-link { height: 26px; min-height: 26px; padding: 0 9px; font-size: 11px; }
.date-picker {
    min-width: 148px;
    padding: 0 11px;
    border-radius: 7px;
    color-scheme: dark;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}
.calendar-icon { color: var(--yellow); font-size: 18px; }
.calendar-popover {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    right: 0;
    width: 286px;
    padding: 13px;
    border: 1px solid #3b4145;
    border-radius: 10px;
    background: #111517;
    box-shadow: 0 20px 55px rgba(0,0,0,.55);
}
.calendar-popover[hidden] { display: none; }
.calendar-head {
    display: grid;
    grid-template-columns: 32px 1fr 32px;
    align-items: center;
    margin-bottom: 10px;
    text-align: center;
}
.calendar-head button {
    width: 32px;
    height: 30px;
    border: 0;
    border-radius: 6px;
    color: #dadddc;
    background: transparent;
    font-size: 21px;
    cursor: pointer;
}
.calendar-head button:hover { background: #24292c; }
.calendar-weekdays, .calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.calendar-weekdays { margin-bottom: 4px; color: #727879; font-size: 9px; text-align: center; }
.calendar-day {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #b8bcbb;
    background: transparent;
    font-size: 11px;
    cursor: pointer;
}
.calendar-day:hover { border-color: #555c60; background: #1b2023; }
.calendar-day.has-images {
    color: #f4f5f4;
    background: rgba(77,169,61,.18);
    border-color: rgba(77,169,61,.42);
}
.calendar-day.has-images::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 3px;
    left: 4px;
    height: 2px;
    border-radius: 2px;
    background: #58b948;
}
.calendar-day.selected { border-color: var(--yellow); box-shadow: inset 0 0 0 1px var(--yellow); }
.calendar-day:disabled { color: #454a4c; cursor: default; }
.calendar-day:disabled:hover { border-color: transparent; background: transparent; }
.calendar-blank { aspect-ratio: 1; }
.calendar-key {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid #292e31;
    color: #858b8b;
    font-size: 10px;
}
.calendar-key i { width: 8px; height: 8px; border-radius: 2px; background: #4da93d; }
.date-step {
    width: 40px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    font-size: 24px;
    line-height: 1;
    text-decoration: none;
}
.date-step:hover, .today-link:hover { border-color: #62686b; background: #181c1f; }
.date-step.disabled { color: #555a5c; cursor: default; }
.today-link {
    display: grid;
    place-items: center;
    padding: 0 13px;
    border-radius: 7px;
    color: #ffd65a;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}
.activity-section { position: relative; margin: 0 0 12px; }
.activity-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
    color: #d7d9d8;
    font-size: 12px;
    font-weight: 650;
}
.activity-heading-tools { display: flex; align-items: center; gap: 13px; }
.work-period-picker { position: relative; }
.work-period-toggle {
    height: 26px;
    padding: 0 8px;
    border: 1px solid #6f570e;
    border-radius: 5px;
    color: #ffd65a;
    background: rgba(246,184,23,.06);
    font-size: 9px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
}
.work-period-toggle:hover { border-color: #c69200; background: rgba(246,184,23,.12); }
.work-period-popover {
    position: absolute;
    z-index: 23;
    top: calc(100% + 8px);
    right: 0;
    width: 278px;
    padding: 13px;
    border: 1px solid #3b4145;
    border-radius: 10px;
    background: #111517;
    box-shadow: 0 20px 55px rgba(0,0,0,.55);
}
.work-period-popover[hidden] { display: none; }
.work-period-popover > strong { display: block; color: #f1f2f1; font-size: 13px; }
.work-period-popover > p { margin: 3px 0 11px; color: #83898a; font-size: 10px; }
.work-period-label, .work-period-fields label { display: grid; gap: 4px; color: #999fa0; font-size: 9px; font-weight: 650; }
.work-period-label input, .work-period-label select, .work-period-fields select {
    width: 100%;
    height: 34px;
    padding: 0 8px;
    border: 1px solid #41474a;
    border-radius: 6px;
    color: #f0f1f0;
    background: #0d1012;
    color-scheme: dark;
}
.work-period-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.work-period-save {
    width: 100%;
    height: 34px;
    margin-top: 10px;
    border: 1px solid #c69200;
    border-radius: 6px;
    color: #fff;
    color: #17120a;
    background: #f6b817;
    font-weight: 700;
    cursor: pointer;
}
.work-period-save:hover { background: #ffd65a; }
.work-period-save:disabled { opacity: .55; cursor: wait; }
.work-period-error { display: block; margin-top: 8px; color: #ff7772; font-size: 9px; }
.work-period-error[hidden] { display: none; }
.work-period-list { display: grid; gap: 5px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #292e31; }
.work-period-list > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #9da2a2; font-size: 9px; }
.work-period-list b { color: var(--work-label-color, #d9c6f7); font-weight: 700; }
.work-period-list button { width: 22px; height: 22px; border: 0; border-radius: 4px; color: #b9bdbd; background: #24282a; cursor: pointer; }
.work-period-list button:hover { color: #fff; background: #743438; }
.work-period-section { margin: 0 0 3px; }
.work-period-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
    color: #d7d9d8;
    font-size: 11px;
    font-weight: 650;
}
.work-window-legend { display: flex; align-items: center; gap: 5px; color: #7f8586; font-size: 9px; font-weight: 500; }
.work-window-legend i { width: 7px; height: 7px; display: inline-block; margin-left: 7px; border-radius: 2px; }
.work-window-legend i.green { background: #4da93d; }
.work-period-rail {
    height: 18px;
    display: grid;
    grid-template-columns: repeat(24, minmax(2px, 1fr));
    gap: 2px;
    padding: 3px;
    overflow: visible;
    border: 1px solid #303538;
    border-radius: 6px;
    background: #0b0e10;
}
.work-period-block {
    position: relative;
    min-width: 0;
    height: 100%;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 2px;
    color: transparent;
    background: #252a2d;
    font-size: 8px;
    line-height: 10px;
    text-align: center;
    white-space: nowrap;
}
.work-period-block::after {
    content: "";
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: -2px;
    left: 0;
    display: none;
    height: 1px;
    border-radius: 1px;
    background: #57b948;
    pointer-events: none;
}
.work-period-block.window-green::after,
.work-period-block.window-amber::after { display: block; }
.work-period-block.window-red::after {
    display: block;
    background: #e0524e;
}
.work-period-block.assigned {
    color: #fff0ad;
    background: linear-gradient(180deg, var(--work-color), var(--work-color-dark));
}
.work-period-block.assigned:not(.period-start) { margin-left: -2px; padding-left: 2px; }
.work-period-block.assigned:not(.period-end) { margin-right: -2px; padding-right: 2px; border-radius: 0; }
.work-period-block.period-start {
    z-index: 2;
    border-radius: 2px 0 0 2px;
    text-align: left;
    text-indent: 5px;
}
.work-period-block.period-end { border-radius: 0 2px 2px 0; }
.work-period-block.period-start.period-end { border-radius: 2px; }
.work-period-block.linked-hover {
    z-index: 4;
    filter: brightness(1.45);
    box-shadow: 0 0 0 1px #b9f5f2, 0 0 8px rgba(85,214,210,.72);
}
.settings-link {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #3a4043;
    border-radius: 5px;
    color: #ffd65a;
    text-decoration: none;
}
.settings-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.settings-link:hover { border-color: #c69200; background: rgba(246,184,23,.1); }
.date-navigation .settings-link { width: 26px; height: 26px; }
.topbar-settings { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 8px; }

/* Simplified dashboard experiment: retain the markup and data hooks, but hide
   the productivity summary and detailed daily activity controls. */
.productivity-summary,
.overview-head,
.activity-section { display: none; }
.overview { padding-top: 14px; }
.activity-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #7f8586;
    font-size: 10px;
    font-weight: 500;
}
.activity-legend i {
    width: 7px;
    height: 7px;
    display: inline-block;
    margin-left: 8px;
    border-radius: 2px;
}
.activity-legend i.low { background: #397d31; }
.activity-legend i.moderate { background: #d2a332; }
.activity-legend i.high { background: #f07832; }
.activity-legend i.unscored { background: #41606b; }
.activity-legend i.missing { background: #9d3538; }
.activity-rail {
    height: 18px;
    display: grid;
    grid-template-columns: repeat(144, minmax(1px, 1fr));
    gap: 1px;
    padding: 3px;
    border: 1px solid #303538;
    border-radius: 6px;
    background: #0b0e10;
}
.activity-slot {
    min-width: 0;
    height: 100%;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 1px;
    background: #252a2d;
}
button.activity-slot { cursor: pointer; }
.activity-slot.received { background: #397d31; }
.activity-slot.change-moderate { background: #b68727; }
.activity-slot.change-high { background: #d75c2b; }
.activity-slot.change-unavailable { background: #41606b; }
.activity-slot.received:hover { background: #63bf51; transform: scaleY(1.25); }
.activity-slot.change-moderate:hover { background: #efc348; }
.activity-slot.change-high:hover { background: #ff8148; }
.activity-slot.missing { background: #743033; }
.activity-slot.active {
    position: relative;
    z-index: 2;
    background: var(--vision);
    box-shadow: 0 0 8px rgba(85,214,210,.72);
}
.activity-times {
    display: flex;
    justify-content: space-between;
    padding-top: 5px;
    color: #6f7576;
    font-size: 9px;
}
.wind-activity-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 5px;
    color: #d7d9d8;
    font-size: 11px;
    font-weight: 650;
}
.wind-activity-legend { display: flex; align-items: center; gap: 5px; color: #7f8586; font-size: 9px; font-weight: 500; }
.wind-activity-legend i { width: 7px; height: 7px; display: inline-block; margin-left: 7px; border-radius: 2px; }
.wind-activity-legend i.below { background: #397d31; }
.wind-activity-legend i.amber { background: #d2a332; }
.wind-activity-legend i.red { background: #c64743; }
.wind-activity-rail {
    height: 18px;
    display: grid;
    grid-template-columns: repeat(144, minmax(1px, 1fr));
    gap: 1px;
    padding: 3px;
    border: 1px solid #303538;
    border-radius: 6px;
    background: #0b0e10;
}
.wind-activity-slot { min-width: 0; height: 100%; padding: 0; border: 0; border-radius: 1px; background: #252a2d; }
button.wind-activity-slot { cursor: pointer; }
.wind-activity-slot.below { background: #397d31; }
.wind-activity-slot.amber { background: #b68727; }
.wind-activity-slot.red { background: #b93d3d; }
.wind-activity-slot:hover { position: relative; z-index: 2; filter: brightness(1.45); transform: scaleY(1.35); }
.wind-activity-slot.active { position: relative; z-index: 3; background: var(--vision); box-shadow: 0 0 8px rgba(85,214,210,.8); }
.engine-activity-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 5px 0 3px;
    color: #d7d9d8;
    font-size: 11px;
    font-weight: 650;
}
.engine-activity-legend { display: flex; align-items: center; gap: 5px; color: #7f8586; font-size: 9px; font-weight: 500; }
.engine-activity-legend i { width: 7px; height: 7px; display: inline-block; margin-left: 7px; border-radius: 2px; }
.engine-activity-legend i.on { background: #397d31; }
.engine-activity-legend i.off { background: #555b5e; }
.engine-activity-legend i.unavailable { background: #252a2d; }
.engine-activity-rail {
    height: 18px;
    display: grid;
    grid-template-columns: repeat(24, minmax(2px, 1fr));
    gap: 2px;
    padding: 3px;
    border: 1px solid #303538;
    border-radius: 6px;
    background: #0b0e10;
}
.engine-activity-slot { min-width: 0; height: 100%; padding: 0; border: 0; border-radius: 2px; background: #252a2d; }
button.engine-activity-slot { cursor: pointer; }
.engine-activity-slot.on { background: #397d31; }
.engine-activity-slot.off { background: #555b5e; }
.engine-activity-slot:hover { position: relative; z-index: 2; filter: brightness(1.45); transform: scaleY(1.2); }
.engine-activity-slot.active { position: relative; z-index: 3; background: var(--vision); box-shadow: 0 0 8px rgba(85,214,210,.8); }
.activity-slot.linked-hover, .wind-activity-slot.linked-hover, .engine-activity-slot.linked-hover {
    position: relative;
    z-index: 4;
    filter: brightness(1.5);
    box-shadow: 0 0 0 1px #b9f5f2, 0 0 8px rgba(85,214,210,.72);
}
.activity-shared-cursor {
    position: absolute;
    z-index: 5;
    width: 1px;
    background: rgba(85,214,210,.88);
    pointer-events: none;
    box-shadow: 0 0 7px rgba(85,214,210,.72);
    transform: translateX(-50%);
}
.activity-shared-tooltip {
    position: absolute;
    z-index: 12;
    min-width: 180px;
    padding: 8px 10px;
    border: 1px solid var(--vision-dark);
    border-radius: 7px;
    color: #eceeed;
    background: rgba(24,16,37,.96);
    font-size: 10px;
    pointer-events: none;
    transform: translateX(-50%);
    box-shadow: 0 10px 26px rgba(0,0,0,.42);
    backdrop-filter: blur(10px);
}
.activity-shared-tooltip[hidden], .activity-shared-cursor[hidden] { display: none; }
.activity-shared-tooltip strong { display: block; margin-bottom: 5px; color: white; font-size: 12px; }
.activity-shared-tooltip span { display: flex; justify-content: space-between; gap: 14px; line-height: 1.45; }
.activity-shared-tooltip small { color: #929899; font-size: 9px; }
.activity-shared-tooltip b { font-weight: 650; }
.activity-shared-tooltip .visual-value { color: #ffd65a; }
.activity-shared-tooltip .boom-value { color: #f6b817; }
.activity-shared-tooltip .engine-on { color: #70c260; }
.activity-shared-tooltip .engine-off { color: #b7bcbd; }
.activity-shared-tooltip .engine-unavailable { color: #858b8c; }
.activity-shared-tooltip .wind-below { color: #70c260; }
.activity-shared-tooltip .wind-amber { color: #eab645; }
.activity-shared-tooltip .wind-red { color: #ff625d; }
.activity-shared-tooltip .wind-none { color: #858b8c; }
.sensor-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}
.sensor-history { min-width: 0; }
.sensor-selector { display: flex; align-items: center; gap: 10px; }
.sensor-selector-label { color: #aeb1b2; font-size: 12px; font-weight: 650; white-space: nowrap; }
.threshold-controls { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.chart-threshold-controls { flex: 0 0 auto; margin-left: auto; }
.threshold-control { display: flex; align-items: center; gap: 6px; color: #b7bbbc; font-size: 12px; }
.threshold-control > span { font-weight: 650; }
.threshold-control.red > span { color: #ff625d; }
.threshold-control.amber > span { color: #eab645; }
.threshold-control select {
    width: 66px;
    height: 36px;
    padding: 0 7px;
    border: 1px solid #3b4144;
    border-radius: 7px;
    color: var(--ink);
    background: #0e1113;
    font: inherit;
    color-scheme: dark;
}
.threshold-control select[aria-invalid] { border-color: #ff625d; }
.threshold-control small { color: #747a7b; }
#reset-thresholds {
    height: 34px;
    padding: 0 10px;
    border: 1px solid #7d620f;
    border-radius: 7px;
    color: #ffd65a;
    background: rgba(246,184,23,.12);
    font-size: 11px;
}
#reset-thresholds[hidden] { display: none; }
.tile-threshold-controls {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 9px;
    padding-top: 3px;
}
.tile-threshold-controls .threshold-control { gap: 4px; font-size: 9px; }
.tile-threshold-controls .threshold-control select { width: 47px; height: 23px; padding: 0 4px; font-size: 10px; }
.tile-threshold-controls .threshold-control small { font-size: 9px; }
.tile-threshold-controls #reset-thresholds { height: 23px; padding: 0 7px; font-size: 9px; }
.tabs { display: flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.tab {
    height: 40px;
    padding: 0 22px;
    border: 0;
    border-right: 1px solid var(--line);
    color: #aeb1b2;
    background: transparent;
    font-size: 13px;
    letter-spacing: .15px;
}
.tab:last-child { border-right: 0; }
.tab.active {
    color: #ffd65a;
    background: linear-gradient(180deg, rgba(246,184,23,.22), rgba(122,90,0,.18));
    box-shadow: inset 0 0 24px rgba(246,184,23,.08);
}
.tab:disabled { color: #555a5c; cursor: default; }
.window-select {
    height: 42px;
    padding: 0 36px 0 13px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    background: #121517;
}
.chart-placeholder {
    position: relative;
    height: 220px;
    display: grid;
    place-items: center;
    margin: 10px 0 0;
    overflow: hidden;
    border: 1px solid #2d3235;
    border-radius: 8px;
    background:
        linear-gradient(to bottom, transparent 24%, #282d30 25%, transparent 25.5%, transparent 49%, #282d30 50%, transparent 50.5%, transparent 74%, #282d30 75%, transparent 75.5%),
        linear-gradient(to right, transparent 12.4%, rgba(44,49,52,.5) 12.5%, transparent 12.6%, transparent 24.9%, rgba(44,49,52,.5) 25%, transparent 25.1%, transparent 49.9%, rgba(44,49,52,.5) 50%, transparent 50.1%, transparent 74.9%, rgba(44,49,52,.5) 75%, transparent 75.1%),
        linear-gradient(145deg, rgba(22,25,27,.78), rgba(11,13,15,.55));
}
.chart-placeholder::after {
    content: "";
    position: absolute;
    left: 4%;
    right: 4%;
    bottom: 24px;
    height: 1px;
    background: #34383b;
}
.sensor-chart {
    position: relative;
    height: 320px;
    margin: 10px 0 0;
    overflow: hidden;
    border: 1px solid #2d3235;
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(22,25,27,.78), rgba(11,13,15,.55));
}
.sensor-chart canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.sensor-chart-tooltip {
    position: absolute;
    z-index: 2;
    min-width: 94px;
    padding: 7px 9px;
    border: 1px solid #9a7100;
    border-radius: 6px;
    color: #fff6d6;
    background: rgba(31,17,50,.94);
    font-size: 10px;
    line-height: 1.4;
    pointer-events: none;
    transform: translate(-50%, -115%);
    box-shadow: 0 8px 22px rgba(0,0,0,.35);
}
.chart-wind-value {
    display: block;
    margin: 3px 0 1px;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.15;
}
.chart-wind-value.wind-green { color: #70c260; }
.chart-wind-value.wind-amber { color: #eab645; }
.chart-wind-value.wind-red { color: #ff625d; }
.chart-overlay-value {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
}
.sensor-chart-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #858b8b;
    font-size: 13px;
}
.sensor-chart-empty[hidden] { display: none; }
.placeholder-message {
    position: relative;
    z-index: 1;
    max-width: 520px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px;
    text-align: left;
}
.placeholder-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    margin: 0;
    border: 1px solid #7d620f;
    border-radius: 12px;
    color: #ffd65a;
    background: rgba(122,90,0,.18);
    box-shadow: 0 10px 30px rgba(90,65,0,.18);
}
.placeholder-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.placeholder-message strong { display: block; margin-bottom: 4px; font-size: 14px; }
.placeholder-message span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.row-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    padding-top: 5px;
    color: #e1e2e1;
    font-size: 13px;
    font-weight: 620;
}
.selected-time {
    flex-basis: 100%;
    min-height: 17px;
    color: var(--vision);
    font-size: 11px;
    font-weight: 600;
}
.timeline-row {
    position: relative;
    display: block;
}
.timeline-hover {
    position: absolute;
    z-index: 5;
    top: 0;
    bottom: 10px;
    left: 0;
    width: 2px;
    display: none;
    background: linear-gradient(to bottom, var(--vision), rgba(85,214,210,.4));
    pointer-events: none;
    box-shadow: 0 0 10px rgba(85,214,210,.55);
}
.timeline-hover.visible { display: block; }
.timeline-selected-marker {
    position: absolute;
    z-index: 4;
    top: 0;
    bottom: 10px;
    left: 0;
    width: 2px;
    display: none;
    background: linear-gradient(to bottom, #c8f8f5, var(--vision));
    pointer-events: none;
    box-shadow: 0 0 11px rgba(85,214,210,.8);
}
.timeline-selected-marker.visible { display: block; }
.timeline-selected-marker::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    border: 2px solid #d7fbf9;
    border-radius: 50%;
    background: var(--vision);
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px rgba(85,214,210,.2);
}
.timeline-hover::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 9px;
    height: 9px;
    border: 2px solid #c8f8f5;
    border-radius: 50%;
    background: var(--vision);
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px rgba(85,214,210,.18);
}
.timeline-hover-card {
    position: absolute;
    z-index: 9;
    bottom: 12px;
    left: 50%;
    width: 150px;
    display: none;
    overflow: hidden;
    border: 1px solid var(--vision-dark);
    border-radius: 5px;
    color: white;
    background: rgba(7,35,38,.96);
    transform: translateX(-50%);
    box-shadow: 0 6px 18px rgba(0,0,0,.35);
    pointer-events: none;
}
.timeline-hover-card.visible { display: block; }
.timeline-hover-card canvas {
    width: 150px;
    height: auto;
    display: block;
    object-fit: contain;
    background: #090b0d;
}
.timeline-hover-card span {
    display: block;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.45;
    text-align: left;
    white-space: pre-wrap;
}
.timeline-hover-card .wind-green { color: #70c260; }
.timeline-hover-card .wind-amber { color: #eab645; }
.timeline-hover-card .wind-red { color: #ff625d; }
@media (hover: none), (pointer: coarse) {
    .timeline-hover-card span {
        padding: 7px 9px;
        font-size: 12px;
    }
}
.thumb {
    appearance: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
}
.thumb:hover { position: relative; z-index: 1; box-shadow: inset 0 0 0 2px #686d70; }
.thumb.active { position: relative; z-index: 2; box-shadow: inset 0 0 0 3px var(--vision); }
.thumb img {
    width: 100%;
    height: 99px;
    display: block;
    object-fit: cover;
    border-radius: 0;
    background: #080a0b;
}

/* Fixed-width, sequence-based scrubber. Representative frames provide visual
   context while the transparent buttons retain access to every capture. */
.timeline-row {
    min-height: 120px;
    padding-bottom: 20px;
    overflow: visible;
}
.timeline-filmstrip {
    height: 99px;
    display: flex;
    overflow: hidden;
    border: 1px solid #34393c;
    border-radius: 8px;
    background: #080a0b;
}
.timeline-filmstrip img {
    min-width: 0;
    flex: 1 1 0;
    display: block;
    object-fit: cover;
}
.timeline {
    position: absolute;
    inset: 0 0 auto;
    width: 100%;
    height: 99px;
    display: grid;
    grid-template-columns: repeat(var(--timeline-count, 1), minmax(0, 1fr));
    overflow: visible;
    border-radius: 8px;
    touch-action: none;
}
.timeline:focus-visible { outline: 2px solid var(--vision); outline-offset: 3px; }
.timeline .thumb {
    min-width: 0;
    height: 99px;
    opacity: 0;
    box-shadow: none;
}
.timeline .thumb:hover,
.timeline .thumb.active { position: static; box-shadow: none; }
.timeline-progress {
    position: absolute;
    z-index: 3;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 5px;
    border-radius: 0 3px 3px 0;
    background: var(--vision);
    box-shadow: 0 0 9px rgba(85,214,210,.65);
    pointer-events: none;
}
.timeline-hover,
.timeline-selected-marker { z-index: 5; bottom: 0; }
.timeline-edge-time {
    position: absolute;
    bottom: 0;
    color: #aeb4b5;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}
.timeline-edge-time.start { left: 1px; }
.timeline-edge-time.end { right: 1px; }
.summary {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    min-height: 76px;
    border: 1px solid #34393c;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(23,26,28,.72), rgba(15,17,19,.7));
    box-shadow: inset 0 1px rgba(255,255,255,.015);
    margin-top: 14px;
}
.image-viewer[hidden] { display: none; }
.image-viewer {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(3,5,7,.96);
    touch-action: none;
}
.viewer-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}
.viewer-stage.dragging { cursor: grabbing; }
.viewer-stage img {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 92vw;
    max-height: 92vh;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center;
    will-change: transform;
}
.viewer-controls {
    position: fixed;
    z-index: 2;
    bottom: 22px;
    left: 50%;
    display: flex;
    overflow: hidden;
    border: 1px solid #454b4e;
    border-radius: 9px;
    background: rgba(15,18,20,.9);
    transform: translateX(-50%);
    backdrop-filter: blur(12px);
}
.viewer-controls button, .viewer-close {
    min-width: 46px;
    height: 42px;
    border: 0;
    border-right: 1px solid #393e41;
    color: white;
    background: transparent;
    cursor: pointer;
}
.viewer-controls button:last-child { border-right: 0; }
.viewer-controls button:hover, .viewer-close:hover { background: rgba(255,255,255,.09); }
.viewer-close {
    position: fixed;
    z-index: 2;
    top: 22px;
    right: 22px;
    border: 1px solid #454b4e;
    border-radius: 50%;
    font-size: 25px;
    background: rgba(15,18,20,.9);
}
body.viewer-open { overflow: hidden; }
.metric {
    min-width: 0;
    position: relative;
    padding: 13px 14px 13px 42px;
    border-right: 1px solid var(--line);
}
.metric:last-child { border-right: 0; }
.metric::before {
    position: absolute;
    top: 20px;
    left: 16px;
    color: #9ca1a2;
    font-size: 18px;
}
.metric:nth-child(1)::before { content: "▣"; }
.metric:nth-child(2)::before { content: "◷"; }
.metric:nth-child(3)::before { content: "↑"; color: var(--green); }
.metric:nth-child(4)::before { content: "!"; color: var(--red); }
.metric-label { color: var(--muted); font-size: 12px; white-space: nowrap; }
.metric-value {
    margin-top: 5px;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.35;
}
.good { color: #62bd4f; }
.bad { color: var(--red); }
.empty-timeline { padding: 45px 20px; color: var(--muted); text-align: center; }
@media (min-width: 1100px) {
    /* Compact desktop density: preserve the layout and touch sizing below this breakpoint. */
    .shell { width: min(1740px, calc(100% - 24px)); }
    .dashboard-layout { gap: 10px; }
    .right-column { gap: 10px; }
    .sensor-grid { gap: 8px; }

    .hero {
        height: 520px;
        min-height: 520px;
    }
    .sensor, .sensor:nth-child(3) {
        height: 91px;
        padding: 9px 12px 8px;
    }
    .productivity-summary { height: 64px; }

    .overview {
        margin-bottom: 20px;
        padding: 3px 14px 10px;
    }
    .overview-head {
        gap: 12px;
        margin-bottom: 0;
    }
    .overview-head h1 { font-size: 19px; }
    .date-navigation { gap: 4px; }
    .overview-head .date-picker { min-width: 124px; }

    .activity-section { margin-bottom: 8px; }
    .activity-heading { margin-bottom: 4px; }
    .activity-heading-tools { gap: 9px; }
    .activity-legend { gap: 4px; }
    .activity-legend i { margin-left: 6px; }
    .wind-activity-heading { margin: 5px 0 3px; }

    .sensor-history-head {
        gap: 12px;
        margin-top: 11px;
    }
    .tabs .tab {
        height: 34px;
        padding: 0 18px;
        font-size: 12px;
    }
    .sensor-chart {
        height: 288px;
        margin-top: 7px;
    }
}
@media (max-width: 980px) {
    .settings-grid { grid-template-columns: 1fr; }
    .reports-workspace { grid-template-columns: 1fr; }
    .report-day-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .calibration-shell { width: min(100% - 20px, 1480px); }
    .calibration-topbar img { width: 128px; }
    .settings-overview { min-height: 62px; }
    .settings-overview h1 { font-size: 21px; }
    .settings-panel { padding: 14px; }
    .shell { width: min(100% - 20px, 1500px); }
    .topbar {
        min-height: 94px;
        height: auto;
        display: grid;
        grid-template-columns: 104px 1fr auto;
        gap: 6px 9px;
        padding: 6px 0;
    }
    .brand { width: 104px; flex: 0 0 auto; }
    .primary-nav { justify-self: start; }
    .primary-nav a { min-height: 26px; padding: 0 9px; }
    .selector { grid-column: 1 / -1; min-width: 0; width: 100%; }
    .selector select { width: auto; min-width: 0; flex: 1; height: 34px; font-size: 12px; }
    .topbar-calendar .date-picker { height: 34px; min-width: 118px; }
    .topbar-settings { width: 34px; height: 34px; flex-basis: 34px; }
    .live { margin-left: 0; justify-self: end; }
    .live-label { display: none; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .hero { height: min(82vh, 720px); min-height: 500px; }
    .binding-input-row { grid-template-columns: 1fr; }
    .port-mapping { grid-template-columns: 1fr; }
    .connection-details { grid-template-columns: 1fr; }
    .hero-navigation { right: 12px; bottom: 12px; }
    .hero-navigation button { width: 38px; height: 36px; }
    .sensor-grid { grid-template-columns: 1fr; }
    .sensor:nth-child(3) { grid-column: auto; }
    .sensor { height: 160px; }
    .productivity-summary { height: 96px; }
    .sensor-art img { width: 62px; height: 62px; }
    .overview { padding: 17px 12px; }
    .tabs { width: 100%; overflow-x: auto; }
    .tab { min-width: max-content; padding: 0 15px; }
    .sensor-history-head { align-items: flex-start; flex-direction: column; }
    .chart-placeholder { height: 200px; margin: 10px 0 0; }
    .sensor-chart { height: 280px; }
    .reports-heading { align-items: flex-start; flex-direction: column; }
    .reports-date-form { width: 100%; }
    .reports-date-form input { flex: 1; }
    .report-image-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .report-day-summary { grid-template-columns: 1fr 1fr; }
    .report-chooser-body { grid-template-columns: 1fr; }
    .report-chooser-preview { min-height: 320px; }
    .timeline-row { grid-template-columns: 1fr; }
    .summary { grid-template-columns: 1fr 1fr; }
    .metric:nth-child(2) { border-right: 0; }
    .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* Keep the scrubber geometry identical at all responsive breakpoints. */
.timeline { padding-bottom: 0; }
.timeline-hover,
.timeline-selected-marker { bottom: 0; }

/* Mobile dashboard: video-first layout with compact overlaid sensor readings. */
@media (max-width: 850px) {
    .dashboard-layout {
        position: relative;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    .hero {
        grid-column: 1;
        grid-row: 1;
        height: min(82vh, 720px);
        min-height: 500px;
    }
    .overview-head { flex-wrap: wrap; }
    .overview-head h1 { width: 100%; }
    .right-column {
        position: absolute;
        z-index: 10;
        top: 64px;
        right: 10px;
        width: 58px;
        height: auto;
        gap: 0;
        transform: none;
    }
    .sensor-grid {
        position: static;
        height: auto;
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(3, 58px);
        gap: 6px;
    }
    .sensor,
    .sensor:nth-child(3),
    .wind-sensor {
        width: 58px;
        height: 58px;
        min-height: 0;
        align-self: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 4px 2px;
        overflow: hidden;
        border-color: rgba(255,255,255,.18);
        background: rgba(10,13,15,.72);
        box-shadow: 0 8px 22px rgba(0,0,0,.3);
        backdrop-filter: blur(10px);
    }
    .wind-sensor { overflow: visible; }
    .sensor::after { display: none; }
    .sensor .card-title {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .sensor .info,
    .sensor-detail,
    .sensor-state { display: none; }
    .sensor-art,
    .wind-sensor .sensor-art {
        width: 26px;
        height: 26px;
        display: grid;
        flex: 0 0 auto;
        place-items: center;
    }
    .sensor-art img,
    .sensor-art.wind-art img,
    .sensor-art.compass-art img {
        width: 24px;
        height: 24px;
    }
    .sensor-reading,
    .sensor:not(.wind-sensor) .sensor-reading {
        margin: 0;
        font-size: 14px;
        font-weight: 750;
        line-height: 1;
        letter-spacing: -.45px;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }
    .sensor-reading small { display: none; }
    .productivity-summary { display: none; }
    .sensor-history-head {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }
    .sensor-history-head .sensor-selector {
        flex: 0 1 auto;
    }
    .sensor-history-head .tabs {
        width: auto;
        overflow: visible;
    }
    .chart-threshold-controls {
        margin-left: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 8px;
    }
    .chart-threshold-controls .threshold-control { gap: 5px; }
    .chart-threshold-controls .threshold-control > span {
        width: 9px;
        height: 9px;
        flex: 0 0 9px;
        overflow: hidden;
        border-radius: 50%;
        font-size: 0;
        box-shadow: 0 0 0 3px rgba(255,255,255,.05);
    }
    .chart-threshold-controls .threshold-control.red > span { background: #ff625d; }
    .chart-threshold-controls .threshold-control.amber > span { background: #eab645; }
    .chart-threshold-controls .threshold-control select {
        width: 54px;
        height: 34px;
        padding: 0 5px;
    }
    .chart-threshold-controls .threshold-control small { display: none; }
    .chart-threshold-controls #reset-thresholds {
        position: relative;
        width: 34px;
        height: 34px;
        padding: 0;
        border-radius: 7px;
        font-size: 0;
    }
    .chart-threshold-controls #reset-thresholds[hidden] { display: none; }
    .chart-threshold-controls #reset-thresholds::before {
        content: "";
        display: block;
        position: absolute;
        top: 50%;
        left: 50%;
        width: 19px;
        height: 19px;
        background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f6b817' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 0 0-15.5-6.2L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3Cpath d='M3 12a9 9 0 0 0 15.5 6.2L21 16'/%3E%3Cpath d='M16 16h5v5'/%3E%3C/svg%3E");
        transform-origin: center;
        transform: translate(-50%, -50%);
    }
    .chart-threshold-controls #reset-thresholds.resetting::before {
        animation: threshold-reset-spin .7s ease-in-out;
    }
    .dashboard-layout > .overview {
        grid-column: 1;
        grid-row: 2;
    }
}

@keyframes threshold-reset-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
