:root {
    --ink: #083344;
    --muted: #5d7680;
    --ocean: #087f8c;
    --ocean-dark: #05616c;
    --aqua: #4bc6bf;
    --foam: #f2fbf9;
    --sand: #fff8ea;
    --sun: #f7b733;
    --line: #dcebe9;
    --white: #fff;
    --shadow: 0 18px 55px rgba(6, 67, 77, .10);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #effbf9 0, #fff 430px);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.site-header, main, footer { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.site-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 1.06rem; font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.brand-logo { display: block; width: auto; height: 36px; object-fit: contain; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: var(--white); background: var(--ocean); font-size: 1.5rem; line-height: 1; }
.location { margin: 0; font-size: .88rem; font-weight: 700; color: var(--muted); }
.location span { color: var(--aqua); font-size: .62rem; margin-right: 5px; }

.hero { padding: 52px 0 28px; }
.hero-intro { max-width: 690px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 9px; color: var(--ocean); font-size: .73rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { margin: 0; max-width: 760px; font-size: clamp(2rem, 7vw, 4rem); line-height: 1.02; letter-spacing: -.055em; }
.updated { margin: 17px 0 0; color: var(--muted); font-size: .84rem; }
.updated span { margin: 0 5px; }
.updated.is-stale { color: #8b6200; }

.hero-card {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 26px;
    padding: 26px;
    color: var(--white);
    background: linear-gradient(130deg, #075e69, #07858d 63%, #27a9a3);
    border-radius: 28px;
    box-shadow: var(--shadow);
}
.hero-card::after { content: ""; position: absolute; width: 230px; height: 230px; right: -70px; top: -110px; border: 45px solid rgba(255,255,255,.08); border-radius: 50%; }
.current-weather, .sea-index { display: flex; align-items: center; gap: 16px; z-index: 1; }
.weather-icon { font-size: 3.25rem; filter: drop-shadow(0 4px 5px rgba(0,0,0,.12)); }
.temperature { margin: 0; font-size: 3.25rem; line-height: .9; font-weight: 800; letter-spacing: -.06em; }
.temperature span { font-size: 1.4rem; vertical-align: top; margin-left: 2px; }
.condition { margin: 7px 0 0; color: rgba(255,255,255,.78); font-size: .87rem; }
.verdict { z-index: 1; }
.verdict-kicker { margin: 0 0 6px; color: #a8eee7; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.verdict h2 { margin: 0; font-size: clamp(1.45rem, 5vw, 2.25rem); line-height: 1.08; letter-spacing: -.04em; }
.verdict > p:last-child { margin: 9px 0 0; color: rgba(255,255,255,.74); font-size: .88rem; }
.sea-index { padding-top: 22px; border-top: 1px solid rgba(255,255,255,.19); }
.index-ring { --value: calc(var(--score) * 1%); position: relative; display: grid; place-content: center; width: 76px; height: 76px; flex: 0 0 76px; background: conic-gradient(#f4c755 var(--value), rgba(255,255,255,.17) 0); border-radius: 50%; text-align: center; }
.index-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #087780; }
.index-ring strong, .index-ring span { position: relative; z-index: 1; }
.index-ring strong { font-size: 1.55rem; line-height: 1; }
.index-ring span { color: rgba(255,255,255,.68); font-size: .68rem; }
.sea-index p { margin: 0 0 3px; color: rgba(255,255,255,.7); font-size: .79rem; }
.sea-index p small { font-size: .68rem; }
.sea-index > div:last-child strong { font-size: 1.14rem; }
.sea-index .confidence { display: block; margin-top: 4px; color: #c8f4ef; font-size: .7rem; font-weight: 700; }

.tabs { display: flex; gap: 5px; padding: 5px; margin: 20px 0 26px; overflow-x: auto; background: #edf6f5; border-radius: 15px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1 0 auto; min-height: 42px; padding: 9px 14px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; font: inherit; font-size: .84rem; font-weight: 750; cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab:focus-visible, .button:focus-visible { outline: 3px solid rgba(75,198,191,.45); outline-offset: 2px; }
.tab.is-active { color: var(--ink); background: var(--white); box-shadow: 0 3px 14px rgba(8,51,68,.08); }
.tab-panel[hidden] { display: none; }
.tab-panel { min-height: 340px; }
.section-heading { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; font-size: clamp(1.4rem, 5vw, 2rem); letter-spacing: -.035em; }
.section-heading > p { margin: 0; color: var(--muted); font-size: .86rem; }

.summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.metric-card { padding: 18px 16px; border: 1px solid var(--line); border-radius: 17px; background: var(--white); }
.metric-card:last-child { grid-column: 1 / -1; }
.metric-card p { margin: 0 0 7px; color: var(--muted); font-size: .76rem; }
.metric-card strong { font-size: 1.05rem; letter-spacing: -.02em; }
.metric-card > span { display: block; margin-top: 6px; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.day-overview { display: grid; grid-template-columns: 43px 1fr; align-items: center; gap: 5px 14px; margin-top: 12px; padding: 20px 17px; background: var(--sand); border: 1px solid #f7e6bd; border-radius: 18px; }
.day-overview-icon { display: grid; grid-row: 1 / span 2; place-items: center; width: 43px; height: 43px; color: #8b6200; background: #ffe6a3; border-radius: 13px; font-size: 1.2rem; }
.day-overview p { margin: 0 0 3px; color: #806b3d; font-size: .74rem; }
.day-overview strong { color: #624900; font-size: 1.12rem; line-height: 1.35; }
.day-overview > span { grid-column: 2; color: #806b3d; font-size: .76rem; line-height: 1.45; }
.index-legend { margin-top: 34px; padding: 21px 18px; background: var(--foam); border-radius: 18px; }
.index-legend h3 { margin: 0 0 14px; font-size: .96rem; }
.legend-scale { height: 7px; margin-bottom: 14px; overflow: hidden; background: linear-gradient(90deg, #d95e5e 0 19%, #df9b55 19% 39%, #e5c44f 39% 59%, #82bd75 59% 74%, #3cab8e 74% 89%, #168a83 89%); border-radius: 10px; }
.index-legend ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px 14px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .7rem; }
.index-legend b { color: var(--ink); display: block; font-size: .72rem; }
.calculation-note { margin-top: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.calculation-note summary { cursor: pointer; color: var(--ocean); font-size: .82rem; font-weight: 800; }
.calculation-note p { margin: 11px 0 0; max-width: 850px; color: var(--muted); font-size: .75rem; line-height: 1.55; }

.hourly-list { border: 1px solid var(--line); border-radius: 20px; overflow-x: auto; background: var(--white); }
.hourly-row { display: grid; grid-template-columns: 54px 1fr 1fr; gap: 14px 10px; padding: 18px 16px; border-bottom: 1px solid var(--line); }
.hourly-row:last-child { border-bottom: 0; }
.hourly-header { display: none; }
.hour-time { font-size: 1.05rem; }
.hour-condition { grid-column: 2 / -1; font-size: .84rem; font-weight: 700; }
.hour-condition i { margin-right: 5px; font-style: normal; }
.hourly-row span[data-label] { color: var(--ink); font-size: .8rem; font-weight: 650; }
.hourly-row span[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: .65rem; font-weight: 500; }
.coming-soon { display: grid; place-items: center; align-content: center; min-height: 380px; padding: 30px; border: 1px dashed #b8d9d6; border-radius: var(--radius); text-align: center; background: var(--foam); }
.coming-soon > span { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 18px; color: var(--white); background: var(--ocean); border-radius: 17px; font-size: 2rem; }
.coming-soon h2 { margin: 0; font-size: 1.8rem; }
.coming-soon > p:last-child { max-width: 380px; margin: 8px 0 0; color: var(--muted); font-size: .87rem; }
.empty-data { grid-column: 1 / -1; margin: 0; padding: 32px 20px; color: var(--muted); text-align: center; font-size: .86rem; }
.data-source { display: flex; flex-direction: column; gap: 5px; margin-top: 28px; padding: 14px 16px; color: var(--muted); background: var(--foam); border-radius: 13px; font-size: .72rem; }
.data-source p { margin: 0; }
.data-source strong { color: var(--ink); }
.data-source .source-warning { color: #8b6200; font-weight: 700; }

.boat-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; margin: 70px 0 35px; padding: 28px 24px; border-radius: 24px; background: #083c4a; color: var(--white); }
.boat-cta p { margin: 0 0 5px; color: #9cded8; font-size: .78rem; font-weight: 700; }
.boat-cta h2 { margin: 0; font-size: clamp(1.3rem, 5vw, 1.8rem); letter-spacing: -.035em; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 11px 17px; border-radius: 13px; background: var(--white); color: var(--ink); font-size: .84rem; font-weight: 800; text-decoration: none; }
.button:hover { transform: translateY(-1px); }
.not-found { min-height: 66vh; display: grid; place-content: center; justify-items: start; }
.not-found h1 { margin-bottom: 12px; }
.not-found > p:not(.eyebrow) { color: var(--muted); }
.not-found .button { margin-top: 12px; color: var(--white); background: var(--ocean); }

footer { display: grid; gap: 10px; padding: 35px 0 45px; border-top: 1px solid var(--line); }
.footer-brand { margin-bottom: 5px; }
.footer-brand .brand-logo { height: 36px; }
footer p, footer small { margin: 0; color: var(--muted); font-size: .78rem; }

@media (min-width: 720px) {
    .site-header, main, footer { width: min(1120px, calc(100% - 72px)); }
    .hero { padding-top: 74px; }
    .hero-card { grid-template-columns: 220px 1fr 210px; align-items: center; padding: 35px; }
    .sea-index { padding: 0 0 0 28px; border-top: 0; border-left: 1px solid rgba(255,255,255,.19); }
    .section-heading { flex-direction: row; align-items: end; justify-content: space-between; }
    .summary-grid { grid-template-columns: repeat(5, 1fr); }
    .metric-card:last-child { grid-column: auto; }
    .day-overview { grid-template-columns: 43px minmax(0, 1fr) minmax(220px, .55fr); gap: 14px; padding-inline: 21px; }
    .day-overview-icon { grid-row: auto; }
    .day-overview > span { grid-column: auto; text-align: right; }
    .index-legend ul { grid-template-columns: repeat(6, 1fr); }
    .boat-cta { flex-direction: row; align-items: center; justify-content: space-between; padding: 30px 32px; }
    footer { grid-template-columns: 1fr auto; align-items: end; }
    footer small { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
    .brand-logo { height: 34px; }
}

@media (min-width: 900px) {
    .hourly-row { min-width: 980px; grid-template-columns: 65px 1.5fr repeat(9, minmax(62px, 1fr)); align-items: center; gap: 8px; padding: 16px 14px; }
    .hourly-header { display: grid; color: var(--muted); background: var(--foam); font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
    .hour-condition { grid-column: auto; }
    .hourly-row span[data-label]::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}
