@charset "UTF-8";
/* =====================================================================
   Занаетчии — Ethno-Modern Heritage
   Hand-authored design system. No build step, no CDN: the stylesheet ships
   as-is, which keeps the handover simple and the page fast.
   Tokens mirror ethno_modern_heritage/DESIGN.md exactly.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------------- */
:root {
  /* Surfaces — warm gallery canvas rather than pure white */
  --surface: #fbf9f4;
  --surface-dim: #dbdad5;
  --surface-bright: #fbf9f4;
  --surface-lowest: #ffffff;
  --surface-low: #f5f3ee;
  --surface-container: #f0eee9;
  --surface-high: #eae8e3;
  --surface-highest: #e4e2dd;
  --surface-variant: #e4e2dd;

  --on-surface: #1b1c19;
  --on-surface-variant: #55433e;
  --inverse-surface: #30312e;
  --inverse-on-surface: #f2f1ec;

  --outline: #88726d;
  --outline-variant: #dbc1bb;

  /* Terracotta — fired clay of Veles and Resen */
  --primary: #702817;
  --on-primary: #ffffff;
  --primary-container: #8e3e2b;
  --on-primary-container: #ffbcad;
  --primary-fixed: #ffdad2;
  --primary-fixed-dim: #ffb4a3;
  --on-primary-fixed: #3d0700;
  --on-primary-fixed-variant: #7a2f1d;

  /* Linen */
  --secondary: #6b5c4c;
  --on-secondary: #ffffff;
  --secondary-container: #f4dfcb;
  --on-secondary-container: #716252;
  --secondary-fixed: #f4dfcb;
  --secondary-fixed-dim: #d7c3b0;
  --on-secondary-fixed: #241a0e;

  /* Deep wood */
  --tertiary: #4f3b2c;
  --on-tertiary: #ffffff;
  --tertiary-container: #685242;
  --on-tertiary-container: #e4c7b2;
  --tertiary-fixed: #fbddc7;
  --on-tertiary-fixed: #28180b;

  --error: #ba1a1a;
  --on-error: #ffffff;
  --error-container: #ffdad6;
  --on-error-container: #93000a;
  --success: #2f6b3f;
  --success-container: #d7ecdc;

  /* Typography */
  --font-display: "EB Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;

  --text-display: clamp(2.5rem, 1.4rem + 4.4vw, 4rem);   /* 40 → 64px */
  --text-headline-lg: clamp(2rem, 1.5rem + 1.8vw, 2.5rem); /* 32 → 40px */
  --text-headline-md: clamp(1.5rem, 1.3rem + 0.7vw, 1.75rem); /* 24 → 28px */
  --text-body-lg: 1.125rem;
  --text-body-md: 1rem;
  --text-label: 0.75rem;

  /* Shape — soft, never aggressive */
  --r-sm: 0.125rem;
  --r: 0.25rem;
  --r-md: 0.375rem;
  --r-lg: 0.5rem;
  --r-xl: 0.75rem;
  --r-full: 9999px;

  /* Rhythm: multiples of 8 */
  --unit: 8px;
  --gutter: 24px;
  --container: 1280px;
  --margin-mobile: 16px;
  --margin-desktop: 64px;
  --page-x: var(--margin-mobile);
  --section-y: 64px;

  /* Elevation — terracotta-tinted, never grey */
  --shadow-1: 0 2px 8px rgba(112, 40, 23, 0.04);
  --shadow-2: 0 8px 24px rgba(112, 40, 23, 0.08);
  --shadow-3: 0 16px 48px rgba(112, 40, 23, 0.12);
  --shadow-btn: 0 2px 0 0 rgba(112, 40, 23, 0.25);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) {
  :root {
    --page-x: var(--margin-desktop);
    --section-y: 96px;
  }
}

/* ---------------------------------------------------------------------
   2. Reset & base
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video, iframe { display: block; max-width: 100%; }
img, video { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
  color: var(--primary);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-display); letter-spacing: -0.02em; }
h2 { font-size: var(--text-headline-lg); }
h3 { font-size: var(--text-headline-md); }
h4 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-container); }

hr {
  border: 0;
  border-top: 1px solid var(--outline-variant);
  opacity: 0.5;
  margin: 2rem 0;
}

::selection { background: var(--primary-fixed); color: var(--on-primary-fixed); }

/* Visible, brand-coloured focus ring on every interactive element. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

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

.skip-link {
  position: absolute; left: 50%; top: 0;
  transform: translate(-50%, -120%);
  z-index: 200;
  background: var(--primary); color: var(--on-primary);
  padding: 0.75rem 1.5rem; border-radius: 0 0 var(--r-lg) var(--r-lg);
  text-decoration: none; font-weight: 600;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); color: var(--on-primary); }

/* ---------------------------------------------------------------------
   3. Layout primitives
   --------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--page-x);
}

.container-narrow {
  width: 100%;
  max-width: 780px;
  margin-inline: auto;
  padding-inline: var(--page-x);
}

.section { padding-block: var(--section-y); }
.section-sm { padding-block: calc(var(--section-y) * 0.6); }
.section-tint { background: var(--surface-lowest); border-block: 1px solid rgba(219, 193, 187, 0.3); }
.section-warm { background: var(--surface-container); }

.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }

.grid { display: grid; gap: var(--gutter); }
/* A grid item defaults to min-width:auto, so long words and wide children
   push past their track instead of wrapping. This is the standard fix. */
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
/* auto-fill, not auto-fit: with a single card in the row, auto-fit would
   collapse the empty tracks and blow that one card up to full width. */
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

.flow-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------------
   4. Type utilities
   --------------------------------------------------------------------- */
.display { font-family: var(--font-display); font-size: var(--text-display); font-weight: 500; letter-spacing: -0.02em; line-height: 1.12; }
.headline { font-family: var(--font-display); font-size: var(--text-headline-lg); font-weight: 500; }
.headline-md { font-family: var(--font-display); font-size: var(--text-headline-md); font-weight: 500; }
.serif-italic { font-family: var(--font-display); font-style: italic; }

.lead {
  font-size: var(--text-body-lg);
  line-height: 1.65;
  color: var(--on-surface-variant);
  max-width: 62ch;
}

.body-muted { color: var(--on-surface-variant); }

.label {
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.35;
}

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }

/* Storytelling divider: a short rule with a rotated diamond at its centre */
.divider {
  width: 48px; height: 1px;
  background: var(--primary);
  margin: 1.5rem 0;
  position: relative;
}
.divider--center { margin-inline: auto; }
.divider::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 6px; height: 6px;
  background: var(--primary);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ---------------------------------------------------------------------
   5. Header / navigation
   --------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 249, 244, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-1);
  border-bottom: 1px solid rgba(219, 193, 187, 0.28);
}

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; height: 80px;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.625rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand svg { width: 30px; height: 30px; flex: none; }
/* No `.brand span` rule here on purpose: it would out-specify .brand__name
   (0,1,1 beats 0,1,0) and shrink the wordmark to a 10px uppercase label. */

.nav { display: none; align-items: center; gap: 2rem; }
@media (min-width: 900px) { .nav { display: flex; } }

.nav a {
  color: var(--on-surface-variant);
  text-decoration: none;
  font-size: var(--text-body-md);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav a:hover { color: var(--primary); }
.nav a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-full);
  overflow: hidden;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.lang-switch a {
  padding: 0.375rem 0.75rem;
  text-decoration: none;
  color: var(--on-surface-variant);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.lang-switch a:hover { background: var(--surface-high); }
.lang-switch a[aria-current="true"] { background: var(--primary); color: var(--on-primary); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: none; border: 1px solid var(--outline-variant);
  border-radius: var(--r-full);
  color: var(--primary); cursor: pointer;
  transition: background 0.25s var(--ease);
}
.nav-toggle:hover { background: var(--surface-high); }
@media (min-width: 900px) { .nav-toggle { display: none; } }

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(219, 193, 187, 0.4);
  background: var(--surface);
  padding: 1rem var(--page-x) 1.5rem;
}
.mobile-nav[data-open="true"] { display: block; }
@media (min-width: 900px) { .mobile-nav { display: none !important; } }
.mobile-nav a {
  display: block;
  padding: 0.875rem 0;
  color: var(--on-surface);
  text-decoration: none;
  border-bottom: 1px solid rgba(219, 193, 187, 0.35);
  font-size: 1.0625rem;
}
.mobile-nav a[aria-current="page"] { color: var(--primary); font-weight: 600; }

/* ---------------------------------------------------------------------
   6. Buttons & chips
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  font-weight: 500;
  line-height: 1.25;
  border-radius: var(--r);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
              background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  background: var(--primary-container);
  color: var(--on-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2), var(--shadow-btn);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--on-surface);
  border-color: var(--outline);
}
.btn-outline:hover {
  background: var(--surface-high);
  color: var(--on-surface);
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}

.btn-ghost { background: transparent; color: var(--primary); padding-inline: 0.5rem; }
.btn-ghost:hover { color: var(--primary-container); }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

/* Text link with an arrow that slides on hover */
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--primary); text-decoration: none; font-weight: 500;
}
.link-arrow svg { transition: transform 0.3s var(--ease); }
.link-arrow:hover svg { transform: translateX(6px); }

.chip {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: var(--r-full);
  background: var(--secondary-fixed);
  color: var(--on-secondary-fixed);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.5;
  white-space: nowrap;
}
.chip-muted { background: var(--surface-container); color: var(--on-surface-variant); text-transform: none; letter-spacing: 0.02em; }
.chip-solid { background: var(--secondary); color: var(--on-secondary); }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Filter pills */
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.filter {
  padding: 0.55rem 1.35rem;
  border-radius: var(--r-full);
  background: var(--surface-container);
  color: var(--on-surface);
  border: 1px solid transparent;
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.filter:hover { background: var(--surface-variant); color: var(--on-surface); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.filter[aria-current="true"] { background: var(--secondary); color: var(--on-secondary); }

/* ---------------------------------------------------------------------
   7. Hero
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  text-align: center;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.42; mix-blend-mode: multiply;
  /* scale() is the overscan the parallax shift moves within — app.js
     clamps --parallax-y to 7% of the height, which is exactly the slack
     (1.14 - 1) / 2 gives at each edge. Change one, change the other. */
  transform: translate3d(0, var(--parallax-y, 0px), 0) scale(1.14);
  will-change: transform;
}
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--surface) 4%, rgba(251, 249, 244, 0.82) 45%, rgba(251, 249, 244, 0.25) 100%);
}
.hero__body { position: relative; z-index: 1; padding-block: 6rem 5rem; }
.hero h1 { margin-block: 1.5rem; max-width: 20ch; margin-inline: auto; }
.hero .lead { margin-inline: auto; margin-bottom: 2.5rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
@media (max-width: 480px) { .hero-actions .btn { width: 100%; } }

/* Page hero for interior pages */
.page-hero { padding-block: 4rem 2.5rem; }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { margin-top: 1.5rem; }
.page-hero--center { text-align: center; }
.page-hero--center h1, .page-hero--center .lead { margin-inline: auto; }

/* Profile hero with a full-bleed photograph */
.profile-hero {
  position: relative;
  min-height: min(72vh, 640px);
  display: flex; align-items: flex-end;
  background: var(--surface-container);
  overflow: hidden;
}
.profile-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--surface) 2%, rgba(251, 249, 244, 0.72) 38%, rgba(27, 28, 25, 0.15) 100%);
}
.profile-hero__body { position: relative; z-index: 1; width: 100%; padding-block: 3rem; }
.profile-hero__body h1 { margin-top: 1rem; }

/* ---------------------------------------------------------------------
   8. Cards
   --------------------------------------------------------------------- */
.card {
  background: var(--surface-lowest);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.card__body { padding: 1.5rem; }
.card__body h3 { margin-bottom: 0.5rem; }

.card-panel {
  background: var(--surface-lowest);
  border: 1px solid var(--surface-variant);
  border-radius: var(--r-xl);
  padding: 2rem;
  box-shadow: var(--shadow-1);
}

/* Media card: photo with an overlay caption that lifts on hover */
.media-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--secondary-fixed);
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.media-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.media-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.media-card:hover img { transform: scale(1.06); }
.media-card__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(27, 28, 25, 0.85) 0%, rgba(27, 28, 25, 0.25) 45%, transparent 75%);
  color: #fff;
}
.media-card__overlay h3 { color: var(--surface-bright); margin-bottom: 0.35rem; }
.media-card__overlay p { color: rgba(242, 241, 236, 0.9); font-size: 0.9375rem; margin: 0; }
.media-card__overlay .chip { margin-bottom: 0.75rem; align-self: flex-start; }
.media-card__inner { transition: transform 0.5s var(--ease); }
.media-card:hover .media-card__inner { transform: translateY(-6px); }

.ratio-1 { aspect-ratio: 1 / 1; }
.ratio-45 { aspect-ratio: 4 / 5; }
.ratio-34 { aspect-ratio: 3 / 4; }
.ratio-169 { aspect-ratio: 16 / 9; }

/* Bento arrangement for the featured artisans */
.bento { display: grid; gap: var(--gutter); grid-template-columns: 1fr; }
.bento > * { min-height: 280px; }
@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 280px; }
  .bento__feature { grid-column: span 2; grid-row: span 2; }
  .bento__wide { grid-column: span 2; }
  .bento__cell { grid-column: span 1; }
}

.bento__more {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.75rem; text-align: center; padding: 1.5rem;
  background: var(--surface-high);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--primary);
  transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}
.bento__more:hover { background: var(--surface-highest); transform: translateY(-4px); }

/* Artisan roster card */
.artisan-card { display: flex; flex-direction: column; height: 100%; }
.artisan-card__photo { position: relative; overflow: hidden; background: var(--secondary-fixed); }
.artisan-card__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 0.7s var(--ease); }
.artisan-card:hover .artisan-card__photo img { transform: scale(1.05); }
.artisan-card__photo .chip { position: absolute; left: 1rem; bottom: 1rem; }
.artisan-card__body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.artisan-card__body h3 a { text-decoration: none; }
.artisan-card__meta { display: flex; align-items: center; gap: 0.4rem; color: var(--on-surface-variant); font-size: 0.875rem; }
.artisan-card__body .link-arrow { margin-top: auto; padding-top: 0.75rem; }

/* Product card */
.product-card { display: flex; flex-direction: column; height: 100%; }
.product-card__img { background: var(--surface-container); }
.product-card__img img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.product-card__body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.product-card__price { font-family: var(--font-display); font-size: 1.25rem; color: var(--primary); margin-top: auto; padding-top: 0.5rem; }

/* Story card */
.story-card__img { overflow: hidden; background: var(--surface-container); }
.story-card__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.7s var(--ease); }
.story-card:hover .story-card__img img { transform: scale(1.05); }

/* ---------------------------------------------------------------------
   9. Masonry gallery
   --------------------------------------------------------------------- */
.masonry { columns: 1; column-gap: var(--gutter); }
@media (min-width: 600px) { .masonry { columns: 2; } }
@media (min-width: 1000px) { .masonry { columns: 3; } }
.masonry > * {
  break-inside: avoid;
  margin-bottom: var(--gutter);
  display: block;
}

.play-badge {
  position: absolute; top: 1rem; right: 1rem;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: rgba(251, 249, 244, 0.9);
  backdrop-filter: blur(8px);
  color: var(--primary);
  box-shadow: var(--shadow-1);
  transition: transform 0.3s var(--ease);
}
.media-card:hover .play-badge { transform: scale(1.1); }

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--inverse-surface);
  box-shadow: var(--shadow-2);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------------------------------------------------------------------
   10. Editorial split sections
   --------------------------------------------------------------------- */
.split { display: grid; gap: calc(var(--gutter) * 1.5); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: calc(var(--gutter) * 2.5); }
  .split--reverse > :first-child { order: 2; }
}

.split__media { position: relative; }
.split__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
}
.split__media::before {
  content: "";
  position: absolute; inset: -1rem;
  background: rgba(244, 223, 203, 0.5);
  border-radius: var(--r-xl);
  filter: blur(32px);
  z-index: -1;
}

/* Prose block for long-form admin-entered content */
.prose { font-size: var(--text-body-lg); line-height: 1.75; color: var(--on-surface-variant); }
.prose h2 { font-size: var(--text-headline-md); margin: 2.5rem 0 1rem; }
.prose h3 { font-size: 1.375rem; margin: 2rem 0 0.75rem; }
.prose h4 { margin: 1.5rem 0 0.5rem; color: var(--tertiary); }
.prose p { margin-bottom: 1.25rem; }
.prose ul, .prose ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }
.prose img { border-radius: var(--r-lg); margin: 2rem 0; box-shadow: var(--shadow-1); }
.prose figure { margin: 2rem 0; }
.prose figcaption { font-size: 0.875rem; color: var(--outline); text-align: center; margin-top: 0.75rem; }
.prose blockquote {
  margin: 2rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 2px solid var(--primary);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.375rem;
  line-height: 1.5;
  color: var(--tertiary);
}
.prose a { color: var(--primary); }
.prose strong { color: var(--on-surface); }
.prose code {
  background: var(--surface-high);
  padding: 0.1rem 0.35rem;
  border-radius: var(--r-sm);
  font-size: 0.875em;
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
}
/* Legal pages carry data tables; they must scroll, never widen the page. */
.prose table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.9375rem;
}
.prose th, .prose td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--outline-variant);
}
.prose th {
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--on-surface);
  background: var(--surface-low);
  white-space: nowrap;
}

.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
  line-height: 1.45;
  color: var(--tertiary);
  margin: 0 0 1rem;
}

/* Definition list used for contact details */
.detail-list { display: grid; gap: 1.5rem; margin: 0; }
.detail-list > div { display: flex; gap: 1rem; align-items: flex-start; }
.detail-list svg { flex: none; margin-top: 3px; color: var(--primary); }
.detail-list dt { font-size: var(--text-label); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--outline); margin-bottom: 0.25rem; }
.detail-list dd { margin: 0; color: var(--on-surface); }
.detail-list dd a { text-decoration: none; }
.detail-list dd a:hover { text-decoration: underline; }

/* Dark contact panel */
.panel-dark {
  background: var(--secondary);
  color: var(--surface-bright);
  border-radius: var(--r-lg);
  padding: 2rem;
  box-shadow: var(--shadow-2);
}
@media (min-width: 768px) { .panel-dark { padding: 3rem; } }
.panel-dark h2, .panel-dark h3 { color: var(--surface-bright); }
.panel-dark .detail-list dt { color: var(--secondary-fixed-dim); }
.panel-dark .detail-list dd,
.panel-dark .detail-list dd a { color: var(--surface-bright); }
.panel-dark .detail-list svg { color: var(--secondary-fixed); }
.panel-dark a { color: var(--surface-bright); }
.panel-dark hr { border-color: rgba(244, 223, 203, 0.25); opacity: 1; }

/* ---------------------------------------------------------------------
   11. Forms
   --------------------------------------------------------------------- */
.field { margin-bottom: 1.5rem; }
.field:last-child { margin-bottom: 0; }

.field label,
.form-label {
  display: block;
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: 0.5rem;
}

.input, .select, .textarea,
input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="tel"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="search"],
select, textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  color: var(--on-surface);
  background: var(--surface-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--r);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2355433e' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.25rem;
}

textarea { min-height: 160px; resize: vertical; line-height: 1.6; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(112, 40, 23, 0.12);
}

input::placeholder, textarea::placeholder { color: rgba(85, 67, 62, 0.45); }

.field--error input,
.field--error select,
.field--error textarea { border-color: var(--error); }

.field__error { display: block; color: var(--error); font-size: 0.8125rem; margin-top: 0.375rem; }
.field__hint { display: block; color: var(--outline); font-size: 0.8125rem; margin-top: 0.375rem; }

.field-check { display: flex; gap: 0.75rem; align-items: flex-start; }
.field-check input[type="checkbox"] {
  width: 20px; height: 20px; flex: none; margin-top: 2px;
  accent-color: var(--primary);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.field-check label {
  text-transform: none; letter-spacing: normal; font-weight: 400;
  font-size: 0.9375rem; color: var(--on-surface-variant); margin: 0; line-height: 1.55;
}

/* Off-screen honeypot: hidden from people, visible to naive bots. */
.hp-field {
  position: absolute !important;
  left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

.form-grid { display: grid; gap: 0 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------------
   12. Alerts
   --------------------------------------------------------------------- */
.alert {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 1rem 1.25rem;
  border-radius: var(--r);
  border-left: 3px solid;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.alert svg { flex: none; margin-top: 2px; }
.alert-success { background: var(--success-container); border-color: var(--success); color: #17361f; }
.alert-error { background: var(--error-container); border-color: var(--error); color: var(--on-error-container); }
.alert-info { background: var(--secondary-container); border-color: var(--secondary); color: var(--on-secondary-fixed); }
.alert-warn { background: #fdf1d8; border-color: #b4801a; color: #5a3d00; }

/* ---------------------------------------------------------------------
   13. Footer
   --------------------------------------------------------------------- */
.site-footer {
  background: var(--surface-container);
  border-top: 1px solid rgba(219, 193, 187, 0.4);
  margin-top: auto;
}
.site-footer__grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr;
  padding-block: 4rem 2.5rem;
}
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }

.site-footer h4 {
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--on-surface);
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.site-footer a { color: var(--on-surface-variant); text-decoration: none; }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }
.site-footer__bottom {
  border-top: 1px solid rgba(219, 193, 187, 0.4);
  padding-block: 1.5rem 2rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between;
  font-size: 0.875rem; color: var(--on-surface-variant);
}

/* ---------------------------------------------------------------------
   14. Cookie notice
   --------------------------------------------------------------------- */
.cookie-bar {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 150;
  max-width: 640px; margin-inline: auto;
  background: var(--inverse-surface);
  color: var(--inverse-on-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  padding: 1.25rem 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  font-size: 0.875rem; line-height: 1.55;
}
.cookie-bar p { margin: 0; flex: 1 1 260px; }
.cookie-bar a { color: var(--primary-fixed-dim); }
.cookie-bar .btn { padding: 0.6rem 1.25rem; font-size: 0.875rem; }
.cookie-bar[hidden] { display: none; }

/* ---------------------------------------------------------------------
   15. Empty states & pagination
   --------------------------------------------------------------------- */
.empty {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--surface-low);
  border: 1px dashed var(--outline-variant);
  border-radius: var(--r-lg);
  color: var(--on-surface-variant);
}
.empty svg { margin: 0 auto 1rem; color: var(--outline-variant); }

.breadcrumbs { font-size: 0.8125rem; color: var(--on-surface-variant); padding-block: 1.25rem 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--outline-variant); }
.breadcrumbs a { color: var(--on-surface-variant); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); text-decoration: underline; }

/* ---------------------------------------------------------------------
   16. Scroll reveal
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  /* Scoped to [data-reveal="on"], set by assets/js/reveal-init.js: with no
     JavaScript nothing is ever hidden, so the page degrades to fully visible. */
  :root[data-reveal="on"] .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 1s var(--ease), transform 1s var(--ease);
  }
  :root[data-reveal="on"] .reveal.is-visible { opacity: 1; transform: none; }
  .reveal-d1 { transition-delay: 100ms; }
  .reveal-d2 { transition-delay: 200ms; }
  .reveal-d3 { transition-delay: 300ms; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* =====================================================================
   17. Admin panel
   ===================================================================== */
.admin-body { display: flex; min-height: 100vh; background: var(--surface); }

.admin-sidebar {
  width: 260px; flex: none;
  background: var(--surface-low);
  border-right: 1px solid rgba(219, 193, 187, 0.35);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
@media (max-width: 900px) {
  .admin-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 120;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
    box-shadow: var(--shadow-3);
  }
  .admin-sidebar[data-open="true"] { transform: none; }
}

.admin-sidebar__brand {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1.75rem 1.5rem;
  border-bottom: 1px solid rgba(219, 193, 187, 0.3);
  font-family: var(--font-display);
  font-size: 1.375rem;
  color: var(--primary);
  text-decoration: none;
}

.admin-nav { flex: 1; overflow-y: auto; padding: 1.25rem 0.875rem; display: grid; gap: 0.25rem; align-content: start; }
.admin-nav a {
  position: relative;
  display: flex; align-items: center; gap: 0.875rem;
  padding: 0.7rem 1rem;
  border-radius: var(--r-lg);
  color: var(--on-surface-variant);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.admin-nav a:hover { background: var(--surface-highest); color: var(--primary); }
.admin-nav a[aria-current="page"] { background: rgba(142, 62, 43, 0.1); color: var(--primary); font-weight: 600; }
.admin-nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 22px;
  background: var(--primary); border-radius: 0 3px 3px 0;
}
.admin-nav svg { flex: none; }
.admin-nav__section {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--outline); padding: 1.25rem 1rem 0.375rem;
}
.admin-nav .badge {
  margin-left: auto;
  background: var(--primary); color: var(--on-primary);
  font-size: 0.6875rem; font-weight: 700;
  padding: 0.1rem 0.45rem; border-radius: var(--r-full);
}

.admin-sidebar__foot { padding: 1rem 1.25rem 1.5rem; border-top: 1px solid rgba(219, 193, 187, 0.3); }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.admin-header {
  height: 76px; flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-inline: 1.5rem;
  background: rgba(251, 249, 244, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(219, 193, 187, 0.3);
  position: sticky; top: 0; z-index: 90;
}
.admin-header h1 { font-size: 1.5rem; color: var(--on-surface); }

.admin-avatar {
  width: 40px; height: 40px; border-radius: var(--r-full);
  background: var(--secondary-fixed); color: var(--on-secondary-fixed);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.125rem;
  border: 1px solid var(--outline-variant);
}

.admin-content { padding: 1.75rem 1.5rem 4rem; display: grid; gap: 1.75rem; align-content: start; }
@media (min-width: 1100px) { .admin-content { padding-inline: 2.5rem; } }

.admin-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-lg);
  border: 1px solid var(--outline-variant); background: none;
  color: var(--primary); cursor: pointer;
}
@media (min-width: 901px) { .admin-toggle { display: none; } }

.admin-scrim {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(27, 28, 25, 0.45);
  backdrop-filter: blur(2px);
}
.admin-scrim[hidden] { display: none; }
@media (min-width: 901px) { .admin-scrim { display: none; } }

/* Stat tiles */
.stats { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.stat {
  background: var(--surface-lowest);
  border: 1px solid rgba(219, 193, 187, 0.4);
  border-radius: var(--r-xl);
  padding: 1.375rem 1.5rem;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  box-shadow: var(--shadow-1);
  text-decoration: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
a.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.stat__label { font-size: var(--text-label); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--on-surface-variant); margin-bottom: 0.4rem; }
.stat__value { font-family: var(--font-display); font-size: 2.25rem; line-height: 1; color: var(--primary); }
.stat__icon {
  width: 46px; height: 46px; flex: none;
  border-radius: var(--r-full);
  background: rgba(142, 62, 43, 0.12);
  color: var(--primary);
  display: grid; place-items: center;
}

/* Panels & tables */
.panel {
  background: var(--surface-lowest);
  border: 1px solid rgba(219, 193, 187, 0.4);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.panel__head {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(219, 193, 187, 0.35);
  background: var(--surface-bright);
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
}
.panel__head h2 { font-size: 1.375rem; color: var(--on-surface); }
.panel__body { padding: 1.5rem; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9375rem; }
table.data th {
  padding: 0.875rem 1.25rem;
  font-size: var(--text-label); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--on-surface-variant);
  border-bottom: 1px solid rgba(219, 193, 187, 0.5);
  white-space: nowrap;
}
table.data td { padding: 0.875rem 1.25rem; border-bottom: 1px solid rgba(219, 193, 187, 0.2); vertical-align: middle; }
table.data tbody tr:hover { background: var(--surface-low); }
table.data tr:last-child td { border-bottom: 0; }
table.data .thumb {
  width: 52px; height: 52px; object-fit: cover;
  /* Table auto-layout will shrink a fixed-width image when the column is
     tight; min-width is what actually holds the square. */
  min-width: 52px;
  border-radius: var(--r); background: var(--surface-container); flex: none;
}
.cell-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }
.td-right { text-align: right; }
.td-muted { color: var(--on-surface-variant); font-size: 0.875rem; }

.state {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.2rem 0.6rem; border-radius: var(--r-full);
  font-size: 0.75rem; font-weight: 600;
}
.state--on { background: var(--success-container); color: #1d4a2a; }
.state--off { background: var(--surface-highest); color: var(--on-surface-variant); }
.state--new { background: var(--primary-fixed); color: var(--on-primary-fixed); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: var(--r);
  border: 1px solid var(--outline-variant);
  background: var(--surface-lowest);
  color: var(--on-surface-variant);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s var(--ease);
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--surface-low); }
.icon-btn--danger:hover { border-color: var(--error); color: var(--error); background: var(--error-container); }

/* Admin form scaffolding */
.form-sections { display: grid; gap: 1.75rem; }
.form-row { display: grid; gap: 0 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .form-row--2 { grid-template-columns: 1fr 1fr; } .form-row--3 { grid-template-columns: repeat(3, 1fr); } }

.form-actions {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(219, 193, 187, 0.35);
  background: var(--surface-bright);
  position: sticky; bottom: 0;
}
.form-actions .spacer { flex: 1; }

/* Bilingual field pair, side by side with a language tag */
.lang-pair { display: grid; gap: 0 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .lang-pair { grid-template-columns: 1fr 1fr; } }
.lang-tag {
  display: inline-block;
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 0.1rem 0.4rem; border-radius: var(--r-sm);
  background: var(--secondary-fixed); color: var(--on-secondary-fixed);
  margin-left: 0.4rem; vertical-align: middle;
}

/* Image picker */
.img-picker { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.img-picker__preview {
  width: 128px; height: 128px; flex: none;
  border-radius: var(--r-lg);
  background: var(--surface-container) center/cover no-repeat;
  border: 1px solid var(--outline-variant);
  display: grid; place-items: center;
  color: var(--outline);
  overflow: hidden;
}
.img-picker__preview img { width: 100%; height: 100%; object-fit: cover; }
.img-picker__controls { flex: 1; min-width: 220px; display: grid; gap: 0.625rem; align-content: start; }
input[type="file"] {
  width: 100%; padding: 0.6rem;
  border: 1px dashed var(--outline-variant);
  border-radius: var(--r); background: var(--surface-low);
  font-size: 0.875rem;
}
input[type="file"]::file-selector-button {
  margin-right: 0.75rem; padding: 0.4rem 0.9rem;
  border: 0; border-radius: var(--r);
  background: var(--secondary-fixed); color: var(--on-secondary-fixed);
  font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600;
  cursor: pointer;
}

/* Repeating rows (products) */
.repeat-row {
  display: grid; gap: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(219, 193, 187, 0.5);
  border-radius: var(--r-lg);
  background: var(--surface-low);
  margin-bottom: 1rem;
}
.repeat-row__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.repeat-row__head h4 { font-family: var(--font-body); font-size: 0.9375rem; font-weight: 600; color: var(--on-surface); }

/* Login screen */
.login-screen {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(244, 223, 203, 0.75), transparent 65%),
    radial-gradient(700px 420px at 95% 105%, rgba(255, 218, 210, 0.6), transparent 60%),
    var(--surface);
}
.login-card {
  width: 100%; max-width: 420px;
  background: var(--surface-lowest);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
  padding: 2.5rem 2rem;
  border: 1px solid rgba(219, 193, 187, 0.4);
}
.login-card h1 { font-size: 1.875rem; text-align: center; }
.login-card__mark { display: grid; place-items: center; margin-bottom: 1rem; }

/* Simple toolbar for the rich-text editor */
.rte-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.25rem;
  padding: 0.4rem;
  border: 1px solid var(--outline-variant);
  border-bottom: 0;
  border-radius: var(--r) var(--r) 0 0;
  background: var(--surface-low);
}
.rte-toolbar button {
  min-width: 34px; height: 30px; padding: 0 0.5rem;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600;
  color: var(--on-surface-variant);
}
.rte-toolbar button:hover { background: var(--surface-highest); color: var(--primary); }
.rte-toolbar + textarea { border-radius: 0 0 var(--r) var(--r); font-family: ui-monospace, "Cascadia Mono", Menlo, monospace; font-size: 0.875rem; }

.help-doc { max-width: 78ch; }
.help-doc h2 { margin-top: 2.5rem; }
.help-doc h3 { margin-top: 1.75rem; font-size: 1.1875rem; }
.help-doc ol, .help-doc ul { padding-left: 1.375rem; }
.help-doc li { margin-bottom: 0.5rem; }
.help-doc code {
  background: var(--surface-high); padding: 0.1rem 0.35rem;
  border-radius: var(--r-sm); font-size: 0.875em;
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
}
.help-doc kbd {
  background: var(--surface-lowest); border: 1px solid var(--outline-variant);
  border-bottom-width: 2px; border-radius: var(--r-sm);
  padding: 0.05rem 0.35rem; font-size: 0.8125em;
}

/* ---------------------------------------------------------------------
   18. Print
   --------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .cookie-bar, .admin-sidebar, .admin-header,
  .skip-link, .hero__media, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* =====================================================================
   19. Utilities
   These exist so no view needs an inline `style` attribute: the strict
   Content-Security-Policy (style-src 'self') blocks those outright, and
   keeping the values here is what makes the design system enforceable.
   ===================================================================== */

/* ---- Type scale ---- */
.t-display     { font-size: var(--text-display); }
.t-hl-lg       { font-size: var(--text-headline-lg); }
.t-hl-md       { font-size: var(--text-headline-md); }
.t-xl          { font-size: 1.5rem; }
.t-lg          { font-size: 1.375rem; }
.t-md          { font-size: 1.25rem; }
.t-base        { font-size: 1.0625rem; }
.t-body-lg     { font-size: var(--text-body-lg); }
.t-body-md     { font-size: var(--text-body-md); }
.t-sm          { font-size: 0.9375rem; }
.t-xs          { font-size: 0.875rem; }
.t-2xs         { font-size: 0.8125rem; }

.t-semibold    { font-weight: 600; }
.t-bold        { font-weight: 700; }
.t-body-face   { font-family: var(--font-body); }
.t-nowrap      { white-space: nowrap; }
.t-plain       { text-decoration: none; }
.t-truncate    { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-break       { word-break: break-word; overflow-wrap: anywhere; }

/* ---- Colour ---- */
.c-primary     { color: var(--primary); }
.c-tertiary    { color: var(--tertiary); }
.c-muted       { color: var(--on-surface-variant); }
.c-faint       { color: var(--outline-variant); }
.c-error       { color: var(--error); }
.c-on-surface  { color: var(--on-surface); }
.c-linen       { color: var(--secondary-fixed); }
.c-linen-dim   { color: var(--secondary-fixed-dim); }
.bg-linen      { background: var(--secondary-container); border-color: transparent; }
.bg-surface    { background: var(--surface); }

/* ---- Spacing overrides ---- */
.m-0  { margin: 0; }
.mb-0 { margin-bottom: 0; }
.mt-05 { margin-top: 0.25rem; }
.mt-half { margin-top: 0.5rem; }
.ml-sm { margin-left: 0.4rem; }
.pt-0 { padding-top: 0; }
.pt-2 { padding-top: 1rem; }
.pl-list { padding-left: 1.25rem; }
.pos-static { position: static; }
.leading-1 { line-height: 1; }
.max-34ch { max-width: 34ch; }

/* ---- Flex / grid helpers ---- */
.items-start   { align-items: start; }
.items-stretch { align-items: stretch; }
.justify-start  { justify-content: flex-start; }
.justify-center { justify-content: center; }
.row-center { display: flex; align-items: center; gap: 0.75rem; }
.row-tight  { display: flex; align-items: center; gap: 0.875rem; min-width: 0; }
.gap-md { gap: 1.25rem; }
.grid-1 { grid-template-columns: 1fr; }
.grid-auto-xs  { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
.grid-auto-sm  { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.grid-auto-md  { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid-auto-lg  { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.grid-auto-xl  { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.grid-detail   { grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .grid-detail { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
}

/* ---- Table column widths ---- */
.w-70  { width: 70px; }
.w-72  { width: 72px; }
.w-80  { width: 80px; }
.w-90  { width: 90px; }
.w-110 { width: 110px; }
.w-120 { width: 120px; }
.w-130 { width: 130px; }
.w-150 { width: 150px; }
.w-160 { width: 160px; }

/* ---- Aspect ratios driven by the database enum ---- */
.ar-1-1  { aspect-ratio: 1 / 1;  object-fit: cover; width: 100%; }
.ar-4-5  { aspect-ratio: 4 / 5;  object-fit: cover; width: 100%; }
.ar-3-4  { aspect-ratio: 3 / 4;  object-fit: cover; width: 100%; }
.ar-16-9 { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }

/* ---- Composite pieces ---- */
.brand__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--primary);
  letter-spacing: -0.01em;
  font-weight: 500;
  text-transform: none;
  display: inline;
}
.brand__name--sm { font-size: 1.375rem; }

.panel-sub { font-size: 0.875rem; margin: 0.25rem 0 0; color: var(--on-surface-variant); }

.social-dot {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--outline-variant);
  border-radius: var(--r-full);
  color: var(--on-surface-variant);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.social-dot:hover { border-color: var(--primary); color: var(--primary); }
.social-dot--light {
  width: 40px; height: 40px;
  border-color: rgba(244, 223, 203, 0.35);
  color: var(--surface-bright);
}
.social-dot--light:hover { border-color: var(--secondary-fixed); color: var(--secondary-fixed); }

.divider-light {
  width: 48px; height: 1px;
  background: var(--secondary-fixed);
  margin: 1.5rem 0;
  border: 0;
}

.filter-sep {
  width: 1px;
  align-self: stretch;
  background: var(--outline-variant);
  margin-inline: 0.25rem;
}

/* Image that opens the lightbox: a button that looks like the image. */
.zoom-btn {
  border: 0; padding: 0; margin: 0;
  background: none;
  cursor: zoom-in;
  width: 100%;
  display: block;
  text-align: left;
}

.img-feature {
  width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
}
.img-feature--wide { aspect-ratio: 16 / 9; object-fit: cover; }

.center-screen { min-height: 52vh; display: grid; place-items: center; }

.install-main { padding-block: 4rem 6rem; max-width: 760px; }

.check-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.9375rem; }
.check-table td { padding: 0.55rem 0; border-bottom: 1px solid var(--outline-variant); }
.check-table td + td { text-align: right; }

.state--bad { background: var(--error-container); color: var(--on-error-container); }

.btn-danger { color: var(--error); border-color: var(--error); }
.btn-danger:hover { background: var(--error-container); color: var(--on-error-container); border-color: var(--error); }

/* =====================================================================
   20. Touch sizing
   Pointer-sized controls. Scoped to narrow viewports and to coarse
   pointers, so a mouse on a wide screen keeps the compact proportions
   the tables and toolbars were designed around.
   ===================================================================== */

/* The wordmark is a link, so it needs a real target height everywhere. */
.brand { min-height: 44px; }

.lang-switch a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
}

@media (max-width: 600px), (pointer: coarse) {
  .lang-switch a { min-height: 42px; padding-inline: 0.875rem; }

  .btn-sm { min-height: 42px; padding-block: 0.625rem; }

  .icon-btn { width: 42px; height: 42px; }

  /* A 20px box is hard to hit; the label stays clickable either way. */
  .field-check input[type="checkbox"] { width: 24px; height: 24px; }

  .filter { min-height: 40px; display: inline-flex; align-items: center; }

  .admin-nav a { min-height: 46px; }

  .nav-toggle, .admin-toggle { width: 46px; height: 46px; }
}

/* Uppercase micro-labels: 11px is legible but sits right on the limit,
   so nudge it over. */
.admin-nav__section { font-size: 0.72rem; }

/* Very narrow phones: the header has a wordmark, a language switch and a
   menu button to fit into 288px of usable width. Tighten all three rather
   than letting the row overflow. */
@media (max-width: 380px) {
  .brand__name { font-size: 1.25rem; }
  .brand svg { width: 26px; height: 26px; }
  .brand { gap: 0.4rem; }
  .header-actions { gap: 0.4rem; }
  .lang-switch a { padding-inline: 0.55rem; }
  .nav-toggle { width: 42px; height: 42px; }
  .site-header__inner { gap: 0.5rem; }
}

@media (max-width: 600px), (pointer: coarse) {
  /* Editor toolbar buttons are real controls, not decoration. */
  .rte-toolbar button { min-height: 40px; min-width: 40px; }

  /* Chips and arrow links that are links, not labels. */
  a.chip { min-height: 38px; display: inline-flex; align-items: center; }
  .link-arrow { min-height: 40px; }
}

@media (max-width: 600px), (pointer: coarse) {
  /* Phone and email on a profile are the links people actually tap. */
  .detail-list dd a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }

  /* WCAG 2.5.8 puts the minimum target at 24px; the row gets a comfortable
     height and the label stays clickable, which is the real target. */
  .field-check { min-height: 44px; }
  .field-check input[type="checkbox"] { width: 26px; height: 26px; }
}

/* Review queue: a preview big enough to judge, not a table thumbnail. */
.review-preview {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-lg);
  background: var(--surface-container);
  border: 1px solid var(--rule, var(--outline-variant));
}
