:root {
    color-scheme: light;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --paper: #fafafa;
    --gold: #f9cc54;
    --gold-deep: #eeac2e;
    --navy: #0f172a;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: "Instrument Sans", "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.45;
}

h1, h2, h3, p { margin: 0; }

a { color: var(--ink); }

button { font: inherit; }

img { display: block; max-width: 100%; }

:focus-visible {
    outline: 2px solid var(--gold-deep);
    outline-offset: 2px;
}

.coast-wrap {
    width: min(68rem, calc(100% - 2rem));
    margin-left: auto;
    margin-right: auto;
}

.coast-banner {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
}

.coast-banner a { color: #ffffff; }

.coast-banner__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.9rem;
}

.coast-lockup {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    color: #ffffff;
    text-decoration: none;
}

.coast-lockup__mark {
    width: 68px;
    height: 68px;
    flex: none;
}

.coast-lockup__words {
    margin: 0;
    font-weight: inherit;
    line-height: 1;
}

.coast-lockup__marra {
    display: block;
    font-family: "Instrument Sans", "Segoe UI", sans-serif;
    font-weight: 700;
    font-size: 2.55rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 0.85;
    color: #ffffff;
}

.coast-lockup__coast {
    display: block;
    margin-top: 0.28rem;
    margin-right: -0.46em;
    padding-left: 0.06em;
    font-family: "Instrument Sans", "Segoe UI", sans-serif;
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: 0.46em;
    text-transform: uppercase;
    line-height: 1;
    color: var(--gold);
}

.coast-banner__date {
    flex: none;
    padding: 0.28rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.55);
    border-radius: 0.25rem;
    white-space: nowrap;
}

.coast-banner__rule {
    height: 1px;
    margin-top: 0.8rem;
    border: 0;
    background: linear-gradient(90deg, var(--gold) 0 4.5rem, rgba(100, 116, 139, 0.45) 4.5rem);
}

.coast-banner__slogan {
    margin-top: 0.65rem;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #e2e8f0;
}

.coast-banner__foot {
    padding: 0.35rem 0 0.9rem;
    text-align: center;
}

.coast-banner__news {
    font-weight: 700;
    text-underline-offset: 0.15em;
}

.coast-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(250, 250, 250, 0.96);
    border-bottom: 1px solid var(--line);
}

.coast-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 1rem;
    padding: 0.5rem 0;
}

.coast-places,
.coast-months,
.coast-week {
    display: flex;
    gap: 0.45rem;
}

.coast-places,
.coast-months {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
}

.coast-week { flex-wrap: wrap; margin-top: 0.75rem; }

.coast-places button,
.coast-months button,
.coast-week button {
    flex: none;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: var(--ink);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.45rem 0.9rem;
    min-height: 2.75rem;
    cursor: pointer;
}

.coast-places button[aria-pressed="true"],
.coast-months button[aria-pressed="true"],
.coast-week button[aria-pressed="true"] {
    background: var(--navy);
    border-color: var(--navy);
    color: #ffffff;
}

.coast-jumps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
}

.coast-jumps a {
    font-weight: 700;
    font-size: 0.92rem;
    text-underline-offset: 0.14em;
}

.coast-main { padding: 0.85rem 0 2.75rem; }

.coast-here {
    margin-top: 0.15rem;
    padding: 0.35rem 0;
    border: 0;
    background: none;
    color: var(--ink);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    cursor: pointer;
    min-height: 2.75rem;
}

.coast-gauge,
.coast-status,
.coast-note,
.coast-noscript {
    margin-top: 0.25rem;
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.45;
}

.coast-status:empty { display: none; }

.coast-hero {
    margin-top: 0.85rem;
    padding: 1rem 1rem 1.1rem;
    background: #ffffff;
    border: 1px solid var(--line);
    border-top: 3px solid var(--gold-deep);
    border-radius: 0.5rem;
}

.coast-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.coast-place {
    margin-top: 0.12rem;
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 2.45rem;
    font-weight: 400;
    line-height: 1.05;
}

.coast-hero__grid {
    display: grid;
    gap: 1rem;
    margin-top: 0.8rem;
}

.coast-temp__num {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 4.2rem;
    line-height: 0.9;
}

.coast-temp__emoji { font-size: 2.4rem; line-height: 1; }

.coast-temp__sky {
    margin-top: 0.35rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.coast-temp__feels {
    margin-top: 0.12rem;
    color: #475569;
}

.coast-windblock {
    background: var(--navy);
    color: #ffffff;
    border-radius: 0.5rem;
    padding: 0.9rem 1rem 1rem;
}

.coast-windblock .coast-kicker { color: var(--gold); }

.coast-windblock__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.coast-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background: #1e293b;
    color: var(--gold);
    font-size: 1.35rem;
    line-height: 1;
}

.coast-arrow[hidden] { display: none; }

.coast-windblock__speed {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 3.15rem;
    line-height: 0.9;
}

.coast-windblock__unit {
    font-family: "Instrument Sans", "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

#coast-wind-dir {
    margin-top: 0.45rem;
    font-size: 1.05rem;
    font-weight: 700;
}

#coast-wind-gust {
    margin-top: 0.15rem;
    color: #e2e8f0;
}

#coast-wind-shore {
    margin-top: 0.2rem;
    color: var(--gold);
    font-weight: 700;
}

.coast-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.coast-fact {
    background: #f8fafc;
    border-radius: 0.4rem;
    padding: 0.5rem 0.6rem 0.55rem;
}

.coast-fact[hidden] { display: none; }

.coast-fact__k {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.coast-fact strong {
    display: block;
    margin-top: 0.12rem;
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.1;
}

.coast-fact__s {
    display: block;
    min-height: 1.1em;
    color: #475569;
    font-size: 0.82rem;
}

.coast-fact__s:empty { display: none; }

.coast-plan {
    margin-top: 0.9rem;
    max-width: 42rem;
    font-size: 1.02rem;
    line-height: 1.45;
}

.coast-flood {
    display: block;
    margin-top: 1rem;
    padding: 0.8rem 0.95rem;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 0.5rem;
    color: #9a3412;
    font-weight: 700;
    text-underline-offset: 0.12em;
}

.coast-section {
    margin-top: 1.6rem;
    scroll-margin-top: 8rem;
}

.coast-section h2,
.coast-panel h2 {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 1.85rem;
    font-weight: 400;
    line-height: 1.1;
}

.coast-sub {
    margin-top: 1.15rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.coast-hours {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.coast-hour {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 0.45rem;
    padding: 0.45rem 0.25rem 0.5rem;
    text-align: center;
}

.coast-hour.is-now {
    border-color: var(--navy);
    box-shadow: inset 0 -3px 0 var(--gold-deep);
}

.coast-hour__t {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.coast-hour__e { margin-top: 0.12rem; font-size: 1.2rem; }

.coast-hour__n {
    margin-top: 0.05rem;
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 1.4rem;
    line-height: 1;
}

.coast-hour__w,
.coast-hour__r {
    margin-top: 0.12rem;
    font-size: 0.78rem;
    color: #334155;
}

.coast-tides {
    list-style: none;
    margin: 0.55rem 0 0;
    padding: 0;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
}

.coast-tides:empty { display: none; }

.coast-tides li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: baseline;
    padding: 0.65rem 0.85rem;
    border-top: 1px solid var(--line);
}

.coast-tides li:first-child { border-top: 0; }

.coast-tides__name { font-weight: 700; }

.coast-tides__tag {
    margin-left: 0.4rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--navy);
    background: var(--gold);
    border-radius: 999px;
    vertical-align: 0.12em;
}

.coast-tides li.is-past { color: var(--muted); }

.coast-now { margin-top: 0.55rem; color: #334155; }

.coast-cal {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.coast-day {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    padding: 0.7rem 0.85rem 0.75rem;
}

.coast-day.is-today {
    border-color: var(--navy);
    box-shadow: inset 3px 0 0 var(--gold-deep);
}

.coast-day__when { font-weight: 700; }

.coast-day__emoji { margin-right: 0.2rem; }

.coast-day__temp { font-weight: 700; }

.coast-day__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.1rem 0.75rem;
}

.coast-months { margin-top: 0.75rem; padding-bottom: 0.35rem; }

.tide-month { margin-top: 0.35rem; }

.tide-month__dow,
.tide-month__pad { display: none; }

.tide-month__day {
    display: grid;
    grid-template-columns: 5.6rem minmax(0, 1fr);
    gap: 0.25rem 0.75rem;
    padding: 0.65rem 0;
    border-top: 1px solid var(--line);
}

.tide-month__day.is-today { box-shadow: inset 3px 0 0 var(--gold-deep); }

.tide-month__day.is-past { color: var(--muted); }

.tide-month__date {
    display: flex;
    gap: 0.35rem;
    align-items: baseline;
    font-weight: 700;
}

.tide-month__tides {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tide-month__tides li { line-height: 1.35; }

.coast-panel {
    margin-top: 1.35rem;
    padding: 1rem 1.05rem 1.1rem;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
}

.coast-legal h2 { font-size: 1.45rem; }

.coast-legal p,
.coast-sources {
    margin-top: 0.45rem;
    color: #334155;
    line-height: 1.5;
}

.coast-sources {
    color: var(--muted);
    font-size: 0.82rem;
}

.coast-sources a { color: var(--ink); }

.coast-reads {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.75rem;
}

@media (max-width: 700px) {
    .coast-section { scroll-margin-top: 12.5rem; }
    .coast-places { flex-wrap: wrap; overflow: visible; }
    .coast-places button {
        flex: 1 1 calc(50% - 0.45rem);
        padding: 0.4rem 0.5rem;
        font-size: 0.9rem;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .coast-lockup__mark { width: 48px; height: 48px; }
    .coast-lockup__marra { font-size: 1.7rem; }
    .coast-lockup__coast {
        font-size: 0.72rem;
        letter-spacing: 0.34em;
        margin-right: -0.34em;
    }
    .coast-banner__date { font-size: 0.68rem; padding: 0.2rem 0.35rem; }
    .coast-place { font-size: 2rem; }
    .coast-temp__num { font-size: 3.3rem; }
    .coast-windblock__speed { font-size: 2.6rem; }
}

@media (min-width: 640px) {
    .coast-banner__slogan { font-size: 1.125rem; }
    .coast-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .coast-cal { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 720px) {
    .coast-hours { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 800px) {
    .coast-hero__grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
        align-items: center;
    }

    .tide-month {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .tide-month__dow {
        display: block;
        padding: 0.15rem 0.3rem 0.25rem;
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--muted);
    }

    .tide-month__pad { display: block; }

    .tide-month__day {
        display: block;
        min-height: 7.25rem;
        padding: 0.35rem 0.35rem 0.45rem;
        background: #ffffff;
        border: 1px solid var(--line);
        border-radius: 0.4rem;
        box-shadow: none;
    }

    .tide-month__day.is-today {
        border-color: var(--navy);
        box-shadow: inset 0 3px 0 var(--gold-deep);
    }

    .tide-month__date { display: block; }

    .tide-month__wd { display: none; }

    .tide-month__n {
        font-family: "DM Serif Display", Georgia, serif;
        font-size: 1.25rem;
        font-weight: 400;
    }

    .tide-month__tides li { font-size: 0.72rem; }
}

@media (min-width: 900px) {
    .coast-cal { grid-template-columns: repeat(7, minmax(0, 1fr)); }

    .coast-day {
        display: block;
        min-height: 100%;
        padding: 0.45rem 0.4rem 0.55rem;
    }

    .coast-day p { font-size: 0.78rem; line-height: 1.35; }

    .coast-day__when { font-size: 0.82rem; }
}

@media (min-width: 1000px) {
    .coast-facts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
