/* ═════════════════════════════════════════════════════════════════
   plaza.css — the Plaza design system (shell + migrated pages)

   Design source: the iteration 4 mock (docs/specs/archive/2026/09/plaza-shell-recipe-page/spec_plaza-shell-recipe-page.spec.2026-09-28.md).
   Loaded on EVERY page, after Materialize when a page still uses it.

   THE pz- PREFIX RULE
   Every Plaza class starts with `pz-`. Materialize already owns generic
   names such as .btn, .toast, .tabs, .chip, .section, `nav` and native
   checkboxes, and pages that are not migrated yet still load it. A prefix
   keeps the two systems from styling each other's markup.

   Colours, fonts and sizes are CSS custom properties ("design tokens") on
   :root, so a component never hard-codes a colour and dark mode is just a
   second set of values:
   https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties

   THEMES
   - Light values on :root.
   - Dark values under prefers-color-scheme, guarded by
     :root:not([data-theme="light"]) so pages that still load Materialize
     (they set data-theme="light" on <html>) always stay light.
   - The same dark values again under :root[data-theme="dark"] to force dark.

   Breakpoints: 600 px (mobile, as in style.css), 860 px (header), 1100 px
   (recipe layout). Docs: docs/06-development/frontend.md
   ═════════════════════════════════════════════════════════════════ */

/* ── Tokens ───────────────────────────────────────────────────── */
/* Euskal Herria: the green of the monte, baserri white, the golden crust of
   the pastel vasco, iron for text; a kitchen-card paper with ballpoint ink,
   a darker gold for numerals, and status colours. */
:root {
  color-scheme: light;
  --ground: #F8F9F4;
  --paper: #FFFFFF;
  --ink: #17201A;
  --ink-soft: #56615A;
  --rule: #DCE2D7;
  --monte: #1F5A3A;
  --monte-deep: #143C27;
  --ridge-back: #AFCDAB;
  --ridge-mid: #6F9F75;
  --meadow: #E6F0DA;
  --dish: #1F5A3A;
  --gold: #D4952F;
  --gold-light: #F2C66D;
  --gold-text: #93600F;
  --gold-wash: #FBEFD3;
  --on-monte: #FFFFFF;
  --on-monte-soft: rgb(255 255 255 / 0.8);
  --on-monte-rule: rgb(255 255 255 / 0.22);
  --link: #1F5A3A;
  --focus: #1F5A3A;
  --btn: #1F5A3A;
  --btn-hover: #143C27;
  --shadow: rgb(23 32 26 / 0.4);

  /* A kitchen card is a physical object: same colours in both themes */
  --note-paper: #FBF8EC;
  --note-ink: #2B3F78;
  --note-rule: #CAD6EA;

  /* A terminal is a dark screen; the tokens live here so a page never
     hard-codes the panel colour and dark mode just re-tints them. */
  --terminal-bg: #0F1A14;
  --terminal-ink: #D9E6DD;
  --terminal-ink-soft: #8AA397;
  --terminal-prompt: #6FD08C;

  --good: #2E7A47;
  --good-bg: #E2F1E6;
  --warn: #8A5A00;
  --warn-bg: #FBEFD6;
  --crit: #B42318;
  --crit-bg: #FBE4E1;

  --display: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --sans: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --hand: "Alegreya", "Iowan Old Style", Georgia, serif;

  /* Type scale: 13 14 16 17 21 24 36, display 44 to 76.
     In px, not rem: Materialize sets <html> to 14–15 px, so rem values would
     make the header smaller on pages that still load it (req. 14). */
  --t-xs: 13px;
  --t-sm: 14px;
  --t-ui: 16px;
  --t-base: 17px;
  --t-md: 21px;
  --t-lg: 24px;
  --t-xl: 36px;
  --t-2xl: clamp(44px, 27.2px + 3.9vw, 76px);

  --max: 72rem;
  --gutter: 20px;
  --header-h: 67px;   /* sticky offset for bars under the header */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0F1411;
    --paper: #161D18;
    --ink: #E9EDE6;
    --ink-soft: #A3AEA5;
    --rule: #28322B;
    --monte: #184330;
    --monte-deep: #0D2519;
    --ridge-back: #1B3226;
    --ridge-mid: #1A3A2A;
    --meadow: #213D31;
    --dish: #CDE6BE;
    --gold: #E0A73F;
    --gold-light: #F2C66D;
    --gold-text: #F2C66D;
    --gold-wash: #3A2F17;
    --link: #A5D4AC;
    --focus: #F2C66D;
    --btn: #2E7A4E;
    --btn-hover: #378C5A;
    --shadow: rgb(0 0 0 / 0.7);
    --good: #8AD29F;
    --good-bg: #1C3325;
    --warn: #EDB95C;
    --warn-bg: #372B12;
    --crit: #F4A095;
    --crit-bg: #3E1E1A;
    --terminal-bg: #090E0B;
    --terminal-ink: #C8D8CE;
    --terminal-ink-soft: #6E8478;
    --terminal-prompt: #57BC7F;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0F1411;
  --paper: #161D18;
  --ink: #E9EDE6;
  --ink-soft: #A3AEA5;
  --rule: #28322B;
  --monte: #184330;
  --monte-deep: #0D2519;
  --ridge-back: #1B3226;
  --ridge-mid: #1A3A2A;
  --meadow: #213D31;
  --dish: #CDE6BE;
  --gold: #E0A73F;
  --gold-light: #F2C66D;
  --gold-text: #F2C66D;
  --gold-wash: #3A2F17;
  --link: #A5D4AC;
  --focus: #F2C66D;
  --btn: #2E7A4E;
  --btn-hover: #378C5A;
  --shadow: rgb(0 0 0 / 0.7);
  --good: #8AD29F;
  --good-bg: #1C3325;
  --warn: #EDB95C;
  --warn-bg: #372B12;
  --crit: #F4A095;
  --crit-bg: #3E1E1A;
  --terminal-bg: #090E0B;
  --terminal-ink: #C8D8CE;
  --terminal-ink-soft: #6E8478;
  --terminal-prompt: #57BC7F;
}

/* ── Base helpers ─────────────────────────────────────────────── */
/* Everything here is prefixed or scoped, so it never restyles Materialize. */

/* Hidden on screen, still read by screen readers (labels of icon-only buttons). */
.pz-visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
[hidden].pz-menu, [hidden].pz-mobile-nav, .pz-toast[hidden] { display: none !important; }

/* Material Symbols (the Plaza icon font; Materialize pages use Material Icons). */
.pz-icon, .material-symbols-outlined { font-size: 22px; line-height: 1; user-select: none; }
.pz-icon-filled { font-variation-settings: "FILL" 1; }

/* Dish names read like a line in a family recipe notebook. */
.pz-dish { font-family: var(--hand); font-style: italic; font-weight: 700; letter-spacing: 0; }
.pz-num { font-variant-numeric: tabular-nums; }
.pz-wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* Keyboard focus must always be visible (WCAG 2.4.7):
   https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
.pz-header :focus-visible, .pz-footer :focus-visible, .pz-menu :focus-visible,
.pz-page :focus-visible, .pz-toast-region :focus-visible {
  outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
/* Minimum touch target 44 px (WCAG 2.5.5). */
.pz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; margin: 0;
  font: 700 var(--t-ui)/1.1 var(--sans); letter-spacing: 0; text-transform: none;
  border-radius: 999px; border: 2px solid transparent; box-shadow: none;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.pz-btn-primary { background: var(--btn); color: #FFFFFF; }
.pz-btn-primary:hover { background: var(--btn-hover); color: #FFFFFF; }
.pz-btn-outline { background: transparent; color: var(--link); border-color: currentColor; }
.pz-btn-outline:hover { background: var(--meadow); }
.pz-btn-small { min-height: 44px; padding: 6px 16px; font-size: var(--t-sm); }
.pz-btn .pz-icon { font-size: 20px; margin-inline-start: -4px; }
.pz-btn[aria-pressed="true"] .pz-icon { font-variation-settings: "FILL" 1; }

/* Round icon-only button (menu toggle, card actions). */
.pz-icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  padding: 0; margin: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink); cursor: pointer;
}
.pz-icon-btn:hover { background: var(--meadow); }
.pz-icon-btn[aria-pressed="true"] { color: var(--gold-text); }
.pz-icon-btn[aria-pressed="true"] .pz-icon { font-variation-settings: "FILL" 1; }

/* A button that looks like a link. */
.pz-link-btn {
  background: none; border: 0; padding: 6px 2px; margin: 0; cursor: pointer;
  color: var(--link); font: 700 var(--t-ui)/1.3 var(--sans);
  text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px;
}

/* Small labels: Beta (works, not polished) and Soon (not built yet). */
.pz-pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font: 700 12px/1.5 var(--sans); white-space: nowrap;
  background: var(--meadow); color: var(--ink);
}
.pz-pill-beta { background: var(--gold-wash); color: var(--gold-text); }
.pz-pill-soon { background: transparent; color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--rule); }

/* Respect the user's "reduce motion" setting:
   https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .pz-header *, .pz-footer *, .pz-menu, .pz-toast, .pz-page * {
    animation: none !important; transition: none !important; scroll-behavior: auto !important;
  }
}

/* ── Header ──────────────────────────────────────────────────── */
/* The header must look the same on Plaza pages and on pages that still load
   Materialize + style.css. Those files style bare elements (`nav`, `nav a`,
   `nav ul li`, `button`, `a`, `p`), so every rule below is scoped under
   .pz-header and resets what they set. Class selectors beat the element
   selectors they use (specificity:
   https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity). */
.pz-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--ground); color: var(--ink);
  border-bottom: 1px solid var(--rule);
  font: 400 var(--t-ui)/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.pz-header *, .pz-header *::before, .pz-header *::after { box-sizing: border-box; }
/* Undo materialize-v1-compat.css `nav {height:56px; line-height:56px; color:#fff}`
   and style.css `nav ul a {…}`. */
.pz-header nav {
  width: auto; height: auto; line-height: inherit; color: inherit;
  background: none; box-shadow: none;
}
.pz-header ul { margin: 0; padding: 0; list-style: none; }
.pz-header li { float: none; padding: 0; }
.pz-header a { color: var(--link); text-decoration: none; }
.pz-header p { margin: 0; line-height: 1.4; }
.pz-header button { font-family: var(--sans); letter-spacing: 0; text-transform: none; }
.pz-header form { margin: 0; }

.pz-bar { display: flex; align-items: center; gap: 36px; min-height: 66px; }
.pz-wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 800; font-stretch: 112%;
  font-size: var(--t-md); letter-spacing: -0.01em; line-height: 1.2;
  white-space: nowrap;
}
.pz-header .pz-wordmark { color: var(--ink); }
.pz-wordmark svg { flex: none; width: 30px; height: 30px; }

.pz-primary { display: flex; gap: 26px; }
.pz-header .pz-primary a {
  display: block; color: var(--ink); font-weight: 600; font-size: var(--t-ui); line-height: 1.5;
  padding: 22px 0 19px; border-bottom: 3px solid transparent; background: none; border-radius: 0;
}
.pz-header .pz-primary a:hover { border-bottom-color: var(--rule); background: none; }
.pz-header .pz-primary a[aria-current="page"] { border-bottom-color: var(--gold); }

.pz-bar-end { margin-inline-start: auto; display: flex; align-items: center; gap: 16px; }

/* Language switch: a POST form with one button per language. */
.pz-lang { display: flex; gap: 2px; font-size: var(--t-sm); }
.pz-lang button {
  min-height: 44px; min-width: 36px; padding: 6px 7px; margin: 0;
  border: 0; border-radius: 3px; background: transparent; cursor: pointer;
  color: var(--ink-soft); font: 700 var(--t-sm)/1 var(--sans);
}
.pz-lang button:hover { color: var(--ink); }
.pz-lang button[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); }

.pz-header .pz-login-link { font-weight: 700; color: var(--link); padding-block: 10px; }
.pz-header .pz-login-link:hover { text-decoration: underline; }

/* Account trigger: the user's initial on a gold disc. */
.pz-avatar {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; margin: 0;
  border-radius: 50%; border: 0; cursor: pointer; overflow: hidden;
  background: var(--gold); color: #17201A; font: 800 var(--t-ui)/1 var(--sans);
}
.pz-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pz-menu-toggle { display: none; }

/* ≤ 860 px: the section links and the language switch move to the mobile panel. */
@media (max-width: 860px) {
  .pz-primary, .pz-bar-end > .pz-lang { display: none; }
  .pz-menu-toggle { display: inline-grid; }
  .pz-bar { gap: 12px; }
  .pz-bar-end { gap: 8px; }
}
/* < 600 px (the project's mobile breakpoint): Add recipe goes icon-only. */
@media only screen and (max-width: 600px) {
  .pz-add-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pz-add-btn { padding-inline: 11px; }
  .pz-add-btn .pz-icon { margin: 0; }
  .pz-bar-end > .pz-login-link { display: none; }
}

/* ── Menus (header dropdowns and the recipe menu bar) ─────────── */
/* Opened/closed by static/js/plaza.js, which toggles [hidden] and aria-expanded. */
.pz-menu-wrap { position: relative; }
.pz-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 10px); z-index: 30;
  width: min(23rem, calc(100vw - 32px));
  padding: 6px; margin: 0; background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 10px;
  box-shadow: 0 18px 40px -18px var(--shadow);
  font: 400 var(--t-ui)/1.4 var(--sans); text-align: start;
}
.pz-menu-start { inset-inline-end: auto; inset-inline-start: 0; width: min(20rem, calc(100vw - 32px)); }
.pz-menu a, .pz-menu .pz-mi {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 2px 12px;
  width: 100%; min-height: 44px; padding: 9px 10px; margin: 0; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink); text-decoration: none; text-align: start;
  font: 500 var(--t-ui)/1.3 var(--sans); letter-spacing: 0; text-transform: none; cursor: pointer;
}
.pz-menu a:hover, .pz-menu a:focus-visible, .pz-menu .pz-mi:hover, .pz-menu .pz-mi:focus-visible { background: var(--ground); }
.pz-menu .pz-mi-icon { color: var(--dish); font-size: 21px; }
/* "Soon" items: visible so people know they are coming, but inert. */
.pz-menu .pz-mi[aria-disabled="true"] { color: var(--ink-soft); cursor: default; }
.pz-menu .pz-mi[aria-disabled="true"]:hover { background: transparent; }
.pz-menu .pz-mi[aria-disabled="true"] .pz-mi-icon { color: var(--ink-soft); }
.pz-menu .pz-mi.is-danger, .pz-menu .pz-mi.is-danger .pz-mi-icon { color: var(--crit); }
/* Two-line entries (Add recipe): icon, bold label, one-line description. */
.pz-menu .pz-rich { grid-template-columns: 24px minmax(0, 1fr); align-items: start; }
.pz-menu .pz-rich .pz-mi-icon { grid-row: span 2; padding-top: 1px; }
.pz-menu .pz-rich strong { font-weight: 700; }
.pz-menu .pz-rich small { grid-column: 2; color: var(--ink-soft); font-size: var(--t-sm); line-height: 1.35; }
.pz-menu hr { border: 0; border-top: 1px solid var(--rule); margin: 6px 4px; height: 0; }
.pz-menu-note { padding: 8px 10px 6px; font-size: var(--t-sm); color: var(--ink-soft); line-height: 1.4; margin: 0; }
.pz-menu-label { padding: 8px 10px 2px; font-size: var(--t-sm); color: var(--ink-soft); margin: 0; }
.pz-menu-account { width: min(16rem, calc(100vw - 32px)); }
.pz-menu-account a, .pz-menu-account .pz-mi { display: block; font-weight: 600; }
.pz-menu-account .pz-menu-head { display: grid; gap: 0; padding: 10px 10px 8px; }
.pz-menu-account .pz-menu-head strong { font-size: var(--t-md); font-weight: 800; }
.pz-menu-account .pz-menu-head small { font-weight: 400; color: var(--link); }
.pz-menu form { margin: 0; }

/* < 600 px: menus marked [data-pz-sheet] open as a bottom sheet. */
@media only screen and (max-width: 600px) {
  .pz-menu[data-pz-sheet] {
    position: fixed; inset: auto 0 0 0; top: auto; width: 100%;
    border-radius: 16px 16px 0 0; max-height: 75vh; overflow: auto;
    padding: 12px 10px calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  }
}

/* ── Mobile navigation panel (≤ 860 px) ──────────────────────── */
.pz-mobile-nav { border-top: 1px solid var(--rule); background: var(--ground); }
.pz-mobile-nav .pz-wrap { display: grid; gap: 4px; padding-block: 8px 16px; }
.pz-mobile-nav nav { display: grid; }
.pz-header .pz-mobile-nav nav a {
  display: block; color: var(--ink); font-weight: 700; font-size: var(--t-md); line-height: 1.3;
  padding: 10px 0; border-bottom: 1px solid var(--rule);
}
.pz-header .pz-mobile-nav nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); padding-inline-start: 10px; }
.pz-mobile-nav-label { padding-top: 12px; font-size: var(--t-sm); color: var(--ink-soft); }
.pz-mobile-nav .pz-lang { padding-top: 10px; font-size: var(--t-ui); }

/* ── Toasts ──────────────────────────────────────────────────── */
/* Not .toast: Materialize owns that class. One toast at a time, queued by pzToast(). */
.pz-toast-region { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; pointer-events: none; }
.pz-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 12px;
  background: var(--ink); color: var(--ground); font: 600 var(--t-ui)/1.4 var(--sans);
  box-shadow: 0 18px 40px -16px var(--shadow);
  pointer-events: auto;
}
.pz-toast-queue { display: none; }

/* ── Footer: the monte at night ──────────────────────────────── */
/* Scoped resets as in the header: materialize-v1-compat.css styles `nav ul li`
   (float, padding) and `nav a` (white), style.css `nav ul a` and `p`. */
.pz-footer {
  background: var(--monte-deep); color: var(--on-monte-soft);
  padding-block: 56px 32px; margin-top: 64px;
  font: 400 var(--t-ui)/1.5 var(--sans);
}
.pz-footer *, .pz-footer *::before, .pz-footer *::after { box-sizing: border-box; }
.pz-footer nav { width: auto; height: auto; line-height: inherit; color: inherit; background: none; box-shadow: none; }
.pz-footer ul { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; }
.pz-footer li { float: none; padding: 0; list-style: none; }
.pz-footer p { margin: 0; line-height: 1.5; }
.pz-footer form { margin: 0; }
.pz-footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
/* The wordmark is a link too: restate its look over `.pz-footer a` below. */
.pz-footer a.pz-wordmark {
  display: inline-flex; color: var(--on-monte); text-decoration: none;
  font-size: var(--t-md); font-weight: 800;
}
.pz-footer-about { margin-top: 14px; max-width: 30rem; }
.pz-footer h2 {
  font: 700 var(--t-ui)/1.3 var(--sans); letter-spacing: 0; color: var(--on-monte);
  margin: 0 0 10px;
}
.pz-footer a, .pz-footer nav ul a {
  display: inline; padding: 0; font-size: var(--t-ui); font-weight: 400;
  color: var(--on-monte-soft); background: none; text-decoration: underline;
  text-underline-offset: 0.2em; text-decoration-thickness: 1px;
}
.pz-footer a:hover, .pz-footer nav ul li a:hover { color: var(--on-monte); background: none; }
.pz-footer :focus-visible { outline-color: var(--gold-light); }
.pz-copyright { margin-top: 40px; font-size: var(--t-sm); }

@media (max-width: 960px) {
  .pz-footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pz-footer-grid > :first-child { grid-column: 1 / -1; }
}
@media only screen and (max-width: 600px) {
  .pz-footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ═════════════════════════════════════════════════════════════════
   Plaza pages (no Materialize): the recipe page
   ═════════════════════════════════════════════════════════════════ */

/* Page base. Migrated pages empty {% block html_theme %}, so <html> has no
   `theme` attribute: that is how these rules know Materialize is not loaded
   and that the body is theirs to style. */
html:not([theme]) body {
  margin: 0;
  background: var(--ground); color: var(--ink);
  font: 400 var(--t-base)/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.pz-page *, .pz-page *::before, .pz-page *::after { box-sizing: border-box; }
/* Element resets wrapped in :where(), which has zero specificity: any class
   rule below (.pz-widget-note, .pz-btn-primary…) wins over them without
   needing a longer selector. https://developer.mozilla.org/en-US/docs/Web/CSS/:where */
:where(.pz-page) :where(h1, h2, h3) { margin: 0; text-wrap: balance; }
:where(.pz-page) :where(h1, h2) {
  font-family: var(--display); font-weight: 800; font-stretch: 118%;
  letter-spacing: -0.02em; line-height: 1.02;
}
:where(.pz-page) :where(p, dl, dd) { margin: 0; text-wrap: pretty; }
:where(.pz-page) :where(ul, ol) { margin: 0; padding: 0; }
:where(.pz-page) :where(a) { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:where(.pz-page) :where(a:hover) { text-decoration-thickness: 2px; }
:where(.pz-page) :where(button) { font: inherit; color: inherit; }
:where(.pz-page) :where(img) { display: block; max-width: 100%; height: auto; }
.pz-page [hidden] { display: none !important; }

/* ── Hero: the photo leads, the near hills over its bottom edge ─ */
.pz-dish-hero { position: relative; background: var(--monte); }
.pz-page .pz-dish-photo {
  display: block; width: 100%; max-width: none;
  height: clamp(300px, 50vw, 640px); object-fit: cover; object-position: 50% 42%;
}
.pz-dish-hills { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(44px, 7vw, 108px); }
/* Ridge fills of pz-hills and pz-monte (pz_svg_defs.html): tokens, so they follow the theme */
.pz-ridge-back { fill: var(--ridge-back); }
.pz-ridge-mid { fill: var(--ridge-mid); }
.pz-ridge-front { fill: var(--monte); }
/* The shared <symbol> sheet takes no room. Not display:none (the `hidden`
   attribute): gradients and patterns inside a display:none SVG are not
   rendered when a symbol uses them (pz-gateau's crust and scoring). */
.pz-svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ── Green title band ─────────────────────────────────────────── */
.pz-dish-head { background: var(--monte); color: var(--on-monte); padding-block: 6px 40px; }
.pz-dish-head :focus-visible { outline-color: var(--gold-light); }
.pz-page .pz-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  color: var(--on-monte-soft); font-weight: 700; font-size: var(--t-sm); text-decoration: none;
}
.pz-page .pz-back:hover { color: var(--on-monte); text-decoration: underline; }
.pz-back .pz-icon { font-size: 18px; }
.pz-page .pz-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pz-tags li {
  padding: 3px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--on-monte-rule);
  color: var(--on-monte-soft); font-size: var(--t-sm); font-weight: 600;
}
.pz-page .pz-dish-title {
  margin-top: 10px; color: var(--on-monte);
  font-family: var(--hand); font-style: italic; font-weight: 700; font-stretch: 100%;
  font-size: clamp(44px, 24px + 4.6vw, 84px); line-height: 1; letter-spacing: -0.01em;
}
.pz-dish-desc { font-size: var(--t-md); color: var(--on-monte-soft); margin-top: 12px; max-width: 40rem; }
.pz-dish-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px;
  margin-top: 18px; font-size: var(--t-ui); color: var(--on-monte-soft);
}
.pz-page .pz-author { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--on-monte); }
.pz-page .pz-author:hover { text-decoration: underline; }
.pz-author-dot {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; flex: none;
  font-size: 12px; font-weight: 800; color: #17201A; background: var(--gold-light); object-fit: cover;
}
.pz-meta-item { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.pz-meta-item .pz-icon { font-size: 17px; }
.pz-likes .pz-icon { color: var(--gold-light); }

/* ── Menu bar: sticks under the header ────────────────────────── */
.pz-doc-bar {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h)); z-index: 15;
  background: var(--ground); border-bottom: 1px solid var(--rule);
}
.pz-doc-bar-inner { display: flex; align-items: center; gap: 8px 16px; min-height: 60px; }
/* The dish name shows once the title has scrolled behind the header
   (recipe_detail.js adds .is-stuck), and only from 860 px up. */
.pz-doc-title {
  display: none; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: var(--t-md); color: var(--dish); padding-inline-end: 12px; border-inline-end: 1px solid var(--rule);
}
@media (min-width: 860px) {
  .pz-doc-bar.is-stuck .pz-doc-title { display: block; }
}
.pz-doc-menus { display: flex; align-items: center; gap: 2px; }
.pz-doc-menu-btn {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 8px 8px 8px 12px; margin: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer;
  font: 600 var(--t-ui)/1 var(--sans);
}
.pz-doc-menu-btn:hover, .pz-doc-menu-btn[aria-expanded="true"] { background: var(--meadow); }
.pz-doc-menu-btn .pz-icon { font-size: 20px; color: var(--ink-soft); }
.pz-doc-end { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }

/* < 600 px: Save, Share and Edit become icon-only (their aria-label stays). */
@media only screen and (max-width: 600px) {
  .pz-doc-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pz-doc-end .pz-btn { padding-inline: 10px; min-width: 44px; }
  .pz-doc-end .pz-btn .pz-icon { margin: 0; }
  .pz-doc-menu-btn { padding-inline: 8px 4px; }
  .pz-doc-bar-inner { gap: 4px; }
}

/* ── Recipe body: ingredients · steps · widgets ───────────────── */
/* ≥ 1100 px three columns (ingredients sticky), 600–1100 px two columns with
   the widgets below, < 600 px one column. CSS Grid guide:
   https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout */
.pz-recipe-body {
  display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr) minmax(0, 19.5rem);
  gap: 48px; align-items: start; padding-block: 44px 24px;
}
.pz-col-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 12px; padding-bottom: 12px; border-bottom: 2px solid var(--ink);
}
.pz-page .pz-col-head h2 { font-size: var(--t-lg); letter-spacing: -0.01em; }
.pz-ingr { position: sticky; top: calc(var(--header-h) + 84px); }
.pz-page .pz-ingr-list { list-style: none; }
.pz-ingr-list li {
  display: grid; grid-template-columns: 5.4rem minmax(0, 1fr) auto; gap: 10px; align-items: baseline;
  padding-block: 10px; border-bottom: 1px solid var(--rule);
}
.pz-ingr-list li.pz-empty, .pz-steps li.pz-empty { display: block; color: var(--ink-soft); }
.pz-qty { font-weight: 800; font-variant-numeric: tabular-nums; }
.pz-page .pz-ingr-name { color: var(--ink); text-decoration: none; }
.pz-page .pz-ingr-name:hover { text-decoration: underline; }

/* Translation flags: hidden on the recipe page until Tools → "Check ingredient
   names"; always visible on the ingredient page's Names widget (.pz-trans). */
.pz-flag-btn {
  align-self: center; place-items: center; width: 44px; height: 44px; padding: 0; margin: 0;
  border: 0; border-radius: 50%; background: var(--gold-wash); color: var(--gold-text); cursor: pointer;
}
.pz-flag-btn .pz-icon { font-size: 18px; }
.pz-recipe .pz-flag-btn { display: none; }
.pz-recipe.is-checking .pz-flag-btn { display: inline-grid; }
.pz-trans .pz-flag-btn { display: inline-grid; }
.pz-checking-note { display: none; font-size: var(--t-sm); color: var(--gold-text); margin-top: 10px; }
.pz-recipe.is-checking .pz-checking-note { display: block; }

/* Servings stepper */
.pz-stepper { display: inline-flex; align-items: center; gap: 4px; }
.pz-stepper button {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; margin: 0;
  border-radius: 50%; border: 1.5px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer;
}
.pz-stepper button:hover { border-color: var(--monte); }
.pz-stepper button:disabled { opacity: 0.4; cursor: default; }
.pz-stepper button .pz-icon { font-size: 20px; }
.pz-stepper output { min-width: 2ch; text-align: center; font-weight: 800; font-size: var(--t-md); font-variant-numeric: tabular-nums; }
.pz-stepper-unit { font-size: var(--t-sm); color: var(--ink-soft); margin-inline: 2px 6px; }

/* Steps: gold numerals from a CSS counter, about 60 characters per line. */
.pz-page .pz-steps { list-style: none; counter-reset: pz-step; }
.pz-steps li {
  display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 14px;
  padding-block: 16px; border-bottom: 1px solid var(--rule);
}
.pz-steps li:not(.pz-empty)::before {
  counter-increment: pz-step; content: counter(pz-step);
  font-family: var(--display); font-weight: 800; font-stretch: 118%;
  font-size: var(--t-lg); line-height: 1.1; color: var(--gold-text); font-variant-numeric: tabular-nums;
}
.pz-steps p { max-width: 60ch; }

/* ── Widgets (side rail) ──────────────────────────────────────── */
.pz-rail { display: grid; gap: 20px; }
.pz-widget {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 14px;
  padding: 18px 20px 20px; min-width: 0;
}
.pz-widget:focus { outline: 2px solid var(--focus); outline-offset: 3px; }
.pz-widget-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; }
.pz-page .pz-widget-head h2 {
  font-family: var(--display); font-weight: 800; font-stretch: 112%;
  font-size: var(--t-md); line-height: 1.2; letter-spacing: -0.01em;
}
.pz-widget-head a { font-size: var(--t-sm); font-weight: 700; }
.pz-widget-note { font-size: var(--t-sm); color: var(--ink-soft); margin-top: 12px; line-height: 1.45; }
.pz-widget-text { line-height: 1.5; }
.pz-widget-sub { font-size: var(--t-ui); font-weight: 800; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.pz-widget .pz-btn { margin-top: 14px; }

/* Nutrition: kcal and one bar per macro. --v is the share (0–100) of a daily
   reference intake, set inline by _nutrition_macros_card.html. */
.pz-kcal { display: grid; line-height: 1.1; }
.pz-kcal strong { font-family: var(--display); font-weight: 800; font-stretch: 118%; font-size: 40px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pz-kcal span { font-size: var(--t-sm); color: var(--ink-soft); }
.pz-macros { display: grid; gap: 10px; margin-top: 12px; }
.pz-macros > div { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr) 3.4rem; gap: 10px; align-items: center; }
.pz-macros dt { font-size: var(--t-sm); color: var(--ink-soft); }
.pz-macros dd { display: contents; }
.pz-meter { position: relative; height: 8px; border-radius: 4px; background: var(--rule); overflow: hidden; }
.pz-meter > span { position: absolute; inset: 0 auto 0 0; width: calc(var(--v, 0) * 1%); background: var(--dish); border-radius: 4px; }
.pz-val { font-size: var(--t-sm); font-weight: 700; text-align: end; font-variant-numeric: tabular-nums; }
/* Superuser-only snapshot details */
.pz-details { margin-top: 12px; font-size: var(--t-sm); }
.pz-details summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.pz-details table { width: 100%; border-collapse: collapse; }
.pz-details th, .pz-details td { text-align: start; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.pz-details pre { margin: 0; padding: 10px; overflow: auto; max-height: 16rem; background: var(--ground); border-radius: 8px; font-size: 12px; white-space: pre-wrap; }

/* The cook */
.pz-cook { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.pz-cook .pz-btn { margin-top: 0; }
.pz-person-avatar {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; flex: none; object-fit: cover;
  font-weight: 800; font-size: var(--t-md); color: #17201A; background: var(--gold);
}
.pz-page .pz-person-name { font-weight: 800; color: var(--ink); text-decoration: none; }
.pz-page .pz-person-name:hover { text-decoration: underline; }
.pz-person-meta { font-size: var(--t-sm); color: var(--ink-soft); }
.pz-page .pz-mini-recipes { list-style: none; margin-top: 6px; }
.pz-mini-recipes li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; padding-block: 8px; }
.pz-page .pz-mini-recipes img { width: 48px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.pz-page .pz-mini-recipes a { color: var(--ink); text-decoration: none; font-size: var(--t-md); }
.pz-page .pz-mini-recipes a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.pz-mini-recipes small { display: block; font-size: var(--t-sm); color: var(--ink-soft); }

/* Your recipe: public/private switch (a <button role="switch">) */
.pz-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 4px 12px; border-bottom: 1px solid var(--rule); }
.pz-switch {
  position: relative; flex: none; width: 52px; height: 44px; padding: 0; margin: 0;
  border: 0; background: transparent; cursor: pointer;
}
.pz-switch::before {
  content: ""; position: absolute; left: 2px; top: 8px; width: 48px; height: 28px; border-radius: 999px;
  background: var(--rule); transition: background 0.15s;
}
.pz-switch::after {
  content: ""; position: absolute; left: 5px; top: 11px; width: 22px; height: 22px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 1px 3px rgb(0 0 0 / 0.3); transition: transform 0.15s;
}
.pz-switch[aria-checked="true"]::before { background: var(--monte); }
.pz-switch[aria-checked="true"]::after { transform: translateX(20px); }
.pz-switch:disabled { opacity: 0.6; cursor: progress; }
.pz-page .pz-stat-list { list-style: none; }
.pz-stat-list li { display: flex; justify-content: space-between; gap: 12px; padding-block: 9px; border-bottom: 1px solid var(--rule); font-size: var(--t-ui); }
.pz-stat-list strong { font-variant-numeric: tabular-nums; }

/* ── Profile band (accounts/user_profile.html) ────────────────── */
.pz-profile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 28px; align-items: center; }
.pz-profile .pz-person-avatar { width: clamp(88px, 12vw, 128px); height: clamp(88px, 12vw, 128px); font-size: var(--t-xl); box-shadow: 0 0 0 5px rgb(255 255 255 / 0.14); }
.pz-profile-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; color: var(--on-monte-soft); font-size: var(--t-ui); }
.pz-profile-meta span { display: inline-flex; align-items: center; gap: 4px; }
.pz-profile-meta .pz-icon { font-size: 18px; }
.pz-counts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 14px; }
.pz-counts a, .pz-counts span { color: var(--on-monte); text-decoration: none; display: grid; line-height: 1.15; }
.pz-counts strong { font: 800 var(--t-lg)/1.1 var(--display); font-stretch: 118%; font-variant-numeric: tabular-nums; }
.pz-counts small { font-size: var(--t-sm); color: var(--on-monte-soft); }
.pz-counts a:hover small { text-decoration: underline; }
@media (max-width: 860px) {
  .pz-profile { grid-template-columns: auto minmax(0, 1fr); }
  .pz-profile > .pz-band-actions { grid-column: 1 / -1; }
}
@media only screen and (max-width: 600px) {
  .pz-counts { gap: 8px 18px; }
}

/* ── Related recipes ──────────────────────────────────────────── */
.pz-related { padding-block: 40px 24px; }
.pz-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.pz-page .pz-section-head h2 { font-size: var(--t-lg); letter-spacing: -0.01em; }
.pz-rgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 24px; }
.pz-rcard { min-width: 0; }
.pz-page .pz-rcard-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.pz-page .pz-rcard h3 { font-size: var(--t-md); line-height: 1.2; margin-top: 12px; }
.pz-page .pz-rcard h3 a { color: var(--ink); text-decoration: none; }
.pz-page .pz-rcard h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.pz-rcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.pz-rcard-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: var(--t-sm); color: var(--ink-soft); min-width: 0; }
.pz-rcard-meta .pz-icon { font-size: 16px; }

/* List card (.pz-lcard, errezeta/_recipe_card.html): the related card plus
   Save / Plan buttons and a selection checkbox in the photo corner. */
.pz-lcard { position: relative; }
.pz-lcard .pz-rcard-media { position: relative; }
.pz-lcard-actions { display: flex; align-items: center; flex: none; }
/* The <label> is the 44 px touch target; the native box inside stays small
   and is tinted with accent-color. */
.pz-lcard-check {
  position: absolute; top: 6px; inset-inline-start: 6px;
  display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer;
}
.pz-lcard-check::before {
  content: ""; position: absolute; width: 32px; height: 32px; border-radius: 8px;
  background: color-mix(in srgb, var(--paper) 88%, transparent); box-shadow: 0 2px 8px -2px var(--shadow);
}
.pz-lcard-check input { position: relative; width: 20px; height: 20px; margin: 0; cursor: pointer; accent-color: var(--btn); }
.pz-lcard-check:focus-within { outline: 2px solid var(--focus); outline-offset: 0; border-radius: 10px; }
.pz-lcard-check input:focus-visible { outline: none; }
/* Selected: a gold outline on the photo (recipe_list.js toggles .is-selected). */
.pz-page .pz-lcard.is-selected .pz-rcard-media img { outline: 3px solid var(--gold); outline-offset: 2px; }
@media only screen and (max-width: 600px) {
  /* A long press selects the card: no image callout menu, no text selection. */
  .pz-lcard { -webkit-touch-callout: none; user-select: none; }
}

/* ── Recipe list (errezeta/index.html) ────────────────────────── */
/* A green title band with the ways to add a recipe, then the tab bar and
   the tools on one row, the search panel, the count and the card grid
   (.pz-rgrid / .pz-rcard of the related recipes, plus .pz-lcard below). */
.pz-list-head { background: var(--monte); color: var(--on-monte); padding-block: 28px 32px; }
.pz-list-head :focus-visible { outline-color: var(--gold-light); }
.pz-list-head-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.pz-page .pz-list-title { color: var(--on-monte); font-size: var(--t-xl); }
.pz-list-create { display: flex; flex-wrap: wrap; gap: 8px; }
/* Buttons on the green band: gold for the main action, outlined white for the rest. */
.pz-page .pz-btn-gold { background: var(--gold-light); color: #17201A; }
.pz-page .pz-btn-gold:hover { background: var(--gold); color: #17201A; }
.pz-page .pz-btn-on-monte { background: transparent; color: var(--on-monte); border-color: var(--on-monte-rule); }
.pz-page .pz-btn-on-monte:hover { border-color: var(--on-monte); color: var(--on-monte); }

.pz-list-body { padding-block: 20px 64px; }

/* Tabs (links) and tools on one row; the tabs scroll sideways if they ever
   outgrow a narrow screen instead of wrapping under the tools. */
.pz-list-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rule); }
.pz-list-tabs { display: flex; gap: 4px; overflow-x: auto; min-width: 0; }
.pz-page .pz-list-tab {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px;
  color: var(--ink-soft); font-weight: 700; text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.pz-page .pz-list-tab:hover { color: var(--ink); background: var(--meadow); border-radius: 8px 8px 0 0; }
/* The active tab is styled from aria-current, so the markup has one source of truth. */
.pz-page .pz-list-tab[aria-current="page"] { color: var(--dish); border-bottom-color: var(--gold); }
.pz-list-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.pz-list-tools [aria-expanded="true"] { background: var(--meadow); }
.pz-list-sort-menu { width: min(17rem, calc(100vw - 32px)); }

/* Search panel: three fields side by side, one column below 600 px. The
   fields are Django's default widgets, so they get the .pz-input look here. */
.pz-list-search {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; align-items: end;
  margin-top: 16px; padding: 18px; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px;
}
.pz-list-search .pz-field :is(input, select) {
  width: 100%; min-height: 44px; padding: 10px 12px; margin: 0;
  border: 1.5px solid var(--rule); border-radius: 8px; background: var(--ground); color: var(--ink);
  font: 400 var(--t-ui)/1.4 var(--sans);
}
.pz-list-search .pz-field :is(input, select):focus {
  border-color: var(--monte); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--monte) 28%, transparent);
}
.pz-list-search-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; }

/* Elasticsearch down */
.pz-list-banner {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px;
  background: var(--warn-bg); color: var(--warn); border-radius: 10px; font-size: var(--t-ui);
}
.pz-list-banner p { color: var(--ink); }
.pz-list-count { margin-block: 16px 20px; font-size: var(--t-sm); color: var(--ink-soft); }
.pz-list-count strong { color: var(--ink); }

/* Empty state: what is missing and what to do. */
.pz-list-empty {
  display: grid; gap: 12px; justify-items: start; max-width: 36rem;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 28px 24px;
}
.pz-page .pz-list-empty h2 { font-size: var(--t-lg); }
.pz-list-empty p { color: var(--ink-soft); }

/* Selection bar (2+ cards selected). Sticky at the bottom of the viewport
   while the list is on screen; below 600 px a fixed bottom bar with
   icon-only buttons, and the page gets bottom padding (.is-selecting, set
   by recipe_list.js) so the bar never covers the last card. */
.pz-selbar {
  position: sticky; bottom: 0; z-index: 20;
  background: var(--paper); border-top: 1px solid var(--rule);
  box-shadow: 0 -12px 30px -20px var(--shadow);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.pz-selbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-block: 10px; }
.pz-selbar-count { font-weight: 700; font-variant-numeric: tabular-nums; margin-inline-end: auto; }
.pz-selbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pz-selbar-actions .pz-link-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.pz-selbar [aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.pz-selbar-hint { flex-basis: 100%; font-size: var(--t-xs); color: var(--ink-soft); }
@media only screen and (max-width: 600px) {
  .pz-selbar { position: fixed; left: 0; right: 0; bottom: 0; }
  .pz-selbar-inner { flex-wrap: nowrap; gap: 4px; padding-block: 6px; }
  .pz-selbar-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pz-selbar-actions { flex-wrap: nowrap; gap: 2px; }
  .pz-selbar-actions .pz-btn { min-width: 44px; padding-inline: 10px; border-width: 0; }
  .pz-selbar-actions .pz-btn .pz-icon { margin: 0; }
  .pz-selbar-actions .pz-link-btn { min-width: 44px; justify-content: center; }
  .pz-selbar-hint { display: none; }
  .pz-list.is-selecting { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

/* Infinite scroll: the sentinel is an invisible line the observer watches. */
.pz-list-sentinel { height: 1px; }
.pz-list-status { margin-top: 24px; text-align: center; font-size: var(--t-sm); color: var(--ink-soft); min-height: 1.5em; }

@media only screen and (max-width: 600px) {
  .pz-list-head { padding-block: 20px 24px; }
  .pz-page .pz-list-title { font-size: var(--t-lg); }
  /* Create links go icon-only; their aria-label keeps the name. */
  .pz-list-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pz-list-create .pz-btn { padding-inline: 10px; min-width: 46px; }
  .pz-list-create .pz-btn .pz-icon { margin: 0; }
  .pz-list-tab { padding-inline: 10px; }
  .pz-list-search { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .pz-list-body { padding-block: 12px 48px; }
}

/* ── Translation-fix dialog (native <dialog>) ─────────────────── */
.pz-dialog {
  width: min(30rem, calc(100vw - 32px)); padding: 0; border: 1px solid var(--rule); border-radius: 14px;
  background: var(--paper); color: var(--ink); box-shadow: 0 30px 60px -20px var(--shadow);
}
.pz-dialog::backdrop { background: rgb(0 0 0 / 0.45); }
.pz-dialog-form { display: grid; gap: 14px; padding: 22px 22px 18px; }
.pz-page .pz-dialog h2 { display: flex; align-items: center; gap: 8px; font-size: var(--t-md); font-stretch: 112%; line-height: 1.2; }
.pz-dialog h2 .pz-icon { color: var(--dish); }
.pz-dialog-intro { font-size: var(--t-sm); color: var(--ink-soft); }
.pz-field { display: grid; gap: 4px; }
.pz-field-label { font-size: var(--t-sm); font-weight: 600; color: var(--ink-soft); }
.pz-input {
  width: 100%; min-height: 44px; padding: 10px 12px; margin: 0;
  border: 1.5px solid var(--rule); border-radius: 8px; background: var(--ground); color: var(--ink);
  font: 400 var(--t-ui)/1.4 var(--sans);
}
.pz-input:focus { border-color: var(--monte); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--monte) 28%, transparent); }
.pz-input[readonly] { color: var(--ink-soft); }
textarea.pz-input { resize: vertical; }
.pz-field-help { font-size: var(--t-xs); color: var(--ink-soft); }
.pz-form-error { font-size: var(--t-sm); font-weight: 600; color: var(--crit); background: var(--crit-bg); padding: 8px 10px; border-radius: 8px; }
.pz-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Compare nutrition (recipe list): a wider dialog, one column per recipe
   (up to 4), row labels on the left, tabular numerals so the values line up.
   The wrapper scrolls sideways below 600 px instead of squeezing columns. */
.pz-compare { width: min(52rem, calc(100vw - 32px)); }
.pz-compare-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pz-compare table { width: 100%; min-width: 30rem; border-collapse: collapse; font-size: var(--t-ui); }
.pz-compare th, .pz-compare td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: end; vertical-align: top; }
.pz-compare thead th { text-align: end; font-weight: 700; }
.pz-compare thead th a { color: var(--dish); }
.pz-compare tbody th { text-align: start; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.pz-compare td { font-variant-numeric: tabular-nums; }
.pz-compare .pz-compare-none { color: var(--ink-soft); font-style: italic; }

/* ── Admin console: header (adminconsole/home.html) ───────────── */
/* The pastel vasco photo of the first home page, the near hills over its
   bottom edge (.pz-dish-hills, shared with the recipe page), then the green
   band. Shorter than the recipe photo: the console is a working page. */
.pz-admin-hero { position: relative; margin: 0; background: var(--monte); }
.pz-page .pz-admin-photo {
  display: block; width: 100%; max-width: none;
  height: clamp(200px, 26vw, 340px); object-fit: cover; object-position: 50% 50%;
}
.pz-admin-head { background: var(--monte); color: var(--on-monte); padding-block: 6px 32px; }
.pz-admin-head :focus-visible { outline-color: var(--gold-light); }
.pz-page .pz-admin-title { color: var(--on-monte); font-size: var(--t-xl); }
.pz-admin-sub { font-size: var(--t-md); color: var(--on-monte-soft); margin-top: 8px; max-width: 40rem; }
.pz-admin-homage { font-size: var(--t-sm); color: var(--on-monte-soft); margin-top: 10px; }
.pz-admin-homage i { font-family: var(--hand); font-size: var(--t-ui); font-weight: 700; color: var(--gold-light); }

/* ── Admin console: layout and nav ────────────────────────────── */
/* ≥ 860 px the console nav is a 15rem column beside the content; below that
   it moves above the content as a row of wrapping chips. */
.pz-admin-body {
  display: grid; grid-template-columns: 15rem minmax(0, 1fr);
  gap: 40px; align-items: start; padding-block: 40px 48px;
}
.pz-page .pz-admin-nav ul { list-style: none; display: grid; gap: 2px; }
.pz-page .pz-admin-nav a {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px;
  border-radius: 10px; color: var(--ink); font-size: var(--t-ui); font-weight: 600; text-decoration: none;
}
.pz-page .pz-admin-nav a:hover { background: var(--meadow); }
.pz-page .pz-admin-nav a[aria-current="page"] { background: var(--monte); color: var(--on-monte); }
.pz-admin-nav .pz-icon { font-size: 20px; }
.pz-admin-main { display: grid; gap: 40px; min-width: 0; }
.pz-page .pz-admin-section h2 {
  font-size: var(--t-lg); letter-spacing: -0.01em;
  padding-bottom: 12px; border-bottom: 2px solid var(--ink);
}
@media (max-width: 860px) {
  .pz-admin-body { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 28px 40px; }
  .pz-page .pz-admin-nav ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .pz-page .pz-admin-nav a { padding: 6px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); }
}

/* ── Admin console: review queues and catalog ─────────────────── */
/* A queue row: gold numeral · name · "Review". An empty queue has no numeral
   and no button, just a muted "Nothing to review" (never a zero badge). */
.pz-page .pz-queues { list-style: none; }
.pz-queue {
  display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) auto; gap: 8px 12px; align-items: center;
  padding-block: 10px; border-bottom: 1px solid var(--rule);
}
.pz-queue-count {
  font-family: var(--display); font-weight: 800; font-stretch: 118%;
  font-size: var(--t-lg); line-height: 1; color: var(--gold-text);
}
.pz-page .pz-queue-name {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: var(--t-base); font-weight: 700;
}
.pz-queue-empty .pz-queue-name { grid-column: 2; }
.pz-queue-none { font-size: var(--t-sm); color: var(--ink-soft); }

/* Catalog: one tile per model, aggregate numbers only. */
.pz-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 16px; margin-top: 16px; }
.pz-catalog-item { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.pz-catalog dt { font-size: var(--t-sm); font-weight: 700; color: var(--ink-soft); }
.pz-catalog-num {
  font-family: var(--display); font-weight: 800; font-stretch: 118%;
  font-size: var(--t-xl); line-height: 1.1; margin-top: 4px;
}
.pz-catalog-split { font-size: var(--t-sm); color: var(--ink-soft); margin-top: 4px; }
@media only screen and (max-width: 600px) {
  .pz-queue { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .pz-queue-review, .pz-queue-none { grid-column: 2; justify-self: start; }
  .pz-catalog { grid-template-columns: minmax(0, 1fr); }
}

/* ── Admin console: services ──────────────────────────────────── */
/* A row: name · status pill · detail · "Open …" (shown only when down).
   The pill always pairs an icon with a word, so the state never depends on
   colour alone (WCAG 1.4.1); colours are tokens, so dark mode just works.
   adminconsole_home.js swaps .pz-status-checking for -up or -down. */
.pz-page .pz-status-list { list-style: none; }
.pz-status-row {
  display: grid; grid-template-columns: minmax(8rem, 11rem) auto minmax(0, 1fr) auto;
  gap: 4px 16px; align-items: center; padding-block: 8px; border-bottom: 1px solid var(--rule);
}
.pz-page .pz-status-name { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.pz-status-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 999px;
  font-size: var(--t-sm); font-weight: 700; white-space: nowrap;
}
.pz-status-pill .pz-icon { font-size: 18px; }
.pz-status-checking { background: var(--ground); color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--rule); }
.pz-status-checking .pz-icon { animation: pz-spin 1.2s linear infinite; }  /* off with reduced motion (see top) */
.pz-status-up { background: var(--good-bg); color: var(--good); }
.pz-status-down { background: var(--crit-bg); color: var(--crit); }
/* The detail can be a long error (even an HTML page body cut to 300 chars):
   let it break anywhere rather than push the page sideways. */
.pz-status-detail { font-size: var(--t-sm); color: var(--ink-soft); overflow-wrap: anywhere; min-width: 0; }
.pz-page .pz-status-open {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: var(--t-sm); font-weight: 700; white-space: nowrap;
}
@keyframes pz-spin { to { transform: rotate(360deg); } }
@media only screen and (max-width: 600px) {
  .pz-status-row { grid-template-columns: minmax(0, 1fr); justify-items: start; padding-block: 10px; }
}

/* ── Shopping list (errezeta/shopping_list.html) ──────────────── */
/* A green title band, then one row per item on a paper card.
   The row is a <label> wrapping the checkbox: tapping anywhere on it ticks
   the item, so the list works one-handed on a phone. Rows are at least 52 px
   tall (44 px is the minimum touch target). Nothing here depends on hover:
   the hover colour is only a hint for mouse users. */
.pz-sl-head { background: var(--monte); color: var(--on-monte); padding-block: 6px 32px; }
.pz-sl-head :focus-visible { outline-color: var(--gold-light); }
.pz-page .pz-sl-title { color: var(--on-monte); font-size: var(--t-xl); }
.pz-sl-sub { font-size: var(--t-md); color: var(--on-monte-soft); margin-top: 8px; }
.pz-sl-body { max-width: 44rem; padding-block: 28px 64px; }
.pz-page .pz-sl-list {
  list-style: none; background: var(--paper);
  border: 1px solid var(--rule); border-radius: 14px; overflow: hidden;
}
.pz-sl-list li + li { border-top: 1px solid var(--rule); }
/* Category heading (one per shop section, drawn by {% ifchanged %}): a small
   uppercase label on a tinted strip. Not a row: no checkbox, no hover. Only
   tokens, so the dark theme comes from the :root overrides. */
.pz-sl-section { background: var(--meadow); padding: 14px 18px 6px; }
.pz-page .pz-sl-section h2 {
  margin: 0; font-size: var(--t-xs); font-weight: 700; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.06em; overflow-wrap: anywhere;
}
/* checkbox · name (takes the free space, wraps) · amount (never wraps) */
.pz-sl-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
  min-height: 52px; padding: 8px 18px; cursor: pointer;
}
.pz-sl-row:hover { background: var(--meadow); }
/* Show the keyboard focus on the whole row, not only on the small box. */
.pz-sl-row:focus-within { outline: 2px solid var(--focus); outline-offset: -2px; }
.pz-sl-check {
  width: 22px; height: 22px; margin: 0; cursor: pointer;
  /* accent-color tints the native checkbox; no custom drawing needed.
     https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color */
  accent-color: var(--btn);
}
.pz-sl-check:focus-visible { outline: none; }  /* the row shows the focus */
.pz-sl-name { font-weight: 600; overflow-wrap: anywhere; }
.pz-sl-amount { color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* A ticked item stays in place, struck through. "~" = later siblings of the
   checked box: https://developer.mozilla.org/en-US/docs/Web/CSS/Subsequent-sibling_combinator */
.pz-sl-check:checked ~ .pz-sl-name,
.pz-sl-check:checked ~ .pz-sl-amount { text-decoration: line-through; color: var(--ink-soft); }
.pz-sl-check:checked ~ .pz-sl-name { font-weight: 400; }
.pz-sl-empty {
  display: grid; gap: 12px; justify-items: start;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 28px 24px;
}
.pz-page .pz-sl-empty h2 { font-size: var(--t-lg); }
.pz-sl-empty p { color: var(--ink-soft); }
@media only screen and (max-width: 600px) {
  .pz-page .pz-sl-title { font-size: var(--t-lg); }
  .pz-sl-sub { font-size: var(--t-ui); }
  .pz-sl-body { padding-block: 20px 48px; }
  .pz-sl-row { gap: 12px; padding-inline: 14px; }
  .pz-sl-section { padding-inline: 14px; }
}

/* ── Home (templates/home.html): hero ─────────────────────────── */
/* Guest hero and member greeting share one structure: text on top, then a
   decorative scene (aria-hidden) where the pastel vasco (pz-gateau) sits
   behind the three ridges (pz-monte) that run into the green band below.
   The pastel is drawn in its FINAL position by default; the rise is an
   enhancement for people who did not ask for less motion. */
.pz-home-hero { position: relative; padding-top: 72px; overflow: hidden; }
.pz-home-hero-text { position: relative; z-index: 3; padding-bottom: 20px; }
.pz-page .pz-home-hero h1 { font-size: var(--t-2xl); max-width: 11ch; }
.pz-home-lead { font-size: var(--t-md); line-height: 1.45; max-width: 34rem; margin-top: 24px; }
.pz-home-hero-note { margin-top: 14px; color: var(--ink-soft); max-width: 32rem; }
.pz-home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.pz-home-hero .pz-home-actions { margin-top: 30px; }
.pz-home-login { font-weight: 700; }
.pz-home-scene {
  position: relative;
  height: clamp(210px, 22vw, 320px);
  margin-top: calc(-1 * clamp(0px, 7vw, 110px));
}
.pz-home-cake {
  position: absolute; z-index: 1;
  right: max(var(--gutter), calc((100% - var(--max)) / 2 + 48px));
  bottom: 2%;
  width: clamp(170px, 29vw, 420px); height: auto; aspect-ratio: 1;
  filter: drop-shadow(0 10px 18px rgb(120 70 10 / 0.18));
}
.pz-home-ridges { position: absolute; z-index: 2; inset: auto 0 -1px 0; width: 100%; height: 78%; }

/* Member greeting: a shorter scene, the h1 on one line. */
.pz-home-hero-in { padding-top: 60px; }
.pz-page .pz-home-hero-in h1 { max-width: none; }
.pz-home-hero-in .pz-home-scene { height: clamp(170px, 17vw, 240px); margin-top: calc(-1 * clamp(0px, 3vw, 40px)); }
.pz-home-hero-in .pz-home-cake { width: clamp(150px, 20vw, 290px); bottom: 0; }

/* The one orchestrated moment: the pastel rises over the hills, once, 1.6 s.
   Only when the visitor has no reduced-motion preference; otherwise (and in
   browsers without the media query) it is simply there.
   https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion */
@media (prefers-reduced-motion: no-preference) {
  .pz-home-cake { animation: pz-home-rise 1.6s cubic-bezier(0.16, 0.8, 0.24, 1) 0.15s both; }
}
@keyframes pz-home-rise {
  from { transform: translateY(38%); }
  to   { transform: translateY(0); }
}

/* ── Home: the green band and the guest path ──────────────────── */
/* .pz-home-band is the green monte that carries the main content: the
   guest path here, the feed and Your kitchen for members. Keyboard focus
   turns gold on it, so the ring stays visible on green. */
.pz-home-band { background: var(--monte); color: var(--on-monte); padding-block: 8px 80px; }
.pz-home-band :focus-visible { outline-color: var(--gold-light); }
.pz-home-band-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: 12px 32px; margin-bottom: 28px;
}
.pz-page .pz-home-band-head h2 { font-size: var(--t-xl); }
.pz-home-band-head p { color: var(--on-monte-soft); margin-top: 10px; max-width: 40rem; }
.pz-home-band .pz-home-see-all { color: var(--gold-light); }
.pz-home-see-all { font-weight: 700; white-space: nowrap; }

/* One recipe's path, marked like a mountain trail: a numbered gold stop
   (a CSS counter) and a painted path between stops. */
.pz-home-path { padding-block: 8px 96px; }
.pz-home-path .pz-home-band-head { margin-bottom: 56px; }
.pz-page .pz-home-trail { list-style: none; display: grid; gap: 88px; counter-reset: pz-stop; }
.pz-home-stop {
  position: relative; padding-inline-start: 76px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 56px; align-items: start;
}
.pz-home-stop::before {
  counter-increment: pz-stop; content: counter(pz-stop);
  position: absolute; left: 0; top: -4px;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--gold-light); color: #17201A;
  font: 800 1.25rem/1 var(--display); font-stretch: 118%;
  box-shadow: 0 0 0 6px var(--monte);
}
/* The path, painted white over yellow like a PR trail blaze. */
.pz-home-stop:not(:last-child)::after {
  content: ""; position: absolute; left: 22px; top: 54px; bottom: -82px; width: 4px;
  background: repeating-linear-gradient(to bottom, #FFFFFF 0 10px, var(--gold-light) 10px 20px, transparent 20px 38px);
}
.pz-page .pz-home-stop-text h3 {
  font-family: var(--display); font-weight: 800; font-stretch: 112%;
  font-size: var(--t-lg); line-height: 1.15; letter-spacing: -0.01em;
}
.pz-home-stop-text p { color: var(--on-monte-soft); margin-top: 12px; max-width: 30rem; }
.pz-home-stop-text .pz-home-tool-names { margin-top: 14px; font-size: var(--t-sm); }

/* Vignettes: paper cards on the green band. */
.pz-home-vignette {
  background: var(--paper); color: var(--ink);
  border-radius: 16px; padding: 22px 24px 24px;
  box-shadow: 0 34px 50px -34px rgb(0 0 0 / 0.65);
}
.pz-home-vignette :focus-visible { outline-color: var(--focus); }
.pz-home-v-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding-bottom: 14px; border-bottom: 1px solid var(--rule);
}
.pz-home-v-head .pz-dish { font-size: var(--t-lg); color: var(--dish); }
.pz-home-v-head > span { font-size: var(--t-sm); color: var(--ink-soft); }
.pz-home-v-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; font-size: var(--t-sm); color: var(--ink-soft); }
.pz-home-fake-btn { pointer-events: none; }

/* Stop 1: the kitchen card, a physical object (same colours in both themes). */
.pz-home-v-source { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.pz-note-card {
  background-color: var(--note-paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--note-rule) 31px 32px);
  background-position: 0 18px;
  color: var(--note-ink);
  font: italic 500 1.25rem/32px var(--hand);
  padding: 16px 24px 18px; border-radius: 3px;
  transform: rotate(-2.5deg);
  box-shadow: 0 22px 30px -18px rgb(0 0 0 / 0.55);
}
.pz-note-title { font-weight: 700; font-size: 1.5rem; }
.pz-note-sign { text-align: end; padding-inline-end: 12px; }
.pz-page .pz-home-source-chips { list-style: none; display: grid; gap: 8px; }
.pz-home-source-chips li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--on-monte-rule); color: var(--on-monte);
  font-weight: 600; font-size: var(--t-ui);
}
.pz-home-source-chips .pz-icon { font-size: 20px; }
.pz-home-source-chips .is-picked { background: var(--gold-light); color: #17201A; box-shadow: none; }

/* Stop 2: what was read; the unsure line is marked by an icon and words,
   the warm background only adds to them. */
.pz-page .pz-home-read-list { list-style: none; }
.pz-home-read-list li {
  display: grid; grid-template-columns: 5rem minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline;
  padding-block: 10px; border-bottom: 1px solid var(--rule);
}
.pz-home-vignette .pz-qty { font-weight: 800; font-variant-numeric: tabular-nums; }
.pz-home-orig { font-family: var(--hand); font-style: italic; color: var(--ink-soft); margin-inline-start: 8px; }
.pz-home-state { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-sm); font-weight: 700; }
.pz-home-state .pz-icon { font-size: 18px; }
.pz-home-state-ok { color: var(--good); }
.pz-home-state-check { color: var(--warn); }
.pz-home-read-list .is-unsure { background: var(--warn-bg); margin-inline: -10px; padding-inline: 10px; border-radius: 8px; border-bottom-color: transparent; }

/* Stop 3: the live servings stepper (.pz-stepper, shared with the recipe
   page) and the macros: one series, one hue, direct labels. */
.pz-page .pz-home-scaled { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin-top: 6px; }
.pz-home-scaled li { display: flex; gap: 10px; align-items: baseline; padding-block: 8px; border-bottom: 1px solid var(--rule); }
.pz-home-scaled .pz-qty { min-width: 4.4rem; }
.pz-home-v-nutri { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 28px; align-items: center; margin-top: 20px; }
.pz-home-kcal { display: grid; line-height: 1.1; }
.pz-home-kcal strong { font: 800 2.5rem/1.1 var(--display); font-stretch: 118%; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pz-home-kcal span { font-size: var(--t-sm); color: var(--ink-soft); }
.pz-home-macros { display: grid; gap: 10px; }
.pz-home-macros > div { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr) 3.4rem; gap: 10px; align-items: center; }
.pz-home-macros dt { font-size: var(--t-sm); color: var(--ink-soft); }
.pz-home-macros dd { display: contents; }
.pz-home-meter { position: relative; height: 8px; border-radius: 4px; background: var(--rule); overflow: hidden; }
.pz-home-meter > span { position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); background: var(--dish); border-radius: 4px; }
.pz-home-val { font-size: var(--t-sm); font-weight: 700; text-align: end; font-variant-numeric: tabular-nums; }

/* Stop 4: the week and one shopping list. */
.pz-home-v-plan { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; }
.pz-home-v-sub { font-weight: 800; font-size: var(--t-ui); padding-bottom: 8px; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 12px; }
.pz-home-v-sub span { font-weight: 400; color: var(--ink-soft); font-size: var(--t-sm); }
.pz-page .pz-home-mini-week, .pz-page .pz-home-mini-list { list-style: none; }
.pz-home-mini-week li {
  display: grid; grid-template-columns: 2.8rem minmax(0, 1fr) auto; gap: 10px; align-items: baseline;
  padding-block: 7px; border-bottom: 1px solid var(--rule);
}
.pz-home-d { font-size: var(--t-sm); font-weight: 700; color: var(--ink-soft); }
.pz-home-mini-week .pz-dish { color: var(--dish); }
.pz-home-mini-week .pz-home-empty, .pz-home-for { font-size: var(--t-sm); color: var(--ink-soft); }
.pz-home-mini-week .is-new { background: var(--gold-wash); margin-inline: -10px; padding-inline: 10px; border-radius: 8px; border-bottom-color: transparent; }
.pz-home-mini-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding-block: 7px; border-bottom: 1px solid var(--rule); font-size: var(--t-ui); }
.pz-home-box { width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--ink-soft); }
.pz-home-box.is-done { background: var(--dish); box-shadow: none; }
.pz-home-mini-list .is-done-row { color: var(--ink-soft); text-decoration: line-through; }
.pz-home-amt { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Stop 5: one ingredient, three languages. */
.pz-home-langs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pz-home-langs p { display: grid; gap: 2px; }
.pz-home-word { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1.05; color: var(--dish); }
.pz-home-lang-name { font-size: var(--t-sm); color: var(--ink-soft); }

/* Closing invitation, back on the ground. */
.pz-home-closing { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px 40px; align-items: center; padding-block: 72px 80px; }
.pz-home-closing-cake { width: 96px; height: 96px; }
.pz-page .pz-home-closing h2 { font-size: var(--t-xl); }
.pz-home-closing p { color: var(--ink-soft); margin-top: 10px; max-width: 36rem; }

/* Below 600 px the path is one column: each stop's text first, then its
   vignette; the closing stacks too. */
@media only screen and (max-width: 600px) {
  .pz-home-stop { grid-template-columns: minmax(0, 1fr); padding-inline-start: 60px; gap: 20px; }
  .pz-page .pz-home-trail { gap: 64px; }
  .pz-home-stop:not(:last-child)::after { bottom: -58px; }
  .pz-home-v-source, .pz-home-v-plan, .pz-home-v-nutri { grid-template-columns: minmax(0, 1fr); }
  .pz-page .pz-home-scaled { grid-template-columns: minmax(0, 1fr); }
  .pz-home-closing { grid-template-columns: minmax(0, 1fr); }
}

/* ── Home: member greeting and search ─────────────────────────── */
/* One pill-shaped field: icon, input, Search button. The whole pill shows
   the focus (:focus-within), so the input itself needs no outline. Button
   and input are at least 44 px tall (WCAG 2.5.5 target size). */
.pz-home-search {
  display: flex; align-items: center; gap: 6px;
  margin-top: 26px; max-width: 42rem;
  padding: 6px 6px 6px 18px;
  background: var(--paper); border: 1.5px solid var(--rule); border-radius: 999px;
  box-shadow: 0 14px 30px -22px var(--shadow);
}
.pz-home-search:focus-within { border-color: var(--monte); box-shadow: 0 0 0 3px color-mix(in srgb, var(--monte) 28%, transparent); }
.pz-home-search > .pz-icon { color: var(--ink-soft); }
.pz-page .pz-home-search input {
  flex: 1; min-width: 0; min-height: 44px; margin: 0; border: 0; outline: none; box-shadow: none;
  background: transparent; font: 400 var(--t-md)/1.2 var(--sans); color: var(--ink); padding: 10px 6px;
}
.pz-page .pz-home-search input:focus-visible { outline: none; }
.pz-home-search input::placeholder { color: var(--ink-soft); }
.pz-home-search-icon { display: none; }
/* Narrow screens: the Search button becomes a round icon button. */
@media only screen and (max-width: 600px) {
  .pz-home-search { padding-inline-start: 14px; }
  .pz-page .pz-home-search input { font-size: var(--t-ui); }
  .pz-home-search .pz-btn { width: 44px; min-width: 44px; padding: 0; }
  .pz-home-search-icon { display: inline; margin: 0; }
  .pz-home-search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ── Home: feed cards (_recipe_card.html, layouts feature and row) ─ */
/* Both live on the green band, so text uses the on-monte tokens. The grid
   card of the recipe list (.pz-lcard) is not touched by these rules. */
.pz-fcard { min-width: 0; }
.pz-page .pz-fcard h3 a { color: var(--on-monte); text-decoration: none; }
.pz-page .pz-fcard h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.pz-fcard-desc { color: var(--on-monte-soft); margin-top: 6px; }
.pz-fcard-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  margin-top: 10px; font-size: var(--t-sm); color: var(--on-monte-soft);
}
.pz-fcard-meta .pz-meta-item .pz-icon { color: var(--gold-light); }
/* An uploaded avatar uses the same 24 px circle as the initial. */
img.pz-author-dot { object-fit: cover; }

/* feature: the large first card. */
.pz-page .pz-fcard-photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; }
.pz-page .pz-fcard-feature h3 { font-size: 2rem; line-height: 1.1; margin-top: 18px; }

/* row: round thumbnail beside the text; the actions sit under the text, so
   the name and description keep the whole column even when the rows share
   the band with the feature card (≥ 1100 px). */
.pz-fcard-row {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 4px 16px; align-items: center;
}
.pz-fcard-row .pz-fcard-actions { grid-column: 2; }
.pz-page .pz-fcard-thumb { width: 88px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.pz-page .pz-fcard-row h3 { font-size: var(--t-md); line-height: 1.2; }
.pz-fcard-row .pz-fcard-desc { font-size: var(--t-sm); margin-top: 2px; }
.pz-fcard-row .pz-fcard-meta { margin-top: 6px; }

/* Actions on green: pill buttons with a label (feature), icons only (row).
   Each is at least 44 px (WCAG 2.5.5). The "⋯" menu opens under its trigger,
   anchored to the actions box; below 600 px it is a bottom sheet
   ([data-pz-sheet], see Menus). */
.pz-fcard-actions { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pz-fcard-actions-icons { margin-top: 0; gap: 2px; flex-wrap: nowrap; }
.pz-act {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; min-width: 44px; padding: 6px 14px; margin: 0;
  border-radius: 999px; border: 0; background: transparent; cursor: pointer;
  color: var(--on-monte); font: 700 var(--t-sm)/1.1 var(--sans);
  box-shadow: inset 0 0 0 1.5px var(--on-monte-rule);
}
.pz-act:hover { background: rgb(255 255 255 / 0.1); }
.pz-act:disabled { opacity: 0.6; cursor: default; }
.pz-act .pz-icon { font-size: 19px; }
.pz-act[aria-pressed="true"] .pz-icon { font-variation-settings: "FILL" 1; color: var(--gold-light); }
.pz-act-icon, .pz-fcard-actions-icons .pz-act { width: 44px; padding: 0; box-shadow: none; }
/* Dropdown position from 601 px only: below that the bottom-sheet rule
   (top: auto) must win, and this selector is more specific than it. */
@media only screen and (min-width: 601px) {
  .pz-fcard-actions .pz-card-menu { top: calc(100% + 6px); width: min(18rem, calc(100vw - 32px)); }
}

/* ── Home: member layout and widgets ──────────────────────────── */
/* Order everywhere (R34): greeting · feed · Your kitchen · People who cook ·
   Most saved. Mobile first: one column; the media queries below add columns.
     ≥ 600 px  Your kitchen beside the feed
     ≥ 860 px  People who cook and Most saved side by side
     ≥ 1100 px the feature card and the rows side by side */
.pz-home-band-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.pz-home-feed-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.pz-home-feed-rows > .pz-fcard-row { padding-block: 16px; border-top: 1px solid var(--on-monte-rule); }
.pz-home-feed-rows > .pz-fcard-row:first-child { padding-top: 0; border-top: 0; }

/* Your kitchen: paper widgets stacked in the side column. */
.pz-home-widgets { display: grid; gap: 16px; }
.pz-home-widget {
  background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 14px;
  padding: 18px 20px 20px; min-width: 0;
}
.pz-home-widget :focus-visible { outline-color: var(--focus); }
.pz-home-widget-add { background: var(--meadow); border-color: transparent; }
.pz-home-widget-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; }
.pz-home-widget-head a { font-size: var(--t-sm); font-weight: 700; }
.pz-page .pz-home-widget h3 {
  font-family: var(--display); font-weight: 800; font-stretch: 112%;
  font-size: var(--t-md); line-height: 1.2; letter-spacing: -0.01em;
}
.pz-home-widget > h3 { margin-bottom: 12px; }
.pz-page .pz-home-widget h3 a { color: var(--ink); text-decoration: none; }
.pz-page .pz-home-widget h3 a:hover { text-decoration: underline; }
.pz-home-widget-note { font-size: var(--t-sm); color: var(--ink-soft); margin-top: 12px; line-height: 1.45; }
.pz-home-widget-note:first-child { margin-top: 0; }
.pz-home-widget .pz-btn { margin-top: 14px; }

/* "Add a recipe from": the 7 sources as tiles, 44 px or taller. */
.pz-page .pz-home-sources { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.pz-home-sources a {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px; border-radius: 10px;
  background: var(--paper); color: var(--ink); text-decoration: none; font-size: var(--t-sm); font-weight: 600;
}
.pz-home-sources a:hover { box-shadow: inset 0 0 0 1.5px var(--monte); }
.pz-home-sources .pz-icon { color: var(--dish); font-size: 20px; }

/* Sections on the ground: People who cook and Most saved this week. */
.pz-home-community { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px 72px; padding-block: 72px 80px; }
.pz-home-section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 24px; margin-bottom: 20px;
}
.pz-page .pz-home-section-head h2 { font-size: var(--t-lg); letter-spacing: -0.01em; }

.pz-page .pz-home-people { list-style: none; }
.pz-home-person {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding-block: 14px; border-top: 1px solid var(--rule);
}
.pz-home-person:first-child { border-top: 0; padding-top: 0; }
.pz-home-person-avatar {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; flex: none;
  font-weight: 800; font-size: var(--t-md); color: #FFFFFF; background: var(--monte); object-fit: cover;
}
.pz-page .pz-home-person-name { font-weight: 800; color: var(--ink); text-decoration: none; }
.pz-page .pz-home-person-name:hover { text-decoration: underline; }
.pz-home-person-meta { font-size: var(--t-sm); color: var(--ink-soft); }
.pz-page .pz-home-person-meta .pz-dish { color: var(--ink); }

/* Most saved this week: a real ranking, so it is numbered. */
.pz-page .pz-home-ranked { list-style: none; }
.pz-home-ranked li {
  display: grid; grid-template-columns: 28px 56px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding-block: 12px; border-top: 1px solid var(--rule);
}
.pz-home-ranked li:first-child { border-top: 0; padding-top: 0; }
.pz-home-rank {
  font: 800 var(--t-lg)/1 var(--display); font-stretch: 118%;
  color: var(--gold-text); font-variant-numeric: tabular-nums;
}
.pz-page .pz-home-ranked img { width: 56px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.pz-page .pz-home-ranked h3 { font-size: var(--t-md); line-height: 1.2; }
.pz-page .pz-home-ranked h3 a { color: var(--ink); text-decoration: none; }
.pz-page .pz-home-ranked h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.pz-home-saves { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-soft); font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.pz-home-saves .pz-icon { color: var(--gold); font-size: 17px; }

/* Empty and error states. On the green band they use the on-monte colours. */
.pz-home-empty { display: grid; gap: 14px; justify-items: start; }
.pz-home-empty p { color: var(--ink-soft); }
.pz-home-band .pz-home-empty p { color: var(--on-monte-soft); }
.pz-home-widget-error { display: flex; align-items: center; gap: 8px; color: var(--crit); font-weight: 600; font-size: var(--t-sm); }
.pz-home-widget-error .pz-icon { font-size: 20px; }
.pz-home-band > .pz-wrap > section > .pz-home-widget-error { color: var(--gold-light); }

@media only screen and (min-width: 601px) {
  .pz-home-band-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}
@media (min-width: 861px) {
  .pz-home-community { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1101px) {
  .pz-home-band-grid { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); }
  .pz-home-feed-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; }
}
@media only screen and (max-width: 600px) {
  .pz-fcard-row { grid-template-columns: 64px minmax(0, 1fr); }
  .pz-page .pz-fcard-thumb { width: 64px; }
  .pz-home-person { grid-template-columns: 44px minmax(0, 1fr); }
  .pz-home-person-avatar { width: 44px; height: 44px; }
  .pz-home-person .pz-btn { grid-column: 2; justify-self: start; }
}

/* ── Home: This week strip and Shopping list preview ──────────── */
/* Planned / free is readable without colour (WCAG 1.4.1): a planned day is
   a filled cell with a check, a free day a hatched outline with a dash, and
   both carry words for screen readers. Today adds a gold ring and bolder
   text. Icon on fill: --paper on --dish, which stays AA in both themes. */
.pz-page .pz-home-wk-strip { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.pz-home-wk-strip li { display: grid; justify-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.pz-home-wk-cell {
  display: grid; place-items: center; width: 100%; height: 34px; border-radius: 6px;
  background: var(--dish); color: var(--paper);
}
.pz-home-wk-cell .pz-icon { font-size: 18px; }
.pz-home-wk-strip .is-free .pz-home-wk-cell {
  background: transparent; color: var(--ink-soft);
  box-shadow: inset 0 0 0 1.5px var(--ink-soft);
  background-image: repeating-linear-gradient(135deg, var(--rule) 0 2px, transparent 2px 7px);
}
.pz-home-wk-strip .is-today { color: var(--ink); font-weight: 800; }
.pz-home-wk-strip .is-today .pz-home-wk-cell { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--gold); }
.pz-home-wk-strip .is-free.is-today .pz-home-wk-cell { box-shadow: inset 0 0 0 1.5px var(--ink-soft), 0 0 0 2px var(--paper), 0 0 0 4px var(--gold); }

.pz-page .pz-home-shop-list { list-style: none; }
.pz-home-shop-list li {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  padding-block: 8px; font-size: var(--t-ui);
}
.pz-home-shop-list li + li { border-top: 1px solid var(--rule); }
.pz-home-shop-list .pz-home-amt { color: var(--ink-soft); white-space: nowrap; }

/* ═════════════════════════════════════════════════════════════════
   Shared page components (moved from docs/design/plaza-5/mock.css)
   The Plaza 5 mocks proposed them; the first slice that needs one moves it
   here with the same name (docs/08-ai-workflow/design-process.md). First
   user: the recipe editor (errezeta/recipe_builder.html).
   ═════════════════════════════════════════════════════════════════ */

/* ── Green title band: one component for every page head ───────
   plaza.css has three near-identical bands (.pz-list-head, .pz-sl-head,
   .pz-admin-head); new pages use this one, a later tidy can fold them in. */
.pz-band { background: var(--monte); color: var(--on-monte); padding-block: 28px 32px; }
.pz-band :focus-visible { outline-color: var(--gold-light); }
.pz-band-inner { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; }
.pz-band-text { min-width: 0; max-width: 46rem; }
.pz-page .pz-band-title { color: var(--on-monte); font-size: var(--t-xl); }
.pz-band-sub { font-size: var(--t-md); color: var(--on-monte-soft); margin-top: 8px; }
.pz-band-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* Overrides the recipe page's .pz-page .pz-back (more specific): tighter, above the title. */
.pz-page .pz-band .pz-back { margin-bottom: 10px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--t-sm); text-decoration: none; color: var(--on-monte-soft); }
.pz-band .pz-back .pz-icon { font-size: 18px; }

/* Page body under the band */
.pz-body { padding-block: 32px 64px; }
.pz-body-narrow { max-width: 48rem; }
.pz-body > .pz-banner { margin-bottom: 24px; }

/* A column of panels */
.pz-stack { display: grid; gap: 24px; min-width: 0; }

/* A paper panel that groups one task (a form section, a result) */
.pz-panel { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 20px 22px 22px; min-width: 0; }
.pz-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.pz-page .pz-panel-head h2 { font-size: var(--t-md); font-stretch: 112%; letter-spacing: -0.01em; line-height: 1.2; }
.pz-panel-head p { font-size: var(--t-sm); color: var(--ink-soft); flex-basis: 100%; }
.pz-panel-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }

/* ── Preferences (moved from docs/design/plaza-5/mock.css) ─────── */
.pz-settings { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 40px; align-items: start; }
.pz-settings-nav { position: sticky; top: calc(var(--header-h) + 20px); }
.pz-page .pz-settings-nav ul { list-style: none; display: grid; gap: 2px; }
.pz-page .pz-settings-nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: 10px; color: var(--ink); font-weight: 600; text-decoration: none; }
.pz-page .pz-settings-nav a:hover { background: var(--meadow); }
.pz-page .pz-settings-nav a[aria-current="true"] { background: var(--monte); color: var(--on-monte); }
.pz-settings-nav .pz-icon { font-size: 20px; }

.pz-rule-rows { list-style: none; }
.pz-rule-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding-block: 10px; border-bottom: 1px solid var(--rule); }
.pz-rule-row strong { display: flex; align-items: center; gap: 8px; }
.pz-rule-row strong .pz-icon { color: var(--dish); font-size: 20px; }
.pz-rule-row small { display: block; font-size: var(--t-sm); color: var(--ink-soft); }
.pz-rule-row .pz-rule-value { grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--t-sm); }
.pz-rule-row .pz-rule-value .pz-input { width: 7rem; min-height: 40px; padding-block: 6px; }
.pz-rule-row.is-off .pz-rule-value { display: none; }
/* Tag rules (require/exclude a tag): a real multi-select, tall enough to read
   several tags at once, with its "hold Ctrl" hint below it. */
.pz-rule-row .pz-rule-value .pz-tag-multi { width: min(100%, 20rem); min-height: 0; height: auto; padding: 6px; overflow-y: auto; }
.pz-tag-multi option { padding: 6px 10px; border-radius: 8px; }
.pz-tag-multi option:checked { background: var(--meadow); color: var(--ink); font-weight: 700; }
.pz-tag-multi:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pz-field-hint { flex-basis: 100%; font-size: var(--t-sm); color: var(--ink-soft); }

.pz-langs-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pz-langs-pick label { position: relative; cursor: pointer; }
.pz-langs-pick input { position: absolute; opacity: 0; }
.pz-langs-pick span { display: grid; gap: 2px; padding: 14px 16px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--rule); }
.pz-langs-pick b { font: 700 italic 1.5rem/1.1 var(--hand); color: var(--dish); }
.pz-langs-pick small { font-size: var(--t-sm); color: var(--ink-soft); }
.pz-langs-pick input:checked + span { box-shadow: inset 0 0 0 2px var(--monte); background: var(--meadow); }
.pz-langs-pick input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Recipe source (planner): radio cards, same pattern as .pz-langs-pick. */
.pz-source-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 10px; }
.pz-source-pick label { position: relative; display: flex; cursor: pointer; }
.pz-source-pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pz-source-pick span { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 12px 16px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--rule); color: var(--ink); transition: box-shadow 0.12s ease, background-color 0.12s ease; }
.pz-source-pick span::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--rule); background: var(--ground); }
.pz-source-pick b { font: 600 var(--t-ui)/1.25 var(--sans); }
.pz-source-pick label:hover input:not(:checked) + span { box-shadow: inset 0 0 0 1.5px var(--monte); }
.pz-source-pick input:checked + span { box-shadow: inset 0 0 0 2px var(--monte); background: var(--meadow); }
.pz-source-pick input:checked + span::before { box-shadow: inset 0 0 0 5px var(--monte); }
.pz-source-pick input:checked + span b { color: var(--dish); }
.pz-source-pick input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

.pz-avatar-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.pz-avatar-edit .pz-person-avatar { width: 80px; height: 80px; font-size: var(--t-lg); }
.pz-remove-photo { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--ink-soft); cursor: pointer; }
.pz-remove-photo input { accent-color: var(--crit); }

.pz-connected { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.pz-connected-logo { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ground); box-shadow: inset 0 0 0 1px var(--rule); font: 800 var(--t-md)/1 var(--sans); color: var(--ink); }

.pz-pass { position: relative; }
.pz-pass .pz-icon-btn { position: absolute; inset-inline-end: 0; top: 0; color: var(--ink-soft); }
.pz-rules-pass { list-style: none; display: grid; gap: 2px; font-size: var(--t-sm); color: var(--ink-soft); }
.pz-rules-pass li { display: flex; align-items: center; gap: 6px; }
.pz-rules-pass .pz-icon { font-size: 16px; }
.pz-rules-pass .is-ok { color: var(--good); }

/* Similarity sliders (Preferences > Recipes for the planner): the 44 px tall
   range input keeps a touch-sized hit area; the thumb is a ~22 px dot drawn
   with a transparent border + background-clip. */
.pz-range-row { display: flex; align-items: center; gap: 14px; }
.pz-range-row output { min-width: 3ch; text-align: end; font-weight: 600; }
.pz-range { flex: 1; min-width: 0; height: 44px; margin: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
.pz-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--rule); }
.pz-range::-moz-range-track { height: 6px; border-radius: 3px; background: var(--rule); }
.pz-range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 44px; margin-top: -19px; border: 11px solid transparent; border-radius: 50%; background: var(--btn); background-clip: content-box; }
.pz-range::-moz-range-thumb { box-sizing: border-box; width: 44px; height: 44px; border: 11px solid transparent; border-radius: 50%; background: var(--btn); background-clip: content-box; }
.pz-range:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 22px; }
.pz-range:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── "Add a recipe from a source" (moved from docs/design/plaza-5/mock.css) ── */
.pz-section-title { font-size: var(--t-lg); letter-spacing: -0.01em; padding-bottom: 12px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; }
.pz-or { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-size: var(--t-sm); }
.pz-or::before, .pz-or::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }

.pz-file-chosen { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px; border-radius: 12px; background: var(--ground); border: 1px solid var(--rule); }
.pz-file-chosen img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.pz-file-chosen small { display: block; font-size: var(--t-sm); color: var(--ink-soft); }
/* A round icon badge for a file that has no photo of its own (the File source's .json). */
.pz-thumb { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--meadow); display: grid; place-items: center; font-weight: 800; color: var(--dish); font-size: var(--t-sm); }

/* Tabs linking to the 7 ways to add a recipe (PZ_ADD_SOURCES); current one gold. */
.pz-source-tabs { display: flex; gap: 6px; margin-top: 20px; overflow-x: auto; padding-bottom: 4px; }
.pz-source-tabs a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  color: var(--on-monte); text-decoration: none; font-weight: 700; font-size: var(--t-sm); white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px var(--on-monte-rule);
}
.pz-source-tabs a:hover { background: rgb(255 255 255 / 0.1); }
.pz-source-tabs a[aria-current="page"] { background: var(--gold-light); color: #17201A; box-shadow: none; }
.pz-source-tabs .pz-icon { font-size: 20px; }

/* Step progress of a flow (1 Give it · 2 Check · 3 Save) */
.pz-progress { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; counter-reset: pz-prog; margin-top: 18px; }
.pz-progress li { display: inline-flex; align-items: center; gap: 8px; color: var(--on-monte-soft); font-weight: 600; font-size: var(--t-sm); }
.pz-progress li::before {
  counter-increment: pz-prog; content: counter(pz-prog);
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--on-monte-rule); font-weight: 800;
}
.pz-progress [aria-current="step"] { color: var(--on-monte); }
.pz-progress [aria-current="step"]::before { background: var(--gold-light); color: #17201A; box-shadow: none; }
.pz-progress .is-done::before { content: "✓"; background: rgb(255 255 255 / 0.16); box-shadow: none; color: var(--on-monte); }

/* Live step-by-step list (add_source.js moves each <li> through these
   states). The spin animation is already muted for reduced motion by the
   blanket ".pz-page *" rule above (R16). */
.pz-pipeline { list-style: none; display: grid; gap: 0; }
.pz-pipeline li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding-block: 8px; font-size: var(--t-ui); }
.pz-pipeline li + li { border-top: 1px solid var(--rule); }
.pz-pipeline .pz-icon { font-size: 20px; color: var(--good); }
.pz-pipeline .is-running .pz-icon { color: var(--ink-soft); animation: pz-spin 1.2s linear infinite; }
.pz-pipeline .is-waiting { color: var(--ink-soft); }
.pz-pipeline .is-waiting .pz-icon { color: var(--rule); }
.pz-pipeline .is-skipped { color: var(--ink-soft); }
.pz-pipeline .is-skipped .pz-icon { color: var(--ink-soft); }
.pz-pipeline .is-failed { color: var(--crit); }
.pz-pipeline .is-failed .pz-icon { color: var(--crit); }
.pz-pipeline small { font-size: var(--t-sm); color: var(--ink-soft); }

/* Voice recording (the "Voice" source, R8, R16) */
.pz-record { display: grid; justify-items: center; gap: 12px; padding: 24px; }
.pz-record-btn {
  display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--crit); color: #FFFFFF; box-shadow: 0 0 0 8px var(--crit-bg);
}
.pz-record-btn .pz-icon { font-size: 40px; }
.pz-record-btn:disabled { background: var(--rule); box-shadow: none; cursor: not-allowed; }
.pz-record-time { font: 800 var(--t-xl)/1 var(--display); font-stretch: 118%; font-variant-numeric: tabular-nums; }
.pz-wave { display: flex; align-items: center; gap: 3px; height: 40px; }
.pz-wave i { width: 4px; border-radius: 2px; background: var(--dish); height: calc(var(--h) * 1%); }

/* Check screen: "What you gave" next to "What Jan read" (R20-R22).
   One column below 860 px — see the Responsive section at the end. */
.pz-read { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: start; }

/* Ingredient lines: qty input · unit input · name input (+ the original
   raw line underneath) · state · ×. Editable, unlike the mock's static
   spans, so the grid is defined on the inputs' own classes rather than on
   fixed child positions. */
.pz-read-list { list-style: none; }
.pz-read-list li { display: grid; grid-template-columns: 4.6rem 4rem minmax(0, 1fr) auto 44px; gap: 4px 12px; align-items: center; padding-block: 10px; border-bottom: 1px solid var(--rule); }
.pz-read-list .is-unsure { background: var(--warn-bg); margin-inline: -10px; padding-inline: 10px; border-radius: 8px; border-bottom-color: transparent; }
.pz-read-qty, .pz-read-unit { min-height: 42px; }
.pz-read-name { min-width: 0; display: grid; gap: 2px; }
.pz-read-name .pz-input { min-height: 42px; }
.pz-orig { font-family: var(--hand); font-style: italic; color: var(--ink-soft); }

/* Step lines: a gold CSS-counter number, the textarea, × (R21). */
.pz-read-steps { list-style: none; counter-reset: pz-rs; }
.pz-read-steps li { display: grid; grid-template-columns: 2rem minmax(0, 1fr) 44px; gap: 10px; align-items: start; padding-block: 10px; border-bottom: 1px solid var(--rule); }
.pz-read-steps li::before { counter-increment: pz-rs; content: counter(pz-rs); font: 800 var(--t-md)/1.3 var(--display); color: var(--gold-text); }
.pz-read-steps .is-unsure { background: var(--warn-bg); margin-inline: -10px; padding-inline: 10px; border-radius: 8px; }
.pz-read-steps small { display: block; color: var(--warn); font-weight: 700; font-size: var(--t-xs); margin-top: 4px; }

/* Found / Check / New to the catalog, per ingredient line (R22, R23). */
.pz-state { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-sm); font-weight: 700; }
.pz-state .pz-icon { font-size: 18px; }
.pz-state-ok { color: var(--good); }
.pz-state-check { color: var(--warn); }
.pz-state-new { color: var(--gold-text); }

.pz-meter-conf { display: grid; grid-template-columns: auto minmax(6rem, 10rem) auto; gap: 10px; align-items: center; font-size: var(--t-sm); color: var(--ink-soft); }

/* ── Forms (with .pz-field / .pz-input of the dialog section) ── */
.pz-form { display: grid; gap: 16px; }
.pz-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pz-form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
select.pz-input { appearance: auto; }
/* The name of a dish, typed in the notebook hand */
.pz-input-lg { font: 700 italic 1.75rem/1.2 var(--hand); color: var(--dish); padding-block: 8px; }
.pz-field-error { font-size: var(--t-sm); font-weight: 600; color: var(--crit); }
.pz-input.is-invalid { border-color: var(--crit); }
.pz-req { color: var(--crit); }
.pz-check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: var(--t-ui); }
.pz-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--btn); flex: none; }
.pz-input-icon { position: relative; }
.pz-input-icon .pz-icon { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); font-size: 20px; pointer-events: none; }
.pz-input-icon .pz-input { padding-inline-start: 42px; }

/* Segmented choice: real radios, the label is the button */
.pz-seg { display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 2px; border-radius: 999px; background: var(--ground); box-shadow: inset 0 0 0 1px var(--rule); }
.pz-seg label { position: relative; cursor: pointer; }
.pz-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pz-seg span { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 14px; border-radius: 999px; font-size: var(--t-sm); font-weight: 700; color: var(--ink-soft); }
.pz-seg .pz-icon { font-size: 18px; }
.pz-seg input:checked + span { background: var(--monte); color: #FFFFFF; }
.pz-seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ── Toggle chips (tags, filters) ─────────────────────────────── */
/* As buttons: aria-pressed. As form fields: .pz-chip-check below. */
.pz-chipset { display: flex; flex-wrap: wrap; gap: 6px; }
.pz-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px; border-radius: 999px;
  border: 0; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
  font: 600 var(--t-sm)/1.2 var(--sans); box-shadow: inset 0 0 0 1px var(--rule); white-space: nowrap;
}
.pz-chip:hover { box-shadow: inset 0 0 0 1.5px var(--monte); }
.pz-chip[aria-pressed="true"], .pz-chip[aria-current="true"] { background: var(--ink); color: var(--ground); box-shadow: none; }
.pz-chip .pz-icon { font-size: 18px; }
.pz-chip-count { font-weight: 400; opacity: 0.75; font-variant-numeric: tabular-nums; }
.pz-chip-x { margin-inline-end: -6px; }
.pz-chipset-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }

/* Week switch (This week / Next week) — a segmented control under the band (R24).
   The two pills are joined into one track; the active week is filled with --monte. */
.pz-week-switch { display: flex; flex-wrap: wrap; gap: 0; padding-block: 6px 14px; }
.pz-week-switch .pz-chip { min-height: 44px; padding-inline: 18px; border-radius: 0; justify-content: center; }
.pz-week-switch .pz-chip + .pz-chip { margin-inline-start: -1px; }
.pz-week-switch .pz-chip:first-child { border-start-start-radius: 999px; border-end-start-radius: 999px; }
.pz-week-switch .pz-chip:last-child { border-start-end-radius: 999px; border-end-end-radius: 999px; }
.pz-week-switch .pz-chip[aria-current="true"] { background: var(--monte); color: #FFFFFF; box-shadow: inset 0 0 0 1px var(--monte); }
.pz-week-switch .pz-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; position: relative; z-index: 1; }
/* The same control with radios ("Plan a week" form): <label class="pz-chip-check"><input type="radio"><span class="pz-chip">.
   The joined edges move to the labels, and the checked radio fills its pill like aria-current. */
.pz-week-pick { padding-block: 0; }
.pz-week-pick .pz-chip-check + .pz-chip-check { margin-inline-start: -1px; }
.pz-week-pick .pz-chip-check .pz-chip { margin: 0; border-radius: 0; }
.pz-week-pick .pz-chip-check:first-child .pz-chip { border-start-start-radius: 999px; border-end-start-radius: 999px; }
.pz-week-pick .pz-chip-check:last-child .pz-chip { border-start-end-radius: 999px; border-end-end-radius: 999px; }
.pz-week-pick .pz-chip-check input:checked + .pz-chip { background: var(--monte); color: #FFFFFF; box-shadow: inset 0 0 0 1px var(--monte); }
.pz-week-pick .pz-chip-check input:focus-visible + .pz-chip { position: relative; z-index: 1; }

/* Shopping-list share bar above the list (R15, R20): a .pz-widget like the
   planner's "Share the week", with ≥44 px chips. */
.pz-sl-share { margin-bottom: 16px; }
.pz-sl-share .pz-chip { min-height: 44px; }

/* Checkbox chip: <label class="pz-chip-check"><input type="checkbox"><span class="pz-chip">.
   The real checkbox lies invisibly over the pill (it is still focusable,
   submitted and read by screen readers); the pill shows its state.
   Same pattern as .pz-seg: https://developer.mozilla.org/en-US/docs/Web/CSS/:checked */
.pz-chip-check { position: relative; display: inline-flex; }
.pz-chip-check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pz-chip-check:hover input:not(:checked) + .pz-chip { box-shadow: inset 0 0 0 1.5px var(--monte); }
.pz-chip-check input:checked + .pz-chip { background: var(--ink); color: var(--ground); box-shadow: none; }
.pz-chip-check input:focus-visible + .pz-chip { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ── File drop zone: a <label> around a file input ──────────── */
.pz-drop {
  position: relative;
  display: grid; justify-items: center; gap: 8px; padding: 28px 20px; text-align: center; cursor: pointer;
  border: 2px dashed var(--rule); border-radius: 14px; background: var(--ground); color: var(--ink-soft);
}
.pz-drop:hover, .pz-drop:focus-within { border-color: var(--monte); color: var(--ink); }
.pz-drop.is-invalid { border-color: var(--crit); }
.pz-drop .pz-icon { font-size: 34px; color: var(--dish); }
.pz-drop strong { color: var(--ink); font-size: var(--t-ui); }
.pz-drop small { font-size: var(--t-xs); }
/* The input stays in the page (keyboard, screen readers), just invisible. */
.pz-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* ── Banners: info, warning, error, and the gold "draft" note ─ */
.pz-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: var(--t-ui); background: var(--meadow); color: var(--ink); }
.pz-banner > .pz-icon { flex: none; color: var(--dish); }
.pz-banner p + p { margin-top: 4px; }
.pz-banner.is-warn { background: var(--warn-bg); }
.pz-banner.is-warn > .pz-icon { color: var(--warn); }
.pz-banner.is-crit { background: var(--crit-bg); }
.pz-banner.is-crit > .pz-icon { color: var(--crit); }
/* display:flex above would win over the [hidden] attribute */
.pz-banner[hidden] { display: none; }
.pz-banner ul { margin: 4px 0 0; padding-inline-start: 18px; }
.pz-banner li { margin-top: 2px; overflow-wrap: anywhere; }
.pz-banner.is-gold { background: var(--gold-wash); }
.pz-banner.is-gold > .pz-icon { color: var(--gold-text); }
.pz-banner .pz-banner-act { margin-inline-start: auto; flex: none; }

/* ── Empty state (generalises .pz-list-empty) ───────────────────
   :not(li) — the recipe page already uses li.pz-empty for "No steps
   listed." inside its lists (see .pz-ingr-list li.pz-empty), which must
   not become a card. */
.pz-empty:not(li) { display: grid; gap: 12px; justify-items: start; max-width: 36rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 28px 24px; }
.pz-page .pz-empty:not(li) h2 { font-size: var(--t-lg); }
.pz-empty:not(li) p { color: var(--ink-soft); }

/* ── Sticky action bar at the bottom of an editor (Save / Cancel) ─
   position: sticky keeps it at the bottom of the screen while its
   container scrolls; no ancestor may have overflow: hidden, or it stops
   sticking: https://developer.mozilla.org/en-US/docs/Web/CSS/position#sticky */
.pz-actionbar {
  position: sticky; bottom: 0; z-index: 20; background: var(--paper);
  border-top: 1px solid var(--rule); box-shadow: 0 -12px 30px -20px var(--shadow);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.pz-actionbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-height: 68px; padding-block: 10px; }
.pz-actionbar-note { font-size: var(--t-sm); color: var(--ink-soft); margin-inline-end: auto; }
.pz-actionbar-note strong { color: var(--ink); }

/* ═════════════════════════════════════════════════════════════════
   Tools dashboard & nutrition tools (spec plaza-tools-nutrition)
   Shared components moved from docs/design/plaza-5/mock.css with the
   same names and tokens: the .pz-tools/.pz-tool card grid, the data
   table (.pz-table) and its share-bar, and the two-column .pz-two.
   Reused later by the admin console and the trending list.
   ═════════════════════════════════════════════════════════════════ */

/* Data tables (nutrition breakdown, admin console) */
.pz-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pz-table { width: 100%; border-collapse: collapse; font-size: var(--t-ui); }
.pz-table th, .pz-table td { text-align: start; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.pz-table thead th { font-size: var(--t-sm); font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.pz-table tbody tr:last-child > * { border-bottom: 0; }
.pz-table .is-num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pz-table .is-act { text-align: end; white-space: nowrap; width: 1%; }
.pz-table .is-chk { width: 36px; }
.pz-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--btn); }
.pz-table tbody tr:hover { background: color-mix(in srgb, var(--meadow) 45%, transparent); }
.pz-table .pz-dish { font-size: var(--t-base); color: var(--dish); }

/* Tool cards: icon + title + one-line description */
.pz-tools { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 14px; }
.pz-tool {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; align-items: start; height: 100%;
  padding: 16px 18px; border-radius: 14px; background: var(--paper); border: 1px solid var(--rule); color: var(--ink); text-decoration: none;
}
.pz-tool:hover { border-color: var(--monte); }
.pz-tool .pz-icon { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--meadow); color: var(--dish); }
.pz-tool strong { font-size: var(--t-base); }
.pz-tool small { font-size: var(--t-sm); color: var(--ink-soft); line-height: 1.4; }
.pz-tool.is-soon { background: transparent; border-style: dashed; color: var(--ink-soft); }

/* One energy bar per row, all on the same scale (the bar fills with --v). */
.pz-share-bar { display: grid; grid-template-columns: minmax(0, 1fr) 4.2rem; gap: 10px; align-items: center; min-width: 8rem; }

/* Two columns: kcal figure + macro bars, then stacks below 600 px. */
.pz-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* Service testers: a monospace result block and the service status head. */
.pz-code { display: block; margin: 0; padding: 12px 14px; overflow: auto; max-height: 18rem; background: var(--ground); border: 1px solid var(--rule); border-radius: 10px; font: 13px/1.5 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; white-space: pre; color: var(--ink); }
textarea.pz-code { width: 100%; resize: vertical; white-space: pre; }
.pz-svc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }

/* ═════════════════════════════════════════════════════════════════
   Meal planning (errezeta/planing.html, spec plaza-planning)
   The week board, its rail and the "Plan a week" form, moved from
   docs/design/plaza-5/mock.css with the same names. Tokens only, so
   light and dark follow the page. Responsive rules: end of this file.
   ═════════════════════════════════════════════════════════════════ */

/* Main column + side rail (the recipe page rail, reused) */
.pz-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: 40px; align-items: start; }

/* ── The week board ───────────────────────────────────────────
   Desktop: seven day columns, lunch on top, dinner below.
   ≤ 860 px: one row per day, the two meals side by side. */
.pz-week { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.pz-day { display: grid; grid-template-rows: auto 1fr 1fr; gap: 8px; min-width: 0; }
.pz-day-head { display: grid; justify-items: center; padding: 8px 4px 10px; border-radius: 10px; text-align: center; }
.pz-day-head b { font-size: var(--t-sm); font-weight: 700; color: var(--ink-soft); }
.pz-day-head span { font: 800 var(--t-lg)/1 var(--display); font-stretch: 118%; font-variant-numeric: tabular-nums; }
/* Today: a gold wash on its head and a gold ring on its meals. */
.pz-day.is-today .pz-day-head { background: var(--gold-wash); }
.pz-day.is-today .pz-day-head b { color: var(--gold-text); }
.pz-slot-name { font-size: 12px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.pz-meal {
  position: relative; display: grid; align-content: start; gap: 6px; min-height: 9.5rem; padding: 8px 8px 10px;
  border-radius: 12px; background: var(--paper); border: 1px solid var(--rule); min-width: 0;
}
.pz-meal img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.pz-meal a.pz-dish { color: var(--ink); text-decoration: none; font-size: var(--t-ui); line-height: 1.2; overflow-wrap: anywhere; }
.pz-meal a.pz-dish:hover { text-decoration: underline; }
/* The "⋯" button sits on the photo's corner. */
.pz-meal-menu { position: absolute; top: 12px; inset-inline-end: 12px; width: 36px; height: 36px; background: color-mix(in srgb, var(--paper) 90%, transparent); }
/* Its menu (.pz-menu, opened by plaza.js) is narrower than a header menu.
   It hangs from the meal's right edge, so on the first days of the week it
   would leave the screen on the left: there it hangs from the left edge. */
.pz-meal .pz-menu { width: min(17rem, calc(100vw - 32px)); }
.pz-day:nth-child(-n+3) .pz-meal .pz-menu { inset-inline: 0 auto; }
/* Free (saved week) and no_fit (draft): a dashed box with the action. */
.pz-meal.is-free { place-content: center; justify-items: center; text-align: center; background: transparent; border: 1.5px dashed var(--rule); color: var(--ink-soft); font-size: var(--t-sm); }
.pz-meal.is-free .pz-icon { color: var(--dish); }
.pz-meal.is-free a, .pz-meal.is-free .pz-link-btn { font-weight: 700; }
/* Off: an unticked meal, hatched. */
.pz-meal.is-off { background: repeating-linear-gradient(135deg, var(--rule) 0 1px, transparent 1px 8px); border-color: transparent; place-content: center; text-align: center; font-size: var(--t-sm); color: var(--ink-soft); }
/* Gone: the recipe was deleted or made private. */
.pz-meal.is-gone { background: var(--warn-bg); border-color: transparent; }
.pz-meal.is-gone p { font-size: var(--t-sm); color: var(--warn); font-weight: 700; }
.pz-meal.is-today { box-shadow: 0 0 0 2px var(--gold); border-color: transparent; }

/* ── Meals to plan: the 7 × 2 toggle grid of the form ───────── */
/* Its <fieldset> without the browser's default frame. */
.pz-planning fieldset.pz-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.pz-planning fieldset.pz-field legend { padding: 0; margin-bottom: 4px; }
.pz-cells { display: grid; grid-template-columns: 6rem repeat(2, minmax(0, 8rem)); gap: 6px 10px; align-items: center; }
.pz-cells .pz-link-btn { justify-self: start; padding: 4px 0; font-size: var(--t-sm); }
/* One meal: the real checkbox lies invisibly over its face (the <span>), so
   it keeps the clicks, the keyboard focus and the form value. */
.pz-cell { position: relative; display: block; cursor: pointer; }
.pz-cell input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pz-cell > span { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; border-radius: 8px; font-size: var(--t-sm); font-weight: 700; color: var(--ink-soft); box-shadow: inset 0 0 0 1.5px var(--rule); }
.pz-cell input:checked + span { background: var(--monte); color: var(--on-monte); box-shadow: none; }
.pz-cell input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.pz-cell .pz-icon { font-size: 18px; }
/* The face says "✓ On" or "Off" (text, not colour only): both are in the
   markup and :checked picks one, so it works without JS. */
.pz-cell-on, .pz-cell-off { display: inline-flex; align-items: center; gap: 4px; }
.pz-cell input:checked + span .pz-cell-off,
.pz-cell input:not(:checked) + span .pz-cell-on { display: none; }

/* ── Rule chips (the user's planning rules) ─────────────────── */
.pz-rules { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pz-rule { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 999px; background: var(--meadow); font-size: var(--t-sm); font-weight: 700; }
.pz-rule .pz-icon { font-size: 18px; color: var(--dish); }

/* The recipe picker: wider than the other dialogs, room for the search.
   A modal <dialog> scrolls its content (overflow: auto in the browser's own
   styles), which would clip the Select2 results opened inside it
   (dropdownParent = the dialog): visible lets them hang below the box. */
.pz-pick-dialog { width: min(40rem, calc(100vw - 32px)); overflow: visible; }

/* The draft's sticky action bar (.pz-actionbar) is in the page flow, so at
   the end of the page the last day is never under it. While scrolling it
   covers the bottom of the screen: scroll-padding keeps a focused or
   scrolled-to element above it (WCAG 2.4.11, focus not obscured).
   https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding */
html:has(.pz-planning.has-actionbar) { scroll-padding-bottom: 96px; }

/* ═════════════════════════════════════════════════════════════════
   Recipe editor (errezeta/recipe_builder.html)
   Left: the details stack. Right: Ingredients and Steps panels. One form,
   with the sticky action bar as its last child.
   ═════════════════════════════════════════════════════════════════ */
.pz-editor { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 40px; align-items: start; }
/* The action bar rests at the very end of the form: no extra space below it. */
.pz-recipe-editor .pz-body { padding-bottom: 0; }
.pz-recipe-editor .pz-actionbar { margin-top: 32px; border: 1px solid var(--rule); border-bottom: 0; border-radius: 14px 14px 0 0; }
.pz-recipe-editor .pz-actionbar-inner { padding-inline: 18px; }

/* Dictate / From a photo (builder_fill.js): the group sits in a panel foot,
   hidden until the JS shows it. [hidden] must beat the display: flex below. */
.pz-fill { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.pz-fill[hidden] { display: none; }
.pz-fill.is-busy { opacity: 0.7; }
.pz-fill .pz-btn:disabled { cursor: progress; }
/* Recording: the Dictate button turns solid red until it is pressed again. */
.pz-fill .pz-btn.is-recording { background: var(--crit); border-color: var(--crit); color: var(--paper); }
@media only screen and (max-width: 600px) {
  .pz-fill { flex-basis: 100%; }
  .pz-fill .pz-btn { flex: 1 1 auto; justify-content: center; }
}

/* A line removed with × (saved lines keep DELETE ticked until Save):
   [hidden] must beat the display: grid below. */
.pz-ied li[hidden], .pz-sted li[hidden] { display: none; }

/* Ingredient lines: handle · qty · unit · ingredient · × (errors span the row) */
.pz-ied { list-style: none; display: grid; gap: 8px; }
.pz-ied li { display: grid; grid-template-columns: 28px 5rem 6.5rem minmax(0, 1fr) 44px; gap: 8px; align-items: center; }
.pz-ied .pz-input { min-height: 42px; padding-block: 8px; }
.pz-ied-name { min-width: 0; }
.pz-ied-head { font-size: var(--t-xs); font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.pz-ied .pz-line-error { grid-column: 2 / -1; }
.pz-drag { color: var(--ink-soft); cursor: grab; display: grid; place-items: center; height: 44px; touch-action: none; }
/* SortableJS adds these classes while a line is dragged. */
.pz-ied .sortable-ghost, .pz-sted .sortable-ghost { opacity: 0.4; }
.pz-ied .sortable-chosen .pz-drag, .pz-sted .sortable-chosen .pz-drag { cursor: grabbing; }

/* Steps: handle · gold number (CSS counter) · text · × */
.pz-sted { list-style: none; display: grid; gap: 12px; counter-reset: pz-sted; }
.pz-sted li { display: grid; grid-template-columns: 28px 2.2rem minmax(0, 1fr) 44px; gap: 8px; align-items: start; }
.pz-sted li::before { counter-increment: pz-sted; content: counter(pz-sted); grid-column: 2; grid-row: 1; font: 800 var(--t-lg)/1.6 var(--display); font-stretch: 118%; color: var(--gold-text); font-variant-numeric: tabular-nums; }
.pz-sted .pz-drag { grid-column: 1; grid-row: 1; }
.pz-sted .pz-sted-fields { grid-column: 3; display: grid; gap: 6px; }
.pz-sted .pz-icon-btn { grid-column: 4; grid-row: 1; }
.pz-sted .pz-line-error { grid-column: 3 / -1; }

/* Photo: the current one with "Change photo", or the local preview in the drop zone */
.pz-photo-pick { position: relative; border-radius: 14px; overflow: hidden; }
.pz-photo-pick img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pz-photo-pick .pz-btn { position: absolute; inset-inline-end: 10px; bottom: 10px; background: var(--paper); color: var(--ink); }
.pz-photo-pick .pz-btn:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.pz-drop .pz-photo-preview { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.pz-drop .pz-photo-preview[hidden] { display: none; }

/* Danger zone */
.pz-danger { border-color: color-mix(in srgb, var(--crit) 40%, var(--rule)); }
.pz-page .pz-danger h2 { color: var(--crit); }
.pz-btn-danger { background: var(--crit); color: #FFFFFF; }
.pz-btn-danger:hover { filter: brightness(0.92); color: #FFFFFF; }
.pz-btn-ghost-danger { background: transparent; color: var(--crit); border-color: currentColor; }
.pz-btn-ghost-danger:hover { background: var(--crit-bg); }

/* Servings: the stepper around a real number input (no browser spin buttons) */
.pz-stepper input.pz-input {
  width: 4.2rem; min-height: 44px; padding: 6px 4px; text-align: center;
  font-weight: 800; font-size: var(--t-md); appearance: textfield; -moz-appearance: textfield;
}
.pz-stepper input::-webkit-inner-spin-button, .pz-stepper input::-webkit-outer-spin-button { appearance: none; margin: 0; }

/* Public: a checkbox switch. The track is the .pz-switch <span> (the same
   ::before/::after drawing as the <button role="switch"> above); the real
   checkbox lies invisibly on top, so it gets the clicks and the focus.
   Pseudo-elements on an <input> itself don't render in Firefox. */
.pz-switch-plain { border: 0; padding: 0; }
.pz-switch-box { position: relative; display: inline-flex; flex: none; }
.pz-switch-box .pz-switch { display: block; cursor: pointer; }
.pz-switch-input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pz-switch-input:checked + .pz-switch::before { background: var(--monte); }
.pz-switch-input:checked + .pz-switch::after { transform: translateX(20px); }
.pz-switch-input:focus-visible + .pz-switch::before { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ── Select2 skin (the ingredient picker of the recipe editor) ──
   recipe_builder.js passes selectionCssClass: "pz-s2-selection" and
   dropdownCssClass: "pz-s2-dropdown", so only these Select2s are restyled.
   select2.min.css loads after plaza.css, so every rule here starts with
   .select2-container--default to be one class more specific than Select2's.
   Tokens only, so light and dark follow the page.
   Options: https://select2.org/configuration/options-api */
.select2-container--default .select2-selection--single.pz-s2-selection {
  display: flex; align-items: center; height: auto; min-height: 42px;
  border: 1.5px solid var(--rule); border-radius: 8px; background: var(--ground);
}
.select2-container--default .pz-s2-selection.is-invalid { border-color: var(--crit); }
.select2-container--default.select2-container--focus .pz-s2-selection,
.select2-container--default.select2-container--open .pz-s2-selection {
  border-color: var(--monte); box-shadow: 0 0 0 3px color-mix(in srgb, var(--monte) 28%, transparent);
}
.select2-container--default .select2-selection--single.pz-s2-selection .select2-selection__rendered {
  padding: 8px 30px 8px 12px; color: var(--ink); font: 400 var(--t-ui)/1.4 var(--sans);
}
.select2-container--default .select2-selection--single.pz-s2-selection .select2-selection__placeholder { color: var(--ink-soft); }
.select2-container--default .select2-selection--single.pz-s2-selection .select2-selection__arrow { top: 0; height: 100%; right: 6px; }
.select2-container--default .select2-selection--single.pz-s2-selection .select2-selection__arrow b { border-top-color: var(--ink-soft); }

.select2-container--default .select2-dropdown.pz-s2-dropdown {
  background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 10px;
  box-shadow: 0 18px 40px -18px var(--shadow); overflow: hidden;
}
.select2-container--default .pz-s2-dropdown .select2-search--dropdown { padding: 8px; }
.select2-container--default .pz-s2-dropdown .select2-search--dropdown .select2-search__field {
  min-height: 40px; padding: 8px 10px; border: 1.5px solid var(--rule); border-radius: 8px;
  background: var(--ground); color: var(--ink); font: 400 var(--t-ui)/1.4 var(--sans);
}
.select2-container--default .pz-s2-dropdown .select2-search--dropdown .select2-search__field:focus { border-color: var(--monte); outline: none; }
.select2-container--default .pz-s2-dropdown .select2-results__option { padding: 8px 12px; font-size: var(--t-ui); }
.select2-container--default .pz-s2-dropdown .select2-results__option--selected { background: var(--meadow); color: var(--ink); }
.select2-container--default .pz-s2-dropdown .select2-results__option--highlighted.select2-results__option--selectable { background: var(--ground); color: var(--ink); }
.select2-container--default .pz-s2-dropdown .select2-results__message { color: var(--ink-soft); font-size: var(--t-sm); }
/* An option: the localised name, then the other languages in muted text. */
.pz-s2-others { display: block; margin-top: 2px; font-size: var(--t-xs); color: var(--ink-soft); }
/* The last option: ask for / add a new ingredient. Select2 can't put a class
   on the <li> of AJAX data, so the option holds a <span class="pz-s2-create">
   and :has() styles the <li> around it. */
.select2-container--default .pz-s2-dropdown .select2-results__option:has(> .pz-s2-create) { border-top: 1px solid var(--rule); }
.pz-s2-create { display: block; color: var(--link); font-weight: 700; }
.pz-s2-create .pz-icon { font-size: 18px; vertical-align: -4px; margin-inline-end: 4px; }
.pz-s2-create .pz-s2-others { font-weight: 400; }

/* ── Toolbar above a list (search box + actions) ──────────────
   First used by the ingredient catalog (one search box). The input keeps a
   readable width and the optional `.pz-toolbar-end` group is pushed to the
   end of the row; both wrap on narrow screens. */
.pz-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
.pz-toolbar .pz-input-icon { flex: 1 1 16rem; max-width: 26rem; }
.pz-toolbar-end { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: 8px; }
/* A second row of filters under the search box (admin recipe list, spec
   admin-recipe-management R24): compact selects and date inputs that wrap;
   under 600 px each one takes a full line (R28). */
.pz-toolbar-filters { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pz-toolbar-filters select.pz-input { width: auto; max-width: 14rem; }
.pz-toolbar-date { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-soft); }
.pz-toolbar-date .pz-input { width: auto; }
@media only screen and (max-width: 600px) {
  .pz-toolbar-filters > * { flex: 1 1 100%; }
  .pz-toolbar-filters select.pz-input { width: 100%; max-width: none; }
  .pz-toolbar-date .pz-input { flex: 1; }
}

/* ── Status tags: small pills, always a word (plus an optional icon) ──
   The colour only repeats what the text says (Waiting / Added / Rejected),
   so the state is readable without colour. */
.pz-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font: 700 12px/1.6 var(--sans); white-space: nowrap; background: var(--ground); color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--rule); }
.pz-tag .pz-icon { font-size: 15px; }
.pz-tag.is-good { background: var(--good-bg); color: var(--good); box-shadow: none; }
.pz-tag.is-warn { background: var(--warn-bg); color: var(--warn); box-shadow: none; }
.pz-tag.is-crit { background: var(--crit-bg); color: var(--crit); box-shadow: none; }
.pz-tag.is-gold { background: var(--gold-wash); color: var(--gold-text); box-shadow: none; }

/* ── Ingredient tiles: a grid of round images with three names ──
   The ingredient catalog groups them under a `.pz-cat-head` per category.
   A photo fills the circle (`is-photo`: cover); an svg icon is drawn whole
   (contain); with no image the circle is meadow green with the initial
   (`is-none`). */
.pz-igrid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 24px 16px; }
.pz-itile { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--ink); text-decoration: none; padding: 12px 6px; border-radius: 14px; }
.pz-itile:hover { background: var(--paper); box-shadow: 0 0 0 1px var(--rule); }
.pz-itile-img { width: 96px; height: 96px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); display: grid; place-items: center; overflow: hidden; }
.pz-itile-img img { width: 78%; height: 78%; object-fit: contain; }
.pz-itile-img.is-photo img { width: 100%; height: 100%; object-fit: cover; }
.pz-itile-img.is-none { background: var(--meadow); box-shadow: none; font: 800 1.9rem/1 var(--display); font-stretch: 118%; color: var(--dish); }
.pz-itile strong { font-size: var(--t-ui); line-height: 1.25; text-transform: capitalize; }
.pz-itile small { font-size: var(--t-xs); color: var(--ink-soft); }
.pz-cat-head { display: flex; align-items: baseline; gap: 10px; margin: 36px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.pz-page .pz-cat-head h2 { font-size: var(--t-lg); letter-spacing: -0.01em; }
.pz-cat-head span { color: var(--ink-soft); font-size: var(--t-sm); font-variant-numeric: tabular-nums; }

/* ── Review list: one card per item with its state on the right ──
   The catalog's "Your requests" (name, "Asked … ago", a `.pz-tag`); the
   admin review screens of the plaza-5 mock reuse it later. */
.pz-review { list-style: none; display: grid; gap: 12px; }
.pz-review-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 14px 18px; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; }
.pz-review-item h3 { font-size: var(--t-base); }
.pz-review-meta { font-size: var(--t-sm); color: var(--ink-soft); margin-top: 2px; }
/* "To review" area (spec plaza-admin-review): the edit fields, the actions, the
   duplicate banner, the wrong → proposed diff and the image candidate grid. */
.pz-review-fields { margin-top: 10px; }
.pz-review-item .pz-banner { margin-top: 10px; }
.pz-review-acts { display: flex; gap: 8px; }
.pz-diff { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: var(--t-ui); }
.pz-diff del { color: var(--crit); background: var(--crit-bg); padding: 1px 8px; border-radius: 6px; }
.pz-diff ins { color: var(--good); background: var(--good-bg); padding: 1px 8px; border-radius: 6px; text-decoration: none; font-weight: 700; }
.pz-cands { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 14px; }
.pz-cand { display: grid; gap: 8px; padding: 8px 8px 12px; border-radius: 12px; background: var(--paper); border: 1px solid var(--rule); position: relative; }
.pz-cand img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--ground); }
.pz-cand.is-pick { box-shadow: 0 0 0 2px var(--gold); border-color: transparent; }
.pz-cand-badge { position: absolute; top: 14px; inset-inline-start: 14px; }
.pz-cand small { font-size: var(--t-xs); color: var(--ink-soft); line-height: 1.35; }
.pz-cand-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pz-cand-acts .pz-btn { padding-inline: 8px; }
/* A whole card as one toggle button (admin recipe image dialog, spec
   admin-recipe-management R10); the selected look is .pz-cand.is-pick above.
   Long Commons titles and authors are clamped to two lines. */
.pz-cand-pick { display: grid; gap: 8px; width: 100%; padding: 0; margin: 0; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.pz-cand-pick:focus-visible { outline: 3px solid var(--monte); outline-offset: 3px; }
.pz-cand-title, .pz-cand-line { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.pz-cand-title { font-size: var(--t-sm); font-weight: 700; line-height: 1.3; }
/* The review area replaces the console nav with its tab bar, so its body is a
   single full-width column (the nav column would otherwise stay empty). */
.pz-admin-body:has(> .pz-list-bar) { grid-template-columns: minmax(0, 1fr); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .pz-recipe-body { grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); }
  /* Scoped to the recipe page: the planning rail (.pz-split) moves under
     its board only at 860 px (plaza-planning R26). */
  .pz-recipe-body .pz-rail { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pz-rgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .pz-rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Recipe editor: one column — details, then Ingredients, then Steps. */
  .pz-editor { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  /* Check screen: "What you gave" above "What Jan read". */
  .pz-read { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  /* Meal planning (R26): the rail goes under the board, and each day is one
     row: the head on the left, lunch and dinner side by side, 56 px photos.
     :has(> img) picks the meals that show a recipe photo. */
  .pz-split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .pz-week { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .pz-day { grid-template-columns: 3.6rem minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto; align-items: stretch; }
  .pz-day-head { align-content: center; }
  .pz-meal { min-height: 0; }
  .pz-meal:has(> img) { grid-template-columns: 56px minmax(0, 1fr); align-items: center; column-gap: 10px; }
  .pz-meal img { width: 56px; height: 56px; aspect-ratio: 1; grid-row: span 2; }
  .pz-meal img + .pz-slot-name { grid-column: 2; }
  .pz-meal.is-free, .pz-meal.is-off { padding-block: 14px; }
  /* Touch targets ≥ 44 px (WCAG 2.5.5): the "⋯", centred on the row's
     right edge with room kept for it, and the form's day / column toggles. */
  .pz-meal:has(> .pz-meal-menu) { padding-inline-end: 52px; }
  .pz-meal-menu { top: 50%; transform: translateY(-50%); inset-inline-end: 4px; width: 44px; height: 44px; }
  .pz-cells .pz-link-btn { min-height: 44px; }
  /* Preferences: the section nav becomes wrapping chips. */
  .pz-settings { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pz-settings-nav { position: static; }
  .pz-page .pz-settings-nav ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .pz-page .pz-settings-nav a { padding: 6px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); }
}
@media only screen and (max-width: 600px) {
  /* Shared components (mock paddings) */
  .pz-form-row, .pz-form-row-3 { grid-template-columns: minmax(0, 1fr); }
  .pz-band { padding-block: 20px 24px; }
  .pz-page .pz-band-title { font-size: var(--t-lg); }
  .pz-band-sub { font-size: var(--t-ui); }
  .pz-body { padding-block: 20px 48px; }
  .pz-panel { padding: 16px; }
  .pz-two { grid-template-columns: minmax(0, 1fr); }
  .pz-langs-pick { grid-template-columns: minmax(0, 1fr); }
  .pz-source-pick { grid-template-columns: minmax(0, 1fr); }
  .pz-week-switch .pz-chip { flex: 1 1 0; }
  .pz-week-pick .pz-chip-check { flex: 1 1 0; }
  .pz-week-pick .pz-chip-check .pz-chip { width: 100%; }
  .pz-sl-share { padding: 14px 16px 16px; }
  .pz-sl-share .pz-chipset { display: grid; grid-template-columns: minmax(0, 1fr); }
  .pz-sl-share .pz-chip { justify-content: center; white-space: normal; text-align: center; }
  .pz-actionbar-note { flex-basis: 100%; }
  .pz-actionbar .pz-btn { flex: 1; min-height: 44px; }
  /* "Add a recipe from a source" (R3, R39): icon-only tabs — the full
     name is still the link's accessible name (errezeta/_source_band.html
     sets aria-label); the sticky Check-screen action bar already gets
     full-width ≥44px buttons from the two rules above, so this only adds
     a little breathing room above it so it never covers the last field. */
  .pz-source-tabs .pz-src-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pz-source-tabs a { padding-inline: 10px; }
  .pz-read { margin-bottom: 24px; }
  /* Recipe editor, ingredient line in two rows:
     handle · qty · unit · ×  /  the ingredient, full width below. */
  .pz-ied li { grid-template-columns: 24px 4.5rem minmax(0, 1fr) 44px; row-gap: 6px; }
  .pz-ied li > .pz-drag { grid-column: 1; grid-row: 1; }
  .pz-ied li > .pz-ied-qty { grid-column: 2; grid-row: 1; }
  .pz-ied li > .pz-ied-unit { grid-column: 3; grid-row: 1; }
  .pz-ied li > .pz-ied-remove { grid-column: 4; grid-row: 1; }
  .pz-ied li > .pz-ied-name { grid-column: 2 / -1; grid-row: 2; }
  .pz-ied li > .pz-line-error { grid-column: 2 / -1; grid-row: 3; }
  .pz-ied li + li:not(.pz-ied-head) { padding-top: 8px; border-top: 1px solid var(--rule); }
  .pz-ied-head { display: none !important; }
  /* Steps: no big number, the text gets the width. */
  .pz-sted li { grid-template-columns: 24px minmax(0, 1fr) 44px; }
  .pz-sted li::before { display: none; }
  .pz-sted .pz-sted-fields { grid-column: 2; }
  .pz-sted .pz-icon-btn { grid-column: 3; }
  .pz-sted .pz-line-error { grid-column: 2 / -1; }
  .pz-recipe-editor .pz-body { padding-bottom: 0; }
  .pz-recipe-editor .pz-actionbar-inner { padding-inline: 12px; }
  /* Meal planning (R26): no meal photos, so the two meals of a day keep
     their width for the names; a narrower day head and toggle grid. The
     draft's bar buttons sit in their own <form>s, so the forms share the
     row and each button fills its form. */
  .pz-meal img { display: none; }
  .pz-meal:has(> img) { grid-template-columns: minmax(0, 1fr); }
  .pz-meal img + .pz-slot-name { grid-column: auto; }
  .pz-day { grid-template-columns: 2.8rem minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
  .pz-meal { padding: 8px; }
  .pz-cells { grid-template-columns: 5.5rem repeat(2, minmax(0, 1fr)); gap: 6px; }
  .pz-planning .pz-actionbar form { display: flex; flex: 1; }
  .pz-planning .pz-actionbar form .pz-btn { flex: 1; }

  .pz-recipe-body { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .pz-ingr { position: static; }
  .pz-rail { grid-template-columns: minmax(0, 1fr); }
  .pz-rgrid { gap: 28px 14px; }
  .pz-page .pz-rcard h3 { font-size: var(--t-base); }
  .pz-rcard-foot { flex-wrap: wrap; }
  /* Ingredient catalog: smaller tiles, more per row; review cards stack
     the state tag under the text. */
  .pz-review-item { grid-template-columns: minmax(0, 1fr); }
  .pz-igrid { grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: 16px 8px; }
  .pz-itile-img { width: 76px; height: 76px; }
}
@media (max-width: 420px) {
  .pz-rgrid { grid-template-columns: minmax(0, 1fr); }
  .pz-page .pz-rcard-media img { aspect-ratio: 16 / 10; }
}

/* ── Ingredient page (errezeta/ingredient_details.html) ──────────── */
/* Band hero: round photo + name + three names. The circle, the names, the
   story, the credit line and the Names list come from docs/design/plaza-5/mock.css
   (same names and tokens); .is-none draws the uppercase initial on meadow
   green when there is no image yet (spec R2). */
.pz-ing-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; }
.pz-ing-photo { width: clamp(120px, 18vw, 180px); aspect-ratio: 1; border-radius: 50%; background: var(--paper); display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 6px rgb(255 255 255 / 0.12); }
.pz-ing-photo img { width: 100%; height: 100%; object-fit: cover; }
.pz-ing-photo.is-none { background: var(--meadow); box-shadow: none; color: var(--dish); }
.pz-ing-photo .pz-ing-initial { font: 800 3rem/1 var(--display); font-stretch: 118%; }
.pz-ing-names { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; color: var(--on-monte-soft); font-size: var(--t-sm); }
.pz-ing-names b { font-family: var(--hand); font-style: italic; font-size: var(--t-md); color: var(--on-monte); margin-inline-end: 4px; }
.pz-story { font-family: var(--hand); font-style: italic; font-weight: 500; font-size: 1.2rem; line-height: 1.55; max-width: 60ch; }
.pz-credit { font-size: var(--t-xs); color: var(--ink-soft); }
/* The recipe photo credit sits at the top of the green title band, right
   under the hero (spec admin-recipe-management R11): light text on green. */
.pz-dish-credit { margin: 0 0 4px; text-align: end; color: var(--on-monte-soft); }
.pz-dish-credit a { color: var(--on-monte); text-decoration: underline; }
.pz-trans { list-style: none; }
.pz-trans li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding-block: 8px; border-bottom: 1px solid var(--rule); }
.pz-trans .pz-lang-code { font-weight: 800; font-size: var(--t-sm); color: var(--ink-soft); }
.pz-trans .pz-trans-missing { color: var(--ink-soft); }
@media only screen and (max-width: 600px) {
  .pz-ing-hero { grid-template-columns: minmax(0, 1fr); }
}

/* ── People page (accounts/people.html + _person_card.html) ──────── */
/* Band tabs, the people grid and the person card come from docs/design/plaza-5/mock.css
   (same names and tokens). The tabs sit on the dark .pz-band, so they need
   light-on-dark overrides of the .pz-list-tab base rules above. */
.pz-band .pz-list-bar { margin-top: 18px; border-bottom-color: var(--on-monte-rule); }
.pz-page .pz-band .pz-list-tab { color: var(--on-monte-soft); }
.pz-page .pz-band .pz-list-tab:hover { color: var(--on-monte); background: rgb(255 255 255 / 0.1); }
.pz-page .pz-band .pz-list-tab[aria-current="page"], .pz-page .pz-band .pz-list-tab[aria-selected="true"] { color: var(--on-monte); border-bottom-color: var(--gold-light); }
.pz-page .pz-list-tab[aria-selected="true"] { color: var(--dish); border-bottom-color: var(--gold); }
/* A .pz-list-tab may be a <button> (profile page tabs): reset the button chrome. */
.pz-list-tab { background: none; border: 0; cursor: pointer; font: inherit; }
.pz-tab-count { font-weight: 400; margin-inline-start: 6px; font-variant-numeric: tabular-nums; }

.pz-people { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 16px; }
.pz-pcard { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 14px; padding: 18px; border-radius: 14px; background: var(--paper); border: 1px solid var(--rule); align-content: start; }
.pz-pcard .pz-person-avatar { width: 56px; height: 56px; grid-row: span 2; }
.pz-pcard-name { font-weight: 800; font-size: var(--t-base); color: var(--ink); text-decoration: none; }
.pz-pcard-name:hover { text-decoration: underline; }
.pz-pcard-meta { font-size: var(--t-sm); color: var(--ink-soft); }
.pz-pcard-bio { grid-column: 1 / -1; font-size: var(--t-ui); margin-top: 10px; }
.pz-pcard-dishes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; list-style: none; }
.pz-pcard-dishes img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.pz-pcard-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
/* Avatar initial colour variants, picked from the user id modulo 3 (R8). */
.pz-avatar-a { background: var(--monte); color: #FFFFFF; }
.pz-avatar-i { background: var(--ink); color: var(--ground); }
.pz-avatar-m { background: var(--meadow); color: var(--dish); }

@media only screen and (max-width: 600px) {
  .pz-people { grid-template-columns: minmax(0, 1fr); }
}

/* ── Feedback board (polls/feedback_list.html, _create, _detail) ──
   The list rows, vote button and comment thread come from
   docs/design/plaza-5/mock.css (same names and tokens). The vote toggle
   sits on the dark .pz-band on the detail page, so it needs a light-on-dark
   override; the .pz-fb-tags / .pz-fb-pager / .pz-page-url / .pz-detail-page
   helpers cover what the mock only sketched. */
.pz-fb { list-style: none; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.pz-fb li + li { border-top: 1px solid var(--rule); }
.pz-fb-row { display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; }
.pz-vote { display: grid; justify-items: center; gap: 0; width: 56px; padding: 6px 0; border-radius: 10px; border: 0; cursor: pointer; background: transparent; color: var(--ink-soft); box-shadow: inset 0 0 0 1.5px var(--rule); font: 800 var(--t-ui)/1.2 var(--sans); }
.pz-vote .pz-icon { font-size: 20px; }
.pz-vote b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pz-vote[aria-pressed="true"] { background: var(--monte); color: #FFFFFF; box-shadow: none; }
.pz-vote[aria-pressed="true"] b { color: #FFFFFF; }
.pz-fb-title { font-weight: 800; color: var(--ink); text-decoration: none; font-size: var(--t-base); }
.pz-fb-title:hover { text-decoration: underline; }
.pz-fb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; font-size: var(--t-sm); color: var(--ink-soft); }
.pz-fb-meta .pz-icon { font-size: 16px; vertical-align: -3px; }
.pz-comments { list-style: none; display: grid; gap: 14px; }
.pz-comment { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
.pz-comment .pz-person-avatar { width: 40px; height: 40px; font-size: var(--t-ui); }
.pz-comment-body { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px 14px 14px 14px; padding: 10px 14px; }
.pz-comment-body small { color: var(--ink-soft); font-size: var(--t-xs); }
.pz-comment.is-admin .pz-comment-body { background: var(--meadow); border-color: transparent; }

/* Helpers beyond the mock: the row tags wrap, the pager keeps the filters,
   the create page shows the prefilled path read-only, and the detail page
   renders the page path as plain <code>. */
.pz-fb-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.pz-fb-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 20px; }
.pz-page-url { display: flex; align-items: center; gap: 8px; }
.pz-page-url code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: var(--t-sm); color: var(--ink-soft); }
.pz-detail-page { margin-top: 14px; font-size: var(--t-sm); color: var(--ink-soft); }
.pz-detail-page code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13px; background: var(--ground); padding: 2px 6px; border-radius: 6px; }
.pz-band .pz-vote { color: var(--on-monte); box-shadow: inset 0 0 0 1.5px var(--on-monte-rule); }
.pz-band .pz-vote b { color: var(--on-monte); }
.pz-band .pz-vote[aria-pressed="true"] { background: var(--gold-light); color: #17201A; }
.pz-band .pz-vote[aria-pressed="true"] b { color: #17201A; }

@media only screen and (max-width: 600px) {
  .pz-fb-row { grid-template-columns: 3.6rem minmax(0, 1fr); padding: 12px 14px; }
  .pz-fb-row > :last-child { grid-column: 2; justify-self: start; }
}

/* ── Log in and sign up (spec plaza-auth, moved from the plaza-5 mock) ──
   The two-column .pz-auth layout: the scene on the left (headline, lead and the
   pastel-rising-behind-the-monte drawing, reused from the home hero), the paper
   form on the right. .pz-pass and .pz-rules-pass are shared with the
   Preferences page and were moved earlier. */
.pz-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 28rem); min-height: calc(100vh - var(--header-h) - 120px); }
.pz-auth-scene { position: relative; background: var(--ground); overflow: hidden; display: grid; align-content: start; padding: 64px 48px 0; }
.pz-auth-scene h1 { font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.6rem); max-width: 12ch; }
.pz-auth-scene p { margin-top: 16px; font-size: var(--t-md); color: var(--ink-soft); max-width: 30rem; }
.pz-auth-art { position: relative; height: 260px; margin-top: 32px; }
.pz-auth-art .pz-auth-cake { position: absolute; right: 12%; bottom: 8%; width: 210px; height: 210px; }
.pz-auth-art .pz-auth-ridges { position: absolute; inset: auto 0 -1px 0; width: 100%; height: 78%; }
.pz-auth-form { background: var(--paper); border-inline-start: 1px solid var(--rule); padding: 56px 40px 48px; display: grid; align-content: start; gap: 18px; }
.pz-page .pz-auth-form h2 { font-size: var(--t-xl); }
.pz-auth-form .pz-btn { width: 100%; }
.pz-auth-alt { font-size: var(--t-ui); color: var(--ink-soft); text-align: center; }
.pz-invite-ok { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--good-bg); color: var(--good); font-weight: 700; font-size: var(--t-sm); }

@media (prefers-reduced-motion: no-preference) {
  .pz-auth-cake { animation: pz-rise 1.6s cubic-bezier(0.16, 0.8, 0.24, 1) 0.15s both; }
}
@keyframes pz-rise { from { transform: translateY(38%); } to { transform: translateY(0); } }

@media (max-width: 860px) {
  .pz-auth { grid-template-columns: minmax(0, 1fr); }
  .pz-auth-scene { padding: 32px var(--gutter) 0; }
  .pz-auth-art { height: 150px; margin-top: 12px; }
  .pz-auth-art .pz-auth-cake { width: 120px; height: 120px; }
  .pz-auth-form { border-inline-start: 0; border-top: 1px solid var(--rule); padding: 28px var(--gutter) 40px; }
}

/* ── Most saved (spec plaza-most-saved, moved from the plaza-5 mock) ──
   The ranked list of saved recipes: a gold rank numeral, a round photo, name
   + author + main tag, a share bar with the saves count, and the Save button.
   The first three ranks are larger. Below 860 px the bar moves under the name. */
.pz-ranked { list-style: none; }
.pz-ranked li { display: grid; grid-template-columns: 3rem 72px minmax(0, 1fr) minmax(8rem, 14rem) auto; gap: 16px; align-items: center; padding-block: 14px; border-bottom: 1px solid var(--rule); }
.pz-rank-n { font: 800 var(--t-xl)/1 var(--display); font-stretch: 118%; color: var(--gold-text); font-variant-numeric: tabular-nums; }
.pz-ranked img { width: 72px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.pz-ranked h3 { font-size: var(--t-md); line-height: 1.2; }
.pz-ranked h3 a { color: var(--ink); text-decoration: none; }
.pz-ranked h3 a:hover { text-decoration: underline; }
.pz-ranked .pz-rcard-meta { margin-top: 4px; }
.pz-ranked .pz-share-bar .pz-val { white-space: nowrap; }
.pz-ranked li:nth-child(-n+3) .pz-rank-n { font-size: 2.6rem; }

@media (max-width: 860px) {
  .pz-ranked li { grid-template-columns: 2.4rem 56px minmax(0, 1fr) auto; }
  .pz-ranked img { width: 56px; }
  .pz-ranked .pz-share-bar { grid-column: 3 / -1; }
}

/* ── Admin console sub-pages (spec plaza-admin-catalog, moved from the mock) ──
   The short green band (no photo) with breadcrumbs, the Jan sub-nav and its
   review-count badge, the language mini-tags of the ingredients list, the
   key-value list of the nutrition panel, and the wider dialog variant. */
.pz-admin-band { background: var(--monte); color: var(--on-monte); padding-block: 22px 26px; }
.pz-admin-band :focus-visible { outline-color: var(--gold-light); }
.pz-page .pz-crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; font-size: var(--t-sm); color: var(--on-monte-soft); }
.pz-crumbs li + li::before { content: "›"; margin-inline-end: 4px; }
.pz-crumbs a { color: var(--on-monte-soft); }
.pz-page .pz-admin-band h1 { color: var(--on-monte); font-size: var(--t-xl); margin-top: 6px; }
.pz-admin-band p { color: var(--on-monte-soft); margin-top: 6px; max-width: 46rem; }
.pz-page .pz-admin-nav .pz-admin-subnav { padding-inline-start: 30px; margin-top: 2px; }
.pz-page .pz-admin-nav .pz-admin-subnav a { min-height: 38px; font-weight: 500; font-size: var(--t-sm); }
.pz-admin-nav .pz-count { margin-inline-start: auto; font-size: 12px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--gold-light); color: #17201A; font-variant-numeric: tabular-nums; }
.pz-langs-mini { display: inline-flex; gap: 4px; }
.pz-langs-mini span { padding: 1px 6px; border-radius: 4px; font-size: 12px; font-weight: 700; background: var(--meadow); }
.pz-langs-mini .is-missing { background: transparent; color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--rule); text-decoration: line-through; }
.pz-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: var(--t-ui); }
.pz-kv dt { color: var(--ink-soft); font-size: var(--t-sm); }
.pz-kv dd { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pz-dialog-wide { width: min(40rem, calc(100vw - 32px)); }

@media (max-width: 860px) {
  .pz-page .pz-admin-nav .pz-admin-subnav { padding-inline-start: 0; display: flex; flex-wrap: wrap; gap: 4px; }
}

/* ── Learning challenges (spec plaza-admin-learning) ──
   The challenge renders as a terminal: a dark window with a title bar and
   three "traffic light" dots, a scrollable monospace transcript, and lines
   tagged is-sys (system) or is-me (my command, prefixed with a `>` prompt). */
.pz-terminal { display: flex; flex-direction: column; overflow: hidden; background: var(--terminal-bg); color: var(--terminal-ink); border-radius: 12px; box-shadow: 0 22px 30px -22px var(--shadow); }
.pz-terminal-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: rgb(0 0 0 / 0.30); border-bottom: 1px solid rgb(255 255 255 / 0.08); }
.pz-terminal-dots { display: inline-flex; gap: 6px; }
.pz-terminal-dots i { width: 11px; height: 11px; border-radius: 50%; }
.pz-terminal-dots i:nth-child(1) { background: #E66B5D; }
.pz-terminal-dots i:nth-child(2) { background: #E3B341; }
.pz-terminal-dots i:nth-child(3) { background: #5DB56B; }
.pz-terminal-title { flex: 1; font: 600 13px/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: var(--terminal-ink-soft); }
.pz-terminal-body { overflow: auto; max-height: 24rem; padding: 12px 16px; font: 13px/1.7 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.pz-term-line { margin: 0 0 3px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--terminal-ink); }
.pz-term-line.is-me::before { content: "> "; color: var(--terminal-prompt); font-weight: 700; }
.pz-terminal .pz-tag { background: rgb(255 255 255 / 0.07); color: var(--terminal-ink); box-shadow: inset 0 0 0 1px var(--terminal-ink-soft); }
.pz-terminal .pz-tag.is-gold { background: rgb(227 179 65 / 0.14); color: #E3B341; box-shadow: inset 0 0 0 1px #E3B341; }
/* Markdown block rendered inside the terminal transcript (sanitized server-side). */
.pz-terminal .pz-term-md { margin: 2px 0 8px; }
.pz-terminal .pz-term-md p { margin: 0 0 6px; }
.pz-terminal .pz-term-md :is(h1, h2, h3, h4, h5, h6) { margin: 8px 0 4px; font-size: 13px; font-weight: 700; line-height: 1.5; }
.pz-terminal .pz-term-md code { font-family: inherit; background: rgb(255 255 255 / 0.08); border-radius: 3px; padding: 0 4px; }
.pz-terminal .pz-term-md pre { background: rgb(0 0 0 / 0.35); border: 1px solid rgb(255 255 255 / 0.08); border-radius: 6px; padding: 8px 10px; overflow-x: auto; margin: 6px 0; }
.pz-terminal .pz-term-md pre code { background: none; padding: 0; border-radius: 0; }
.pz-terminal .pz-term-md a { color: var(--terminal-prompt); text-decoration: underline; text-underline-offset: 2px; }
.pz-terminal .pz-term-md ul, .pz-terminal .pz-term-md ol { margin: 4px 0; padding-left: 1.4em; }
.pz-terminal .pz-term-md li { margin: 1px 0; }
.pz-terminal .pz-term-md blockquote { margin: 6px 0; padding-left: 10px; border-left: 2px solid var(--terminal-ink-soft); color: var(--terminal-ink-soft); }
.pz-terminal .pz-term-md hr { border: none; border-top: 1px solid rgb(255 255 255 / 0.12); margin: 10px 0; }
.pz-terminal .pz-term-md table { border-collapse: collapse; margin: 6px 0; }
.pz-terminal .pz-term-md th, .pz-terminal .pz-term-md td { border: 1px solid rgb(255 255 255 / 0.16); padding: 2px 8px; }
.pz-tracks { list-style: none; display: grid; gap: 10px; }
.pz-tracks li { margin: 0; padding: 0; }
.pz-tracks a { display: grid; grid-template-columns: 9rem minmax(0, 1fr) 3.5rem auto; gap: 12px; align-items: center; font-size: var(--t-ui); text-decoration: none; color: inherit; min-height: 44px; border-radius: 8px; padding: 6px 8px; }
.pz-tracks a:hover { background: rgb(255 255 255 / 0.04); }
.pz-tracks li.is-selected a { background: rgb(255 255 255 / 0.07); box-shadow: inset 0 0 0 1px var(--pz-accent, #E3B341); }
.pz-tracks .pz-tag { justify-self: start; }

@media only screen and (max-width: 600px) {
  .pz-tracks a { grid-template-columns: 6.5rem minmax(0, 1fr) auto; }
  .pz-tracks a > span:nth-child(3) { display: none; }
}

/* Recipes list of the admin console: the Import ZIP button above the table */
.pz-admin-recipes-bar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
@media (max-width: 600px) {
  .pz-admin-recipes-bar .pz-btn { flex: 1; min-height: 44px; justify-content: center; }
  #import-zip-dialog .pz-dialog-actions { flex-direction: column-reverse; }
  #import-zip-dialog .pz-dialog-actions .pz-btn { min-height: 44px; justify-content: center; }
}

/* ── Recipe drafts (spec recipe-drafts) ──
   The owner's Drafts tab on the profile (accounts/_draft_row.html) and the
   editor's "Save as draft" button. Rows stack under 600 px. */
.pz-draft-rows { list-style: none; display: grid; gap: 10px; }
.pz-draft-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 14px 16px; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); }
.pz-draft-info { display: grid; gap: 2px; min-width: 0; }
.pz-draft-name { font-size: var(--t-md); line-height: 1.25; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .pz-draft-row { flex-direction: column; align-items: stretch; }
  .pz-draft-row .pz-btn, .pz-recipe-editor .pz-actionbar-inner .pz-btn { min-height: 44px; justify-content: center; }
}
