/*
 * Cheffify static marketing pages (/compare.html and /compare/<slug>.html).
 * Plain CSS, no build step: these files are copied verbatim from public/ into dist/
 * and served by Caddy as real files (try_files only matches files, never a folder's
 * index.html, so every page is a flat .html file). Colours mirror the app's `warm` palette
 * in tailwind.config.ts; fonts mirror src/index.css.
 */

:root {
  --cream: #fff8f0;
  --cream-dark: #fff1e0;
  --yellow: #fac80a;
  --yellow-deep: #f0b800;
  --yellow-light: #fff3c4;
  --yellow-pale: #fffbeb;
  --brown-dark: #2b1a01;
  --brown-mid: #6b4106;
  --brown-warm: #945f11;
  --orange: #e8820c;
  --green: #3f6e4d;
  --green-light: #e8f5e9;
  --red: #a8321e;
  --red-light: #fdecea;

  --bg: var(--cream);
  --surface: #ffffff;
  --surface-alt: var(--cream-dark);
  --text: var(--brown-dark);
  --text-muted: var(--brown-mid);
  --text-soft: var(--brown-warm);
  --line: #ecdcc6;
  --ink: var(--brown-dark);
  --hero-bg: var(--yellow);
  --hero-text: var(--brown-dark);
  --hero-muted: #4a2e03;
  --accent: var(--yellow);
  --accent-ink: var(--brown-dark);
  --link: #8a4b00;
  --yes: var(--green);
  --yes-bg: var(--green-light);
  --no: var(--red);
  --no-bg: var(--red-light);
  --meh: #7a5a00;
  --meh-bg: var(--yellow-light);
  --highlight-col: var(--yellow-pale);
  --shadow: 4px 4px 0 rgba(43, 26, 1, 0.1);
  --shadow-hover: 6px 7px 0 rgba(43, 26, 1, 0.14);
  --band-bg: var(--brown-dark);
  --band-text: var(--cream);
  --band-heading: var(--yellow);
  --btn-bg: var(--brown-dark);
  --btn-text: var(--yellow);
  --btn-border: var(--brown-dark);
  --accent-text: #b45309;

  --radius: 20px;
  --radius-sm: 12px;
  --border: 2.5px solid var(--ink);
  --font-display: "Fjalla One", "Arial Narrow", Impact, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1100px;
  --prose: 70ch;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17100a;
    --surface: #221810;
    --surface-alt: #2b1f13;
    --text: #fff3e3;
    --text-muted: #e5c9a1;
    --text-soft: #d4b081;
    --line: #4a3824;
    --ink: #f5dfbf;
    --hero-bg: #2b1a01;
    --hero-text: #fff3e3;
    --hero-muted: #e5c9a1;
    --accent: var(--yellow);
    --accent-ink: var(--brown-dark);
    --link: #ffd54a;
    --yes: #8fd19e;
    --yes-bg: #1e3324;
    --no: #ff9b85;
    --no-bg: #3a1c15;
    --meh: #ffd54a;
    --meh-bg: #3a2e0c;
    --highlight-col: #2e2410;
    --shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
    --shadow-hover: 6px 7px 0 rgba(0, 0, 0, 0.55);
    --band-bg: #0f0a05;
    --btn-bg: var(--yellow);
    --btn-text: var(--brown-dark);
    --btn-border: var(--yellow);
    --accent-text: #f5a524;
  }
}

:root[data-theme="dark"] {
  --bg: #17100a;
  --surface: #221810;
  --surface-alt: #2b1f13;
  --text: #fff3e3;
  --text-muted: #e5c9a1;
  --text-soft: #d4b081;
  --line: #4a3824;
  --ink: #f5dfbf;
  --hero-bg: #2b1a01;
  --hero-text: #fff3e3;
  --hero-muted: #e5c9a1;
  --link: #ffd54a;
  --yes: #8fd19e;
  --yes-bg: #1e3324;
  --no: #ff9b85;
  --no-bg: #3a1c15;
  --meh: #ffd54a;
  --meh-bg: #3a2e0c;
  --highlight-col: #2e2410;
  --shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
  --shadow-hover: 6px 7px 0 rgba(0, 0, 0, 0.55);
  --band-bg: #0f0a05;
  --btn-bg: var(--yellow);
  --btn-text: var(--brown-dark);
  --btn-border: var(--yellow);
  --accent-text: #f5a524;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

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

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.12;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 6.2vw, 3.9rem);
}

h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.25rem);
}

h3 {
  font-size: 1.3rem;
  letter-spacing: 0.04em;
}

p {
  margin: 0 0 1em;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--brown-dark);
  color: var(--yellow);
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .wrap {
    padding: 0 28px;
  }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
}

.brand img {
  width: 40px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a.nav-link {
  display: none;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a.nav-link:hover {
  background: var(--surface-alt);
  color: var(--text);
}

@media (min-width: 720px) {
  .site-nav a.nav-link {
    display: inline-block;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2.5px solid var(--btn-border);
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 2px 2px 0 rgba(43, 26, 1, 0.12);
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
}

.btn-accent {
  background: var(--yellow);
  color: var(--brown-dark);
  border-color: var(--brown-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--hero-text);
  border-color: currentColor;
}

.btn-sm {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.92rem;
  border-width: 2px;
  border-radius: 12px;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: 40px 0 56px;
  border-bottom: var(--border);
}

.hero::before {
  /* subtle halftone dots, comic-print feel */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(43, 26, 1, 0.09) 1.2px, transparent 1.3px);
  background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(115deg, transparent 35%, #000 100%);
  mask-image: linear-gradient(115deg, transparent 35%, #000 100%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  gap: 28px;
  align-items: center;
}

@media (min-width: 860px) {
  .hero {
    padding: 64px 0 76px;
  }

  .hero .wrap {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 48px;
  }
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--hero-muted);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  opacity: 0.6;
}

.breadcrumbs a {
  color: inherit;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px 12px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  margin-bottom: 0.4em;
}

.hero .lede {
  max-width: 60ch;
  font-size: clamp(1.08rem, 2.2vw, 1.25rem);
  line-height: 1.6;
  color: var(--hero-muted);
}

.hero .lede strong {
  color: var(--hero-text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-note {
  margin: 14px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--hero-muted);
}

.hero-art {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
}

.bubble {
  position: relative;
  max-width: 340px;
  padding: 16px 20px;
  background: var(--surface);
  color: var(--text);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-weight: 500;
  line-height: 1.5;
}

.bubble::after {
  content: "";
  position: absolute;
  bottom: -11px;
  left: 50%;
  width: 18px;
  height: 18px;
  background: var(--surface);
  border-right: var(--border);
  border-bottom: var(--border);
  transform: translateX(-50%) rotate(45deg);
}

.mascot {
  width: 116px;
  animation: float 4s ease-in-out infinite;
}

@media (min-width: 860px) {
  .mascot {
    width: 210px;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

/* ---------- Sections ---------- */

main {
  display: block;
}

.section {
  padding: 56px 0;
}

/* two plain (or two tinted) sections in a row read as one block */
.section:not(.section-alt) + .section:not(.section-alt) {
  padding-top: 8px;
}

.section-alt + .section-alt {
  padding-top: 8px;
  border-top: 0;
}

.section-alt {
  background: var(--surface-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: var(--prose);
  margin-bottom: 28px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.08rem;
}

.kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.prose {
  max-width: var(--prose);
}

.prose h2 {
  margin-top: 1.6em;
}

.prose h2:first-child,
.prose h3:first-child,
.prose .kicker + h2 {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.5em;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
  margin: 0 0 1.2em;
}

.prose li {
  margin-bottom: 0.45em;
}

.prose li::marker {
  color: var(--orange);
  font-weight: 700;
}

.updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.card h3 {
  margin-bottom: 0.5em;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.grid-2 {
  display: grid;
  gap: 18px;
}

@media (min-width: 760px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
}

.grid-3 {
  display: grid;
  gap: 18px;
}

@media (min-width: 760px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.verdict-card {
  position: relative;
  padding-top: 26px;
}

.verdict-card .tag {
  position: absolute;
  top: -15px;
  left: 18px;
  padding: 4px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.verdict-card.is-us {
  background: var(--yellow-pale);
}

.verdict-card.is-us .tag {
  background: var(--yellow);
  color: var(--brown-dark);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .verdict-card.is-us {
    background: #2a200c;
  }
}

:root[data-theme="dark"] .verdict-card.is-us {
  background: #2a200c;
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ticks li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--yes-bg);
}

.ticks li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: calc(0.3em + 4px);
  width: 5px;
  height: 9px;
  border: solid var(--yes);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* ---------- Comparison table ---------- */

.table-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.97rem;
  line-height: 1.5;
}

.compare-table caption {
  padding: 14px 18px;
  text-align: left;
  font-size: 0.88rem;
  color: var(--text-muted);
  caption-side: bottom;
  border-top: 1px solid var(--line);
}

.compare-table th,
.compare-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  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 {
  position: sticky;
  top: 0;
  background: var(--surface-alt);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--ink);
}

.compare-table tbody th {
  width: 24%;
  font-weight: 700;
  color: var(--text);
}

.compare-table .col-us {
  background: var(--highlight-col);
}

.compare-table thead .col-us {
  background: var(--yellow);
  color: var(--brown-dark);
}

.compare-table tr.row-us th,
.compare-table tr.row-us td {
  background: var(--highlight-col);
}

.compare-table td small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pill-yes {
  background: var(--yes-bg);
  color: var(--yes);
}

.pill-no {
  background: var(--no-bg);
  color: var(--no);
}

.pill-meh {
  background: var(--meh-bg);
  color: var(--meh);
}

/* Narrow screens: each row becomes a card with labelled cells, so the
   Cheffify column never hides behind a sideways scroll. */
@media (max-width: 639px) {
  .table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .compare-table {
    min-width: 0;
    font-size: 0.93rem;
  }

  .compare-table,
  .compare-table tbody,
  .compare-table caption {
    display: block;
  }

  .compare-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .compare-table tbody {
    display: grid;
    gap: 12px;
  }

  .compare-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
  }

  .compare-table.stack-1 tr {
    grid-template-columns: 1fr;
  }

  .compare-table tbody th,
  .compare-table td,
  .compare-table tbody tr:last-child th,
  .compare-table tbody tr:last-child td {
    width: auto;
    padding: 10px 12px 12px;
    border-bottom: 0;
  }

  .compare-table tbody th {
    grid-column: 1 / -1;
    padding: 10px 12px;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .compare-table td + td {
    border-left: 1px solid var(--line);
  }

  .compare-table.stack-1 td + td {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .compare-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .compare-table td.col-us::before {
    color: var(--brown-warm);
  }

  .compare-table caption {
    margin-bottom: 12px;
    padding: 0 2px;
    border-top: 0;
    font-size: 0.85rem;
  }
}

/* ---------- Steps (how it works) ---------- */

.steps {
  counter-reset: step;
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 24px 22px 22px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border: 2.5px solid var(--brown-dark);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--brown-dark);
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.steps h3 {
  margin-bottom: 0.4em;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
}

/* ---------- Example result (mock recipe card) ---------- */

.example-wrap {
  margin-top: 32px;
}

.result-card {
  max-width: 560px;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.result-card header {
  padding: 16px 20px;
  background: var(--yellow);
  color: var(--brown-dark);
  border-bottom: var(--border);
}

.result-card header h3 {
  margin: 0;
}

.result-card header p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.result-card .rows {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
}

.result-card .label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 4px 10px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface-alt);
  font-size: 0.88rem;
  font-weight: 600;
}

.chip.used {
  border-color: var(--yes);
  background: var(--yes-bg);
  color: var(--yes);
}

.chip.skipped {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.chip.buy {
  border-color: var(--accent-text);
  background: transparent;
  color: var(--accent-text);
}

.result-note {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* ---------- Callouts ---------- */

.callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 0 0 24px;
  padding: 16px 18px;
  border: 2px dashed var(--brown-warm);
  border-radius: var(--radius-sm);
  background: var(--yellow-pale);
  color: var(--text);
  font-size: 0.97rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .callout {
    background: #241a0b;
    border-color: #8a6a3a;
  }
}

:root[data-theme="dark"] .callout {
  background: #241a0b;
  border-color: #8a6a3a;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--brown-dark);
  font-weight: 800;
}

/* ---------- Ranked list (best apps) ---------- */

.app-list {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: app;
}

.app-item {
  counter-increment: app;
  display: grid;
  gap: 6px 18px;
  grid-template-columns: auto 1fr;
}

.app-item::before {
  content: counter(app);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: var(--surface-alt);
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.app-item.is-us::before {
  background: var(--yellow);
  color: var(--brown-dark);
  border-color: var(--brown-dark);
}

.app-item h3 {
  margin: 0;
  align-self: center;
}

.app-item .best-for {
  display: block;
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent-text);
}

.app-item .card {
  grid-column: 1 / -1;
}

@media (min-width: 760px) {
  .app-item .card {
    grid-column: 2;
  }
}

.facts {
  display: grid;
  gap: 4px 16px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  font-size: 0.93rem;
}

@media (min-width: 560px) {
  .facts {
    grid-template-columns: max-content 1fr;
  }
}

.facts dt {
  font-weight: 700;
}

.facts dd {
  margin: 0 0 6px;
  color: var(--text-muted);
}

@media (min-width: 560px) {
  .facts dd {
    margin: 0;
  }
}

.pros-cons {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .pros-cons {
    grid-template-columns: 1fr 1fr;
  }
}

.pros-cons h4 {
  margin: 0 0 6px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pros-cons .good h4 {
  color: var(--yes);
}

.pros-cons .bad h4 {
  color: var(--no);
}

.pros-cons ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.pros-cons li {
  position: relative;
  margin-bottom: 6px;
  padding-left: 22px;
}

.pros-cons li::before {
  position: absolute;
  left: 0;
  top: 0;
  width: 16px;
  font-weight: 800;
  text-align: center;
}

.pros-cons .good li::before {
  content: "+";
  color: var(--yes);
}

.pros-cons .bad li::before {
  content: "–";
  color: var(--no);
}

.app-link {
  margin: 14px 0 0;
  font-weight: 700;
}

/* ---------- Formula table (explainer) ---------- */

.formula-grid {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .formula-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .formula-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.formula {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.formula:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.formula .have {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.formula .make {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.formula .why {
  margin: 0;
  font-size: 0.92rem;
}

.prompt-wrap {
  position: relative;
  margin: 0 0 18px;
}

.prompt-wrap .prompt-box {
  margin: 0;
  padding-top: 52px;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 34px;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--yellow);
  color: var(--brown-dark);
  font: 700 0.85rem/1 var(--font-body);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.copy-btn:hover {
  transform: translateY(-1px);
}

.copy-btn[data-copied] {
  background: var(--yes-bg);
  color: var(--yes);
  border-color: var(--yes);
}

.prompt-box {
  position: relative;
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq details {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease;
}

.faq details[open] {
  box-shadow: var(--shadow-hover);
}

.faq summary {
  position: relative;
  display: block;
  padding: 16px 52px 16px 18px;
  font-weight: 700;
  font-size: 1.03rem;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  border-radius: 50%;
  background: var(--yellow)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b1a01' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 7v10M7 12h10'/%3E%3C/svg%3E")
    center / 24px 24px no-repeat;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq .answer {
  padding: 0 18px 16px;
  color: var(--text-muted);
}

.faq .answer p:last-child {
  margin-bottom: 0;
}

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  overflow: hidden;
  padding: 56px 0;
  background: var(--band-bg);
  color: var(--band-text);
}

.cta-band .wrap {
  display: grid;
  gap: 24px;
  align-items: center;
}

@media (min-width: 860px) {
  .cta-band .wrap {
    grid-template-columns: 1fr auto;
  }
}

.cta-band h2 {
  color: var(--band-heading);
  margin-bottom: 0.35em;
}

.cta-band p {
  max-width: 56ch;
  margin: 0;
  color: #f1dcc0;
}

.cta-band .btn {
  border-color: var(--yellow);
}

.cta-band .cta-side {
  display: flex;
  align-items: center;
  gap: 18px;
}

.cta-band .cta-side img {
  width: 92px;
  flex: none;
}

/* ---------- Related & sources ---------- */

.related {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .related {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .related {
    grid-template-columns: repeat(3, 1fr);
  }
}

.related a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 18px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.related a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.related .r-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.related .r-desc {
  font-size: 0.93rem;
  color: var(--text-muted);
}

.related .r-go {
  margin-top: auto;
  padding-top: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--link);
}

.sources {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.sources h2 {
  font-size: 1.4rem;
}

.sources ol {
  margin: 0;
  padding-left: 1.4em;
}

.sources li {
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.disclosure {
  max-width: var(--prose);
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
  background: var(--brown-dark);
  color: #e9cfa8;
  font-size: 0.93rem;
}

.site-footer .wrap {
  display: grid;
  gap: 24px;
}

@media (min-width: 760px) {
  .site-footer .wrap {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer .brand {
  color: var(--yellow);
}

.footer-tagline {
  max-width: 36ch;
  margin: 12px 0 0;
}

.site-footer h2 {
  margin-bottom: 10px;
  color: var(--yellow);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin-bottom: 6px;
}

.site-footer a {
  color: #e9cfa8;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--yellow);
  text-decoration: underline;
}

.site-footer .fineprint {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid rgba(233, 207, 168, 0.2);
  font-size: 0.84rem;
  color: #c7a87c;
}

/* ---------- Utilities ---------- */

.mt-0 {
  margin-top: 0;
}

.center {
  text-align: center;
}

.muted {
  color: var(--text-muted);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .site-header,
  .cta-band,
  .hero-art,
  .site-footer {
    display: none;
  }

  .hero {
    background: none;
    border: 0;
  }
}
