/* =========================================================
   Base / reset. Logical properties only (inline-start / inline-end)
   so the same CSS works for RTL (Hebrew) and LTR (future English).
   ========================================================= */
*, *::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(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.005em;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
ul[role="list"], ol[role="list"] { list-style: none; }
figure { margin: 0; }
address { font-style: normal; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}
/* Focus ring contrast (WCAG 2.1 – 1.4.11): darker gold on light backgrounds (default token),
   the original light gold inside dark areas, where it reads clearly against navy. */
.site-header, .hero, .page-hero, .section--dark, .cta, .site-footer,
.action-bar, .contact-panel, .story-result, .story-tile__figure { --color-focus: var(--gold-500); }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Arrow icons are drawn pointing "forward" in RTL (left). Flip for LTR. */
[dir="ltr"] .icon--flip-ltr { transform: scaleX(-1); }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--gold-500);
  color: var(--navy-950);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

/* ---------------------------------------------------------
   Content annotations (development only)
   .ph = placeholder content (missing – must be supplied)
   .vf = content transcribed from the prototype – verify with the firm
   Turned on by main.js on localhost; add ?clean to the URL to hide.
   --------------------------------------------------------- */
html[data-annotate] .ph {
  outline: 1.5px dashed #E8762B;
  outline-offset: 2px;
  background-color: rgba(232, 118, 43, 0.08);
}
html[data-annotate] .vf {
  outline: 1.5px dashed #2E8BC9;
  outline-offset: 2px;
}
.annotate-legend {
  position: fixed;
  inset-inline-start: 12px;
  bottom: 12px;
  z-index: 90;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.annotate-legend span::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  margin-inline-end: 6px;
  vertical-align: -1px;
  border: 1.5px dashed currentColor;
}
.annotate-legend .is-ph { color: #C25A15; }
.annotate-legend .is-vf { color: #1F6FA5; }
.annotate-legend button {
  justify-self: start;
  margin-top: 2px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--ink-soft);
  text-decoration: underline;
  font-size: 12px;
}
@media (max-width: 768px) {
  .annotate-legend { bottom: calc(70px + env(safe-area-inset-bottom)); }
}
