/* Mom's DIY Guide: Caribbean editorial. */

:root {
  --font-head: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --font-body: 'Figtree', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius: 1.1rem;
  --radius-pill: 999px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --page: #f3fbfb;
  --section: #ffffff;
  --text: #0b2a4a;
  --muted: #3c5a75;
  --line: rgb(11 42 74 / 0.12);
  --turquoise: #0f766e;
  --ocean: #0b5c86;
  --seafoam: #d8f3ee;
  --aqua-soft: #e3f6fb;
  --link: #0b5c86;
  --chip: #e3f6f4;
  --chip-text: #0b4f4a;
  --coral: #b4302f;
  --coral-bg: #fff1ee;
  --note-bg: #ebf7fb;
  --step-num: #0f766e;
  --nav-glass: rgb(255 255 255 / 0.82);
  --nav-solid: #ffffff;
  --hero-a: #dff6f3;
  --hero-b: #e6f3fb;
  --hero-c: #ffffff;
  --shadow: 0 0.75rem 2rem rgb(11 42 74 / 0.08);
  --btn-bg: #0b5c86;
  --btn-text: #ffffff;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #061a2b;
  --section: #0a2338;
  --text: #e7f5f7;
  --muted: #a9c6d3;
  --line: rgb(231 245 247 / 0.14);
  --turquoise: #5eead4;
  --ocean: #7dd3fc;
  --seafoam: #0e3a45;
  --aqua-soft: #0c2e42;
  --link: #7dd3fc;
  --chip: #0f3a44;
  --chip-text: #a7f3e6;
  --coral: #ffa196;
  --coral-bg: #3a1a1f;
  --note-bg: #0c2e42;
  --step-num: #5eead4;
  --nav-glass: rgb(6 26 43 / 0.82);
  --nav-solid: #061a2b;
  --hero-a: #0a3340;
  --hero-b: #0b2a44;
  --hero-c: #061a2b;
  --shadow: 0 0.75rem 2rem rgb(0 0 0 / 0.35);
  --btn-bg: #7dd3fc;
  --btn-text: #062033;
}

html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 6rem; }
html[data-font-size="md"] { font-size: 112.5%; }
html[data-font-size="lg"] { font-size: 125%; }
html[data-font-size="xl"] { font-size: 137.5%; }
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0; background: var(--page); color: var(--text);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.6;
}
a { color: var(--link); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible { outline: 0.1875rem solid var(--turquoise); outline-offset: 0.15rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--section); color: var(--text); padding: 0.5rem 1rem; border-radius: 0.5rem;
}
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 0.5rem); }

.wrap { width: calc(100% - 2.5rem); margin: 0 auto; }
@media (min-width: 64rem) { .wrap { width: calc(100% - 5rem); } }

/* ---------- Nav ---------- */
.nav {
  position: relative; z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  background: var(--nav-solid);
  border-bottom: 1px solid var(--line);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav { background: var(--nav-glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
}
.nav-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.5rem 1.25rem; padding: 0.6rem 0;
}
@media (min-width: 48rem) {
  .nav { position: sticky; top: 0; }
  .nav-row { justify-content: space-between; }
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; }
.brand-mark {
  width: 2.25rem; height: 2.25rem; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: #0f766e; background: linear-gradient(135deg, #0f766e, #0b5c86); color: #ffffff;
  font-family: var(--font-head); font-weight: 600; font-size: 1.15rem;
}
.brand-name { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; line-height: 1.1; }
.nav-links { display: flex; flex-wrap: wrap; gap: 0.25rem; justify-content: center; }
.nav-links a {
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.92rem;
  padding: 0.4rem 0.8rem; border-radius: var(--radius-pill);
}
.nav-links a:hover { background: var(--chip); }
.nav-links a[aria-current="page"] { background: var(--chip); color: var(--chip-text); }
.nav-right { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 1rem; }
.prefs { display: flex; align-items: center; gap: 0.5rem; }
.size-group {
  display: inline-flex; align-items: flex-end; gap: 0.125rem; padding: 0.2rem;
  border-radius: var(--radius-pill); background: var(--chip); border: 1px solid var(--line);
}
.size-group button, .theme-btn {
  font-family: var(--font-body); color: var(--text); background: transparent; border: 0; cursor: pointer;
  border-radius: var(--radius-pill); min-width: 2rem; min-height: 2rem; padding: 0.25rem 0.4rem; font-weight: 700; line-height: 1;
}
.size-group button[data-set-size="sm"] { font-size: 0.8rem; }
.size-group button[data-set-size="md"] { font-size: 0.95rem; }
.size-group button[data-set-size="lg"] { font-size: 1.1rem; }
.size-group button[data-set-size="xl"] { font-size: 1.25rem; }
.size-group button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-text); }
.theme-btn { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; background: var(--chip); border: 1px solid var(--line); }
.theme-btn svg { width: 1.15rem; height: 1.15rem; }
.theme-btn .icon-sun { display: none; }
:root[data-theme="dark"] .theme-btn .icon-sun { display: block; }
:root[data-theme="dark"] .theme-btn .icon-moon { display: none; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(60rem 26rem at 10% 0%, var(--hero-a), transparent 70%),
    radial-gradient(50rem 24rem at 95% 20%, var(--hero-b), transparent 70%),
    var(--hero-c);
  border-bottom: 1px solid var(--line);
  padding: 2.5rem 0 2.25rem;
  text-align: center;
}
.kicker { margin: 0 0 0.5rem; color: var(--turquoise); font-weight: 700; font-size: 0.9rem; }
.hero h1 {
  margin: 0; font-family: var(--font-head); font-weight: 600; letter-spacing: -0.015em;
  font-size: clamp(2.25rem, 1.6rem + 3vw, 4rem); line-height: 1.04; overflow-wrap: anywhere;
}
.hero-lede { margin: 0.9rem auto 0; color: var(--muted); font-size: 1.1rem; max-width: 46rem; }
.hero-actions { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 2.75rem; padding: 0.55rem 1.15rem; border-radius: var(--radius-pill);
  font-weight: 700; text-decoration: none; font-size: 0.95rem; border: 2px solid transparent;
}
.btn.solid { background: var(--btn-bg); color: var(--btn-text); }
.btn.quiet { background: transparent; color: var(--text); border-color: var(--turquoise); }
.btn.quiet:hover { background: var(--chip); }
@media (min-width: 64rem) {
  .hero { text-align: left; padding: 3.25rem 0 2.75rem; }
  .hero-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3rem; align-items: end; }
  .hero-lede { margin-left: 0; }
  .hero-actions { justify-content: flex-start; }
}

/* Featured callout in the hero */
.feature {
  margin-top: 1.75rem; background: var(--section); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem; text-align: center; min-width: 0;
}
.feature .label { margin: 0; color: var(--turquoise); font-weight: 700; font-size: 0.85rem; }
.feature h2 { margin: 0.25rem 0 0.4rem; font-family: var(--font-head); font-weight: 600; font-size: 1.5rem; line-height: 1.15; }
.feature p { margin: 0; color: var(--muted); }
.feature a { display: inline-block; margin-top: 0.75rem; font-weight: 700; }
@media (min-width: 64rem) { .feature { margin-top: 0; text-align: left; } }

/* ---------- Sections ---------- */
.band { padding: 2.5rem 0; }
.band.white { background: var(--section); border-bottom: 1px solid var(--line); }
.band-head { text-align: center; margin-bottom: 1.4rem; }
.band-head h2 { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.3rem); line-height: 1.12; }
.band-head p { margin: 0.4rem auto 0; color: var(--muted); max-width: 44rem; }
@media (min-width: 64rem) { .band-head { text-align: left; } .band-head p { margin-left: 0; } }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.tile {
  display: flex; flex-direction: column; gap: 0.35rem; min-width: 0;
  padding: 1.15rem 1.15rem 1.25rem; border-radius: var(--radius);
  background: var(--section); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none; text-align: center;
  border-top: 0.25rem solid var(--turquoise);
}
.band.white .tile { background: var(--page); }
.tile:hover { border-color: var(--turquoise); }
.tile .kind { color: var(--turquoise); font-weight: 700; font-size: 0.82rem; }
.tile h3 { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; line-height: 1.2; overflow-wrap: anywhere; }
.tile p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tile .meta { margin-top: auto; padding-top: 0.5rem; color: var(--ocean); font-weight: 700; font-size: 0.85rem; }
@media (min-width: 48rem) { .tile { text-align: left; } }

/* ---------- Entries ---------- */
.entry { padding: 2.75rem 0; border-bottom: 1px solid var(--line); background: var(--section); }
.entry:nth-of-type(even) { background: var(--page); }
.entry-grid { display: grid; gap: 1.75rem; }
@media (min-width: 64rem) {
  .entry-grid { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 3rem; align-items: start; }
  .entry-meta { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 5.5rem); }
}
@media (min-width: 90rem) { .entry-grid { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); } }
.entry-meta { text-align: center; min-width: 0; }
@media (min-width: 64rem) { .entry-meta { text-align: left; } }
.entry-meta .kind {
  display: inline-block; padding: 0.2rem 0.7rem; border-radius: var(--radius-pill);
  background: var(--chip); color: var(--chip-text); font-weight: 700; font-size: 0.8rem;
}
.entry-meta h2 { margin: 0.6rem 0 0.5rem; font-family: var(--font-head); font-weight: 600; font-size: clamp(1.7rem, 1.4rem + 1.2vw, 2.4rem); line-height: 1.1; overflow-wrap: anywhere; }
.entry-meta .summary { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* Details: label/value cards on phones, rows from tablet up */
.facts { margin: 1.25rem 0 0; display: grid; gap: 0.5rem; text-align: left; }
.facts div {
  min-width: 0; padding: 0.6rem 0.8rem; border-radius: 0.8rem;
  background: var(--aqua-soft); border: 1px solid var(--line);
}
.facts dt { font-weight: 700; font-size: 0.78rem; color: var(--ocean); }
.facts dd { margin: 0.1rem 0 0; font-size: 0.95rem; overflow-wrap: anywhere; }
@media (min-width: 40rem) and (max-width: 63.99rem) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ask { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
@media (min-width: 64rem) { .ask { justify-content: flex-start; } }

.entry-body { min-width: 0; text-align: center; }
@media (min-width: 64rem) { .entry-body { text-align: left; } }
.entry-body h3 { margin: 1.75rem 0 0.5rem; font-family: var(--font-head); font-weight: 600; font-size: 1.45rem; line-height: 1.2; }
.entry-body h3:first-child { margin-top: 0; }
.entry-body p { margin: 0 auto 0.9rem; max-width: 72ch; }
@media (min-width: 64rem) { .entry-body p { margin-left: 0; } }

.steps {
  list-style: none; counter-reset: step; margin: 0.5rem 0 1.25rem; padding: 0;
  display: grid; gap: 0.6rem; text-align: left;
}
@media (min-width: 80rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.steps li {
  counter-increment: step; position: relative; min-width: 0;
  padding: 0.85rem 1rem 0.85rem 3.25rem; border-radius: 0.9rem;
  background: var(--section); border: 1px solid var(--line);
}
.entry:nth-of-type(odd) .steps li { background: var(--page); }
.steps li::before {
  content: counter(step); position: absolute; left: 0.9rem; top: 0.8rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--step-num); color: var(--section); font-weight: 700; font-size: 0.85rem;
}
.bullets { margin: 0.5rem 0 1.25rem; padding-left: 1.25rem; text-align: left; }
.callout {
  margin: 0.75rem auto 1.25rem; padding: 0.85rem 1rem; border-radius: 0.9rem; text-align: left;
  max-width: 72ch; border-left: 0.3rem solid var(--ocean); background: var(--note-bg);
}
.callout.warn { border-left-color: var(--coral); background: var(--coral-bg); }
.callout strong { display: block; font-size: 0.85rem; color: var(--ocean); }
.callout.warn strong { color: var(--coral); }
.callout span { display: block; }
@media (min-width: 64rem) { .callout { margin-left: 0; } }
.tags { margin: 1rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center; }
@media (min-width: 64rem) { .tags { justify-content: flex-start; } }
.tags li { padding: 0.1rem 0.6rem; border-radius: var(--radius-pill); border: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; }

.link-block { margin: 0.25rem 0 1.25rem; }

.load-error { text-align: center; color: var(--coral); font-weight: 600; padding: 2rem 0; }

.foot {
  padding: 2rem 0 calc(env(safe-area-inset-bottom, 0px) + 2rem); text-align: center; color: var(--muted); font-size: 0.88rem;
}
.foot p { margin: 0.25rem 0; }
