/* ==========================================================================
   Air Fryer Calculator — design system
   Palette: Forest Green #263B32, Warm Cream #F7F5EF, Amber #E9A94C,
            Soft Blue Gray #E8EDF1, Warm White #FFFFFF
   ========================================================================== */

:root {
  /* Brand palette. The deep green is the anchor colour; the warm food tones
     carry the kitchen feeling, so they are used for surfaces, accents and
     photography treatments rather than being overwhelmed by the green. */
  --forest: #2f4238;
  --forest-600: #24352c;
  --forest-700: #1b2a23;
  --cream: #faf6ee;
  --cream-deep: #f2ece0;
  --amber: #e9a94c;
  --amber-deep: #c9862c;
  --amber-soft: #f6e4c8;
  --terracotta: #b4643c;
  --pepper: #7d4a35;
  --blue-gray: #eaeef0;
  --white: #ffffff;
  --ink: #241f1a;
  --ink-soft: #574f46;
  --ink-faint: #7c7268;
  --line: #e6ded0;
  --line-strong: #d5c9b5;
  --danger: #a8412f;
  --ok: #3f6b4a;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --shell: 1180px;
  --measure: 68ch;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(31, 38, 34, 0.06);
  --shadow-md: 0 6px 18px -8px rgba(31, 38, 34, 0.22), 0 2px 5px -2px rgba(31, 38, 34, 0.12);
  --shadow-lg: 0 18px 44px -22px rgba(31, 38, 34, 0.4);

  --step: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  --lead: 1.68;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step);
  line-height: var(--lead);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--forest); text-decoration-color: rgba(38, 59, 50, 0.32); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

h1, h2, h3, h4 { color: var(--forest); line-height: 1.18; margin: 0 0 0.5em; text-wrap: balance; letter-spacing: -0.015em; }
h1 { font-family: var(--serif); font-size: clamp(1.95rem, 1.5rem + 2.1vw, 3rem); font-weight: 600; }
h2 { font-family: var(--serif); font-size: clamp(1.4rem, 1.16rem + 1.05vw, 1.95rem); font-weight: 600; }
/* One section title carries more weight than its neighbours: the problems
   block is the page's main entry point, so it gets a larger measure. */
.section-head h2.section-title-lg { font-size: clamp(1.55rem, 1.22rem + 1.5vw, 2.35rem); }
h3 { font-size: 1.16rem; font-weight: 650; }
h4 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 1.05em; }

:focus-visible {
  outline: 2.5px solid var(--amber-deep);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection { background: rgba(233, 169, 76, 0.32); }

.wrap { width: min(100% - 2.4rem, var(--shell)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.4rem, 860px); margin-inline: auto; }

.skip-link {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -140%);
  background: var(--forest); color: #fff; padding: 0.65rem 1.1rem;
  border-radius: 0 0 var(--r-md) var(--r-md); z-index: 200; text-decoration: none;
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 245, 239, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem; min-height: 66px;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--serif); font-size: 1.12rem; font-weight: 600;
  color: var(--forest); text-decoration: none; letter-spacing: -0.01em; flex: none;
}
.brand:hover { color: var(--forest-600); }
.brand-mark { width: 30px; height: 30px; flex: none; }

.nav-desktop { display: flex; align-items: center; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.nav-desktop > li { position: relative; }
.nav-desktop a, .nav-desktop button.nav-trigger {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.5rem 0.62rem; border: 0; background: none; cursor: pointer;
  color: var(--ink); text-decoration: none; font-size: 0.9rem; font-weight: 500;
  border-radius: var(--r-sm); white-space: nowrap;
}
.nav-desktop a:hover, .nav-desktop button.nav-trigger:hover { background: rgba(38, 59, 50, 0.07); color: var(--forest); }
.nav-trigger .caret, .nav-desktop .caret, .mobile-nav .caret {
  width: 10px; height: 7px; flex: none; transition: transform 0.16s ease; opacity: 0.6;
}
li.has-menu > a[aria-expanded="true"] .caret,
li.has-menu > button[aria-expanded="true"] .caret { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  transform: translateY(-4px);
  width: min(340px, calc(100vw - 2rem));
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 0.5rem;
  opacity: 0; visibility: hidden; transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 110;
}
li.has-menu:hover > .dropdown,
li.has-menu:focus-within > .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block; padding: 0.5rem 0.7rem; border-radius: var(--r-sm);
  font-weight: 600; font-size: 0.93rem; color: var(--forest);
  white-space: normal;
}
.dropdown a small { display: block; font-weight: 400; color: var(--ink-faint); font-size: 0.82rem; line-height: 1.45; margin-top: 0.1rem; overflow-wrap: break-word; }
.dropdown a:hover { background: var(--cream); }
.dropdown a::after { content: none; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 1px solid var(--line-strong);
  background: var(--white); border-radius: var(--r-md); cursor: pointer; color: var(--forest);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 17px; height: 2px; background: currentColor; border-radius: 2px; transition: 0.18s ease;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--cream); }
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0.6rem 0 1rem; }
.mobile-nav a {
  display: block; padding: 0.72rem 0.2rem; border-bottom: 1px solid var(--line);
  color: var(--forest); text-decoration: none; font-weight: 600;
}
.mobile-nav a small { display: block; font-weight: 400; color: var(--ink-faint); font-size: 0.84rem; margin-top: 0.15rem; }
.mobile-nav .sub { padding-left: 0.9rem; border-left: 2px solid var(--blue-gray); margin: 0.35rem 0 0.35rem 0.2rem; }
.mobile-nav .sub a { font-weight: 500; font-size: 0.93rem; color: var(--ink-soft); border-bottom-color: transparent; padding-block: 0.45rem; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.72rem 1.35rem; border-radius: var(--r-md);
  font-weight: 600; font-size: 0.96rem; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; transition: 0.15s ease;
}
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest-600); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-secondary:hover { background: var(--forest); color: #fff; }
.btn-ghost { background: var(--white); color: var(--forest); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--forest); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.875rem; border-radius: var(--r-sm); }

/* ==========================================================================
   Hero — full-bleed photograph sitting under the text, with the image
   softened so the words stay readable on top of it.
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--forest-700);
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  /* Soften the photograph so the overlaid text stays legible without
     losing the warmth of the kitchen scene. */
  filter: saturate(1.02) brightness(0.86) contrast(1.02);
  transform: scale(1.02);
}
/* Warm wash from the bottom so the photo still reads as a kitchen scene. */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(28, 40, 33, 0.05) 0%, rgba(28, 40, 33, 0.32) 48%, rgba(28, 40, 33, 0.72) 100%),
    linear-gradient(100deg, rgba(28, 40, 33, 0.78) 0%, rgba(28, 40, 33, 0.36) 52%, rgba(28, 40, 33, 0.02) 84%);
}
.hero .inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  min-height: min(660px, 78vh);
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
  padding-top: clamp(4.5rem, 10vw, 7.5rem);
}
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 42rem;
  color: #fff;
}
.hero-copy .eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.76rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--amber); font-weight: 700; margin-bottom: 1.1rem;
}
.hero-copy .eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--amber); }
.hero-copy h1 {
  color: #fff; font-size: clamp(2.2rem, 1.5rem + 3.2vw, 3.7rem);
  /* 15ch broke this headline into four short lines with "Problems" alone on
     the last one. 20ch lets it settle into three full lines. */
  max-width: 20ch; margin-bottom: 0.55em;
  text-shadow: 0 2px 30px rgba(20, 32, 26, 0.55);
}
.hero-copy .sub {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.14rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 46ch;
  margin-bottom: 1.9rem;
  text-shadow: 0 1px 18px rgba(20, 32, 26, 0.6);
}
.hero-copy .actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.hero-copy .btn-secondary { color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.hero-copy .btn-secondary:hover { background: #fff; color: var(--forest-700); border-color: #fff; }
.hero-stats {
  position: relative; z-index: 2;
  display: flex; gap: 2.2rem; flex-wrap: wrap;
  margin-top: clamp(1.8rem, 4vw, 2.8rem);
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.78); font-size: 0.84rem;
}
.hero-stats b { display: block; color: #fff; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; line-height: 1.1; }

/* ==========================================================================
   Section furniture
   ========================================================================== */
.section { padding: clamp(3rem, 5.5vw, 5rem) 0; }
.section-alt { background: var(--white); }
.section-band { background: var(--forest); color: rgba(255,255,255,0.82); }
.section-band h2, .section-band h3 { color: #fff; }
.section-head { max-width: 62ch; margin-bottom: clamp(1.8rem, 3vw, 2.6rem); }
.section-head .kicker {
  font-size: 0.76rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--amber-deep); font-weight: 700; margin-bottom: 0.6rem;
}
.section-subhead {
  font-family: var(--serif); font-size: 1.32rem; font-weight: 600;
  color: var(--forest); margin: 2rem 0 1.1rem; letter-spacing: -0.012em;
}
.section-band .section-head .kicker { color: var(--amber); }
.section-head h2 { margin-bottom: 0.4em; }
.section-head p { color: var(--ink-soft); font-size: 1.03rem; margin: 0; }
.section-band .section-head p { color: rgba(255,255,255,0.8); }
.section-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; max-width: none; }
.section-head.split > div { max-width: 62ch; }
.link-more { font-weight: 600; font-size: 0.94rem; white-space: nowrap; }
.link-more::after { content: " →"; }

/* ==========================================================================
   Homepage tools section — featured converter + compact tool list
   ========================================================================== */
.tools-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(1.4rem, 3vw, 2.4rem);
  align-items: start;
}

/* --- featured tool panel --- */
.tool-panel {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.15rem, 2.2vw, 1.6rem);
}
.tool-panel-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; padding-bottom: 1rem; margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--line);
}
.tool-panel-title { display: flex; gap: 0.85rem; align-items: flex-start; min-width: 0; }
.tool-panel-title h3 { margin: 0 0 0.15rem; font-size: 1.12rem; }
.tool-panel-title p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.45; }
.tool-ico { display: block; flex: none; color: var(--forest); }
.tool-ico svg { width: 34px; height: 34px; display: block; }
.tool-ico.sm svg { width: 20px; height: 20px; }
.tool-tag {
  flex: none; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 700; color: var(--forest); background: var(--blue-gray);
  padding: 0.25rem 0.6rem; border-radius: 100px; white-space: nowrap;
}

/* --- the form itself sits on white so inputs read as interactive --- */
.tool-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.1rem 1.15rem 1.2rem;
}
.tool-form-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0.9rem; }
.tool-form .field { margin-bottom: 0.95rem; }
.tool-form .field:last-child { margin-bottom: 0; }
.tool-form .btn { margin-top: 0.25rem; }

/* --- the outcome block --- */
.tool-outcome { margin-top: 1.1rem; }
.tool-outcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.tool-outcome-cell {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 0.8rem 0.95rem;
}
.tool-outcome-cell.wide { margin-top: 0.8rem; }
.tool-outcome-cell .k {
  display: block; font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 700; margin-bottom: 0.2rem;
}
.tool-outcome-cell strong {
  display: block; font-family: var(--serif); font-size: 1.55rem;
  color: var(--forest); line-height: 1.15; font-weight: 600;
}
.tool-outcome-cell strong small { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-soft); font-weight: 600; }
.tool-explain { margin: 0.9rem 0 0; font-size: 0.92rem; color: var(--ink-soft); line-height: 1.6; }
.tool-explain strong { color: var(--forest); font-weight: 650; }
.tool-caveat {
  margin: 0.8rem 0 0; padding: 0.7rem 0.9rem;
  background: var(--blue-gray); border-radius: var(--r-sm);
  font-size: 0.85rem; color: var(--ink-soft); line-height: 1.55;
}
.tool-caveat strong { color: var(--forest); font-weight: 650; }
.tool-panel-foot {
  margin-top: 1.15rem; padding-top: 0.95rem; border-top: 1px solid var(--line);
}

/* --- the compact list of other tools --- */
.tools-more-title {
  font-size: 0.78rem; letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 700; margin-bottom: 0.6rem;
}
.tool-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.tool-list li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem; align-items: start;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}
.tool-list li:first-child { border-top: 1px solid var(--line); }
.tool-list li > .tool-ico { padding-top: 0.15rem; }
.tool-list a {
  display: inline-block; font-weight: 650; font-size: 0.98rem;
  color: var(--forest); text-decoration: none; line-height: 1.3;
}
.tool-list a:hover { text-decoration: underline; }
.tool-list p { margin: 0.2rem 0 0; font-size: 0.87rem; color: var(--ink-soft); line-height: 1.5; }
.tool-open {
  align-self: center; white-space: nowrap; font-size: 0.82rem; font-weight: 650;
  color: var(--forest); opacity: 0.75;
}
.tool-list li:hover .tool-open { opacity: 1; }

@media (max-width: 900px) {
  .tools-split { grid-template-columns: minmax(0, 1fr); }
  .tool-form-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .tool-outcome-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-panel-head { flex-direction: column; gap: 0.7rem; }
  .tool-list li { grid-template-columns: auto minmax(0, 1fr); }
  .tool-list .tool-open { grid-column: 2; }
}

/* ==========================================================================
   Homepage cooking-times reference — circular food tiles + result panel
   ========================================================================== */
/* This section is centred: heading, grid and result panel all sit on the
   same axis, which suits a quick-reference block. */
#cooking-times .section-head {
  max-width: 60ch;
  margin-inline: auto;
  text-align: center;
}
#cooking-times .section-head .kicker { margin-inline: auto; }

.food-ref { max-width: 1040px; margin-inline: auto; }

.food-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.9rem, 2vw, 1.6rem);
  margin-bottom: clamp(1.6rem, 3vw, 2.4rem);
}

.food-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.35rem 0.7rem;
  border: 0;
  background: none;
  border-radius: var(--r-lg);
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  transition: transform 0.18s ease;
}
.food-tile:hover { transform: translateY(-2px); }
.food-tile:focus-visible { outline: 2.5px solid var(--amber-deep); outline-offset: 3px; }

.food-photo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--cream-deep);
  box-shadow: 0 2px 10px -4px rgba(40, 32, 22, 0.28);
  transition: box-shadow 0.2s ease;
}
.food-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.25s ease;
}
.food-tile:hover .food-photo img { transform: scale(1.06); }

.food-name {
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  color: var(--forest);
}

/* Hover preview of the temperature and time. */
.food-hover {
  font-size: 0.78rem;
  color: var(--ink-faint);
  text-align: center;
  line-height: 1.3;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.18s ease, max-height 0.18s ease;
}
@media (hover: hover) and (pointer: fine) {
  .food-tile:hover .food-hover { opacity: 1; max-height: 2.6em; }
}

/* Selected state */
.food-tile.is-selected .food-photo {
  box-shadow: 0 0 0 3px var(--forest), 0 6px 18px -8px rgba(40, 32, 22, 0.4);
}
.food-tile.is-selected .food-name { color: var(--forest); }
.food-tile.is-selected .food-hover { opacity: 1; max-height: 2.6em; color: var(--forest); font-weight: 600; }
.food-tile.is-selected .food-photo img { filter: saturate(1.04); }

/* --- result panel --- */
.food-result {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
}
.food-result:focus-visible { outline: 2.5px solid var(--amber-deep); outline-offset: 3px; }
.food-panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-bottom: 0.85rem; margin-bottom: 1.05rem;
  border-bottom: 1px solid var(--line);
}
.food-panel-head h3 { margin: 0; font-size: 1.18rem; }
.food-panel-badge {
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 700; color: var(--forest); background: var(--amber-soft);
  padding: 0.22rem 0.6rem; border-radius: 100px; white-space: nowrap;
}
.food-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.food-metric {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 0.8rem 1rem;
}
.food-metric .k {
  display: block; font-size: 0.72rem; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-faint); font-weight: 700; margin-bottom: 0.2rem;
}
.food-metric strong {
  display: block; font-family: var(--serif); font-size: 1.6rem;
  color: var(--forest); line-height: 1.15; font-weight: 600;
}
.food-metric strong small { font-family: var(--sans); font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.food-note { margin: 1rem 0 0; font-size: 0.94rem; line-height: 1.62; color: var(--ink-soft); }
.food-states {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem;
}
.food-state {
  display: inline-flex; align-items: baseline; gap: 0.4rem;
  font-size: 0.83rem; background: var(--blue-gray);
  border-radius: 100px; padding: 0.28rem 0.7rem;
}
.food-state span { color: var(--ink-soft); }
.food-state b { color: var(--forest); font-weight: 650; }
.food-safety {
  margin: 0.9rem 0 0; padding: 0.7rem 0.95rem;
  background: var(--amber-soft); border-radius: var(--r-sm);
  font-size: 0.87rem; line-height: 1.55; color: var(--pepper);
}
.food-safety strong { color: var(--forest); }
.food-disclaimer {
  margin: 1.1rem 0 0; padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.83rem; line-height: 1.55; color: var(--ink-faint);
}

@media (max-width: 900px) {
  .food-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
  .food-name { font-size: 0.85rem; }
}
@media (max-width: 640px) {
  .food-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 0.9rem; }
  .food-name { font-size: 0.9rem; }
  .food-hover { font-size: 0.74rem; }
  .food-metrics { grid-template-columns: 1fr; }
  .food-panel-head { align-items: flex-start; }
}

/* ==========================================================================
   Tool cards (existing grid, kept for the tools index page)
   ========================================================================== */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: 1rem; }
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: 0.55rem;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.3rem 1.35rem 1.45rem;
  text-decoration: none; overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.tool-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--amber); opacity: 0.85;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.tool-card .ico { width: 40px; height: 40px; color: var(--forest); }
.tool-card h3 { font-size: 1.05rem; margin: 0; letter-spacing: -0.01em; }
.tool-card p { margin: 0; color: var(--ink-soft); font-size: 0.925rem; line-height: 1.55; }
.tool-card .go { margin-top: auto; padding-top: 0.6rem; font-weight: 650; font-size: 0.9rem; color: var(--forest); }
.tool-card .go::after { content: " →"; }

/* ==========================================================================
   Category blocks
   ========================================================================== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.15rem; }
.cat-block {
  position: relative; display: flex; flex-direction: column; gap: 0.5rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.6rem 1.5rem 1.5rem; text-decoration: none; overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.cat-block:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-block .ico { display: block; width: 54px; height: 54px; margin: 0 auto 0.35rem; }
.cat-block h3 { margin: 0; font-size: 1.16rem; }
.cat-block .tag { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber-deep); font-weight: 700; }
.cat-block p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; }
.cat-block .go { margin-top: 0.6rem; font-weight: 650; font-size: 0.9rem; }
.cat-block .go::after { content: " →"; }

/* ==========================================================================
   Article cards
   ========================================================================== */
.art-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.5rem; }
.feature-list { display: grid; gap: 1.15rem; }
.art-card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  text-decoration: none; transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.art-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.art-card .thumb { aspect-ratio: 16 / 10; background: var(--cream-deep); overflow: hidden; }
.art-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.art-card .body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.art-card h3 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.32;
  /* Display headings use text-wrap: balance, which is right for a two-word
     hero title but wrong here: it shortens the first line on purpose and
     leaves a hole on the right. Card titles should fill the measure, so they
     get "pretty" instead, which only steps in to avoid a one-word last line. */
  text-wrap: wrap;
  text-wrap: pretty;
  /* Reserve two lines so every summary in a row starts at the same height. */
  min-height: 2.64em;
}
.art-card p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.55; }
.art-card .meta {
  margin-top: 0.15rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; color: var(--ink-faint); line-height: 1.4;
}
.art-card .read { margin-top: auto; padding-top: 0.55rem; font-weight: 650; font-size: 0.89rem; color: var(--forest); }
.art-card .read::after { content: " →"; }

/* The homepage question wall runs three cards per row on desktop, so each card
   keeps a comfortable measure instead of shrinking to a 4-up thumbnail.
   Everything stays left-aligned for scanning. */
.art-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 940px) {
  .art-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .art-grid--three { grid-template-columns: minmax(0, 1fr); }
}

/* Editorial list card (varied layout) */
.art-list { display: grid; gap: 1.15rem; }
.art-row {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.35rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 0.95rem; text-decoration: none; align-items: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.art-row > div:last-child { max-width: 70ch; }
.art-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.art-row .thumb { aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; background: var(--cream-deep); }
.art-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.art-row h3 { margin: 0 0 0.3rem; font-size: 1.08rem; }
.art-row p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.art-row .meta {
  font-size: 0.8rem; color: var(--ink-faint); margin-top: 0.5rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem;
}
.art-row .meta span + span::before,
.art-row .meta time::before {
  content: "·"; margin-right: 0.45rem; color: var(--line-strong);
}
.art-row .meta time { font-variant-numeric: tabular-nums; }
.art-row:hover .meta time { color: var(--forest); }
.art-card .meta time { font-variant-numeric: tabular-nums; }
.art-card:hover .meta time { color: var(--forest); }

/* Separator dots are supplied by the ::before on every element after the first. */
.art-card .meta > * + *::before {
  content: "·"; margin-right: 0.4rem; color: var(--line-strong);
}

/* ==========================================================================
   Topic chips
   ========================================================================== */
.topic-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.9rem; }
.topic {
  display: block; background: var(--blue-gray); border-radius: var(--r-md);
  padding: 0.95rem 1.05rem; text-decoration: none;
  border-left: 3px solid var(--forest);
}
.topic:hover { background: #dfe6ec; }
.topic b { display: block; color: var(--forest); font-size: 0.98rem; }
.topic span { display: block; color: var(--ink-soft); font-size: 0.87rem; line-height: 1.5; margin-top: 0.15rem; }

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.crumbs { font-size: 0.83rem; color: var(--ink-faint); padding: 1rem 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; }
.crumbs li::after { content: "/"; margin-left: 0.35rem; color: var(--line-strong); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--forest); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink-faint); }

/* ==========================================================================
   Article page
   ========================================================================== */
.page-head { padding: 1.6rem 0 0; }
.page-head .cat-tag {
  display: inline-block; font-size: 0.74rem; letter-spacing: 0.11em; text-transform: uppercase;
  font-weight: 700; color: var(--amber-deep); margin-bottom: 0.7rem; text-decoration: none;
}
.page-head h1 { max-width: 20ch; }
.page-head .lede { font-size: clamp(1.03rem, 0.99rem + 0.25vw, 1.16rem); color: var(--ink-soft); max-width: 62ch; }
.page-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; align-items: center;
  font-size: 0.85rem; color: var(--ink-faint);
  padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem;
}
.page-meta .pill {
  background: var(--blue-gray); color: var(--forest); padding: 0.15rem 0.6rem;
  border-radius: 100px; font-weight: 600; font-size: 0.8rem;
}

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 3rem; align-items: start; }
.article-body { max-width: var(--measure); font-size: 1.045rem; }
.article-figure { margin: 0 0 2rem; }
.article-figure img { border-radius: var(--r-lg); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-figure figcaption { font-size: 0.82rem; color: var(--ink-faint); margin-top: 0.55rem; }
.credit { color: var(--ink-faint); }
.article-body > h2 {
  font-size: clamp(1.3rem, 1.14rem + 0.7vw, 1.68rem);
  margin-top: 2.3rem; padding-top: 0.2rem;
}
.article-body > h3 { margin-top: 1.7rem; }
.article-body ul, .article-body ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.article-body li { margin-bottom: 0.45em; }
.article-body li::marker { color: var(--amber-deep); }
.article-body strong { color: var(--forest); font-weight: 650; }
.article-body blockquote {
  margin: 1.6em 0; padding: 0.9rem 1.25rem; background: var(--blue-gray);
  border-left: 3px solid var(--forest); border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--ink-soft);
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.article-body img { border-radius: var(--r-lg); margin: 1.8em 0; width: 100%; }
.article-body figure { margin: 1.8em 0; }
.article-body figcaption { font-size: 0.85rem; color: var(--ink-faint); margin-top: 0.6rem; text-align: center; }
.article-body code {
  font-family: var(--mono); font-size: 0.88em; background: var(--blue-gray);
  padding: 0.12em 0.35em; border-radius: var(--r-sm);
}
.article-body pre.code {
  background: var(--forest-700); color: #e8ede9; padding: 1rem 1.15rem;
  border-radius: var(--r-md); overflow-x: auto; font-size: 0.86rem; line-height: 1.6;
}
.article-body pre.code code { background: none; padding: 0; color: inherit; }

/* Callout blocks */
.callout {
  margin: 1.8em 0; padding: 1.15rem 1.3rem; border-radius: var(--r-md);
  background: var(--blue-gray); border-left: 3px solid var(--forest);
}
.callout > :last-child { margin-bottom: 0; }
.callout b.title { display: block; color: var(--forest); margin-bottom: 0.4rem; font-size: 0.95rem; }
.callout.warn { background: #fdf1e0; border-left-color: var(--amber-deep); }
.callout.note { background: var(--cream-deep); border-left-color: var(--line-strong); }

/* Planner rows */
.planner-row {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 0.9fr);
  gap: 0.8rem; align-items: start;
  padding: 1rem 0.95rem; margin-bottom: 0.85rem;
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-md);
}
.planner-row .field { margin-bottom: 0; }
.planner-row .field:last-child { margin-bottom: 0; }
.planner-row + .planner-row { border-top: 0; }

/* Numbered steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.4em 0 1.6em; }
.steps li {
  counter-increment: step; position: relative; padding-left: 2.9rem; margin-bottom: 1.05em;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.05rem;
  width: 30px; height: 30px; border-radius: 50%; background: var(--forest); color: #fff;
  display: grid; place-items: center; font-size: 0.85rem; font-weight: 700; font-family: var(--sans);
}

/* Comparison table */
.tbl-wrap {
  overflow-x: auto;
  margin: 1.9em 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--white);
  -webkit-overflow-scrolling: touch;
}
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  min-width: 480px;
}
table.tbl caption {
  caption-side: top;
  text-align: left;
  padding: 0.85rem 1rem;
  font-weight: 650;
  color: var(--forest);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
}
table.tbl th,
table.tbl td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.55;
}
table.tbl thead th {
  background: var(--forest);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 0;
}
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:nth-child(even) { background: rgba(247, 245, 239, 0.65); }
table.tbl tbody tr:hover { background: var(--blue-gray); }
/* The first column reads as the row label. */
table.tbl tbody td:first-child { font-weight: 600; color: var(--forest); }
table.tbl tbody tr:hover td:first-child { color: var(--forest); }

/* Sidebar TOC */
.side { position: sticky; top: 88px; }
.side .box {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem 1.15rem;
}
.side .box + .box { margin-top: 1rem; }
.side h3 { font-size: 0.78rem; letter-spacing: 0.02em; color: var(--ink-faint); margin-bottom: 0.7rem; }
.side ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.side ol li { counter-increment: toc; margin-bottom: 0.5rem; font-size: 0.89rem; line-height: 1.45; }
.side ol li::before {
  content: counter(toc) "."; color: var(--amber-deep); font-weight: 700; margin-right: 0.4rem;
}
.side ol a { color: var(--ink-soft); text-decoration: none; }
.side ol a:hover { color: var(--forest); text-decoration: underline; }
.side ul.plain-list { list-style: none; margin: 0; padding: 0; }
.side ul.plain-list li { margin-bottom: 0.5rem; font-size: 0.89rem; line-height: 1.45; }
.side ul.plain-list a { color: var(--ink-soft); text-decoration: none; }
.side ul.plain-list a:hover { color: var(--forest); text-decoration: underline; }
.side .tool-cta {
  background: var(--forest); border: 0; color: #fff;
}
.side .tool-cta h3 { color: rgba(255,255,255,0.72); }
.side .tool-cta p { color: rgba(255,255,255,0.85); font-size: 0.89rem; }
.side .tool-cta .btn { background: var(--amber); color: var(--forest-700); width: 100%; }
.side .tool-cta .btn:hover { background: #f2bb66; }

/* Related articles */
.related { margin-top: 3.5rem; padding-top: 2.2rem; border-top: 1px solid var(--line); }
.related > h2 { font-size: 1.35rem; margin-bottom: 1.3rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; }
.related-card {
  display: flex; flex-direction: column; gap: 0.5rem; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 0.9rem;
  text-decoration: none; transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.related-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.related-card .thumb { aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; background: var(--cream-deep); }
.related-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-card h3 { margin: 0; font-size: 0.99rem; line-height: 1.35; }
.related-card p { margin: 0; font-size: 0.855rem; color: var(--ink-soft); line-height: 1.5; }

/* ==========================================================================
   Tool interface (distinct system)
   ========================================================================== */
.tool-page { background: var(--white); }
.tool-hero {
  background: var(--forest); color: #fff; padding: clamp(2.4rem, 4vw, 3.4rem) 0 clamp(2rem, 3vw, 2.6rem);
}
.tool-hero h1 { color: #fff; max-width: 18ch; }
.tool-hero .lede { color: rgba(255,255,255,0.85); font-size: 1.08rem; max-width: 62ch; margin-bottom: 0; }
.tool-hero .crumbs a { color: rgba(255,255,255,0.72); }
.tool-hero .crumbs [aria-current] { color: rgba(255,255,255,0.6); }
.tool-hero .crumbs li::after { color: rgba(255,255,255,0.3); }

.tool-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; padding: clamp(2.2rem, 4vw, 3.2rem) 0 4rem; }
.tool-shell.contact-shell { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }

.panel {
  background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  padding: clamp(1.2rem, 2.4vw, 1.8rem);
}
.panel.tinted { background: var(--cream); border-color: var(--line); }
.panel.soft { background: var(--blue-gray); border-color: transparent; }
.panel > h2, .panel > h3 { margin-top: 0; }
.panel-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem;
}
.panel-title h2 { margin: 0; font-size: 1.2rem; }
.panel-title span { font-size: 0.8rem; color: var(--ink-faint); }

.field { margin-bottom: 1.05rem; }
.field:last-child { margin-bottom: 0; }
.field > label, .field .lbl {
  display: block; font-weight: 650; font-size: 0.89rem; color: var(--forest); margin-bottom: 0.35rem;
}
.field .hint { display: block; font-size: 0.82rem; color: var(--ink-faint); margin-top: 0.3rem; line-height: 1.45; }
.field .hint a { color: var(--ink-soft); }

.input, select.input, textarea.input {
  width: 100%; padding: 0.62rem 0.75rem; border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md); background: var(--white); font-size: 1rem;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.input:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(38, 59, 50, 0.12); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(168, 65, 47, 0.12); }
select.input { appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%236f7a74' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 11px; padding-right: 2.1rem; }

.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--r-md) 0 0 var(--r-md); }
.input-group .unit {
  display: grid; place-items: center; padding: 0 0.8rem; border: 1.5px solid var(--line-strong);
  border-left: 0; border-radius: 0 var(--r-md) var(--r-md) 0; background: var(--cream-deep);
  font-size: 0.88rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }

.err { display: none; color: var(--danger); font-size: 0.83rem; margin-top: 0.3rem; font-weight: 550; }
.err.show { display: block; }

/* Honeypot: hidden from people, reachable by naive bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Copy button styled as a unit suffix */
.unit.as-button {
  border: 1.5px solid var(--line-strong); border-left: 0;
  background: var(--cream-deep); color: var(--forest); cursor: pointer;
  font-weight: 650; font-size: 0.85rem; padding: 0 0.9rem;
  font-family: var(--sans); transition: background 0.15s ease;
}
.unit.as-button:hover { background: var(--blue-gray); }
.unit.as-button:focus-visible { outline: 2.5px solid var(--amber-deep); outline-offset: -2px; }

/* Form status messages */
.form-status { margin-top: 0.9rem; font-size: 0.9rem; line-height: 1.5; color: var(--ink-soft); }
.form-status:empty { display: none; }
.form-status.is-ok { color: var(--ok); font-weight: 550; }
.form-status.is-error { color: var(--danger); font-weight: 550; }

.btn-block { width: 100%; margin-top: 1.2rem; }

.result-panel {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.2rem, 2.4vw, 1.7rem);
}
.result-panel.ready { border-color: var(--forest); box-shadow: inset 0 0 0 1px rgba(38,59,50,0.06); }
.result-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem;
}
.result-head h2 { margin: 0; font-size: 1.15rem; }
.result-badge {
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
  background: var(--forest); color: #fff; padding: 0.2rem 0.6rem; border-radius: 100px;
}
.result-empty { color: var(--ink-faint); font-size: 0.95rem; }
.result-metrics { display: grid; gap: 0.85rem; }
.metric {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0.9rem 1rem;
}
.metric .k { font-size: 0.76rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.metric .v { font-family: var(--serif); font-size: 1.65rem; color: var(--forest); line-height: 1.15; font-weight: 600; }
.metric .v small { font-family: var(--sans); font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); }
.metric .d { font-size: 0.86rem; color: var(--ink-soft); margin-top: 0.2rem; line-height: 1.5; }
.metric-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.note-list { margin: 1.1rem 0 0; padding: 0; list-style: none; }
.note-list li {
  position: relative; padding-left: 1.35rem; margin-bottom: 0.55rem;
  font-size: 0.9rem; color: var(--ink-soft); line-height: 1.55;
}
.note-list li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px;
  border-radius: 50%; background: var(--amber);
}
.note-list li strong { color: var(--forest); }

/* Chart / visualisation blocks */
.viz {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 1.1rem; margin: 1.5rem 0;
}
.viz h4, .viz h3 { margin: 0 0 0.8rem; font-size: 0.95rem; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 62px; gap: 0.7rem; align-items: center; margin-bottom: 0.6rem; font-size: 0.86rem; }
.bar-row:last-child { margin-bottom: 0; }
.bar-track { background: var(--cream-deep); border-radius: 100px; height: 22px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--forest); border-radius: 100px; transition: width 0.4s ease; }
.bar-fill.amber { background: var(--amber); }
.bar-fill.over { background: var(--danger); }
.bar-row .val { font-family: var(--mono); font-size: 0.82rem; text-align: right; color: var(--ink-soft); }

/* Timeline */
.timeline { position: relative; margin: 1.5rem 0; padding-left: 1.6rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line-strong); }
.tl-item { position: relative; margin-bottom: 1rem; }
.tl-item:last-child { margin-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -1.6rem; top: 0.5rem; width: 12px; height: 12px;
  border-radius: 50%; background: var(--white); border: 3px solid var(--forest);
}
.tl-item.now::before { background: var(--amber); border-color: var(--amber); }
.tl-item .tl-t { font-family: var(--mono); font-size: 0.83rem; color: var(--amber-deep); font-weight: 600; }
.tl-item h4 { margin: 0.1rem 0 0.2rem; font-size: 0.98rem; }
.tl-item p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.5; }

/* ==========================================================================
   Home page specials
   ========================================================================== */
.feature-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
.feature-split .art { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.feature-split .art img { width: 100%; height: 100%; object-fit: cover; }
.feature-split.reverse .art { order: 2; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.1rem; margin-top: 2rem; }
.stat {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--r-md); padding: 1.1rem 1.2rem;
}
.stat b { display: block; font-family: var(--serif); font-size: 1.9rem; color: var(--amber); line-height: 1.1; }
.stat span { font-size: 0.87rem; color: rgba(255,255,255,0.78); }

.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; }
.how-step { border-top: 2px solid var(--amber); padding-top: 0.9rem; }
.how-step .n { font-family: var(--serif); font-size: 1.6rem; color: var(--forest); line-height: 1; }
.how-step h3 { margin: 0.45rem 0 0.35rem; font-size: 1.02rem; }
/* Group heading above the numbered steps: serif so it reads as a sub-title
   rather than another step. */
.feature-split .how-head { font-family: var(--serif); font-size: 1.16rem; margin: 0 0 1.15rem; }
.how-step p { margin: 0; color: var(--ink-soft); font-size: 0.93rem; }

.problem-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.4rem; }
.problem {
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 1rem;
  padding: 1.2rem 0; border-bottom: 1px solid var(--line);
}
.problem .n {
  width: 40px; height: 40px; border-radius: 50%; background: var(--blue-gray);
  color: var(--forest); display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
}
.problem h3 { margin: 0 0 0.25rem; font-size: 1.02rem; }
.problem p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.problem a { text-decoration: none; }
.problem a:hover h3 { text-decoration: underline; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  background: var(--forest); color: #fff; border-radius: var(--r-xl);
  padding: clamp(2rem, 4vw, 3rem); display: grid; gap: 1.2rem;
  grid-template-columns: minmax(0, 1fr) auto; align-items: center;
}
.cta-band h2 { color: #fff; margin-bottom: 0.35rem; }
.cta-band p { color: rgba(255,255,255,0.82); margin: 0; max-width: 56ch; }
.cta-band .btn { background: var(--amber); color: var(--forest-700); }
.cta-band .btn:hover { background: #f2bb66; }
.cta-band .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.45); }
.cta-band .btn.ghost:hover { background: #fff; color: var(--forest); }
.cta-band .actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--forest-700); color: rgba(255,255,255,0.7); padding: clamp(2.6rem, 5vw, 4rem) 0 1.6rem; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer-brand .brand { color: #fff; margin-bottom: 0.8rem; }
.footer-brand .brand-mark { color: var(--amber); }
.footer-brand p { font-size: 0.9rem; line-height: 1.6; max-width: 40ch; }
.footer-col h3 { color: #fff; font-size: 0.8rem; letter-spacing: 0.02em; margin-bottom: 0.9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: rgba(255,255,255,0.72); text-decoration: none; font-size: 0.91rem; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  margin-top: 2.4rem; padding-top: 1.3rem; border-top: 1px solid rgba(255,255,255,0.14);
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; justify-content: space-between;
  font-size: 0.84rem; color: rgba(255,255,255,0.55);
}
.footer-bottom a { color: rgba(255,255,255,0.72); }

/* ==========================================================================
   Utilities
   ========================================================================== */
.stack > * + * { margin-top: 1rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.88rem; }
.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;
}
.page { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .side .box + .box { margin-top: 1rem; }
  .tool-shell, .tool-shell.contact-shell { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1120px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 940px) {
  .hero .inner { min-height: min(620px, 82vh); }
  .hero-media img { object-position: center 55%; }
  .hero-media::after {
    background:
      linear-gradient(to top, rgba(27, 42, 35, 0.12) 0%, rgba(27, 42, 35, 0.52) 50%, rgba(27, 42, 35, 0.86) 100%);
  }
  .hero-stats { gap: 1.5rem; }
  .hero-stats b { font-size: 1.3rem; }
  .feature-split, .feature-split.reverse .art { grid-template-columns: 1fr; order: 0; }
}

@media (max-width: 720px) {
  .art-row { grid-template-columns: 1fr; gap: 0.85rem; padding: 0.8rem; }
  .art-row .thumb { aspect-ratio: 16 / 9; }
  .planner-row { grid-template-columns: 1fr 1fr; }
  .planner-row .field:first-child { grid-column: 1 / -1; }
  .row-3 { grid-template-columns: 1fr 1fr; }
  .cta-band { grid-template-columns: 1fr; }
  .section-head.split { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .metric-grid-2 { grid-template-columns: 1fr; }
  .article-body { font-size: 1.01rem; }
  .bar-row { grid-template-columns: 74px 1fr 54px; font-size: 0.8rem; }
}

@media (max-width: 520px) {
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .wrap, .wrap-narrow { width: calc(100% - 1.8rem); }
  .hero-copy h1 { font-size: 2.05rem; }
  .btn { width: 100%; }
  .hero-copy .actions .btn { width: auto; flex: 1 1 auto; }
  .cta-band .actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- back to top ----------
   Revealed by site.js once the page has scrolled. Without JavaScript the button
   keeps .to-top's hidden state, so no dead control is ever shown. */
.to-top {
  position: fixed;
  right: clamp(0.9rem, 2.2vw, 1.6rem);
  bottom: clamp(0.9rem, 2.2vw, 1.6rem);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 2.85rem;
  padding: 0;
  border: 1px solid rgba(250, 246, 238, 0.18);
  border-radius: 50%;
  background: var(--forest);
  color: var(--cream);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.55rem);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease,
    background-color 0.18s ease, box-shadow 0.18s ease;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--forest-600);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.to-top:active { transform: translateY(0); }

.to-top:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* Sit clear of the rounded footer panels on small screens without covering
   the last line of text. */
@media (max-width: 560px) {
  .to-top { width: 2.6rem; height: 2.6rem; }
}

@media print {
  .site-header, .site-footer, .side, .related { display: none; }
  body { background: #fff; }
}
