:root {
    --bg: #101214;
    --panel: #1b1f23;
    --panel2: #252a2f;
    --text: #f4f5f6;
    --muted: #aeb5bb;
    --accent: #d62828;
    --border: #3a4148;
}
* {
    box-sizing: border-box;
}
html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}
body {
    min-height: 100vh;
}
.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 28px;
    border-bottom: 3px solid var(--accent);
    background: #171a1d;
}
.department-name {
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 800;
}
.board-title {
    color: var(--muted);
    font-size: 0.95rem;
    letter-spacing: 0.16em;
    margin-top: 4px;
}
.clock {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
}
.page {
    padding: 24px 28px;
}
.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 18px;
}
.page-heading h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}
.rig-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.rig-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.rig-card-header {
    padding: 18px 20px;
    background: var(--panel2);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}
.rig-heading {
    min-width: 0;
}
.rig-unit-number {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1;
    font-weight: 900;
}
.rig-apparatus-name {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-top: 7px;
    text-transform: uppercase;
}
.rig-status {
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 1px solid currentColor;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    white-space: nowrap;
    color: #9be59b;
}
.rig-card-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.025);
}
.rig-card-summary span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}
.rig-card-summary strong {
    font-size: 0.82rem;
    white-space: nowrap;
}
.rig-positions {
    min-height: 1px;
}
.position {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 13px 20px;
    border-top: 1px solid var(--border);
}
.position:first-child {
    border-top: 0;
}
.position-name {
    color: var(--muted);
    font-weight: 700;
}
.person-name {
    text-align: right;
    font-weight: 800;
}
.no-positions {
    padding: 18px 20px;
    color: var(--muted);
    font-weight: 700;
}
.empty-state {
    color: var(--muted);
    padding: 50px;
    text-align: center;
}
.incident-panel {
    min-height: calc(100vh - 125px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.incident-label {
    color: var(--accent);
    font-weight: 900;
    letter-spacing: 0.2em;
    font-size: 1.2rem;
}
.incident-type {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    margin: 15px 0;
}
.incident-address {
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--muted);
}
.incident-rigs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 40px;
}
.incident-rig {
    padding: 18px 28px;
    background: var(--accent);
    border-radius: 10px;
    font-size: 1.6rem;
    font-weight: 900;
}
@media (max-width: 700px) {
    .board-header {
        padding: 14px;
    }
    .page {
        padding: 16px;
    }
    .rig-grid {
        grid-template-columns: 1fr;
    }
}
body.incident-active .board-header {
    border-bottom-color: var(--accent);
}
body.incident-active .clock {
    color: #ffffff;
}
.incident-meta {
    min-height: 1.5rem;
    margin-top: 12px;
    color: var(--muted);
    font-size: 1.1rem;
    font-weight: 700;
}
.incident-notes {
    max-width: 900px;
    margin-top: 18px;
    color: var(--text);
    font-size: 1.2rem;
    white-space: pre-wrap;
}
.incident-rigs {
    width: min(1200px, 100%);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: stretch;
    gap: 16px;
    margin-top: 40px;
}
.incident-rig {
    padding: 0;
    background: var(--panel);
    border: 2px solid var(--accent);
    border-radius: 12px;
    overflow: hidden;
    text-align: left;
}
.incident-rig.assigned {
    border-color: #e0a62a;
}
.incident-rig.cancelled,
.incident-rig.cleared {
    border-color: #5d646b;
    opacity: 0.65;
}
.incident-rig-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--panel2);
}
.incident-rig-unit {
    font-size: 2rem;
    font-weight: 900;
}
.incident-rig-name {
    color: var(--muted);
    margin-top: 3px;
}
.incident-rig-status {
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.incident-no-rigs {
    color: var(--muted);
    font-size: 1.2rem;
    font-weight: 700;
}
.rig-card.out-of-service {
    opacity: 0.55;
}
.rig-card.out-of-service .rig-status {
    color: #ff9b9b;
}
@media (max-width: 700px) {
    .incident-type {
        font-size: clamp(2.2rem, 11vw, 4rem);
    }
    .incident-rigs {
        grid-template-columns: 1fr;
    }
    .rig-card-summary {
        align-items: flex-start;
        flex-direction: column;
    }
}

.rig-status.incident-committed {
    font-weight: 800;
}

.rig-card.incident-committed {
    border-width: 3px;
}

.rig-incident-location,
.rig-service-reason {
    margin-top: 8px;
    font-size: 0.9rem;
    font-weight: 700;
}

.rig-service-reason {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.info-page {
    min-height: calc(100vh - 125px);
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    grid-template-rows: auto auto 1fr;
    gap: 24px;
    align-content: center;
    max-width: 1500px;
    margin: 0 auto;
}
.info-brand {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}
.board-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: rgba(255,255,255,.04);
    border-radius: 12px;
}
.info-department {
    font-size: clamp(1.8rem, 3.5vw, 3.4rem);
    font-weight: 900;
}
.info-title {
    color: var(--muted);
    letter-spacing: .2em;
    font-weight: 800;
    margin-top: 5px;
}
.info-date-time {
    padding: 18px 0;
}
.info-date {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
}
.info-time {
    margin-top: 5px;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    font-weight: 900;
}
.info-weather, .info-events {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.info-section-label {
    color: var(--accent);
    font-size: .85rem;
    font-weight: 900;
    letter-spacing: .18em;
}
.weather-location {
    color: var(--muted);
    margin-top: 5px;
    font-weight: 700;
}
.weather-current {
    display: flex;
    align-items: center;
    gap: 22px;
    margin: 18px 0;
}
.weather-temperature {
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 900;
    line-height: 1;
}
.weather-condition {
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    font-weight: 800;
}
.weather-wind {
    color: var(--muted);
    margin-top: 6px;
}
.weather-forecast {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.forecast-item {
    border-top: 1px solid var(--border);
    padding-top: 10px;
    display: grid;
    gap: 3px;
}
.forecast-item span {
    font-size: 1.35rem;
    font-weight: 900;
}
.forecast-item small {
    color: var(--muted);
}
.event-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}
.event-card {
    display: grid;
    grid-template-columns: 115px 1fr;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}
.event-card:last-child { border-bottom: 0; }
.event-date {
    color: var(--muted);
    font-weight: 800;
}
.event-main strong {
    font-size: 1.2rem;
}
.event-meta, .event-details {
    color: var(--muted);
    margin-top: 4px;
}
.muted-info { color: var(--muted); padding: 20px 0; }

@media (max-width: 850px) {
    .info-page { grid-template-columns: 1fr; }
    .info-brand { grid-column: auto; }
}
@media (max-width: 600px) {
    .board-logo { width: 82px; height: 82px; }
    .info-brand { gap: 12px; }
    .weather-forecast { grid-template-columns: 1fr; }
    .event-card { grid-template-columns: 1fr; gap: 4px; }
}

/* Header date/time and larger information-page events */
.board-header-right {
    display: flex;
    align-items: center;
    gap: 28px;
    text-align: right;
}
.header-date {
    font-size: clamp(1.2rem, 2.2vw, 2rem);
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
}
.assignment-date-large {
    color: var(--text) !important;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    font-weight: 900;
}
.event-list {
    gap: 18px;
    margin-top: 18px;
}
.event-card {
    grid-template-columns: 150px 1fr;
    gap: 18px;
    padding: 20px 0;
}
.event-date {
    font-size: 1.15rem;
    line-height: 1.25;
}
.event-main strong {
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    line-height: 1.2;
}
.event-meta {
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 8px;
}
.event-details {
    font-size: 1.05rem;
    line-height: 1.4;
    margin-top: 8px;
}

@media (max-width: 700px) {
    .board-header-right {
        gap: 12px;
    }
    .header-date {
        font-size: 1rem;
    }
}

.wildfire-page { min-height: calc(100vh - 125px); max-width: 1600px; margin: 0 auto; }
.wildfire-header { display:flex; justify-content:space-between; align-items:center; gap:24px; margin-bottom:18px; }
.wildfire-header h1 { margin:4px 0; font-size:clamp(2rem,4vw,3.4rem); letter-spacing:.01em; }
.wildfire-updated { color:var(--muted); font-weight:700; }
.wildfire-overall { min-width:180px; padding:18px 24px; border:2px solid var(--border); border-radius:12px; text-align:center; font-size:1.4rem; font-weight:900; }
.wildfire-layout { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(300px,.8fr); gap:20px; }
.wildfire-map-wrap,.wildfire-legend,.wildfire-zone-list { background:var(--panel); border:1px solid var(--border); border-radius:16px; }
.wildfire-map-wrap { padding:12px; }
.wildfire-map { position:relative; min-height:520px; }
.wildfire-map svg { width:100%; height:auto; min-height:520px; display:block; background:#11161a; border-radius:10px; }
.wildfire-map-status { position:absolute; inset:18px auto auto 18px; z-index:2; color:var(--muted); font-weight:800; background:rgba(0,0,0,.72); padding:8px 12px; border-radius:8px; }
.maine-state-fill { fill:#171a1d; stroke:#d2d8dc; stroke-width:3; }
.county-boundary { fill:none; stroke:#77818a; stroke-width:1.1; opacity:.9; }
.county-label { fill:#aeb7be; font-size:9px; font-weight:700; text-anchor:middle; pointer-events:none; }
.fire-zone-shape { stroke:#111; stroke-width:1.8; vector-effect:non-scaling-stroke; }
.fire-zone-label { fill:#fff; font-size:18px; font-weight:900; text-anchor:middle; dominant-baseline:middle; paint-order:stroke; stroke:#111; stroke-width:4px; pointer-events:none; }
.calais-map-marker { fill:#fff; stroke:#d62828; stroke-width:4; }
.calais-map-label { fill:#fff; font-size:15px; font-weight:900; paint-order:stroke; stroke:#111; stroke-width:4px; }
.wildfire-map-source { color:var(--muted); font-size:.82rem; line-height:1.4; margin-top:8px; }
.wildfire-side { display:grid; align-content:start; gap:16px; }
.wildfire-legend { padding:18px; }.wildfire-legend-title { color:var(--accent); font-weight:900; letter-spacing:.15em; margin-bottom:10px; }
.danger-row { display:flex; align-items:center; gap:12px; padding:8px 0; font-weight:800; }.danger-swatch { width:22px; height:18px; border-radius:4px; display:inline-block; flex:0 0 auto; }.danger-swatch.low{background:#3c9b55}.danger-swatch.moderate{background:#2e73c5}.danger-swatch.high{background:#e3c23f}.danger-swatch.very-high{background:#e7862b}.danger-swatch.extreme{background:#d62828}.danger-swatch.snow{background:#dce9f7;border:1px solid #aab6c2}
.wildfire-zone-list { padding:10px 18px; } .wildfire-zone-name { display:flex; flex-direction:column; gap:3px; min-width:0; } .wildfire-zone-name strong { line-height:1.2; } .wildfire-zone-name small { color:var(--muted); font-size:.72rem; line-height:1.25; font-weight:600; }.wildfire-zone-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:9px 0; border-bottom:1px solid var(--border); }.wildfire-zone-row:last-child{border-bottom:0}.danger-badge{padding:4px 8px;border-radius:6px;font-size:.75rem;font-weight:900;text-transform:uppercase}.danger-badge.low{background:#3c9b55}.danger-badge.moderate{background:#2e73c5}.danger-badge.high{background:#e3c23f;color:#111}.danger-badge.very-high{background:#e7862b}.danger-badge.extreme{background:#d62828}.danger-badge.snow-cover{background:#dce9f7;color:#111}.danger-badge.unknown{background:#4a5158}
@media (max-width:900px){.wildfire-layout{grid-template-columns:1fr}.wildfire-header{align-items:flex-start;flex-direction:column}.wildfire-overall{width:100%}}

.weather-wildfire { margin-top:18px; padding-top:14px; border-top:1px solid var(--border); }
.weather-wildfire-label { color:var(--accent); font-size:.75rem; font-weight:900; letter-spacing:.16em; }
.weather-wildfire-value { font-size:clamp(1.8rem,3.2vw,2.8rem); font-weight:900; margin-top:4px; }
.weather-wildfire-updated { color:var(--muted); font-size:.8rem; font-weight:700; margin-top:2px; }
.danger-low{color:#69c879}.danger-moderate{color:#70aaf0}.danger-high{color:#e3c23f}.danger-very-high{color:#e7862b}.danger-extreme{color:#ff6868}.danger-snow-cover{color:#dce9f7}.danger-unknown{color:var(--muted)}
.wildfire-admin-grid { display:grid; grid-template-columns:repeat(4, minmax(160px,1fr)); gap:14px; }
.wildfire-admin-zone { border:1px solid var(--border); border-radius:12px; padding:14px; background:rgba(255,255,255,.02); }
.wildfire-admin-zone h2 { margin:0 0 8px; font-size:1rem; }
.wildfire-admin-zone select { width:100%; }
@media(max-width:850px){.wildfire-admin-grid{grid-template-columns:repeat(2,minmax(160px,1fr));}}
@media(max-width:500px){.wildfire-admin-grid{grid-template-columns:1fr;}}
