/* ingremix: mobile-first, single column, large tap targets, readable from
   arm's length in a kitchen. */

/* Brand: BRAND.md (bowl logo, variant B), self-hosted Outfit 700 for the
   wordmark only; no font CDN. */
@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Palette "Fresh lime". Lime is for marks and highlights, never text on a
   light ground; tomato is the accent (primary actions, "missing several"). */
:root {
  --ground: #FAFAF3;
  --ink: #1C2117;
  --lime: #D9E021;
  --yellow: #FCEE21;
  --tomato: #E4572E;
  --tomato-ink: #8A3214;
  --tomato-tint: #FBE3D6;
  --leaf: #4E7A1E;
  --mix: #6E8A1E;
  --butter: #FCEE21;
  --butter-ink: #5A4B00;
  --muted: #5A6247;
  --line: #E3E6D6;
  /* The "have it all" chip. */
  --have-tint: #E7F0D6;
  --have-ink: #2F4F12;
  /* Neutral pills: a source not checked yet, a crawl state. */
  --neutral-tint: #ECEEE6;
  --neutral-ink: #3F4535;
  /* The chosen ingredients of the search bar. */
  --pill: #F2F5E3;
  --pill-line: #D5DDB8;
  /* Primary call to action: a darker tomato so white text passes AA. */
  --cta: #4E7A1E;
  --cta-text: #FFFFFF;
  /* The header bar, ink in both themes. */
  --bar: #1C2117;
  --bar-ink: #FAFAF3;
  --bar-control: #2A3023;
  --bar-line: #44503A;

  --bg: var(--ground);
  --surface: #FFFFFF;
  --text: var(--ink);
  --accent: var(--leaf);
  --accent-text: var(--ground);
  --accent-soft: #EEF2DA;
  --ok: var(--have-ink);
  --ok-soft: var(--have-tint);
  --warn: var(--butter-ink);
  /* "No llega": had, but less than needed: amber ink on a dashed amber
     line, never the tomato of missing nor the butter fill of one missing. */
  --short-ink: #6B4E00;
  --short-line: #B58A00;
  /* "Caduca pronto": a warm accent (an expired item is the error). */
  --soon-ink: #8A3A00;
  --soon-soft: #FCEBDC;
  --error: #B33A1B;
  --error-soft: var(--tomato-tint);
  --radius: 14px;
  --tap: 48px;
  /* The height of the sticky header (.top): one 48px row and its
     padding at every width (measured 55.6px under 760px, 62px from it,
     es/ca/fr, anonymous and logged in: the header never wraps); anchors
     and focus scroll to below it. */
  --header-h: 62px;
  color-scheme: light;
}

/* Themes: light is the default whatever the system prefers. The header
   select (POST /theme, the theme cookie) puts a class on <html>:
   theme-dark is the dark palette, theme-system the dark palette only
   when the system prefers it. Keep both dark blocks equal
   (TestCSS_SystemThemeIsDark). The dark ground is a soft olive, not
   black. */
:root.theme-dark {
  color-scheme: dark;
  --ground: #23281E;
  --ink: #FAFAF3;
  --lime: #D9E021;
  --yellow: #FCEE21;
  --tomato: #E4572E;
  --tomato-ink: #8A3214;
  --tomato-tint: #FBE3D6;
  --leaf: #9CCB5A;
  --mix: var(--lime);
  --butter: #FCEE21;
  --butter-ink: #5A4B00;
  --muted: #B9C1A5;
  --line: #424A37;
  --have-tint: #E7F0D6;
  --have-ink: #2F4F12;
  --cta: #9CCB5A;
  --cta-text: #1C2117;
  --bar: #1C2117;
  --bar-ink: #FAFAF3;

  --surface: #2C3226;
  --accent-soft: #36402B;
  --ok: #9CCB5A;
  --ok-soft: #2F4022;
  --pill: #36402B;
  --pill-line: #4E5A42;
  --warn: #F4E04D;
  --short-ink: #F2D45C;
  --short-line: #C9A82A;
  --soon-ink: #F7B27A;
  --soon-soft: #3E2A1A;
  --error: #FF8A6B;
  --error-soft: #4A2A20;
  --neutral-tint: #424A37;
  --neutral-ink: #FAFAF3;
}

:root.theme-system { color-scheme: light dark; }

@media (prefers-color-scheme: dark) {
  :root.theme-system {
    --ground: #23281E;
    --ink: #FAFAF3;
    --lime: #D9E021;
    --yellow: #FCEE21;
    --tomato: #E4572E;
    --tomato-ink: #8A3214;
    --tomato-tint: #FBE3D6;
    --leaf: #9CCB5A;
    --mix: var(--lime);
    --butter: #FCEE21;
    --butter-ink: #5A4B00;
    --muted: #B9C1A5;
    --line: #424A37;
    --have-tint: #E7F0D6;
    --have-ink: #2F4F12;
    --cta: #9CCB5A;
    --cta-text: #1C2117;
    --bar: #1C2117;
    --bar-ink: #FAFAF3;

    --surface: #2C3226;
    --accent-soft: #36402B;
    --ok: #9CCB5A;
    --ok-soft: #2F4022;
    --pill: #36402B;
    --pill-line: #4E5A42;
    --warn: #F4E04D;
  --short-ink: #F2D45C;
  --short-line: #C9A82A;
  --soon-ink: #F7B27A;
  --soon-soft: #3E2A1A;
    --error: #FF8A6B;
    --error-soft: #4A2A20;
    --neutral-tint: #424A37;
    --neutral-ink: #FAFAF3;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* main.page is the one container of every page (the layout writes it):
   the column of the header, 75rem wide, its edges in line with the
   header's at every width. Pages keep readable columns inside it. */
main.page, footer {
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 16px;
}

main { padding-bottom: 2rem; }

h1 { font-size: 1.6rem; line-height: 1.25; margin: 1.2rem 0 .8rem; }
h2 { font-size: 1.25rem; margin: 1.6rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

a { color: var(--accent); text-underline-offset: 3px; }

/* Header: a full-width ink bar, its content in the 75rem column of the
   wide pages. On a phone the brand and the settings menu share the first
   row and the nav has its own; from 900px the nav sits between them on
   one row (one row for every viewer from 1100px). */
/* It stays at the top while the page scrolls (sticky, solid, its 1px
   border always on: no script knows it scrolled); the menu panel and the
   page dropdowns open over the content under it. */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem 1rem;
  padding: .4rem max(16px, calc((100% - 75rem) / 2 + 16px));
  background: var(--bar);
  color: var(--bar-ink);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .5rem; min-height: var(--tap); white-space: nowrap; text-decoration: none; margin-right: auto; }
/* The header nav: the pantry and the shopping list (with its count), an
   icon and a label (the short one on a phone), on every width. */
.top-nav { display: flex; align-items: center; gap: 0 .4rem; }
.top .top-nav a { min-height: var(--tap); display: inline-flex; align-items: center; gap: .4rem; padding: 0 .5rem; border-radius: 10px; color: var(--bar-ink); text-decoration: none; white-space: nowrap; }
.top .top-nav a:hover { background: var(--bar-control); }
.nav-icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.top-nav .cart-icon { width: 20px; height: 20px; vertical-align: 0; }
.top-nav .label-short { display: none; }
/* The current page: a lime bar under the link (lime on the ink bar
   passes 3:1, TestPalette_ContrastAA), the text bold and unchanged; on
   the search page the logo has it. */
.top-nav a[aria-current="page"], .brand[aria-current="page"] { font-weight: 700; box-shadow: inset 0 -3px 0 var(--lime); }
.brand[aria-current="page"] { border-radius: 0; }
form.inline { display: inline; margin: 0; }
/* The menu: one <details> on every width, after the nav. On a phone its
   panel is full width below the bar on the page surface; from 760px a
   dropdown anchored right. The pages are 48px rows, the current one
   marked; the button shows a dot when the current page is inside. */
.burger { display: block; flex: none; }
.top .burger > summary { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 12px; color: var(--bar-ink); cursor: pointer; list-style: none; }
.burger > summary::-webkit-details-marker { display: none; }
.top .burger > summary:hover, .top .burger[open] > summary { background: var(--bar-control); }
.top .menu-dot { position: absolute; top: 8px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--bar); }
.burger-icon { display: flex; flex-direction: column; gap: 5px; width: 22px; }
.burger-icon i { display: block; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.burger[open] .burger-icon i:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger[open] .burger-icon i:nth-child(2) { opacity: 0; }
.burger[open] .burger-icon i:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.burger-panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: .8rem; padding: .3rem 16px 1.2rem; background: var(--surface); color: var(--text); border-bottom: 1px solid var(--line); box-shadow: 0 16px 32px rgba(28, 33, 23, .28); }
.burger-panel nav { display: flex; flex-direction: column; }
.burger-panel nav a { min-height: 48px; display: flex; align-items: center; padding: 0 .8rem; border-bottom: 1px solid var(--line); color: var(--text); font-weight: 600; text-decoration: none; }
.burger-panel nav a[aria-current="page"] { color: var(--accent); font-weight: 750; box-shadow: inset 4px 0 0 var(--accent); }
.burger-panel select { min-height: 48px; color: var(--text); -webkit-text-fill-color: var(--text); background-color: var(--surface); border-color: var(--line); }
.burger-panel option { color: var(--text); background-color: var(--surface); }
.menu-prefs { display: flex; flex-direction: column; gap: .7rem; }
.menu-account { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.menu-account .button { flex: 1 1 auto; }
.menu-email { margin: 0; font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
@media (min-width: 760px) {
  .burger { position: relative; }
  .burger-panel { left: auto; right: 0; top: calc(100% + .45rem); width: 19rem; padding: .4rem 1rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
}
.lang { display: flex; flex-direction: column; gap: .3rem; margin: 0; }
.lang label { margin: 0; font-size: .85rem; font-weight: 650; color: var(--muted); }
.top > a:focus-visible, .top-nav :focus-visible, .top .burger > summary:focus-visible { outline-color: var(--lime); }
/* A phone: the short labels (the long one stays for screen readers);
   under 480px the logo keeps only its icon and the links only their
   icon and count, so the pantry, the list and the menu always fit one
   row (360px, French). */
@media (max-width: 759px) {
  :root { --header-h: 56px; }
  .top { flex-wrap: nowrap; gap: .2rem; padding-block: .2rem; }
  .top-nav { gap: 0; margin-left: auto; }
  .top .top-nav a { padding: 0 .4rem; gap: .3rem; }
  .top-nav .label-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .top-nav .label-short { display: inline; }
  .top-nav .nav-count { margin-left: 0; }
}
@media (max-width: 479px) {
  .top .wordmark { display: none; }
  .top-nav .label-short { display: none; }
  .top .top-nav a { padding: 0 .55rem; }
}

/* Brand: the app icon (bowl of three balls) then the wordmark "ingremix",
   as the BRAND.md header mockup (34 px icon, 24 px text). The icon is 40px
   so its balls are about 10px across. The wordmark is large bold text
   (>= 18.66px) so "mix" may use the 3:1 contrast threshold. */
.brand-mark { display: block; flex: none; width: 2.5rem; height: 2.5rem; }
.brand-mark .ball-1 { fill: var(--tomato); }
.brand-mark .ball-2 { fill: var(--lime); }
.brand-mark .ball-3 { fill: var(--yellow); }
.brand-mark .bowl { fill: var(--ink); }
.top .brand-mark .bowl { fill: var(--bar-ink); }
.wordmark {
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -.01em;
}
.wordmark .ingre { color: var(--ink); }
.wordmark .mix { color: var(--mix); }
.top .wordmark .ingre { color: var(--bar-ink); }
.top .wordmark .mix { color: var(--lime); }

/* Controls */
input, select, textarea, button, .button {
  font: inherit;
  border-radius: var(--radius);
}
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: .6rem .8rem;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
textarea { resize: vertical; line-height: 1.5; }
/* Selects draw their own arrow (two gradients in the text colour): the
   native WebKit menulist ignores the colours and its text can vanish on
   the ink header. */
select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.2rem;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 55%, calc(100% - .8rem) 55%;
  background-size: .35rem .35rem, .35rem .35rem;
  background-repeat: no-repeat;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px var(--lime); }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: .55rem 1.1rem;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
button.secondary, .button.secondary { background: transparent; color: var(--accent); }
button.primary, .button.primary { background: var(--cta); border-color: var(--cta); color: var(--cta-text); }
/* Danger (delete, revoke, clear): red text and outline only, never a
   filled red button; always behind a confirmation step. */
button.danger, .button.danger { background: transparent; border-color: var(--error); color: var(--error); }
button.danger:hover, .button.danger:hover { background: var(--error-soft); }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 400; text-decoration: underline; text-underline-offset: 3px; min-height: var(--tap); }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; }
label { display: block; font-weight: 600; margin: .6rem 0 .3rem; }

.stack { display: flex; flex-direction: column; gap: .3rem; }
.stack button { margin-top: .8rem; }
.grid { display: grid; grid-template-columns: 1fr; gap: 0 .8rem; }
.narrow { max-width: 28rem; }
/* Registration: the honeypot field is off screen (bots fill it, people
   never reach it), the link to the other auth page under the form. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.switch-auth { margin-top: 1.2rem; color: var(--muted); }
.register-taken { margin: .4rem 0 0; font-weight: 600; }
.user-row form { margin-top: .5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }

/* Search: one bar with the chosen ingredients (pills) and the text, and
   the dropdown of suggested ingredients under it. Search is first in the
   markup (Enter submits it) and last on screen. */
.smartbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .35rem .3rem .5rem;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
}
.smartbar:focus-within { border-color: var(--leaf); box-shadow: 0 0 0 3px var(--lime); }
.smartbar .go { order: 2; flex: none; min-height: 40px; padding: .4rem 1rem; border-radius: 10px; }
.smartbar .bar { order: 1; flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.smartbar .bar input#q, .ingredient-bar .bar input {
  flex: 1 1 8rem;
  width: auto;
  min-width: 6rem;
  min-height: 40px;
  padding: .3rem .3rem;
  border: 0;
  background: transparent;
  font-size: 1.1rem;
}
.smartbar .bar input#q:focus, .ingredient-bar .bar input:focus { box-shadow: none; outline: none; }
/* The add fields of the shopping list and the pantry (ingredient_bar) are
   the search bar without pills. */
.ingredient-bar { margin-top: .3rem; }
/* In the narrow search sidebar the dropdown overlays wider than its bar. */
.pantry .quick-add .ingredient-bar .suggest { right: auto; width: max(100%, 20rem); max-width: calc(100vw - 32px); }
.pills { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: .1rem;
  padding: 0 0 0 .7rem;
  border-radius: 999px;
  border: 1px solid var(--pill-line);
  background: var(--pill);
  font-size: .95rem;
  white-space: nowrap;
}
.pill button {
  min-height: 34px;
  min-width: 34px;
  padding: 0 .5rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
}
.pill button:hover { color: var(--cta); }
.suggest {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: calc(100% + .4rem);
  max-width: 100%;
  padding: .4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(28, 33, 23, .18);
}
/* WebKit does not focus a button on click or tap, so the input blurs on
   mousedown: keep the dropdown while the pointer is on the bar too, or the
   pick is lost. */
.suggest:empty { display: none; }
.smartbar:not(:focus-within):not(:hover):not(:active) .suggest { display: none; }
.suggest ul { list-style: none; margin: 0; padding: 0; }
.suggest p { margin: 0; padding: .4rem .6rem; font-size: .8rem; color: var(--muted); }
.suggest .suggest-foot { border-top: 1px solid var(--line); margin-top: .3rem; }
.suggest button {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: .4rem .6rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-weight: 400;
  text-align: left;
}
.suggest li:first-child button, .suggest button:hover, .suggest button:focus-visible { background: var(--pill); }
.suggest button b { font-weight: 700; }
/* A row is text flow: the name, count and alias wrap as one line; the
   first row's hint is a small line under it. */
.suggest .count, .suggest .alias { color: var(--muted); }
.suggest .sg-tag { display: inline-block; margin-left: .4rem; padding: 0 .45rem; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: .75rem; font-weight: 600; white-space: nowrap; }
/* Only the very first row of the dropdown is marked: the filters come
   after the ingredients. */
.suggest ul ~ .suggest-filters li:first-child button:not(:hover):not(:focus-visible) { background: transparent; }
.suggest .sg-kind { color: var(--muted); font-size: .75rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.suggest .add {
  display: block;
  font-size: .8rem;
  color: var(--muted);
}
.hint { color: var(--muted); font-size: .95rem; margin: .3rem 0; }
.recipe-lang { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; margin-top: .4rem; }
.recipe-lang label { margin: 0; font-weight: 400; }
.recipe-lang select { width: auto; }

/* Advanced search filters: a native details ("more filters"), open
   while any is set; the count of active ones sits under it with a link
   that clears them. */
label.check { display: flex; align-items: center; gap: .55rem; min-height: 40px; margin: 0; font-weight: 400; cursor: pointer; }
input[type="checkbox"] { width: 1.3rem; height: 1.3rem; flex: none; accent-color: var(--accent); margin: 0; }
.more-filters { margin-top: .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.more-filters > summary { display: flex; align-items: center; min-height: var(--tap); padding: 0 1rem; font-weight: 650; cursor: pointer; list-style: none; }
.more-filters > summary::-webkit-details-marker { display: none; }
.more-filters > summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.more-filters[open] > summary::after { content: "▴"; }
.more-filters[open] > summary { border-bottom: 1px solid var(--line); }
.more-filters > :not(summary) { margin-left: 1rem; margin-right: 1rem; }
.filter { margin: .7rem 0; }
.filter > label:not(.check) { margin: 0 0 .3rem; font-size: .9rem; }
.filter .hint { font-size: .8rem; margin: .2rem 0 0; }
.filter.sources { margin: .7rem 1rem; padding: .2rem .7rem .5rem; }
.source-mode { display: flex; flex-direction: column; padding-bottom: .3rem; border-bottom: 1px solid var(--line); }
.source-list { list-style: none; padding: 0; margin: .3rem 0 0; max-height: 15rem; overflow-y: auto; }
.source-list .count, .pantry .count { color: var(--muted); font-weight: 400; }
/* A long site name ellipsizes (its title has it whole) and keeps its
   count right after it. */
.source-list label.check { min-width: 0; }
.source-list .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-list .count { flex: none; white-space: nowrap; }
/* The course, cuisine and diet filters: a fieldset each, like the sites,
   their lists scrolling past about ten rows. */
.check-list { list-style: none; padding: 0; margin: .3rem 0 0; max-height: 15rem; overflow-y: auto; }
.check-list label.check { min-width: 0; }
.check-list .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-list .count { flex: none; white-space: nowrap; color: var(--muted); font-weight: 400; }
.meta-filters { margin: 0 1rem; }
.meta-filter { margin: .7rem 0; padding: .2rem .7rem .5rem; }
.filters fieldset { min-width: 0; }
.more-filters .apply { margin: .2rem 1rem 1rem; width: calc(100% - 2rem); }
.filters-active { margin: .5rem 0 0; font-size: .9rem; font-weight: 650; color: var(--ok); }
.filters-active:empty { display: none; }

/* Pantry */
.pantry {
  margin: 1.2rem 0;
  padding: .4rem 1rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pantry h2 { margin-top: .6rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; }
.chips form { margin: 0; }
.chip {
  min-height: 44px;
  padding: .3rem .9rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 500;
}
.chip span { margin-left: .3rem; color: var(--muted); font-size: 1.2rem; line-height: 1; }
/* The sidebar shows the first pills of each list; "+N more" opens the
   rest in place. */
.more-chips { margin: .5rem 0 0; }
.more-chips > summary { display: inline-flex; align-items: center; min-height: 36px; padding: 0 .8rem; border-radius: 999px; border: 2px dashed var(--line); color: var(--accent); font-weight: 650; cursor: pointer; list-style: none; }
.more-chips > summary::-webkit-details-marker { display: none; }
.more-chips[open] > summary { margin-bottom: .5rem; }
.pantry .manage { margin: .8rem 0 0; font-weight: 650; }
.pantry .manage a { display: inline-flex; align-items: center; min-height: 40px; }
/* The pantry page: the whole lists, side by side from 900px. */
.pantry-page .back { margin: 1rem 0 0; }
.pantry-page .lists { display: grid; gap: 0 24px; }
.pantry-list h2 { display: flex; align-items: baseline; gap: .6rem; }
.pantry-list h2 .count { margin-left: auto; font-size: .9rem; }
.pantry-list .clear { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.pantry-list .clear .danger { margin: 0; }
/* A current item of the pantry page: its pill (with its amount) and a
   toggle that opens its amount editor below, a row per amount. */
.chip .amount { margin-left: .35rem; font-weight: 700; color: var(--accent); }
.pantry-item { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; }
.amount-edit > summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .4rem; color: var(--accent); font-weight: 650; font-size: .9rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.amount-edit[open] { flex: 1 1 100%; }
.amount-edit form { margin: .2rem 0 .6rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.amount-edit fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: .4rem; }
.amount-row { display: flex; gap: .4rem; }
.amount-row input { flex: 1 1 5rem; max-width: 8rem; }
.amount-row select { flex: 1 1 7rem; max-width: 11rem; width: auto; }
.amount-edit .hint { margin: .4rem 0; font-size: .85rem; }
.muted { color: var(--muted); }
/* field-row: a field (or a few) and its button on one row, at every
   width: the input grows, a select keeps room for its text and arrow, the
   button stays on the right at the field's height. */
.field-row { display: flex; flex-wrap: nowrap; align-items: stretch; gap: .5rem; }
.field-row > input { flex: 1 1 8rem; min-width: 0; width: auto; }
.field-row > select { flex: 0 0 auto; width: auto; }
.field-row > button, .field-row > .button { flex: none; }
.stack .field-row > button { margin-top: 0; }
.field-row > input[type="file"] { padding-top: .45rem; padding-bottom: .45rem; }
form.field-row { margin: .6rem 0; }
/* Two selects and a button do not fit a phone: they wrap there. */
@media (max-width: 479px) {
  .field-row:has(> select + select) { flex-wrap: wrap; }
}

/* Results */
.results { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-direction: column; gap: .8rem; }
.card {
  padding: .9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card .title { display: block; font-size: 1.2rem; font-weight: 700; color: var(--text); text-decoration: none; }
.card .title:hover { text-decoration: underline; }
/* Hotlinked recipe images: a fixed box so the layout does not jump, the
   line colour behind it so a broken or blocked image is a plain tile. */
.photo {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--line);
  border-radius: var(--radius);
}
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .photo { margin: -.2rem 0 .6rem; }
.recipe-photo { margin: .6rem 0 1rem; }
.recipe-photo figcaption { margin-top: .3rem; font-size: .85rem; }
.meta { color: var(--muted); font-size: .95rem; margin: .2rem 0; }
.warn { color: var(--warn); }
.ok { margin: .4rem 0; color: var(--ok); font-weight: 650; }
/* Result chips: one missing butter, several tomato, none green. A missing
   chip is the summary of a details: the count shows, the list opens on
   demand (keyboard too, no script). A radius of half a line: a pill on
   one line, a rounded box when it wraps. */
.missing { margin: .4rem 0; font-weight: 600; }
.missing > summary, .ok.have-all { display: inline-block; padding: .15rem .8rem; border-radius: .9rem; font-size: .95rem; font-weight: 650; }
.missing > summary { cursor: pointer; list-style: none; }
.missing > summary::-webkit-details-marker { display: none; }
.missing > summary::after { content: "▾"; margin-left: .35rem; font-size: .8em; }
.missing[open] > summary::after { content: "▴"; }
.missing.one > summary { background: var(--butter); color: var(--butter-ink); }
.missing.many > summary { background: var(--tomato-tint); color: var(--tomato-ink); }
.missing-list { margin: .35rem 0 0; color: var(--text); font-weight: 400; font-size: .95rem; }
.ok.have-all { background: var(--have-tint); color: var(--have-ink); }
/* Lines not understood (yet): "Te faltan 0 · 1 sin reconocer", neutral,
never the "have all" green. */
.unknown-note { display: inline-block; margin: .4rem 0; padding: .15rem .8rem; border-radius: .9rem; font-size: .95rem; font-weight: 650; background: var(--neutral-tint); color: var(--neutral-ink); max-width: 100%; }
.missing > summary .unknown-count { font-weight: 600; }
.ext { display: inline-flex; align-items: center; min-height: var(--tap); }
/* Infinite scroll: the sentinel at the end of a list (next_page in
   results.tmpl) is a plain link without JS; while htmx loads the next
   page it becomes the three balls of the logo bouncing in turn. */
.more { margin: 1rem 0; display: flex; align-items: center; justify-content: center; min-height: var(--tap); }
.more .button { width: 100%; }
.more .loading { display: none; align-items: flex-end; gap: .45rem; height: 1.6rem; }
.more .loading i { width: .8rem; height: .8rem; border-radius: 50%; background: var(--tomato); animation: ingremix-bounce .9s ease-in-out infinite; }
.more .loading i:nth-child(2) { background: var(--lime); animation-delay: .15s; }
.more .loading i:nth-child(3) { background: var(--yellow); animation-delay: .3s; }
.more.htmx-request .button { display: none; }
.more.htmx-request .loading { display: inline-flex; }
@keyframes ingremix-bounce {
  0%, 70%, 100% { transform: translateY(0); }
  35% { transform: translateY(-.75rem); }
}
@media (prefers-reduced-motion: reduce) {
  .more .loading i { animation: none; }
}
.source-grid > .more { grid-column: 1 / -1; }
/* Text for screen readers only: the live status of the lists. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.empty { color: var(--muted); padding: 1.5rem 0; text-align: center; }

/* Recipe */
.facts { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: .6rem 0; }
.facts dt { color: var(--muted); font-size: .85rem; }
.facts dd { margin: 0; font-weight: 650; }
.lines { list-style: none; padding: 0; margin: 0; }
.lines li { padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: 1.15rem; }
.lines li.header { font-weight: 700; border-bottom: 0; padding-top: 1.2rem; }
.lines .text { display: block; }
.lines .parsed { display: block; color: var(--muted); font-size: .85rem; }
.steps { padding-left: 1.4rem; }
.steps li { margin: .7rem 0; font-size: 1.15rem; }
.shopping textarea { font-size: 1.05rem; }

/* Messages */
.notice, .error { padding: .7rem 1rem; border-radius: var(--radius); font-weight: 600; margin: .8rem 0; }
.notice { background: var(--ok-soft); color: var(--ok); }
/* Why the live barcode scanner gave up for the photo: not an error, not a success. */
.notice.camera-off { background: var(--neutral-tint); color: var(--neutral-ink); }
.error { background: var(--error-soft); color: var(--error); }
.danger-zone { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* Legal pages (Markdown of INGREMIX_LEGAL_DIR) */
.legal { max-width: 42rem; }
.legal h2 { margin-top: 1.75rem; }
.legal li { margin: .25rem 0; }
.legal code { overflow-wrap: anywhere; }

.delete-confirm { margin-top: 1rem; }

/* Footer */
footer {
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
footer a { color: var(--muted); }

/* Admin */
.subnav { display: flex; flex-wrap: wrap; gap: .1rem .9rem; margin: .8rem 0; padding-bottom: .4rem; border-bottom: 1px solid var(--line); font-size: .95rem; }
.subnav a { min-height: 44px; display: inline-flex; align-items: center; }
/* The current tab: ink text, bold, a leaf bar under it (leaf passes on
   the ground in both themes). */
.subnav a[aria-current="page"] { font-weight: 700; color: var(--text); text-decoration: none; box-shadow: inset 0 -3px 0 var(--accent); }
.badge { display: inline-block; padding: .05rem .6rem; border-radius: 999px; background: var(--butter); color: var(--butter-ink); font-size: .85rem; font-weight: 650; }
.badge.warn { background: var(--tomato-tint); color: var(--tomato-ink); }
.facts.big dd { font-size: 1.5rem; }
.status progress { width: 100%; height: 1rem; accent-color: var(--accent); }
.holds { list-style: none; padding: 0; margin: .4rem 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-weight: 650; }
.tokens { list-style: none; padding: 0; margin: .6rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tok { display: flex; flex-direction: column; gap: .2rem; padding: .3rem .5rem; border: 2px solid var(--line); border-radius: var(--radius); background: var(--accent-soft); }
.tok span { font-weight: 650; text-align: center; }
.tok select { width: auto; min-height: 40px; padding-top: .2rem; padding-bottom: .2rem; padding-left: .4rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: .8rem 0; padding: .4rem .8rem .8rem; }
legend { font-weight: 650; padding: 0 .3rem; }
input[type="radio"] { width: 1.4rem; height: 1.4rem; accent-color: var(--accent); margin: 0; }
.group { margin: .6rem 0; }
.member { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0; }
.member select, .member input { flex: 1 1 12rem; width: auto; }
.card form + form { margin-top: .4rem; }
.card.warn { color: var(--warn); }
/* Queue tables: numbers right aligned, the row name left; a narrow
   screen scrolls the table, not the page. */
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; }
.table-wrap { overflow-x: auto; margin: .6rem 0; }
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: .5rem .6rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th:first-child { min-width: 7rem; text-align: left; white-space: normal; overflow-wrap: break-word; }
table.data thead th { color: var(--muted); font-size: .85rem; font-weight: 650; }

/* Status pills, coloured by status (never all butter): supported green,
   not supported tomato, blocked a red outline, unchecked or checking grey;
   enabled a leaf outline, disabled a dashed grey one, paused butter. */
.pills { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0; }
.pill { display: inline-block; padding: .05rem .65rem; border: 2px solid transparent; border-radius: 999px; font-size: .85rem; font-weight: 650; line-height: 1.5; }
.pill[title] { cursor: help; }
.pill.status-supported { background: var(--have-tint); color: var(--have-ink); }
.pill.status-unsupported { background: var(--tomato-tint); color: var(--tomato-ink); }
.pill.status-blocked { background: var(--surface); color: var(--error); border: 2px solid var(--error); }
.pill.status-unchecked { background: var(--neutral-tint); color: var(--neutral-ink); }
.pill.state-enabled { background: var(--surface); color: var(--accent); border: 2px solid var(--accent); }
.pill.state-disabled { background: var(--surface); color: var(--muted); border: 2px dashed var(--muted); }
.pill.state-paused { background: var(--butter); color: var(--butter-ink); }
.pill.state-crawl { background: var(--neutral-tint); color: var(--neutral-ink); }
/* A source in its first pass: its progress, on hover its estimate. */
.pill.state-first-pass { background: var(--surface); color: var(--text); border: 2px solid var(--accent-soft); }
.status .first-pass { margin: .35rem 0 .75rem; font-weight: 650; }

/* Sources: one card per site, stacked on a phone, a grid on a desktop.
   The favicon is hotlinked from the site; without one, its initial. */
.source-grid { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; }
.source-card { display: flex; flex-direction: column; min-width: 0; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.source-head { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.source-title { min-width: 0; }
.source-title .title, .source-title h1, .source-title .meta { margin: 0; overflow-wrap: anywhere; }
.source-title .title { font-size: 1.15rem; font-weight: 700; color: var(--text); text-decoration: none; }
.source-title .title:hover { text-decoration: underline; }
.favicon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; overflow: hidden; border-radius: 10px; background: var(--accent-soft); color: var(--text); font-weight: 700; }
.favicon.big { width: 56px; height: 56px; font-size: 1.4rem; }
.favicon img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
/* A favicon that fails to load shows the initial instead of the broken
   image icon (pseudo-elements only render on a broken image). */
.favicon img::before { content: attr(data-initial); position: absolute; inset: 0; display: grid; place-items: center; background: var(--accent-soft); color: var(--text); }
.reason { margin: .2rem 0; font-size: .92rem; }
.source-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .4rem 1rem; margin: .5rem 0; }
.source-facts dt { color: var(--muted); font-size: .8rem; }
.source-facts dd { margin: 0; font-size: .95rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.source-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .5rem; }
.source-actions form { margin: 0; }
.source-actions button { min-height: 44px; padding: .3rem .8rem; font-size: .9rem; }

/* The check result: the summary first, the details on demand. */
.card.check { margin: 1rem 0; border-left: 4px solid var(--tomato); }
.card.check.ok-card { border-left-color: var(--accent); }
.card.check h2 { margin-top: 0; }
.card.check .summary { font-weight: 650; font-size: 1.05rem; }
.card.check details { margin: .6rem 0; }
.card.check summary { display: flex; align-items: center; gap: .4rem; min-height: 44px; cursor: pointer; font-weight: 650; color: var(--accent); list-style: none; }
.card.check summary::-webkit-details-marker { display: none; }
.card.check summary::before { content: "▸"; }
.card.check details[open] > summary::before { content: "▾"; }
.check-facts { display: grid; gap: .5rem; margin: .4rem 0; }
.check-facts dt { color: var(--muted); font-size: .85rem; }
.check-facts dd { margin: 0; overflow-wrap: anywhere; }
table.check-pages th:first-child { min-width: 12rem; font-weight: 400; overflow-wrap: anywhere; }
table.check-pages td { text-align: left; white-space: normal; }
table.data tr.ok-row th, table.data tr.ok-row td { background: var(--ok-soft); }

.htmx-request #results, #results.htmx-request { opacity: .6; transition: opacity .2s; }

@media (min-width: 40rem) {
  body { font-size: 18px; }
  h1 { font-size: 2rem; }
  .grid { grid-template-columns: 1fr 1fr; }
}

/* Desktop: every page is in the 75rem column (main.page).
   Search: the filters in a left sidebar and the results as a grid of
   cards (the recent recipes four across); recipe: the head and steps on
   the left, the ingredients in a panel on the right. */
@media (min-width: 900px) {
  .source-grid { grid-template-columns: repeat(auto-fill, minmax(26rem, 1fr)); }
  .admin > form.stack { max-width: 44rem; }
  .top { padding: .4rem max(24px, calc((100% - 75rem) / 2 + 24px)); }
  .top-nav { gap: 0 .6rem; }
  main.page, main.page + footer { padding-left: 24px; padding-right: 24px; }

  .search-page {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "side search" "side results";
    gap: 0 36px;
    align-items: start;
  }
  .search-page .search { grid-area: search; }
  .search-page .filters { grid-area: side; padding-top: 1.4rem; }
  .search-page #results { grid-area: results; }
  .filters > .hint { margin-top: 0; padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: .85rem; }
  .filters .recipe-lang { display: block; }
  .filters .recipe-lang label { margin-bottom: .3rem; font-size: .8rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .filters .recipe-lang select { width: 100%; }
  .filters .pantry { padding: .2rem .9rem .9rem; }
  .filters .pantry h2 { font-size: 1.05rem; }
  .filters .pantry h3 { font-size: .8rem; }
  .filters .chip { min-height: 36px; padding: .15rem .7rem; font-size: .9rem; }
  .filters .more-filters > summary { font-size: .95rem; }
  .filters .filter > label:not(.check), .filters .more-filters legend { font-size: .8rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .filters label.check { font-size: .92rem; min-height: 34px; }
  .filters .more-chips > summary { font-size: .9rem; }
  .pantry-page .lists { grid-template-columns: 1fr 1fr; align-items: start; }

  .results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
  }
  .results.recent { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .results-head { margin-bottom: 0; }
  .results .more { grid-column: 1 / -1; }
  .results .more:not(.htmx-request) .button { width: auto; min-width: 16rem; margin: 0 auto; display: flex; }
  .results .card { display: flex; flex-direction: column; align-items: flex-start; padding: 0 0 .8rem; overflow: hidden; border-radius: 18px; }
  .results .card > * { margin-left: 1rem; margin-right: 1rem; }
  .results .card > .photo { align-self: stretch; margin: 0 0 .7rem; border-radius: 0; }
  .results .card .title { font-size: 1.1rem; line-height: 1.3; }
  .results .card .meta, .results .card .missing > summary, .results .card .missing-list, .results .card .ok, .results .card .unknown-note { font-size: .85rem; }
  .results .card .card-actions { margin-top: auto; align-self: stretch; }
  .results .card .ext { min-height: 40px; font-size: .9rem; }

  .recipe {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-rows: auto 1fr;
    grid-template-areas: "head side" "body side";
    gap: 0 40px;
    align-items: start;
  }
  .recipe-head { grid-area: head; }
  .recipe-body { grid-area: body; }
  .recipe-side {
    grid-area: side;
    margin-top: 1.4rem;
    padding: .2rem 1.4rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
  }
  .recipe-side h2 { margin-top: 1rem; }
  .recipe-side .lines li { font-size: 1.02rem; padding: .55rem 0; }
  .recipe-side .actions .button { flex: 1 1 100%; }
}

/* API documentation */
.apidoc .scroll { overflow-x: auto; }
.apidoc pre { overflow-x: auto; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--accent-soft); font-size: .9rem; }
.apidoc .op { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.apidoc .toc ul { padding-left: 1.2rem; }
.apidoc dl.schema { margin: .3rem 0 .3rem 0; padding-left: 1rem; border-left: 2px solid var(--line); }
.apidoc dl.schema dt { margin-top: .5rem; }
.apidoc dl.schema dd { margin-left: 0; }
.apidoc dl.schema .type { color: var(--muted); font-size: .9rem; }

/* Import help */
.import-help { max-width: 42rem; }
.import-help ul { padding-left: 1.2rem; }
.import-help li { margin: .3rem 0; }
.import-help code { font-size: .9em; }
.import-help pre.example { overflow-x: auto; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: .85rem; line-height: 1.45; }


/* Phones: the admin tabs are one row that scrolls sideways (after the
   .subnav rule so it wins). */
@media (max-width: 759px) {
  .subnav { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
  .subnav a { flex: none; }
}

/* Shopping list (PhoneShopping mockup): rows by category, each a big
   checkbox button, the add bar under the list. */
.shopping-page { max-width: 44rem; }
.shopping-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.shopping-list .shopping-left { margin: 0 0 .4rem; color: var(--muted); font-size: .9rem; }
.shopping-section h2 { margin: 1.2rem 0 .2rem; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.shopping-section ul { margin: 0; padding: 0; list-style: none; }
.shopping-item { display: flex; align-items: center; gap: 14px; padding: 8px 4px; border-bottom: 1px solid var(--line); min-height: var(--tap); }
.shopping-item form { margin: 0; }
.shopping-item .tick { width: 44px; height: 44px; min-height: 44px; padding: 0; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; flex-shrink: 0; }
.shopping-item .tick svg { width: 26px; height: 26px; box-sizing: border-box; padding: 4px; border-radius: 8px; border: 2px solid var(--pill-line); background: var(--surface); fill: none; stroke: transparent; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.shopping-item.done .tick svg { background: var(--leaf); border-color: var(--leaf); stroke: var(--surface); }
.shopping-item .what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shopping-item .name { font-size: 1rem; overflow-wrap: anywhere; }
.shopping-item .from { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.shopping-item.done .name { text-decoration: line-through; color: var(--muted); }
.shopping-add { margin: 1.2rem 0 .6rem; }
.shopping-settings { margin: .4rem 0; font-size: .9rem; }
/* A source's icon before its name (hotlinked; decorative). */
.favicon { width: 16px; height: 16px; flex: none; border-radius: 3px; vertical-align: -3px; margin-right: .35rem; object-fit: contain; }
.source-name { display: inline-flex; align-items: center; }

/* The add field first (the main action), its live preview under it. */
.shopping-main .shopping-add { margin: .6rem 0 1rem; }
.line-preview { margin: .35rem .2rem 0; min-height: 1.3em; font-size: .9rem; color: var(--muted); }
.line-preview:empty { min-height: 0; margin: 0; }
.line-preview b { color: var(--text); }
/* A row: tick, what, and its edit toggle (a <details> whose panel takes
   the whole row below when open). */
.shopping-item { flex-wrap: wrap; }
.shopping-item .what { flex: 1 1 0; }
.shop-edit { flex: none; margin-left: auto; }
.shop-edit[open] { flex: 1 1 100%; order: 3; }
.shop-edit > summary { list-style: none; cursor: pointer; }
.shop-edit > summary::-webkit-details-marker, .confirm > summary::-webkit-details-marker { display: none; }
.shop-edit[open] > summary { display: flex; margin-left: auto; width: max-content; }
.shop-edit-panel { display: flex; flex-direction: column; gap: .6rem; padding: .6rem 0 .4rem; }
.shop-edit-panel label { font-size: .9rem; font-weight: 600; }
.confirm > summary { list-style: none; cursor: pointer; width: max-content; }
.confirm[open] > summary { display: none; }
.confirm form { margin: 0; }
/* The compact buttons of a list (its rows, their edit, the bought
   sub-list): one size wherever they are. */
.button.small, button.small, .smartbar .go.small { min-height: 36px; padding: .2rem .8rem; font-size: .85rem; border-radius: 10px; }
.shop-edit-panel .field-row input { min-height: 40px; padding-top: .35rem; padding-bottom: .35rem; }
/* The bought rows: a sub-list closed by default at the bottom, "Vaciar
   comprados" in its header, on the right. */
.bought-box { position: relative; margin-top: 1.4rem; border-top: 1px solid var(--line); }
.bought > summary { display: flex; align-items: center; min-height: var(--tap); padding-right: 11rem; font-size: .9rem; font-weight: 650; color: var(--muted); cursor: pointer; }
.bought ul { margin: 0; padding: 0; list-style: none; }
.bought-clear { position: absolute; top: 6px; right: 0; display: flex; justify-content: flex-end; }
.bought-clear[open] { background: var(--bg); }
.cart-icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
/* On the list is not had: neutral ink, not the green of "tienes". */
p.added { margin: .4rem 0; font-weight: 600; color: var(--neutral-ink); }
.nav-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.35rem; height: 1.35rem; margin-left: .35rem; padding: 0 .35rem; border-radius: 999px; background: var(--lime); color: var(--ink); font-size: .75rem; font-weight: 700; line-height: 1; }
.nav-count[hidden] { display: none; }

/* The banner the service worker shows on a saved copy (offline). */
.offline-banner { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 18px; background: var(--butter); color: var(--butter-ink); font-size: .85rem; font-weight: 600; }
.offline-banner[hidden] { display: none; }
.offline-banner svg { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* The install banner of the search page on a phone (install.go): one row
   under the header, its close button a large tap target. */
.install-banner { display: flex; align-items: center; gap: .6rem; padding: 0 4px 0 16px; background: var(--surface); color: var(--text); border-bottom: 1px solid var(--line); font-size: .9rem; }
.install-banner p { flex: 1 1 auto; margin: 0; padding: .5rem 0; }
.install-banner a { color: var(--accent); font-weight: 650; }
.install-banner form { margin: 0; }
.install-banner button { min-width: var(--tap); min-height: var(--tap); padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 1.1rem; }
.install-banner button:hover { color: var(--text); }
.install-banner-icon { flex: none; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* The install page: a drawing beside the steps of each platform, the
   detected one open, the others closed. */
.install-page { max-width: 42rem; }
.install-page ul, .install-page ol { padding-left: 1.3rem; }
.install-page li { margin: .35rem 0; }
.install-platform { margin: .8rem 0; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.install-platform.current { border: 2px solid var(--accent); }
.install-platform h3 { margin: 0 0 .4rem; color: var(--text); text-transform: none; letter-spacing: 0; font-size: 1.1rem; }
.install-platform > summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 650; cursor: pointer; list-style: none; }
.install-platform > summary::-webkit-details-marker { display: none; }
.install-platform > summary::after { content: "▾"; margin-left: auto; padding-left: .5rem; color: var(--muted); }
.install-platform[open] > summary::after { content: "▴"; }
.install-platform[open] > summary { margin-bottom: .4rem; }
.install-steps { display: flex; align-items: flex-start; gap: 1rem; }
.install-steps ol { margin: 0; }
.install-art { flex: none; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.install-art .art-line { stroke: var(--muted); }
.install-art .art-mark-line { stroke: var(--accent); stroke-width: 3; }
.install-art .art-mark { fill: var(--accent); }
.install-art .art-off { stroke: var(--error); }

/* The installed app (display-mode standalone) never invites to install. */
@media (display-mode: standalone) {
  .menu-install, .install-banner { display: none; }
}

/* Recipe ingredients: what the pantry has of each line (PageRecipe
   mockup): a dot and a tag, green had, yellow staple, tomato missing; a
   "+" adds a missing ingredient to the shopping list. */
.lines-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .2rem 1rem; }
.lines-head h2 { margin-bottom: .2rem; }
.have-summary { margin: 0; font-size: .85rem; color: var(--muted); }
.have-summary .missing-count { display: inline-block; font-weight: 600; background: var(--tomato-tint); color: var(--tomato-ink); padding: 2px 9px; border-radius: 999px; }
.have-summary .have-all { font-weight: 600; color: var(--ok); }
.have-summary .missing-count.none { background: var(--neutral-tint); color: var(--neutral-ink); }
.have-summary .unknown-count { font-weight: 600; color: var(--neutral-ink); }
.lines .line-main { display: flex; align-items: center; gap: 10px; }
.lines .line-main .text { flex: 1; min-width: 0; }
.lines .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--line); }
.lines li.need-have .dot { background: var(--leaf); }
.lines li.need-staple .dot { background: var(--lime); }
.lines li.need-missing .dot { background: var(--tomato); }
.lines li.need-unknown .dot { width: 16px; height: 16px; background: var(--neutral-tint); color: var(--neutral-ink); font-size: .7rem; font-weight: 700; line-height: 16px; text-align: center; }
/* On the shopping list: still missing, but to buy already: a cart in
   place of the dot, neutral ink (never the green of had). */
.lines li.need-onlist .dot { width: 16px; height: 16px; background: none; border-radius: 0; color: var(--neutral-ink); display: inline-flex; }
.lines li.need-onlist .dot .cart-icon { width: 16px; height: 16px; vertical-align: 0; }
.lines li.need-onlist .need-tag { color: var(--neutral-ink); font-weight: 600; }
.lines li.optional .text { color: var(--muted); }
.lines .opt-tag { font-size: .7rem; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.onlist-mark { display: inline-flex; align-items: center; gap: 3px; font-size: .8rem; font-weight: 600; color: var(--neutral-ink); white-space: nowrap; }
.have-summary .onlist-count, .have-summary .optional-count { color: var(--muted); font-weight: 600; }
.add-missing button[disabled] { opacity: 1; background: var(--neutral-tint); border-color: var(--neutral-tint); color: var(--neutral-ink); cursor: default; }
.lines .need-tag { font-size: .75rem; color: var(--muted); }
.lines li.need-have .need-tag { color: var(--leaf); }
.lines li.need-missing .need-tag { color: var(--error); }
.lines .add-one { margin: 0; }
/* Had with less than needed: still green (had), with an amber warning. */
.lines li .short-tag { margin: .35rem 0 0; }
.short-tag, p.short-count { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border: 1px dashed var(--short-line); border-radius: 999px; color: var(--short-ink); font-size: .78rem; font-weight: 650; }
.short-icon { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.have-summary .short-count { color: var(--short-ink); font-weight: 650; }
.results .card p.short-count { margin: .3rem 0 0; font-size: .85rem; }
.lines .add-one button.plus { min-height: 36px; min-width: 36px; padding: 0; border-radius: 50%; font-size: 1.2rem; line-height: 1; }
.lines .add-one + .added, .lines p.added { font-size: .8rem; margin: 0; }
/* "✓ Lo tengo ▾" beside the "+" of a missing ingredient: a split
   button, the ▾ a native details whose menu drops under it ("Siempre lo
   tengo", "Quitar de la lista"). Under it, once done, what it did and
   "Deshacer". */
.lines .line-acts { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.lines .have-one { margin: 0; }
.lines .have-split { position: relative; display: inline-flex; align-items: stretch; }
.lines .have-split .have-main { min-height: 36px; padding: 0 .65rem; border-radius: 999px 0 0 999px; font-size: .85rem; font-weight: 650; gap: .3rem; background: var(--surface); color: var(--accent); border: 1.5px solid var(--accent); white-space: nowrap; }
.lines .have-more > summary { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; min-width: 32px; border: 1.5px solid var(--accent); border-left-width: 0; border-radius: 0 999px 999px 0; color: var(--accent); background: var(--surface); cursor: pointer; list-style: none; font-size: .85rem; }
.lines .have-more > summary::-webkit-details-marker { display: none; }
.lines .have-split .have-main:hover, .lines .have-more > summary:hover, .lines .have-more[open] > summary { background: var(--accent-soft); }
.lines .have-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; display: flex; flex-direction: column; gap: .4rem; min-width: 13rem; padding: .5rem; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 24px rgba(28, 33, 23, .22); font-size: .9rem; }
.lines .have-menu button { min-height: 40px; justify-content: flex-start; text-align: left; background: var(--surface); color: var(--accent); border: 1.5px solid var(--accent); font-weight: 650; }
.lines .have-menu label.check { display: flex; align-items: center; gap: .4rem; min-height: 36px; font-size: .85rem; color: var(--text); }
.lines .have-done { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; margin: .35rem 0 0; font-size: .85rem; color: var(--ok); font-weight: 600; }
.lines .have-done.dup { color: var(--muted); font-weight: 400; }
.lines .have-done.error { color: var(--error); }
.lines .have-undo { margin: 0; display: inline; }
.lines .have-undo button.link { min-height: 32px; font-size: .85rem; }
/* The actions go under the text when the line has no room for both
   (the side panel, a phone). */
.lines .line-main { flex-wrap: wrap; }
.lines .line-main .text { flex: 1 1 9rem; }
.lines .line-acts { margin-left: auto; }
.add-missing { margin: 0; }
/* Servings: "Raciones − 4 +" (round outline steps, secondary) or the
   multipliers ×½ ×1 ×2 as a segmented outline; links, no script. */
.servings { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .6rem; margin: .3rem 0 .6rem; }
.servings-label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.servings .step { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 2px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: 1.25rem; font-weight: 700; line-height: 1; text-decoration: none; }
.servings .step:hover { background: var(--accent-soft); }
.servings .step[aria-disabled="true"] { border-color: var(--line); color: var(--muted); }
.servings .step[aria-disabled="true"]:hover { background: none; }
.servings-n { min-width: 2ch; text-align: center; font-size: 1.15rem; font-weight: 750; }
.servings .factor { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 44px; padding: 0 .7rem; border: 2px solid var(--accent); border-radius: 999px; color: var(--accent); font-weight: 650; text-decoration: none; }
.servings .factor.current { background: var(--accent); color: var(--accent-text); }
.servings-reset { font-size: .85rem; }
.lines .unscaled-tag { font-size: .7rem; padding: 1px 7px; border-radius: 999px; border: 1px dashed var(--line); color: var(--muted); white-space: nowrap; }
.lines .scaled-tag { font-weight: 650; color: var(--accent); white-space: nowrap; }
.cook-recipe .scale-note { color: var(--muted); font-size: .9rem; }
.offline-page, .page-error { max-width: 44rem; }
/* Readable columns inside the shared container: the forms and the API
   reference keep a line length, left aligned with the header. */
main.page form.stack { max-width: 44rem; }
.apidoc { max-width: 60rem; }

/* Admin pages share the column of every page (main.page,
   main.admin-main): wide tables scroll inside it, narrow forms stay left
   aligned at their own width. */
main.admin-main .admin table { display: block; max-width: 100%; overflow-x: auto; }
main.admin-main .admin table.data { display: table; }
main.admin-main .admin > form.stack { max-width: 44rem; }
@media (min-width: 900px) {
  /* The review cards (ul.results) at two or three readable columns. */
  main.admin-main .admin > .results { grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr)); }
}

/* The filter bar of the admin sources: the search page's filters (.filters
   .filter, small caps labels) laid out as a grid above the cards; each
   select shows the count of every value. */
.source-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: .1rem 1rem;
  margin: 1rem 0;
  padding: .4rem 1rem .8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.source-filters .filter { margin: .4rem 0 0; min-width: 0; }
.source-filters .filter > label { font-size: .8rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.source-filters select, .source-filters input { width: 100%; min-height: 40px; padding-top: .3rem; padding-bottom: .3rem; font-size: .95rem; }
.source-filters .filter-q { grid-column: span 2; }
@media (min-width: 760px) { .source-filters .filter-sort { grid-column: span 2; } }
.source-filters .filter-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin-top: .6rem; }
.source-filters .filter-actions button { min-height: 40px; }
.source-filters .count { color: var(--muted); font-size: .9rem; }
#source-list.htmx-request, .source-filters.htmx-request + #source-list { opacity: .6; transition: opacity .2s; }

/* Every select keeps room for its arrow (drawn in its padding, see the
   select rule): last in the file, so no padding set for one place covers
   the arrow. A long option ends in an ellipsis before it, and a select
   never overflows its box (a card, a grid cell). */
select:not([multiple]) {
  padding-right: 2.25rem;
  min-width: 5.5rem;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* The search sidebar is one stack: every block (help, recipe language,
   more filters, shopping list, pantry) the same gap from the next. Last
   in the file so its margins win over each block's own. */
.side-stack { display: flex; flex-direction: column; gap: 1rem; }
.side-stack > * { margin-top: 0; margin-bottom: 0; }

/* The search page on a phone: the bar, one row of two toggles (the
   filters and the pantry, closed <details>) and the results. The help
   card and the shopping list box are hidden (the list is in the burger).
   An open toggle takes the whole row and is a card with its panel. */
@media (max-width: 759px) {
/* search-phone */
  .filters > .hint { display: none; }
  .search-page .filters.side-stack { flex-direction: row; flex-wrap: wrap; gap: .5rem; }
  .search-page .filters { margin: .8rem 0 1rem; }
  .side-toggle { flex: 1 1 0; min-width: 0; max-width: calc(50% - .25rem); }
  .side-toggle[open] { flex-basis: 100%; max-width: none; }
  .side-toggle > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: var(--tap);
    padding: 0 .9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-weight: 650;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
  }
  .side-toggle > summary::-webkit-details-marker { display: none; }
  .side-toggle > summary::after { content: "▾"; color: var(--muted); }
  .side-toggle[open] > summary::after { content: "▴"; }
  .side-toggle[open] > summary { border-color: var(--leaf); background: var(--pill); }
  #pantry.side-toggle { padding: 0; border: 0; background: none; }
  .side-toggle[open], #pantry.side-toggle[open] { padding: .5rem .8rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  #pantry.side-toggle > h2 { display: none; }
  .filters-toggle .search-filters { margin-top: .8rem; }
  .filters-toggle .more-filters { border: 0; background: none; }
  .filters-toggle .more-filters > :not(summary) { margin-left: 0; margin-right: 0; }
  .filters-toggle .more-filters .apply { margin: .2rem 0 0; width: 100%; }
}

/* Opening a closed <details> by CSS needs ::details-content (2024
   browsers). Without it the summaries stay: from 760px the toggles are
   headings that open their block, and on a phone the advanced filters
   keep their own "more filters" toggle. */
.side-toggle > summary { cursor: pointer; font-weight: 650; }
@supports selector(::details-content) {
@media (max-width: 759px) {
  /* On a phone the open filters toggle shows every filter at once. */
  .filters-toggle .more-filters > summary { display: none; }
  .filters-toggle .more-filters::details-content { content-visibility: visible; display: contents; }
}
}
@supports selector(::details-content) {
@media (min-width: 760px) {
/* search-phone */
  /* From 760px the toggles are always open, without their summaries. */
  .side-toggle > summary { display: none; }
  .side-toggle::details-content { content-visibility: visible; display: contents; }
}
}

/* Course, cuisine and diet chips of a result card and a recipe page; the
   diets in the "have" green, as they are told by the ingredients. */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: .4rem 0; }
.chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 .6rem; border-radius: 999px; background: var(--neutral-tint); color: var(--neutral-ink); font-size: .8rem; font-weight: 600; line-height: 1.2; }
.chip.diet { background: var(--have-tint); color: var(--have-ink); }
.chips .diets-note { margin: 0 0 0 .2rem; font-size: .8rem; }
/* The rating, author and video a site published, one wrapping row. */
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; margin: .4rem 0; color: var(--muted); font-size: .95rem; }
.byline .stars { color: var(--mix); letter-spacing: .05em; }
.byline .video { font-weight: 650; }
/* The site's rating on a card and the note that it is the site's. */
.card .rating { white-space: nowrap; color: var(--text); }
.card .rating .count { color: var(--muted); }
.byline .rating-source { margin: 0; font-size: .8rem; }
/* The ingremix rating of a recipe, apart from the site's, and the stars
   of the viewer: a radio group whose labels draw the stars, hollow up
   from the chosen one (no script; the inputs stay focusable). */
.rating-box { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin: .4rem 0 .8rem; }
.rating-box p { margin: 0; }
.rating-box .rating.ingremix { color: var(--text); font-weight: 650; }
.rating-box .rating.ingremix .brand-name { color: var(--accent); }
.rating-box form { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: 0; }
.rating-box button { margin: 0; }
.stars-input { position: relative; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 .1rem; border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.stars-input legend { float: left; margin: 0 .5rem 0 0; padding: 0; font-size: .95rem; color: var(--muted); }
.stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.stars-input label { cursor: pointer; margin: 0; padding: .15rem; font-size: 1.6rem; line-height: 1; color: var(--muted); }
.stars-input label::before { content: "\2606"; }
.stars-input label:has(~ input:checked)::before, .stars-input input:checked + label::before { content: "\2605"; }
.stars-input label:has(~ input:checked), .stars-input input:checked + label { color: var(--mix); }
/* Hovering a star fills it and the ones before it, empties the ones after. */
.stars-input:has(label:hover) label { color: var(--mix); }
.stars-input:has(label:hover) label::before { content: "\2605"; }
.stars-input label:hover ~ label { color: var(--muted); }
.stars-input label:hover ~ label::before { content: "\2606"; }
.stars-input input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.card .rating.ingremix { font-weight: 650; }

/* The line editor of the recipe form: a line per ingredient, what
   ingremix reads of it under it (QTY · UNIT · chips marked as the recipe
   page marks them), the picker of an unclear line. */
.line-editor { padding-bottom: .6rem; }
.line-editor .hint { font-size: .85rem; margin: 0 0 .4rem; }
.line-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.line-row { padding: .3rem 0 .45rem; border-bottom: 1px solid var(--line); }
.line-row:last-child { border-bottom: 0; }
.line-input { display: flex; align-items: flex-start; gap: .3rem; }
.line-input textarea { min-height: 44px; resize: none; overflow: hidden; field-sizing: content; }
.line-input .remove-line { flex: none; width: 44px; min-height: 44px; font-size: 1.4rem; text-decoration: none; color: var(--muted); }
.line-input .remove-line:hover { color: var(--error); }
.line-reading { margin: .25rem .2rem 0; font-size: .88rem; color: var(--muted); }
.line-reading:empty { margin: 0; }
.line-reading p { margin: .15rem 0; }
.lr-main { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .3rem; }
.lr-main .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--line); margin-right: .15rem; }
.lr-main.need-have .dot { background: var(--leaf); }
.lr-main.need-staple .dot { background: var(--lime); }
.lr-main.need-missing .dot { background: var(--tomato); }
.lr-amount { color: var(--text); font-weight: 600; }
.lr-plus { color: var(--muted); }
.lr-chip { display: inline-block; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--pill); color: var(--text); overflow-wrap: anywhere; }
.lr-chip.need-have { border-color: var(--leaf); }
.lr-chip.need-missing { border-color: var(--tomato); }
.lr-chip.need-staple { border-color: var(--lime); }
.lr-chip.unknown { border-style: dashed; border-color: var(--warn); background: transparent; }
.lr-prep { font-style: italic; }
.lr-main .need-tag { font-size: .75rem; }
.lr-main.need-have .need-tag { color: var(--leaf); }
.lr-main.need-missing .need-tag { color: var(--error); }
.lr-picked { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.lr-picked button.link { min-height: 32px; }
.warn-chip { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--butter); color: var(--butter-ink); font-weight: 650; font-size: .8rem; }
.lr-note { font-size: .8rem; }
.line-pick { margin-top: .35rem; }
.line-pick label { font-size: .85rem; margin: .2rem 0; }
.line-picker .bar input { min-height: 40px; }
.line-editor .add-line { margin-top: .6rem; }
/* The picker's dropdown pushes what is under it rather than covering
   it ("+ Añadir ingrediente"). */
.smartbar.line-picker { flex-wrap: wrap; padding: 0; border: 0; background: none; }
.smartbar.line-picker:focus-within { box-shadow: none; }
.line-picker .bar { order: 1; flex: 1 1 100%; padding: .3rem .35rem .3rem .5rem; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); }
.line-picker .bar:focus-within { border-color: var(--leaf); box-shadow: 0 0 0 3px var(--lime); }
.line-picker .suggest { order: 2; position: static; flex: 1 1 100%; margin-top: .3rem; }

/* The recipe form: one column on a phone (title and language, the
   ingredients and steps, the rest); from 900px the ingredients and steps
   on the left, wide, and the title, language and the rest on the right. */
.recipe-form { display: grid; gap: 0 2rem; grid-template-areas: "top" "main" "side"; }
.recipe-form > div { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.rf-top { grid-area: top; }
.rf-main { grid-area: main; }
.rf-side { grid-area: side; }
.rf-side > button[type="submit"] { margin-top: .8rem; }
.recipe-form .notice { color: var(--warn); }
/* "Importar desde una web": the URL field above the new recipe form (and
   on /import), then what was read: the page's hotlinked image and notes. */
.url-import { display: flex; flex-direction: column; gap: .3rem; margin: .4rem 0 1.2rem; padding: .8rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); max-width: 44rem; }
.url-import .hint { margin: 0 0 .2rem; }
@media (max-width: 480px) { .url-import .field-row { flex-direction: column; } }
.url-draft { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; max-width: 44rem; }
.url-draft p { margin: 0; flex: 1 1 14rem; }
.url-draft-image { width: 6rem; height: 6rem; object-fit: cover; border-radius: var(--radius); flex: none; }
@media (min-width: 900px) {
  .recipe-form { grid-template-columns: minmax(0, 1.8fr) minmax(16rem, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "main top" "main side"; align-items: start; }
  .rf-main .line-editor { margin-top: .6rem; }
}

/* "Lo he cocinado": the confirmation (a card per pantry item, its
   explicit box, the amount to take and what is left) and the result
   (what changed, each line correctable). One column, phone first. */
.cook-page, .cooked-page { max-width: 44rem; }
.cook-page .back, .cooked-page .back { margin: 1rem 0 0; }
.cook-recipe { margin: -.4rem 0 .6rem; font-weight: 650; color: var(--muted); }
.cook-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .2rem 1rem; margin: .6rem 0; }
.cook-count { margin: 0; font-weight: 700; color: var(--ok); }
.cook-lines, .cooked-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.cook-line, .cooked-line { padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cook-line.optional { border-style: dashed; }
.cook-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.cook-name .hint { flex: 1 1 100%; margin: 0; font-size: .85rem; }
.cook-amount { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .2rem; }
.cook-amount input { flex: 0 1 6rem; width: 6rem; }
.cook-amount select { flex: 0 1 8rem; width: auto; }
.cook-amount .have { color: var(--muted); }
.cook-amount .minus { font-weight: 700; }
.cook-amount .left { font-weight: 650; color: var(--ok); }
.cook-left { border: 0; margin: .3rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.2rem; }
.cook-left legend { padding: 0; margin-bottom: .1rem; font-weight: 600; }
.cook-form .actions, .cooked-page .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1rem 0; }
.cook-form .actions form, .cooked-page .actions form { margin: 0; }
.cooked-change { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.cooked-change .change { font-variant-numeric: tabular-nums; }
.cooked-line.subtract .change, .cooked-line.remove .change { font-weight: 650; }
.cooked-line.unchanged .change, .cooked-line.restored .change { color: var(--muted); }
.cooked-line .add-one { margin: .4rem 0 0; }
.cooked-line .add-one button { min-height: 40px; gap: .3rem; }
.cooked-fix { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1rem; }
.cooked-fix form { margin: 0; }
.cooked-fix button.link, .cooked-fix .amount-edit > summary { font-size: .9rem; font-weight: 650; padding: 0; }
.cooked-fix .hint { flex: 1 1 100%; margin: .2rem 0 0; font-size: .85rem; }
.cooked-rate { margin-top: 1.4rem; }
.cooked-note { margin: 0 0 .5rem; font-size: .85rem; color: var(--muted); }
.recipe-side .actions .cook { margin: 0; }
.pantry-item, .amount-edit, .amount-edit form, .amount-row input, .amount-row select, .cook-amount input, .cook-amount select { min-width: 0; }
.amount-edit form { max-width: 100%; box-sizing: border-box; }

/* Receipt scanning: the upload, the reading (polled), the review (a card
   per receipt line: its printed text, the ingredient picker, the amount
   and its boxes) and the result. The cook styles, one column. */
.receipt-page { max-width: 44rem; }
.receipt-page .back { margin: 1rem 0 0; }
.receipt-entry { display: flex; flex-wrap: wrap; gap: .5rem; margin: .2rem 0 1rem; }
.receipt-upload input[type="file"] { max-width: 100%; }
/* The two ways in, each a button-like card with its file field (the
   chosen file shows its name); a computer (fine pointer that hovers) has
   no camera to open: only "Subir una foto". */
.photo-choices { border: 0; margin: 0; padding: 0; display: grid; gap: .6rem; min-width: 0; }
.photo-choices legend { padding: 0; margin-bottom: .4rem; font-weight: 700; }
.file-choice { display: grid; gap: .3rem; padding: .7rem .9rem; border: 2px solid var(--leaf); border-radius: var(--radius); background: var(--surface); cursor: pointer; min-width: 0; }
.file-choice .file-label { font-weight: 750; color: var(--accent); }
.file-choice:focus-within { box-shadow: 0 0 0 3px var(--lime); }
.file-choice input[type="file"] { font-size: .9rem; min-width: 0; }
@media (hover: hover) and (pointer: fine) {
  .file-choice.camera { display: none; }
}
.receipt-upload .actions, .receipt-page .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1rem 0; }
.receipt-page .actions form, .receipt-page .actions > * { margin: 0; }
.receipt-reading { padding: 1rem 0; }
.receipt-reading .spinner { width: 2rem; height: 2rem; margin: .4rem 0; border: 3px solid var(--line); border-top-color: var(--leaf); border-radius: 50%; animation: ingremix-spin 1s linear infinite; }
@keyframes ingremix-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .receipt-reading .spinner { animation: none; } }
.receipt-line { display: grid; gap: .35rem; min-width: 0; }
.receipt-line code { font-size: .85rem; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
.receipt-line .receipt-text label.check { align-items: flex-start; }
.receipt-line.not-food, .receipt-line.unmatched { border-style: dashed; }
.receipt-line.not-food .receipt-reading-line { opacity: .7; }
.receipt-reading-line { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; min-width: 0; }
.receipt-reading-line .ingredient-bar { flex: 1 1 14rem; min-width: 0; }
.receipt-reading-line .hint { font-size: .85rem; margin: 0; }
.receipt-line .not-food-box { margin-left: auto; font-size: .9rem; }
.cook-amount .not-food-box input { flex: none; width: auto; }
.receipt-on-list { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; margin: 0; }
.receipt-applied .opt-tag { color: var(--ok); }

/* Expiry dates: a small badge after a pantry item, a had recipe line or
   on a result card. Soon (today to 3 days ahead) is the warm accent,
   expired the danger outline; a later date shows none. */
.expiry { display: inline-flex; align-items: center; padding: .05rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; border: 1.5px solid currentColor; line-height: 1.5; }
.expiry-soon { color: var(--soon-ink); background: var(--soon-soft); border-color: var(--soon-ink); }
.expiry-past { color: var(--error); background: transparent; border-color: var(--error); }
.pantry-item .expiry { align-self: center; }
.expiry-edit > summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .4rem; color: var(--accent); font-weight: 650; font-size: .9rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.expiry-edit[open] { flex: 1 1 100%; }
.expiry-edit form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .2rem 0 .6rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
input[type="date"] { min-height: var(--tap); padding: .3rem .5rem; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; max-width: 100%; }
.add-expiry { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .5rem 0 0; }
.add-expiry label { display: inline; margin: 0; font-weight: 650; }
.add-expiry input[type="date"] { width: auto; flex: 0 1 12rem; }
.add-expiry .hint { margin: 0; }
.receipt-expiry { margin: 0; font-weight: 400; }
.receipt-expiry input[type="date"] { width: auto; min-width: 10rem; }
.use-soon-count, .use-soon-head { margin: .2rem 0 .8rem; }
.use-soon-count a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 .8rem; border-radius: 999px; border: 1.5px solid var(--soon-ink); background: var(--soon-soft); color: var(--soon-ink); font-weight: 700; text-decoration: none; }
.use-soon, .expired-warn { margin: .3rem 0 0; font-size: .9rem; }
.use-soon-pill { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .5rem 0 0; }
.use-soon-pill .hint { margin: 0; }
button.pill-soon { min-height: 36px; padding: 0 .9rem; border-radius: 999px; border: 1.5px solid var(--soon-ink); background: var(--soon-soft); color: var(--soon-ink); font-weight: 700; }
.receipt-expiry { display: inline-flex; align-items: center; gap: .4rem; }
.receipt-expiry span { font-size: .85rem; font-weight: 650; }
/* In the sidebar a badge sits next to its pill, not under it. */
.chips li:not(.pantry-item):has(> .expiry) { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem; max-width: 100%; min-width: 0; }
.chips li:not(.pantry-item) > .expiry { white-space: normal; }
/* The receipt text, editable when the OCR misread it. */
.receipt-line .receipt-text { display: grid; gap: .3rem; }
.receipt-text-edit { width: 100%; max-width: 28rem; min-height: var(--tap); padding: .3rem .6rem; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-family: ui-monospace, monospace; font-size: .9rem; text-transform: none; }
/* A ticked line the confirmation found no ingredient for. */
.receipt-line.unresolved { border: 2px solid var(--error); border-style: solid; }
.receipt-unresolved { margin: 0; font-weight: 700; }
/* "Añadir igualmente" of a receipt line naming no ingredient. */
.receipt-anyway { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; }
.receipt-anyway .hint { margin: 0; font-size: .85rem; }
/* The live scanner dialog of the pantry page (assets/barcode-scan.js):
   phone first, the video with an aiming line, closed without the script. */
.barcode-live { width: min(30rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.barcode-live::backdrop { background: rgb(0 0 0 / .65); }
.barcode-live h2 { margin: 0 0 .3rem; font-size: 1.2rem; }
.barcode-live .hint { margin: .3rem 0; }
.barcode-live-view { position: relative; aspect-ratio: 4 / 3; margin: .6rem 0; background: #000; border-radius: calc(var(--radius) - 4px); overflow: hidden; }
.barcode-live-view video { display: block; width: 100%; height: 100%; object-fit: cover; }
.barcode-live-view::after { content: ""; position: absolute; left: 10%; right: 10%; top: 50%; border-top: 2px solid var(--tomato); box-shadow: 0 0 0 1px rgb(0 0 0 / .3); }
.barcode-live-status { min-height: 1.5em; margin: 0; font-weight: 700; color: var(--ok); }
.barcode-live form { display: none; }
.barcode-live .actions { margin: .6rem 0 0; }
.barcode-live .actions > * { flex: 1 1 auto; text-align: center; }
/* Barcode scanning: the number typed when the photo does not read, the
   product card of the review and the Open Food Facts attribution. */
.barcode-number { display: grid; gap: .3rem; margin: .8rem 0 0; }
.barcode-number label { font-weight: 700; }
.barcode-number input { width: 100%; max-width: 16rem; min-height: var(--tap); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.barcode-number .hint { margin: 0; font-size: .85rem; }
.barcode-product { margin: .4rem 0 .8rem; }
.barcode-product .title { margin: 0; overflow-wrap: anywhere; }
.barcode-product .meta { margin: .2rem 0 0; color: var(--muted); overflow-wrap: anywhere; }
.barcode-line .receipt-reading-line > label { font-weight: 700; }
.attribution { font-size: .85rem; }
/* Products missing or wrong on Open Food Facts: links there, or a
report for the admins (the app never writes to Open Food Facts). */
.off-report { margin: .4rem 0 .8rem; }
.off-report p { margin: .2rem 0; }
.off-report-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem !important; }
details.off-report summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.off-report-form .field { display: flex; flex-direction: column; gap: .25rem; margin: 0; }
.off-report-form input:not([type=checkbox]):not([type=radio]), .off-report-form textarea, .off-report-resolve textarea { width: 100%; max-width: 32rem; box-sizing: border-box; }
.off-report-form fieldset { display: flex; flex-direction: column; gap: .5rem; }
.off-report-consent { display: flex; flex-direction: column; gap: .3rem; }
.off-report-thumbs { display: flex; flex-wrap: wrap; gap: .5rem; }
.off-report-thumbs img { max-width: 160px; height: auto; border-radius: 6px; border: 1px solid var(--line); }
.barcode-source { font-size: .85rem; margin: 0; }
/* The amount: its label above, quantity and unit side by side; the
   expiry date below with the same label. */
.barcode-amount { display: grid; gap: .6rem; margin-top: .2rem; }
.barcode-qty, .barcode-expiry { display: grid; gap: .3rem; }
.barcode-amount label { font-weight: 700; margin: 0; }
.barcode-amount label .hint { font-weight: 400; }
.barcode-qty-row { display: grid; grid-template-columns: minmax(5rem, 8rem) minmax(6rem, 10rem); gap: .5rem; }
.barcode-qty-row input, .barcode-qty-row select { width: 100%; min-width: 0; }
.barcode-expiry input[type="date"] { width: auto; max-width: 14rem; }
@media (min-width: 640px) { .barcode-amount { grid-template-columns: auto auto; justify-content: start; align-items: start; gap: .6rem 1.5rem; } .barcode-amount-fields { grid-template-columns: auto auto; align-items: start; gap: .6rem 1.5rem; } .barcode-total { grid-column: 1 / -1; } }
.corrections button:disabled { opacity: .45; cursor: not-allowed; }
/* The pantry's free-text items ("Otros"). */
.pantry-others { margin-top: 1.2rem; }
/* The admins' receipt corrections. */
.corrections .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.corrections form.assign { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.corrections form.assign input { width: auto; flex: 1 1 10rem; min-width: 0; }
/* The pantry page: its add forms first, under the title, side by side
   from 900px as the lists below them. */
.pantry-adds { display: grid; gap: .6rem 24px; margin: .6rem 0 .8rem; }
.pantry-adds .add { margin: 0; }
.pantry-adds .add > label { font-weight: 650; }
.pantry-notes { margin-top: 1.2rem; }
@media (min-width: 900px) {
  .pantry-adds, .pantry-page .lists { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
}
/* A current item of the pantry page is a row of its own, as the shopping
   list's: name and remove on the left, amount and expiry on the right,
   its editors as compact buttons kept together, after them when they fit
   and on a line of their own otherwise (always on a phone); an open
   editor takes the whole row. */
.pantry-rows { margin: 0; padding: 0; list-style: none; }
.pantry-section-title { margin: 1rem 0 .1rem; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pantry-section:first-child .pantry-section-title { margin-top: .4rem; }
/* The heading is the rule above the first row. */
.pantry-section-title + .pantry-rows .pantry-row:first-child { border-top: 0; }
.pantry-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.pantry-row:first-child { border-top: 1px solid var(--line); }
/* An item typed again (PANTRYDUP): its notice next to the add forms and
its row marked, by the answer or by its link's fragment. */
.pantry-dup p { margin: 0 0 .4rem; }
.pantry-dup .dup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; font-weight: 400; }
.pantry-dup .dup-actions form { margin: 0; }
.pantry-has { margin: .5rem 0; }
.pantry-has-text { margin: 0 0 .3rem; font-weight: 600; }
.pantry-has-choice { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: 0; padding: 0; border: 0; }
.pantry-row.dup-target, .pantry-row:target { padding-left: 8px; padding-right: 8px; }
.pantry-row.dup-target, .pantry-row:target, .chips li.dup-target, .chips li:target { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--radius); scroll-margin-top: 5rem; }
.pantry-row-main { flex: 1 1 8rem; display: flex; align-items: center; gap: 4px; min-width: 0; }
.pantry-row-name { font-size: 1rem; font-weight: 600; overflow-wrap: break-word; min-width: 0; }
.pantry-row-main form { margin: 0; flex: none; }
button.pantry-row-remove { min-height: 36px; min-width: 36px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; line-height: 1; }
button.pantry-row-remove:hover { color: var(--error); }
.pantry-row-meta { flex: none; margin-left: auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pantry-row-meta .amount { font-weight: 700; color: var(--accent); }
.pantry-row-actions { flex: none; margin-left: auto; display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 6px; }
.pantry-row-actions > details > summary { display: inline-flex; align-items: center; min-height: 32px; padding: 0 .7rem; border: 1.5px solid var(--line); border-radius: 999px; background: transparent; color: var(--accent); font-size: .82rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.pantry-row-actions > details[open] > summary { border-color: var(--accent); }
.pantry-row:has(details[open]) .pantry-row-actions { flex: 1 1 100%; flex-wrap: wrap; margin-left: 0; }
.pantry-row-actions > details[open] { flex: 1 1 100%; order: 2; }
.pantry-row-actions > details[open] form { margin-top: .4rem; }
@media (max-width: 599px) { .pantry-row-actions { flex: 1 1 100%; margin-left: 0; } }

/* Favourites: the "Guardar" toggle is an outline pill (secondary) that
   fills when pressed (saved); the bookmark icon fills too. */
.fav-form { margin: 0; }
button.fav { gap: .4rem; min-height: 40px; padding: .3rem .85rem; border-radius: 999px; background: transparent; color: var(--accent); border-color: var(--accent); font-size: .9rem; }
button.fav:hover { background: var(--accent-soft); }
button.fav .fav-icon { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
button.fav.saved { background: var(--accent); color: var(--accent-text); }
button.fav.saved .fav-icon { fill: currentColor; }
button.fav-remove { min-height: 40px; padding: .3rem .85rem; border-radius: 999px; font-size: .9rem; }
.card-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.recipe-title { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1rem; }
.recipe-title h1 { margin-bottom: .3rem; }
.empty-state { max-width: 36rem; padding: 1.2rem 0; }

/* "Lo que he cocinado": a list per month, the date in a narrow column,
   the actions under the recipe on a phone and beside it from 760px. */
.history-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem 1rem; margin: .6rem 0 1rem; }
.history-filters .filter { display: flex; flex-direction: column; gap: .2rem; }
.history-filters label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.history-month { margin: 1.4rem 0 .2rem; font-size: 1.1rem; text-transform: capitalize; }
.history-list { list-style: none; margin: 0; padding: 0; }
.history-item { display: grid; grid-template-columns: 4.5rem 1fr; gap: .3rem 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.history-date { margin: 0; color: var(--muted); font-weight: 650; }
.history-main .title { font-weight: 700; }
.history-main .title.gone { color: var(--muted); font-style: italic; font-weight: 600; }
.history-main .meta { margin: .15rem 0 0; color: var(--muted); font-size: .9rem; }
.history-main .stars { color: var(--short-ink); letter-spacing: 1px; }
.history-actions { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; }
.history-actions .button { min-height: 40px; padding: .3rem .85rem; border-radius: 999px; font-size: .9rem; }
@media (min-width: 760px) {
  .history-item { grid-template-columns: 5rem 1fr auto; align-items: center; }
  .history-actions { grid-column: auto; justify-content: flex-end; }
}
.fav-full-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; }
.fav-full { margin: 0; font-size: .85rem; color: var(--error); font-weight: 600; }
.cook-recipe .gone { color: var(--muted); font-style: italic; }

/* The amount of a scan's review (BARCODEMATCH): "Cuántos", the total,
   "sin cantidad" and the message next to a wrong field. */
.barcode-amount-fields { display: grid; gap: .6rem; }
.barcode-amount-fields[hidden] { display: none; }
.barcode-count { display: grid; gap: .3rem; }
.barcode-count input[type="number"] { width: 6rem; min-height: 2.75rem; font-size: 1.1rem; }
.barcode-total { margin: 0; font-weight: 700; }
.barcode-no-amount { margin: .2rem 0 0; }
.field-error { margin: .2rem 0 0; color: var(--error); font-size: .95rem; }
.receipt-form input[aria-invalid="true"], .receipt-form select[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.receipt-amount-fields { display: contents; }
.receipt-amount-fields[hidden] { display: none; }
