/* Pottigalli — Gaudí wall
   Layout: one continuous limestone wall over the site background; every piece of content sits in
   its own organic opening, decorative openings hold stained glass or simply let the background in. */
:root {
  color-scheme: light;
  --stone: #e6d8bf;          /* limestone */
  --stone-deep: #b9a07a;
  --parchment: #f7efe0;      /* reading surfaces */
  --ink: #2a2018;            /* espresso text */
  --ink-soft: #5a4a39;
  --ink-faint: #85725d;
  --terracotta: #9b4a26;
  --terracotta-deep: #7a3518;
  --frost: rgba(240, 244, 236, 0.9);
  --scrim: rgba(34, 24, 15, 0.9);

  --font-display: "Cormorant Garamond", "Cormorant", "EB Garamond", Garamond, "Times New Roman", serif;
  --font-text: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-ui: "Lato", "Helvetica Neue", Arial, sans-serif;
}

html { background: var(--stone); }
body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* without JavaScript the configured background still sits behind the page, exactly as before */
html:not(.has-bg-layer) body {
  background-image: var(--bg-image, url("../assets/sagrada-combined.jpg"));
  background-size: 100% auto;
  background-position: center top;
  background-repeat: repeat-y;
  background-attachment: scroll;
}
.site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #6d4a22;
}
img { max-width: 100%; }
a { color: inherit; }
.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;
}
:focus-visible { outline: 2.5px solid var(--terracotta); outline-offset: 3px; border-radius: 6px; }

/* ------------------------------------------------------------------ the wall */
.wall {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  transition: opacity 0.35s ease;
}
.wall.is-preparing { opacity: 0; }
.wall-stone {
  position: absolute;
  left: 0;
  display: block;
  pointer-events: none;
  overflow: hidden;
}
.cell {
  position: absolute;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0;
}
.measurer {
  position: absolute;
  left: -10000px;
  top: 0;
  visibility: hidden;
  pointer-events: none;
}
.measurer > .cell { position: relative !important; left: 0 !important; top: 0 !important; height: auto !important; }

.cell--text,
.cell--nav,
.cell--footer,
.cell--logo {
  background: var(--parchment) var(--tex-parchment, url("../assets/texture/parchment.jpg")) 0 0 / 512px 512px;
  color: var(--ink);
}
/* the big first window sits beneath the islands set into it */
.cell--window { z-index: -1; }
.wall-plant { position: absolute; display: block; max-width: none; pointer-events: none; filter: drop-shadow(2px 5px 4px rgba(28, 18, 8, 0.34)); }
.stone-shade.fade { animation: pg-fade 0.45s ease-out both; }
@keyframes pg-fade { from { opacity: 0; } to { opacity: 1; } }

/* a fragment of glass pairs each picture with its headline */
.story-gem { position: absolute; z-index: 2; pointer-events: none; line-height: 0; transition: transform 0.25s ease, filter 0.25s ease; }
.story-gem svg { display: block; }
.story-gem.hover { transform: scale(1.14); filter: drop-shadow(0 0 5px rgba(255, 244, 214, 0.85)); }

/* the logo window: the animated logo floats on parchment */
.cell--logo { display: flex; align-items: center; justify-content: center; }
.logo-art { position: relative; width: 100%; height: 100%; cursor: default; }
.logo-art > .logo-still,
.logo-art > .logo-motion { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.logo-art > .logo-motion { opacity: 0; transition: opacity 0.35s ease; }
.logo-art > .logo-motion.on { opacity: 1; }
.logo-art > .logo-video { position: absolute; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
.cell--image,
.cell--deco,
.cell--figure { background: #c9b48f; }
.cell--image img,
.cell--deco img,
.cell--figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
.cell--glass svg { display: block; width: 100%; height: 100%; }
.cell--art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transform: scale(1.12);
}
.cell--image { display: block; }
.cell--image img { transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.cell--image.hover img { transform: scale(1.035); }

/* a card that grows to meet its neighbour keeps its words in the middle */
.post-card { display: flex; flex-direction: column; justify-content: center; }
.post-card > .kicker, .post-card > .card-title, .post-card > .excerpt, .post-card > .more { flex: none; }
.post-card > .more { align-self: flex-start; }

/* text sitting on stained glass: a frosted pane keeps every word readable */
.cell--frost { background: transparent; }
.cell--frost > .frost-glass { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cell--frost > .frost-pane {
  position: absolute;
  background: var(--frost);
  border-radius: 46px 58px 44px 62px / 52px 46px 60px 48px;
  box-shadow: 0 0 0 1.5px rgba(43, 33, 23, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.cell--frost > .frost-body { position: relative; }

/* ------------------------------------------------------------------ type */
.kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35em 0.9em;
  margin: 0;
  font: 700 11.5px/1.35 var(--font-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.kicker .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.25em 0.7em 0.25em 0.55em;
  border-radius: 999px;
  background: rgba(155, 74, 38, 0.1);
  color: var(--terracotta);
  letter-spacing: 0.08em;
}
.badge svg { width: 12px; height: 12px; }
.card-title {
  margin: 0.32em 0 0.38em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 31px;
  line-height: 1.04;
  letter-spacing: -0.004em;
  text-wrap: balance;
  color: var(--ink);
}
.card-title a { text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-title a:focus-visible { outline: none; }
.card-title a:focus-visible::after { outline: 2.5px solid var(--terracotta); outline-offset: -24px; border-radius: 56px; }
.size-l .card-title { font-size: 42px; }
.size-s .card-title { font-size: 26px; }
.excerpt {
  margin: 0 0 1.05em;
  font: 400 16px/1.62 var(--font-ui);
  color: var(--ink-soft);
}
.size-l .excerpt { font-size: 17px; }
.more {
  display: inline-block;
  font: 700 13px/1 var(--font-ui);
  letter-spacing: 0.05em;
  color: var(--terracotta);
}
.post-card.hover .more { text-decoration: underline; text-underline-offset: 4px; }
.meta {
  margin: 0;
  font: 400 13.5px/1.4 var(--font-ui);
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ nav */
.cell--nav { display: flex; align-items: center; padding: 0 clamp(18px, 2.2vw, 34px); }
.nav {
  display: flex;
  align-items: center;
  gap: 18px 34px;
  width: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: none;
}
.brand-logo { display: block; height: 44px; width: auto; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: 0.01em;
}
.nav-links {
  display: flex;
  gap: 4px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a {
  font: 400 17px/1 var(--font-text);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1.5px solid transparent;
}
.nav-links a:hover { border-bottom-color: rgba(155, 74, 38, 0.45); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--terracotta); }
.nav-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { background: rgba(155, 74, 38, 0.09); }
.lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(120, 90, 55, 0.12);
}
.lang button {
  min-width: 38px;
  height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font: 700 12px/1 var(--font-ui);
  letter-spacing: 0.08em;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--terracotta); color: #fff8ee; }

/* ------------------------------------------------------------------ the menu that follows you */
.sticky-nav {
  position: fixed;
  z-index: 15;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  display: flex;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(calc(-100% - 24px));
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.32s;
}
.sticky-nav.is-shown {
  visibility: visible;
  transform: none;
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s;
}
.sticky-nav.no-motion, .sticky-nav.no-motion.is-shown { transition: none; }
/* a parchment pill set in a ring of the same limestone as the wall */
.sticky-inner {
  pointer-events: auto;
  width: min(100%, 1060px);
  padding: 6px;
  border-radius: 999px;
  background: #e4d5b8 var(--tex-stone, url("../assets/texture/stone.jpg")) center / 420px;
  box-shadow: inset 0 1.5px 0 rgba(255, 252, 244, 0.85), inset 0 -2px 4px rgba(90, 62, 32, 0.3), 0 10px 26px rgba(40, 25, 10, 0.32), 0 1px 3px rgba(40, 25, 10, 0.35);
}
.sticky-inner > .nav {
  box-sizing: border-box;
  min-height: 54px;
  padding: 5px 18px 5px 22px;
  border-radius: 999px;
  background: var(--parchment) var(--tex-parchment, url("../assets/texture/parchment.jpg")) 0 0 / 512px 512px;
  box-shadow: inset 2px 3px 6px rgba(80, 55, 30, 0.3), inset -1px -1px 0 rgba(255, 255, 255, 0.6);
  color: var(--ink);
}
.sticky-inner .brand-logo { height: 40px; }
@media (max-width: 699px) {
  .sticky-nav { left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); top: calc(env(safe-area-inset-top, 0px) + 6px); }
  .sticky-inner { padding: 4px; }
  .sticky-inner > .nav { min-height: 48px; padding: 3px 8px 3px 14px; gap: 10px 14px; }
  .sticky-inner .brand-logo { height: 34px; }
  .sticky-inner .nav-links { gap: 4px 14px; }
  .sticky-inner .nav-links a { font-size: 15.5px; }
  .sticky-inner .nav-tools { gap: 4px; }
  .sticky-inner .lang button { min-width: 32px; padding: 0 6px; }
}
@media (max-width: 374px) {
  .sticky-inner > .nav { padding: 4px 12px; border-radius: 26px; }
  .sticky-inner { border-radius: 30px; }
}

/* ------------------------------------------------------------------ hero */
.hero-title {
  margin: 0.18em 0 0.28em;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(42px, 3.6vw + 16px, 80px);
  line-height: 0.98;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.hero-sub {
  margin: 0 0 1.4em;
  max-width: 34em;
  font: 400 18px/1.58 var(--font-ui);
  color: var(--ink-soft);
}
.btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.45em;
  border: 0;
  border-radius: 999px;
  background: var(--terracotta);
  color: #fff8ee;
  font: 700 14px/1 var(--font-ui);
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 7px rgba(90, 42, 16, 0.28);
}
.btn:hover { background: var(--terracotta-deep); }
.btn--ghost {
  background: transparent;
  color: var(--terracotta);
  box-shadow: inset 0 0 0 1.5px rgba(155, 74, 38, 0.55);
}
.btn--ghost:hover { background: rgba(155, 74, 38, 0.08); }

/* ------------------------------------------------------------------ feed extras */
.cell--end { display: grid; place-items: center; text-align: center; }
.end-line {
  margin: 0 0 0.6em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 30px;
  line-height: 1.1;
}
.end-line + a { font: 700 13px var(--font-ui); letter-spacing: 0.05em; color: var(--terracotta); }
.loader {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.loader[hidden] { display: none; }
.loader .btn[aria-busy="true"] { opacity: 0.75; cursor: progress; }

/* ------------------------------------------------------------------ footer */
.cell--footer { display: flex; align-items: center; }
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 32px;
  width: 100%;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; align-self: center; }
.footer-logo { display: block; height: 32px; width: auto; }
.footer-brand-name { font-family: var(--font-display); font-weight: 600; font-size: 26px; }
.footer-desc { margin: 0; font: 400 15px/1.5 var(--font-ui); color: var(--ink-soft); flex: 1 1 260px; }
.footer-nav { display: flex; gap: 22px; font: 400 16px var(--font-text); }
.footer-nav a { text-decoration: none; border-bottom: 1px solid rgba(155, 74, 38, 0.35); }
.footer-copy, .footer-note { font: 400 13px/1.4 var(--font-ui); color: var(--ink-faint); }
.footer-note { flex-basis: 100%; font-style: italic; }

/* ------------------------------------------------------------------ article */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 0.7em;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 700 11.5px/1.3 var(--font-ui);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.crumbs li + li::before { content: "/"; margin-right: 0.7em; opacity: 0.6; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--terracotta); }
.article-title {
  margin: 0.3em 0 0.25em;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 3.2vw + 16px, 72px);
  line-height: 0.99;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.deck {
  margin: 0 0 1em;
  font: 400 21px/1.45 var(--font-text);
  color: var(--ink-soft);
  text-wrap: pretty;
}
.byline { display: flex; align-items: center; gap: 12px; }
.byline img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7), 0 1px 4px rgba(60, 40, 20, 0.3); }
.byline-name { margin: 0 0 2px; font: 700 14px/1.2 var(--font-ui); color: var(--ink); }

.prose {
  font-family: var(--font-text);
  font-size: 19.5px;
  line-height: 1.72;
  color: var(--ink);
  font-optical-sizing: auto;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 1.05em; text-wrap: pretty; }
.prose h2 {
  margin: 1.15em 0 0.42em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 36px;
  line-height: 1.08;
  text-wrap: balance;
}
.prose h3 { margin: 1.1em 0 0.35em; font: 700 15px/1.3 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.prose ul { margin: 0 0 1.05em; padding-left: 1.2em; }
.prose li { margin: 0.25em 0; }
.prose li::marker { color: var(--terracotta); }
.prose blockquote {
  margin: 1.2em 0;
  padding: 0.1em 0 0.1em 1em;
  border-left: 3px solid rgba(155, 74, 38, 0.5);
  font-style: italic;
  color: var(--ink-soft);
}
.prose a { color: var(--terracotta); text-underline-offset: 3px; }
.prose .drop::first-letter {
  float: left;
  margin: 0.06em 0.09em 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 4.35em;
  line-height: 0.8;
  color: var(--ink);
}
.prose .player { margin: 1.4em 0 1.5em; }

.pull {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 30px;
  line-height: 1.18;
  color: #22332f;
  text-wrap: balance;
}
.pull::before {
  content: "\201C";
  display: block;
  height: 0.5em;
  margin-bottom: 0.15em;
  font-size: 2.1em;
  line-height: 1;
  color: rgba(34, 51, 47, 0.75);
}
.quote .pull { font-size: 26px; }
[data-tier="mob"] .quote .pull { font-size: 24px; }
.pull-source {
  display: block;
  margin-top: 1.1em;
  padding-top: 0.9em;
  border-top: 1px solid rgba(34, 51, 47, 0.25);
  font: 700 11.5px/1.3 var(--font-ui);
  font-style: normal;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: rgba(34, 51, 47, 0.75);
}

.cell--figure { padding: 0; }
.fig-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.fig-open:focus-visible { outline-offset: -28px; border-radius: 64px; }

.nav-post { display: flex; flex-direction: column; justify-content: center; text-decoration: none; }
.nav-post:hover .card-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.nav-post .kicker { color: var(--terracotta); }
.nav-post .card-title { font-size: 27px; }

/* ------------------------------------------------------------------ audio player */
.player {
  position: relative;
  z-index: 2;
  container-type: inline-size;
  container-name: player;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 9px 12px 9px 9px;
  border-radius: 999px;
  background: rgba(226, 212, 186, 0.62);
  box-shadow: inset 0 1px 3px rgba(90, 60, 30, 0.22), 0 1px 0 rgba(255, 255, 255, 0.7);
  font-family: var(--font-ui);
}
.player-play {
  flex: none;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: var(--terracotta);
  color: #fff8ee;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 6px rgba(90, 42, 16, 0.35);
}
.player-play:hover { background: var(--terracotta-deep); }
.player-play svg { width: 20px; height: 20px; }
.player-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.player-label { display: flex; align-items: center; gap: 0.4em; min-width: 0; font: 700 11px/1.2 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; overflow: hidden; }
.player-label svg { flex: none; width: 13px; height: 13px; color: var(--terracotta); }
.player-label-text { overflow: hidden; text-overflow: ellipsis; }
.player-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wave {
  position: relative;
  flex: 1;
  min-width: 60px;
  height: 34px;
  cursor: pointer;
  touch-action: none;
  border-radius: 6px;
}
.wave svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wave .wave-top { clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0); }
.wave-base rect { fill: rgba(92, 70, 48, 0.32); }
.wave-top rect { fill: #4a3624; }
.player-time { flex: none; font: 400 13px/1 var(--font-ui); color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.player-vol { flex: none; display: flex; align-items: center; gap: 6px; }
.player-vol input[type="range"] {
  width: 84px;
  height: 22px;
  margin: 0;
  background: transparent;
  accent-color: var(--ink);
  cursor: pointer;
}
.player .icon-btn { width: 36px; height: 36px; }
.player .icon-btn svg { width: 20px; height: 20px; }
.player-menu {
  position: absolute;
  right: 6px;
  bottom: calc(100% + 8px);
  z-index: 5;
  min-width: 200px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border-radius: 18px;
  background: #fbf6ec;
  box-shadow: 0 10px 28px rgba(50, 32, 14, 0.25), 0 0 0 1px rgba(90, 60, 30, 0.12);
}
.player-menu[hidden] { display: none; }
/* ---- compact layout: the player reflows to two rows once it has less room than the
   full row needs (play + label + mute + wave + time + more). Keyed to the player's own
   rendered width via a container query, so it works correctly in portrait AND landscape —
   no guessing at viewport width or orientation. Row 1: play, label, mute, more.
   Row 2 (full width): waveform + time, which is where the real estate actually is. */
@container player (max-width: 400px) {
  .player { row-gap: 8px; padding: 8px 10px 10px 9px; }
  .player-main { display: contents; }
  .player-play { order: 1; }
  .player-label { order: 2; flex: 1 1 auto; }
  .player-vol { order: 3; }
  .player-vol input[type="range"] { display: none; }
  .more-btn { order: 4; }
  .player-row { order: 5; flex-basis: 100%; width: 100%; margin-top: 2px; }
}
/* fallback for the rare browser without container-query support: key the same
   compact layout off the page's mobile tier instead (still both orientations). */
@supports not (container-type: inline-size) {
  [data-tier="mob"] .player { row-gap: 8px; }
  [data-tier="mob"] .player-main { display: contents; }
  [data-tier="mob"] .player-play { order: 1; }
  [data-tier="mob"] .player-label { order: 2; flex: 1 1 auto; }
  [data-tier="mob"] .player-vol { order: 3; }
  [data-tier="mob"] .player-vol input[type="range"] { display: none; }
  [data-tier="mob"] .more-btn { order: 4; }
  [data-tier="mob"] .player-row { order: 5; flex-basis: 100%; width: 100%; margin-top: 2px; }
}
.player-menu .menu-label { padding: 6px 10px 4px; font: 700 11px/1.2 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.player-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font: 400 15px/1.2 var(--font-ui);
  text-align: left;
  cursor: pointer;
}
.player-menu button:hover, .player-menu button:focus-visible { background: rgba(155, 74, 38, 0.1); outline: none; }
.player-menu [aria-checked="true"]::after { content: "✓"; color: var(--terracotta); font-weight: 700; }
.speed-row { display: flex; gap: 4px; padding: 2px 4px 6px; }
.speed-row button { justify-content: center; padding: 8px 0; font-variant-numeric: tabular-nums; }
.speed-row button[aria-checked="true"] { background: var(--terracotta); color: #fff8ee; }
.speed-row button[aria-checked="true"]::after { content: none; }

/* ------------------------------------------------------------------ search */
.search-panel {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 50%;
  z-index: 20;
  width: min(560px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 8px;
  padding: 8px 8px 8px 20px;
  border-radius: 28px;
  background: #fbf6ec;
  box-shadow: 0 12px 34px rgba(50, 32, 14, 0.3), 0 0 0 1.5px rgba(155, 74, 38, 0.4);
}
.search-panel[hidden] { display: none; }
.search-panel input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 400 18px var(--font-text);
}
.search-panel input:focus { outline: none; }
.search-status { grid-column: 1 / -1; margin: 0; font: 400 13px var(--font-ui); color: var(--ink-faint); }
.search-status:empty { display: none; }

/* ------------------------------------------------------------------ lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 56px) max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 56px) max(16px, env(safe-area-inset-left, 0px));
  background: var(--scrim);
}
.lightbox-fig { margin: 0; display: grid; justify-items: center; gap: 10px; max-width: 100%; max-height: 100%; }
.lightbox-fig img { max-width: min(92vw, 1600px); max-height: calc(100vh - 150px); border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); }
.lightbox-fig figcaption { font: 400 13px var(--font-ui); color: rgba(255, 246, 230, 0.8); letter-spacing: 0.08em; }
.lightbox .icon-btn { position: absolute; width: 48px; height: 48px; color: #fff6e6; background: rgba(255, 246, 230, 0.12); }
.lightbox .icon-btn:hover { background: rgba(255, 246, 230, 0.22); }
.lb-close { top: calc(env(safe-area-inset-top, 0px) + 14px); right: max(14px, env(safe-area-inset-right, 0px)); }
.lb-prev { left: max(14px, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); }
.lb-next { right: max(14px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); }

/* ------------------------------------------------------------------ tiers */
[data-tier="tab"] .card-title { font-size: 28px; }
[data-tier="tab"] .size-l .card-title { font-size: 36px; }
[data-tier="tab"] .nav-links a { font-size: 16px; }
[data-tier="mob"] .card-title { font-size: 27px; }
[data-tier="mob"] .size-l .card-title { font-size: 32px; }
[data-tier="mob"] .excerpt { font-size: 15.5px; }
[data-tier="mob"] .hero-sub { font-size: 16.5px; }
[data-tier="mob"] .nav { gap: 8px 7px; }
[data-tier="mob"] .brand-name { display: none; }
[data-tier="mob"] .brand-logo { height: 33px; }
[data-tier="mob"] .footer-brand-name { display: none; }
[data-tier="mob"] .footer-logo { height: 28px; }
[data-tier="mob"] .nav-links { gap: 4px 12px; }
[data-tier="mob"] .nav-links a { font-size: 15px; }
[data-tier="mob"] .nav-tools { gap: 2px; }
[data-tier="mob"] .nav .icon-btn { width: 34px; height: 34px; }
[data-tier="mob"] .lang button { min-width: 29px; height: 28px; padding: 0 5px; }
[data-tier="mob"] .prose { font-size: 18px; line-height: 1.68; }
[data-tier="mob"] .prose h2 { font-size: 30px; }
[data-tier="mob"] .deck { font-size: 18.5px; }
[data-tier="mob"] .pull { font-size: 26px; }
[data-tier="mob"] .player { gap: 10px; }
[data-tier="mob"] .player-play { width: 46px; height: 46px; }
[data-tier="mob"] .footer { gap: 8px 20px; }
[data-tier="mob"] .end-line { font-size: 26px; }
.no-volume .player-vol input { display: none; }
/* long German compounds may break inside headlines rather than overflow */
.hero-title, .card-title, .article-title, .prose h2, .end-line { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
/* narrow phones: nav links move to a second row, the player tightens up */
@media (max-width: 374px) {
  .nav { flex-wrap: wrap; row-gap: 0; }
  .nav-links { order: 3; flex-basis: 100%; }
}
@media (max-width: 359px) {
  .article-title { font-size: 36px; }
  .player { gap: 8px; padding-right: 4px; }
  .player-row { gap: 8px; }
  .wave { min-width: 40px; }
  .player-time { font-size: 12px; }
  .player .icon-btn { width: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .cell--image.hover img { transform: none; }
}
