/* Reset, typography, buttons and small utilities. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.9 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[lang="en"] body { line-height: 1.7; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .25em; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.3; margin: 0 0 .5em; }
[lang="en"] h1, [lang="en"] h2, [lang="en"] h3 { line-height: 1.1; letter-spacing: -.01em; }
h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
.tone-leaf :focus-visible, .tone-bean :focus-visible, .tone-chili :focus-visible, .site-footer :focus-visible { outline-color: var(--yellow); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap.narrow { max-width: 860px; }
.section { padding-block: var(--section); }
.eyebrow {
  margin: 0 0 18px;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--tone-accent);
}
[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .82rem; }
.lead { font-size: var(--size-lead); line-height: 1.85; max-width: 46ch; }
.muted { color: var(--ink-soft); font-size: .95rem; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 18px; background: var(--deep); color: var(--cream); border-radius: 10px; }
.skip-link:focus { top: 12px; }

/* Icons */
.icon { width: 1.25em; height: 1.25em; flex: none; }
[dir="rtl"] .icon-arrow { transform: scaleX(-1); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 12px 28px;
  border: 2px solid transparent; border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
  cursor: pointer;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--green); color: var(--cream); }
.button-primary:hover { background: var(--deep); }
.button-light { background: var(--cream); color: var(--deep); }
.button-light:hover { background: var(--yellow); }
.button-outline { border-color: currentColor; color: var(--tone-ink); background: transparent; }
.button-outline:hover { background: var(--tone-ink); color: var(--tone-bg); }
.button-outline-light { border-color: rgba(255, 246, 229, .6); color: var(--cream); background: transparent; }
.button-outline-light:hover { border-color: var(--cream); background: rgba(255, 246, 229, .1); }
.text-link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-weight: 700; text-decoration: none; color: inherit;
  border-bottom: 2px solid currentColor; padding-bottom: 2px; width: fit-content;
}
.text-link .icon { transition: transform .2s ease; }
.text-link:hover .icon { transform: translateX(4px); }
[dir="rtl"] .text-link:hover .icon { transform: scaleX(-1) translateX(4px); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 34px; }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px;
  border: 1.5px solid var(--line); border-radius: 999px; background: transparent;
  font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.chip-links { display: flex; flex-wrap: wrap; gap: 12px; }
.chip-links .chip { background: var(--tone-bg); color: var(--tone-ink); border-color: transparent; padding-inline: 22px; min-height: 52px; font-size: 1.05rem; }
.chip-links .chip:hover { filter: brightness(.96); }

/* Painted tones */
.section[class*="tone-"], .page-hero, .audience, .article-head, .article-next { background: var(--tone-bg); color: var(--tone-ink); }

/* Section heads */
.section-head { margin-bottom: clamp(36px, 5vw, 64px); max-width: 760px; }
.section-head h2 { margin: 0; }
.split-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; }
.split-head > div { max-width: 760px; }

/* Text pages */
.prose { font-size: 1.1rem; line-height: 2; }
[lang="en"] .prose { line-height: 1.8; }
.prose h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 2em 0 .6em; color: var(--deep); }
.prose h3 { font-size: 1.3rem; margin: 1.6em 0 .5em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; margin: 0 0 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .5em; }
.prose a { color: var(--green); text-decoration: underline; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.prose .lead { font-size: 1.2rem; color: var(--deep); }
.prose .table-scroll { overflow-x: auto; margin: 0 0 1em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.6; }
.prose th, .prose td { padding: .6em .8em; text-align: start; border-bottom: 1px solid rgba(0,0,0,.08); }
.prose thead th { background: var(--deep); color: #fff; font-weight: 700; }
.prose tbody tr:nth-child(even) { background: rgba(0,0,0,.025); }
.prose .note { font-size: .95rem; opacity: .8; }
.prose .sources { font-size: .95rem; line-height: 1.7; }
.prose .sources a { direction: ltr; unicode-bidi: isolate; }
