/* ============================================
   Healthcare Websites — Design System
   ============================================ */

/* ---- Tokens ---- */
:root {
  /* Brand colours */
  --brand-primary: #0B4F6C;       /* clinical deep teal */
  --brand-primary-dark: #083B52;
  --brand-primary-light: #1A6F8E;
  --brand-accent: #E07856;        /* warm coral - humanity */
  --brand-accent-dark: #C9603E;
  --brand-cymru: #C8102E;          /* Welsh flag red, for Wales nods */

  /* Surfaces */
  --bg: #FAFBFC;
  --bg-alt: #F2F5F8;
  --surface: #FFFFFF;
  --surface-dark: #0B2330;

  /* Text */
  --text: #1A2B3C;
  --text-muted: #5A6B7C;
  --text-on-dark: #F4F7FA;
  --text-on-dark-muted: #A8B5C2;

  /* Lines */
  --border: #E5EBF0;
  --border-strong: #C8D2DC;

  /* Status */
  --success: #2A7F5F;
  --warning: #C97A22;

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Radii */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(11, 35, 48, 0.06);
  --shadow: 0 4px 16px rgba(11, 35, 48, 0.08);
  --shadow-lg: 0 12px 40px rgba(11, 35, 48, 0.12);

  /* Layout */
  --container: 1180px;
  --container-narrow: 860px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-primary); text-decoration: none; }
a:hover { color: var(--brand-primary-dark); text-decoration: underline; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 var(--space-4);
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 var(--space-4); }
.lead { font-size: 1.2rem; color: var(--text-muted); }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: var(--space-3);
}
.eyebrow-accent { color: var(--brand-accent-dark); }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container-narrow {
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.section { padding-block: var(--space-8); }
.section-lg { padding-block: var(--space-9); }
.section-tight { padding-block: var(--space-7); }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--surface-dark); color: var(--text-on-dark); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--text-on-dark); }

.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--brand-primary); text-decoration: none; }
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-light) 100%);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
  box-shadow: 0 2px 6px rgba(11, 79, 108, 0.18);
}
.brand-name { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name small {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Slightly smaller in compact app-shell sidebars so it doesn't overpower */
.app-sidebar .brand { font-size: 1.15rem; }
.app-sidebar .brand-mark { width: 40px; height: 40px; font-size: 1rem; }
.app-sidebar .brand-name small { font-size: 0.7rem; }

@media (max-width: 480px) {
  .brand { font-size: 1.15rem; gap: var(--space-2); }
  .brand-mark { width: 40px; height: 40px; font-size: 1rem; }
}

.nav { display: flex; align-items: center; gap: var(--space-5); }
.nav a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}
.nav a:hover { color: var(--brand-primary); }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: var(--space-2);
  cursor: pointer;
  color: var(--text);
}
.nav-toggle svg { width: 24px; height: 24px; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: var(--space-4) var(--space-5);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding-block: var(--space-3); border-bottom: 1px solid var(--border); }
  .nav a:last-child { border-bottom: 0; }
  .nav .btn { width: 100%; text-align: center; margin-top: var(--space-3); }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85em 1.4em;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--brand-primary);
  color: white;
}
.btn-primary:hover { background: var(--brand-primary-dark); color: white; box-shadow: var(--shadow); }
.btn-accent {
  background: var(--brand-accent);
  color: white;
}
.btn-accent:hover { background: var(--brand-accent-dark); color: white; box-shadow: var(--shadow); }
.btn-outline {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.btn-outline:hover { background: var(--brand-primary); color: white; }
.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover { background: var(--bg-alt); color: var(--text); }
.btn-on-dark {
  background: white;
  color: var(--brand-primary);
}
.btn-on-dark:hover { background: var(--bg-alt); color: var(--brand-primary-dark); }
.btn-sm { padding: 0.6em 1em; font-size: 0.9rem; }
.btn-lg { padding: 1em 1.6em; font-size: 1.05rem; }

/* ---- Hero ---- */
.hero {
  padding-block: var(--space-9) var(--space-8);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: var(--space-8);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-6); }
}
.hero h1 { margin-bottom: var(--space-4); }
.hero .lead { font-size: 1.25rem; margin-bottom: var(--space-6); max-width: 540px; }
.hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.hero-meta {
  display: flex;
  gap: var(--space-5);
  margin-top: var(--space-6);
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.hero-meta .check { color: var(--success); margin-right: 0.4em; }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover { box-shadow: var(--shadow); }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-link:hover {
  text-decoration: none;
  border-color: var(--brand-primary);
  transform: translateY(-2px);
}
.card h3 { margin-bottom: var(--space-3); }
.card p { color: var(--text-muted); margin-bottom: 0; }
.card-feature {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(11, 79, 108, 0.08);
  color: var(--brand-primary);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-2);
}
.card-icon svg { width: 24px; height: 24px; }

/* ---- Audience picker (homepage) ---- */
.picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-7);
}
@media (max-width: 800px) { .picker { grid-template-columns: 1fr; } }
.picker-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.picker-card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  text-decoration: none;
}
.picker-card .eyebrow { margin-bottom: 0; }
.picker-card h3 { font-size: 1.7rem; margin-bottom: 0; }
.picker-card p { color: var(--text-muted); margin-bottom: 0; }
.picker-card .picker-arrow {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--brand-primary);
  font-weight: 600;
}

/* ---- Pricing ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-7);
}
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-6);
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-card.is-featured {
  border-color: var(--brand-primary);
  border-width: 2px;
  box-shadow: var(--shadow);
}
.price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-accent);
  color: white;
  padding: 0.3em 0.9em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.price-tier {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-primary);
  margin-bottom: var(--space-3);
}
.price-amount {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.price-period { color: var(--text-muted); font-size: 1rem; margin-left: 0.2em; }
.price-setup { color: var(--text-muted); font-size: 0.92rem; margin-top: var(--space-2); }
.price-features {
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0 var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.price-features li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: 0.95rem;
}
.price-features svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 0.18em;
  color: var(--success);
}
.price-card .btn { margin-top: auto; }

/* ---- Comparison table ---- */
.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.compare th, .compare td {
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare th {
  background: var(--bg-alt);
  font-weight: 600;
  font-size: 0.95rem;
}
.compare tr:last-child td { border-bottom: 0; }
.compare .pill {
  display: inline-block;
  padding: 0.18em 0.6em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.pill-us { background: rgba(42, 127, 95, 0.12); color: var(--success); }
.pill-them { background: rgba(201, 122, 34, 0.12); color: var(--warning); }

/* ---- Quote / testimonial ---- */
.quote {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-accent);
  border-radius: var(--radius);
  padding: var(--space-6);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text);
}
.quote-attr { font-style: normal; color: var(--text-muted); font-size: 0.9rem; margin-top: var(--space-3); }

/* ---- Forms ---- */
.form { display: flex; flex-direction: column; gap: var(--space-4); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.field input, .field select, .field textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.7em 0.9em;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(11, 79, 108, 0.15);
}
.field textarea { min-height: 120px; resize: vertical; }
.field-help { font-size: 0.85rem; color: var(--text-muted); }
.form-note {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--surface-dark);
  color: var(--text-on-dark);
  padding-block: var(--space-8) var(--space-6);
  margin-top: var(--space-9);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-7);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  color: var(--text-on-dark);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-4);
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.footer-grid a { color: var(--text-on-dark-muted); font-size: 0.95rem; }
.footer-grid a:hover { color: var(--text-on-dark); text-decoration: none; }
.footer-brand p { color: var(--text-on-dark-muted); max-width: 320px; font-size: 0.95rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  color: var(--text-on-dark-muted);
  font-size: 0.85rem;
}

/* ---- CTA band ---- */
.cta-band {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  text-align: center;
}
.cta-band h2 { color: white; }
.cta-band p { color: var(--text-on-dark-muted); max-width: 620px; margin-inline: auto; }
.cta-band .btn { margin-top: var(--space-5); }

/* ---- Misc helpers ---- */
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.tag {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--text-muted);
  padding: 0.2em 0.7em;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  margin-right: var(--space-2);
}
.tag-success { background: rgba(42, 127, 95, 0.1); color: var(--success); }
.tag-accent { background: rgba(224, 120, 86, 0.12); color: var(--brand-accent-dark); }
.tag-cymru { background: rgba(200, 16, 46, 0.08); color: var(--brand-cymru); }

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-3);
}
.feature-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.feature-list .check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(42, 127, 95, 0.12);
  color: var(--success);
  display: grid;
  place-items: center;
  margin-top: 0.12em;
}
.feature-list .check svg { width: 14px; height: 14px; }

.stat {
  text-align: center;
  padding: var(--space-5);
}
.stat-num {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* ---- Hero patterned background ---- */
.hero-pattern {
  position: relative;
  background: linear-gradient(180deg, #F2F7FA 0%, var(--bg) 100%);
}
.hero-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(11, 79, 108, 0.08) 0, transparent 35%),
    radial-gradient(circle at 88% 72%, rgba(224, 120, 86, 0.06) 0, transparent 40%);
  pointer-events: none;
}
.hero-pattern .container { position: relative; }

/* ---- Visual / mock device ---- */
.hero-visual {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
.hero-visual .browser-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.hero-visual .browser-open {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: background 0.12s ease, color 0.12s ease;
  text-decoration: none;
  flex-shrink: 0;
}
.hero-visual .browser-open:hover { background: var(--surface); color: var(--brand-primary); text-decoration: none; }

/* Live iframe wrapper */
.hero-visual-live { box-shadow: var(--shadow-lg); }
.hero-visual-live .browser-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  background: var(--bg-alt);
  overflow: hidden;
}
.hero-visual-live .browser-frame iframe {
  position: absolute;
  top: 0; left: 0;
  width: 200%;
  height: 200%;
  border: 0;
  transform: scale(0.5);
  transform-origin: 0 0;
  background: white;
}
/* Fallback panel — sits behind the iframe. Visible if iframe is blocked
   (X-Frame-Options / CSP) or while loading. */
.hero-visual-live .browser-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  text-align: center;
  padding: var(--space-5);
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: var(--text-on-dark);
  z-index: 0;
}
.hero-visual-live .browser-fallback strong {
  display: block;
  font-size: 1.1rem;
  color: white;
  margin-bottom: var(--space-2);
}
.hero-visual-live .browser-fallback span { color: var(--text-on-dark-muted); font-size: 0.92rem; max-width: 320px; display: block; }
/* iframe sits on top of fallback when it loads successfully */
.hero-visual-live .browser-frame iframe { z-index: 1; position: absolute; }
/* Click-through overlay so even with iframe loaded, the box is a clickable link */
.hero-visual-live .browser-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  cursor: pointer;
  /* Hover gives a slight tint so users know it's clickable */
  transition: background 0.15s ease;
}
.hero-visual-live .browser-overlay:hover { background: rgba(11, 79, 108, 0.04); }

.hero-visual-live .browser-caption {
  background: var(--surface-dark);
  color: var(--text-on-dark);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.88rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.hero-visual-live .browser-caption strong { color: white; }
.hero-visual-live .browser-caption a { color: white; text-decoration: underline; }
.hero-visual-live .browser-caption-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2A7F5F;
  box-shadow: 0 0 0 4px rgba(42,127,95,0.18);
  flex-shrink: 0;
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(42,127,95,0.18); }
  50% { box-shadow: 0 0 0 7px rgba(42,127,95,0.06); }
}
.hero-visual .browser-dots {
  display: flex;
  gap: 6px;
}
.hero-visual .browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.hero-visual .browser-url {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25em 0.8em;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-grow: 1;
}
.hero-visual .browser-body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 280px;
}
.mock-line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-alt), var(--border));
}
.mock-line.w-80 { width: 80%; }
.mock-line.w-60 { width: 60%; }
.mock-line.w-40 { width: 40%; }
.mock-line.h-lg { height: 24px; background: linear-gradient(90deg, var(--brand-primary), var(--brand-primary-light)); }
.mock-button {
  display: inline-block;
  width: 120px;
  height: 36px;
  border-radius: 8px;
  background: var(--brand-accent);
  margin-top: var(--space-3);
}
.mock-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-3); margin-top: var(--space-3); }
.mock-card {
  height: 70px;
  background: var(--bg-alt);
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* ---- Process / steps ---- */
.steps {
  counter-reset: step;
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(4, 1fr);
  margin-top: var(--space-7);
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative;
  padding-top: var(--space-5);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-accent-dark);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}
.step h4 { margin-bottom: var(--space-2); }
.step p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0; }

/* ---- Banner ---- */
.banner-cymru {
  background: linear-gradient(90deg, rgba(200, 16, 46, 0.05), transparent);
  border: 1px solid rgba(200, 16, 46, 0.15);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-block: var(--space-6);
}
.banner-cymru .flag {
  width: 40px;
  height: 28px;
  border-radius: 4px;
  flex-shrink: 0;
  background:
    linear-gradient(180deg, white 0% 50%, #00703C 50% 100%);
  position: relative;
  overflow: hidden;
}
.banner-cymru .flag::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--brand-cymru) 6px, transparent 7px);
}
.banner-cymru p { margin: 0; font-size: 0.95rem; }

/* ---- Profile (about Nitin) ---- */
.profile {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-7);
  align-items: start;
}
@media (max-width: 760px) { .profile { grid-template-columns: 1fr; } }
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
}
.profile-photo {
  width: 160px;
  height: 160px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-light));
  display: grid;
  place-items: center;
  color: white;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.profile-name { font-weight: 700; font-size: 1.1rem; margin-bottom: var(--space-1); }
.profile-role { color: var(--text-muted); font-size: 0.9rem; }
.profile-creds { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-top: var(--space-3); }

/* ---- Moments (lived-experience scenarios) ---- */
.moments {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-7);
}
@media (max-width: 1000px) { .moments { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px)  { .moments { grid-template-columns: 1fr; } }
.moment {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-accent);
  border-radius: var(--radius);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.moment-time {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-accent-dark);
  font-weight: 600;
}
.moment h4 {
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.3;
}
.moment p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}
.moment-footer {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border);
  font-size: 0.82rem;
  color: var(--text);
  font-style: italic;
}
.moments-tagline {
  margin-top: var(--space-6);
  text-align: center;
  font-size: 1.1rem;
  color: var(--text);
  max-width: 760px;
  margin-inline: auto;
}
.moments-tagline strong { color: var(--brand-primary); }

/* ============================================
   Wizard / Onboarding
   ============================================ */

.wizard-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-7);
  align-items: start;
  margin-block: var(--space-7);
}
@media (max-width: 900px) { .wizard-shell { grid-template-columns: 1fr; } }

/* Sidebar stepper */
.stepper {
  position: sticky;
  top: 84px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.stepper-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.stepper ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); counter-reset: stepperc; }
.stepper li {
  counter-increment: stepperc;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.55em 0.7em;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  background: transparent;
  border: none;
  text-align: left;
  width: 100%;
  font-family: inherit;
}
.stepper li::before {
  content: counter(stepperc, decimal-leading-zero);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.stepper li.is-active {
  background: rgba(11, 79, 108, 0.08);
  color: var(--text);
  font-weight: 600;
}
.stepper li.is-active::before {
  background: var(--brand-primary);
  color: white;
}
.stepper li.is-complete {
  color: var(--text);
}
.stepper li.is-complete::before {
  background: var(--success);
  color: white;
  content: "✓";
  font-size: 0.95rem;
}
.stepper li:hover:not(.is-active) { background: var(--bg-alt); }

/* Progress bar (mobile) */
.wizard-progress {
  display: none;
  margin-bottom: var(--space-5);
  background: var(--bg-alt);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.wizard-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-primary-light));
  border-radius: 999px;
  transition: width 0.3s ease;
}
@media (max-width: 900px) { .wizard-progress { display: block; } }

/* Wizard step content */
.wizard-step {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
}
.wizard-step.is-active { display: block; }
.wizard-step h2 { margin-bottom: var(--space-2); }
.wizard-step .step-intro {
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}
.step-counter {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-accent-dark);
  margin-bottom: var(--space-3);
}
.step-optional {
  display: inline-block;
  background: rgba(201, 122, 34, 0.1);
  color: var(--warning);
  padding: 0.2em 0.7em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: var(--space-2);
}

/* Wizard nav buttons */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  gap: var(--space-3);
}
.wizard-nav .btn-back {
  background: transparent;
  color: var(--text-muted);
  border: 0;
  font-weight: 500;
}
.wizard-nav .btn-back:hover { color: var(--text); background: var(--bg-alt); }
.wizard-nav-right { display: flex; gap: var(--space-3); }
.wizard-nav-right .btn-skip {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border-strong);
}
.wizard-nav-right .btn-skip:hover { color: var(--text); background: var(--bg-alt); }

/* Tier selection cards */
.tier-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-block: var(--space-5);
}
@media (max-width: 800px) { .tier-options { grid-template-columns: 1fr; } }
.tier-option {
  position: relative;
  display: block;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tier-option:hover { border-color: var(--brand-primary-light); }
.tier-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tier-option input[type="radio"]:checked + .tier-inner {
  /* handled via parent .is-selected */
}
.tier-option.is-selected {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(11, 79, 108, 0.08);
}
.tier-inner { display: flex; flex-direction: column; gap: var(--space-2); }
.tier-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}
.tier-price {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand-primary);
}
.tier-price small {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 0.2em;
}
.tier-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Field helper rows */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-4); }
@media (max-width: 700px) { .field-row, .field-row-3 { grid-template-columns: 1fr; } }
.field-stack { display: flex; flex-direction: column; gap: var(--space-4); }

/* Chip selection (multi-choice) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: var(--bg-alt);
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.5em 1em;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:hover { border-color: var(--brand-primary-light); }
.chip.is-checked {
  background: rgba(11, 79, 108, 0.1);
  border-color: var(--brand-primary);
  color: var(--brand-primary-dark);
  font-weight: 600;
}

/* Drag and drop file zone */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  text-align: center;
  background: var(--bg-alt);
  cursor: pointer;
  transition: all 0.15s ease;
}
.dropzone:hover, .dropzone.is-drag {
  border-color: var(--brand-primary);
  background: rgba(11, 79, 108, 0.05);
}
.dropzone input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
  pointer-events: none;
}
.dropzone-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand-primary);
  display: grid;
  place-items: center;
  margin: 0 auto var(--space-3);
  border: 1px solid var(--border);
}
.dropzone-icon svg { width: 28px; height: 28px; }
.dropzone-title { font-weight: 600; color: var(--text); margin-bottom: var(--space-2); }
.dropzone-hint { font-size: 0.9rem; color: var(--text-muted); }
.dropzone-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.dropzone-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background: var(--bg-alt) center/cover;
  border: 1px solid var(--border);
  overflow: hidden;
}
.dropzone-item-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.4em 0.6em;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
  color: white;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropzone-item-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: white;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.dropzone-item-remove:hover { background: var(--brand-accent); }

/* Repeating team block */
.repeater-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  position: relative;
}
.repeater-item-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
}
.repeater-item-remove:hover { color: var(--brand-accent-dark); }
.repeater-add {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.6em 1em;
  background: transparent;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--brand-primary);
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.95rem;
}
.repeater-add:hover { border-color: var(--brand-primary); background: rgba(11, 79, 108, 0.04); }

/* Color picker row */
.color-input-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.color-input-row input[type="color"] {
  width: 56px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: white;
}
.color-input-row input[type="text"] { flex-grow: 1; }

/* Review summary */
.review-summary {
  display: grid;
  gap: var(--space-3);
  margin-block: var(--space-5);
}
.review-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.review-row:last-child { border-bottom: 0; }
.review-key { color: var(--text-muted); font-weight: 500; }
.review-val { color: var(--text); }
.review-val.is-empty { color: var(--text-muted); font-style: italic; }
@media (max-width: 600px) {
  .review-row { grid-template-columns: 1fr; gap: 0; }
}

/* Resume notice */
.resume-notice {
  background: rgba(11, 79, 108, 0.06);
  border: 1px solid rgba(11, 79, 108, 0.2);
  color: var(--brand-primary-dark);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.resume-notice button {
  background: transparent;
  border: 1px solid var(--brand-primary);
  color: var(--brand-primary);
  padding: 0.4em 0.9em;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
}
.resume-notice button:hover { background: var(--brand-primary); color: white; }

/* GoCardless lockup */
.gc-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5em 0.9em;
  font-size: 0.88rem;
  color: var(--text);
}
.gc-badge .lock {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  color: var(--success);
}

/* ============================================
   Portal / Admin App Shell
   ============================================ */

.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}
@media (max-width: 860px) { .app-shell { grid-template-columns: 1fr; } }

.app-sidebar {
  background: var(--surface-dark);
  color: var(--text-on-dark);
  padding: var(--space-6) var(--space-4);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
@media (max-width: 860px) {
  .app-sidebar {
    position: static;
    height: auto;
    padding: var(--space-4);
  }
}
.app-sidebar .brand {
  color: white;
  margin-bottom: var(--space-6);
  display: flex;
}
.app-sidebar .brand-name { color: white; }
.app-sidebar .brand-name small { color: var(--text-on-dark-muted); }
.app-sidebar nav { display: flex; flex-direction: column; gap: var(--space-1); }
.app-sidebar a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.65em 0.85em;
  border-radius: var(--radius-sm);
  color: var(--text-on-dark-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.app-sidebar a:hover { background: rgba(255,255,255,0.06); color: white; }
.app-sidebar a.is-active { background: rgba(255,255,255,0.1); color: white; }
.app-sidebar a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.app-sidebar .sidebar-section {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  margin: var(--space-5) 0 var(--space-3);
  opacity: 0.7;
}
.app-sidebar .sidebar-footer {
  margin-top: auto;
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  color: var(--text-on-dark-muted);
}
.app-sidebar .sidebar-footer button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-on-dark);
  padding: 0.45em 0.85em;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  width: 100%;
  margin-top: var(--space-2);
}
.app-sidebar .sidebar-footer button:hover { background: rgba(255,255,255,0.06); }

.app-main {
  padding: var(--space-6) var(--space-6);
  background: var(--bg);
  min-width: 0;  /* prevent flex/grid overflow */
}
@media (max-width: 640px) { .app-main { padding: var(--space-5) var(--space-4); } }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
  flex-wrap: wrap;
}
.app-header h1 { margin: 0; font-size: 1.6rem; }
.app-header .crumbs {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.app-header .crumbs a { color: var(--text-muted); }
.app-header .crumbs a:hover { color: var(--brand-primary); }

/* Mode banner */
.mode-banner {
  background: rgba(201, 122, 34, 0.08);
  border: 1px solid rgba(201, 122, 34, 0.25);
  color: var(--warning);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.mode-banner strong { color: var(--text); }

/* KPI cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
@media (max-width: 1000px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .kpi-grid { grid-template-columns: 1fr; } }
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.kpi-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.kpi-sub {
  margin-top: var(--space-2);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.kpi.is-urgent .kpi-value { color: var(--brand-accent-dark); }

/* Cards in the portal */
.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-5);
}
.app-card-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}
.app-card-header h2, .app-card-header h3 { margin: 0; font-size: 1.05rem; }
.app-card-body { padding: var(--space-5); }
.app-card-body-tight { padding: 0; }

/* Thread list */
.thread-list { list-style: none; padding: 0; margin: 0; }
.thread-list li {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s ease;
}
.thread-list li:last-child { border-bottom: 0; }
.thread-list li:hover { background: var(--bg-alt); }
.thread-list .thread-priority {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}
.thread-list .thread-priority.is-urgent { background: var(--brand-accent-dark); }
.thread-list .thread-subject {
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-1);
}
.thread-list .thread-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.thread-list .thread-meta strong { color: var(--text); font-weight: 600; }
.thread-list .thread-time {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .thread-list li { grid-template-columns: 12px 1fr auto; }
  .thread-list li > :nth-child(3) { display: none; }
}

/* Priority + status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.15em 0.7em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-urgent { background: rgba(224, 120, 86, 0.12); color: var(--brand-accent-dark); }
.badge-routine { background: rgba(11, 79, 108, 0.08); color: var(--brand-primary); }
.badge-open { background: rgba(42, 127, 95, 0.1); color: var(--success); }
.badge-in_progress { background: rgba(201, 122, 34, 0.1); color: var(--warning); }
.badge-resolved { background: var(--bg-alt); color: var(--text-muted); }
.badge-applied { background: rgba(11, 79, 108, 0.08); color: var(--brand-primary); }
.badge-building { background: rgba(201, 122, 34, 0.1); color: var(--warning); }
.badge-live { background: rgba(42, 127, 95, 0.1); color: var(--success); }
.badge-paused { background: var(--bg-alt); color: var(--text-muted); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-7) var(--space-5);
  color: var(--text-muted);
}
.empty-state h3 { color: var(--text); margin-bottom: var(--space-2); }

/* Message thread (single thread view) */
.thread-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-5);
}
.thread-header h1 { font-size: 1.4rem; margin-bottom: var(--space-3); }
.thread-header .thread-controls {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}
.thread-header .thread-controls select {
  padding: 0.4em 0.7em;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: white;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.message-list { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-6); }
.msg {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.msg.is-mine { flex-direction: row-reverse; }
.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: white;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}
.msg.is-mine .msg-avatar { background: var(--brand-accent); }
.msg-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  max-width: 70%;
}
.msg.is-mine .msg-bubble { background: rgba(11, 79, 108, 0.06); border-color: rgba(11, 79, 108, 0.2); }
.msg-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
.msg-body { color: var(--text); line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; }
.msg-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.msg-attachment {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.4em 0.8em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
}
.msg-attachment:hover { background: var(--surface); border-color: var(--brand-primary); text-decoration: none; }
.msg-attachment svg { width: 14px; height: 14px; }

/* Reply composer */
.composer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.composer textarea {
  width: 100%;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-family: inherit;
  font-size: 1rem;
  min-height: 110px;
  resize: vertical;
}
.composer textarea:focus { border-color: var(--brand-primary); outline: none; box-shadow: 0 0 0 3px rgba(11, 79, 108, 0.12); }
.composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-3);
  gap: var(--space-3);
  flex-wrap: wrap;
}
.composer-footer label.file-pick {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.5em 0.9em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--brand-primary);
  font-weight: 500;
  font-size: 0.92rem;
}
.composer-footer label.file-pick:hover { background: var(--bg-alt); }
.composer-footer input[type="file"] { display: none; }
.composer-staged {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.composer-staged-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.3em 0.7em;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.composer-staged-item button {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.composer-staged-item button:hover { color: var(--brand-accent-dark); }

/* New thread modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 35, 48, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  z-index: 100;
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-5);
}
.modal-header h2 { margin: 0; font-size: 1.3rem; }
.modal-close {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

/* Customer list rows */
.customer-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.1s ease;
}
.customer-row:hover { background: var(--bg-alt); text-decoration: none; }
.customer-row:last-child { border-bottom: 0; }
.customer-row strong { color: var(--text); display: block; margin-bottom: 2px; }
.customer-row .meta { font-size: 0.85rem; color: var(--text-muted); }
@media (max-width: 700px) {
  .customer-row { grid-template-columns: 1fr auto; }
  .customer-row > :nth-child(2), .customer-row > :nth-child(3) { display: none; }
}

/* Login layout */
.auth-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-5);
  background: linear-gradient(135deg, #F2F7FA 0%, var(--bg) 100%);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  box-shadow: var(--shadow);
}
.auth-card .brand { margin-bottom: var(--space-6); }
.auth-card h1 { font-size: 1.5rem; margin-bottom: var(--space-2); }
.auth-card .lead { font-size: 1rem; margin-bottom: var(--space-5); }
.auth-error {
  background: rgba(224, 120, 86, 0.08);
  border: 1px solid rgba(224, 120, 86, 0.25);
  color: var(--brand-accent-dark);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: var(--space-4);
}
.auth-card .form { gap: var(--space-3); }
.auth-card .btn { width: 100%; }
.auth-card .auth-aside {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ============================================
   Cookie consent banner
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  max-width: 540px;
  margin-inline: auto;
  background: var(--surface-dark);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
}
.cookie-banner.is-open { display: block; }
.cookie-banner h3 {
  color: white;
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
}
.cookie-banner p {
  font-size: 0.92rem;
  color: var(--text-on-dark-muted);
  margin-bottom: var(--space-4);
}
.cookie-banner a {
  color: white;
  text-decoration: underline;
}
.cookie-banner-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.cookie-banner-actions button {
  flex: 1;
  min-width: 120px;
  padding: 0.55em 1em;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}
.cookie-banner-actions .btn-accept {
  background: white;
  color: var(--brand-primary);
}
.cookie-banner-actions .btn-accept:hover { background: var(--bg-alt); }
.cookie-banner-actions .btn-reject {
  background: transparent;
  border-color: rgba(255,255,255,0.2);
  color: white;
}
.cookie-banner-actions .btn-reject:hover { background: rgba(255,255,255,0.06); }

/* ============================================
   CRM views (pipeline, build tracker, notes, billing)
   ============================================ */

/* Tabs */
.tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}
.tabs button {
  background: transparent;
  border: 0;
  padding: 0.7em 1.1em;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs button:hover { color: var(--text); }
.tabs button.is-active {
  color: var(--brand-primary);
  border-bottom-color: var(--brand-primary);
  font-weight: 600;
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* Pipeline columns */
.pipeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-3);
}
@media (max-width: 1200px) { .pipeline { grid-template-columns: repeat(3, minmax(280px, 1fr)); } }
@media (max-width: 700px) { .pipeline { grid-template-columns: repeat(2, minmax(260px, 1fr)); } }
.pipeline-col {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  min-height: 200px;
}
.pipeline-col header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  padding: 0 var(--space-1);
}
.pipeline-col h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}
.pipeline-col .count {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1em 0.6em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.pipeline-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin-bottom: var(--space-2);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.pipeline-card:hover {
  text-decoration: none;
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}
.pipeline-card strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 4px;
}
.pipeline-card .meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  align-items: center;
}
.pipeline-empty {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: var(--space-4);
  font-style: italic;
}

/* Build progress tracker (horizontal step strip) */
.build-tracker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-2);
  margin-block: var(--space-4);
}
@media (max-width: 800px) { .build-tracker { grid-template-columns: 1fr 1fr; } }
.build-step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, transform 0.05s ease;
}
.build-step:hover { border-color: var(--brand-primary); }
.build-step .stage-name {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}
.build-step .stage-status {
  font-size: 0.9rem;
  font-weight: 600;
}
.build-step.is-done    { background: rgba(42,127,95,0.08);  border-color: rgba(42,127,95,0.3); }
.build-step.is-done .stage-status { color: var(--success); }
.build-step.is-in_progress { background: rgba(201,122,34,0.08); border-color: rgba(201,122,34,0.3); }
.build-step.is-in_progress .stage-status { color: var(--warning); }
.build-step.is-blocked { background: rgba(224,120,86,0.1);  border-color: rgba(224,120,86,0.35); }
.build-step.is-blocked .stage-status { color: var(--brand-accent-dark); }
.build-step.is-skipped { opacity: 0.5; }
.build-step .stage-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Payments / billing table */
.billing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.92rem;
}
.billing-table th, .billing-table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}
.billing-table th {
  background: var(--bg-alt);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}
.billing-table tr:last-child td { border-bottom: 0; }
.billing-table .amount { font-weight: 600; }

/* Notes (timeline) */
.notes-list { display: flex; flex-direction: column; gap: var(--space-3); }
.note-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.note-item.is-pinned { border-left: 4px solid var(--brand-accent); }
.note-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.note-meta strong { color: var(--text); font-weight: 600; }
.note-body { white-space: pre-wrap; }
.notes-composer textarea {
  width: 100%;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  font-family: inherit;
  font-size: 0.95rem;
  min-height: 80px;
  resize: vertical;
}
.notes-composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-2);
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Activity log */
.activity-feed { display: flex; flex-direction: column; gap: var(--space-2); }
.activity-event {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}
.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: grid;
  place-items: center;
  color: var(--brand-primary);
  font-size: 0.95rem;
}
.activity-time {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Renewal alert callout */
.renewal-alert {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(224,120,86,0.08);
  border: 1px solid rgba(224,120,86,0.25);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  font-size: 0.92rem;
}
.renewal-alert strong { color: var(--brand-accent-dark); }
.renewal-alert a { font-weight: 600; }

/* ============================================
   Quick Actions (customer portal self-service)
   ============================================ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
}
.quick-action {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.05s ease;
}
.quick-action:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.quick-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(11, 79, 108, 0.08);
  color: var(--brand-primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.quick-action-icon svg { width: 20px; height: 20px; }
.quick-action.is-urgent .quick-action-icon {
  background: rgba(224, 120, 86, 0.12);
  color: var(--brand-accent-dark);
}
.quick-action-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.quick-action-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}
.quick-action-desc {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Structured request panel (admin view of a Quick Action) */
.structured-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-primary);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
}
.structured-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}
.structured-panel-header strong {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
}
.structured-fields {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-2) var(--space-4);
  font-size: 0.92rem;
}
@media (max-width: 600px) { .structured-fields { grid-template-columns: 1fr; gap: 4px var(--space-4); } }
.structured-fields dt {
  color: var(--text-muted);
  font-weight: 500;
}
.structured-fields dd {
  margin: 0;
  color: var(--text);
}
.structured-fields dd code {
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
  background: var(--bg-alt);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

/* ============================================
   Auto-publish banner (Quick Action → WordPress)
   ============================================ */
.publish-banner {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  margin-bottom: var(--space-5);
  border: 1px solid;
}
.publish-banner-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  font-weight: 700;
}
.publish-banner-body { flex: 1; min-width: 0; }
.publish-banner-title { font-weight: 600; margin-bottom: 4px; }
.publish-banner-meta { font-size: 0.88rem; opacity: 0.85; }
.publish-banner-meta a { font-weight: 600; }
.publish-banner-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }
.publish-banner-actions .btn { padding: 0.45em 0.9em; font-size: 0.88rem; }

.publish-banner.queued      { background: rgba(201,122,34,0.06);  border-color: rgba(201,122,34,0.3);  color: var(--warning); }
.publish-banner.queued .publish-banner-icon  { background: rgba(201,122,34,0.18); color: var(--warning); }
.publish-banner.publishing  { background: rgba(11,79,108,0.06);   border-color: rgba(11,79,108,0.3);   color: var(--brand-primary); }
.publish-banner.publishing .publish-banner-icon { background: rgba(11,79,108,0.18); color: var(--brand-primary); }
.publish-banner.published   { background: rgba(42,127,95,0.06);   border-color: rgba(42,127,95,0.3);   color: var(--success); }
.publish-banner.published .publish-banner-icon { background: rgba(42,127,95,0.18); color: var(--success); }
.publish-banner.failed      { background: rgba(224,120,86,0.08);  border-color: rgba(224,120,86,0.3);  color: var(--brand-accent-dark); }
.publish-banner.failed .publish-banner-icon { background: rgba(224,120,86,0.18); color: var(--brand-accent-dark); }
.publish-banner.overridden  { background: var(--bg-alt);          border-color: var(--border);        color: var(--text-muted); }
.publish-banner.overridden .publish-banner-icon { background: var(--border); color: var(--text-muted); }

/* Spinner for "publishing" state */
.publish-banner.publishing .publish-banner-icon::after {
  content: '';
  width: 18px; height: 18px;
  border: 2.5px solid currentColor;
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.publish-banner.publishing .publish-banner-icon > * { display: none; }

/* Inline publish badge in thread lists */
.publish-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.1em 0.55em;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.publish-mini::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.publish-mini.queued     { background: rgba(201,122,34,0.12); color: var(--warning); }
.publish-mini.publishing { background: rgba(11,79,108,0.12);  color: var(--brand-primary); }
.publish-mini.published  { background: rgba(42,127,95,0.12);  color: var(--success); }
.publish-mini.failed     { background: rgba(224,120,86,0.14); color: var(--brand-accent-dark); }
.publish-mini.overridden { background: var(--bg-alt);         color: var(--text-muted); }

/* ============================================
   Billing-frequency toggle
   ============================================ */
.billing-toggle {
  display: inline-flex;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  margin-block: var(--space-5);
}
.billing-toggle button {
  background: transparent;
  border: 0;
  padding: 0.55em 1.2em;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.billing-toggle button:hover { color: var(--text); }
.billing-toggle button.is-active {
  background: var(--surface);
  color: var(--brand-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.billing-toggle .tag {
  font-size: 0.7rem;
  margin-left: 0.4em;
}

/* Hide the "other" frequency price */
[data-billing-shown="annual"] [data-billing="monthly"],
[data-billing-shown="monthly"] [data-billing="annual"] { display: none; }


/* ============================================================
   EDITORIAL REDESIGN — v2 (May 2026)
   Big type. Pin-and-scroll. Asymmetric. Restrained motion.
   Scoped: only the homepage uses these classes (.editorial-*).
   ============================================================ */

:root {
  --font-display: 'Fraunces', 'Source Serif 4', Georgia, serif;
  --container-wide: 1340px;
  /* Cool blue / teal editorial palette */
  --ink: #061A2E;            /* near-black navy */
  --ink-soft: #2A4055;
  --paper: #EEF4F8;          /* soft cool blue-grey "paper" */
  --paper-warm: #D6E4EE;     /* deeper cool blue-grey for tonal sections */
  --teal-deep: #07344B;
  --teal: #0B4F6C;
  --teal-bright: #2C9AC4;
  --teal-soft: #BFDDEB;      /* pale teal for tonal panels */
  --coral: #E07856;          /* retained — used very sparingly for italic accents */
  --rule: rgba(6, 26, 46, 0.12);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

.editorial { color: var(--ink); }
.editorial .container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

/* ---- Editorial type ladder ---- */
.editorial .display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.95;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  color: var(--ink);
  margin: 0;
}
.editorial .display-xl { font-size: clamp(3.4rem, 9.5vw, 8.4rem); }
.editorial .display-lg { font-size: clamp(2.6rem, 6.5vw, 5.4rem); }
.editorial .display-md { font-size: clamp(2rem, 4.5vw, 3.6rem); }
.editorial .display em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: var(--teal-bright);
}
.editorial .body-lg {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
}
.editorial .label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.editorial .label::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: currentColor;
  vertical-align: middle;
  margin-right: 0.8em;
  transform: translateY(-2px);
}

/* ---- Section rhythm ---- */
.editorial .ed-section {
  padding-block: clamp(5rem, 11vw, 9rem);
  position: relative;
}
.editorial .ed-section + .ed-section { border-top: 1px solid var(--rule); }
.editorial .ed-section.bg-paper   { background: var(--paper); }
.editorial .ed-section.bg-paper-warm { background: var(--paper-warm); }
.editorial .ed-section.bg-ink     { background: var(--ink); color: var(--paper); }
.editorial .ed-section.bg-ink .display { color: var(--paper); }
.editorial .ed-section.bg-ink .body-lg { color: rgba(245, 241, 234, 0.78); }
.editorial .ed-section.bg-ink .label   { color: rgba(245, 241, 234, 0.6); }

/* ---- Hero ---- */
.editorial .ed-hero {
  min-height: clamp(640px, 88vh, 880px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--paper);
  position: relative;
  overflow: hidden;
}
.editorial .ed-hero .container-wide {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3rem);
}
.editorial .ed-hero .ed-hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.editorial .ed-hero .display-xl {
  max-width: 16ch;
}
.editorial .ed-hero .ed-hero-actions {
  display: flex;
  gap: clamp(1rem, 2vw, 1.5rem);
  flex-wrap: wrap;
  align-items: center;
}
.editorial .ed-hero .ed-byline {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 30ch;
}

/* Editorial buttons */
.editorial .ed-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8em;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  padding: 1.1em 1.8em;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.3s var(--ease-out), background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.editorial .ed-btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.editorial .ed-btn-primary:hover {
  background: var(--teal-deep);
  color: var(--paper);
  text-decoration: none;
  transform: translateY(-2px);
}
.editorial .ed-btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.editorial .ed-btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.editorial .ed-section.bg-ink .ed-btn-primary {
  background: var(--paper);
  color: var(--ink);
}
.editorial .ed-section.bg-ink .ed-btn-primary:hover { background: var(--teal-bright); color: var(--ink); }
.editorial .ed-section.bg-ink .ed-btn-ghost { color: var(--paper); border-color: var(--paper); }
.editorial .ed-section.bg-ink .ed-btn-ghost:hover { background: var(--paper); color: var(--ink); }
.editorial .ed-btn .arrow {
  display: inline-block;
  width: 1em;
  transition: transform 0.3s var(--ease-out);
}
.editorial .ed-btn:hover .arrow { transform: translateX(4px); }

/* ---- Parkhouse showcase section ---- */
.editorial .ed-showcase {
  background: var(--paper-warm);
}
.editorial .ed-showcase .ed-showcase-frame {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(10, 24, 32, 0.18);
  background: white;
  border: 1px solid var(--rule);
}
.editorial .ed-showcase .ed-showcase-bar {
  background: rgba(10, 24, 32, 0.04);
  border-bottom: 1px solid var(--rule);
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.editorial .ed-showcase .ed-showcase-bar .dots {
  display: flex; gap: 6px;
}
.editorial .ed-showcase .ed-showcase-bar .dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(10, 24, 32, 0.14);
}
.editorial .ed-showcase .ed-showcase-url {
  flex: 1;
  text-align: center;
}
.editorial .ed-showcase .ed-showcase-iframe {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--paper);
  overflow: hidden;
}
.editorial .ed-showcase .ed-showcase-iframe iframe {
  position: absolute;
  top: 0; left: 0;
  width: 200%;
  height: 200%;
  border: 0;
  transform: scale(0.5);
  transform-origin: 0 0;
  background: white;
}
.editorial .ed-showcase .ed-showcase-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.editorial .ed-showcase .ed-showcase-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.editorial .ed-showcase .ed-showcase-caption a {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
}

/* ---- Pinned scroll narrative ---- */
.editorial .ed-pinned {
  background: var(--paper);
}
.editorial .ed-pinned .ed-pinned-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: flex-start;
}
.editorial .ed-pinned .ed-pinned-left {
  position: sticky;
  top: clamp(5rem, 10vh, 8rem);
  align-self: start;
}
.editorial .ed-pinned .ed-pinned-left .display-lg {
  margin-top: 1.5rem;
  max-width: 14ch;
}
.editorial .ed-pinned .ed-pinned-left .body-lg {
  margin-top: 1.5rem;
}
.editorial .ed-pinned .ed-pinned-right {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.editorial .ed-quote {
  border-top: 1px solid var(--rule);
  padding-top: clamp(1.5rem, 2.5vw, 2.25rem);
  padding-bottom: 0.5rem;
}
.editorial .ed-quote .ed-quote-said {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 60;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 1rem;
}
.editorial .ed-quote .ed-quote-said::before {
  content: '“ ';
  color: var(--teal-bright);
}
.editorial .ed-quote .ed-quote-said::after {
  content: ' ”';
  color: var(--teal-bright);
}
.editorial .ed-quote .ed-quote-us {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}
.editorial .ed-quote .ed-quote-us strong {
  color: var(--ink);
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.4em;
}
@media (max-width: 900px) {
  .editorial .ed-pinned .ed-pinned-grid { grid-template-columns: 1fr; }
  .editorial .ed-pinned .ed-pinned-left { position: static; }
}

/* ---- Lived-experience moments (editorial card grid) ---- */
.editorial .ed-moments {
  background: var(--ink);
  color: var(--paper);
}
.editorial .ed-moments .ed-moments-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}
@media (max-width: 800px) {
  .editorial .ed-moments .ed-moments-head { grid-template-columns: 1fr; }
}
.editorial .ed-moments-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 2.5vw, 2.5rem);
}
@media (max-width: 720px) {
  .editorial .ed-moments-grid { grid-template-columns: 1fr; }
}
.editorial .ed-moment {
  border-top: 1px solid rgba(245, 241, 234, 0.16);
  padding-top: clamp(1.5rem, 2.5vw, 2.25rem);
}
.editorial .ed-moment .ed-moment-time {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 1.25rem;
}
.editorial .ed-moment .ed-moment-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--paper);
}
.editorial .ed-moment .ed-moment-body {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(245, 241, 234, 0.74);
  margin: 0 0 1.5rem;
}
.editorial .ed-moment .ed-moment-tag {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(245, 241, 234, 0.6);
  display: block;
  padding-top: 1rem;
  border-top: 1px dashed rgba(245, 241, 234, 0.16);
}

/* ---- Alternating Why-us sections ---- */
.editorial .ed-why .ed-why-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.editorial .ed-why .ed-why-row + .ed-why-row {
  margin-top: clamp(5rem, 10vw, 8rem);
  padding-top: clamp(5rem, 10vw, 8rem);
  border-top: 1px solid var(--rule);
}
.editorial .ed-why .ed-why-row.flip { direction: rtl; }
.editorial .ed-why .ed-why-row.flip > * { direction: ltr; }
.editorial .ed-why .ed-why-text .display-md { margin-top: 1.5rem; max-width: 14ch; }
.editorial .ed-why .ed-why-text .body-lg { margin-top: 1.5rem; }
.editorial .ed-why .ed-why-number {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(7rem, 14vw, 12rem);
  line-height: 0.85;
  color: var(--paper-warm);
  font-weight: 300;
  letter-spacing: -0.05em;
  font-variation-settings: "opsz" 144, "SOFT" 80, "WONK" 1;
  user-select: none;
}
.editorial .ed-why .ed-why-visual {
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-warm);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.editorial .ed-why .ed-why-visual.tone-teal { background: var(--teal-deep); color: var(--paper); }
.editorial .ed-why .ed-why-visual.tone-coral,
.editorial .ed-why .ed-why-visual.tone-teal-bright { background: var(--teal-bright); color: var(--ink); }
.editorial .ed-why .ed-why-visual.tone-paper { background: var(--paper-warm); color: var(--ink); }
.editorial .ed-why .ed-why-visual.tone-soft { background: var(--teal-soft); color: var(--ink); }
.editorial .ed-why .ed-why-visual.tone-ink { background: var(--ink); color: var(--paper); }
@media (max-width: 900px) {
  .editorial .ed-why .ed-why-row { grid-template-columns: 1fr; }
  .editorial .ed-why .ed-why-row.flip { direction: ltr; }
  .editorial .ed-why .ed-why-visual { aspect-ratio: 5/4; }
}

/* ---- Big stats row ---- */
.editorial .ed-stats {
  background: var(--paper);
}
.editorial .ed-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 720px) { .editorial .ed-stats-grid { grid-template-columns: repeat(2, 1fr); } }
.editorial .ed-stat {
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 2vw, 1.5rem);
  border-right: 1px solid var(--rule);
  text-align: left;
}
.editorial .ed-stat:last-child { border-right: 0; }
@media (max-width: 720px) {
  .editorial .ed-stat:nth-child(2) { border-right: 0; }
  .editorial .ed-stat:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
}
.editorial .ed-stat-num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 5.5vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  display: block;
  margin-bottom: 0.5rem;
}
.editorial .ed-stat-label {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.4;
  max-width: 22ch;
}

/* ---- Audience picker (editorial version) ---- */
.editorial .ed-picker {
  background: var(--paper-warm);
}
.editorial .ed-picker .ed-picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
@media (max-width: 800px) { .editorial .ed-picker .ed-picker-grid { grid-template-columns: 1fr; } }
.editorial .ed-picker-card {
  background: var(--paper);
  border-radius: 14px;
  padding: clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--rule);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  min-height: 380px;
}
.editorial .ed-picker-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(10, 24, 32, 0.12);
  text-decoration: none;
}
.editorial .ed-picker-card .display-md { font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 0; max-width: 12ch; }
.editorial .ed-picker-card p {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}
.editorial .ed-picker-card .ed-picker-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
}
.editorial .ed-picker-card:hover .ed-picker-cta .arrow { transform: translateX(6px); }

/* ---- Closing CTA ---- */
.editorial .ed-closer {
  background: var(--ink);
  color: var(--paper);
  text-align: left;
  padding-block: clamp(6rem, 14vw, 12rem);
}
.editorial .ed-closer .display-xl {
  max-width: 14ch;
  margin: 0;
}
.editorial .ed-closer .ed-closer-meta {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.editorial .ed-closer .ed-closer-note {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: rgba(245, 241, 234, 0.7);
  max-width: 34ch;
}

/* ---- Subtle scroll reveal (additive on editorial blocks) ---- */
.editorial [data-ed-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  will-change: opacity, transform;
}
.editorial [data-ed-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}
.editorial [data-ed-reveal-delay="1"] { transition-delay: 0.08s; }
.editorial [data-ed-reveal-delay="2"] { transition-delay: 0.16s; }
.editorial [data-ed-reveal-delay="3"] { transition-delay: 0.24s; }
.editorial [data-ed-reveal-delay="4"] { transition-delay: 0.32s; }
.editorial [data-ed-reveal-delay="5"] { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  .editorial [data-ed-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---- Hero headline split-line reveal ---- */
.editorial .ed-hero h1 .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.editorial .ed-hero h1 .word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.editorial .ed-hero.is-in h1 .word > span { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .editorial .ed-hero h1 .word > span { transform: none !important; }
}

/* ---- Subnav adjustments for editorial pages ---- */
body.editorial-body {
  background: var(--paper);
}
body.editorial-body .site-header {
  background: rgba(238, 244, 248, 0.94);
  border-bottom-color: var(--rule);
}
body.editorial-body .nav a {
  font-weight: 500;
}
