* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --page-bg: #f4efe6;
  --paper: #fdfbf7;
  --paper-strong: #fffdf9;
  --ink: #2d231c;
  --muted: #6f5e4d;
  --accent: #9b7b4b;
  --accent-contrast: #fffdf9;
  --line: rgba(70, 52, 35, 0.14);
  --shadow: rgba(55, 39, 26, 0.14);
}

html {
  min-width: 280px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 0.92rem + 0.35vw, 1.2rem);
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: none;
}

.photo-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: var(--article-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
}

body.photo-as-background .photo-backdrop {
  opacity: 0.94;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  padding: 0.6rem 0.8rem;
  background: var(--paper-strong);
  color: var(--ink);
  border: 2px solid var(--accent);
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(100%, 76rem);
  margin: 0 auto;
  padding: clamp(0.45rem, 1.5vw, 0.8rem) clamp(0.7rem, 2.4vw, 1.1rem);
  color: var(--muted);
}

.site-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.6rem;
  overflow: hidden;
}

.home-link,
.language-link {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.language-nav {
  display: flex;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-start;
  gap: 0.2rem 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.76rem;
}

.language-link[aria-current="page"] {
  color: var(--accent-contrast);
  font-weight: 800;
  text-decoration: none;
}

.home-link,
.language-link {
  white-space: nowrap;
}

.article-shell {
  width: min(100%, 72rem);
  margin: 0 auto clamp(1.2rem, 5vw, 3rem);
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--paper);
  box-shadow: none;
  position: relative;
}

.hero {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.65rem;
  min-height: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  box-shadow: none;
}

.hero::before {
  content: none;
}

.hero::after {
  content: none;
}

.hero-photo {
  margin: 0;
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: min(86vh, 56rem);
  object-fit: cover;
  object-position: center;
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.hero-photo.is-dragging img {
  cursor: grabbing;
}

.hero-photo-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      135deg,
      rgba(255, 220, 140, 0.08),
      rgba(90, 70, 150, 0.07) 52%,
      rgba(25, 15, 10, 0.16)
    );
  mix-blend-mode: soft-light;
  opacity: 0.38;
  transition: opacity 320ms ease;
}

.hero-copy {
  position: relative;
  max-width: min(100%, 52rem);
  align-self: end;
  padding: clamp(0.65rem, 1.8vw, 1rem);
  border-radius: 0.8rem;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(2px);
}

.eyebrow,
.article-meta {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  display: none;
}

.dek {
  max-width: 46rem;
  margin: 0.35rem 0 0;
  color: var(--ink);
  font-size: clamp(0.96rem, 0.94rem + 0.28vw, 1.1rem);
  line-height: 1.52;
  text-shadow: none;
}

.toolbar {
  position: sticky;
  top: 0.25rem;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  justify-content: flex-end;
  padding: 0.45rem clamp(0.3rem, 1.8vw, 0.9rem) 0;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}

button {
  min-height: 1.8rem;
  min-width: 1.8rem;
  width: 1.8rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--ink) 24%, white);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper-strong) 92%, transparent);
  color: color-mix(in srgb, var(--ink) 78%, var(--accent));
  font: 600 0.72rem/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  opacity: 0.62;
}

button.secondary {
  background: color-mix(in srgb, var(--paper-strong) 60%, transparent);
  color: color-mix(in srgb, var(--ink) 78%, var(--accent));
}

button:hover {
  opacity: 0.82;
  filter: none;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, white);
  outline-offset: 3px;
}

.article-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.7rem, 1.5vw, 0.95rem);
  padding: clamp(0.9rem, 2.5vw, 1.5rem) clamp(0.9rem, 2.6vw, 1.8rem) clamp(1.2rem, 3.2vw, 2.4rem);
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.article-body > * {
  position: relative;
  z-index: 2;
}

.article-body p {
  width: min(100%, 48rem);
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.tts-sentence {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  transition: text-decoration-color 180ms ease, background-color 180ms ease;
}

.tts-sentence.is-reading {
  text-decoration-color: color-mix(in srgb, var(--accent) 88%, var(--ink));
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.quote {
  width: min(100%, 54rem);
  margin: 0 auto;
  padding: clamp(0.9rem, 2vw, 1.2rem) clamp(1rem, 2.3vw, 1.6rem);
  background: color-mix(in srgb, var(--accent) 8%, white);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, white);
  border-left: 0.2rem solid var(--accent);
  border-radius: 0.3rem;
}

.quote p + p {
  margin-top: 1rem;
}

.question {
  margin-top: clamp(1rem, 4vw, 3rem);
  color: var(--accent);
  font-size: clamp(1.6rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  justify-content: center;
  width: min(100%, 32rem);
  margin: 0 auto;
  padding-top: 0;
  color: var(--muted);
  border-top: 0;
  font-size: 0.9rem;
}

.article-meta span {
  padding: 0.35rem 0.6rem;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, white);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper-strong) 86%, white 14%);
}

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

@media (max-width: 760px) {
  .language-nav {
    justify-content: flex-start;
  }

  .article-shell {
    width: 100%;
  }

  .hero {
    min-height: 0;
  }

  .hero-photo img {
    height: min(74vh, 36rem);
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.1rem, 13vw, 5rem);
  }

  .toolbar {
    justify-content: stretch;
  }

  .toolbar button {
    flex: 0 0 auto;
  }
}

@media (max-width: 360px) {
  body {
    font-size: 0.98rem;
  }

  .article-shell {
    width: 100%;
    border-left: 0;
    border-right: 0;
  }

  .hero,
  .article-body {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .photo-backdrop {
    transition: none;
  }
}

@media print {
  body {
    background: white;
  }

  .photo-backdrop,
  .toolbar,
  .site-header {
    display: none;
  }

  .article-shell {
    width: 100%;
    margin: 0;
    box-shadow: none;
    border: 0;
  }
}
