/* Marketing pages (landing, what's new) in the iOS app's look (ErlistTheme): a white page with a
   soft pastel field, the blue primary button, Space Grotesk titles and DM Sans text. Plain CSS,
   independent of the app's Tailwind/glassmorphism theme. Light only. */

/* The app's fonts (ios/Erlist/Sources/DesignSystem/Fonts, SIL Open Font License), self-hosted as
   their Latin variable subsets so the first paint waits on no third-party stylesheet. */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/dm-sans-latin-97b33bb4.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/assets/space-grotesk-latin-dfda626c.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  /* ErlistTheme (ios/Erlist/Sources/DesignSystem/ErlistTheme.swift), light. */
  --shop: #7E9CE8;
  --check: #74C4A0;
  --decide: #ECC178;
  --habit: #A99BEF;
  --teal: #6FC5CE;
  --bg: #FFFFFF;
  --page: #F4F5F6;
  --surface: #F4F5F6;
  --sunken: #ECEEEF;
  --border: #E4E6E8;
  --border-strong: #D3D6D9;
  --text: #14161A;
  --text-2: #5C6168;          /* 6.2:1 on white */
  --text-3: #676D75;
  --ink-on-pastel: #20283A;   /* on --shop: 5.5:1 */
  --accent-deep: #3C5DBC;
  --green50: #E5F3EC; --green500: #74C4A0; --green700: #2A704F;
  --amber50: #FBF1DB; --amber500: #ECC178; --amber700: #875D17;
  --red50: #FBE9EA; --red500: #EFA0A3; --red700: #B5454A;
  --blue50: #E8EEFC; --blue700: #3C5DBC;
  --lilac50: #F0ECFD; --lilac700: #5B4BB0;
  --success-text: #2E7C58;

  /* The page's older names, on the app's colours. */
  --cream: var(--bg);
  --cream-deep: var(--page);
  --paper: #FFFFFF;
  --ink: var(--text);
  --muted: var(--text-2);
  --green: var(--check);
  --green-ink: var(--green700);
  --green-soft: var(--green50);
  --line: var(--border);
  --shadow: 0 18px 50px rgba(20, 22, 26, 0.10);
  --radius: 22px;
  --font-heading: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* BeatMotion's springs at the loop's pace; the loop's script refines them into linear() curves. */
  --spring-move: cubic-bezier(.2, .9, .25, 1); --spring-move-dur: .85s;
  --spring-pop: cubic-bezier(.3, 1.5, .5, 1); --spring-pop-dur: .6s;
  --spring-settle: cubic-bezier(.2, .9, .3, 1); --spring-settle-dur: .7s;
}

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

body.marketing {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.marketing h1, .marketing h2, .marketing h3 {
  font-family: var(--font-heading);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

.marketing p { margin: 0; }
.marketing a { color: var(--blue700); }
.marketing img { max-width: 100%; height: auto; display: block; }

.marketing :focus-visible {
  outline: 3px solid var(--blue700);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--paper);
  padding: 8px 14px;
  border-radius: 10px;
  z-index: 10;
}
.skip-link:focus { left: 8px; }

/* ── Header / footer ───────────────────────────────────────────── */

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink) !important;
}
.wordmark__icon { width: 28px; height: 28px; }

.site-header { position: relative; z-index: 2; }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 24px;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 40px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer nav { display: flex; gap: 20px; }
.site-footer nav { flex-wrap: wrap; gap: 8px 20px; }
.site-footer nav[data-footer-list] { flex-basis: 100%; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; }
.site-footer__maker { flex-basis: 100%; max-width: 62ch; font-size: 13px; line-height: 1.5; color: var(--muted); }
.site-footer__maker a { color: inherit; }
.site-footer__credit { margin: -24px auto 0; padding-bottom: 32px; font-size: 12px; color: var(--muted); }
.site-footer__credit a { color: inherit; }

/* ── Shared bits ───────────────────────────────────────────────── */

.eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-ink);
  margin-bottom: 14px !important;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 14px 30px;
  border: 0;
  border-radius: 16px;
  background: var(--shop);
  color: var(--ink-on-pastel) !important;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(60, 93, 188, 0.22);
  transition: box-shadow .15s ease, transform .15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(60, 93, 188, 0.28); }

.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.cta__note { font-size: 14px; color: var(--muted); }

.text-link { font-weight: 700; }

/* ── Section titles ────────────────────────────────────────────── */

.section-title, .final-cta h2 {
  font-size: clamp(1.85rem, 6vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.lede { color: var(--muted); font-size: 1.08rem; margin-top: 12px !important; max-width: 34em; }
.final-cta h2 { margin-bottom: 18px; }

.points {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
}
.points li {
  position: relative;
  padding-left: 34px;
  font-weight: 500;
}
.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green-soft) no-repeat center / 12px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.2 4.3 8.5 11 1.5' fill='none' stroke='%232A704F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Numbered how-to steps (e.g. bringing Mealime recipes over). */
.steps {
  list-style: decimal;
  padding-left: 1.4em;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
  max-width: 40em;
}
.steps li::marker { color: var(--green-ink); font-weight: 700; }

/* ── Final CTA, on the pastel field ────────────────────────────── */

.final-cta { position: relative; overflow: hidden; }
.final-cta__inner {
  position: relative;
  z-index: 1;
  padding-top: 88px;
  padding-bottom: 88px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.final-cta__icon { width: 72px; height: 72px; margin-bottom: 20px; }
.final-cta__inner > p { color: var(--muted); font-size: 1.1rem; margin-bottom: 28px; }
.final-cta .cta { align-items: center; }

.fine-print { font-size: 13px; color: var(--muted); }

/* ── What erlist does better (ERL-60): pastel cards in the app's plan-area colours ── */

.advantages .wrap, .comparison .wrap { padding-top: 64px; padding-bottom: 64px; }
.advantages h2, .comparison h2 { margin-bottom: 28px; }
.advantages__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}
.adv { border-radius: var(--radius); padding: 20px; background: var(--tint); }
.adv[data-tone="blue"] { --tint: var(--blue50); --tone: var(--blue700); }
.adv[data-tone="green"] { --tint: var(--green50); --tone: var(--green700); }
.adv[data-tone="lilac"] { --tint: var(--lilac50); --tone: var(--lilac700); }
.adv[data-tone="amber"] { --tint: var(--amber50); --tone: var(--amber700); }
.adv[data-tone="periwinkle"] { --tint: #EEF1FD; --tone: var(--blue700); }
.adv h3 { display: flex; align-items: center; gap: 12px; font-size: 1.2rem; }
.adv__icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: #fff; color: var(--tone); font-size: 19px; }
.adv p { color: var(--muted); margin-top: 10px; }
.tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--lilac700);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.comparison { background: var(--page); }
.comparison__columns { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.comparison__column { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.comparison__column--erlist { border-color: var(--shop); box-shadow: 0 0 0 3px var(--blue50); }
.comparison__column h3 { font-size: 1.15rem; }
.comparison__column .points { margin-top: 14px; }

.pricing { background: var(--page); }
.pricing .wrap { padding-top: 0; padding-bottom: 64px; }
.pricing__price { margin-top: 10px; font-weight: 700; }
.pricing__note { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* ── Search landing pages (ticket 074) ─────────────────────────── */

.page-hero .wrap { padding-top: 40px; padding-bottom: 48px; }
.page-hero h1 { font-size: clamp(2.1rem, 7vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; max-width: 16em; }
.page-hero .lede { margin-bottom: 28px !important; }
.page-section .wrap { padding-top: 32px; padding-bottom: 56px; }
.page-section h2 { font-size: 1.3rem; margin-bottom: 8px; }
.page-section .section-title { font-size: clamp(1.85rem, 6vw, 2.7rem); margin-bottom: 24px; }
.page-section p { color: var(--muted); }
.page-section h3 { font-size: 1.1rem; margin-bottom: 6px; }
.adv__link { margin-top: 10px; font-weight: 700; }
/* Ticket 173: the tools hub and the Related block under each tool page; a seasonal page's Updated line. */
.hub-list { list-style: none; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-top: 12px; }
.hub-list li { display: grid; gap: 2px; }
.hub-list a { font-weight: 700; }
.hub-list span { color: var(--muted); }
@media (min-width: 860px) { .hub-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; } }
.updated { margin-top: 8px; font-size: 14px; color: var(--muted); }
.tool-share-link { margin: 14px 0 0; font-weight: 700; }
.page-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
/* /mealime-alternative: the closing notice, quoted word for word; each alternative's better-choice line. */
.page-section .quote { margin: 16px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--line); }
.page-section .quote p { color: var(--ink, inherit); font-style: italic; }
.alternative__better, #what-you-lost .points + p { margin-top: 14px; }
.alternative .fine-print { margin-top: 10px; overflow-wrap: anywhere; }
.compare-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.compare-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
/* Ticket 175: the shared-list comparison has five apps side by side. */
.compare-table--wide { min-width: 880px; }
.compare-table th, .compare-table td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table thead th { font-family: var(--font-heading); font-size: 1.05rem; }
.compare-table tbody th { width: 22%; font-weight: 700; }
.compare-table td.not-found { color: var(--muted); font-style: italic; }
/* Ticket 159: on a phone the comparison stacks, one feature per block, each cell named by its app (no sideways scroll). */
@media (max-width: 600px) {
  .compare-scroll { overflow-x: visible; }
  .compare-table { min-width: 0; }
  .compare-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .compare-table, .compare-table tbody { display: block; }
  .compare-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .compare-table tbody tr:last-child { border-bottom: 0; }
  .compare-table tbody th { grid-column: 1 / -1; width: auto; padding: 0; border: 0; }
  .compare-table td { padding: 0; border: 0; font-size: 14px; }
  .compare-table td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); font-weight: 600; font-style: normal; }
}
.checked-on { margin-top: 16px !important; font-size: 14px; }
.page-section .fine-print { margin-top: 8px !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Wider screens ─────────────────────────────────────────────── */

@media (min-width: 860px) {
  .wrap { padding: 0 32px; }
  .card { padding: 48px 44px; }
  .advantages .wrap, .comparison .wrap { padding-top: 104px; padding-bottom: 104px; }
  .pricing .wrap { padding-bottom: 104px; }
  .advantages__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .comparison__columns { grid-template-columns: 1fr 1fr; gap: 24px; }
  .page-hero .wrap { padding-top: 72px; padding-bottom: 72px; }
  .page-grid { grid-template-columns: 1fr 1fr; gap: 40px 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
  .button:hover { transform: none; }
}

/* ── Free tool pages (tickets 133/134) ─────────────────────────── */

.tool-hero .wrap { padding-bottom: 8px; }
.tool-hero .lede { margin-bottom: 12px !important; }
.tool-hero__note { font-size: 14px; color: var(--muted); }
.tool-section .wrap { padding-top: 16px; }
.tool-tips, .tool-app { border-top: 1px solid var(--line); }
.tool-app .cta { margin-top: 28px; }

/* What needs JavaScript (print, add, remove) shows only once it has run. */
.tool-js { display: none !important; }
@media screen {
  .js .tool-toolbar.tool-js { display: flex !important; }
  .js .tool-add.tool-js { display: block !important; }
  .js .tool-list__remove.tool-js { display: inline-flex !important; }
}

.tool-toolbar { flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 20px; }
.tool-link {
  border: 0; background: none; padding: 8px 0; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--blue700); text-decoration: underline;
}

.tool-add { margin-bottom: 24px; max-width: 520px; }
.tool-add label { display: block; font-weight: 700; margin-bottom: 6px; }
.tool-add__row { display: flex; gap: 8px; }
.tool-add input {
  flex: 1; min-width: 0; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--border-strong); border-radius: 12px; font: inherit; background: var(--paper); color: var(--ink);
}
.tool-add button {
  min-height: 48px; padding: 10px 18px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--ink); color: var(--paper); font: inherit; font-weight: 700;
}

.tool-list__columns { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.tool-list__aisle {
  background: var(--page); border-radius: 18px; padding: 16px 18px 10px;
  break-inside: avoid;
}
.tool-list__aisle[hidden], .tool-list__item[hidden] { display: none; }
.tool-list .tool-list__aisle h2 { font-size: 1.1rem; margin-bottom: 6px; }
.tool-list__aisle ul { list-style: none; margin: 0; padding: 0; }
.tool-list__item { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.tool-list__item:first-child { border-top: 0; }
.tool-list__item input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--success-text); }
.tool-list__item label { flex: 1; padding: 10px 0; cursor: pointer; }
.tool-list__item input:checked + label { color: var(--muted); text-decoration: line-through; }
.tool-list__remove {
  flex: none; width: 40px; height: 40px; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; background: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--muted);
}
.tool-list__remove:hover { background: var(--sunken); color: var(--ink); }
.tool-print-footer { display: none; }
/* Ticket 151: a "tick what you have" list prints and copies only what's missing, under its own heading. */
.tool-print-title { display: none; }
.tool-print-note { font-size: 14px; color: var(--muted); margin: -10px 0 16px; }

@media (min-width: 640px) {
  .tool-list__columns { display: block; columns: 2; column-gap: 16px; }
  .tool-list__aisle { margin-bottom: 16px; }
}
@media (min-width: 1000px) {
  .tool-list__columns { columns: 3; }
}

/* Printing (or saving as PDF): only the title and the list, two columns, with "erlist.app" at the end. */
@media print {
  @page { margin: 14mm; }
  body.marketing { font-size: 11pt; line-height: 1.3; }
  .tool-page ~ *, .site-header, .site-footer, .skip-link, .tool-page .eyebrow, .tool-page .lede, .tool-hero__note,
  .tool-tips, .tool-app { display: none !important; }
  .wrap { padding: 0 !important; max-width: none; }
  .tool-hero .wrap { padding: 0 0 8pt !important; }
  .tool-page h1 { font-size: 20pt; }
  .tool-section .wrap { padding: 0 !important; }
  .tool-list__columns { display: block; columns: 2; column-gap: 10mm; }
  .tool-list__aisle { background: none; padding: 0; margin-bottom: 8pt; border-radius: 0; }
  .tool-list .tool-list__aisle h2 { font-size: 12pt; margin-bottom: 2pt; border-bottom: 1px solid #000; }
  .tool-list__item { border: 0; gap: 6pt; }
  .tool-list__item input { width: 12pt; height: 12pt; }
  .tool-list__item label { padding: 1pt 0; }
  .tool-list__item input:checked + label { color: inherit; text-decoration: none; }
  .tool-print-footer { display: block; margin-top: 10pt; font-size: 9pt; color: #555; text-align: right; }
  .tool-print-footer a { color: inherit; text-decoration: none; }
  .tool-print-title { display: block; margin: 0 0 8pt; font-size: 14pt; font-weight: 700; }
  .tool-list--missing .tool-list__item:has(input:checked) { display: none; }
  .tool-list--missing .tool-list__aisle:not(:has(.tool-list__item:not([hidden]) input:not(:checked))) { display: none; }
  /* Ticket 167: the printout is the light list: item names by aisle, no amounts. The amounts are in the app. */
  .tool-full-only, .tool-print-note, .tool-toolbar, .tool-share-link { display: none !important; }
}

/* The converter and the recipe scaler (ticket 134). */
.tool-field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.tool-field span { font-size: 15px; }
.tool-field input, .tool-field select, .tool-scaler textarea {
  min-height: 48px; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 12px;
  font: inherit; font-weight: 500; background: var(--paper); color: var(--ink); width: 100%;
}
.tool-converter { background: var(--page); border-radius: 22px; padding: 20px; }
.tool-converter__fields { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.tool-field--wide { grid-column: 1 / -1; }
.tool-converter__result { margin-top: 18px !important; font-family: var(--font-heading); font-size: clamp(2.2rem, 9vw, 3.2rem); font-weight: 700; letter-spacing: -0.03em; }
.tool-converter__equals { color: var(--muted); margin-right: 8px; }
.tool-note { margin-top: 16px !important; font-size: 15px; max-width: 46em; }
.tool-table-scroll { margin-top: 8px; }
.tool-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tool-table th, .tool-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tool-table thead th { font-family: var(--font-heading); font-size: 14px; vertical-align: bottom; }
.tool-table__size { display: block; font-family: var(--font-body); font-weight: 500; color: var(--muted); font-size: 13px; }
.tool-table tbody th { font-weight: 600; }
.tool-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tool-table tbody tr:last-child th, .tool-table tbody tr:last-child td { border-bottom: 0; }
.tool-sources { margin-top: 32px; }
@media (max-width: 520px) {
  .tool-table { font-size: 14px; }
  .tool-table th, .tool-table td { padding: 9px 7px; }
  .tool-table td, .tool-table thead th { white-space: normal; }
}
.tool-sources ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 15px; display: grid; gap: 6px; }

.tool-scaler { display: grid; gap: 14px; }
.tool-scaler textarea { min-height: 220px; resize: vertical; line-height: 1.5; }
.tool-scaler__servings { display: flex; align-items: flex-end; gap: 10px; }
.tool-scaler__servings .tool-field { flex: 1; }
.tool-scaler__arrow { padding-bottom: 12px; color: var(--muted); font-size: 20px; }
.tool-scaler__presets { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-chip {
  min-height: 44px; min-width: 56px; padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--paper); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer;
}
.tool-chip:hover { background: var(--sunken); }
.tool-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
a.tool-chip { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.tool-chip--submit { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.js .tool-chip--submit { display: none; }
.tool-scaler__result { margin-top: 28px; background: var(--page); border-radius: 22px; padding: 20px; }
.tool-scaler__result h2 { font-size: 1.1rem; margin-bottom: 8px; }
.tool-scaled { list-style: none; margin: 0; padding: 0; }
.tool-scaled li { padding: 8px 0; border-top: 1px solid var(--line); font-weight: 600; }
.tool-scaled li:first-child { border-top: 0; }
.tool-scaled__unchanged { color: var(--muted); font-weight: 500 !important; }
.tool-scaled__mark { font-size: 14px; font-style: italic; }

@media (min-width: 860px) {
  .tool-converter__fields { grid-template-columns: 120px 1fr 1.4fr 1fr; align-items: end; }
  .tool-field--wide { grid-column: auto; }
  .tool-scaler-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
  .tool-scaler__result { margin-top: 0; }
}

/* The web importer (ticket 139): one link field, then a preview card with the rest in the app. */
.import-form { background: var(--page); border-radius: 22px; padding: 20px; max-width: 640px; }
.import-form__label { display: block; font-weight: 700; margin-bottom: 8px; }
.import-form__row { display: flex; flex-wrap: wrap; gap: 8px; }
.import-form__input {
  flex: 1 1 240px; min-width: 0; min-height: 52px; padding: 10px 14px;
  border: 1px solid var(--border-strong); border-radius: 12px; font: inherit; background: var(--paper); color: var(--ink);
}
.import-form__submit {
  min-height: 52px; padding: 10px 20px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--ink); color: var(--paper); font: inherit; font-weight: 700;
}
.import-form__trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.importer-works__list { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.import-page h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); margin-bottom: 10px; }
.import-card { background: var(--paper); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; margin-bottom: 28px; max-width: 640px; }
.import-cover img { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.import-card__body { padding: 18px 20px 20px; }
.import-credit { color: var(--muted); margin-bottom: 8px; }
.import-credit a { color: var(--accent-deep); }
.import-counts { font-weight: 700; margin-bottom: 10px; }
.import-ingredients { margin: 0 0 6px; padding-left: 20px; }
.import-ingredients li { margin: 4px 0; }
.import-more { color: var(--muted); filter: blur(0.4px); }
.import-steps-note { color: var(--muted); margin-top: 8px; }
.import-save { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 640px; }
.import-save .button--ghost { background: var(--paper); border: 1px solid var(--border-strong); box-shadow: none; font-size: 16px; min-height: 48px; }
.import-reading, .import-failed, .import-spoken, .import-limited { max-width: 640px; }
.import-page .import-form { margin-top: 20px; }

/* The churrasco/BBQ and party calculators (ticket 136): a small form, then the answer as a checklist. */
.tool-calc { background: var(--page); border-radius: 22px; padding: 20px; margin-bottom: 24px; }
.tool-calc__fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.tool-calc__fields .tool-field input, .tool-calc__fields .tool-field select {
  min-height: 48px; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 12px;
  font: inherit; font-weight: 500; background: var(--paper); color: var(--ink); width: 100%;
}
.tool-calc__options, .tool-calc__kind { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.tool-calc__kind { border: 0; padding: 0; margin: 0 0 16px; }
.tool-calc__kind legend { font-weight: 700; margin-bottom: 8px; }
.tool-calc__options label, .tool-calc__kind label { display: flex; gap: 10px; align-items: center; min-height: 32px; }
.tool-calc__options input, .tool-calc__kind input { width: 22px; height: 22px; accent-color: var(--success-text); }
.tool-calc__submit {
  margin-top: 16px; min-height: 48px; padding: 10px 20px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--ink); color: var(--paper); font: inherit; font-weight: 700;
}
.js .tool-calc__submit { display: none; }
.tool-calc__total { margin-bottom: 16px; }
.tool-rule { font-size: 1.1rem; }
.button--ghost { background: var(--paper); border: 1px solid var(--border-strong); box-shadow: none; }
@media print { .tool-calc, .tool-calc__total { display: none !important; } }

/* How much per person (ticket 135). */
.tool-answer { background: var(--green50, #EAF6EF); border-radius: 18px; padding: 16px 18px; margin-bottom: 24px; }
.tool-answer p { margin: 4px 0; font-size: 1.1rem; }
.tool-hub { list-style: none; padding: 0; display: grid; gap: 16px; }
.tool-hub__item { background: var(--page); border-radius: 18px; padding: 16px 18px; }
.tool-hub__item h2 { font-size: 1.2rem; margin-bottom: 6px; }
@media print { .tool-answer { display: none !important; } }

/* The weekly menu (ticket 137) and the dinner picker (ticket 138). */
.menu-days { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 14px; }
.menu-day { display: grid; grid-template-columns: 112px 1fr; grid-template-areas: "name name" "photo body"; gap: 6px 14px;
            background: var(--page); border-radius: 18px; padding: 14px; }
.menu-day__name { grid-area: name; font-family: var(--font-heading); font-weight: 700; color: var(--muted); margin: 0; }
.menu-day__photo { grid-area: photo; }
.menu-day__photo img { display: block; width: 112px; height: 112px; object-fit: cover; border-radius: 12px; }
.menu-day__body { grid-area: body; min-width: 0; }
.menu-day__body h2 { font-size: 1.1rem; margin: 0 0 4px; }
.menu-day__body h2 a { color: var(--ink); text-decoration: none; }
.menu-day__facts, .menu-day__credit { font-size: 14px; color: var(--muted); margin: 2px 0; }
.menu-day__swap { display: inline-block; margin-top: 6px; font-weight: 700; color: var(--accent-deep); }
@media (min-width: 760px) { .menu-days { grid-template-columns: 1fr 1fr; } }
@media print { .menu-days, .menu-new, .menu-short { display: none !important; } }

/* What to make for dinner (ticket 138). */
.picker-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.picker-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px;
               border: 1px solid var(--border-strong); background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 600; }
.picker-chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.picker-card { background: var(--paper); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; margin-bottom: 18px; max-width: 640px; }
.picker-card__photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; max-height: 320px; object-fit: cover; }
.picker-card__body { padding: 16px 20px 20px; }
.picker-card__body h2 { font-size: 1.5rem; margin: 4px 0; }
.picker-card__body h2 a { color: var(--ink); text-decoration: none; }
.picker-card__ingredients { margin: 10px 0; padding-left: 20px; }
.picker-card__recipe { font-weight: 700; color: var(--accent-deep); }
.picker-more .menu-day__body h3 { font-size: 1.05rem; margin: 0 0 4px; }
.picker-more .menu-day__body h3 a { color: var(--ink); text-decoration: none; }

/* ── Support, privacy and terms (ticket 169) ───────────────────── */

.legal { background: var(--page); }
.legal__wrap { max-width: 820px; padding-top: 24px; padding-bottom: 64px; }
.legal__article { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; }
.legal h1 { font-size: clamp(2rem, 7vw, 2.8rem); font-weight: 700; letter-spacing: -0.03em; }
.legal__meta { margin-top: 8px !important; font-size: 14px; color: var(--muted); }
.legal__body { margin-top: 32px; color: var(--text); max-width: 68ch; }
.legal__body section + section { margin-top: 32px; }
.legal__body h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; }
.legal__body p + p, .legal__body ul + p, .legal__body p + ul { margin-top: 12px; }
.legal__body ul { padding-left: 1.3em; margin: 0; }
.legal__body li + li { margin-top: 8px; }
.legal__body code { font-size: 0.9em; background: var(--sunken); padding: 1px 6px; border-radius: 6px; }
.legal__body .button { margin-top: 16px; }
.legal__note { margin-top: 16px !important; font-size: 14px; color: var(--muted); }
.legal__links { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.legal__links a { font-weight: 600; }
.legal__dot { color: var(--text-3); }
@media (min-width: 720px) {
  .legal__wrap { padding-top: 40px; padding-bottom: 88px; }
  .legal__article { padding: 48px 56px; }
}

/* Ticket 170: a holiday plan's amounts stay on screen; print and copy carry the light list (ticket 167). */
.tool-plan { margin: 0 0 24px; }
.tool-plan td { font-weight: 700; }
@media print { .tool-plan { display: none !important; } }

/* ── Ticket 168 (pilot: churrasco/BBQ): shorter and Erlist-like on phones ───────────────────────
   The answer first (summary card), the app band, the list folded by aisle with the app's pastel initial tiles,
   light rows, × only in edit mode, the counts as steppers, the FAQ folded. One primary button (ink) and one
   secondary (white, hairline). */
.tool-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 14px; cursor: pointer;
  font-family: var(--font-heading); font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  text-decoration: none; border: 1px solid transparent; background: none; color: var(--ink);
}
.tool-btn--primary { background: var(--ink); color: var(--paper) !important; }
.tool-btn--primary:hover { background: #2B2F36; }
.tool-btn--secondary { background: var(--paper); border-color: var(--border-strong); color: var(--ink) !important; }
.tool-btn--secondary:hover { background: var(--page); }
.tool-btn--quiet { min-height: 40px; padding: 8px 14px; font-size: 15px; background: var(--page); }
.tool-btn--quiet:hover { background: var(--sunken); }
.tool-btn--quiet[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.tool-page--v2 .button { background: var(--ink); color: var(--paper) !important; box-shadow: none; }
.tool-page--v2 .button:hover { box-shadow: 0 10px 24px rgba(20, 22, 26, 0.18); }

.tool-page--v2 .tool-hero h1 { margin-bottom: 10px; }
.tool-page--v2 .tool-calc { padding: 16px; border-radius: 20px; margin-bottom: 16px; }
.tool-page--v2 .tool-calc__options { gap: 4px; margin-top: 12px; font-size: 16px; }

/* The counts: − 10 + in one row of three, even at 390 px. */
.tool-calc__fields--steppers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.tool-stepper label, .tool-calc__fields--steppers .tool-field > span { font-size: 14px; }
.tool-stepper__row { display: flex; align-items: center; background: var(--paper); border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; }
.tool-calc__fields .tool-stepper__row input {
  flex: 1; min-width: 0; border: 0; border-radius: 0; padding: 10px 2px; text-align: center; font-weight: 700;
  font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.tool-stepper__row input::-webkit-inner-spin-button, .tool-stepper__row input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.tool-stepper__button {
  flex: none; width: 34px; min-height: 46px; align-items: center; justify-content: center; border: 0; cursor: pointer;
  background: none; color: var(--accent-deep); font: inherit; font-size: 22px; font-weight: 700; line-height: 1;
}
.tool-stepper__button:active { background: var(--sunken); }
/* With two counts and a units menu, the menu gets its own row on a phone so its words aren't cut. */
@media (max-width: 520px) {
  .tool-calc__fields--steppers:has(select) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-calc__fields--steppers:has(select) > .tool-field:has(select) { grid-column: 1 / -1; }
  .tool-calc__fields--steppers:has(select):not(:has(.tool-stepper + .tool-stepper)) > .tool-field:has(select) { grid-column: auto; }
}
.tool-page--v2 .tool-table-scroll + h2, .tool-page--v2 .tool-table-scroll + .tool-note + h2 { margin-top: 36px; }
.tool-calc__fields--steppers select { padding-left: 10px !important; padding-right: 4px !important; font-size: 15px !important; }
.tool-page--v2 .tool-table caption { text-align: left; }

/* A long set of choices (the dishes on the table) folds under one line. */
.tool-calc__more { margin-top: 12px; border-top: 1px solid var(--border); }
.tool-calc__more > summary { display: flex; align-items: center; padding: 12px 0 4px; cursor: pointer; list-style: none; font-weight: 700; }
.tool-calc__more > summary::-webkit-details-marker { display: none; }
.tool-calc__more > summary::after { content: "+"; margin-left: auto; font-size: 22px; line-height: 1; color: var(--text-3); }
.tool-calc__more[open] > summary::after { content: "\2212"; }
.tool-calc__more .tool-calc__kind { margin: 8px 0 0; }

/* The answer first. */
.tool-summary { background: var(--green50); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.tool-page .tool-summary__title { font-size: 1rem; margin: 0 0 10px; color: var(--green700); text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-body); font-weight: 700; }
.tool-summary__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.tool-summary__stat { background: var(--paper); border-radius: 14px; padding: 10px 12px; }
.tool-summary__stat--list { grid-column: 1 / -1; }
.tool-summary__stat dt { font-size: 13px; color: var(--text-2); font-weight: 600; }
.tool-summary__stat dd { margin: 0; font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.tool-summary__stat--list dd { font-family: var(--font-body); font-size: 15px; font-weight: 600; letter-spacing: 0; }
.tool-summary .tool-table-scroll { background: var(--paper); border-radius: 14px; padding: 4px 12px; margin: 0 0 12px; }
.tool-summary .tool-plan { margin: 0; }
.tool-summary .tool-plan caption { text-align: left; padding: 8px 0 4px; font-weight: 700; color: var(--green700); }
.tool-summary .tool-calc__total { margin: 0; font-size: 15px; color: var(--text-2); }

/* The converter's answer reads as the summary card. */
.tool-page--v2 .tool-converter__result { background: var(--green50); border-radius: 16px; padding: 8px 16px; color: var(--ink); }
.tool-page--v2 .tool-converter__result strong { color: var(--ink); }
.tool-page--v2 .tool-converter__equals { color: var(--green700); }

/* The scaler's result reads as the summary card. */
.tool-page--v2 .tool-scaler__result { background: var(--green50); }
.tool-page--v2 .tool-scaler__result h2 { color: var(--green700); }

/* The app band. */
.tool-band {
  display: grid; grid-template-columns: 40px 1fr; gap: 10px 12px; align-items: center;
  border: 1px solid var(--border); border-radius: 20px; padding: 14px 16px; margin-bottom: 24px;
}
.tool-list + .tool-band, .tool-list + * + .tool-band { margin-top: 20px; }
.tool-band__mark { width: 40px; height: 40px; border-radius: 10px; }
.tool-band p { margin: 0; font-size: 15px; line-height: 1.45; }
.tool-band .tool-btn { grid-column: 1 / -1; }

/* The list, folded by aisle: hairlines, not grey boxes. */
.tool-list--compact .tool-list__columns { display: block; columns: auto; border-top: 1px solid var(--line); }
.tool-list--compact .tool-list__aisle { background: none; border-radius: 0; padding: 0; margin: 0; border-bottom: 1px solid var(--line); }
.tool-list--compact details.tool-list__aisle > summary {
  display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; list-style: none;
}
.tool-list--compact details.tool-list__aisle > summary::-webkit-details-marker { display: none; }
.tool-list--compact details.tool-list__aisle > summary::after {
  content: ""; width: 9px; height: 9px; margin: 0 6px 4px auto; flex: none;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform .15s ease;
}
.tool-list--compact details.tool-list__aisle[open] > summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
.tool-list--compact .tool-list__aisle h2 { margin: 0 !important; font-size: 1.05rem !important; }
.tool-list--compact section.tool-list__aisle h2 { padding: 12px 0 4px; }
.tool-list__count { font-size: 14px; color: var(--text-2); white-space: nowrap; }
.tool-tile {
  flex: none; width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: 16px;
}
.tool-tile--0 { background: var(--green50); color: var(--green700); }
.tool-tile--1 { background: var(--amber50); color: var(--amber700); }
.tool-tile--2 { background: var(--blue50); color: var(--blue700); }
.tool-tile--3 { background: var(--lilac50); color: var(--lilac700); }
.tool-tile--4 { background: var(--red50); color: var(--red700); }
.tool-list--compact .tool-list__aisle ul { padding: 0 0 8px 44px; }
.tool-list--compact .tool-list__item { gap: 10px; border-top: 0; }
.tool-list--compact .tool-list__item label { padding: 7px 0; }
.tool-list--compact .tool-list__item label strong { font-weight: 600; color: var(--text-2); }
.tool-list__bar { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tool-list__bar--out { margin: 4px 0 8px; }
.tool-list--compact .tool-add { margin: 16px 0; }
.tool-list--compact .tool-print-note { margin: 0 0 8px; }

/* The FAQ, folded. */
.tool-faq { border-top: 1px solid var(--line); }
.tool-faq .section-title { margin-bottom: 8px; }
.tool-faq__item { border-bottom: 1px solid var(--line); }
.tool-faq__item > summary { display: flex; align-items: center; gap: 12px; padding: 14px 0; cursor: pointer; list-style: none; }
.tool-faq__item > summary::-webkit-details-marker { display: none; }
.tool-faq__item > summary::after { content: "+"; margin-left: auto; font-size: 22px; line-height: 1; color: var(--text-3); }
.tool-faq__item[open] > summary::after { content: "\2212"; }
.tool-faq__item h3, .tool-faq__item > summary h2 { margin: 0; font-size: 1.05rem; }
.tool-faq__item > p, .tool-faq__item > ul { margin-top: 0 !important; padding-bottom: 14px; }
.tool-faq .tool-sources { margin-top: 0; }
.tool-page--v2 .tool-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tool-table__unit { display: none; }
@media (max-width: 520px) {
  /* A table too wide for a phone stacks: one card per row, each value under its column's name (data-label). */
  .tool-page--v2 .tool-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tool-page--v2 .tool-table--stack, .tool-page--v2 .tool-table--stack tbody { display: block; }
  .tool-page--v2 .tool-table--stack caption { display: block; text-align: left; margin-bottom: 8px; }
  .tool-page--v2 .tool-table--stack tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tool-page--v2 .tool-table--stack tbody th { grid-column: 1 / -1; padding: 0; border: 0; font-family: var(--font-heading); font-size: 15px; }
  .tool-page--v2 .tool-table--stack td { padding: 0; border: 0; white-space: normal; font-size: 14px; }
  .tool-page--v2 .tool-table--stack td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--text-2); font-weight: 600; }
  .tool-page--v2 .tool-table--stack .tool-table__unit { display: inline; }
}
@media (max-width: 520px) {
  /* The people-count tables fit a 390 px phone; the scroller is only the fallback for a longer word. */
  .tool-page--v2 .tool-table { font-size: 13px; }
  .tool-page--v2 .tool-table th, .tool-page--v2 .tool-table td { padding: 8px 4px; overflow-wrap: break-word; }
  .tool-page--v2 .tool-table th:first-child, .tool-page--v2 .tool-table td:first-child { padding-left: 0; }
}

@media screen {
  .js .tool-list__bar.tool-js { display: flex !important; }
  .js .tool-stepper__button.tool-js { display: inline-flex !important; }
  .js .tool-list--compact:not(.is-editing) .tool-list__remove.tool-js { display: none !important; }
}
@media (min-width: 640px) {
  .tool-list--compact .tool-list__columns { columns: auto; }
  .tool-band { grid-template-columns: 40px 1fr auto; }
  .tool-band .tool-btn { grid-column: auto; }
}
@media (min-width: 860px) {
  .tool-page--v2 .wrap { max-width: 800px; }
}
@media print {
  .tool-summary, .tool-band, .tool-faq, .tool-list__bar, .tool-tile, .tool-list__count { display: none !important; }
  .tool-list--compact .tool-list__columns { columns: 2; border: 0; }
  .tool-list--compact .tool-list__aisle { border: 0; margin-bottom: 8pt; }
  .tool-list--compact details.tool-list__aisle > summary { padding: 0; display: block; }
  .tool-list--compact details.tool-list__aisle > summary::after { display: none; }
  .tool-list--compact details.tool-list__aisle::details-content { content-visibility: visible; display: block; }
  .tool-list--compact .tool-list__aisle ul { padding: 0; }
}

/* Ticket 156: the El Niño explainer, room between its regions and steps. */
.el-nino .tool-tips h3 { margin-top: 22px; }
.el-nino .tool-tips .wrap > .section-title:not(:first-child), .el-nino-regions { margin-top: 40px; }
.el-nino-status .points { margin-bottom: 16px; }
