/* Agadir Weather — one stylesheet, no framework. */

:root {
  --paper: #f3f6f5;
  --paper-2: #e5ecea;
  --ink: #10262e;
  --ink-2: #4a5f66;
  --line: #cad7d4;
  --sea: #145f69;
  --sea-deep: #0d3e46;
  --sun: #e9a93a;
  --earth: #6b4e35;
  --cold: #5e8fbf;
  --mild: #7fb7a4;
  --warm: #e5b54a;
  --hot: #dd7a3f;
  --rain: #4c8fbf;
  --focus: #145f69;
  --ic-sun: #e9a93a;
  --ic-cloud: #a9b7be;
  --ic-rain: #4c8fbf;
  --ic-moon: #c2c9dc;

  --sky-top: #2b6c9b;
  --sky-bot: #7db7d6;
  --sun-x: 0.62;
  --sun-y: 0.12;
  --glint: 0.4;

  --display: 'Bricolage Grotesque', 'Avenir Next Condensed', 'Arial Narrow', sans-serif;
  --text: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1180px;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0d1b20;
    --paper-2: #13282f;
    --ink: #e2ebe9;
    --ink-2: #9db0b4;
    --line: #23404a;
    --sea: #4fb3bf;
    --focus: #7fd0d8;
    --ic-cloud: #8a99a1;
    --ic-moon: #d5dbea;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #0d1b20;
  --paper-2: #13282f;
  --ink: #e2ebe9;
  --ink-2: #9db0b4;
  --line: #23404a;
  --sea: #4fb3bf;
  --focus: #7fd0d8;
  --ic-cloud: #8a99a1;
  --ic-moon: #d5dbea;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--sea); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.625rem, 2.6vw, 2.25rem); font-weight: 700; font-variation-settings: 'wdth' 90; }
h3 { font-size: 1.1875rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.ic { width: 1.25em; height: 1.25em; vertical-align: -0.25em; flex: none; }

.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; border-radius: 6px; }
.skip:focus { top: 8px; }

/* ---------- header ---------- */

.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top__in { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 24px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font: 400 1.25rem/1 var(--display); letter-spacing: -0.02em; }
.logo b { font-weight: 800; }
.logo__mark { width: 32px; height: 32px; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.9375rem; }
.nav a:hover { background: var(--paper-2); }
.nav a[aria-current='page'] { color: var(--sea); }
.tools { display: flex; gap: 6px; align-items: center; }
.tool, .langs summary {
  height: 40px; min-width: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px;
  background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 700 0.875rem/1 var(--text); cursor: pointer;
}
.tool:hover, .langs summary:hover { background: var(--paper-2); }
.langs { position: relative; }
.langs summary { list-style: none; }
.langs summary::-webkit-details-marker { display: none; }
.langs ul { position: absolute; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; min-width: 150px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgb(13 62 70 / 0.18); }
.langs a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.langs a:hover { background: var(--paper-2); }
.langs a[aria-current='true'] { font-weight: 700; color: var(--sea); }

@media (max-width: 860px) {
  .top__in { grid-template-columns: 1fr auto; padding-block: 8px 0; }
  .nav { grid-column: 1 / -1; order: 3; margin-inline: calc(var(--gutter) * -1); overflow-x: auto; scrollbar-width: none; }
  .nav ul { padding: 0 calc(var(--gutter) - 12px) 6px; }
  .nav a { white-space: nowrap; }
}
@media (max-width: 420px) {
  .top__in { gap: 8px 10px; }
  .logo { font-size: 1.0625rem; gap: 6px; min-width: 0; }
  .logo__mark { width: 26px; height: 26px; }
  .tools { gap: 4px; }
  .tool, .langs summary { height: 36px; min-width: 36px; padding: 0 7px; }
  .langs summary .ic { display: none; }
}
@media (max-width: 340px) {
  .top .logo__mark { display: none; }
}

/* ---------- the sky hero ---------- */
/* Centred composition: the sun travels a symmetric arc above the reading. */

.sky { color: #fff; position: relative; }
.sky__air {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bot));
  min-height: clamp(520px, 66vh, 640px);
  display: flex; align-items: flex-end;
  padding-block: 170px 40px;
  transition: background 0.8s ease;
}
/* Arc starts 30px below the header so its peak clears the 170px reserved above the title. */
.sky__arc { position: absolute; left: 4%; width: 92%; top: 30px; height: calc(100% - 30px); }
.sky__arc path { stroke: rgb(255 255 255 / 0.3); stroke-width: 1.5; stroke-dasharray: 2 9; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sky__body {
  position: absolute; width: 76px; height: 76px; border-radius: 50%;
  left: calc(4% + var(--sun-x) * 92% - 38px);
  top: calc(30px + var(--sun-y) * (100% - 30px) - 38px);
  background: radial-gradient(circle, #fff3c9 0 26%, #ffd77e 27% 34%, rgb(255 215 126 / 0.35) 36%, rgb(255 215 126 / 0) 70%);
}
.is-night .sky__body { background: radial-gradient(circle, #f1f3fb 0 22%, rgb(220 228 255 / 0.25) 25%, rgb(220 228 255 / 0) 64%); }
.is-hidden-sun .sky__body { opacity: 0.35; }

.sky__content { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.sky__title { font-size: clamp(1.5rem, 3vw, 2.125rem); font-weight: 700; font-variation-settings: 'wdth' 85; text-shadow: 0 1px 12px rgb(0 0 0 / 0.18); }
.sky__where { margin: 6px 0 0; font-size: 1.0625rem; max-width: 40ch; text-shadow: 0 1px 10px rgb(0 0 0 / 0.25); }
.sky__clock { display: block; opacity: 0.9; font-size: 0.9375rem; margin-top: 2px; }
.sky__now { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 18px; }
/* The degree sign hangs outside the number so the digits sit on the true centre. */
.sky__temp {
  position: relative; margin: 0;
  font-family: var(--display); font-weight: 600; font-variation-settings: 'wdth' 75, 'opsz' 96;
  font-size: clamp(7rem, 22vw, 12.5rem); line-height: 0.8; letter-spacing: -0.01em;
  text-shadow: 0 2px 30px rgb(0 0 0 / 0.16); font-variant-numeric: tabular-nums;
}
.sky__deg { position: absolute; left: 100%; top: 0; font-weight: 300; padding-left: 0.02em; }
.sky__cond { display: flex; flex-direction: column; align-items: center; }
.sky__desc { margin: 0 0 4px; font: 700 1.5rem/1.2 var(--display); text-shadow: 0 1px 10px rgb(0 0 0 / 0.25); }
.sky__hilo { margin: 0; display: flex; justify-content: center; gap: 16px; font-size: 1.125rem; text-shadow: 0 1px 10px rgb(0 0 0 / 0.3); }
.sky__hilo b { font-family: var(--display); }

.sky__ground { position: relative; border-top: 1px solid rgb(255 255 255 / 0.45); }
.sky--sea .sky__ground { background: linear-gradient(180deg, #145761, #0b343b 85%); }
.sky--land .sky__ground { background: linear-gradient(180deg, #6e523a, #47331f 85%); }
.sky--sea .sky__ground::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 9% 100% at calc(4% + var(--sun-x) * 92%) 0, rgb(255 226 160 / var(--glint)), transparent 75%);
}
/* Always 8 or 4 facts, so rows are always full: 2, 4 or 8 per row. */
.sky__facts {
  position: relative; margin-block: 0; padding-block: 22px 24px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px;
  text-align: center;
}
@media (min-width: 640px) { .sky__facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .sky__facts:has(> :nth-child(5)) { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.fact dt { font-size: 0.875rem; color: rgb(255 255 255 / 0.82); display: flex; gap: 6px; align-items: center; justify-content: center; white-space: nowrap; }
.fact dd { margin: 4px 0 0; font: 600 1.375rem/1.2 var(--display); font-variation-settings: 'wdth' 90; white-space: nowrap; }
.fact dd small { display: block; margin-top: 2px; font: 400 0.875rem/1.2 var(--text); color: rgb(255 255 255 / 0.85); }
.fact .ic { width: 1.1em; height: 1.1em; }
.dir { display: inline-block; width: 0.9em; height: 0.9em; vertical-align: -0.05em; margin-left: 4px; }
.sky__status:empty { display: none; }
.sky__status { position: absolute; left: 0; right: 0; top: 12px; margin: 0; font-size: 0.875rem; text-align: center; text-shadow: 0 1px 6px rgb(0 0 0 / 0.4); }

/* Below 1200px the screen is too narrow for the full arc to pass beside the text,
   so the sun travels a flatter arc in the band above the title instead. */
@media (max-width: 1199px) {
  .sky__arc { top: 24px; height: 110px; }
  .sky__body { width: 60px; height: 60px; left: calc(4% + var(--sun-x) * 92% - 30px); top: calc(24px + var(--sun-y) * 110px - 30px); }
}
@media (max-width: 600px) {
  .sky__air { min-height: 0; padding-block: 104px 28px; }
  /* On phones the arc runs in the band above the title, so the sun never covers text. */
  .sky__arc { top: 24px; height: 80px; }
  .sky__body { width: 56px; height: 56px; left: calc(4% + var(--sun-x) * 92% - 28px); top: calc(24px + var(--sun-y) * 80px - 28px); }
  .fact dt { white-space: normal; }
}

/* ---------- blocks ---------- */

main > .block, .block { padding-block: clamp(40px, 6vw, 72px) 0; }
.block > h2 { margin-bottom: 8px; }
.block > h2 + :not(.lead) { margin-top: 20px; }
.lead { font-size: 1.1875rem; color: var(--ink-2); max-width: 60ch; margin-bottom: 24px; }
.block__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.source { font-size: 0.875rem; color: var(--ink-2); margin-top: 12px; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 16px 0 0; margin: 0; font-size: 0.9375rem; color: var(--ink-2); }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--ink-2); }

/* hourly */
.hourly { overflow-x: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.h-grid { --cols: 24; --cw: 68px; width: calc(var(--cols) * var(--cw)); }
.h-row { display: grid; grid-template-columns: repeat(var(--cols), var(--cw)); text-align: center; }
.h-time { padding-top: 14px; font-weight: 700; font-size: 0.9375rem; }
.h-time small { display: block; font-weight: 400; color: var(--ink-2); font-size: 0.75rem; height: 1.2em; }
.h-time .now { color: var(--sea); font-size: 0.8125rem; display: block; overflow: hidden; text-overflow: ellipsis; padding-inline: 2px; }
.h-icon { padding: 6px 0 0; }
.h-icon .ic { width: 32px; height: 32px; }
.h-chart { position: relative; height: 84px; display: block; }
.h-chart svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.h-chart polyline { fill: none; stroke: var(--sun); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.h-chart .area { fill: var(--sun); opacity: 0.12; stroke: none; }
.h-temp { position: absolute; transform: translate(-50%, -100%); font: 700 1.0625rem/1 var(--display); padding-bottom: 8px; }
.h-rain, .h-wind { font-size: 0.8125rem; color: var(--ink-2); padding-bottom: 4px; }
.h-rain .ic { width: 0.9em; color: var(--rain); }
.h-rain.is-dry { opacity: 0.45; }
.h-wind { padding-bottom: 14px; }
.h-row > .is-day-start { border-left: 1px solid var(--line); }

/* details */
.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .details { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .details { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.details > div { padding: 16px 16px 18px 0; border-bottom: 1px solid var(--line); }
.details dt { color: var(--ink-2); font-size: 0.9375rem; display: flex; align-items: center; gap: 6px; }
.details dd { margin: 4px 0 0; font: 600 1.5rem/1.2 var(--display); font-variation-settings: 'wdth' 90; }
.details dd small { display: block; font: 400 0.9375rem/1.4 var(--text); color: var(--ink-2); }

/* daily */
.daily { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.daily > li {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: 7.5rem 2.25rem minmax(0, 1fr) 4rem 2.25rem minmax(90px, 14rem) 2.25rem 6.5rem;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.daily.has-sea > li { grid-template-columns: 7.5rem 2.25rem minmax(0, 1fr) 4rem 2.25rem minmax(90px, 12rem) 2.25rem 6.5rem 5.5rem; }
.daily > li.muted { display: block; }
.d-day b { display: block; font-family: var(--display); font-size: 1.0625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-day b::first-letter { text-transform: uppercase; }
.d-day small { color: var(--ink-2); }
.d-icon .ic { width: 34px; height: 34px; }
.d-desc { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-rain { color: var(--rain); font-size: 0.9375rem; white-space: nowrap; }
.d-rain.is-dry { color: var(--ink-2); opacity: 0.6; }
.d-lo { color: var(--ink-2); text-align: right; font-family: var(--display); font-size: 1.125rem; }
.d-hi { font-family: var(--display); font-weight: 700; font-size: 1.125rem; }
.d-bar { position: relative; height: 8px; border-radius: 4px; background: var(--paper-2); }
.d-bar i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.d-wind, .d-sea { font-size: 0.9375rem; color: var(--ink-2); }
.d-sea .ic { color: var(--sea); }
@media (max-width: 760px) {
  .daily > li, .daily.has-sea > li { grid-template-columns: 5.5rem 2rem 3.25rem 2rem minmax(28px, 1fr) 2rem; gap: 8px; }
  .d-desc, .d-wind, .d-sea { display: none; }
  .d-day b { font-size: 1rem; }
}

/* coast list: north at the top, south at the bottom */
.coast { list-style: none; margin: 0; padding: 0; position: relative; }
.coast::before { content: ''; position: absolute; left: 11px; top: 26px; bottom: 26px; width: 2px; background: repeating-linear-gradient(180deg, var(--sea) 0 6px, transparent 6px 11px); opacity: 0.55; }
.coast__item > a {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center;
  padding: 14px 12px 14px 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); border-radius: 0;
}
.coast__item > a::before { content: ''; width: 14px; height: 14px; margin-left: 5px; border-radius: 50%; border: 2px solid var(--earth); background: var(--paper); position: relative; }
.coast__item.is-coast > a::before { border-color: var(--sea); background: var(--sea); }
.coast__item > a:hover { background: var(--paper-2); }
.coast__item > a:hover .coast__name { color: var(--sea); }
.coast__text { display: grid; gap: 2px; }
.coast__name { font: 700 1.3125rem/1.2 var(--display); font-variation-settings: 'wdth' 88; }
.coast__kind { font-size: 0.9375rem; color: var(--ink-2); }
.coast__short { color: var(--ink-2); max-width: 56ch; }
.coast__live { display: grid; justify-items: end; gap: 2px; text-align: right; }
.coast__now { display: flex; align-items: center; gap: 6px; }
.coast__now .ic { width: 30px; height: 30px; }
.coast__temp { font: 700 1.625rem/1 var(--display); min-width: 2.2ch; }
.coast__sea { font-size: 0.875rem; color: var(--ink-2); white-space: nowrap; }
.coast--compact .coast__name { font-size: 1.125rem; }
@media (max-width: 899px) {
  .coast:not(.coast--compact) .coast__text { display: contents; }
  .coast:not(.coast--compact) .coast__name { grid-column: 2; grid-row: 1; }
  .coast:not(.coast--compact) .coast__kind { grid-column: 2; grid-row: 2; }
  .coast:not(.coast--compact) .coast__live { grid-column: 3; grid-row: 1 / span 2; }
  .coast:not(.coast--compact) .coast__short { grid-column: 2 / -1; grid-row: 3; margin-top: 4px; }
  .coast:not(.coast--compact) .coast__item > a::before { grid-row: 1 / span 3; }
}
@media (min-width: 900px) {
  .coast:not(.coast--compact) .coast__item > a { grid-template-columns: 24px 16rem minmax(0, 1fr) auto; }
  .coast:not(.coast--compact) .coast__text { display: contents; }
  .coast:not(.coast--compact) .coast__name { grid-column: 2; grid-row: 1; }
  .coast:not(.coast--compact) .coast__kind { grid-column: 2; grid-row: 2; }
  .coast:not(.coast--compact) .coast__short { grid-column: 3; grid-row: 1 / span 2; }
  .coast:not(.coast--compact) .coast__live { grid-column: 4; grid-row: 1 / span 2; }
  .coast:not(.coast--compact) .coast__item > a::before { grid-row: 1 / span 2; }
}

/* climate chart */
.clim { margin: 0; }
.clim__scroll { overflow-x: auto; padding-bottom: 4px; }
.clim__inner { position: relative; min-width: 620px; }
.clim__cols { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); }
.clim__col a { display: grid; text-decoration: none; color: var(--ink); border-radius: 12px; padding: 0 0 8px; }
.clim__col a:hover, .clim__col.is-current a { background: var(--paper-2); }
.clim__col.is-now .clim__name::after { content: ''; display: block; width: 6px; height: 6px; margin: 4px auto 0; border-radius: 50%; background: var(--sun); }
.clim__plot { position: relative; height: 220px; margin-top: 30px; margin-bottom: 26px; display: block; }
.clim__bar {
  position: absolute; left: 50%; width: 18px; transform: translateX(-50%); border-radius: 9px;
  bottom: calc(var(--lo) * 1%); height: calc((var(--hi) - var(--lo)) * 1%);
  background: linear-gradient(0deg, var(--cold), var(--warm) 70%, var(--hot));
}
.clim__hi, .clim__lo { position: absolute; left: 50%; transform: translateX(-50%); font: 700 0.9375rem/1 var(--display); white-space: nowrap; }
.clim__hi { bottom: calc(100% + 6px); }
.clim__lo { top: calc(100% + 6px); color: var(--ink-2); font-weight: 600; }
.clim__sea { position: absolute; left: 50%; bottom: calc(var(--sea) * 1%); width: 12px; height: 12px; transform: translate(-50%, 50%); border-radius: 50%; background: var(--sea); box-shadow: 0 0 0 3px var(--paper); z-index: 1; }
.clim__line { position: absolute; left: 0; right: 0; top: 30px; width: 100%; height: 220px; pointer-events: none; z-index: 1; overflow: visible; }
.clim__line polyline { fill: none; stroke: var(--sea); stroke-width: 2; stroke-dasharray: 1 5; stroke-linecap: round; }
.clim__rain { position: relative; height: 40px; display: flex; align-items: flex-end; justify-content: center; }
.clim__rain::before { content: ''; width: 18px; height: calc(var(--r) * 1%); background: var(--rain); opacity: 0.55; border-radius: 3px 3px 0 0; }
.clim__rain span { position: absolute; bottom: 2px; font-size: 0.75rem; color: var(--ink-2); }
.clim__name { text-align: center; font-weight: 700; padding-top: 6px; border-top: 1px solid var(--line); }
.clim__key { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 0.875rem; color: var(--ink-2); margin-top: 12px; }
.k { display: inline-block; vertical-align: middle; margin-right: 6px; }
.k--bar { width: 8px; height: 16px; border-radius: 4px; background: linear-gradient(0deg, var(--cold), var(--hot)); }
.k--sea { width: 10px; height: 10px; border-radius: 50%; background: var(--sea); }
.k--rain { width: 10px; height: 12px; background: var(--rain); opacity: 0.5; border-radius: 2px; }

/* map */
.map { position: relative; aspect-ratio: 2 / 1; border-radius: 16px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(180deg, #2b6c9b, #7db7d6 58%, #145761 58%, #0b343b); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 600px) { .map { aspect-ratio: 4 / 5; } }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 20px; background: var(--sea-deep); color: #fff; font: 700 1rem/1 var(--text); cursor: pointer; text-decoration: none; }
.btn:hover { background: #0a2f35; }
:root[data-theme='dark'] .btn { background: var(--sea); color: #06272c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .btn { background: var(--sea); color: #06272c; } }
.map .btn { background: rgb(255 255 255 / 0.95); color: var(--sea-deep); box-shadow: 0 8px 24px rgb(0 0 0 / 0.2); }

/* faq */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font: 700 1.1875rem/1.3 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform 0.2s; color: var(--ink-2); margin-top: 2px; }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq details p { margin: 0 0 20px; max-width: 68ch; color: var(--ink-2); }

/* newsletter + forms */
.nl { display: grid; grid-template-columns: 1fr; gap: 16px 40px; padding: 32px; border-radius: 20px; background: var(--sea-deep); color: #fff; }
.nl h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 8px; }
.nl p { margin: 0; color: rgb(255 255 255 / 0.85); }
.nl__row { display: flex; gap: 10px; flex-wrap: wrap; align-self: center; }
.nl input { flex: 1 1 220px; height: 48px; border-radius: 999px; border: 0; padding: 0 18px; font: inherit; }
.nl .btn { background: var(--sun); color: #2a1b00; height: 48px; }
.nl__msg:empty { display: none; }
@media (min-width: 860px) { .nl { grid-template-columns: 1.2fr 1fr; } }

/* guides */
.pagehead { padding-block: 8px 0; }
.pagehead h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 700; font-variation-settings: 'wdth' 85; margin: 24px 0 16px; max-width: 20ch; letter-spacing: -0.02em; }
.pagehead .crumbs ol { padding-top: 24px; }
.nf { padding-block: 80px; }
.guide { display: grid; gap: 40px; }
@media (min-width: 960px) { .guide { grid-template-columns: minmax(0, 1fr) 20rem; gap: 64px; } }
.prose { max-width: 68ch; }
.prose > .lead { font-size: 1.25rem; color: var(--ink); }
.prose h2 { font-size: clamp(1.375rem, 2vw, 1.75rem); margin: 2em 0 0.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.guide__side { display: grid; gap: 28px; align-content: start; }
.guide__side section { border-left: 3px solid var(--sun); padding-left: 18px; }
.guide__side h3 { margin-bottom: 8px; }
.guide__side p, .guide__side ul { margin: 0; color: var(--ink-2); }
.guide__side ul { padding-left: 1.1em; }
.guide__side li + li { margin-top: 6px; }
.monthlinks { list-style: none; padding: 0 !important; columns: 2; }
.rates { margin: 16px 0 0; display: grid; gap: 10px; }
.rate { display: grid; grid-template-columns: 7rem 1fr; align-items: center; }
.rate dt { font-weight: 700; color: var(--ink); }
.rate dd { margin: 0; display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.rate__dots { display: inline-flex; gap: 3px; }
.rate__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.rate__dots i.on { background: var(--sun); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; }
.pager a { display: grid; font: 700 1.25rem/1.2 var(--display); text-decoration: none; }
.pager a[rel='next'] { text-align: right; }
.pager small { font: 400 0.875rem/1.4 var(--text); color: var(--ink-2); }


/* ---------- page skies (blog, contact, info pages) ---------- */

.sky--dawn { --sky-top: #34416e; --sky-bot: #d39a7c; --glint: 0.55; }
.sky--dusk { --sky-top: #232f58; --sky-bot: #c47e5e; --glint: 0.5; }
.sky--page .sky__air { min-height: 0; padding-block: 150px 44px; }
.sky--page .sky__arc { top: 24px; height: 110px; }
.sky--page .sky__body { width: 60px; height: 60px; left: calc(4% + var(--sun-x) * 92% - 30px); top: calc(24px + var(--sun-y) * 110px - 30px); }
.sky--dawn .sky__body, .sky--dusk .sky__body { background: radial-gradient(circle, #ffe2b0 0 26%, #ffb877 27% 34%, rgb(255 184 119 / 0.35) 36%, rgb(255 184 119 / 0) 70%); }
.sky__title--page { font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.05; max-width: 22ch; letter-spacing: -0.015em; text-wrap: balance; }
.sky__lead { margin: 14px 0 0; max-width: 54ch; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.5; text-shadow: 0 1px 10px rgb(0 0 0 / 0.25); text-wrap: pretty; }
.sky__meta { margin: 14px 0 0; font-size: 0.9375rem; opacity: 0.9; }
.sky__cta { margin: 24px 0 0; }
.sky .crumbs ol { justify-content: center; padding: 0 0 18px; color: rgb(255 255 255 / 0.8); }
.sky .crumbs a { color: #fff; }
.sky .crumbs li + li::before { color: rgb(255 255 255 / 0.5); }
.sky .crumbs li[aria-current] { max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sky__shore { height: 40px; }
@media (min-width: 640px) { .sky__facts--fixed { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); } }
.btn--light { background: #fff; color: var(--sea-deep); }
.btn--light:hover { background: #eaf3f2; }
@media (max-width: 600px) {
  .sky--page .sky__air { padding-block: 128px 32px; }
  .sky .crumbs li:nth-child(3)[aria-current] { display: none; }
  .sky--page .sky__arc { height: 84px; }
  .sky--page .sky__body { width: 48px; height: 48px; left: calc(4% + var(--sun-x) * 92% - 24px); top: calc(24px + var(--sun-y) * 84px - 24px); }
}

/* ---------- article cards ---------- */

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px 32px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card a { display: grid; gap: 18px; align-content: start; color: var(--ink); text-decoration: none; }
.card__body { display: grid; gap: 8px; }
.card__title { font-size: 1.375rem; line-height: 1.2; font-variation-settings: 'wdth' 90; text-wrap: balance; }
.card a:hover .card__title { color: var(--sea); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.card__text { color: var(--ink-2); }
.card__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.9375rem; color: var(--ink-2); }
.thumb {
  position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bot));
  --ic-cloud: #eef3f4; --ic-sun: #ffd77e;
}
.thumb::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 32%; background: linear-gradient(180deg, #145761, #0b343b); border-top: 1px solid rgb(255 255 255 / 0.45); }
.thumb__icon { position: absolute; left: 50%; top: 36%; width: 30%; height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); }
.thumb__icon--sea { top: 84%; width: 30%; color: rgb(255 255 255 / 0.55); z-index: 1; }
.thumb__sun { position: absolute; left: 50%; top: 68%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #ffe2b0 0 45%, rgb(255 184 119 / 0.5) 47%, rgb(255 184 119 / 0) 70%); }
@media (min-width: 760px) {
  .cards--index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--feature { grid-column: 1 / -1; }
  .card--feature a { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: center; }
  .card--feature .card__title { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; }
  .card--feature .card__text { font-size: 1.1875rem; }
}

/* ---------- article page ---------- */

.article { display: grid; gap: 32px; padding-top: 48px; }
.article__aside { display: grid; gap: 28px; align-content: start; }
.article__aside h2 { font-size: 1rem; margin-bottom: 10px; font-variation-settings: 'wdth' 100; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; line-height: 1.35; }
.toc a:hover { color: var(--sea); border-left-color: var(--sea); }
.toc a.is-active { color: var(--ink); font-weight: 700; border-left-color: var(--sun); }
.article__months ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.article__months a { display: block; padding: 6px 0; text-align: center; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 0.875rem; font-weight: 700; }
.article__months a:hover { border-color: var(--sea); color: var(--sea); }
.article__body { font-size: 1.125rem; line-height: 1.7; }
.prose h2 { scroll-margin-top: 90px; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 1.4em; }
.prose ul > li::before { content: ''; position: absolute; left: 0.2em; top: 0.68em; width: 0.45em; height: 0.45em; border-radius: 50%; background: var(--sun); }
.prose--center { margin-inline: auto; }
@media (max-width: 999px) { .article__months { display: none; } .toc { padding: 16px 18px; border-radius: 14px; background: var(--paper-2); } .toc ol { border: 0; } .toc a { padding-left: 0; border: 0; margin: 0; } }
@media (min-width: 1000px) {
  .article { grid-template-columns: minmax(0, 44rem) 16rem; justify-content: center; gap: 80px; padding-top: 64px; }
  .article__body { grid-column: 1; grid-row: 1; }
  .article__aside { grid-column: 2; grid-row: 1; position: sticky; top: 96px; align-self: start; }
}

/* ---------- contact ---------- */

.contact-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 72px; align-items: start; } }
.contact { display: grid; gap: 18px; padding: clamp(20px, 4vw, 36px); border-radius: 20px; background: var(--paper-2); }
.contact__row { display: grid; gap: 18px; }
@media (min-width: 600px) { .contact__row { grid-template-columns: 1fr 1fr; } }
.contact label { display: grid; gap: 8px; font-weight: 700; font-size: 0.9375rem; }
.contact input, .contact textarea {
  font: inherit; font-weight: 400; width: 100%; padding: 12px 14px; min-height: 50px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink);
}
.contact textarea { resize: vertical; min-height: 170px; }
.contact input:focus, .contact textarea:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px rgb(20 95 105 / 0.22); }
.contact .btn { width: 100%; justify-content: center; height: 52px; font-size: 1.0625rem; }
.contact__note { margin: 0; font-size: 0.9375rem; color: var(--ink-2); text-align: center; }
.contact__aside { display: grid; gap: 28px; }
.contact__aside h2 { font-size: 1.5rem; }
.contact__facts { margin: 0; display: grid; border-top: 1px solid var(--line); }
.contact__facts > div { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.contact__facts dt { font-size: 0.875rem; color: var(--ink-2); }
.contact__facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.contact__aside section { border-left: 3px solid var(--sun); padding-left: 18px; }
.contact__aside section h3 { margin-bottom: 6px; }
.contact__aside section p { margin: 0; color: var(--ink-2); }

/* footer */
.foot { margin-top: clamp(56px, 8vw, 96px); background: var(--sea-deep); color: #d9e7e6; padding-block: 48px 24px; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot .logo { color: #fff; }
.foot .logo__mark path:last-child { stroke: #7fd0d8; }
.foot__grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.foot h2 { font-size: 1rem; margin-bottom: 12px; color: #fff; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.9375rem; }
.foot .cols2 { grid-template-columns: 1fr 1fr; column-gap: 12px; }
.foot__brand p { margin-top: 12px; max-width: 36ch; }
.foot__base { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 0.16); font-size: 0.875rem; color: #a9c3c2; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot__base p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
