:root {
  --bg: #f3f2ec;
  --surface: #fbfaf6;
  --text: #1c201a;
  --muted: #5a6056;
  --accent: #2f5d3f;
  --accent-text: #ffffff;
  --font-heading: 'Commissioner', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-body: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --font-accent: 'Commissioner', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* Direction "craft" — a workshop spec sheet.
   new_site.py prepends a :root{} block with the palette and font tokens
   (--bg --surface --text --muted --accent --accent-text --font-heading
   --font-body --font-accent). Everything below is self-contained.

   Font roles in this direction:
     --font-text  (= --font-heading)  headings AND running text
     --font-mono  (= --font-body)     labels, numbers, prices, hours, nav
   Ornament: 1px rules in the text colour, ruler ticks, 45° hatching, paper
   grain. No rounding, no shadows, no gradients, nothing centred. */

/* ------------------------------------------------------------------ tokens */
:root {
  --font-text: var(--font-heading);
  --font-mono: var(--font-body);

  /* rules: hairline = text at 20%, strong = text */
  --rule: var(--muted);
  --rule-strong: var(--text);
  --rule-inverse: var(--muted);

  /* 8px spacing scale */
  --s1: .5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2rem;
  --s5: 2.5rem;
  --s6: 3rem;
  --s8: 4rem;
  --s10: 5rem;
  --s12: 6rem;
  --page-pad: clamp(1.25rem, 4vw, 3rem);
  --section-pad: clamp(3rem, 6.5vw, 5rem);
  --container: 1200px;
  --tick: 14px;                 /* ruler strip thickness */

  /* type scale (mobile → desktop via clamp) */
  --fs-h1: clamp(2.5rem, 1.5rem + 4.9vw, 5.5rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  --fs-h3: 1.25rem;
  --fs-num: clamp(3.75rem, 2.4rem + 5vw, 6.5rem);
  --fs-lead: clamp(1.125rem, 1rem + .5vw, 1.375rem);
  --fs-body: 1rem;
  --fs-small: .9rem;
  --fs-mono: .9rem;
  --fs-label: .72rem;
  --track: .1em;                /* letter-spacing for mono labels */
}
@supports (color: color-mix(in srgb, red 50%, transparent)) {
  :root {
    --rule: color-mix(in srgb, var(--text) 20%, transparent);
    --rule-inverse: color-mix(in srgb, var(--bg) 28%, transparent);
  }
}

/* ------------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  /* paper grain: an inline SVG noise tile, alpha capped at 9% */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 .09'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
iframe { display: block; border: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--page-pad); }
.section { padding: var(--section-pad) 0; }

/* mono label: small, tracked, uppercase */
.label,
.plate,
.sheet-idx,
.tb-cell dt,
.contact dt,
.nav a,
.label { display: block; color: var(--muted); margin-bottom: var(--s1); }
/* Buttons keep the mono voice but at a readable size. */
.btn,
.sticky-bar a {
  font-family: var(--font-mono);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.2;
}


/* ------------------------------------------------------------------ header */
.site-header { border-bottom: 1px solid var(--rule-strong); }
.header-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: var(--s3);
}
.brand {
  padding: var(--s2) 0;
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-decoration: none;
  text-wrap: balance;        /* long names wrap to two lines on phones */
}
.header-phone {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  padding: var(--s2) 0;
}
.nav {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s3);
  border-top: 1px solid var(--rule);
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  white-space: nowrap;
  color: var(--text);
}
.nav a:hover { color: var(--accent); }
/* Phones and tablets: no contact in the header — the hero button, the contacts
   section and the sticky bar carry it; the name is next to the language switch. */
@media (max-width: 899px) {
  .header-phone { display: none; }
}

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.25rem;
  border: 1px solid var(--text);
  color: var(--text);
  background: transparent;
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.btn:hover { background: var(--text); color: var(--bg); }
.btn-call { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-call:hover { background: var(--text); border-color: var(--text); color: var(--bg); }

/* -------------------------------------------------------------------- hero */
.hero { padding: var(--s6) 0 var(--s8); }
.hero-copy { position: relative; }

/* label plate: bordered mono cells */
.plate {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--text);
  margin-bottom: var(--s4);
  color: var(--text);
}
.plate-cell { padding: .4rem .75rem; }
.plate-cell + .plate-cell { border-left: 1px solid var(--text); }

.hero-title {
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.025em;
  max-width: 14ch;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.hero-foot {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin-top: var(--s4);
}
.tagline {
  font-size: var(--fs-lead);
  line-height: 1.4;
  max-width: 38ch;
  color: var(--muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s1); }

/* title block: the drawing cartouche with hours / address / phone */
.title-block {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--text);
  margin-top: var(--s6);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  line-height: 1.5;
}
.tb-cell { padding: .7rem .9rem .8rem; }
.tb-cell + .tb-cell { border-top: 1px solid var(--text); }
.tb-cell dt { color: var(--muted); margin-bottom: .3rem; }
.tb-cell a { text-decoration: none; }
.tb-cell a:hover { color: var(--accent); }
.tb-line { display: block; }

/* photo & split: the two hero grids */
.hero-grid { display: grid; gap: var(--s5); }
.hero-grid--photo { margin-top: var(--s5); }
.hero-grid--photo .title-block { margin-top: 0; }
.hero-grid--split .hero-copy { padding-top: var(--s2); }

/* frames for photos */
.hero-figure { position: relative; border: 1px solid var(--text); }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-figure--wide { margin-top: var(--tick); }
.hero-figure--wide img { aspect-ratio: 4 / 3; }
.hero-figure--portrait img { aspect-ratio: 4 / 3; }

/* ruler boxes: positioned strips that hold the tick SVG */
.ruler-box { position: absolute; color: var(--text); pointer-events: none; }
.ruler-box--top { top: 0; left: 0; right: 0; height: var(--tick); }
.ruler-box--left { top: 0; bottom: 0; left: 0; width: var(--tick); }
.ruler-box--above { top: calc(-1 * var(--tick) - 1px); left: -1px; right: -1px; height: var(--tick); }
.ruler-box--beside { top: -1px; bottom: -1px; left: calc(-1 * var(--tick) - 1px); width: var(--tick); }
.ruler { display: block; width: 100%; height: 100%; }
.ruler-box--above .ruler,
.ruler-box--top .ruler { transform: scaleY(-1); }   /* ticks grow upwards from the edge */
.ruler-box--beside .ruler { transform: scaleX(-1); }

/* pattern: hatched band with a bordered sheet */
.hero--pattern { position: relative; overflow: hidden; padding: var(--s5) 0 var(--s6); }
.pattern { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sheet {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--text);
  max-width: 62rem;
}
.sheet-body { padding: calc(var(--tick) + var(--s4)) var(--s3) 0 calc(var(--tick) + var(--s3)); }
.sheet .title-block {
  border-width: 1px 0 0;
  margin-top: var(--s5);
}
.sheet .tb-cell { padding-left: calc(var(--tick) + .9rem); }   /* clear the left ruler */
.sheet .ruler-box--top .ruler { transform: none; }

/* ------------------------------------------------------------ section head */
.sheet-head {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  border-top: 2px solid var(--text);
  padding-top: var(--s2);
  margin-bottom: var(--s4);
}
.sheet-idx { color: var(--accent); font-weight: 600; }
.sheet-title {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
}

/* -------------------------------------------------------------- works grid */
.works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
/* uneven two-column rhythm on a 5-track grid: 3+2, then 2+3, in source order */
.works-grid--photos { grid-template-columns: repeat(5, 1fr); }
.works-grid--photos > li:nth-child(4n+1) { grid-column: 1 / span 3; }
.works-grid--photos > li:nth-child(4n+2) { grid-column: 4 / span 2; }
.works-grid--photos > li:nth-child(4n+3) { grid-column: 1 / span 2; }
.works-grid--photos > li:nth-child(4n+4) { grid-column: 3 / span 3; }

.work { position: relative; border: 1px solid var(--text); }
.gallery-item { display: block; height: 100%; }
.gallery-item img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.work-idx {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: .25rem .5rem;
  background: var(--bg);
  border-top: 1px solid var(--text);
  border-right: 1px solid var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track);
}

/* services as tiles (no photos on the page) */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  padding: var(--s2);
  padding-top: calc(var(--s2) + 1.75rem);
  background: var(--surface);
  border: 1px solid var(--text);
}
.tile-idx,
.tile-price {
  position: absolute;
  top: var(--s2);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  line-height: 1;
}
.tile-idx { left: var(--s2); color: var(--muted); }
.tile-price { right: var(--s2); color: var(--accent); font-weight: 600; }
.tile-name { font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.tile-desc { margin-top: .35rem; font-size: var(--fs-small); line-height: 1.45; color: var(--muted); max-width: 42ch; }

/* services as a price list (photos take the grid) */
.spec-list { border-top: 1px solid var(--text); }
/* row: index | name | price, description under name + price */
.spec-row {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  grid-template-areas: "idx name price" "idx desc desc";
  column-gap: var(--s2);
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--rule);
}
.spec-idx { grid-area: idx; font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--muted); padding-top: .2rem; }
.spec-name { grid-area: name; font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; }
.spec-desc { grid-area: desc; margin-top: .3rem; font-size: var(--fs-small); color: var(--muted); max-width: 48ch; }
.spec-price {
  grid-area: price;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  padding-top: .2rem;
}

/* ------------------------------------------------------------------- steps */
.steps { display: grid; grid-template-columns: 1fr; }
.step { border-top: 1px solid var(--text); padding: var(--s2) 0 var(--s4); }
.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-num);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -.05em;
  color: var(--accent);
  margin-bottom: var(--s2);
}
.step-name { font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; }
.step-desc { margin-top: .4rem; font-size: var(--fs-small); color: var(--muted); max-width: 40ch; }

/* ------------------------------------------------------------------- about */
.about-grid { display: grid; grid-template-columns: 1fr; gap: var(--s5); }
.about-text { font-size: var(--fs-lead); line-height: 1.5; max-width: 60ch; }
.rating {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--s2);
  border-top: 1px solid var(--text);
  padding: var(--s2) 0;
}
.rating-value { font-family: var(--font-mono); font-size: 2.5rem; font-weight: 300; line-height: 1; color: var(--accent); }
.rating-label { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--track); text-transform: uppercase; color: var(--muted); line-height: 1.5; }
.facts { border-top: 1px solid var(--text); }
.fact {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  column-gap: var(--s2);
  padding: .7rem 0;
  border-bottom: 1px solid var(--rule);
}
.fact-idx { font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--accent); padding-top: .1rem; }
.fact-text { font-weight: 600; line-height: 1.4; }

/* ---------------------------------------------------------------- contacts */
.contacts-grid { display: grid; grid-template-columns: 1fr; gap: var(--s5); }
.contacts-actions { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s4); }
.data-block { margin-bottom: var(--s3); }
.hours { border-top: 1px solid var(--text); font-family: var(--font-mono); font-size: var(--fs-mono); }
.hours li { padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.contacts { border-top: 1px solid var(--text); }
.contact {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  column-gap: var(--s2);
  align-items: baseline;
  padding: .6rem 0;
  border-bottom: 1px solid var(--rule);
}
.contact dt { color: var(--muted); padding-top: .25rem; }
.contact dd { font-family: var(--font-mono); font-size: var(--fs-mono); overflow-wrap: anywhere; }
/* Inline links get a 44px tap height without moving the text. */
.contact dd a, .tb-cell a { display: inline-block; padding-block: .6em; margin-block: -.6em; text-decoration: none; }
.contact dd a:hover { color: var(--accent); }

.map-frame { display: flex; flex-direction: column; border: 1px solid var(--text); }
.map-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s2);
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--text);
}
.map-caption .label { margin: 0; }
.route-link {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track);
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: .1rem;
}
.map { flex: 1; min-height: 280px; background: var(--surface); }
.map iframe { width: 100%; height: 100%; min-height: 280px; filter: grayscale(1) contrast(1.05); }
.map iframe:hover { filter: none; }

/* ------------------------------------------------------------------ footer */
.site-footer {
  background: var(--text);
  color: var(--bg);
  padding: var(--s6) 0 var(--s4);
}
.footer-main { display: grid; grid-template-columns: 1fr; gap: var(--s2); padding-bottom: var(--s4); }
.footer-name { font-weight: 800; font-size: 1.375rem; letter-spacing: -.01em; }
.footer-address { color: var(--bg); opacity: .8; max-width: 36ch; }
.footer-phone { font-family: var(--font-mono); font-size: var(--fs-mono); }
.footer-phone a { text-decoration: none; }
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s1) var(--s3);
  border-top: 1px solid var(--rule-inverse);
  padding-top: var(--s2);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .04em;
  opacity: .85;
}
.footer-credit a { text-decoration: underline; text-underline-offset: 3px; }

/* -------------------------------------------------------------- sticky bar */
.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--text);
  color: var(--bg);
  border-top: 1px solid var(--accent);
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform .25s ease, visibility 0s linear .25s;
}
.sticky-bar.is-visible { transform: none; visibility: visible; transition-delay: 0s; }
.sticky-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  font-weight: 600;
  text-decoration: none;
  color: var(--bg);
}
.sticky-msg { border-left: 1px solid var(--rule-inverse); }
.sticky-msg::before { content: "→ "; color: var(--accent); white-space: pre; }

@media (max-width: 899px) {
  .site-footer { padding-bottom: calc(var(--s4) + 60px); }
}
@media (min-width: 900px) {
  .sticky-bar { display: none; }
}

/* ---------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--s4);
  background: rgba(0, 0, 0, .9);
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(92vw, 1200px); max-height: 88vh; object-fit: contain; border: 1px solid rgba(255, 255, 255, .6); }
.lightbox-close {
  position: absolute;
  top: var(--s2);
  right: var(--s2);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, .6);
  background: transparent;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

/* ------------------------------------------------------------- ≥ 600px */
@media (min-width: 600px) {
  .hero-foot { flex-direction: row; justify-content: space-between; align-items: flex-end; }
  .hero-grid .hero-foot { flex-direction: column; align-items: flex-start; }   /* narrow copy column */
  .works-grid--tiles { grid-template-columns: repeat(5, 1fr); }
  .works-grid--tiles > li:nth-child(4n+1) { grid-column: 1 / span 3; }
  .works-grid--tiles > li:nth-child(4n+2) { grid-column: 4 / span 2; }
  .works-grid--tiles > li:nth-child(4n+3) { grid-column: 1 / span 2; }
  .works-grid--tiles > li:nth-child(4n+4) { grid-column: 3 / span 3; }
  .steps { grid-template-columns: 1fr 1fr; column-gap: var(--s4); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-phone { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------- ≥ 900px */
@media (min-width: 900px) {
  .header-grid { grid-template-columns: auto 1fr auto auto; }
  .brand { font-size: 1.25rem; white-space: nowrap; }
  .nav { grid-column: 2; grid-row: 1; justify-content: center; border-top: 0; overflow: visible; }
  .nav a { min-height: 56px; }
  .header-phone { grid-column: 3; grid-row: 1; }

  .hero { padding: var(--s8) 0; }
  .hero-title { max-width: 16ch; }
  .title-block { grid-template-columns: 1.2fr 1.4fr 1fr; margin-top: var(--s8); }
  .tb-cell { padding: .8rem 1.1rem 1rem; }
  .tb-cell + .tb-cell { border-top: 0; border-left: 1px solid var(--text); }
  .title-block--stacked { grid-template-columns: 1fr; margin-top: 0; }
  .title-block--stacked .tb-cell + .tb-cell { border-left: 0; border-top: 1px solid var(--text); }

  .hero-grid--photo { grid-template-columns: 7fr 5fr; gap: var(--s8); align-items: start; margin-top: var(--s6); }
  .hero-figure--wide img { aspect-ratio: 21 / 9; }
  .hero-grid--split { grid-template-columns: 7fr 5fr; gap: var(--s8); align-items: end; }
  .hero-figure--portrait { margin-left: var(--tick); }
  .hero-figure--portrait img { aspect-ratio: 4 / 5; }
  .hero-grid--split .hero-copy { padding-bottom: var(--s2); }

  .hero--pattern { padding: var(--s8) 0; }
  .sheet-body { padding: calc(var(--tick) + var(--s6)) var(--s6) 0 calc(var(--tick) + var(--s5)); }
  .sheet .title-block { margin-top: var(--s6); }
  .sheet .tb-cell { padding-left: 1.1rem; }
  .sheet .tb-cell:first-child { padding-left: calc(var(--tick) + 1.1rem); }

  .sheet-head { gap: var(--s3); margin-bottom: var(--s6); }

  .works-grid { gap: 12px; }
  .tile { padding: var(--s3); padding-top: calc(var(--s3) + 2rem); }
  .tile-idx { left: var(--s3); top: var(--s3); }
  .tile-price { right: var(--s3); top: var(--s3); }
  .tile-name { font-size: 1.5rem; }

  .spec-list--2col { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s8); }
  .spec-row { padding: var(--s3) 0; }

  .steps { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); column-gap: var(--s5); }
  .step { padding-bottom: var(--s2); }

  .about-grid { grid-template-columns: 7fr 4fr; column-gap: var(--s10); }
  .about-grid--single { grid-template-columns: 1fr; }

  .contacts-grid { grid-template-columns: 5fr 7fr; column-gap: var(--s8); }
  .map { min-height: 420px; }
  .map iframe { min-height: 420px; }

  .site-footer { padding-top: var(--s8); }
  .footer-main { grid-template-columns: 4fr 5fr 3fr; column-gap: var(--s5); }
  .footer-phone { grid-column: auto; text-align: right; }
}

/* ------------------------------------------------------------- ≥ 1100px */
@media (min-width: 1100px) {
  .tile-desc { font-size: var(--fs-body); }
}

/* ----------------------------------------------------------- motion / a11y */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Language switch (base/lang_switch.html.j2): a <details> dropdown — current
   language on the button, all three in a small menu under it. */
.lang-switch { position: relative; grid-column: 2; grid-row: 1; }
.lang-switch summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .35em;
  min-height: 44px;
  padding: 0 .75rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text);
  -webkit-user-select: none;
  user-select: none;
  font-family: var(--font-mono); font-size: var(--fs-mono);
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::marker { content: ""; }
.lang-caret { width: .65em; height: .65em; flex: none; transition: transform .15s ease; }
.lang-switch[open] .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + .3rem);
  z-index: 40;
  min-width: 10.5rem;
  margin: 0;
  padding: .3rem;
  list-style: none;
  background: var(--surface);
  color: var(--text);
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
  border-color: var(--rule-strong); border-radius: 4px;
}
.lang-menu a {
  display: flex;
  align-items: center;
  gap: .7em;
  min-height: 42px;
  padding: 0 .75rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: 3px;
}
.lang-menu a:hover { background: var(--bg); }
.lang-menu a[aria-current="page"] { color: var(--accent); pointer-events: none; }
.lang-menu .lang-name { color: var(--muted); font-weight: 400; font-size: .85em; letter-spacing: 0; }
/* Desktop: fourth column of the header grid, after the contact. This must come
   after the base .lang-switch rule above. */
@media (min-width: 900px) {
  .lang-switch { grid-column: 4; grid-row: 1; }
}

/* Optional logo (site.yml `logo`) in front of the brand name. */
.brand-logo { display: inline-block; width: 2em; height: 2em; margin-right: .5em; border-radius: 50%; object-fit: cover; vertical-align: middle; }

/* «Meniul complet» (site.yml menu_url): a text link under the menu heading. */
.menu-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: .25rem; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
.menu-link:hover { text-decoration-thickness: 2px; }
