/* Berry Recipes — public site stylesheet.
   Transcribed from design/mockups/Berry Recipes.dc.html (Claude Design
   canvas export). Values (colors, radii, spacing, shadows) are copied
   from the mockup's inline styles as-is — this file does not restyle
   the approved design, it just moves it out of inline attributes and
   into reusable classes so pages can be server-rendered dynamically. */

/* Self-hosted Onest (see DECISIONS.md, "Fix: PageSpeed performance").
   Previously loaded via a render-blocking <link rel="stylesheet"> to
   fonts.googleapis.com — preconnect hints were already in place
   (base.html) but couldn't eliminate the extra request for the CSS
   itself, which Lighthouse measured at ~750ms of the page's total
   render-blocking time. Self-hosting removes that round trip entirely.

   Only the "latin" and "latin-ext" unicode-range subsets are kept —
   this is a Polish-language site; the other five subsets Google Fonts
   serves by default (cyrillic, cyrillic-ext, greek/math, symbols,
   vietnamese) are never used, and every Polish diacritic (ą ć ę ł ń ś
   ź ż) falls inside "latin-ext"'s own declared range. Google's own
   served CSS turned out to reference the exact same two physical font
   files for all five weights (400/500/600/700/800) per subset — Onest
   ships as a variable font, so there are genuinely only 2 files to
   self-host, not 10; the 5 @font-face rules per subset below are kept
   (rather than collapsed to one `font-weight: 400 800` range rule)
   only to mirror exactly what Google's own CSS already declared and
   was already working in production. */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/onest-latin-ext.3e2cb9888206.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/onest-latin.3db826ed1c5d.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/onest-latin-ext.3e2cb9888206.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/onest-latin.3db826ed1c5d.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/onest-latin-ext.3e2cb9888206.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/onest-latin.3db826ed1c5d.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/onest-latin-ext.3e2cb9888206.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/onest-latin.3db826ed1c5d.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/onest-latin-ext.3e2cb9888206.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/onest-latin.3db826ed1c5d.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --color-bg: #E6E6E6;
  --color-surface: #F2F2F2;
  --color-white: #FFFFFF;
  --color-text: #1A1A1A;
  --color-text-secondary: #4A4A4A;
  --color-text-body: #2E2E2E;
  --color-muted: #6B6B6B;
  --color-muted-2: #8A8A8A;
  --color-muted-3: #7A7A7A;
  --color-border: #ECECEC;
  --color-border-2: #F2F2F2;
  --color-border-3: #DCDCDC;
  --color-border-4: #D6D6D6;

  --color-brand: #F32447;
  --color-brand-hover: #C41B37;
  --color-brand-bg: #FFEDF0;

  --color-green: #1DC747;
  --color-green-dark: #149A36;
  --color-green-bg: #E8FAEC;

  --shadow-card: 0 2px 12px rgba(26, 26, 26, .06);
  --shadow-brand: 0 8px 24px rgba(243, 36, 71, .24);
  --shadow-brand-lg: 0 12px 32px rgba(243, 36, 71, .24);

  --radius-pill: 999px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 14px;

  --placeholder-fill: repeating-linear-gradient(135deg, #E4E4E4 0 10px, #EFEFEF 10px 20px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  font-family: 'Onest', system-ui, sans-serif;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  /* Sticky footer: body's direct children are header/main/footer (see
     base.html) with no wrapper div. Without this, a page shorter than
     the viewport (e.g. the "Dziękujemy!" confirmation page) ends
     wherever its content ends, leaving var(--color-bg) grey showing
     through below the (white) footer down to the bottom of the screen —
     the footer needs to be pushed to the end of an at-least-viewport-tall
     column, not just sit after however much content there is. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Grows to fill whatever space header+footer don't use, pushing the
   footer to the end of the flex column above instead of leaving it
   wherever short content happens to stop. */
main { flex: 1 0 auto; }

a {
  color: var(--color-brand);
  text-decoration: none;
}
a:hover { color: var(--color-brand-hover); text-decoration: underline; }
/* "Links can't be distinguished without relying on color" — a real
   Lighthouse/PageSpeed accessibility flag (see DECISIONS.md, "Fix:
   PageSpeed performance"). The bare `a` rule above is fine for nav
   items, buttons, and whole-card links (already visually set apart by
   their own layout/shape, not sitting inline in a sentence), but a link
   embedded mid-sentence next to plain-colored text needs a non-color
   indicator too. Every real instance of that pattern found in this
   codebase: a plain <p> of body copy (legal pages, the cookie banner,
   registration's data-processing notice, empty-state prompts, the
   contact page), a legal clause's own <li> (Regulamin serwisu), the
   breadcrumb trail (link vs. its own "·" separators/.current text), the
   rating widget's login hint, and a consent checkbox's label text.
   (Nothing else in this codebase uses <li> — confirmed no nav/footer
   list markup would pick this up unintentionally.) */
p a, li a, .breadcrumb a, .hint a, .form-checkbox a {
  text-decoration: underline;
}

img { max-width: 100%; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------- Placeholder image fill (used until real photography exists) ---------- */
.placeholder-fill {
  background: var(--placeholder-fill);
}

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--color-white);
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
}
.site-header__left {
  display: flex;
  align-items: center;
  gap: 32px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
}
.site-logo:hover { text-decoration: none; }
.site-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  flex: none;
}
.site-logo__name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.site-nav {
  display: flex;
  gap: 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-secondary);
}
.site-nav a { color: inherit; }
.site-nav a:hover { text-decoration: none; color: var(--color-brand); }
.site-nav a.is-active {
  color: var(--color-brand);
  font-weight: 600;
}
.site-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--color-muted);
  flex: none;
  border: none;
  cursor: pointer;
}

/* ---------- Mobile nav (hamburger) — hidden entirely above the
   max-width:960px breakpoint in "Responsive" below, where .site-nav and
   .site-header__right are the ones actually shown. See DECISIONS.md
   ("Fix: broken mobile nav"). ---------- */
.nav-mobile { display: none; }
.nav-mobile__toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  cursor: pointer;
  list-style: none;
}
.nav-mobile__toggle::-webkit-details-marker { display: none; }
.nav-mobile__toggle::marker { content: ""; }
/* Three-bar icon, drawn rather than a glyph/image — a middle bar plus a
   box-shadow pair above/below keeps it crisp at any zoom level. */
.nav-mobile__toggle::before {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}
.nav-mobile[open] .nav-mobile__toggle { background: var(--color-brand-bg); color: var(--color-brand); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--color-brand);
  color: var(--color-white);
  padding: 11px 22px;
}
.btn-primary:hover { background: var(--color-brand-hover); color: var(--color-white); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-brand);
  color: var(--color-brand);
  padding: 10px 18px;
}
.btn-ghost {
  background: var(--color-surface);
  color: var(--color-text);
  padding: 10px 16px;
}
.btn-on-brand {
  background: var(--color-white);
  color: var(--color-brand);
  padding: 14px;
  width: 100%;
  text-align: center;
}
.btn-store {
  flex: 1;
  border: 1.5px solid rgba(255, 255, 255, .5);
  border-radius: var(--radius-pill);
  padding: 11px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-white);
}

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
}
.badge-pink { background: var(--color-brand-bg); color: var(--color-brand); }
.badge-neutral { background: var(--color-surface); color: var(--color-muted); }
.badge-green { background: var(--color-green-bg); color: var(--color-green-dark); }

/* ---------- Generic card ---------- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
}

/* ---------- Auth forms (login/register) ---------- */
.auth-page { max-width: 440px; margin: 0 auto; }
.auth-page h1 { margin: 0 0 6px 0; }
.auth-page__intro { color: var(--color-text-secondary); margin: 0 0 24px 0; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 14px; font-weight: 600; color: var(--color-text); }
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="text"] {
  height: 48px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border-3);
  padding: 0 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-white);
}
.form-field input:focus { outline: none; border-color: var(--color-brand); }
.form-checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--color-text-secondary); }
.form-checkbox input { margin-top: 3px; }
.form-error, .form-field-error { color: var(--color-brand); font-size: 14px; margin: 0; }
.form-field-error { font-size: 13px; }
.auth-form__footer { font-size: 14px; color: var(--color-text-secondary); text-align: center; margin: 18px 0 0 0; }
.auth-form__footer a { color: var(--color-brand); font-weight: 600; }

/* "lub" divider between the email/password form and the Google button
   below it — same two auth pages (login/register) only, see
   DECISIONS.md ("Add Google Sign-In"). */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--color-muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--color-border-3); }
/* Google's own brand guidelines allow a restyled button as long as the
   logo mark itself isn't altered — this matches .btn-social's existing
   outlined-pill look (used for Instagram/YouTube/Facebook on the author
   profile) rather than Google's own default branded button, so it reads
   as part of this site's design language, not a bolted-on widget. */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--color-white);
  border: 1.5px solid var(--color-border-3);
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}
.btn-google:hover { background: var(--color-surface); text-decoration: none; }
.btn-google svg { flex: none; }

/* ---------- Community recipe submission form ---------- */
/* No approved mockup exists for this page (see DECISIONS.md) — built from
   the same .card/.form-field building blocks as login/register, just
   wider and with a few extra input types those forms don't use. */
.submit-recipe-page { max-width: 760px; margin: 0 auto; }
.submit-recipe-page h1 { margin: 0 0 6px 0; }
.submit-recipe-page__intro { color: var(--color-text-secondary); margin: 0 0 24px 0; }
/* Edit-with-remoderation only (web:edit-recipe) — the recipe's current
   main image, shown above the (now-optional) upload field so leaving it
   blank clearly means "keep this", not "no image at all". */
.submit-recipe-page__current-image { display: block; width: 160px; height: 110px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 10px; }
.form-field textarea,
.form-field select,
.form-field input[type="number"] {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border-3);
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-white);
}
.form-field select,
.form-field input[type="number"] { height: 48px; padding: 0 16px; }
.form-field textarea { resize: vertical; min-height: 90px; }
.form-field input[type="file"] { font-size: 14px; }
.form-field textarea:focus,
.form-field select:focus { outline: none; border-color: var(--color-brand); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.form-section-title { font-size: 18px; font-weight: 700; margin: 8px 0 0 0; }
.form-section-hint { font-size: 13px; color: var(--color-text-secondary); margin: -10px 0 0 0; }
.form-repeat-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-3);
}
.form-repeat-row:last-child { border-bottom: none; }
.form-repeat-row input { min-width: 0; }
.form-repeat-step { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--color-border-3); }
.form-repeat-step:last-child { border-bottom: none; }
.form-repeat-step__label { font-size: 13px; font-weight: 600; color: var(--color-text-secondary); }
/* Honeypot: present in the DOM (so a bot's scraper/autofill still finds
   it) but invisible and unreachable to a real visitor, keyboard or not —
   not display:none, which some bots skip precisely because it's the
   go-to honeypot tell. */
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted-2);
  margin-bottom: 16px;
}
.breadcrumb .current { color: var(--color-text); }

/* ---------- Page shell ---------- */
.page-content {
  padding: 28px 40px 48px 40px;
}

/* ================= Recipe detail ================= */
.recipe-layout {
  display: grid;
  grid-template-columns: 1fr 384px;
  gap: 32px;
  align-items: start;
}
.recipe-main { display: flex; flex-direction: column; gap: 24px; }
.recipe-sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 24px; }

.recipe-hero__badges { display: flex; gap: 8px; margin-bottom: 16px; }
.recipe-hero h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.02em;
}
.recipe-hero__description {
  margin: 16px 0 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  max-width: 56ch;
}
.recipe-hero__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: 16px;
}
.recipe-byline { display: flex; align-items: center; gap: 12px; }
.avatar {
  border-radius: 50%;
  background: var(--placeholder-fill);
  flex: none;
  overflow: hidden;
  object-fit: cover;
  display: block;
}
.avatar-48 { width: 48px; height: 48px; }
.avatar-56 { width: 56px; height: 56px; }
.avatar-40 { width: 40px; height: 40px; }
.avatar-22 { width: 22px; height: 22px; }
/* A random berry-emoji default avatar (see DECISIONS.md, "Random avatar
   emoji") rendered as a <span> instead of the usual <img> — same circle
   sizing as .avatar above, just centering the emoji glyph. Background is
   overridden to plain white here rather than inheriting .avatar's own
   grey diagonal-stripe placeholder background — that stripe pattern is
   reserved for the genuine "nothing set at all" case, not a deliberately
   -chosen emoji avatar (real UI polish bug, found live — see DECISIONS.md,
   "Random avatar emoji: picker/rendering polish"). Font sizes are per
   fixed avatar-<N> class since there's no size-relative unit that tracks
   a sibling class's own width in plain CSS. */
.avatar--emoji { display: flex; align-items: center; justify-content: center; line-height: 1; background: var(--color-white); }
.avatar-22.avatar--emoji { font-size: 13px; }
.avatar-40.avatar--emoji { font-size: 22px; }
.avatar-48.avatar--emoji { font-size: 26px; }
.avatar-56.avatar--emoji { font-size: 30px; }
.recipe-byline__name { font-size: 15px; font-weight: 600; }
.recipe-byline__name .level { font-weight: 500; color: var(--color-muted-2); }
.recipe-byline__date { font-size: 13px; color: var(--color-muted-2); }
.recipe-hero__actions { display: flex; align-items: center; gap: 10px; }
.like-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-brand);
  color: var(--color-brand);
  font-size: 15px;
  font-weight: 600;
  background: none;
  font-family: inherit;
  cursor: pointer;
}
.like-pill.is-active { background: var(--color-brand); color: var(--color-white); }
.rating-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: 15px;
  font-weight: 600;
}
.stars-filled { color: var(--color-brand); }
.stars-empty { color: var(--color-border-4); }
.rating-count { color: var(--color-muted); font-weight: 500; }
.rating-widget-stars .stars button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  line-height: 1;
}

.recipe-gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.recipe-gallery__main {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.recipe-gallery__main img, .recipe-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.recipe-gallery__thumbs { display: flex; flex-direction: column; gap: 16px; }
.recipe-gallery__thumb {
  flex: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--color-muted-3);
}
.recipe-gallery__thumb.is-overflow {
  font-weight: 700;
  font-size: 16px;
  color: var(--color-muted);
}

.meta-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 20px 28px;
}
.meta-item { display: flex; align-items: center; gap: 12px; }
.meta-item + .meta-item { border-left: 1px solid var(--color-border); padding-left: 24px; }
.meta-item__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: none;
}
.meta-item__icon.pink { background: var(--color-brand-bg); color: var(--color-brand); }
.meta-item__icon.green { background: var(--color-green-bg); color: var(--color-green); }
.meta-item__icon.neutral { background: var(--color-surface); color: var(--color-muted); }
.meta-item__label { font-size: 12px; font-weight: 500; color: var(--color-muted-2); }
.meta-item__value { font-size: 17px; font-weight: 700; }

.section-title { margin: 0 0 20px 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; }

/* recipe.description — the long field, distinct from the hero's own
   short_description (.recipe-hero__description above) — shown as an
   intro paragraph above the step list, not next to the short one, so
   the two don't read as duplicates of each other. Same secondary-text
   "intro paragraph under a heading" treatment .legal-content__intro
   already established, not a new visual language. {{ ... |linebreaks }}
   wraps the text in one <p> per blank-line-separated paragraph (real
   recipes in this dataset have multi-paragraph descriptions), so the
   spacing rule targets those child <p> tags, not this wrapper itself.
   See DECISIONS.md ("Surface recipe.description"). */
.recipe-steps__intro { font-size: 17px; line-height: 1.6; color: var(--color-text-secondary); margin: 0 0 24px 0; }
.recipe-steps__intro p { margin: 0 0 14px 0; }
.recipe-steps__intro p:last-child { margin-bottom: 0; }

.instructions-list { display: flex; flex-direction: column; gap: 20px; }
.instruction-step { display: flex; gap: 16px; }
.instruction-step__number {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-brand);
  color: var(--color-white);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.instruction-step__text { font-size: 17px; line-height: 1.65; color: var(--color-text-body); padding-top: 5px; }

.video-embed { aspect-ratio: 16/9; border-radius: var(--radius-md); overflow: hidden; background: #1A1A1A; }
.video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

.rating-widget-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.rating-widget-head .count { font-size: 14px; color: var(--color-muted-2); }
.rating-widget-stars { display: flex; align-items: center; gap: 16px; }
.rating-widget-stars .stars { display: flex; align-items: center; gap: 4px; font-size: 34px; color: var(--color-border-4); }
.rating-widget-stars .hint { font-size: 15px; color: var(--color-muted); }

.ingredients-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.ingredients-head h2 { margin: 0; font-size: 24px; font-weight: 800; }
.servings-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  padding: 5px 8px;
  font-size: 14px;
  font-weight: 600;
}
.servings-stepper__btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
}
.servings-stepper__value { min-width: 56px; text-align: center; }

.ingredient-list { display: flex; flex-direction: column; }
.ingredient-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-2);
}
.ingredient-row:last-child { border-bottom: none; }
.ingredient-check {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--color-border-4);
  flex: none;
}
.ingredient-name { flex: 1; font-size: 16px; color: var(--color-text-body); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ingredient-qty { font-size: 16px; font-weight: 600; color: var(--color-muted); }
.ingredient-berry-note { font-size: 13px; font-weight: 600; color: var(--color-brand); margin-bottom: 10px; }
.ingredient-berry-product {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 3px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-brand);
}
.ingredient-berry-product img { width: 18px; height: 18px; border-radius: 5px; object-fit: cover; flex: none; }

.berry-cta {
  background: var(--color-brand);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: var(--color-white);
  box-shadow: var(--shadow-brand);
}
.berry-cta__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.berry-cta__logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--color-white);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.berry-cta__logo img { width: 32px; height: 32px; object-fit: contain; display: block; }
.berry-cta__brand { font-size: 20px; font-weight: 800; }
.berry-cta__headline { font-size: 20px; line-height: 1.4; font-weight: 700; }
.berry-cta__body { font-size: 15px; line-height: 1.55; margin-top: 10px; color: rgba(255, 255, 255, .88); }
.berry-cta__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.berry-cta__stores { display: flex; gap: 10px; }
.berry-cta__disclaimer { font-size: 12px; line-height: 1.5; margin: 12px 0 0; color: rgba(255, 255, 255, .7); }

.similar-recipes__title { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.similar-recipes__list { display: flex; flex-direction: column; gap: 14px; }
.similar-recipe { display: flex; gap: 12px; align-items: center; }
.similar-recipe__thumb { width: 64px; height: 64px; border-radius: 14px; flex: none; overflow: hidden; }
.similar-recipe__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.similar-recipe__title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.similar-recipe__meta { font-size: 13px; color: var(--color-muted-2); margin-top: 4px; }

/* ================= Recipe cards (category listing / author / homepage) ================= */
.recipe-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: block;
  color: inherit;
}
.recipe-card:hover { text-decoration: none; }
.recipe-card__image { height: 160px; position: relative; overflow: hidden; }
.recipe-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recipe-card__like {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand);
}
.recipe-card__time-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .92);
  font-size: 12px;
  font-weight: 600;
}
.recipe-card__rank {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--color-brand);
  color: var(--color-white);
  font-size: 12px;
  font-weight: 700;
}
.recipe-card__body { padding: 16px; }
.recipe-card__title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.recipe-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 13px;
  color: var(--color-muted-2);
}
.recipe-card__author { display: flex; align-items: center; gap: 6px; }
.recipe-card__rating { font-weight: 600; color: var(--color-text); }
.recipe-card__meta-line { font-size: 13px; color: var(--color-muted-2); margin-top: 10px; }

.recipe-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.recipe-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ================= Category listing ================= */
.category-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 24px;
  flex-wrap: wrap;
}
.category-page-head h1 { margin: 0; font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
.category-page-head p { margin: 10px 0 0 0; font-size: 17px; color: var(--color-text-secondary); max-width: 64ch; }
.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-white);
  border-radius: var(--radius-pill);
  padding: 6px 6px 6px 18px;
  box-shadow: var(--shadow-card);
  font-size: 15px;
  font-weight: 500;
}
.sort-control__value { padding: 8px 16px; border-radius: var(--radius-pill); background: var(--color-surface); font-weight: 600; }

.listing-layout { display: grid; grid-template-columns: 264px 1fr; gap: 28px; align-items: start; }
.filter-card { background: var(--color-white); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-card); }
.filter-card + .filter-card { margin-top: 16px; }
.filter-card__title { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.filter-list { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.filter-option { display: flex; align-items: center; gap: 10px; color: inherit; }
.filter-option:hover { text-decoration: none; }
.filter-option__check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--color-border-4);
  flex: none;
}
.filter-option.is-active .filter-option__check {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: var(--color-white);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.filter-option__label { flex: 1; color: var(--color-text-body); }
.filter-option.is-active .filter-option__label { font-weight: 600; color: var(--color-text); }
.filter-option__count { color: var(--color-muted-2); }
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-pill {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
}
.filter-pill.is-active { background: var(--color-brand-bg); color: var(--color-brand); font-weight: 600; }
.filter-divider { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--color-border-2); }
.filter-clear { margin-top: 18px; text-align: center; font-size: 14px; font-weight: 600; color: var(--color-muted-2); }

.active-filters { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--color-muted); flex-wrap: wrap; }
.active-filter-chip {
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  font-weight: 600;
  color: var(--color-text);
}

.listing-results { display: flex; flex-direction: column; gap: 20px; }
.empty-state { padding: 48px 24px; text-align: center; color: var(--color-muted); font-size: 16px; }

.promo-banner {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.promo-banner__left { display: flex; align-items: center; gap: 14px; }
.promo-banner__left img { width: 52px; height: 52px; object-fit: contain; display: block; flex: none; }
.promo-banner__title { font-size: 19px; font-weight: 800; }
.promo-banner__body { font-size: 15px; color: var(--color-muted); margin-top: 3px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: 8px; }
.pagination a, .pagination span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-white);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}
.pagination .is-current { background: var(--color-brand); color: var(--color-white); }
.pagination .disabled { color: var(--color-muted-2); }

/* ================= Author profile ================= */
.author-hero {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.author-avatar-lg {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  flex: none;
  overflow: hidden;
}
.author-avatar-lg img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* White circle behind the emoji, not the grey placeholder-fill stripe
   pattern — that pattern is reserved for the true empty case (see the
   conditional `placeholder-fill` class in the templates themselves,
   my_account.html/author_profile.html). Real UI polish bug, found live —
   see DECISIONS.md ("Random avatar emoji: picker/rendering polish"). */
.author-avatar-lg__emoji { width: 100%; height: 100%; border-radius: 50%; background: var(--color-white); display: flex; align-items: center; justify-content: center; font-size: 64px; line-height: 1; }
.author-hero__body { flex: 1; }
.author-hero__name-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.author-hero__name-row h1 { margin: 0; font-size: 36px; font-weight: 800; letter-spacing: -.02em; }
.author-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-brand-bg);
  color: var(--color-brand);
  font-size: 14px;
  font-weight: 700;
}
.author-handle { font-family: 'Onest', sans-serif; font-size: 13px; color: var(--color-muted-2); margin-top: 8px; }
.author-bio { margin: 14px 0 0 0; font-size: 17px; line-height: 1.6; color: var(--color-text-secondary); max-width: 70ch; }
.author-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.btn-social { padding: 11px 20px; border-radius: var(--radius-pill); border: 1.5px solid var(--color-border-3); font-size: 15px; font-weight: 600; color: var(--color-text); }
.author-stats { flex: none; display: flex; gap: 12px; flex-wrap: wrap; }
.author-stat { width: 120px; background: var(--color-surface); border-radius: var(--radius-md); padding: 18px; text-align: center; }
.author-stat__value { font-size: 28px; font-weight: 800; }
.author-stat__value.brand { color: var(--color-brand); }
.author-stat__label { font-size: 13px; color: var(--color-muted); font-weight: 500; margin-top: 2px; }

.level-progress-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.level-progress-card__label { font-size: 15px; font-weight: 600; flex: none; }
.level-progress-track { flex: 1; display: flex; align-items: center; min-width: 240px; }
.level-segment { flex: 1; display: flex; flex-direction: column; gap: 8px; margin-left: 6px; }
.level-segment:first-child { margin-left: 0; }
.level-segment__bar { height: 8px; border-radius: var(--radius-pill); background: var(--color-border-4); }
.level-segment.is-reached .level-segment__bar { background: var(--color-brand); }
.level-segment__label { font-size: 13px; font-weight: 500; color: var(--color-muted-2); }
.level-segment.is-reached .level-segment__label { font-weight: 600; color: var(--color-text); }
.level-segment.is-current .level-segment__label { font-weight: 700; color: var(--color-brand); }
.level-progress-card__next { font-size: 14px; color: var(--color-muted); flex: none; }
.level-progress-card__next strong { font-weight: 700; color: var(--color-text); }

.author-tabs { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.author-tabs__list { display: flex; gap: 8px; }
.author-tab { padding: 10px 20px; border-radius: var(--radius-pill); background: var(--color-white); font-size: 15px; font-weight: 600; color: var(--color-text-secondary); }
.author-tab.is-active { background: #1A1A1A; color: var(--color-white); }

.author-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 14px;
}
.author-card__name { font-size: 16px; font-weight: 700; }
.author-card__meta { font-size: 13px; color: var(--color-brand); font-weight: 600; margin-top: 3px; }

/* ================= Personal dashboard (/moje-konto/) ================= */
.my-account-basic { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.my-account-basic__body { flex: 1; }
.my-account-basic__name-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.my-account-basic__name-row h2 { margin: 0; font-size: 24px; }
/* Native <details>/<summary> reveal, no JS — see DECISIONS.md ("Fix:
   broken mobile nav" for the established pattern, "Personal dashboard"
   for this specific use). */
.my-account-name-change { margin-top: 14px; }
.my-account-name-change summary { display: inline-block; font-size: 14px; font-weight: 600; color: var(--color-brand); cursor: pointer; }
.my-account-name-change__form { display: flex; gap: 10px; margin-top: 10px; max-width: 360px; }
.my-account-name-change__form input[type="text"] {
  flex: 1;
  /* Flex items default to min-width:auto (sized to their own content —
     here, whatever the current display_name value is), which refuses
     to shrink below that and overflows the row on a narrow screen
     instead of respecting flex:1. Real bug caught live at 375px. */
  min-width: 0;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border-3);
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-white);
}
.my-account-name-change__form input[type="text"]:focus { outline: none; border-color: var(--color-brand); }
/* Same reveal-a-form pattern as .my-account-name-change above, one
   <details> down. See DECISIONS.md ("Random avatar emoji"). */
.my-account-avatar-change { margin-top: 10px; }
.my-account-avatar-change summary { display: inline-block; font-size: 14px; font-weight: 600; color: var(--color-brand); cursor: pointer; }
.my-account-avatar-change__form { margin-top: 10px; max-width: 360px; }
.my-account-avatar-change__options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.my-account-avatar-change__option {
  position: relative;
  width: 44px;
  height: 44px;
  cursor: pointer;
}
/* The visible circle lives on the <span>, not the <label> — a plain CSS
   sibling selector (input:checked ~ span below) can only reach an actual
   sibling, not its own parent, so the highlight has to be drawn here to
   update live the instant a radio is checked, with no JS and no reload.
   Real bug fixed here, found live by the founder: the previous version
   only ever reflected the *saved* selection (a server-rendered class),
   so clicking a different swatch showed no visual change until the form
   was actually submitted — see DECISIONS.md ("Random avatar emoji:
   picker/rendering polish"). */
.my-account-avatar-change__option span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-3);
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
/* Visually hidden but still a real, clickable/keyboard-focusable radio —
   positioned relative to its own label (set above), not the page, so it
   can never itself cause the kind of off-screen horizontal overflow a
   plain `position: absolute` without a positioned ancestor caused
   elsewhere in this form before (see .my-account-name-change__form
   input's own min-width fix, DECISIONS.md "Personal dashboard"). */
.my-account-avatar-change__option input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.my-account-avatar-change__option input:checked ~ span { border-color: var(--color-brand); background: var(--color-brand-bg); }
.my-account-add-recipe { margin-bottom: 32px; }
.my-recipes-list { padding: 8px 28px; margin-bottom: 32px; }
.my-recipe-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--color-border); }
.my-recipe-row:last-child { border-bottom: none; }
.my-recipe-row__title { flex: 1; font-size: 16px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-recipe-row__edit { flex: none; }

/* ================= Homepage ================= */
.hero-banner {
  background: var(--color-white);
  border-radius: 24px;
  padding: 44px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 40px;
  align-items: center;
}
.hero-banner h1 { margin: 18px 0 0 0; font-size: 52px; line-height: 1.06; font-weight: 800; letter-spacing: -.03em; }
.hero-banner p { margin: 18px 0 0 0; font-size: 19px; line-height: 1.6; color: var(--color-text-secondary); max-width: 52ch; }
.hero-banner__image { height: 340px; border-radius: var(--radius-lg); overflow: hidden; }
.hero-banner__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-search { display: flex; gap: 10px; margin-top: 26px; }
.hero-search__input {
  flex: 1;
  max-width: 340px;
  height: 56px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  color: var(--color-muted-2);
  font-size: 16px;
  border: none;
}
/* The pill used to be a plain <div> with hardcoded placeholder-looking
   text baked in — it looked like a search box but had no real <input>
   inside it, so nothing ever accepted typed text (see DECISIONS.md). This
   makes the actual <input> fill the pill and inherit its look. */
.hero-search__input input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  color: var(--color-text);
  padding: 0;
}
.hero-search__input input::placeholder { color: var(--color-muted-2); }
.hero-search__btn { height: 56px; padding: 0 30px; border-radius: var(--radius-pill); background: var(--color-brand); color: var(--color-white); font-size: 16px; font-weight: 700; border: none; }
.hero-trending { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 14px; color: var(--color-muted); flex-wrap: wrap; }
.hero-trending__pill { padding: 7px 14px; border-radius: var(--radius-pill); background: var(--color-surface); font-weight: 600; color: var(--color-text); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.section-head h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.section-head__link { font-size: 15px; font-weight: 600; color: var(--color-brand); }

.category-tile-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.category-tile {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  text-align: center;
  color: inherit;
}
.category-tile:hover { text-decoration: none; }
.category-tile__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-brand-bg);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand);
  font-size: 20px;
}
.category-tile__name { font-size: 15px; font-weight: 700; margin-top: 12px; }
.category-tile__count { font-size: 13px; color: var(--color-muted-2); margin-top: 2px; }

.app-promo {
  background: var(--color-brand);
  border-radius: 24px;
  padding: 44px;
  color: var(--color-white);
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: center;
  box-shadow: var(--shadow-brand-lg);
}
.app-promo__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.app-promo__logo { width: 48px; height: 48px; border-radius: 14px; background: var(--color-white); flex: none; display: flex; align-items: center; justify-content: center; }
.app-promo__logo img { width: 34px; height: 34px; object-fit: contain; display: block; }
.app-promo__brand { font-size: 22px; font-weight: 800; }
.app-promo__headline { font-size: 36px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; max-width: 26ch; }
.app-promo__features { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.app-promo__feature { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.app-promo__feature-icon { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: flex; align-items: center; justify-content: center; flex: none; }
.app-promo__actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.app-promo__disclaimer { font-size: 13px; line-height: 1.5; margin: 14px 0 0; max-width: 40ch; color: rgba(255, 255, 255, .7); }
.app-promo__image { height: 300px; border-radius: var(--radius-lg); background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .18) 0 12px, rgba(255, 255, 255, .28) 12px 24px); display: flex; align-items: center; justify-content: center; }

/* ================= Footer ================= */
.site-footer {
  background: var(--color-white);
  padding: 36px 40px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  /* Last child of body's own flex column (see body/main above) — stays
     at its natural height and never shrinks to fill leftover space,
     always immediately after the (now-stretched) main content. */
  flex-shrink: 0;
}
.site-footer__about { max-width: 36ch; }
.site-footer__about .site-logo { margin-bottom: 12px; }
.site-footer__about p { font-size: 14px; color: var(--color-muted-2); line-height: 1.55; margin: 0; }
.site-footer__columns { display: flex; gap: 64px; font-size: 14px; flex-wrap: wrap; }
.site-footer__column { display: flex; flex-direction: column; gap: 10px; }
.site-footer__column-title { font-weight: 700; color: var(--color-text); }
.site-footer__column a { color: var(--color-muted); }
.site-footer__column button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  text-align: left;
  color: var(--color-muted);
  cursor: pointer;
}
.site-footer__column button:hover { color: var(--color-brand-hover); text-decoration: underline; }

/* ================= Cookie consent banner ================= */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -6px 24px rgba(26, 26, 26, .1);
  padding: 20px 40px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-banner:not([hidden]) {
  /* `display` scoped to :not([hidden]) rather than applied to the bare
     .cookie-banner class above: a plain `.cookie-banner { display: flex }`
     has the same specificity as the browser's own `[hidden] { display:
     none }` rule, and an author stylesheet always wins that tie over the
     user-agent one — so JS toggling the `hidden` attribute had zero
     visual effect (the banner reappeared on every reload even while
     correctly marked hidden). See DECISIONS.md ("Fix: cookie banner
     ignored the hidden attribute"). */
  display: flex;
}
.cookie-banner__body { max-width: 64ch; }
.cookie-banner__text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--color-text-secondary); }
.cookie-banner__status { margin: 6px 0 0 0; font-size: 13px; font-weight: 600; color: var(--color-text); }
.cookie-banner__actions { display: flex; gap: 12px; flex-shrink: 0; }

/* ================= Empty / placeholder text ================= */
.dev-note { font-family: monospace; font-size: 11px; color: var(--color-muted); }

/* ================= Marketing pages (/, /kontakt/) ================= */
.marketing-section { margin: 0 0 24px 0; }
.marketing-cta { margin-top: 26px; }
.btn-disabled {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-muted);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  cursor: not-allowed;
}
.marketing-cta__note { margin: 12px 0 0 0; font-size: 14px; color: var(--color-muted); max-width: 44ch; }
.marketing-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0 0 24px 0; }
.marketing-step { background: var(--color-white); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 24px; }
.marketing-step__number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-brand-bg);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 14px;
}
.marketing-step__title { font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.marketing-step__body { color: var(--color-text-secondary); font-size: 15px; }
.marketing-benefits { list-style: none; margin: 16px 0 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.marketing-benefits li { font-size: 16px; color: var(--color-text-body); background: var(--color-surface); border-radius: var(--radius-md); padding: 14px 18px; }

/* ================= Legal/prose pages (/kontakt/, /polityka-prywatnosci/, /regulamin/) ================= */
.legal-content h1 { margin: 0 0 8px 0; }
.legal-content__intro { color: var(--color-text-secondary); margin: 0 0 28px 0; font-size: 17px; line-height: 1.6; }
.legal-content h2 { font-size: 20px; margin: 32px 0 12px 0; }
.legal-content h2:first-of-type { margin-top: 4px; }
.legal-content p { margin: 0 0 14px 0; line-height: 1.6; color: var(--color-text-body); }
.legal-content ul, .legal-content ol { margin: 0 0 14px 0; padding-left: 22px; }
.legal-content li { margin: 0 0 6px 0; line-height: 1.6; color: var(--color-text-body); }
.legal-content a { color: var(--color-brand); font-weight: 600; }

/* ================= Responsive ================= */
@media (max-width: 960px) {
  .container { padding: 0 18px; }
  .site-header { padding: 14px 18px; position: relative; }
  .page-content { padding: 18px 18px 28px 18px; }
  .recipe-layout, .listing-layout, .hero-banner, .app-promo { grid-template-columns: 1fr; }
  .recipe-sidebar { position: static; }
  .recipe-grid, .recipe-grid.cols-3, .category-tile-grid { grid-template-columns: repeat(2, 1fr); }
  /* .author-card is a horizontal avatar+text row, not a stackable card like
     .recipe-grid's other children — at 2 columns its min-content width
     (fixed 56px avatar + unwrappable text) overflows a ~150px track and
     pushes the whole page into horizontal scroll down to 360px. Drop to a
     single column instead of shrinking the row. */
  .recipe-grid.author-grid { grid-template-columns: 1fr; }
  .author-card { min-width: 0; }
  .author-card__name, .author-card__meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .meta-bar { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
  .meta-item:nth-child(odd) { border-left: none; padding-left: 0; }
  /* .site-nav's own links and .site-header__right's search/auth/CTA
     buttons all move into the .nav-mobile hamburger panel below instead
     — at this width there's nowhere near enough room for either row
     (confirmed: overflowed past the viewport edge down to 360px before
     this fix). See DECISIONS.md ("Fix: broken mobile nav"). */
  .site-nav, .site-header__right { display: none; }
  .nav-mobile { display: block; }
  .nav-mobile__panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 18px;
    left: 18px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 20px;
    z-index: 20;
  }
  .nav-mobile[open] .nav-mobile__panel { display: block; }
  .nav-mobile__links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-secondary);
  }
  .nav-mobile__links a { color: inherit; padding: 10px 4px; border-radius: var(--radius-sm); }
  .nav-mobile__links a:hover { text-decoration: none; background: var(--color-surface); }
  .nav-mobile__links a.is-active { color: var(--color-brand); font-weight: 600; }
  .nav-mobile__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
  }
  /* Search icon stays circular/inline, same as desktop; the auth/CTA
     buttons and the form wrapping "Wyloguj się" go full-width and stack,
     the standard mobile-menu treatment. */
  .nav-mobile__actions .icon-btn { align-self: flex-start; }
  .nav-mobile__actions form { display: contents; }
  .nav-mobile__btn:not(.icon-btn) { width: 100%; padding-top: 13px; padding-bottom: 13px; }
  .author-hero { flex-direction: column; }
  .author-stats { width: 100%; }
  .author-stat { flex: 1; width: auto; }
  .my-account-basic { flex-direction: column; }
  .my-account-name-change__form { max-width: none; }
  .my-account-avatar-change__form { max-width: none; }
  .site-footer { flex-direction: column; }
  .cookie-banner { padding: 16px 18px; flex-direction: column; align-items: stretch; }
  .cookie-banner__actions { width: 100%; }
  .cookie-banner__actions .btn { flex: 1; }
  .marketing-steps, .marketing-benefits { grid-template-columns: 1fr; }
}
