/* ==========================================================================
   Neuro Support — Site rewrite supplement (Phase B)
   Loads AFTER style.css / redesign.css / treatments.css.
   Adds the per-SKU row layout, price block component, flow diagram,
   pull-quote treatment, and cross-page primitives the rewrite needs.
   No redesigns. Existing tokens only.
   ========================================================================== */

/* ---------- Button colour preservation in dark contexts ----------
   The existing CSS sets `.page-header a` and `.section--dark a` to the signal
   colour for inline links. That bleeds into `.btn-primary` and `.btn-outline--light`
   buttons placed in those contexts (specificity 0,1,1 > 0,1,0). The rewrite
   uses dark-context CTAs intentionally on most pages, so re-assert the button
   colours with matching specificity. */
.page-header a.btn-primary,
.section--dark a.btn-primary,
.cta-banner a.btn-primary { color: var(--paper); }
.page-header a.btn-primary:hover,
.section--dark a.btn-primary:hover,
.cta-banner a.btn-primary:hover { color: var(--paper); }

.page-header a.btn-outline,
.section--dark a.btn-outline,
.cta-banner a.btn-outline,
.page-header a.btn-outline--light,
.section--dark a.btn-outline--light,
.cta-banner a.btn-outline--light { color: var(--paper); border-color: rgba(255,255,255,0.4); }
.page-header a.btn-outline:hover,
.section--dark a.btn-outline:hover,
.cta-banner a.btn-outline:hover,
.page-header a.btn-outline--light:hover,
.section--dark a.btn-outline--light:hover,
.cta-banner a.btn-outline--light:hover { color: var(--ink); background: var(--paper); border-color: var(--paper); }

/* ==========================================================================
   Accessibility — derived tokens
   The brand Signal #E8713A is used at small text sizes (eyebrow, "Free"
   pill, "Express interest" link) and as button background. White-on-Signal
   sits at 3.06:1, eyebrow-on-paper at 2.83:1 — both below WCAG AA 4.5:1.
   These derived tokens darken Signal just enough to pass AA at small
   sizes on light/orange backgrounds, while staying inside the orange
   brand family. The base --signal token is unchanged and still drives
   accents, dots, rules, large headings, and hover states.
   ========================================================================== */
:root {
  --signal-text: #B84F1F;     /* small-text on white/paper-2 → 4.94:1 */
  --signal-strong: #B84F1F;   /* button bg, white text → 4.94:1 */
  --signal-strong-hover: #C75826;
  --mist-stronger: rgba(255, 255, 255, 0.65);
  --mist-readable: rgba(255, 255, 255, 0.6);
}

/* Eyebrow text on light backgrounds gets the darker derived signal.
   The ::before bar uses currentColor so it follows automatically. */
.eyebrow:not(.eyebrow--light) { color: var(--signal-text); }

/* Inline links explicitly using inline `color:var(--signal)` for brand
   accent — promote to derived darker variant to hit 4.5:1. */
a[style*="color: var(--signal)"],
a[style*="color:var(--signal)"] { color: var(--signal-text); }

/* "Free" pill / status chip — orange-on-signal-ghost is too low. */
.feature-card h3 span[style*="color:var(--signal)"] { color: var(--signal-text); }

/* Primary button background — darken to pass white-text 4.5:1.
   Specificity 0,2,0 beats .btn-primary (0,1,0). */
a.btn-primary,
button.btn-primary { background: var(--signal-strong); border-color: var(--signal-strong); }
a.btn-primary:hover,
button.btn-primary:hover { background: var(--signal-strong-hover); border-color: var(--signal-strong-hover); }
.nav-cta a { background: var(--signal-strong) !important; }
.nav-cta a:hover { background: var(--signal-strong-hover) !important; }

/* Breadcrumb base mist (.45) and footer-bottom (.42) fall under 4.5:1 on
   void. Bump both to a shade that passes. */
.breadcrumb { color: var(--mist-stronger); }
.footer-bottom { color: var(--mist-readable); }

/* ---------- Skip link (keyboard accessibility) ---------- */
.skip-link:focus {
  position: fixed !important;
  top: 12px !important;
  left: 12px !important;
  z-index: 9999 !important;
  background: var(--signal) !important;
  color: var(--paper) !important;
  padding: 10px 16px !important;
  border-radius: 8px !important;
  width: auto !important;
  height: auto !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------- Per-SKU row layout (Services Sections 3–6) ---------- */
.sku-row {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--s-8);
  align-items: start;
  max-width: 1000px;
}
.sku-row > div:first-child { position: sticky; top: 90px; }
@media (max-width: 880px) {
  .sku-row { grid-template-columns: 1fr; gap: var(--s-6); }
  .sku-row > div:first-child { position: static; }
}

/* ---------- Reusable price block component ---------- */
.price-block {
  margin-top: var(--s-5);
  padding: var(--s-5) var(--s-6);
  background: var(--paper);
  border: 1px solid var(--paper-3);
  border-radius: var(--r);
}
.section--light .price-block { background: var(--paper); }
.price-block__price {
  font-family: var(--font-heading);
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 4px;
}
.price-block__meta {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-bottom: var(--s-3);
}
.price-block__list {
  list-style: none;
  padding: 0;
  margin: var(--s-3) 0 0;
  font-size: 0.92rem;
  color: var(--ink-2);
  line-height: 1.7;
}
.price-block__list li {
  position: relative;
  padding-left: 18px;
}
.price-block__list li + li { margin-top: 4px; }
.price-block__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 10px;
  height: 1.5px;
  background: var(--signal);
}

/* ---------- Service flow diagram (Services Sec 7) ---------- */
.flow-diagram {
  margin-top: var(--s-7);
  padding: var(--s-7);
  background: var(--void-2);
  border: 1px solid var(--void-3);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
}
.flow-diagram__top { display: flex; }
.flow-diagram__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-7);
  width: 100%;
  max-width: 640px;
  margin-top: var(--s-3);
  position: relative;
}
.flow-diagram__split::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 25%;
  right: 25%;
  height: 1px;
  background: var(--void-3);
}
.flow-diagram__branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  text-align: center;
}
.flow-node {
  display: inline-block;
  padding: 14px 22px;
  background: var(--void);
  border: 1px solid var(--void-3);
  border-radius: var(--r);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--paper);
  line-height: 1.45;
  letter-spacing: -0.01em;
}
.flow-node small {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--mist-muted);
  letter-spacing: 0.04em;
  margin-left: 4px;
}
.flow-node--accent {
  background: var(--signal-ghost);
  border-color: rgba(232, 113, 58, 0.4);
  color: var(--paper);
}
.flow-node--quiet {
  background: transparent;
  border-style: dashed;
  color: var(--mist);
  font-weight: 500;
}
.flow-node--quiet small { display: block; margin-left: 0; margin-top: 2px; }
.flow-arrow {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--signal);
  line-height: 1;
}
@media (max-width: 640px) {
  .flow-diagram { padding: var(--s-5); }
  .flow-diagram__split { grid-template-columns: 1fr; gap: var(--s-5); }
  .flow-diagram__split::before { display: none; }
}

/* ---------- Pull-quote (homepage / agent / privacy) ---------- */
/* Strengthens the .callout primitive with a typographic shift the brief
   asks for — larger display weight + Signal-coloured rule. */
.pullquote {
  margin: var(--s-7) 0;
  padding: var(--s-5) 0 var(--s-5) var(--s-6);
  border-left: 3px solid var(--signal);
}
.pullquote p {
  font-family: var(--font-heading);
  font-size: var(--step-3);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.section--dark .pullquote p { color: var(--paper); }

/* ---------- Crisis-line callout (Contact Sec 7, FAQ) ---------- */
.crisis-callout {
  margin-top: var(--s-6);
  padding: var(--s-6);
  background: var(--paper);
  border: 2px solid var(--signal);
  border-radius: var(--r);
}
.section--dark .crisis-callout {
  background: var(--void-2);
}
.crisis-callout h2,
.crisis-callout h3 {
  margin-bottom: var(--s-3);
}
.crisis-callout ul {
  list-style: none;
  padding: 0;
  margin: var(--s-3) 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.crisis-callout li { font-size: var(--step-1); line-height: 1.5; }
.crisis-callout a {
  color: var(--signal-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.section--dark .crisis-callout a { color: var(--signal); }

/* ---------- About page tweaks ---------- */
.about-hero-photo {
  margin-top: var(--s-6);
  width: 100%;
  max-width: 540px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.caption {
  font-style: italic;
  color: var(--mist-muted);
  margin-top: var(--s-3);
  font-size: 0.95rem;
}
.section--dark .caption { color: var(--mist-muted); }

/* ---------- "What we don't promise" (Privacy Sec 9) ---------- */
.unpromise-list {
  list-style: none;
  padding: 0;
  margin: var(--s-5) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.unpromise-list li {
  padding: var(--s-4) var(--s-5);
  background: var(--paper-2);
  border-left: 3px solid var(--signal);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  line-height: 1.6;
}
.unpromise-list li strong { color: var(--ink); display: block; margin-bottom: 4px; }

/* ---------- Two-column "what Jamie can see" list (Privacy Sec 5) ---------- */
.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  margin-top: var(--s-6);
}
.access-col h3 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  margin-bottom: var(--s-3);
}
.access-col--allow h3 { color: var(--signal-text); }
.access-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.access-col li {
  position: relative;
  padding-left: 26px;
  line-height: 1.6;
  color: var(--ink-2);
}
.access-col--allow li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--signal-text);
  font-weight: 700;
}
.access-col--deny li::before {
  content: '×';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.45;
}
@media (max-width: 720px) { .access-grid { grid-template-columns: 1fr; gap: var(--s-5); } }

/* ---------- Privacy diagram (Privacy Sec 3) ----------
   Asymmetric 3:1 proportions match the actual architecture — Home is the
   client's whole workspace; Neuro Support is one shared page within it.
   The visual ratio is the privacy ratio. */
.spaces-diagram {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: var(--s-4);
  margin-top: var(--s-5);
  align-items: stretch;
}
.space-box {
  padding: var(--s-6);
  border-radius: var(--r);
  border: 1px solid var(--paper-3);
  background: var(--paper);
}
.space-box--shared {
  border-color: var(--signal);
  background: var(--signal-ghost);
}
.space-box--shared p { font-size: 0.92rem; }

/* Content-density chips inside Home box — show what lives there so the
   wider container reads as packed rather than empty. */
.space-box__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--s-4);
}
.space-box__chips .chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  background: var(--paper-2);
  border: 1px solid var(--paper-3);
  border-radius: 999px;
  color: var(--ink-2);
  white-space: nowrap;
}
.section--light .space-box__chips .chip {
  background: var(--paper);
}
.space-box__label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--s-2);
}
.space-box--shared .space-box__label { color: var(--signal-text); }
.space-box h3 {
  font-size: var(--step-1);
  margin-bottom: var(--s-2);
}
.space-box p {
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}
@media (max-width: 700px) { .spaces-diagram { grid-template-columns: 1fr; } }

/* ---------- Sub-step block (How it works Step 3, Agent install interview) ---------- */
.substeps {
  margin: var(--s-5) 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  border-left: 2px solid var(--paper-3);
  padding-left: var(--s-5);
}
.section--dark .substeps { border-left-color: var(--void-3); }
.substep__heading {
  font-family: var(--font-heading);
  font-size: var(--step-1);
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.substep__heading time {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--signal-text);
  margin-left: 8px;
}
.section--dark .substep__heading time { color: var(--signal); }
.substep p { margin: 0; line-height: 1.65; }

/* ---------- Quick-jump anchor nav (How it works hero) ---------- */
.quick-jump {
  margin-top: var(--s-5);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--mist-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-3);
  align-items: center;
}
.quick-jump strong {
  color: var(--mist-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  margin-right: var(--s-2);
}
.quick-jump a {
  color: var(--mist);
  border-bottom: 1px dotted rgba(255,255,255,0.3);
  padding-bottom: 1px;
}
.quick-jump a:hover {
  color: var(--signal);
  border-bottom-color: var(--signal);
}
.quick-jump .sep {
  color: rgba(255,255,255,0.25);
}

/* ---------- Workspace contents (How it works Sec 7) ---------- */
.workspace-contents {
  list-style: none;
  padding: 0;
  margin: var(--s-5) 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2) var(--s-5);
}
.workspace-contents li {
  position: relative;
  padding-left: 22px;
  line-height: 1.6;
  color: var(--ink-2);
}
.workspace-contents li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 12px;
  height: 1.5px;
  background: var(--signal);
}
@media (max-width: 600px) { .workspace-contents { grid-template-columns: 1fr; } }

/* ---------- Numbered step section (How it works Sec 2–6) ---------- */
.step-section {
  position: relative;
  padding-left: 88px;
}
.step-section__num {
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--signal);
  line-height: 1;
  letter-spacing: -0.02em;
}
@media (max-width: 720px) {
  .step-section { padding-left: 0; }
  .step-section__num { position: static; display: block; margin-bottom: var(--s-3); }
}

/* ---------- "Day 1 / First two weeks / Ongoing" timeline (Agent Sec 7) ---------- */
.timeline {
  display: grid;
  gap: var(--s-5);
  margin-top: var(--s-5);
}
.timeline__item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--s-5);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--paper-3);
}
.section--dark .timeline__item { border-top-color: var(--void-3); }
.timeline__label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal-text);
  font-weight: 500;
  padding-top: 4px;
}
.section--dark .timeline__label { color: var(--signal); }
.timeline__body p { margin: 0; line-height: 1.7; }
.timeline__body p + p { margin-top: var(--s-3); }
@media (max-width: 720px) {
  .timeline__item { grid-template-columns: 1fr; gap: var(--s-2); }
}

/* ---------- Stack cards (Agent Sec 2 — five-card numbered stack) ---------- */
.stack-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-4);
  margin-top: var(--s-7);
}
.stack-card {
  position: relative;
  padding: var(--s-6);
  padding-top: calc(var(--s-7) + 12px);
  background: var(--paper);
  border: 1px solid var(--paper-3);
  border-radius: var(--r);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.stack-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.section--dark .stack-card {
  background: var(--void-2);
  border-color: var(--void-3);
}
.section--dark .stack-card:hover { border-color: var(--signal); }
.stack-card__num {
  position: absolute;
  top: var(--s-5);
  left: var(--s-6);
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--signal-text);
  line-height: 1;
  letter-spacing: -0.01em;
}
.section--dark .stack-card__num { color: var(--signal); }
.stack-card h3 {
  font-size: var(--step-1);
  margin-bottom: var(--s-3);
}
.stack-card p {
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.section--dark .stack-card h3 { color: var(--paper); }
.section--dark .stack-card p { color: var(--mist-muted); }

/* ---------- "Before / During / After" Contact Sec 3 ---------- */
.expect-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
  margin-top: var(--s-5);
}
.expect-col {
  padding: var(--s-5);
  background: var(--paper-2);
  border: 1px solid var(--paper-3);
  border-radius: var(--r);
}
.expect-col h3 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal-text);
  font-weight: 500;
  margin-bottom: var(--s-3);
}
.expect-col p { line-height: 1.65; margin: 0; }
.expect-col p + p { margin-top: var(--s-3); }
.expect-col ul {
  list-style: none;
  padding: 0;
  margin: var(--s-2) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.expect-col li {
  position: relative;
  padding-left: 18px;
  line-height: 1.55;
  font-size: 0.95rem;
}
.expect-col li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 10px;
  height: 1.5px;
  background: var(--signal);
}
@media (max-width: 800px) {
  .expect-grid { grid-template-columns: 1fr; gap: var(--s-4); }
}

/* ---------- Footer crisis line styling parity ---------- */
.footer .crisis-line a { text-decoration: underline; text-underline-offset: 3px; }
