@layer reset, base, components, utilities;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    color-scheme: light;
    scroll-behavior: smooth;
  }

  body,
  h1,
  h2,
  h3,
  h4,
  h5,
  p,
  dl,
  dd {
    margin: 0;
  }

  button,
  input,
  select,
  textarea {
    font: inherit;
  }

  button {
    color: inherit;
  }

  img,
  svg {
    display: block;
  }

  [hidden] {
    display: none !important;
  }
}

@layer base {
  :root {
    --ink: #082b39;
    --ink-soft: #365662;
    --ocean: #087f8c;
    --ocean-deep: #075667;
    --ocean-pale: #dff3f1;
    --foam: #f4f7f3;
    --sand: #eee7d7;
    --paper: #fffefa;
    --line: #d6dfdc;
    --sun: #f4b942;
    --danger: #a13b32;
    --danger-pale: #fff0ec;
    --warning: #946518;
    --warning-pale: #fff5d8;
    --success: #18705f;
    --shadow: 0 18px 50px rgba(8, 43, 57, 0.1);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 11px;
    --content-width: 1180px;
  }

  body {
    min-width: 320px;
    min-height: 100vh;
    background:
      radial-gradient(circle at 8% 7%, rgba(8, 127, 140, 0.1), transparent 28rem),
      linear-gradient(180deg, #edf5f1 0, var(--foam) 34rem, #f7f5ef 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
  }

  a {
    color: var(--ocean-deep);
    text-underline-offset: 0.2em;
  }

  a:hover {
    text-decoration-thickness: 2px;
  }

  button {
    -webkit-tap-highlight-color: transparent;
  }

  button:focus-visible,
  a:focus-visible,
  [tabindex="0"]:focus-visible {
    outline: 3px solid var(--sun);
    outline-offset: 3px;
  }

  main {
    width: min(100% - 28px, var(--content-width));
    margin: 0 auto;
    padding: 22px 0 64px;
  }

  h1,
  h2,
  h3 {
    line-height: 1.08;
    letter-spacing: -0.025em;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 4rem);
  }

  h2 {
    font-size: clamp(1.45rem, 4vw, 2.2rem);
  }

  h3 {
    font-size: 1.1rem;
  }
}

@layer components {
  .skip-link {
    position: fixed;
    z-index: 100;
    top: 10px;
    left: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    font-weight: 750;
    transform: translateY(-150%);
    transition: transform 160ms ease;
  }

  .skip-link:focus {
    transform: translateY(0);
  }

  .site-header {
    position: relative;
    overflow: hidden;
    background:
      radial-gradient(circle at 88% -20%, rgba(167, 230, 221, 0.36), transparent 42%),
      linear-gradient(135deg, #063b4b, #075d69 68%, #087f82);
    color: #f8fffc;
  }

  .site-header::after {
    content: "";
    position: absolute;
    right: -7rem;
    bottom: -10rem;
    width: 25rem;
    height: 20rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    box-shadow:
      0 0 0 34px rgba(255, 255, 255, 0.035),
      0 0 0 70px rgba(255, 255, 255, 0.025);
    pointer-events: none;
  }

  .header-inner {
    position: relative;
    z-index: 1;
    width: min(100% - 28px, var(--content-width));
    margin: 0 auto;
    padding: 30px 0 34px;
  }

  .brand-block {
    max-width: 710px;
  }

  .eyebrow,
  .section-kicker,
  .card-kicker,
  .coverage-label {
    color: var(--ocean);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .eyebrow {
    margin-bottom: 8px;
    color: #9ee1d8;
  }

  .header-copy {
    max-width: 42rem;
    margin-top: 12px;
    color: rgba(248, 255, 252, 0.75);
    font-size: 0.95rem;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
  }

  .status-pill {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.14);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
  }

  .status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #80dfc5;
    box-shadow: 0 0 0 4px rgba(128, 223, 197, 0.14);
  }

  .status-pill--loading .status-dot {
    animation: pulse 1.2s ease-in-out infinite;
  }

  .status-pill--stale .status-dot {
    background: #ffd166;
    box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.16);
  }

  .status-pill--error .status-dot {
    background: #ff8b7d;
    box-shadow: 0 0 0 4px rgba(255, 139, 125, 0.16);
  }

  .icon-button {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: background 150ms ease, transform 150ms ease;
  }

  .icon-button:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .icon-button:active {
    transform: scale(0.96);
  }

  .icon-button.is-refreshing svg {
    animation: spin 900ms linear infinite;
  }

  .feedback {
    display: flex;
    min-height: 190px;
    align-items: center;
    gap: 18px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 254, 250, 0.86);
    box-shadow: var(--shadow);
  }

  .feedback h2 {
    margin-bottom: 8px;
    font-size: 1.35rem;
  }

  .feedback p {
    max-width: 42rem;
    color: var(--ink-soft);
  }

  .feedback--error {
    border-color: #edc6bd;
    background: var(--danger-pale);
  }

  .feedback--empty {
    border-color: #ead9ae;
    background: var(--warning-pale);
  }

  .loader {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border: 3px solid var(--ocean-pale);
    border-top-color: var(--ocean);
    border-radius: 50%;
    animation: spin 850ms linear infinite;
  }

  .spot-section,
  .forecast-section,
  .method-section {
    margin-top: 22px;
  }

  .spot-section,
  .method-section {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 254, 250, 0.86);
    box-shadow: 0 12px 34px rgba(8, 43, 57, 0.06);
  }

  .section-heading-row,
  .forecast-heading,
  .now-card__topline,
  .detail-card__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
  }

  .section-kicker,
  .card-kicker {
    margin-bottom: 6px;
  }

  .section-note,
  .muted-copy {
    color: var(--ink-soft);
    font-size: 0.8rem;
  }

  .section-note {
    max-width: 15rem;
    text-align: right;
  }

  .spot-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 20px;
  }

  .spot-tab,
  .day-tab,
  .hour-button {
    border: 1px solid var(--line);
    background: var(--paper);
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
  }

  .spot-tab {
    min-height: 54px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    font-size: 0.83rem;
    font-weight: 750;
    line-height: 1.2;
    text-align: left;
  }

  .spot-tab:hover,
  .day-tab:hover,
  .hour-button:hover {
    border-color: #8dbeba;
    transform: translateY(-1px);
  }

  .spot-tab[aria-selected="true"] {
    border-color: var(--ocean-deep);
    background: var(--ocean-deep);
    color: #fff;
    box-shadow: 0 8px 18px rgba(7, 86, 103, 0.18);
  }

  .forecast-section {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow);
  }

  .forecast-heading {
    padding: 22px;
  }

  .forecast-subtitle {
    margin-top: 7px;
  }

  .coverage-block {
    min-width: 112px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--ocean-pale);
    text-align: right;
  }

  .coverage-label {
    display: block;
    margin-bottom: 2px;
    font-size: 0.58rem;
  }

  .coverage-block strong {
    display: block;
    color: var(--ocean-deep);
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .chart-section {
    padding: 20px 14px 16px;
    border-top: 1px solid var(--line);
    background: #fbfcf9;
  }

  .chart-unit {
    flex: 0 0 auto;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 750;
  }

  .chart-figure {
    margin: 14px 0 0;
  }

  .chart-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--paper);
    scrollbar-width: thin;
  }

  .chart-wrap svg {
    width: 100%;
    min-width: 760px;
    height: auto;
  }

  .chart-grid-line {
    stroke: #dce5e1;
    stroke-width: 1;
  }

  .chart-date-line {
    stroke: #9eb4ae;
    stroke-dasharray: 3 4;
    stroke-width: 1;
  }

  .chart-axis-label,
  .chart-date-label,
  .chart-empty {
    fill: var(--ink-soft);
    font-family: inherit;
    font-size: 11px;
  }

  .chart-date-label {
    font-size: 10px;
    font-weight: 750;
  }

  .chart-line {
    fill: none;
    stroke: var(--ocean);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
  }

  .chart-single-point,
  .chart-selection-point {
    fill: var(--paper);
    stroke: var(--ocean);
    stroke-width: 3;
  }

  .chart-selection-line {
    stroke: var(--danger);
    stroke-width: 1.5;
  }

  .chart-selection-point {
    stroke: var(--danger);
  }

  .chart-hit-area {
    fill: transparent;
    cursor: crosshair;
  }

  .chart-controls {
    display: grid;
    grid-template-columns: auto minmax(100px, 1fr);
    align-items: center;
    gap: 7px 12px;
    padding: 10px 12px;
    border-top: 1px solid var(--line);
  }

  .chart-controls__label,
  .chart-controls__value {
    color: var(--ink-soft);
    font-size: 0.7rem;
  }

  .chart-controls__label {
    font-weight: 750;
  }

  .chart-hour-slider {
    width: 100%;
    accent-color: var(--ocean-deep);
  }

  .chart-controls__value {
    grid-column: 1 / -1;
  }

  .chart-source {
    margin-top: 9px;
    color: var(--ink-soft);
    font-size: 0.72rem;
  }

  .hourly-details {
    border-top: 1px solid var(--line);
  }

  .hourly-details > summary {
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px;
    background: #f4f8f5;
    cursor: pointer;
    list-style: none;
  }

  .hourly-details > summary::-webkit-details-marker {
    display: none;
  }

  .hourly-details > summary::after {
    content: "+";
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    color: var(--ocean-deep);
    font-size: 1.2rem;
    font-weight: 500;
  }

  .hourly-details[open] > summary::after {
    content: "−";
  }

  .hourly-details > summary:focus-visible {
    outline: 3px solid var(--sun);
    outline-offset: -3px;
  }

  .hourly-details > summary strong,
  .hourly-details > summary .section-kicker {
    display: block;
  }

  .hourly-details__selection {
    min-width: 0;
    margin-left: auto;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.72rem;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .day-nav {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #f4f8f5;
  }

  .day-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 11px 14px;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }

  .day-tab {
    min-width: 88px;
    min-height: 58px;
    flex: 1 0 auto;
    padding: 8px 10px;
    border-radius: 10px;
    scroll-snap-align: start;
    text-align: left;
  }

  .day-tab span,
  .day-tab small {
    display: block;
  }

  .day-tab span {
    color: var(--ink);
    font-size: 0.83rem;
    font-weight: 800;
  }

  .day-tab small {
    margin-top: 2px;
    color: var(--ink-soft);
    font-size: 0.7rem;
  }

  .day-tab[aria-pressed="true"] {
    border-color: var(--ocean);
    background: var(--ocean);
  }

  .day-tab[aria-pressed="true"] span,
  .day-tab[aria-pressed="true"] small {
    color: #fff;
  }

  .forecast-grid {
    display: grid;
    gap: 14px;
    padding: 14px;
    background: #edf4f1;
  }

  .now-card,
  .detail-card {
    border: 1px solid rgba(214, 223, 220, 0.9);
    border-radius: var(--radius-md);
    background: var(--paper);
  }

  .now-card {
    display: flex;
    min-height: 330px;
    flex-direction: column;
    padding: 20px;
    background:
      radial-gradient(circle at 100% 0, rgba(121, 205, 195, 0.24), transparent 45%),
      linear-gradient(145deg, #063c4c, #075c68);
    color: #fff;
  }

  .now-card .card-kicker,
  .now-card .metric-label {
    color: #9ee1d8;
  }

  .now-card h3 {
    max-width: 20rem;
    font-size: 1rem;
    line-height: 1.35;
  }

  .daylight-badge {
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .wave-hero {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 17px;
    padding: 24px 0 18px;
  }

  .metric-label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.75rem;
    font-weight: 750;
  }

  .wave-value {
    display: block;
    font-size: clamp(3.6rem, 17vw, 6.2rem);
    font-variant-numeric: tabular-nums;
    font-weight: 750;
    letter-spacing: -0.08em;
    line-height: 0.88;
  }

  .wave-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
    font-weight: 700;
  }

  .meta-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.42);
  }

  .measurement-note,
  .quality-note {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.72rem;
  }

  .quality-note {
    margin-top: 7px;
    color: #ffd98a;
  }

  .detail-stack {
    display: grid;
    gap: 14px;
  }

  .detail-card {
    padding: 20px;
  }

  .metric-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-top: 14px;
    border-top: 1px solid var(--line);
  }

  .metric-list > div {
    min-width: 0;
    padding: 12px 8px 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-list > div:nth-child(even) {
    padding-right: 0;
    padding-left: 10px;
    border-left: 1px solid var(--line);
  }

  .metric-list dt {
    color: var(--ink-soft);
    font-size: 0.68rem;
  }

  .metric-list dd {
    margin-top: 2px;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
  }

  .weather-summary {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--sand);
  }

  .weather-summary strong {
    font-size: 0.9rem;
  }

  .temperature {
    flex: 0 0 auto;
    font-size: 1.55rem;
    font-variant-numeric: tabular-nums;
    font-weight: 750;
  }

  .rating-section,
  .hour-section,
  .table-section {
    padding: 22px 14px;
    border-top: 1px solid var(--line);
  }

  .rating-intro {
    max-width: 58rem;
    margin-top: 10px;
    color: var(--ink-soft);
    font-size: 0.8rem;
  }

  .rating-layout {
    display: grid;
    gap: 12px;
    margin-top: 16px;
  }

  .rating-panel {
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #f8faf7;
  }

  .rating-panel h4 {
    font-size: 0.95rem;
  }

  .rating-panel__context {
    margin-top: 6px;
    color: var(--ink-soft);
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .rating-panel__hint {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 0.7rem;
  }

  .rating-scores {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
  }

  .rating-score {
    min-width: 0;
    padding: 10px 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    text-align: center;
  }

  .rating-score:hover {
    border-color: #8dbeba;
  }

  .rating-score > span,
  .rating-score > strong {
    display: block;
  }

  .rating-score__skill {
    overflow-wrap: anywhere;
    font-size: 0.72rem;
    font-weight: 800;
  }

  .rating-score__value {
    margin: 4px 0 1px;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
  }

  .rating-score__status {
    color: var(--success);
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .rating-score__fit {
    margin-top: 4px;
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .rating-score--stale .rating-score__status {
    color: var(--warning);
  }

  .rating-score--unavailable .rating-score__status {
    color: var(--danger);
  }

  .rating-score[aria-pressed="true"] {
    border-width: 2px;
    border-color: var(--ocean-deep);
    box-shadow: 0 0 0 2px rgba(7, 86, 103, 0.1);
  }

  .rating-score[aria-pressed="true"]::after {
    content: "Selected";
    display: block;
    margin-top: 5px;
    color: var(--ocean-deep);
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .rating-detail {
    margin-top: 11px;
    color: var(--ink-soft);
    font-size: 0.72rem;
  }

  .best-windows {
    display: grid;
    gap: 8px;
    margin-top: 12px;
  }

  .best-window {
    padding: 10px;
    border-left: 3px solid var(--ocean);
    border-radius: 0 8px 8px 0;
    background: var(--paper);
  }

  .best-window h5 {
    font-size: 0.74rem;
  }

  .best-window p {
    margin-top: 2px;
    color: var(--ink-soft);
    font-size: 0.66rem;
  }

  .best-window__range {
    color: var(--ink) !important;
    font-weight: 750;
  }

  .best-window__empty {
    color: var(--danger) !important;
  }

  .section-heading-row--compact h3 {
    font-size: 1.25rem;
  }

  .hour-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 17px -14px 0;
    padding: 3px 14px 13px;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }

  .hour-button {
    min-width: 104px;
    min-height: 108px;
    flex: 0 0 auto;
    padding: 10px;
    border-radius: 12px;
    scroll-snap-align: center;
    text-align: left;
  }

  .hour-button > span,
  .hour-button > strong,
  .hour-button > small {
    display: block;
  }

  .hour-button span {
    color: var(--ink-soft);
    font-size: 0.67rem;
    font-weight: 700;
  }

  .hour-button strong {
    margin: 5px 0 1px;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
  }

  .hour-button small {
    color: var(--ink-soft);
    font-size: 0.67rem;
  }

  .hour-button[aria-pressed="true"] {
    border-color: var(--ocean-deep);
    background: var(--ocean-deep);
    color: #fff;
    box-shadow: 0 7px 16px rgba(7, 86, 103, 0.18);
  }

  .hour-button[aria-pressed="true"] > span,
  .hour-button[aria-pressed="true"] > small {
    color: rgba(255, 255, 255, 0.72);
  }

  .rating-badge {
    display: inline-block;
    max-width: 100%;
    margin-top: 7px;
    padding: 3px 5px;
    border: 1px solid #9ccdc7;
    border-radius: 6px;
    background: var(--ocean-pale);
    color: var(--ocean-deep);
    font-size: 0.6rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: normal;
  }

  .rating-badge--stale {
    border-color: #e2c675;
    background: var(--warning-pale);
    color: var(--warning);
  }

  .rating-badge--unavailable {
    border-color: #edc6bd;
    background: var(--danger-pale);
    color: var(--danger);
  }

  .hour-button[aria-pressed="true"] .rating-badge {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  .table-wrap {
    overflow: auto;
    max-height: 580px;
    margin-top: 17px;
    border: 1px solid var(--line);
    border-radius: 13px;
    scrollbar-width: thin;
  }

  table {
    width: 100%;
    min-width: 1080px;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--paper);
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  th,
  td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  thead th {
    position: sticky;
    z-index: 2;
    top: 0;
    background: #e8f0ed;
    color: var(--ink-soft);
    font-size: 0.62rem;
    letter-spacing: 0.055em;
    text-transform: uppercase;
  }

  thead th:first-child {
    z-index: 3;
  }

  tbody tr:last-child td {
    border-bottom: 0;
  }

  tbody tr:hover td,
  tbody tr.is-selected td {
    background: #eef8f5;
  }

  tbody tr.is-selected td {
    box-shadow: inset 0 1px 0 #9ccdc7, inset 0 -1px 0 #9ccdc7;
  }

  th:first-child,
  td:first-child {
    position: sticky;
    z-index: 1;
    left: 0;
    background: var(--paper);
  }

  .table-time-button {
    min-width: 66px;
    padding: 5px 7px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ocean-deep);
    font-weight: 800;
    text-align: left;
    cursor: pointer;
  }

  .table-time-button:hover {
    background: var(--ocean-pale);
  }

  .method-section {
    display: grid;
    gap: 24px;
  }

  .method-copy p:not(.section-kicker) {
    max-width: 48rem;
    margin-top: 13px;
    color: var(--ink-soft);
    font-size: 0.88rem;
  }

  .rating-method {
    max-width: 48rem;
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f4f8f5;
  }

  .rating-method summary {
    color: var(--ocean-deep);
    font-size: 0.83rem;
    font-weight: 800;
    cursor: pointer;
  }

  .rating-method p {
    font-size: 0.76rem !important;
  }

  summary:focus-visible {
    outline: 3px solid var(--sun);
    outline-offset: 2px;
  }

  .source-list {
    display: grid;
    gap: 10px;
  }

  .source-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #f4f8f5;
  }

  .source-card__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .source-card h3 {
    font-size: 0.9rem;
  }

  .source-card p {
    margin-top: 6px;
    color: var(--ink-soft);
    font-size: 0.72rem;
  }

  .source-badge {
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--ocean-pale);
    color: var(--success);
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: capitalize;
  }

  .source-badge--warning {
    background: var(--warning-pale);
    color: var(--warning);
  }

  .source-badge--error {
    background: var(--danger-pale);
    color: var(--danger);
  }

  .site-footer {
    width: min(100% - 28px, var(--content-width));
    margin: 0 auto;
    padding: 24px 0 42px;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.75rem;
  }

  .site-footer p + p {
    margin-top: 5px;
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  @keyframes pulse {
    50% {
      opacity: 0.5;
      transform: scale(0.8);
    }
  }
}

@layer utilities {
  @media (max-width: 380px) {
    .rating-scores {
      grid-template-columns: 1fr;
    }
  }

  @media (min-width: 620px) {
    .header-inner {
      padding: 44px 0 48px;
    }

    .spot-section,
    .forecast-heading,
    .chart-section,
    .hourly-details > summary,
    .rating-section,
    .hour-section,
    .table-section,
    .method-section {
      padding-right: 28px;
      padding-left: 28px;
    }

    .spot-tabs {
      grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .spot-tab {
      text-align: center;
    }

    .forecast-grid {
      padding: 18px;
    }

    .now-card,
    .detail-card {
      padding: 24px;
    }

    .chart-section {
      padding-top: 24px;
      padding-bottom: 20px;
    }

    .hour-strip {
      margin-right: -28px;
      margin-left: -28px;
      padding-right: 28px;
      padding-left: 28px;
    }

    .method-section {
      grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.75fr);
    }
  }

  @media (min-width: 840px) {
    .header-inner {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 32px;
    }

    .header-actions {
      flex: 0 0 auto;
      margin-top: 0;
    }

    main {
      padding-top: 30px;
    }

    .forecast-grid {
      grid-template-columns: minmax(300px, 0.9fr) minmax(430px, 1.1fr);
    }

    .rating-layout {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .now-card {
      min-height: 100%;
    }

    .detail-stack {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-card {
      min-width: 0;
    }

    .metric-list {
      grid-template-columns: 1fr;
    }

    .metric-list > div:nth-child(even) {
      padding-left: 0;
      border-left: 0;
    }

    .day-tabs {
      padding-right: 28px;
      padding-left: 28px;
    }

    .day-tab {
      min-width: 0;
    }
  }

  @media (min-width: 1100px) {
    .forecast-grid {
      grid-template-columns: minmax(350px, 0.82fr) minmax(560px, 1.18fr);
      padding: 22px;
    }

    .wave-value {
      font-size: 6.4rem;
    }

    .metric-list {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-list > div:nth-child(even) {
      padding-left: 10px;
      border-left: 1px solid var(--line);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      scroll-behavior: auto !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
}
