/* Bay Transit Co — identity-led heritage system. Official marks remain untouched. */
:root {
  /* Ink, White, a hint of Rust; neutral tints of ink for muted text and lines. */
  --identity-paper: #FFFFFF;
  --identity-ink: #0E0E0E;
  --identity-muted: #555555; /* 7.46:1 on white */
  --identity-line: #D9D9D9;
  --identity-soft: #F5F5F5;
  --identity-rust: #C45C2A; /* one accent only (hero ramp lane line + link-hover underline); never behind small text */
  --identity-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --identity-body: "Barlow", Arial, sans-serif;
}

html, body { background: var(--identity-paper) !important; color: var(--identity-ink) !important; }
body { font-family: var(--identity-body) !important; }
.container { width: min(100%, 1320px) !important; max-width: 1320px !important; padding-inline: clamp(1.25rem, 4vw, 4rem) !important; }

header { position: sticky !important; top: 0; z-index: 30; background: var(--identity-paper) !important; border-bottom: 2px solid var(--identity-ink) !important; backdrop-filter: none !important; }
.header-inner { max-width: 1320px !important; min-height: 82px; padding: 0 clamp(1.25rem, 4vw, 4rem) !important; }
.logo { gap: .9rem !important; }
.logo-mark { width: 36px !important; height: 36px !important; object-fit: contain; }
.logo-wordmark { width: 142px !important; height: auto !important; object-fit: contain; }
.nav-links { gap: clamp(.9rem, 1.9vw, 2.1rem) !important; }
.nav-links a, .nav-links button { font-family: var(--identity-body) !important; color: var(--identity-ink) !important; font-size: .72rem !important; font-weight: 700 !important; letter-spacing: .08em !important; text-transform: uppercase !important; }
.nav-links a:hover, .nav-links button:hover { color: var(--identity-muted) !important; }
.nav-cta, .nav-links .nav-cta { background: var(--identity-ink) !important; color: var(--identity-paper) !important; border: 2px solid var(--identity-ink) !important; padding: .75rem 1rem !important; }
.nav-cta:hover, .nav-links .nav-cta:hover { background: var(--identity-muted) !important; border-color: var(--identity-muted) !important; }

section, #hero { background: var(--identity-paper) !important; }
#hero { padding: clamp(2rem, 5vw, 4.5rem) 0 !important; border: 0 !important; }
#hero .container { border: clamp(6px, .7vw, 10px) solid var(--identity-ink); padding: clamp(.45rem, .8vw, .7rem) !important; }
.hero-frame { position: relative; overflow: hidden; border: 2px solid var(--identity-ink); padding: clamp(1.4rem, 4vw, 4rem); }
.hero-frame::before, .hero-frame::after { z-index: 3; }

.hero-meta, .hero-brand, .hero-grid, .tagline-hard, .stats-ledger { position: relative; z-index: 1; }
.hero-frame::before, .hero-frame::after { content: ""; position: absolute; width: 28px; height: 28px; pointer-events: none; }
.hero-frame::before { inset: 14px auto auto 14px; border-top: 2px solid var(--identity-muted); border-left: 2px solid var(--identity-muted); }
.hero-frame::after { inset: auto 14px 14px auto; border-right: 2px solid var(--identity-muted); border-bottom: 2px solid var(--identity-muted); }
.hero-meta { display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: 0 0 1.5rem !important; border-bottom: 2px solid var(--identity-ink) !important; color: var(--identity-muted) !important; font-family: var(--identity-body) !important; font-size: .66rem !important; font-weight: 700 !important; letter-spacing: .13em !important; text-transform: uppercase; }
.hero-meta span:last-child { text-align: right; }
.hero-meta-mark { display: block; width: 48px; height: 48px; object-fit: contain; justify-self: center; }
.hero-seal { display: inline-flex; justify-self: center; align-items: center; gap: .7rem; white-space: nowrap; color: var(--identity-ink); font-family: var(--identity-display); font-size: 1.05rem; letter-spacing: .08em; }
.hero-seal::before, .hero-seal::after { content: ""; width: clamp(1.5rem, 4vw, 4.5rem); height: 1px; background: var(--identity-ink); }
.hero-brand { display: flex; justify-content: center; padding: clamp(2.75rem, 6vw, 6rem) 0 clamp(2rem, 4vw, 3.5rem); border-bottom: 2px solid var(--identity-ink); }
.hero-brand img { display: block; width: min(100%, 760px); height: auto; max-height: 190px; object-fit: contain; }
.hero-grid { display: grid !important; grid-template-columns: minmax(0, 1.2fr) minmax(270px, .8fr) !important; gap: clamp(2rem, 6vw, 6rem) !important; align-items: end !important; padding: clamp(2.5rem, 5vw, 5rem) 0 2rem !important; background: transparent !important; }
.hero-grid::before { display: none !important; }
.hero-h1, .hero-headline-col .hero-h1 { margin: 0 !important; font-family: var(--identity-display) !important; font-size: clamp(4rem, 9vw, 8.5rem) !important; font-weight: 400 !important; line-height: .82 !important; letter-spacing: 0 !important; text-transform: uppercase !important; color: var(--identity-ink) !important; }
.hero-h1 .accent, .hero-headline-col .hero-h1 .accent { color: var(--identity-muted) !important; }
.hero-copy-col { padding: 0 !important; gap: 1.25rem !important; border-top: 4px solid var(--identity-ink) !important; padding-top: 1.4rem !important; }
.hero-copy-col .hero-sub { font-family: var(--identity-body) !important; color: var(--identity-ink) !important; font-size: 1.12rem !important; line-height: 1.55 !important; font-weight: 500 !important; }
.hero-copy-col .hero-proofline { font-family: var(--identity-body) !important; color: var(--identity-muted) !important; font-size: .92rem !important; line-height: 1.55 !important; }
.hero-btns { gap: .7rem !important; }
.hero-btns .btn-primary, .btn-primary, .hero-btns .btn-outline, .btn-outline, .btn-consulting, .btn-call { border-radius: 0 !important; box-shadow: none !important; font-family: var(--identity-body) !important; font-size: .75rem !important; font-weight: 800 !important; letter-spacing: .08em !important; text-transform: uppercase !important; padding: 1rem 1.35rem !important; }
.hero-btns .btn-primary, .btn-primary, .btn-call { background: var(--identity-ink) !important; border: 2px solid var(--identity-ink) !important; color: var(--identity-paper) !important; }
.hero-btns .btn-outline, .btn-outline, .btn-consulting { background: transparent !important; border: 2px solid var(--identity-ink) !important; color: var(--identity-ink) !important; }
.hero-btns .btn-primary:hover, .btn-primary:hover, .btn-call:hover { background: var(--identity-muted) !important; border-color: var(--identity-muted) !important; }
.hero-btns .btn-outline:hover, .btn-outline:hover, .btn-consulting:hover { background: var(--identity-ink) !important; color: var(--identity-paper) !important; }
.tagline-hard { margin: 1rem 0 !important; color: var(--identity-muted) !important; font-family: var(--identity-body) !important; font-size: .7rem !important; font-weight: 700 !important; letter-spacing: .15em !important; text-transform: uppercase !important; }
.stats-ledger { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 1px !important; border: 2px solid var(--identity-ink) !important; background: var(--identity-ink) !important; }
.stat-cell { display: flex !important; flex-direction: column-reverse; gap: .4rem; min-height: 116px !important; padding: 1.3rem !important; border: 0 !important; background: var(--identity-paper) !important; justify-content: center; }
.stat-cell .stat-num { font-family: var(--identity-display) !important; color: var(--identity-ink) !important; font-size: clamp(1.7rem, 2.9vw, 2.9rem) !important; font-weight: 400 !important; line-height: .9 !important; letter-spacing: 0 !important; }
.stat-cell .stat-label { margin: 0 !important; color: var(--identity-muted) !important; font-family: var(--identity-body) !important; font-size: .66rem !important; font-weight: 700 !important; letter-spacing: .1em !important; text-transform: uppercase !important; }
.stat-cell .stat-note { margin: 0 !important; color: var(--identity-muted) !important; font-family: var(--identity-body) !important; font-size: .62rem !important; font-weight: 700 !important; letter-spacing: .1em !important; text-transform: uppercase !important; }

/* Headline accent word reads muted gray, not rust (rust is kept for the hero ramp line). CTA stays ink. */
.hero-h1 .accent, .hero-headline-col .hero-h1 .accent { color: var(--identity-muted) !important; }
#hero .hero-btns .btn-primary { background: var(--identity-ink) !important; border-color: var(--identity-ink) !important; color: var(--identity-paper) !important; }
#hero .hero-btns .btn-primary:hover { background: var(--identity-muted) !important; border-color: var(--identity-muted) !important; }
.tagline-hard { margin: 1.6rem 0 1.1rem !important; color: var(--identity-ink) !important; font-family: var(--identity-display) !important; font-size: clamp(1.6rem, 3.4vw, 2.6rem) !important; font-weight: 400 !important; letter-spacing: .04em !important; text-transform: uppercase !important; }
.tagline-hard .accent { color: var(--identity-muted) !important; }


#proof, #services, #how, #about, #record, #consulting, #contact { padding: clamp(5rem, 9vw, 9rem) 0 !important; border-top: 2px solid var(--identity-ink) !important; }
.section-label, .page-label { color: var(--identity-muted) !important; font-family: var(--identity-body) !important; font-size: .68rem !important; font-weight: 700 !important; letter-spacing: .14em !important; text-transform: uppercase !important; }
.section-title, .proof-lead .section-title, .contact-cta-panel h3 { color: var(--identity-ink) !important; font-family: var(--identity-display) !important; font-size: clamp(3.3rem, 7vw, 6.5rem) !important; font-weight: 400 !important; line-height: .88 !important; letter-spacing: 0 !important; text-transform: uppercase !important; }
.section-title .accent, .proof-lead .section-title .accent { color: var(--identity-muted) !important; }
.section-header, .consulting-header, .proof-lead { max-width: 60rem !important; margin-bottom: clamp(3rem, 6vw, 5rem) !important; }
.section-header p:not(.section-label), .consulting-header p:not(.section-label), .proof-intro, .consulting-cta-row p, .about-text p, .contact-cta-panel p { color: var(--identity-muted) !important; font-family: var(--identity-body) !important; font-size: 1rem !important; line-height: 1.65 !important; }
.proof-grid, .services-grid, .steps-grid, .consulting-layout { border-top: 4px solid var(--identity-ink) !important; gap: 0 !important; background: transparent !important; }
.proof-grid { grid-template-columns: repeat(3, 1fr) !important; }
.services-grid { grid-template-columns: repeat(3, 1fr) !important; }
.steps-grid { grid-template-columns: repeat(4, 1fr) !important; }
.proof-card, .service-card, .step-card, .consulting-card, .about-card { background: transparent !important; border: 0 !important; border-right: 1px solid var(--identity-line) !important; border-bottom: 1px solid var(--identity-line) !important; border-radius: 0 !important; box-shadow: none !important; padding: clamp(1.5rem, 3vw, 2.5rem) !important; }
.proof-card:last-child, .service-card:nth-child(3n), .step-card:last-child { border-right: 0 !important; }
.proof-card:hover, .service-card:hover { background: var(--identity-soft) !important; transform: none !important; }
.proof-marker, .step-num, .consulting-card-num { color: var(--identity-muted) !important; background: none !important; font-family: var(--identity-body) !important; font-size: .68rem !important; font-weight: 700 !important; letter-spacing: .12em !important; }
.proof-metric { color: var(--identity-ink) !important; font-family: var(--identity-display) !important; font-size: 3.5rem !important; font-weight: 400 !important; letter-spacing: 0 !important; }
.proof-card h3, .service-card h3, .step-card h3, .consulting-card h3, .about-card h3, .contact-cta-block h3 { color: var(--identity-ink) !important; font-family: var(--identity-display) !important; font-size: 1.65rem !important; font-weight: 400 !important; letter-spacing: .02em !important; text-transform: uppercase !important; }
.proof-card p, .service-card p, .step-card p, .consulting-card p, .about-card p { color: var(--identity-muted) !important; font-family: var(--identity-body) !important; font-size: .9rem !important; line-height: 1.6 !important; }
.service-icon { width: auto !important; height: auto !important; background: none !important; border: 0 !important; }
.service-icon svg, .contact-info-icon svg { stroke: var(--identity-muted) !important; fill: none !important; }
.about-grid { grid-template-columns: 1.3fr .7fr !important; gap: clamp(3rem, 7vw, 7rem) !important; }
.about-cards { border-top: 4px solid var(--identity-ink); }
.consulting-layout { grid-template-columns: repeat(2, 1fr) !important; }
.consulting-card:nth-child(2n) { border-right: 0 !important; }
.consulting-cta-row, .contact-grid { border-top: 4px solid var(--identity-ink) !important; background: transparent !important; border-radius: 0 !important; }
.contact-form-wrap, .contact-cta-panel, .contact-info-block, .contact-cta-block { background: transparent !important; border-radius: 0 !important; box-shadow: none !important; }
.contact-grid { grid-template-columns: 1.15fr .85fr !important; }
.contact-info-icon { background: transparent !important; }

footer { background: var(--identity-ink) !important; color: var(--identity-paper) !important; padding: 5rem 0 2.5rem !important; }
.footer-brand .footer-logo { display: block; width: min(100%, 220px); height: auto; margin-bottom: 1.25rem; }
footer p, footer li, footer a, footer span { color: var(--identity-line) !important; }
.footer-col h4 { color: var(--identity-paper) !important; font-family: var(--identity-display) !important; font-size: 1.25rem !important; font-weight: 400 !important; letter-spacing: .06em !important; }
.social-link { border: 1px solid var(--identity-line) !important; border-radius: 0 !important; }

@media (max-width: 980px) {
  .nav-links { display: none !important; }
  .hamburger { display: flex !important; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .hero-seal { grid-column: 1 / -1; grid-row: 1; }
  .hero-grid { grid-template-columns: 1fr !important; }
  .proof-grid, .services-grid, .steps-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .stats-ledger { grid-template-columns: repeat(3, 1fr) !important; }

  .proof-card:nth-child(2n), .service-card:nth-child(2n), .step-card:nth-child(2n) { border-right: 0 !important; }
  .about-grid, .contact-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  .header-inner { min-height: 68px; }
  .logo-wordmark { width: 118px !important; }
  #hero { padding: 1rem 0 3rem !important; }
  #hero .container { border-width: 5px; padding: .35rem !important; }
  .hero-frame { padding: 1.4rem 1rem; }
  .hero-meta { gap: .7rem; font-size: .55rem !important; }
  .hero-brand { padding: 3rem .75rem 2.5rem; }
  .hero-h1, .hero-headline-col .hero-h1 { font-size: clamp(3.8rem, 20vw, 6.2rem) !important; }
  .hero-btns .btn-primary, .hero-btns .btn-outline { width: 100%; text-align: center; }
  .stats-ledger { grid-template-columns: repeat(2, 1fr) !important; }
  .stat-cell:first-child { grid-column: 1 / -1; } /* 3 stats on 2 columns: proof line spans the top row, no empty cell */

  .proof-grid, .services-grid, .steps-grid, .consulting-layout { grid-template-columns: 1fr !important; }
  .proof-card, .service-card, .step-card, .consulting-card { border-right: 0 !important; }
  .section-title, .proof-lead .section-title { font-size: clamp(3rem, 17vw, 5rem) !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ============================================================
   SITE-WIDE — carry the identity system across every page
   ============================================================ */

/* Point the base tokens at the identity layer so dark mode flips them too. */
:root {
  --ink: var(--identity-ink) !important;
  --muted: var(--identity-muted) !important;
  --line: var(--identity-line) !important;
  --band: var(--identity-soft) !important;
  --bg-page: var(--identity-paper) !important;
  --bg-surface: var(--identity-paper) !important;
  --bg-alt: var(--identity-line) !important;
  --text-on-light: var(--identity-ink) !important;
  --hint: var(--identity-muted) !important;
  --footer-muted: var(--identity-line) !important;
}

/* Type roles everywhere, including inline-styled legacy markup. */
h1, h2, h3, h4, h5,
.page-title, .section-title, .focus-num, .process-step-num,
[style*="loos-extended"] {
  font-family: var(--identity-display) !important;
  font-weight: 400 !important;
  letter-spacing: .02em !important;
  text-transform: uppercase !important;
}
p, li, a, span, label, input, textarea, select, button, td, th, dd, dt, blockquote {
  font-family: var(--identity-body) !important;
}
main p, main li { color: var(--identity-muted) !important; letter-spacing: 0 !important; text-transform: none !important; font-weight: 400 !important; }
main a { letter-spacing: 0 !important; text-transform: none !important; }

/* Interior page hero — same framed plate as the homepage, quieter. */
.page-hero { position: relative; background: var(--identity-paper) !important; padding: clamp(2rem, 5vw, 4rem) 0 clamp(2.5rem, 5vw, 4.5rem) !important; border-bottom: 2px solid var(--identity-ink) !important; }
.page-hero .hero-bg { display: none !important; }
.page-hero .container { padding-top: clamp(2.5rem, 6vw, 5rem) !important; padding-bottom: 0 !important; }
.page-hero .hero-grid { display: grid !important; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr) !important; gap: clamp(2rem, 6vw, 5rem) !important; align-items: end !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
.page-hero .hero-grid::before { display: none !important; }
.back-link { display: inline-block; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); padding-bottom: .3rem; border-bottom: 2px solid var(--identity-ink); color: var(--identity-ink) !important; font-size: .68rem !important; font-weight: 800 !important; letter-spacing: .14em !important; text-transform: uppercase !important; }
.back-link:hover { color: var(--identity-muted) !important; border-color: var(--identity-muted); }
.page-title, .page-hero h1 { margin: .6rem 0 0 !important; color: var(--identity-ink) !important; font-size: clamp(3rem, 7vw, 6.4rem) !important; line-height: .86 !important; letter-spacing: 0 !important; max-width: 18ch; }
.page-title .accent, .page-hero h1 .accent { color: var(--identity-muted) !important; }
.page-hero .hero-right { border-top: 4px solid var(--identity-ink); padding-top: 1.4rem; display: flex; flex-direction: column; gap: 1.4rem; align-items: flex-start; }
.page-sub { color: var(--identity-ink) !important; font-size: 1.05rem !important; line-height: 1.6 !important; font-weight: 500 !important; }

/* Hairline rules replace the old road stripe. */
.road-rule { height: 2px !important; background: var(--identity-ink) !important; background-image: none !important; border: 0 !important; opacity: 1 !important; }

/* Flatten every legacy card into the ledger grid. */
section[style], .focus-section, .process-section { background: var(--identity-paper) !important; }
.focus-grid, .process-grid, .cta-grid, .legal-grid {
  gap: 0 !important; background: transparent !important;
  border-top: 4px solid var(--identity-ink) !important;
  border-left: 1px solid var(--identity-line) !important;
}
.focus-card, .process-step, .media-card, .legal-card {
  background: transparent !important; border: 0 !important;
  border-right: 1px solid var(--identity-line) !important;
  border-bottom: 1px solid var(--identity-line) !important;
  border-radius: 0 !important; box-shadow: none !important;
  padding: clamp(1.75rem, 3vw, 2.5rem) !important;
}
.focus-card:hover, .process-step:hover { background: var(--identity-soft) !important; transform: none !important; border-top-color: transparent !important; }
.focus-num, .process-step-num {
  position: static !important; opacity: 1 !important; margin-bottom: 1rem !important;
  color: var(--identity-muted) !important; font-size: .72rem !important; font-weight: 700 !important;
  letter-spacing: .14em !important; font-family: var(--identity-body) !important;
}
.focus-card h3, .process-step h3, .media-card h3 { font-size: 1.5rem !important; color: var(--identity-ink) !important; margin-bottom: .8rem !important; }
.focus-card ul { border-top: 1px solid var(--identity-line); margin-top: 1.25rem !important; padding-top: 1rem; gap: 0 !important; }
.focus-card li { padding: .5rem 0 !important; border-bottom: 1px solid var(--identity-line); font-size: .84rem !important; }
.focus-card li:last-child { border-bottom: 0; }

/* Section headers: left-aligned, no centered legacy blocks. */
.focus-section-header, .process-header, .section-header { text-align: left !important; max-width: 60rem !important; }

/* Media / on-the-record entries. */
main article { background: transparent !important; border: 0 !important; border-top: 1px solid var(--identity-line) !important; border-left: 0 !important; border-radius: 0 !important; padding: clamp(1.5rem, 3vw, 2.25rem) 0 !important; }
main article:first-of-type { border-top: 4px solid var(--identity-ink) !important; }

/* Legal pages: readable measure, quiet rules. */
.legal-body, .legal-content { max-width: 46rem; }
.legal-body h2, .legal-content h2 { margin-top: 2.75rem !important; padding-top: 1.25rem; border-top: 1px solid var(--identity-line); font-size: 1.6rem !important; }

/* Forms. */
input, textarea, select { background: var(--identity-paper) !important; border: 2px solid var(--identity-ink) !important; border-radius: 0 !important; color: var(--identity-ink) !important; box-shadow: none !important; }
input:focus, textarea:focus, select:focus { outline: 0 !important; border-color: var(--identity-muted) !important; }
label { color: var(--identity-muted) !important; font-size: .68rem !important; font-weight: 700 !important; letter-spacing: .12em !important; text-transform: uppercase !important; }
form button[type="submit"], .btn-submit { background: var(--identity-ink) !important; color: var(--identity-paper) !important; border: 2px solid var(--identity-ink) !important; border-radius: 0 !important; font-weight: 800 !important; letter-spacing: .08em !important; text-transform: uppercase !important; }
form button[type="submit"]:hover, .btn-submit:hover { background: var(--identity-muted) !important; border-color: var(--identity-muted) !important; }

@media (max-width: 980px) {
  .page-hero .hero-grid { grid-template-columns: 1fr !important; }
  .focus-grid, .process-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  .page-title, .page-hero h1 { font-size: clamp(2.6rem, 14vw, 4rem) !important; }
}

/* --- interior page refinements --- */
.page-hero { padding-top: clamp(1.5rem, 3vw, 2.5rem) !important; }
.page-hero .container { padding-top: clamp(2rem, 4vw, 3.25rem) !important; }
.page-hero .hero-grid { align-items: start !important; }
.page-hero .hero-left { display: flex; flex-direction: column; }
h1 span, h2 span, h3 span, .page-title span, .section-title span, .hero-h1 span {
  font-family: inherit !important; font-weight: inherit !important; letter-spacing: inherit !important;
}
main article h3, main article h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem) !important; line-height: 1.02 !important; max-width: 26ch; }
main article .section-label { margin-bottom: .6rem !important; }
.legal-body h2, .legal-content h2, main h2[id] { font-size: 1.5rem !important; }
main article .section-title, main article h2.section-title, main article h3.section-title {
  font-size: clamp(1.5rem, 2.6vw, 2.15rem) !important; line-height: 1.04 !important; max-width: 30ch;
}

/* ============================================================
   THEME TOGGLE + DARK MODE
   ============================================================ */

.theme-toggle {
  display: inline-flex !important; align-items: center; gap: .4rem;
  background: transparent !important; border: 2px solid var(--identity-ink) !important;
  border-radius: 0 !important; padding: .48rem .6rem !important; cursor: pointer;
  color: var(--identity-ink) !important; font-family: var(--identity-body) !important;
  font-size: .6rem !important; font-weight: 800 !important; letter-spacing: .1em !important;
  text-transform: uppercase !important; line-height: 1;
}
.theme-toggle:hover { background: var(--identity-ink) !important; color: var(--identity-paper) !important; }
.theme-toggle svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.mobile-nav .theme-toggle { width: 100%; justify-content: center; margin-top: .5rem; }
[data-theme="dark"] .theme-toggle-dark, .theme-toggle-light { display: none; }
[data-theme="dark"] .theme-toggle-light { display: inline-flex; }
.theme-toggle-dark { display: inline-flex; }
.theme-toggle-light, .theme-toggle-dark { align-items: center; gap: .45rem; }

[data-theme="dark"] {
  --identity-paper: #0E0E0E;
  --identity-ink: #FFFFFF;
  --identity-muted: #A6A6A6; /* 7.93:1 on ink */
  --identity-line: #333333;
  --identity-soft: #1A1A1A;
}
[data-theme="dark"] html, [data-theme="dark"] body { background: #0E0E0E !important; color: #FFFFFF !important; }
[data-theme="dark"] .hero-frame::before, [data-theme="dark"] .hero-frame::after { border-color: var(--identity-muted) !important; }
[data-theme="dark"] .hero-copy-col .hero-sub, [data-theme="dark"] .page-sub { color: var(--identity-ink) !important; }
[data-theme="dark"] #hero .hero-btns .btn-primary { color: #0E0E0E !important; }
[data-theme="dark"] .btn-primary, [data-theme="dark"] .btn-call,
[data-theme="dark"] form button[type="submit"], [data-theme="dark"] .btn-submit,
[data-theme="dark"] .nav-cta, [data-theme="dark"] .nav-links .nav-cta, [data-theme="dark"] .m-cta {
  background: var(--identity-ink) !important; color: #0E0E0E !important; border-color: var(--identity-ink) !important;
}
/* Nav CTA hover in dark mode: keep ink text readable on the lighter hover fill (7.93:1). */
[data-theme="dark"] .nav-links a.nav-cta:hover, [data-theme="dark"] .nav-links button.nav-cta:hover, [data-theme="dark"] .nav-cta:hover {
  background: var(--identity-muted) !important; border-color: var(--identity-muted) !important; color: #0E0E0E !important;
}
[data-theme="dark"] .proof-card:hover, [data-theme="dark"] .service-card:hover,
[data-theme="dark"] .focus-card:hover, [data-theme="dark"] .process-step:hover { background: var(--identity-soft) !important; }
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select {
  background: var(--identity-soft) !important; color: var(--identity-ink) !important; border-color: var(--identity-muted) !important;
}
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: var(--identity-muted) !important; }
[data-theme="dark"] header { background: #0E0E0E !important; border-bottom-color: var(--identity-muted) !important; }
[data-theme="dark"] .mobile-nav { background: #0E0E0E !important; }
[data-theme="dark"] footer { background: #0E0E0E !important; color: #FFFFFF !important; border-top: 1px solid var(--identity-line) !important; }
[data-theme="dark"] footer p, [data-theme="dark"] footer li, [data-theme="dark"] footer a, [data-theme="dark"] footer span { color: #BFBFBF !important; }
[data-theme="dark"] .footer-col h4 { color: #FFFFFF !important; }
[data-theme="dark"] .social-link { border-color: #4D4D4D !important; }
[data-theme="dark"] .road-rule { background: var(--identity-muted) !important; }
[data-theme="dark"] .service-icon svg, [data-theme="dark"] .contact-info-icon svg { stroke: var(--identity-muted) !important; }

/* Legacy masked header lockup + odd hardcoded greys in dark mode. */
[data-theme="dark"] header .logo::before { background: #FFFFFF !important; }
[data-theme="dark"] header .logo::after, [data-theme="dark"] header .logo { color: #FFFFFF !important; }
[data-theme="dark"] .theme-toggle { color: #FFFFFF !important; border-color: #FFFFFF !important; }
[data-theme="dark"] .theme-toggle:hover { background: #FFFFFF !important; color: #0E0E0E !important; }
[data-theme="dark"] .contact-info-item a, [data-theme="dark"] .contact-info-item span { color: #D9D9D9 !important; }
[data-theme="dark"] .contact-info-item strong, [data-theme="dark"] .status-label,
[data-theme="dark"] .stat-label, [data-theme="dark"] .focus-num, [data-theme="dark"] .consulting-card-num { color: var(--identity-muted) !important; }
[data-theme="dark"] .hero-road, [data-theme="dark"] .road-rule { background: var(--identity-muted) !important; }
[data-theme="dark"] .service-icon, [data-theme="dark"] .contact-info-icon { border-color: var(--identity-muted) !important; }
[data-theme="dark"] .focus-card li, [data-theme="dark"] .focus-card ul { border-color: var(--identity-line) !important; }
[data-theme="dark"] main a:not(.btn-primary):not(.btn-outline):not(.btn-call):not(.btn-consulting):not(.back-link) { color: var(--identity-ink) !important; }
[data-theme="dark"] .back-link { color: var(--identity-ink) !important; border-color: var(--identity-ink) !important; }
/* Contact hero email link had no class and rendered browser-default blue; ink like its siblings. */
.hero-contact-list a { color: var(--identity-ink) !important; }

/* ============================================================
   RUST, SPARINGLY — ink and gray by default; rust only on the hero ramp
   lane line (brand/motif.css) and the link-hover underline below
   ============================================================ */

/* Small numerals and step markers stay muted (never rust). */
.proof-marker, .step-num, .consulting-card-num, .focus-num, .process-step-num { color: var(--identity-muted) !important; }

/* Hover states, not resting states: a thin ink rule on cards. */
.proof-card, .service-card, .step-card, .consulting-card,
.focus-card, .process-step, .media-card { transition: box-shadow .18s ease, background .18s ease; }
.proof-card:hover, .service-card:hover, .step-card:hover, .consulting-card:hover,
.focus-card:hover, .process-step:hover, .media-card:hover {
  box-shadow: inset 0 2px 0 0 var(--identity-ink) !important;
}

main a:not(.btn-primary):not(.btn-outline):not(.btn-call):not(.btn-consulting):not(.back-link):hover,
footer a:hover { text-decoration: underline !important; text-decoration-color: var(--identity-rust) !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px; }
footer a:hover { color: #FFFFFF !important; }
.back-link:hover { color: var(--identity-ink) !important; border-color: var(--identity-muted) !important; }
.social-link:hover { border-color: #FFFFFF !important; color: #FFFFFF !important; }

/* Form focus: the 2px ink border thickens to 4px (ink ring), no rust. */
input:focus, textarea:focus, select:focus { border-color: var(--identity-ink) !important; box-shadow: 0 0 0 2px var(--identity-ink) !important; }

/* Keyboard focus ring on the ink footer: white instead of ink. */
footer a:focus-visible, footer button:focus-visible { outline-color: #FFFFFF !important; }

/* Interior hero: hairline ink rule under the eyebrow label. */
.page-hero .page-label, .page-hero .section-label { position: relative; padding-bottom: .55rem; }
.page-hero .page-label::after, .page-hero .section-label::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px;
  background: var(--identity-ink);
}

/* Footer column headings get the same hairline. */
.footer-col h4 { position: relative; padding-bottom: .6rem; }
.footer-col h4::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 24px; height: 2px;
  background: #FFFFFF;
}

[data-theme="dark"] .proof-marker, [data-theme="dark"] .step-num,
[data-theme="dark"] .consulting-card-num, [data-theme="dark"] .focus-num,
[data-theme="dark"] .process-step-num { color: var(--identity-muted) !important; }
[data-theme="dark"] footer a:hover { color: #FFFFFF !important; }

/* Services grid holds 5 cards (2026-09-26 brief). Desktop: 3 on top, 2 sharing the full width below, no empty cell. */
.services-grid { grid-template-columns: repeat(6, 1fr) !important; }
.services-grid .service-card { grid-column: span 2; }
.services-grid .service-card:nth-child(4), .services-grid .service-card:nth-child(5) { grid-column: span 3; }
.services-grid .service-card:last-child { border-right: 0 !important; }
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .services-grid .service-card, .services-grid .service-card:nth-child(4), .services-grid .service-card:nth-child(5) { grid-column: auto; }
  .services-grid .service-card:nth-child(odd) { border-right: 1px solid var(--identity-line) !important; }
  .services-grid .service-card:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0 !important; }
}
@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr !important; }
  .services-grid .service-card, .services-grid .service-card:last-child:nth-child(odd) { grid-column: auto; border-right: 0 !important; }
}

/* Founder photo beside the How It Started bio (2026-09-26). */
.about-side { display: flex; flex-direction: column; gap: 2rem; }
.about-photo { margin: 0; border: 1px solid var(--identity-line); }
.about-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }
@media (max-width: 980px) { .about-photo { max-width: 420px; } }
/* Founder LinkedIn text link: same treatment as the site's other text links (ink, rust underline on hover). */
.about-text .about-linkedin { margin-top: .25rem !important; }
.about-linkedin a { color: var(--identity-ink) !important; font-family: var(--identity-body) !important; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.about-linkedin a:hover { text-decoration-color: var(--identity-rust) !important; text-decoration-thickness: 2px !important; }
[data-theme="dark"] .about-linkedin a { color: var(--identity-ink) !important; }

/* Lane map under the hero, joined to the stats ledger (2026-09-27; heading-only + rust hubs 2026-10-01). City dots and lane lines in ink, ringed hubs in rust (variant A, images/lane-map-2026-10-a.svg; -b/-c are alternates). */
.lane-map { position: relative; z-index: 1; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 1rem; padding: clamp(1.25rem, 2.5vw, 2rem); border: 2px solid var(--identity-ink); border-top: 0; background: var(--identity-paper); }
.lane-map-title { margin: 0 !important; color: var(--identity-ink) !important; font-size: 1.65rem !important; line-height: 1 !important; }
.lane-map img { display: block; justify-self: center; width: 100%; max-width: 800px; height: auto; }
/* invert for dark mode, then rotate hue back so the rust hubs stay rust instead of turning blue; grays are unaffected by hue-rotate */
[data-theme="dark"] .lane-map img { filter: invert(.92) hue-rotate(180deg); }
@media (max-width: 640px) {
  .lane-map { padding: 1rem; }
  .lane-map-title { font-size: 1.4rem !important; }
}
