:root {
  --page: #faf9f7;
  --surface: #ffffff;
  --surface-alt: #ecebe9;
  --text: #0a0a0a;
  --muted: #6b6b6b;
  --accent: #b15f2c;
  --accent-alt: #cf8047;
  --line: #e6e5e2;
  --radius: 18px;
  --radius-sm: 10px;
  --section-space: clamp(4rem, 8vw, 7rem);
  --rail-width: 280px;
  --font-display: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  line-height: 1.65;
  font-family: var(--font-body);
  background: var(--page);
  color: var(--text);
}

body.donor-layout-tripc86-top {
  --page: #faf9f7;
  --surface: #ffffff;
  --text: #0a0a0a;
  --muted: #6b6b6b;
  --accent: #b15f2c;
  --accent-alt: #cf8047;
  background:
    linear-gradient(180deg, rgba(177, 95, 44, 0.04) 0%, transparent 28%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 48px,
      rgba(177, 95, 44, 0.03) 48px,
      rgba(177, 95, 44, 0.03) 49px
    ),
    var(--page);
  color: var(--text);
}

body, button, input, select, textarea { font: inherit; }

a { color: inherit; text-decoration: none; }

img, svg, video, canvas, iframe {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.8vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
  font-weight: 700;
}

h3 {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.25;
  font-weight: 650;
}

p { color: var(--muted); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, var(--page));
}

.header-inner {
  width: min(1080px, calc(100% - 2rem));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  font-weight: 750;
}

.brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.brand-logo svg {
  width: 100%;
  height: 100%;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.page-shell {
  min-height: 100vh;
}

.page-grid {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  align-items: start;
  gap: 0;
}

.rail-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, var(--page));
  backdrop-filter: blur(10px);
  z-index: 40;
}

.rail-nav .site-header {
  position: static;
  height: 100%;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.rail-nav .header-inner {
  width: 100%;
  min-height: 100%;
  padding: 1.75rem 1.25rem;
  flex-direction: column;
  align-items: stretch;
  gap: 2rem;
}

.rail-nav .brand {
  white-space: normal;
  font-size: 1.05rem;
}

.rail-nav .brand-logo {
  width: 56px;
  height: 56px;
  flex-basis: 56px;
}

.rail-nav .site-header nav {
  margin-left: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.rail-nav .site-header nav a {
  font-size: 0.82rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  white-space: normal;
}

.rail-nav .site-header nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.rail-nav .header-cta {
  margin-top: auto;
  width: 100%;
  text-align: center;
}

.page-flow {
  min-width: 0;
}

.page-flow main {
  display: flex;
  flex-direction: column;
}

.layout-band {
  position: relative;
}

.layout-band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
}

.section-inner {
  width: min(1080px, calc(100% - clamp(1.5rem, 4vw, 3rem)));
  margin: 0 auto;
}

.eyebrow,
.section-kicker {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.lead {
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  max-width: 54ch;
  color: var(--text);
}

.hero {
  padding: clamp(2.5rem, 5vw, 4rem) 0 var(--section-space);
}

.layout-hero-stack .hero-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 4vw, 3rem);
}

.layout-hero-stack .hero-visual {
  order: -1;
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 9;
  min-height: 320px;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  box-shadow: 0 24px 60px rgba(10, 10, 10, 0.08);
}

.layout-hero-stack .hero-copy {
  display: grid;
  gap: 0.25rem;
  max-width: 68ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1rem;
}

.geo-line {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.button,
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.82rem 1.35rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button-primary,
.header-cta {
  background: var(--accent);
  color: #fff;
}

.button-primary:hover,
.header-cta:hover {
  background: var(--accent-alt);
  transform: translateY(-1px);
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.section {
  padding: var(--section-space) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 760px;
  margin-bottom: clamp(1.75rem, 3vw, 2.75rem);
}

.section-heading > p {
  font-size: 1.02rem;
}

.layout-timeline .process-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  position: relative;
}

.layout-timeline .process-list::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 20%, transparent));
}

.layout-timeline .process-list li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.35rem 0 1.35rem 0.5rem;
  background: transparent;
  border-radius: 0;
  border-bottom: 1px dashed var(--line);
}

.layout-timeline .step-icon {
  margin: 0;
  z-index: 1;
  background: var(--surface);
}

.layout-bento .cards-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.layout-bento .cards-grid .card:nth-child(1) { grid-column: span 7; }
.layout-bento .cards-grid .card:nth-child(2) { grid-column: span 5; }
.layout-bento .cards-grid .card:nth-child(3) { grid-column: span 4; }
.layout-bento .cards-grid .card:nth-child(4) { grid-column: span 4; }
.layout-bento .cards-grid .card:nth-child(5) { grid-column: span 4; }

.layout-mosaic .cards-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.layout-mosaic .cards-grid .card:nth-child(-n+2) { grid-column: span 3; }
.layout-mosaic .cards-grid .card:nth-child(n+3) { grid-column: span 2; }

.layout-zigzag .cards-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.layout-zigzag .card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.layout-zigzag .cards-grid .card:nth-child(even) {
  grid-template-columns: minmax(0, 1fr) auto;
}

.layout-zigzag .cards-grid .card:nth-child(even) .card-icon {
  order: 2;
}

.card {
  min-width: 0;
  padding: 1.45rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
  box-shadow: 0 16px 40px rgba(10, 10, 10, 0.06);
  transform: translateY(-2px);
}

.card p { margin-bottom: 0; }

.card-icon,
.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 12px;
  flex-shrink: 0;
}

.card-icon svg,
.step-icon svg {
  width: 26px;
  height: 26px;
}

.card-label {
  display: block;
  color: var(--accent);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.55rem;
}

.card small {
  display: block;
  color: var(--muted);
  margin-top: 0.45rem;
  font-size: 0.88rem;
}

.layout-editorial-geo .geo-chips {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.layout-editorial-geo .geo-chip {
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border-left: 4px solid var(--accent);
  box-shadow: inset 0 0 0 1px var(--line);
}

.layout-editorial-geo .geo-chip strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 0.55rem;
}

.layout-editorial-geo .geo-chip span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.layout-magazine .section-inner {
  width: min(980px, calc(100% - clamp(1.5rem, 4vw, 3rem)));
}

.layout-magazine .guide-body {
  column-count: 2;
  column-gap: 2.5rem;
}

.layout-magazine .chapter {
  break-inside: avoid;
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}

.layout-magazine .chapter li {
  color: var(--muted);
  margin: 0.45rem 0;
}

.layout-split-faq .section-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.layout-split-faq .section-heading {
  margin-bottom: 0;
}

.layout-split-faq .faq-list {
  max-width: none;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 0.95rem 0;
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
}

.faq-list p {
  padding-right: 0.5rem;
}

.layout-form-panel .contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 1rem;
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(10, 10, 10, 0.05);
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--page);
  color: var(--text);
  padding: 0.82rem 0.9rem;
  border-radius: var(--radius-sm);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.form-message {
  color: var(--accent);
  margin: 0;
}

.site-footer {
  padding: 3.5rem 0 4rem;
  background: color-mix(in srgb, var(--surface-alt) 70%, var(--page));
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  font-size: 1.35rem;
}

.site-footer a {
  display: block;
  color: var(--muted);
  margin: 0.35rem 0;
}

.site-footer a:hover {
  color: var(--accent);
}

.icon-draw path { stroke-dasharray: 34 8; animation: iconDraw 10s linear infinite; }
.icon-pulse { transform-box: fill-box; transform-origin: center; animation: iconPulse 10s ease-in-out infinite; }
.icon-slide { animation: iconSlide 10s ease-in-out infinite; }
.icon-spin { transform-box: fill-box; transform-origin: center; animation: iconSpin 10s linear infinite; }

@keyframes iconDraw { to { stroke-dashoffset: -84; } }
@keyframes iconPulse { 50% { transform: scale(0.88); opacity: 0.72; } }
@keyframes iconSlide { 50% { transform: translateX(3px); } }
@keyframes iconSpin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .page-grid {
    grid-template-columns: 1fr;
  }

  .rail-nav {
    position: sticky;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-nav .header-inner {
    min-height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .rail-nav .site-header nav {
    flex-direction: row;
    flex-wrap: wrap;
    order: 3;
    width: 100%;
  }

  .rail-nav .header-cta {
    margin-top: 0;
    margin-left: auto;
    width: auto;
  }

  .layout-bento .cards-grid,
  .layout-mosaic .cards-grid {
    grid-template-columns: 1fr;
  }

  .layout-bento .cards-grid .card,
  .layout-mosaic .cards-grid .card {
    grid-column: span 1 !important;
  }

  .layout-magazine .guide-body {
    column-count: 1;
  }

  .layout-split-faq .section-inner,
  .layout-form-panel .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  h1 { font-size: clamp(2rem, 10vw, 2.8rem); }

  .layout-hero-stack .hero-visual {
    min-height: 240px;
    aspect-ratio: 4 / 3;
  }

  .layout-zigzag .card,
  .layout-zigzag .cards-grid .card:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .layout-zigzag .cards-grid .card:nth-child(even) .card-icon {
    order: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button,
  .header-cta {
    width: 100%;
  }
}

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

  .card-icon,
  .step-icon,
  .card-icon svg,
  .step-icon svg,
  .card-icon path,
  .step-icon path,
  .card {
    animation: none !important;
    transition: none !important;
  }

  .button-primary:hover,
  .header-cta:hover,
  .card:hover {
    transform: none;
  }
}
