/* =========================================================
   Winning With Williams — shared stylesheet
   Design tokens, base layout, accessibility features.
   Written in plain CSS (no build step) for maximum
   cross-browser and cross-device compatibility.
   ========================================================= */

:root {
  /* Brand colours, taken from existing campaign materials */
  --navy: #0c2a52;
  --navy-dark: #081d3a;
  --red: #c8202e;
  --red-dark: #a11923;
  --cream: #f4f1ec;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #4b5563;
  --border: #dcdcd6;
  --pink-tint: #fbd3d6;

  /* Type scale (approx. major third, 1.25) */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.05rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.3rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 1.75rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.8vw, 2.5rem);
  --step-4: clamp(2.3rem, 1.7rem + 2.8vw, 3.2rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;

  --radius: 8px;
  --radius-sm: 4px;
  --max-width: 1180px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

/* Static fallback for the type scale above, for browsers that don't
   support clamp() (e.g. Safari < 13.4, older Android WebView). Without
   this, an unsupported clamp() value makes the whole font-size
   declaration invalid at computed-value time and it silently falls
   back to the inherited size instead — this keeps a sensible fixed
   size instead. Modern browsers use the clamp() versions above, since
   this block is skipped wherever @supports itself works but clamp()
   doesn't; @supports has broader support than clamp() does. */
@supports not (width: clamp(1px, 1px, 1px)) {
  :root {
    --step--1: 0.875rem;
    --step-0: 1rem;
    --step-1: 1.25rem;
    --step-2: 1.625rem;
    --step-3: 2.2rem;
    --step-4: 2.75rem;
  }
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Navy behind the page: the header and footer are navy, so phone rubber-band
   scrolling and toolbar resizing never flash a white strip at the top or bottom. */
html {
  background: var(--navy);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--text);
  background: var(--white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 var(--space-2);
  color: var(--navy);
}

h1 {
  font-size: var(--step-4);
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-1);
}

p {
  margin: 0 0 var(--space-2);
  max-width: 68ch;
}

a {
  color: var(--navy);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  color: var(--navy);
  padding: var(--space-2) var(--space-3);
  z-index: 1000;
  font-weight: 700;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* Visually-hidden but available to assistive tech */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Layout helpers ---------- */
.wrapper {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

@media (min-width: 640px) {
  .wrapper {
    padding-inline: var(--space-4);
  }
}

/* ---------- Site header ---------- */
.site-header {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  /* Own compositing layer + 1px overlap: stops a hairline of the white page
     showing between the sticky header and the content while scrolling on
     some phones (sub-pixel rounding). */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  box-shadow: 0 1px 0 var(--navy);
}

.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-2);
}

.brand-mark {
  color: var(--white);
  font-weight: 800;
  font-size: 1.3rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
}

.brand-mark img {
  display: block;
  height: 40px;
  width: auto;
}

.primary-nav {
  display: flex;
  align-items: center;
  position: relative;
}

.primary-nav > .btn {
  margin-left: var(--space-2);
}

.primary-menu {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

/* Margin-based spacing (not flex `gap`) so this also works correctly
   in older browsers that support flexbox but not gap-in-flex
   (e.g. Safari < 14.1). */
.primary-menu li:not(:last-child) {
  margin-right: var(--space-3);
}

.primary-nav a {
  color: #e8edf5;
  text-decoration: none;
  font-size: var(--step--1);
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--white);
  text-decoration: underline;
}

/* Mobile menu toggle: stays hidden (via the HTML `hidden` attribute)
   until nav.js confirms JavaScript is available, so the full link
   list is always reachable even if a script fails to load. */
.nav-toggle {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 0.45em 0.7em;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  margin-right: var(--space-2);
}

@media (min-width: 860px) {
  .nav-toggle {
    display: none;
  }
}

/* Only collapse the menu once JS has confirmed it can run the toggle
   (body.js-ready). Without JS, .primary-menu keeps its default
   `display: flex` above and every link stays visible and wraps. */
@media (max-width: 859px) {
  .js-ready .primary-menu {
    display: none;
  }

  /* Show the toggle from first paint (nav.js un-hides it later too). */
  .js-ready .nav-toggle[hidden] {
    display: inline-block;
  }

  .js-ready .primary-menu.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-dark);
    padding: var(--space-3);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  }

  .js-ready .primary-menu.is-open li:not(:last-child) {
    margin-right: 0;
    margin-bottom: var(--space-2);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: inherit;
  font-weight: 700;
  font-size: var(--step--1);
  text-decoration: none;
  padding: 0.7em 1.4em;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--red-dark);
}

.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline-navy {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-outline-navy:hover {
  background: rgba(12, 42, 82, 0.06);
}

.btn-light {
  background: var(--white);
  color: var(--red);
}
.btn-light:hover {
  background: var(--cream);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 calc(var(--space-2) * -1) calc(var(--space-2) * -1);
}

.btn-row > * {
  margin: 0 0 var(--space-2) var(--space-2);
}

/* ---------- Hero (Idea A: photo-led split) ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.15fr 1fr;
    min-height: 480px;
  }
}

.hero-copy {
  background: var(--navy);
  color: var(--white);
  padding: var(--space-6) var(--space-3);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Keeps the eyebrow, heading, hashtag, lede and buttons all sharing
   one consistent left edge and one consistent max-width, then
   centres that whole block within the (often much wider) navy
   column — rather than each element narrowing to its own max-width
   and sitting flush against the left edge independently. */
.hero-copy-inner {
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .hero-copy {
    padding: var(--space-6) var(--space-4);
  }
}

.hero-eyebrow {
  color: var(--pink-tint);
  font-weight: 700;
  font-size: var(--step--1);
  margin: 0 0 var(--space-2);
}

.hero-copy h1 {
  color: var(--white);
  margin-bottom: var(--space-1);
}

.hero-hashtag {
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-2);
}

.hero-copy p.lede {
  color: #c9d3e3;
  margin-bottom: var(--space-3);
}

.hero-media {
  position: relative;
  background: var(--red);
  overflow: hidden;
  padding-block: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-media img {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 38%;
  z-index: 1;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.9);
}

@media (min-width: 480px) {
  .hero-media {
    padding-block: 40px;
  }

  .hero-media img {
    width: 320px;
    height: 320px;
  }
}

@media (min-width: 860px) {
  .hero-media {
    padding-block: 48px;
  }

  .hero-media img {
    width: 380px;
    height: 380px;
  }
}

.hero-media .ribbon {
  position: absolute;
  z-index: 0;
  width: 55%;
  height: 45%;
  min-height: 120px;
  background: var(--navy);
  transform: rotate(-9deg);
  right: -15%;
  bottom: -20%;
}

/* ---------- Section spacing ---------- */
.section {
  padding-block: var(--space-5);
}

.section-cream {
  background: var(--cream);
}

.section-heading {
  text-align: center;
  color: var(--navy);
  font-size: var(--step-2);
  font-weight: 800;
  margin-bottom: var(--space-4);
  position: relative;
  padding-bottom: var(--space-2);
}

.section-intro {
  max-width: 62ch;
  margin: 0 auto var(--space-4);
  text-align: center;
  font-size: var(--step-0);
}

.section-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 4px;
  background: var(--red);
  border-radius: 2px;
}

/* ---------- Policy cards (homepage) ---------- */
.policy-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .policy-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.policy-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.policy-card h3 {
  margin-bottom: var(--space-1);
}

.policy-card p {
  color: var(--text-secondary);
  flex-grow: 1;
  margin-bottom: var(--space-2);
}

.policy-card .read-more {
  font-weight: 700;
  font-size: var(--step--1);
  text-decoration: none;
}

.policy-card .read-more:hover {
  text-decoration: underline;
}

/* ---------- Mailing list ---------- */
.mailing-list {
  text-align: center;
  max-width: 44ch;
  margin-inline: auto;
}

.mailing-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: calc(var(--space-3) - var(--space-1));
}

.mailing-form input,
.mailing-form button {
  margin-top: var(--space-1);
}

.mailing-form input {
  margin-right: var(--space-1);
}

.mailing-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mailing-form input[type="email"] {
  flex: 1 1 220px;
  padding: 0.75em 1em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--step-0);
  font-family: inherit;
}

.mailing-note {
  font-size: var(--step--1);
  color: var(--text-secondary);
  margin-top: var(--space-2);
}

/* ---------- Social row ---------- */
.social-row {
  display: flex;
  justify-content: center;
  padding-block: var(--space-4);
}

.social-row a:not(:last-child) {
  margin-right: var(--space-2);
}

.social-row a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  text-decoration: none;
}

.social-row a svg {
  display: block;
}

.social-row a:hover {
  background: var(--navy);
  color: var(--white);
}

/* ---------- Donate banner ---------- */
.donate-banner {
  position: relative;
  background: var(--red);
  color: var(--white);
  text-align: center;
  padding-block: var(--space-5);
  overflow: hidden;
}

.donate-banner .ribbon {
  position: absolute;
  width: 40%;
  height: 60%;
  min-height: 100px;
  background: var(--navy);
  transform: rotate(6deg);
  left: -10%;
  bottom: -20%;
}

.donate-banner .wrapper {
  position: relative;
}

.donate-banner p {
  max-width: 50ch;
  margin-inline: auto;
  font-weight: 700;
  font-size: var(--step-1);
}

/* ---------- Policy detail pages ---------- */
.page-hero {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--navy);
  color: var(--white);
}

@media (min-width: 860px) {
  .page-hero {
    grid-template-columns: 1.15fr 1fr;
  }
}

.page-hero-copy {
  padding-block: var(--space-5);
  /* Matches where .wrapper's own left edge lands once it's centred
     within max-width — the hero's text sits in a narrower grid
     column, so it can't use .wrapper's own centring directly; this
     calculates the same effective left inset so the heading lines
     up with the body text below it. */
  padding-left: var(--space-3);
  padding-left: max(var(--space-3), calc((100vw - var(--max-width)) / 2 + var(--space-3)));
  padding-right: var(--space-3);
}

@media (min-width: 640px) {
  .page-hero-copy {
    padding-left: var(--space-4);
    padding-left: max(var(--space-4), calc((100vw - var(--max-width)) / 2 + var(--space-4)));
    padding-right: var(--space-4);
  }
}

.page-hero-media {
  position: relative;
  background: var(--red);
  overflow: hidden;
  min-height: 140px;
  display: none;
}

@media (min-width: 860px) {
  .page-hero-media {
    display: block;
  }
}

.page-hero-media .ribbon {
  position: absolute;
  z-index: 1;
  width: 55%;
  height: 45%;
  min-height: 100px;
  background: var(--navy);
  transform: rotate(-9deg);
  right: -15%;
  bottom: -20%;
}

.page-hero .eyebrow {
  color: var(--pink-tint);
  font-weight: 700;
  font-size: var(--step--1);
}

.page-hero h1 {
  color: var(--white);
}

.breadcrumbs {
  font-size: var(--step--1);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  padding: 0;
  margin: 0 0 var(--space-2);
}

.breadcrumbs a {
  color: #c9d3e3;
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4em;
  color: #6c7fa0;
}

.policy-body {
  max-width: 68ch;
  margin-inline: auto;
  padding-block: var(--space-5);
}

/* Used on Meet Adam and the SDP-plan (vision) pages only — roughly
   double the usual reading column width for these two pages. */
.policy-body-wide {
  max-width: 136ch;
}

.policy-body p {
  max-width: none;
  font-size: var(--step-0);
}

/* ---------- Policies page: jump nav + sections ---------- */

/* Sticky-header offset for anchor jumps, so a linked section's
   heading doesn't end up hidden behind the sticky nav bar. */
html {
  scroll-behavior: smooth;
}

.policy-jumpnav,
.policy-section {
  scroll-margin-top: 120px;
}

.policy-jumpnav {
  position: sticky;
  top: 64px;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.policy-jumpnav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: var(--space-2) 0 var(--space-1);
}

.policy-jumpnav li {
  margin: 0 var(--space-1) var(--space-1);
}

.policy-jumpnav a {
  display: inline-block;
  padding: 0.5em 1.1em;
  border: 2px solid var(--navy);
  border-radius: 999px;
  color: var(--navy);
  font-weight: 700;
  font-size: var(--step--1);
  text-decoration: none;
}

.policy-jumpnav a:hover,
.policy-jumpnav a:focus-visible {
  background: var(--navy);
  color: var(--white);
}

.policy-section {
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--border);
}

.policy-section-alt {
  background: var(--cream);
}

.policy-section-inner {
  max-width: 136ch;
}

.policy-eyebrow {
  color: var(--red);
  font-weight: 700;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-1);
}

.policy-section h2 {
  font-size: var(--step-3);
  margin-bottom: var(--space-3);
}

.policy-section p:not(.policy-eyebrow) {
  font-size: var(--step-0);
  max-width: none;
}

.back-to-top {
  display: inline-block;
  margin-top: var(--space-2);
  font-weight: 700;
  font-size: var(--step--1);
  text-decoration: none;
}

.back-to-top:hover {
  text-decoration: underline;
}

/* Placeholder policy section — visually distinct so it reads clearly
   as "not written yet" rather than a thin/finished policy. */

/* ---------- Site footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: #c9d3e3;
  padding-block: var(--space-4);
  font-size: var(--step--1);
}

.site-footer a {
  color: #c9d3e3;
}

.site-footer .wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.site-footer .wrapper > * {
  margin: var(--space-1) var(--space-2) var(--space-1) 0;
}

/* ---------- Print styles ---------- */
@media print {
  .site-header,
  .donate-banner,
  .mailing-list,
  .social-row {
    display: none;
  }
}

/* ---------- Footer link button (e.g. "Cookie preferences") ---------- */
.link-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  opacity: 0.85;
}

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  background: var(--white);
  border-top: 2px solid var(--navy);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.15);
}

.cookie-banner:focus {
  outline: none;
}

.cookie-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-3);
}

.cookie-banner-inner p {
  margin: 0;
  max-width: 62ch;
  font-size: var(--step--1);
  color: var(--text-secondary);
}

.cookie-banner-inner a {
  color: var(--navy);
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cookie-banner-actions button:not(:last-child) {
  margin-right: var(--space-2);
}

.btn-cookie-accept,
.btn-cookie-reject {
  font-family: inherit;
  font-weight: 700;
  font-size: var(--step--1);
  padding: 0.7em 1.4em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  line-height: 1;
  border: 2px solid var(--navy);
}

.btn-cookie-accept {
  background: var(--navy);
  color: var(--white);
}

.btn-cookie-reject {
  background: transparent;
  color: var(--navy);
}

.btn-cookie-accept:hover {
  background: var(--navy-dark);
}

.btn-cookie-reject:hover {
  background: rgba(12, 42, 82, 0.06);
}

/* ---------- Simple data table (used on the Cookies page) ---------- */
.data-table-wrap {
  overflow-x: auto;
  margin-block: var(--space-3);
}

.data-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: var(--step--1);
}

.data-table caption {
  text-align: left;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--space-2);
}

.data-table th,
.data-table td {
  border: 1px solid var(--border);
  padding: var(--space-2);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--cream);
  color: var(--navy);
}

/* ---------- Bio page (Meet Adam) ---------- */
.bio-photo {
  float: right;
  width: 42%;
  max-width: 280px;
  margin: 0 0 var(--space-3) var(--space-4);
  border-radius: var(--radius);
}

@media (max-width: 640px) {
  .bio-photo {
    float: none;
    width: 100%;
    max-width: 360px;
    margin: 0 auto var(--space-4);
    display: block;
  }
}

.bio-signoff {
  clear: both;
  margin-top: var(--space-3);
  font-family: "Alex Brush", "Brush Script MT", cursive;
  font-weight: 400;
  font-size: 6rem;
  line-height: 1;
  color: var(--navy);
}

.policy-body p.bio-signoff {
  font-size: calc(var(--step-0) * 3);
}

/* ---------- Responsive video embed (portrait, for the YouTube Short) ----------
   Uses the padding-top percentage technique rather than aspect-ratio, since
   it works in every browser (including much older ones), not just recent
   ones — consistent with the rest of this site's compatibility approach. */
.video-embed {
  max-width: 360px;
  margin: var(--space-4) auto;
}

.video-embed-frame {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 177.78%; /* 9:16 portrait */
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}

.video-embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Share this page ----------
   A slim, centred strip at the bottom of each page, just above the donate banner. Deliberately
   NOT outlined pills — those belong to the jump links on the policies page. */
.share-bar {
  position: relative;
  z-index: 60; /* keeps the "copied" note above the content it overlaps */
  background: var(--cream);
  border-top: 1px solid var(--border);
  padding-block: 4px;
}

.share-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.share-heading {
  margin: 0 var(--space-2) 0 0;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--navy);
  text-align: center;
}

.share-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.share-list li {
  display: flex; /* keeps <button> and <a> on the same baseline */
  margin: 0 2px;
}

.share-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4em 0.7em;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.share-link svg {
  display: block;
  margin-right: 0.45em;
  flex-shrink: 0;
}

.share-link-icon {
  justify-content: center;
  min-width: 44px;
  padding: 0.4em 0.6em;
}

.share-link-icon svg {
  margin-right: 0;
}

.share-link:hover,
.share-link:focus-visible {
  background: rgba(12, 42, 82, 0.09);
  text-decoration: underline;
}

.share-link[hidden],
.share-list li[hidden] {
  display: none;
}

/* "Link copied" note: floats just above the strip, so it never pushes the
   row (or the page) around. It stays in the page at all times so screen
   readers announce it; when empty it has no size, padding or background. */
.share-status {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin: 0 0 6px;
  max-width: calc(100vw - 32px);
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--navy);
  color: var(--white);
  font-size: var(--step--1);
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.share-status:empty {
  padding: 0;
  margin: 0;
  background: transparent;
  box-shadow: none;
}

/* Phones: icons only (names stay available to screen readers) so the strip
   stays one or two short rows rather than a block of text links. */
@media (max-width: 640px) {
  .share-heading {
    flex-basis: 100%;
    margin: 4px 0 0;
  }

  .share-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .share-link {
    justify-content: center;
    min-width: 44px;
    padding: 0.4em 0.5em;
  }

  .share-link svg {
    margin-right: 0;
  }
}

@media print {
  .share-bar {
    display: none;
  }
}

/* ---------- Vision page: milestones timeline + pledges ---------- */

.timeline-section,
.pledges-section {
  scroll-margin-top: 120px;
}

.timeline-section {
  padding-block: var(--space-3) var(--space-5);
}

.timeline-section > h2 {
  margin-bottom: var(--space-3);
}

.interaction[hidden] {
  display: none;
}

.timeline-rail {
  position: relative;
  display: grid;
  grid-template-columns: 90px repeat(4, minmax(0, 1fr));
  grid-column-gap: 8px;
  margin: 0 0 var(--space-3);
  padding-top: 8px;
}

.timeline-rail::before {
  content: "";
  height: 3px;
  background: var(--border);
  position: absolute;
  top: 27px;
  left: 42px;
  right: 10%;
}

.rail-fill {
  height: 3px;
  background: var(--red);
  position: absolute;
  top: 27px;
  left: 42px;
  width: 0;
  max-width: calc(90% - 42px);
  transition: width 0.25s ease;
  pointer-events: none;
}

.origin,
.milestone-tab {
  position: relative;
  z-index: 1;
  text-align: center;
}

.origin-dot,
.tab-dot {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--border);
  margin: 11px auto 12px;
}

.origin-dot {
  background: var(--navy);
  border-color: var(--navy);
}

.origin {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-secondary);
}

.origin-label {
  display: block;
  color: var(--navy);
  font-weight: 700;
}

.milestone-tab {
  font: inherit;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 0 6px 8px;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1.4;
  min-width: 0;
}

.tab-label {
  display: block;
  font-size: var(--step--1);
  font-weight: 700;
}

.tab-date {
  display: block;
  font-size: 0.8rem;
  margin-top: 3px;
}

.milestone-tab[aria-selected="true"] {
  color: var(--navy);
  background: #fbeaec;
}

.milestone-tab[aria-selected="true"] .tab-dot {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 0 5px var(--white);
}

.milestone-tab:hover .tab-dot {
  border-color: var(--red);
}

.timeline-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: var(--space-2);
}

.control {
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 44px;
  margin: 0 10px 10px 0;
}

.control:hover:not(:disabled) {
  border-color: var(--red);
  color: var(--red-dark);
}

.control:disabled {
  opacity: 0.4;
  cursor: default;
}

.control.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.control.primary:hover:not(:disabled) {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: var(--white);
}

.view-toggle {
  margin-left: auto;
  margin-right: 0;
}

.step-status {
  font-size: var(--step--1);
  color: var(--text-secondary);
  margin: 4px 0 var(--space-2);
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 67px;
  top: 20px;
  bottom: 30px;
  width: 2px;
  background: var(--border);
}

.milestone {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  grid-column-gap: 26px;
  position: relative;
  margin-bottom: 26px;
}

.milestone:last-child {
  margin-bottom: 0;
}

.milestone[hidden] {
  display: none;
}

.milestone-year {
  padding-top: 22px;
  text-align: center;
}

.milestone-year span {
  position: relative;
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  border-radius: 100px;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.milestone-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px 34px;
  overflow: hidden;
}

.milestone-photo {
  margin: -30px -34px 24px;
  background: var(--white);
}

.milestone-photo img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.milestone-photo.photo-1 img { object-position: 50% 60%; }
.milestone-photo.photo-2 img { object-position: 50% 50%; }
.milestone-photo.photo-3 img { object-position: 50% 55%; }
.milestone-photo.photo-4 img { object-position: 50% 50%; }

.milestone-panel > h3 {
  font-size: var(--step-2);
  margin-bottom: var(--space-3);
}

.milestone-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column-gap: 30px;
  grid-row-gap: 22px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.milestone-points li {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  min-width: 0;
}

.milestone-points h4 {
  font-size: var(--step-0);
  color: var(--navy);
  margin: 0 0 0.45rem;
}

.milestone-points p {
  margin: 0;
  line-height: 1.6;
}

/* Interactive mode: one milestone at a time */
.timeline-section.is-interactive .timeline::before {
  display: none;
}

.timeline-section.is-interactive:not(.show-all) .milestone {
  display: block;
  margin: 0;
}

.timeline-section.is-interactive:not(.show-all) .milestone[hidden] {
  display: none;
}

.timeline-section.is-interactive:not(.show-all) .milestone-year {
  display: none;
}

.timeline-section.is-interactive:not(.show-all) .milestone-panel {
  border-top: 4px solid var(--red);
  animation: panel-in 0.22s ease-out;
}

.timeline-section.show-all .rail-fill {
  display: none;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pledges */
.pledges-section {
  background: var(--cream);
  border-block: 1px solid var(--border);
  padding-block: var(--space-5);
}

.pledges-section h2 {
  margin-bottom: var(--space-3);
}

.pledges {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column-gap: 16px;
  grid-row-gap: 16px;
}

.pledges > li {
  display: flex;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--white);
  min-width: 0;
}

.pledge-number {
  flex: 0 0 2.2rem;
  margin-right: 18px;
  color: var(--red);
  font-weight: 800;
  font-size: var(--step-1);
  line-height: 1.4;
}

.pledges p {
  margin: 0;
  line-height: 1.6;
  min-width: 0;
}

@media (max-width: 760px) {
  .timeline-rail {
    grid-template-columns: 52px repeat(4, minmax(0, 1fr));
    grid-column-gap: 2px;
  }
  .timeline-rail::before,
  .rail-fill { left: 25px; }
  .tab-date { font-size: 0.75rem; }
  .milestone-tab { padding-inline: 2px; }
  .view-toggle { margin-left: 0; }
  .control { padding: 0.65rem 0.8rem; margin-right: 8px; }

  .milestone { grid-template-columns: 1fr; margin-bottom: 24px; }
  .timeline::before { display: none; }
  .milestone-year { text-align: left; padding-top: 0; margin-bottom: 10px; }
  .milestone-panel { padding: 24px; }
  .milestone-photo { margin: -24px -24px 20px; }
  .milestone-photo img { height: 220px; }
  .milestone-points { grid-template-columns: 1fr; grid-row-gap: 18px; }
  .timeline-section.is-interactive:not(.show-all) .milestone-panel { padding: 22px; }
  .timeline-section.is-interactive:not(.show-all) .milestone-photo { margin: -22px -22px 20px; }
  .milestone-tab[aria-selected="true"] { background: transparent; }
  .pledges { grid-template-columns: 1fr; }
  .pledges > li { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .rail-fill { transition: none; }
  .timeline-section.is-interactive:not(.show-all) .milestone-panel { animation: none; }
}

@media print {
  .interaction { display: none; }
  .timeline-section.is-interactive .milestone,
  .timeline-section.is-interactive .milestone[hidden] {
    display: grid;
    grid-template-columns: 90px 1fr;
    margin-bottom: 20px;
  }
  .timeline-section.is-interactive .milestone-year { display: block; }
  .milestone, .pledges > li { break-inside: avoid; }
  .milestone-photo { display: none; }
}

.pledge-content {
  flex: 1;
  min-width: 0;
}
