/* ==========================================================================
   MYCEN — Website styles, v1.5
   Palette: Paper, Ink (+ tints), Blush, Living Coral.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Local fonts (DSGVO): no Google Fonts requests. Files live in ./fonts/
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Poppins";
  src: url("./fonts/poppins-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("./fonts/poppins-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("./fonts/poppins-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("./fonts/poppins-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("./fonts/lora-italic.woff2") format("woff2");
  font-weight: 400 700;   /* variable font; the site uses 400 only */
  font-style: italic;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */
:root {
  --paper: #FDFCFA;
  --ink: #1A1A1A;
  --ink-65: #696968;   /* secondary text */
  --ink-40: #A2A2A0;   /* client logos, inactive states, never text */
  --ink-15: #DBDAD8;   /* hairlines */
  --ink-06: #F1F0EE;   /* image placeholder ground (tint of Ink) */
  --blush: #FBE3DE;
  --coral: #F0705A;

  --font-sans: "Poppins", Arial, sans-serif;
  --font-serif: "Lora", Georgia, serif;

  /* Display fits "Clean floor plans, ready to publish." on one line from ~1024px up */
  --fs-display: clamp(2.25rem, 0.6rem + 3.9vw, 3.6rem);
  --fs-h2: clamp(1.6rem, 1.1rem + 1.5vw, 2.25rem);
  --fs-h3: 1.25rem;
  --fs-quote: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-xs: 0.8125rem;

  --page-max: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --section-space: clamp(72px, 7.5vw, 112px);
  --rule-heavy: 4px;
  --measure: 34em;

  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
figure { margin: 0; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

::selection { background: var(--blush); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important;
  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: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-quote);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   4. Buttons and links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 500 var(--fs-small)/1.2 var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { background: var(--blush); }

.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--coral); border-color: var(--coral); color: var(--ink); }

.link-quiet {
  font-weight: 500;
  font-size: var(--fs-small);
  text-decoration: underline;
  text-decoration-color: var(--ink-40);
}
.link-quiet:hover { text-decoration-color: var(--ink); }

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--ink-40);
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.link-button:hover { text-decoration-color: var(--ink); }

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--ink-15); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand { display: block; padding: 8px 0; flex: none; }
.brand img { height: 14px; width: auto; }

.nav { display: flex; align-items: center; gap: 36px; }
.nav__list { display: flex; gap: 32px; margin: 0; padding: 0; list-style: none; }
.nav__list a {
  position: relative;
  font-size: var(--fs-small);
  font-weight: 400;
  text-decoration: none;
  padding: 6px 0;
}
.nav__list a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav__list a:hover::after { transform: scaleX(1); }
.nav .btn { min-height: 40px; padding: 8px 18px; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 500 var(--fs-small) var(--font-sans);
  cursor: pointer;
}
.nav-toggle__icon {
  width: 20px;
  height: 10px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transition: transform .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__icon { transform: scaleY(0.2); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 24px var(--gutter) 32px;
    background: var(--paper);
    border-bottom: 1px solid var(--ink-15);
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; gap: 4px; width: 100%; }
  .nav__list a { display: block; padding: 10px 0; font-size: 1.25rem; font-weight: 500; }
  .nav__list a::after { display: none; }
}

/* --------------------------------------------------------------------------
   6. Sections
   -------------------------------------------------------------------------- */
.section { padding-block: var(--section-space); }
.section + .section { padding-top: 0; }

/* One heading style for every homepage section: full width, room to breathe */
.section-title {
  font-size: var(--fs-h2);
  margin-bottom: clamp(28px, 3.5vw, 44px);
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero { padding-top: clamp(48px, 6vw, 88px); }

.hero__title {
  font-size: var(--fs-display);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

/* Two things only: the promise on the left, the actions on the right */
.hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  margin-top: 20px;
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

/* The one-liner sits under the comparison, like a statement beneath a plate */
.hero__lede {
  max-width: 34em;
  margin-top: 24px;
  font-size: var(--fs-h3);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   8. Before / after comparison
   -------------------------------------------------------------------------- */
.compare {
  --pos: 50%;
  position: relative;
  margin-top: clamp(32px, 4vw, 48px);
  aspect-ratio: 3 / 2;   /* matches the hero image canvas */
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--ink-15);
  user-select: none;
  touch-action: pan-y;
}

.compare__pane { position: absolute; inset: 0; }
.compare__pane img { width: 100%; height: 100%; object-fit: contain; background: var(--paper); pointer-events: none; -webkit-user-drag: none; }
.compare__pane--before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }

.compare__label {
  position: absolute;
  bottom: 14px;
  z-index: 2;
  padding: 2px 8px;
  background: var(--paper);
  font-size: var(--fs-xs);
  color: var(--ink-65);
}
.compare__pane--before .compare__label { left: 16px; }
.compare__pane--after .compare__label { right: 16px; }

.compare__handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  z-index: 3;
  width: 0;
  pointer-events: none;
}
/* Coral moment of the hero: the line where source becomes plan */
.compare__handle::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -1px;
  width: 2px;
  background: var(--coral);
}
/* The logo mark on a plain Paper square. Nothing more. */
.compare__grip {
  position: absolute;
  top: 50%;
  left: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  background: var(--paper);
  border: 1px solid var(--ink-15);
}
.compare__grip img { width: 26px; height: 26px; }

.compare__range {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}
.compare:has(.compare__range:focus-visible) { outline: 2px solid var(--ink); outline-offset: 4px; }

/* --------------------------------------------------------------------------
   9. Client logos — Ink 40%, the guideline's light grey
   -------------------------------------------------------------------------- */
.clients {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 56px;
  margin-top: clamp(40px, 5vw, 56px);
  padding-top: 28px;
  border-top: 1px solid var(--ink-15);
}
.clients__intro { font-size: var(--fs-small); color: var(--ink-65); }

.clients__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px clamp(32px, 5vw, 72px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.clients__list li { display: flex; align-items: center; height: 32px; }

/* Logos are pre-cut as single-color PNGs. Heights are balanced optically
   per logo (wide wordmarks lower, boxed marks taller) so each carries
   the same visual weight. Opacity .5 = Ink at roughly 50%. */
.client-logo { width: auto; opacity: 0.5; }
.client-logo--compass { height: 19px; }
.client-logo--fetner { height: 28px; }
.client-logo--modern-spaces { height: 15px; }

/* --------------------------------------------------------------------------
   10. Studio (why we exist): image + text
   -------------------------------------------------------------------------- */
.studio {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 48px clamp(40px, 7vw, 112px);
  align-items: center;
}
.studio__media { position: relative; aspect-ratio: 4 / 5; isolation: isolate; }
.studio__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
/* A coral block behind the image corner: the one accent in this view */
.studio__media::after {
  content: "";
  position: absolute;
  right: -16px;
  bottom: -16px;
  z-index: -1;
  width: 26%;
  aspect-ratio: 1;
  background: var(--coral);
}
.studio__body { max-width: 30em; }
.studio__body h2 { font-size: var(--fs-h2); }
.studio__body p { margin-top: 24px; }
.studio__body .muted { color: var(--ink-65); }
.studio__body .btn { margin-top: 40px; }

@media (max-width: 860px) {
  .studio { grid-template-columns: 1fr; }
  .studio__media { aspect-ratio: 4 / 3; }
  .studio__media::after { right: -12px; bottom: -12px; width: 30%; }
}

/* Generic image placeholder */
.img-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: var(--ink-06);
  color: var(--ink-65);
  font-size: var(--fs-xs);
  text-align: center;
}

/* --------------------------------------------------------------------------
   11. Services — one grid: category label + three service columns
   -------------------------------------------------------------------------- */
.services {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 3fr));
  column-gap: clamp(24px, 3vw, 48px);
  border-top: var(--rule-heavy) solid var(--coral);   /* heavy rule above columns */
}
.services__row { display: contents; }

.services__cat,
.service {
  padding-block: 32px 40px;
  border-bottom: 1px solid var(--ink-15);
}
/* Category = a quiet row label; the service name is the step above body */
.services__cat h3 { font-size: var(--fs-small); font-weight: 500; letter-spacing: 0; }
.services__cat p { margin-top: 4px; font-size: var(--fs-small); color: var(--ink-65); }

.service h4 { font-size: var(--fs-h3); font-weight: 700; }
.service p { margin-top: 10px; }
.service .service__for { margin-top: 8px; font-size: var(--fs-small); color: var(--ink-65); }

/* A single service fills its row instead of leaving empty cells */
.service--wide { grid-column: 2 / -1; }
.service--wide > * { max-width: 30em; }

/* The manifesto closes the section, next to the action */
.services-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  margin-top: 48px;
}
.services-foot .quote { max-width: 30em; }

@media (max-width: 960px) {
  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .services__cat { grid-column: 1 / -1; padding-bottom: 0; border-bottom: 0; padding-top: 40px; }
  .service { padding-top: 16px; }
  .service--wide { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .services { grid-template-columns: 1fr; }
  .service { padding-block: 16px 24px; }
  .services-foot { margin-top: 40px; }
}

/* --------------------------------------------------------------------------
   12. Work grid + lightbox
   -------------------------------------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.work-tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;   /* matches the work images */
  padding: 0;
  border: 0;
  background: var(--ink-06);
  overflow: hidden;
  cursor: zoom-in;
}
.work-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.work-tile:hover img { transform: scale(1.02); }
.work-tile::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--rule-heavy);
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.work-tile:hover::after,
.work-tile:focus-visible::after { transform: scaleX(1); }
.work-tile .img-ph { font-family: var(--font-sans); }

/* Two columns down to phone width: plans read as thumbnails, the lightbox carries the detail */
@media (max-width: 860px) { .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
}
.lightbox::backdrop { background: var(--paper); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr; animation: fade-in .2s var(--ease); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
  padding-inline: var(--gutter);
  font-size: var(--fs-small);
  color: var(--ink-65);
}
.lightbox__controls { display: flex; gap: 8px; }
.lightbox__controls .btn { min-height: 40px; padding: 8px 16px; }

.lightbox__stage {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 var(--gutter) var(--gutter);
}
.lightbox__stage { overflow: hidden; }
.lightbox__stage img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - var(--header-h) - var(--gutter));
  object-fit: contain;
}
.lightbox__stage .img-ph { width: min(100%, 1100px); height: auto; aspect-ratio: 3 / 2; max-height: 100%; }

/* --------------------------------------------------------------------------
   13. Contact
   -------------------------------------------------------------------------- */
.contact { background: var(--ink); color: var(--paper); }
.section + .contact { padding-top: var(--section-space); }
.contact h2 {
  font-size: var(--fs-h2);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 40px clamp(40px, 6vw, 96px);
  align-items: end;
  margin-top: 28px;
}
.contact__body p { color: var(--ink-15); max-width: 30em; }
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 32px;
}
.contact__email {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem);
  font-weight: 500;
  color: var(--paper);
  text-decoration-color: var(--coral);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
  word-break: break-word;
}
.contact__email:hover { color: var(--coral); }
.contact :focus-visible { outline-color: var(--paper); }

/* Outline button for the Ink band */
.btn--inverse { border-color: var(--paper); color: var(--paper); }
.btn--inverse:hover { background: var(--blush); border-color: var(--blush); color: var(--ink); }

/* Proof: the source drawing and the finished plan, side by side */
.proof {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.proof__item img { width: 100%; height: auto; aspect-ratio: 3 / 2; background: var(--paper); }
.proof__label { display: block; margin-top: 10px; font-size: var(--fs-xs); color: var(--ink-15); }

@media (max-width: 860px) {
  .contact__grid { grid-template-columns: 1fr; }
}


/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.site-footer { padding-block: 64px 32px; font-size: var(--fs-small); }
.site-footer__top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px 64px;
  align-items: center;
}
.site-footer__logo img { width: 88px; height: auto; }
.site-footer__signature { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: var(--fs-h3); }
.site-footer__studio { color: var(--ink-65); line-height: 1.7; }
.site-footer__studio a { color: var(--ink); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--ink-15);
  color: var(--ink-65);
}
.legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.legal-links li { display: flex; }
/* Links and the cookie button share one box model so they sit on one line */
.legal-links a,
.legal-links button {
  display: inline-block;
  margin: 0;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 400 var(--fs-small)/1.6 var(--font-sans);
  text-decoration: underline;
  text-decoration-color: var(--ink-40);
  text-underline-offset: 0.2em;
  vertical-align: baseline;
  cursor: pointer;
}
.legal-links a:hover,
.legal-links button:hover { text-decoration-color: var(--ink); }

@media (max-width: 820px) { .site-footer__top { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   15. Legal pages — quiet, plain, readable
   -------------------------------------------------------------------------- */
.legal { padding-block: clamp(40px, 6vw, 72px) clamp(64px, 8vw, 104px); }
/* Long German compounds break with a hyphen instead of running off narrow screens */
.legal__body { max-width: 38em; hyphens: auto; overflow-wrap: break-word; }
.legal__title { font-size: 1.75rem; font-weight: 500; letter-spacing: 0; hyphens: auto; overflow-wrap: break-word; }
.legal__meta { margin-top: 6px; color: var(--ink-65); }

.legal__body section { margin-top: 40px; }
.legal__body h2 { font-size: var(--fs-h3); font-weight: 500; letter-spacing: 0; margin-bottom: 10px; }
.legal__body h3 { font-size: var(--fs-body); font-weight: 500; margin: 24px 0 6px; }
.legal__body p + p { margin-top: 10px; }
.legal__body ul { margin: 8px 0 0; padding-left: 1.2em; }
.legal__body li + li { margin-top: 4px; }
.legal__body address { font-style: normal; line-height: 1.7; }
.legal__body a { word-break: break-word; }
.legal__body dl { margin: 10px 0 0; }
.legal__body dt { font-weight: 500; margin-top: 14px; }
.legal__body dd { margin: 2px 0 0; }

/* --------------------------------------------------------------------------
   15b. 404 page
   -------------------------------------------------------------------------- */
.notfound {
  min-height: calc(100dvh - var(--header-h) - 260px);
  display: flex;
  align-items: center;
  padding-block: clamp(64px, 10vw, 128px);
}
.notfound__mark {
  display: block;
  width: 48px;
  height: var(--rule-heavy);
  margin-bottom: 28px;
  background: var(--coral);
}
.notfound h1 { font-size: var(--fs-display); line-height: 1.06; letter-spacing: -0.03em; }
.notfound p { margin-top: 20px; max-width: 32em; color: var(--ink-65); }
.notfound .notfound__code { margin-top: 16px; font-size: var(--fs-small); font-weight: 500; }
.notfound__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 36px; }

/* --------------------------------------------------------------------------
   16. Cookie consent
   -------------------------------------------------------------------------- */
.consent {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto auto 16px;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
}
@media (min-width: 720px) { .consent { margin: auto 24px 24px auto; } }
.consent::backdrop { background: rgba(26, 26, 26, 0.45); }
/* The dialog itself takes focus on open, so no choice is pre-selected */
.consent:focus { outline: none; }
.consent[open] { animation: consent-in .3s var(--ease); }
@keyframes consent-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.consent__inner { padding: 28px 28px 24px; }
.consent__title { font-size: 1.25rem; font-weight: 700; }
.consent__text { margin-top: 10px; font-size: var(--fs-small); color: var(--ink-65); }
.consent__text a { color: var(--ink); }

.consent__actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 22px; }
.consent__actions .btn { padding: 10px 12px; min-height: 46px; font-size: 0.875rem; white-space: normal; text-align: center; }
@media (max-width: 480px) { .consent__actions { grid-template-columns: 1fr; } }

.consent__settings { margin-top: 22px; border-top: 1px solid var(--ink-15); }
.consent__settings[hidden] { display: none; }

.consent-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--ink-15);
}
.consent-option__name { font-weight: 500; font-size: var(--fs-small); }
.consent-option__desc { grid-column: 1; font-size: 0.875rem; color: var(--ink-65); }
.consent-option .switch { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.consent__save { display: flex; justify-content: flex-end; margin-top: 18px; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 44px; height: 26px; margin: 0; cursor: inherit; }
.switch__track {
  position: relative;
  width: 44px;
  height: 26px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  transition: background-color .2s var(--ease);
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 17px; height: 17px;
  background: var(--ink);
  transition: transform .2s var(--ease);
}
.switch input:checked + .switch__track { background: var(--blush); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--ink); outline-offset: 3px; }
.switch input:disabled + .switch__track { border-color: var(--ink-40); cursor: not-allowed; }
.switch input:disabled + .switch__track::after { background: var(--ink-65); }
.switch__state { min-width: 3.4em; font-size: var(--fs-xs); color: var(--ink-65); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-small);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   17. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
