/*
 * ============================================================
 *  PELICAN DIGITAL PATHWAYS — BASE STYLES & COMPONENTS
 *  Design System: Pathways v1.1
 * ============================================================
 *
 *  Sections:
 *    1.  Reset
 *    2.  Base Elements
 *    3.  Typography Defaults
 *    4.  Focus & Selection
 *    5.  Layout Utilities
 *    6.  Component: Buttons
 *    7.  Component: Badges
 *    8.  Component: Cards
 *    9.  Component: Dividers
 *   10.  Component: Labels / Eyebrow
 *   11.  Component: Navigation
 *   12.  Component: Site Header
 *   13.  Component: Site Footer
 *   14.  Utilities
 *   15.  Animations
 *   16.  Responsive
 * ============================================================ */

/* ── 1. Reset ────────────────────────────────────────────── */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
}

img, svg, video { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ── 2. Base Elements ─────────────────────────────────────── */

p {
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

strong, b {
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

em, i { font-style: italic; }
small { font-size: var(--text-sm); color: var(--color-text-tertiary); }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-surface-raised);
  color: var(--color-text);
  padding: 0.1em 0.45em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  overflow-x: auto;
  line-height: var(--leading-relaxed);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-text);
  font-size: 1em;
}

blockquote {
  padding-left: var(--space-6);
  border-left: 3px solid var(--color-brand-coral);
  color: var(--color-text-secondary);
  font-style: italic;
  font-size: var(--text-lg);
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
}

/* ── 3. Typography Defaults ──────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

h1 { font-size: var(--text-5xl); font-weight: var(--weight-extrabold); letter-spacing: var(--tracking-tighter); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl);  font-weight: var(--weight-semibold); }
h6 { font-size: var(--text-lg);  font-weight: var(--weight-semibold); }

/* ── 4. Focus & Selection ────────────────────────────────── */

/* WCAG 2.1 AA — non-color-only, visible against all backgrounds */
:focus-visible {
  outline: 2px solid var(--color-text-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) { outline: none; }

::selection {
  background-color: var(--tint-blue-strong);
  color: var(--color-text-accent);
}

/* ── 5. Layout Utilities ─────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--sm      { max-width: var(--container-sm); }
.container--md      { max-width: var(--container-md); }
.container--lg      { max-width: var(--container-lg); }
.container--content { max-width: var(--container-content); }

.section     { padding-block: var(--space-24); }
.section--sm { padding-block: var(--space-16); }
.section--lg { padding-block: var(--space-32); }

/* ── 6. Component: Buttons ───────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.6875rem var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--duration-base) var(--ease-out),
    border-color     var(--duration-base) var(--ease-out),
    color            var(--duration-base) var(--ease-out),
    box-shadow       var(--duration-base) var(--ease-out),
    transform        var(--duration-base) var(--ease-spring);
  text-decoration: none;
  user-select: none;
}

.btn:active { transform: translateY(1px) !important; }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary — dark on light: highest contrast, authoritative */
.btn--primary {
  background: var(--color-text);
  color: var(--color-text-inverse);
  border-color: var(--color-text);
}

.btn--primary:hover {
  background: #2d2724;
  border-color: #2d2724;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Coral outline — warm accent, use for expressive/branded CTAs on light bg */
.btn--coral {
  background: transparent;
  color: var(--color-brand-coral-dark);
  border-color: var(--color-brand-coral-dark);
}

.btn--coral:hover {
  background: var(--tint-coral);
  box-shadow: var(--glow-coral-sm);
  transform: translateY(-1px);
}

/* Blue outline — interaction layer, use for secondary interactive actions on light bg */
.btn--blue {
  background: var(--color-bg);
  color: var(--color-text-accent);
  border-color: var(--color-text-accent);
}

.btn--blue:hover {
  background: var(--tint-blue);
  box-shadow: var(--glow-blue-sm);
  transform: translateY(-1px);
}

/* On dark surfaces — brand coral is accessible here (4.6:1 on dark) */
.btn--coral-solid {
  background: var(--color-brand-coral);
  color: var(--color-text-on-brand);
  border-color: var(--color-brand-coral);
}

.btn--coral-solid:hover {
  background: var(--color-brand-coral-light);
  border-color: var(--color-brand-coral-light);
  box-shadow: 0 4px 20px rgba(255, 58, 26, 0.35);
  transform: translateY(-1px);
}

/* Ghost */
.btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: var(--color-border-strong);
}

.btn--ghost:hover {
  background: var(--color-surface-raised);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

/* On dark inverse sections */
.btn--inverse {
  background: transparent;
  color: var(--color-text-inverse);
  border-color: rgba(240, 236, 231, 0.4);
}

.btn--inverse:hover {
  background: rgba(240, 236, 231, 0.12);
  border-color: rgba(240, 236, 231, 0.7);
}

/* Cream outline so focus ring is visible on dark surfaces */
.btn--inverse:focus-visible,
.btn--coral-solid:focus-visible {
  outline: 2px solid rgba(240, 236, 231, 0.9);
  outline-offset: 3px;
}

/* Sizes */
.btn--sm  { padding: 0.4375rem var(--space-4); font-size: var(--text-xs); }
.btn--lg  { padding: 0.9375rem var(--space-8); font-size: var(--text-base); }
.btn--xl  { padding: 1.125rem  var(--space-10); font-size: var(--text-lg); }

/* ── 7. Component: Badges ────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.2em var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  line-height: 1.6;
}

.badge--coral {
  background: var(--tint-coral);
  color: var(--color-brand-coral-dark);
  border-color: rgba(204, 46, 20, 0.20);
}

.badge--orange {
  background: var(--tint-orange);
  color: var(--color-brand-orange-dark);
  border-color: rgba(217, 112, 16, 0.22);
}

.badge--neutral {
  background: var(--color-surface-raised);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

.badge--success {
  background: rgba(26, 122, 74, 0.07);
  color: var(--color-success);
  border-color: rgba(26, 122, 74, 0.18);
}

/* ── 8. Component: Cards ─────────────────────────────────── */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
}

.card--sm { padding: var(--space-6); border-radius: var(--radius-xl); }
.card--lg { padding: var(--space-10); }

.card--interactive {
  transition:
    border-color var(--duration-base) var(--ease-out),
    box-shadow   var(--duration-base) var(--ease-out),
    transform    var(--duration-base) var(--ease-out);
  cursor: pointer;
}

.card--interactive:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card--accent-coral  { border-left: 3px solid var(--color-brand-coral); }
.card--accent-orange { border-left: 3px solid var(--color-brand-orange); }

.card--lifted {
  box-shadow: var(--shadow-sm);
  border-color: transparent;
}

.card--lifted:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

/* ── 9. Component: Dividers ──────────────────────────────── */

.divider {
  height: 1px;
  background: var(--color-border);
  border: none;
  margin-block: var(--space-8);
}

.divider--coral {
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-brand-coral) 40%,
    var(--color-brand-orange) 100%
  );
  height: 2px;
  border: none;
}

/* ── 10. Component: Labels / Eyebrow ─────────────────────── */

/* Eyebrow / section label — interaction blue, informational marker */
.label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-accent);
}

.label--orange { color: var(--color-brand-orange-dark); }
.label--muted  { color: var(--color-text-tertiary); }
.label--inverse { color: var(--color-brand-coral-light); } /* for dark sections */

/* ── 11. Component: Navigation ───────────────────────────── */

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  letter-spacing: var(--tracking-wide);
  transition: color var(--duration-fast) var(--ease-out);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-brand-blue);
  transition: width var(--duration-base) var(--ease-out);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--color-text);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  width: 100%;
}

.nav-social-link {
  display: flex;
  align-items: center;
  padding-inline: var(--space-2);
  color: var(--color-text-tertiary);
  transition: color var(--duration-fast) var(--ease-out);
}

.nav-social-link:hover {
  color: var(--color-text);
}

/* ── 12. Component: Site Header ──────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  padding-block: var(--space-4);
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border-subtle);
  transition: border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.site-header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo__mark { width: 32px; height: 32px; flex-shrink: 0; }

.site-logo__name {
  font-family: var(--font-logo);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
}

.site-logo__sub {
  font-family: var(--font-logo);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-tertiary);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  line-height: 1;
}

/* ── 13. Component: Site Footer ──────────────────────────── */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-12);
  background: var(--color-surface);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.site-footer__name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

.site-footer__tagline {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: var(--space-1);
}

.site-footer__copy {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  text-align: right;
}

.site-footer__contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-3);
}

.site-footer__contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.site-footer__contact-link:hover {
  color: var(--color-text-accent);
}

.site-footer__nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-self: center;
}

.site-footer__nav-link {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.site-footer__nav-link:hover {
  color: var(--color-text-accent);
}

/* ── 14. Utilities ───────────────────────────────────────── */

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

/* Brand gradient — safe for display text (large), not body text */
.text-gradient {
  background: linear-gradient(135deg, var(--color-brand-coral) 20%, var(--color-brand-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── 15. Animations ──────────────────────────────────────── */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fade-up {
  animation: fade-up var(--duration-slow) var(--ease-out) both;
}

.animate-fade-in {
  animation: fade-in var(--duration-slow) var(--ease-out) both;
}

.delay-1 { animation-delay: 100ms; }
.delay-2 { animation-delay: 200ms; }
.delay-3 { animation-delay: 300ms; }
.delay-4 { animation-delay: 400ms; }
.delay-5 { animation-delay: 500ms; }
.delay-6 { animation-delay: 600ms; }

/* ── 16. Responsive ──────────────────────────────────────── */

@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }

  .container { padding-inline: var(--space-4); }
  .section   { padding-block: var(--space-16); }

  .nav-links  { display: none; }

  .site-footer__inner        { flex-direction: column; text-align: center; }
  .site-footer__copy         { text-align: center; }
  .site-footer__contact      { align-items: center; }
  .site-footer__nav          { align-items: center; }
}

@media (max-width: 480px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
}

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

/* ── 17. Component: Forms ────────────────────────────────── */

/* Form layout helpers */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

/* Group: label + control + help/error */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Label */
.form-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  line-height: 1;
  letter-spacing: var(--tracking-wide);
}

.form-label__required {
  color: var(--color-text-accent);
  margin-left: 3px;
  font-weight: var(--weight-bold);
}

/* Base control styles — input, textarea, select */
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  line-height: var(--leading-normal);
  transition:
    border-color var(--duration-base) var(--ease-out),
    box-shadow   var(--duration-base) var(--ease-out);
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-tertiary);
}

/* Hover */
.form-input:hover:not(:focus):not(:disabled),
.form-textarea:hover:not(:focus):not(:disabled),
.form-select:hover:not(:focus):not(:disabled) {
  border-color: var(--color-border-strong);
}

/* Focus — replaces :focus-visible to stay within the component */
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-text-accent);
  box-shadow: 0 0 0 3px rgba(30, 109, 191, 0.14);
}

/* Disabled */
.form-input:disabled,
.form-textarea:disabled,
.form-select:disabled {
  background: var(--color-surface-raised);
  color: var(--color-text-tertiary);
  border-color: var(--color-border-subtle);
  cursor: not-allowed;
}

/* ── Error state ─────────────────────────────────────────────
   Non-color indicators: border color + exclamation icon.
   WCAG 1.4.1: state is never communicated by color alone.     */

/* State icons registered on :root so they can be referenced
   with var() across multiple rules without repeating the URL. */
:root {
  --_icon-error:   url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Ccircle cx='9' cy='9' r='7.5' stroke='%23c42d0e' stroke-width='1.5'/%3E%3Cpath d='M9 5.5v4.5' stroke='%23c42d0e' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='9' cy='12.5' r='1' fill='%23c42d0e'/%3E%3C/svg%3E");
  --_icon-success: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Ccircle cx='9' cy='9' r='7.5' stroke='%231a7a4a' stroke-width='1.5'/%3E%3Cpath d='M5.5 9l2.5 2.5 4.5-5' stroke='%231a7a4a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --_icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238c8880' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.form-group--error .form-input,
.form-group--error .form-select {
  border-color: var(--color-error);
  padding-right: var(--space-10);
  background-image: var(--_icon-error);
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  background-size: 18px 18px;
}

/* Textarea: icon anchored top-right so it doesn't follow resize */
.form-group--error .form-textarea {
  border-color: var(--color-error);
  padding-right: var(--space-10);
  background-image: var(--_icon-error);
  background-repeat: no-repeat;
  background-position: right var(--space-3) top var(--space-3);
  background-size: 18px 18px;
}

.form-group--error .form-input:focus,
.form-group--error .form-textarea:focus,
.form-group--error .form-select:focus {
  box-shadow: 0 0 0 3px rgba(196, 45, 14, 0.11);
}

/* ── Success state ───────────────────────────────────────────
   Non-color indicators: border color + checkmark icon.        */

.form-group--success .form-input,
.form-group--success .form-select {
  border-color: var(--color-success);
  padding-right: var(--space-10);
  background-image: var(--_icon-success);
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  background-size: 18px 18px;
}

.form-group--success .form-textarea {
  border-color: var(--color-success);
  padding-right: var(--space-10);
  background-image: var(--_icon-success);
  background-repeat: no-repeat;
  background-position: right var(--space-3) top var(--space-3);
  background-size: 18px 18px;
}

.form-group--success .form-input:focus,
.form-group--success .form-textarea:focus,
.form-group--success .form-select:focus {
  box-shadow: 0 0 0 3px rgba(26, 122, 74, 0.11);
}

/* Restore select's chevron alongside the state icon.
   Select uses two background layers: chevron (right) + state icon (further inset). */
.form-group--error .form-select {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238c8880' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    var(--_icon-error);
  background-position: right var(--space-4) center, right var(--space-10) center;
  background-size: auto, 18px 18px;
  padding-right: calc(var(--space-10) + var(--space-8));
}

.form-group--success .form-select {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238c8880' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    var(--_icon-success);
  background-position: right var(--space-4) center, right var(--space-10) center;
  background-size: auto, 18px 18px;
  padding-right: calc(var(--space-10) + var(--space-8));
}

/* Textarea */
.form-textarea {
  resize: vertical;
  min-height: 140px;
}

/* Select — custom chevron */
.form-select {
  padding-right: var(--space-10);
  background-image: var(--_icon-chevron);
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  cursor: pointer;
}

.form-select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c42d0e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Help text */
.form-help {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  line-height: var(--leading-snug);
}

/* Error message — uses aria-live, linked via aria-describedby */
.form-error {
  font-size: var(--text-xs);
  color: var(--color-text-accent);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  display: none;
  align-items: flex-start;
  gap: var(--space-1);
}

.form-group--error .form-error {
  display: flex;
}

.form-success-msg {
  font-size: var(--text-xs);
  color: var(--color-success);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  display: none;
}

.form-group--success .form-success-msg {
  display: block;
}

/* ── Checkbox ─────────────────────────────────────────────── */

.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
}

.form-check__control {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer;
  position: relative;
  transition:
    border-color var(--duration-fast) var(--ease-out),
    background   var(--duration-fast) var(--ease-out);
}

.form-check__control:hover {
  border-color: var(--color-text-accent);
}

.form-check__control:checked {
  background: var(--color-text-accent);
  border-color: var(--color-text-accent);
}

.form-check__control:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.form-check__control:focus-visible {
  outline: 2px solid var(--color-text-accent);
  outline-offset: 2px;
}

.form-check__label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-snug);
  cursor: pointer;
  user-select: none;
}

/* ── Radio ────────────────────────────────────────────────── */

.form-radio {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
}

.form-radio__control {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  cursor: pointer;
  position: relative;
  transition:
    border-color var(--duration-fast) var(--ease-out);
}

.form-radio__control:hover {
  border-color: var(--color-text-accent);
}

.form-radio__control:checked {
  border-color: var(--color-text-accent);
}

.form-radio__control:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: var(--radius-full);
  background: var(--color-text-accent);
}

.form-radio__control:focus-visible {
  outline: 2px solid var(--color-text-accent);
  outline-offset: 2px;
}

.form-radio__label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-snug);
  cursor: pointer;
  user-select: none;
}

/* ── Engagement type picker cards ────────────────────────── */

.engagement-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.engagement-card {
  position: relative;
}

.engagement-card__input {
  /* Visually hidden but accessible */
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.engagement-card__face {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition:
    border-color var(--duration-base) var(--ease-out),
    background   var(--duration-base) var(--ease-out),
    box-shadow   var(--duration-base) var(--ease-out);
  height: 100%;
  user-select: none;
}

.engagement-card__face:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}

.engagement-card__input:checked + .engagement-card__face {
  border-color: var(--color-text-accent);
  background: var(--tint-blue);
}

.engagement-card__input:focus-visible + .engagement-card__face {
  outline: 2px solid var(--color-text-accent);
  outline-offset: 2px;
  border-radius: var(--radius-xl);
}

/* Selection indicator dot */
.engagement-card__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border-strong);
  flex-shrink: 0;
  transition: all var(--duration-fast) var(--ease-out);
  margin-bottom: var(--space-1);
}

.engagement-card__input:checked + .engagement-card__face .engagement-card__dot {
  border-color: var(--color-text-accent);
  background: var(--color-text-accent);
}

.engagement-card__title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
}

.engagement-card__desc {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  line-height: var(--leading-snug);
}

/* ── Form fieldset / legend ──────────────────────────────── */

.form-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.form-legend {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  letter-spacing: var(--tracking-wide);
  padding: 0;
  margin-bottom: var(--space-4);
}

@media (max-width: 640px) {
  .form-row          { grid-template-columns: 1fr; }
  .engagement-grid   { grid-template-columns: 1fr; }
}

/* ── 18. Component: Mobile Navigation ───────────────────────── */

/* Hamburger toggle button */
.nav-toggle {
  display: none; /* overridden to flex at ≤768px in section 16 */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  color: var(--color-text);
  flex-shrink: 0;
  transition: background var(--duration-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover {
  background: var(--color-surface-raised);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-text-accent);
  outline-offset: 2px;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform-origin: center;
  transition: transform var(--duration-base) var(--ease-in-out),
              opacity  var(--duration-fast) var(--ease-out),
              width    var(--duration-base) var(--ease-in-out);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
  width: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay container */
.mobile-nav {
  display: none; /* overridden to block at ≤768px */
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  pointer-events: none;
}

.mobile-nav[aria-hidden="false"] {
  pointer-events: auto;
}

/* Backdrop */
.mobile-nav__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 22, 20, 0.48);
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.mobile-nav[aria-hidden="false"] .mobile-nav__backdrop {
  opacity: 1;
}

/* Slide-in panel */
.mobile-nav__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--duration-slow) var(--ease-in-out);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: -8px 0 40px rgba(26, 22, 20, 0.12);
}

.mobile-nav[aria-hidden="false"] .mobile-nav__panel {
  transform: translateX(0);
}

/* Panel header: logo + close button */
.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
}

.mobile-nav__logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  gap: 1px;
}

.mobile-nav__logo-name {
  font-family: var(--font-logo);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
}

.mobile-nav__logo-sub {
  font-family: var(--font-logo);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-tertiary);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  line-height: 1.2;
}

.mobile-nav__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition: background var(--duration-fast) var(--ease-out),
              color    var(--duration-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav__close:hover {
  background: var(--color-surface-raised);
  color: var(--color-text);
}

.mobile-nav__close:focus-visible {
  outline: 2px solid var(--color-text-accent);
  outline-offset: 2px;
}

/* Nav link list */
.mobile-nav__links {
  display: flex;
  flex-direction: column;
  padding: var(--space-3) 0;
  flex: 1;
}

.mobile-nav__link {
  display: block;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  letter-spacing: var(--tracking-tight);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color        var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              background   var(--duration-fast) var(--ease-out);
}

.mobile-nav__link:hover,
.mobile-nav__link[aria-current="page"] {
  color: var(--color-text);
  background: var(--color-surface-raised);
  border-left-color: var(--color-brand-coral);
}

.mobile-nav__link:focus-visible {
  outline: 2px solid var(--color-text-accent);
  outline-offset: -3px;
}

.mobile-nav__link--social {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xl);
}

/* CTA at panel bottom */
.mobile-nav__cta {
  padding: var(--space-5);
  border-top: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
}

.mobile-nav__cta .btn {
  width: 100%;
  justify-content: center;
}

/* Prevent body scroll while nav is open */
body.nav-open {
  overflow: hidden;
}

/* Show toggle + overlay on mobile */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .mobile-nav { display: block; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .mobile-nav__backdrop,
  .mobile-nav__panel,
  .nav-toggle__bar {
    transition-duration: 0.01ms !important;
  }
}

/* ── 20. Component: Alerts ──────────────────────────────────
 *
 *  .alert            — page-level full-width banner
 *  .alert-inline     — card-width inline contextual alert
 *
 *  Variants: --info  --success  --warning  --error
 *
 *  Non-color principle: every variant pairs a distinct icon AND
 *  a visible text label with its accent color — never color alone.
 *
 *  Dismiss: JS adds .alert--dismissing / .alert-inline--dismissing
 *  which collapses max-height + fades opacity, then sets [hidden].
 * ─────────────────────────────────────────────────────────── */

/* Default token values (overridden by variant modifiers below) */
.alert,
.alert-inline {
  --_accent: var(--color-text-secondary);
  --_bg:     var(--color-surface-raised);
  --_border: var(--color-border);
}

/* Variant tokens */
.alert--info,    .alert-inline--info    { --_accent: var(--color-info);    --_bg: #eff3fd; --_border: #c2d5f8; }
.alert--success, .alert-inline--success { --_accent: var(--color-success); --_bg: #edf7f1; --_border: #afd9c4; }
.alert--warning, .alert-inline--warning { --_accent: var(--color-warning); --_bg: #fef6e6; --_border: #f0d48a; }
.alert--error,   .alert-inline--error   { --_accent: var(--color-error);   --_bg: #fef0ec; --_border: #f5c2b5; }

/* ── Page-level banner ──────────────────────────────────── */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  background: var(--_bg);
  border-left: 4px solid var(--_accent);
  overflow: hidden;
  max-height: 300px;
  transition:
    max-height 0.4s var(--ease-in-out),
    opacity    0.25s var(--ease-out),
    padding    0.4s var(--ease-in-out),
    margin     0.4s var(--ease-in-out),
    border-width 0.4s var(--ease-in-out);
}

/* ── Inline alert ───────────────────────────────────────── */

.alert-inline {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--_bg);
  border: 1px solid var(--_border);
  border-left: 4px solid var(--_accent);
  border-radius: var(--radius-xl);
  overflow: hidden;
  max-height: 200px;
  transition:
    max-height 0.4s var(--ease-in-out),
    opacity    0.25s var(--ease-out),
    padding    0.4s var(--ease-in-out),
    margin     0.4s var(--ease-in-out),
    border-width 0.4s var(--ease-in-out);
}

/* ── Shared inner elements ──────────────────────────────── */

/* Icon (20 × 20) */
.alert__icon,
.alert-inline__icon {
  flex-shrink: 0;
  color: var(--_accent);
  width: 20px;
  height: 20px;
  margin-top: 2px; /* optical alignment with first line of text */
}

/* Content wrapper */
.alert__content,
.alert-inline__content {
  flex: 1;
  min-width: 0;
}

/* Label — Syne bold all-caps, accent colored */
.alert__label,
.alert-inline__label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--_accent);
  margin-bottom: var(--space-1);
  line-height: 1;
}

/* Title (banner only — optional strong summary line) */
.alert__title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  line-height: var(--leading-snug);
  margin: 0;
}

.alert__title + .alert__message {
  margin-top: var(--space-1);
}

/* Message body */
.alert__message,
.alert-inline__message {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* Dismiss (×) button */
.alert__dismiss,
.alert-inline__dismiss {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: var(--space-2);
  border-radius: var(--radius-md);
  color: var(--color-text-tertiary);
  transition: background var(--duration-fast) var(--ease-out),
              color    var(--duration-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.alert__dismiss:hover,
.alert-inline__dismiss:hover {
  background: rgba(0, 0, 0, 0.07);
  color: var(--color-text);
}

.alert__dismiss:focus-visible,
.alert-inline__dismiss:focus-visible {
  outline: 2px solid var(--_accent);
  outline-offset: 2px;
}

/* ── Dismiss animation (JS adds this class) ─────────────── */

.alert--dismissing,
.alert-inline--dismissing {
  max-height: 0 !important;
  opacity: 0;
  padding-top:    0 !important;
  padding-bottom: 0 !important;
  margin-top:     0 !important;
  margin-bottom:  0 !important;
  border-top-width:    0 !important;
  border-bottom-width: 0 !important;
}

/* ── 19. Component: Prose ────────────────────────────────────
 *
 *  Scope: .prose
 *  All styles are scoped so they never bleed into the UI layer.
 *  Designed for article / long-form content bodies.
 * ──────────────────────────────────────────────────────────── */

/* ── Spacing rhythm ─────────────────────────────────────── */

.prose > * + * {
  margin-top: var(--space-5);
}

.prose > h2 { margin-top: var(--space-14); }
.prose > h3 { margin-top: var(--space-10); }
.prose > h4 { margin-top: var(--space-8);  }
.prose > h5,
.prose > h6 { margin-top: var(--space-6);  }

/* Tighten spacing between a heading and what follows it */
.prose > h2 + *,
.prose > h3 + *,
.prose > h4 + *,
.prose > h5 + *,
.prose > h6 + * { margin-top: var(--space-3); }

/* First child never has leading space */
.prose > *:first-child { margin-top: 0; }

/* ── Headings ───────────────────────────────────────────── */

.prose h2 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

.prose h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

.prose h4 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text);
}

.prose h5 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.prose h6 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

/* ── Paragraphs ─────────────────────────────────────────── */

.prose p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

/* Lead / standfirst — larger opening paragraph */
.prose .lead {
  font-size: var(--text-xl);
  font-weight: var(--weight-light);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

/* ── Inline links ───────────────────────────────────────── */

.prose a {
  color: var(--color-text-accent);
  text-decoration: underline;
  text-decoration-color: rgba(30, 109, 191, 0.35);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color var(--duration-fast) var(--ease-out);
}

.prose a:hover {
  text-decoration-color: var(--color-text-accent);
}

.prose a:visited {
  color: #7d3b28; /* terracotta — distinct from active coral, 4.8:1 on cream */
  text-decoration-color: rgba(125, 59, 40, 0.35);
}

.prose a:visited:hover {
  text-decoration-color: #7d3b28;
}

/* ── Unordered lists ────────────────────────────────────── */

.prose ul {
  padding-left: var(--space-5);
}

.prose ul li {
  position: relative;
  list-style: none;
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  padding-left: var(--space-3);
}

.prose ul li + li {
  margin-top: var(--space-2);
}

/* Coral filled dot — decorative, not text, so brand coral is fine */
.prose ul li::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-2));
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: var(--color-brand-coral);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Nested lists */
.prose ul ul {
  margin-top: var(--space-2);
  padding-left: var(--space-5);
}

.prose ul ul li::before {
  background: transparent;
  border: 1.5px solid var(--color-border);
  width: 5px;
  height: 5px;
}

/* ── Ordered lists ──────────────────────────────────────── */

.prose ol {
  padding-left: var(--space-8);
  counter-reset: prose-ol;
}

.prose ol li {
  position: relative;
  list-style: none;
  counter-increment: prose-ol;
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  padding-left: var(--space-2);
}

.prose ol li + li {
  margin-top: var(--space-2);
}

.prose ol li::before {
  content: counter(prose-ol);
  position: absolute;
  left: calc(-1 * var(--space-7));
  top: 0;
  width: var(--space-5);
  text-align: right;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text-accent);
  line-height: var(--leading-relaxed);
}

/* ── Blockquote — editorial pull-quote treatment ────────── */

.prose blockquote {
  position: relative;
  margin-top: var(--space-10);
  margin-bottom: var(--space-10);
  padding: var(--space-6) var(--space-8);
  border-left: 4px solid var(--color-brand-coral); /* decorative */
  background: var(--color-surface-raised);
  border-radius: 0 var(--radius-2xl) var(--radius-2xl) 0;
}

.prose blockquote > p {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  font-style: italic;
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  margin-top: 0;
}

.prose blockquote cite {
  display: block;
  margin-top: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-tertiary);
}

.prose blockquote cite::before {
  content: '— ';
}

/* ── Inline code ────────────────────────────────────────── */

/* .prose code inherits base code styles; these are overrides */
.prose :not(pre) > code {
  font-size: 0.875em;
  background: color-mix(in srgb, var(--color-brand-coral) 6%, var(--color-surface-raised));
  color: var(--color-text-accent);
  border-color: color-mix(in srgb, var(--color-brand-coral) 12%, var(--color-border-subtle));
  padding: 0.15em 0.45em;
  border-radius: var(--radius-sm);
  border: 1px solid;
}

/* ── Code blocks ────────────────────────────────────────── */

.prose pre {
  background: var(--color-surface-dark);
  border: none;
  border-radius: var(--radius-2xl);
  padding: var(--space-6) var(--space-7);
  overflow-x: auto;
  margin-top: var(--space-6);
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e8e2d9; /* warm off-white on dark bg */
  font-size: var(--text-sm);
}

/* ── Horizontal rule ────────────────────────────────────── */

.prose hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    var(--color-brand-coral) 0%,
    var(--color-border) 40%,
    transparent 100%
  );
  margin-block: var(--space-12);
}

/* ── Strong & em ────────────────────────────────────────── */

.prose strong {
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

.prose em {
  font-style: italic;
  color: var(--color-text-secondary);
}

/* ── Tables ─────────────────────────────────────────────── */

.prose .table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  /* shadow for depth */
  box-shadow: var(--shadow-sm);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.prose thead {
  background: color-mix(in srgb, var(--color-brand-coral) 7%, var(--color-surface-raised));
  border-bottom: 1px solid var(--color-border);
}

.prose thead th {
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text);
  text-align: left;
  white-space: nowrap;
}

.prose tbody tr {
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background var(--duration-fast) var(--ease-out);
}

.prose tbody tr:last-child {
  border-bottom: none;
}

.prose tbody tr:hover {
  background: var(--color-surface-raised);
}

.prose tbody td {
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-secondary);
  vertical-align: top;
  line-height: var(--leading-relaxed);
}

/* ── Responsive prose ───────────────────────────────────── */

@media (max-width: 768px) {
  .prose h2 { font-size: var(--text-2xl); }
  .prose h3 { font-size: var(--text-xl); }
  .prose h4 { font-size: var(--text-lg); }
  .prose .lead { font-size: var(--text-lg); }
  .prose blockquote { padding: var(--space-5) var(--space-6); }
  .prose blockquote > p { font-size: var(--text-lg); }
}
