/* New look for the static content pages: guides (how-to-*, why-*), /vs/*,
   FAQ, About, research, legal and 404. Loaded LAST in <head> (the head-site
   partial), after each page's own <style>, so it restyles the chrome those
   pages share without touching their markup or testids.

   Rules: docs/brand/README.md. Colors and radii come from
   tokens.generated.css (linked just before this file). Cream page, oat
   surfaces, ink words, ONE green button per screenful, honey only as the
   italic voice, pills for controls, no uppercase labels, nothing under 13px.

   The home page (index.html) and the recipe pages (recipes.css) are styled
   separately. */

/* --- Colors ---------------------------------------------------------------
   Each page's own <style> names its colors (--bg, --text-primary...). Point
   them at the generated tokens, so the page follows the new look by day and
   the warm night palette when it opts in with <html class="can-dark">.
   (:root.can-dark outranks the page's plain :root.) */
:root.can-dark {
  --primary: var(--prepful-primary);
  --primary-dark: var(--prepful-primary-dark);
  --bg: var(--prepful-bg);
  --bg-secondary: var(--prepful-oat);
  --bg-tertiary: var(--prepful-bg-tertiary);
  --surface: var(--prepful-surface);
  --text-primary: var(--prepful-text-primary);
  --text-secondary: var(--prepful-text-secondary);
  --text-tertiary: var(--prepful-text-tertiary);
  --border: var(--prepful-line);
  --accent: var(--prepful-voice);
}
body {
  background: var(--prepful-bg);
  color: var(--prepful-text-primary);
}

/* --- Chrome ------------------------------------------------------------- */
header {
  background: color-mix(in srgb, var(--prepful-bg) 92%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--prepful-line);
}
.logo {
  font-size: 20px;
  letter-spacing: -0.01em;
}
.logo img {
  border-radius: 9px;
}
.header-nav__link,
.header-signin {
  font-size: 15px;
  color: var(--prepful-text-secondary);
}
.header-nav__link:hover,
.header-signin:hover {
  color: var(--prepful-ink);
}
.header-nav__link[aria-current='page'] {
  color: var(--prepful-ink);
  border-bottom-color: var(--prepful-ink);
}
/* The header button is an outlined ink pill: green belongs to the page's
   own main action. */
.header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  background: transparent;
  color: var(--prepful-ink);
  box-shadow: inset 0 0 0 1.5px var(--prepful-line-strong);
  border-radius: var(--prepful-radius-pill);
  font-size: 15px;
  font-weight: 700;
}
.header-cta:hover {
  background: var(--prepful-oat);
}
.header-cta:focus-visible,
.header-nav__link:focus-visible,
.logo:focus-visible {
  outline: 2px solid var(--prepful-primary);
  outline-offset: 3px;
}

/* --- Page intro --------------------------------------------------------- */
/* The kicker above a title is the italic voice line. */
.page-kicker,
.about-kicker,
.pillar-eyebrow,
.eyebrow {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0;
  color: var(--prepful-voice);
}
.page-intro h1,
.about-intro h1,
h1 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  font-size: clamp(34px, 5.2vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.page-intro .lede,
.lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--prepful-text-secondary);
  text-wrap: pretty;
}
.page-updated {
  font-size: 14px;
  color: var(--prepful-text-tertiary);
}

/* --- Article ------------------------------------------------------------ */
.article h2,
.toc h2 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-wrap: balance;
}
.toc h2 {
  font-size: 18px;
}
.article p,
.article li p,
.native-list li p {
  font-size: 17px;
}
.article a {
  color: var(--prepful-ink);
  text-decoration-color: var(--prepful-line-strong);
  text-underline-offset: 3px;
}
.article a:hover {
  text-decoration-color: var(--prepful-ink);
}
/* Numbered steps: an oat tile with an ink number (the app's menu tile). */
.article ol li::before {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--prepful-oat);
  color: var(--prepful-ink);
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  font-size: 15px;
}
.article .troubleshoot,
.article .tip,
.source-note,
.compare-table-wrap,
.pillar-card,
.company-card,
.faq-item {
  border-radius: var(--prepful-radius-card);
}
.article .troubleshoot,
.article .tip {
  background: var(--prepful-oat);
}
.howto-screenshot {
  border-radius: var(--prepful-radius-card);
  box-shadow: 0 18px 40px -18px rgba(44, 41, 37, 0.35);
}
.compare-table th,
.compare-table td {
  border-bottom-color: var(--prepful-line);
}
.compare-table {
  font-size: 15px;
}
.pillar-icon {
  border-radius: 14px;
  background: var(--prepful-oat);
  color: var(--prepful-ink);
}

/* --- Closing call to action: the ink band ------------------------------- */
.cta-section {
  background: var(--prepful-band);
  color: var(--prepful-on-band);
  box-shadow: inset 0 0 0 1px var(--prepful-card-edge);
  max-width: 1100px;
  margin: 24px auto 72px;
  border-radius: 28px;
  padding: 64px 40px;
}
@media (max-width: 720px) {
  .cta-section {
    margin: 16px 16px 48px;
    border-radius: var(--prepful-radius-hero);
    padding: 44px 24px;
  }
}
.cta-section .section-title {
  color: var(--prepful-on-band);
  font-size: clamp(30px, 4vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
.cta-section .section-subtitle,
.cta-section .cta-note {
  color: color-mix(in srgb, var(--prepful-on-band) 80%, transparent);
}
.cta-section a:not([class]) {
  color: var(--prepful-on-band);
}
/* The band's one main action: the green pill. */
.btn-primary-light,
.btn-primary {
  height: 52px;
  padding: 0 28px;
  background: var(--prepful-primary);
  color: var(--prepful-on-primary);
  border-radius: var(--prepful-radius-pill);
  box-shadow: none;
  font-size: 17px;
}
.btn-primary-light:hover,
.btn-primary:hover {
  background: var(--prepful-primary-dark);
}
.btn-primary-light:focus-visible,
.btn-primary:focus-visible {
  outline: 2px solid var(--prepful-on-band);
  outline-offset: 3px;
}

/* --- Get-the-app dialog --------------------------------------------------- */
.get-app-dialog {
  border-radius: var(--prepful-radius-hero);
  background: var(--prepful-bg);
}
.get-app-dialog__title {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.get-app-dialog__close {
  width: 44px;
  height: 44px;
  background: var(--prepful-oat);
  color: var(--prepful-ink);
}
.get-app-dialog__qr {
  border-radius: var(--prepful-radius-card);
}
.get-app-dialog__web-link {
  color: var(--prepful-ink);
  font-weight: 700;
}

/* --- Footer --------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--prepful-line);
}
.footer-col__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--prepful-text-secondary);
}
.footer-col a {
  color: var(--prepful-text-secondary);
}
.footer-col a:hover,
.footer-bottom a:hover {
  color: var(--prepful-ink);
}
.footer-bottom a {
  color: var(--prepful-text-secondary);
}

/* --- Text is never green ---------------------------------------------------
   Green is the one main action; words, links and markers are ink. */
a {
  color: var(--prepful-ink);
}
main a:not([class]),
.page-intro a:not([class]),
.faq-item a:not([class]),
.compare-table a:not([class]) {
  text-decoration: underline;
  text-decoration-color: var(--prepful-line-strong);
  text-underline-offset: 3px;
}
main a:not([class]):hover {
  text-decoration-color: var(--prepful-ink);
}
.header-nav__link--active {
  color: var(--prepful-ink);
  border-bottom-color: var(--prepful-ink);
}
.faq-item summary::after {
  color: var(--prepful-ink);
}
.company-links a:hover,
.get-app-dialog__web-link:hover,
.get-app-dialog__web-link:focus-visible {
  color: var(--prepful-ink);
}
.pillar-icon {
  color: var(--prepful-ink);
}
/* Prepful's own column on /vs pages reads as ink, a touch heavier. */
.compare-table td:nth-child(2) {
  color: var(--prepful-ink);
  font-weight: 600;
}

/* --- Guides hub (/guides) -------------------------------------------------- */
.guides { max-width: 1260px; margin: 0 auto; padding: 8px 40px 32px; display: grid; gap: 56px; }
.page-intro.guides-intro { max-width: 1260px; padding-inline: 40px; }
.guides-intro .lede { max-width: 44em; }
.guide-group { display: grid; gap: 18px; }
.guide-group__head { display: flex; gap: 14px; align-items: flex-start; }
.guide-group__icon { width: 48px; height: 48px; border-radius: 14px; background: var(--prepful-oat); color: var(--prepful-ink); display: grid; place-items: center; flex: none; }
.guide-group h2 { font-family: 'Lora', Georgia, serif; font-weight: 600; font-size: 26px; letter-spacing: -0.015em; line-height: 1.2; margin: 0; color: var(--prepful-ink); }
.guide-group__head p { margin: 4px 0 0; font-size: 16px; color: var(--prepful-text-tertiary); }
.guides-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.guide-group { scroll-margin-top: 96px; }
.guide-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.guide-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guide-card { position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px 52px 20px 20px; border-radius: var(--prepful-radius-card); background: var(--prepful-oat); box-shadow: inset 0 0 0 1px var(--prepful-card-edge); color: var(--prepful-ink); text-decoration: none; transition: background 0.15s, transform 0.15s; }
.guide-card:hover { background: var(--prepful-bg-tertiary); transform: translateY(-2px); }
.guide-card:focus-visible { outline: 2px solid var(--prepful-primary); outline-offset: 3px; }
.guide-card__logo { width: 40px; height: 40px; border-radius: 12px; background: var(--prepful-tile); display: grid; place-items: center; margin-bottom: 8px; color: var(--prepful-ink); }
.guide-card__logo svg { width: 22px; height: 22px; }
.guide-card__title { font-family: 'Lora', Georgia, serif; font-weight: 600; font-size: 19px; line-height: 1.25; text-wrap: balance; }
.guide-card__line { font-size: 15px; line-height: 1.45; color: var(--prepful-text-tertiary); }
.guide-card__go { position: absolute; right: 18px; top: 22px; width: 20px; height: 20px; color: var(--prepful-text-tertiary); transition: transform 0.15s, color 0.15s; }
.guide-card:hover .guide-card__go { color: var(--prepful-ink); transform: translateX(3px); }
.guide-card__logo ~ .guide-card__go, .guide-card:has(.guide-card__logo) .guide-card__go { top: 30px; }
@media (max-width: 960px) { .guide-grid, .guide-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .guide-grid, .guide-grid--3 { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .guide-card { padding: 16px 48px 16px 16px; }
  .guide-card__title { font-size: 18px; }
  .guides-jump { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
}
@media (prefers-reduced-motion: reduce) { .guide-card, .guide-card__go { transition: none; } }
.guide-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.guide-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: var(--prepful-radius-pill); box-shadow: inset 0 0 0 1.5px var(--prepful-line-strong); color: var(--prepful-ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.guide-chip:hover { background: var(--prepful-oat); }
@media (max-width: 720px) {
  .guides { padding: 0 16px 24px; gap: 40px; }
  .guide-group h2 { font-size: 23px; }
}

/* "More guides like this" at the end of each guide (build-related-guides.mjs). */
.related-guides { max-width: 700px; margin: 56px auto 8px; padding: 0 24px; display: grid; gap: 16px; }
.related-guides__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.related-guides h2 { margin: 0; font-family: 'Lora', Georgia, serif; font-weight: 600; font-size: 24px; letter-spacing: -0.015em; color: var(--prepful-ink); }
.related-guides__head a { font-weight: 700; font-size: 16px; color: var(--prepful-ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.related-guides__grid, .related-guides .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 600px) { .related-guides { padding: 0 16px; } .related-guides__grid, .related-guides .guide-grid { grid-template-columns: minmax(0, 1fr); } }

/* Breadcrumb above each guide's title: "Guides › How to". The link back to
   the hub is ink, the kind of guide stays the italic voice. */
.page-crumb { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.page-crumb a { font-family: 'Nunito', system-ui, sans-serif; font-style: normal; font-weight: 700; font-size: 16px; color: var(--prepful-ink); text-decoration: underline; text-decoration-color: var(--prepful-line-strong); text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; }
.page-crumb a:hover { text-decoration-color: var(--prepful-ink); }
.page-crumb__sep { color: var(--prepful-text-tertiary); font-style: normal; }

/* Phones: the logo already goes home, so drop "Home" to fit Guides. */
@media (max-width: 640px) {
  .header-nav a[data-cta="nav-faq"] { display: none; }
}
@media (max-width: 540px) {
  .header-nav a[data-cta="nav-home"] { display: none; }
  .header-cta { white-space: nowrap; }
}
