:root {
    --bg: #030712;
    --panel: rgba(15, 23, 42, 0.92);
    --border: rgba(56, 189, 248, 0.18);
    --text: #e2e8f0;
    --muted: #64748b;
    --accent: #38bdf8;
    --go: #22c55e;
    --caution: #f59e0b;
    --nogo: #ef4444;
    --mono: "JetBrains Mono", monospace;
    --sans: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.mono { font-family: var(--mono); font-size: 0.85em; }

.cockpit {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.75rem 1rem 1rem;
}

/* —— Forecast day picker (centered) —— */
.forecast-day-bar {
    text-align: center;
    padding: 0.85rem 1rem 1rem;
    margin-bottom: 0.75rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.forecast-day-bar__question {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0 0.55rem;
    color: var(--text);
}

.forecast-query-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    max-width: 42rem;
    margin: 0 auto 0.45rem;
}

.forecast-query-input {
    flex: 1 1 16rem;
    min-width: 0;
    font-family: var(--sans, "Inter", sans-serif);
    font-size: 0.82rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(2, 6, 23, 0.55);
    color: var(--text);
}

.forecast-query-input:focus {
    outline: none;
    border-color: var(--accent);
}

.forecast-query-submit {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.55rem 1rem;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent);
    cursor: pointer;
}

.forecast-query-submit:hover {
    background: rgba(56, 189, 248, 0.22);
}

.forecast-day-bar__options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.forecast-day-btn {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(2, 6, 23, 0.55);
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.forecast-day-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.forecast-day-btn.is-active {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent);
}

.forecast-day-bar__hint {
    font-size: 0.7rem;
    color: var(--muted);
    margin: 0.35rem 0 0;
}

.nortada-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.12), rgba(15, 23, 42, 0.4));
}

.nortada-alert__body {
    flex: 1;
    min-width: 0;
}

.nortada-alert__scope {
    margin: 0.35rem 0 0;
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    color: rgba(148, 163, 184, 0.95);
    line-height: 1.4;
}

.nortada-alert[hidden] {
    display: none !important;
}

.nortada-alert[data-level="strong"] {
    border-color: rgba(248, 113, 113, 0.45);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.14), rgba(15, 23, 42, 0.45));
}

.nortada-alert[data-level="active"] {
    border-color: rgba(251, 191, 36, 0.45);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.4));
}

.nortada-alert__badge {
    flex-shrink: 0;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #38bdf8;
    padding-top: 0.1rem;
}

.nortada-alert[data-level="strong"] .nortada-alert__badge { color: #f87171; }
.nortada-alert[data-level="active"] .nortada-alert__badge { color: #fbbf24; }

.nortada-alert__text {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #e2e8f0;
}

.insight-layers span[data-layer="nortada"] {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(14, 165, 233, 0.08);
}

.rain-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(96, 165, 250, 0.35);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12), rgba(15, 23, 42, 0.4));
}

.rain-alert__body {
    flex: 1;
    min-width: 0;
}

.rain-alert__scope {
    margin: 0.35rem 0 0;
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    color: rgba(148, 163, 184, 0.95);
    line-height: 1.4;
}

.rain-alert[hidden] {
    display: none !important;
}

.rain-alert[data-level="strong"] {
    border-color: rgba(96, 165, 250, 0.55);
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.45));
}

.rain-alert[data-level="active"] {
    border-color: rgba(125, 211, 252, 0.45);
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.14), rgba(15, 23, 42, 0.4));
}

.rain-alert__badge {
    flex-shrink: 0;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #60a5fa;
}

.rain-alert[data-level="strong"] .rain-alert__badge { color: #93c5fd; }
.rain-alert[data-level="active"] .rain-alert__badge { color: #7dd3fc; }

.rain-alert__text {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #e2e8f0;
}

.insight-layers span[data-layer="rain"] {
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(59, 130, 246, 0.08);
}

/* —— Operational header —— */
.op-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.op-header__back {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    margin-right: 0.75rem;
}
.op-header__back:hover { color: var(--accent); }

.op-header__upgrade {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: var(--caution);
}
.op-header__upgrade:hover { color: var(--accent); }

.skipper-lite-banner {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-left: 2px solid var(--caution);
}

.op-header__upgrade {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: var(--caution);
}
.op-header__upgrade:hover { color: var(--accent); }

.skipper-lite-banner {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-left: 2px solid var(--caution);
}

.op-header__mode {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    font-weight: 600;
}

.op-header__region {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.op-header__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    color: var(--muted);
    font-size: 0.75rem;
}

.gongo-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    border: 2px solid var(--caution);
    background: rgba(245, 158, 11, 0.08);
}

.gongo-pill[data-status="GO"] {
    border-color: var(--go);
    background: rgba(34, 197, 94, 0.1);
}
.gongo-pill[data-status="GO"] .gongo-pill__label { color: var(--go); }

.gongo-pill[data-status="CAUTION"] .gongo-pill__label { color: var(--caution); }

.gongo-pill[data-status="NO-GO"] {
    border-color: var(--nogo);
    background: rgba(239, 68, 68, 0.12);
    animation: pulse-nogo 2s ease-in-out infinite;
}
.gongo-pill[data-status="NO-GO"] .gongo-pill__label { color: var(--nogo); }

@keyframes pulse-nogo {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 12px 2px rgba(239, 68, 68, 0.25); }
}

.gongo-pill__label {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.gongo-pill__sub { font-size: 0.65rem; color: var(--muted); margin-top: 0.15rem; }

/* —— Grid layout —— */
.cockpit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
        "map marine"
        "insight insight"
        "tides tides"
        "timeline timeline"
        "founders founders";
    gap: 0.75rem;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

.panel--map {
    grid-area: map;
    min-height: clamp(280px, 36vh, 400px);
    display: flex;
    flex-direction: column;
}

.panel--marine {
    grid-area: marine;
    min-height: clamp(280px, 36vh, 400px);
}

.panel--insight {
    grid-area: insight;
    min-height: clamp(200px, 28vh, 320px);
    max-height: clamp(240px, 32vh, 360px);
    display: flex;
    flex-direction: column;
}

.panel--tides {
    grid-area: tides;
    min-height: 140px;
}

.panel--timeline {
    grid-area: timeline;
}

.panel--founders {
    grid-area: founders;
}

.founders-report {
    margin: 0.5rem 0.75rem 0;
    padding: 0.55rem 0.65rem;
    border-left: 3px solid var(--go);
    background: rgba(34, 197, 94, 0.06);
    border-radius: 4px;
}

.founders-report__line {
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--text);
    margin: 0 0 0.35rem;
}

.founders-report__title {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--go);
    margin: 0 0 0.4rem;
}

.founders-report__line:last-child {
    margin-bottom: 0;
}

.founders-intro {
    font-size: 0.75rem;
    color: var(--muted);
    padding: 0.5rem 0.75rem 0;
    line-height: 1.4;
}

.founders-prompt {
    font-size: 0.65rem;
    color: var(--caution);
}

.founders-questions {
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.founders-q {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.45rem 0.5rem;
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
}

.founders-q__text {
    font-size: 0.78rem;
    line-height: 1.35;
}

.founders-q__btns {
    display: flex;
    gap: 0.25rem;
}

.founders-q__btn {
    font-family: var(--mono);
    font-size: 0.65rem;
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    border-radius: 4px;
    cursor: pointer;
}

.founders-q__btn:hover { border-color: var(--accent); color: var(--accent); }

.founders-q__btn.is-selected {
    border-color: var(--accent);
    color: var(--bg);
    background: var(--accent);
}

.founders-q__btn.is-selected[data-value="no"] {
    border-color: var(--nogo);
    background: rgba(239, 68, 68, 0.25);
    color: #fecaca;
}

.founders-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.75rem 0.75rem;
    flex-wrap: wrap;
}

.founders-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.founders-status {
    font-size: 0.7rem;
    color: var(--muted);
}

.founders-status--ok { color: var(--go); }

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.5);
}

.panel__head h2 {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    color: var(--accent);
    font-weight: 600;
}

.windy-frame-wrap {
    flex: 1 1 auto;
    min-height: clamp(220px, 30vh, 340px);
    height: 100%;
    position: relative;
}

.windy-frame-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.panel__map-hint {
    margin: 0;
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    color: var(--muted);
    text-align: right;
    max-width: 14rem;
    line-height: 1.3;
}

.weather-map-wrap {
    flex: 1 1 auto;
    min-height: clamp(280px, 36vh, 420px);
    position: relative;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    align-self: stretch;
}

.overlay-tabs button {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.6rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    margin-left: 0.25rem;
    border-radius: 4px;
}
.overlay-tabs button.active,
.overlay-tabs button:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Marine tiles */
.marine-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.75rem;
    flex: 1;
    align-content: start;
}

.tile {
    padding: 0.6rem;
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.tile h3 {
    font-size: 0.55rem;
    letter-spacing: 0.14em;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.tile__value { font-size: 1rem; font-weight: 600; }
.tile__sub { font-size: 0.7rem; color: var(--muted); margin-top: 0.2rem; }
#tile-swell { white-space: pre-line; line-height: 1.35; }

.ground-truth {
    margin: 0 0.75rem 0.75rem;
    font-size: 0.7rem;
    color: var(--muted);
}
.ground-truth pre {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.65rem;
    max-height: 120px;
}

/* Insight */
.panel__head-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insight-oldsalt-ctrl {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.insight-oldsalt-label {
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    font-weight: 600;
    color: #f59e0b;
}

.insight-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 0.5rem;
}

.insight-layers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    padding: 0.45rem 0.75rem 0;
    font-size: 0.58rem;
    color: var(--muted);
    letter-spacing: 0.04em;
}
.insight-layers span {
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.25);
}
.insight-layers span[data-layer="go"] { color: var(--go); border-color: rgba(34, 197, 94, 0.25); }
.insight-layers span[data-layer="risk"] { color: var(--caution); }

.insight-section-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0.5rem 0.75rem 0;
    margin: 0;
}

.insight-section-label--watch {
    padding-top: 0.35rem;
}

.insight-body--watch-only .insight-section-label--watch {
    padding-top: 0.65rem;
}

.insight-body--watch-only .insight-summary {
    display: none;
}

.insight-summary[hidden] {
    display: none;
}

.insight-fallback-note {
    margin: 0 1rem 0.55rem;
    padding: 0.45rem 0.65rem;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(30, 41, 59, 0.55);
    font-size: 0.72rem;
    line-height: 1.4;
    color: #94a3b8;
}

.insight-fallback-note[hidden] {
    display: none !important;
}

.insight-summary {
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
    line-height: 1.5;
    border-left: 3px solid var(--accent);
    margin: 0.5rem 0.75rem 0;
    background: rgba(56, 189, 248, 0.05);
    color: var(--text);
    white-space: pre-line;
}

.insight-summary--structured {
    white-space: normal;
    display: grid;
    gap: 0.55rem;
    padding: 0.7rem 0.8rem;
}

.insight-sec {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.insight-sec__title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    line-height: 1.2;
}

.insight-sec__body {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text);
    max-width: 42rem;
}

.insight-bullets {
    list-style: none;
    padding: 0 0.75rem 0.5rem 1.5rem;
}
.insight-bullets li {
    font-size: 0.72rem;
    line-height: 1.45;
    margin-bottom: 0.35rem;
    color: var(--text);
    position: relative;
    padding-left: 0.75rem;
}
.insight-bullets li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Old Salt on — same prominence, veteran tone */
.insight-body--oldsalt .insight-summary {
    font-size: 1.05rem;
    line-height: 1.62;
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.06);
    color: #fef3c7;
}
.insight-body--oldsalt .insight-bullets li {
    font-size: 0.88rem;
    line-height: 1.55;
    color: #e7e5e4;
}
.insight-body--oldsalt .insight-bullets li::before {
    color: #f59e0b;
}

.btn-refresh {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--accent);
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}
.btn-refresh:hover { background: rgba(56, 189, 248, 0.1); }

/* Tide wave chart */
.panel__head--tides {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.tide-meta {
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-align: right;
    max-width: 55%;
    line-height: 1.35;
}

.tide-phase-caption {
    margin: 0 0.75rem 0.5rem;
    font-size: 0.62rem;
    color: #7dd3fc;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.tide-chart-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 0.75rem;
    padding: 0.5rem 0.75rem 0.25rem;
}

.tide-chart-inner {
    position: relative;
    min-width: 100%;
}

.tide-chart {
    display: block;
    width: 100%;
    height: 88px;
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.06) 0%, rgba(2, 6, 23, 0.4) 100%);
    border: 1px solid rgba(56, 189, 248, 0.15);
}

.tide-chart-labels {
    position: relative;
    height: 2.85rem;
    margin: 0 0 0.65rem;
    font-size: 0.58rem;
    color: var(--muted);
}

.tide-chart-labels span {
    position: absolute;
    transform: translateX(-50%);
    text-align: center;
    min-width: 4.25rem;
    line-height: 1.25;
    white-space: nowrap;
}

.tide-chart-labels strong {
    display: block;
    color: var(--accent);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    margin-bottom: 0.1rem;
}

.tide-chart-empty {
    font-size: 0.7rem;
    color: var(--muted);
    padding: 0.5rem 0.75rem 0.75rem;
}

.tide-chart__line {
    fill: none;
    stroke: #38bdf8;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}

.tide-chart__area {
    fill: url(#tideFill);
}

.tide-chart__dot {
    fill: #0f172a;
    stroke: #7dd3fc;
    stroke-width: 2;
}

/* Timeline */
.panel--timeline .timeline {
    flex: 1;
}

.timeline {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

.timeline__item {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.5);
    text-align: center;
}

.timeline__item[data-status="GO"] { border-color: rgba(34, 197, 94, 0.4); }
.timeline__item[data-status="CAUTION"] { border-color: rgba(245, 158, 11, 0.4); }
.timeline__item[data-status="NO-GO"] { border-color: rgba(239, 68, 68, 0.5); }

.timeline__label {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
}

.timeline__status {
    font-size: 0.75rem;
    font-weight: 700;
    margin: 0.25rem 0;
    letter-spacing: 0.06em;
}

.timeline__note {
    font-size: 0.6rem;
    color: var(--muted);
    line-height: 1.3;
}

.blackbox-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0 0.75rem 0.75rem;
}

.bb-btn {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.4rem 0.65rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: rgba(34, 197, 94, 0.12);
    color: var(--go);
    cursor: pointer;
}
.bb-btn:hover { filter: brightness(1.15); }

.bb-btn--warn {
    background: rgba(245, 158, 11, 0.1);
    color: var(--caution);
}

.bb-link {
    font-size: 0.65rem;
    color: var(--accent);
    margin-left: auto;
}

.blackbox-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0 0.75rem 0.75rem;
}

.bb-btn {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.4rem 0.65rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: rgba(34, 197, 94, 0.12);
    color: var(--go);
    cursor: pointer;
}
.bb-btn:hover { filter: brightness(1.15); }

.bb-btn--warn {
    background: rgba(245, 158, 11, 0.1);
    color: var(--caution);
}

.bb-link {
    font-size: 0.65rem;
    color: var(--accent);
    margin-left: auto;
}

.cockpit-footer {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.25rem;
    font-size: 0.65rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

.cockpit.loading { opacity: 0.85; pointer-events: none; }

.skipper-lite-banner {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-left: 2px solid var(--caution);
}

/* Tablet / narrow desktop — single column, equal panel rhythm */
@media (max-width: 1280px) {
    .cockpit-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "marine"
            "map"
            "insight"
            "tides"
            "timeline"
            "founders";
    }

    .panel--map,
    .panel--marine {
        min-height: clamp(260px, 42vw, 360px);
        max-height: none;
    }

    .panel--insight {
        min-height: clamp(200px, 32vw, 300px);
        max-height: none;
    }

    .windy-frame-wrap,
    .weather-map-wrap {
        min-height: clamp(220px, 38vw, 320px);
    }

    .marine-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .op-header {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .op-header__meta {
        align-items: flex-start;
    }

    .gongo-pill {
        justify-self: start;
        width: fit-content;
    }
}

/* Phone / PWA */
@media (max-width: 640px) {
    .cockpit {
        padding: 0.5rem 0.65rem 0.75rem;
    }

    .panel--map,
    .panel--marine {
        min-height: clamp(240px, 52vw, 300px);
    }

    .windy-frame-wrap,
    .weather-map-wrap {
        min-height: clamp(200px, 48vw, 280px);
    }

    .marine-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
        padding: 0.55rem;
    }

    .tile__value {
        font-size: 0.9rem;
    }

    .insight-layers {
        font-size: 0.55rem;
    }

    .op-header {
        grid-template-columns: 1fr;
    }

    .op-header__meta {
        flex-wrap: wrap;
    }

    .gongo-pill {
        width: 100%;
        text-align: center;
    }

    .timeline {
        overflow-x: auto;
    }

    .timeline__item {
        flex: 0 0 auto;
        min-width: 100px;
    }

    .tide-chart-scroll {
        scroll-snap-type: x proximity;
    }

    .tide-chart-labels span {
        min-width: 4.75rem;
    }
}
