/*
Theme Name: EK Theme
Description: Minimalist portfolio theme for Edwin Kimani — Enterprise Solutions Architect. Dark-default with light mode, per docs/design/ux-conversion-spec.md (Gate 2).
Author: Edwin Kimani
Version: 1.0.0
Requires PHP: 8.2
License: GPL-2.0-or-later
*/

/* ---------- Design tokens ---------- */
:root {
  --bg: #0b0e13;
  --bg-elevated: #12161f;
  --bg-inset: #0e1118;
  --text: #e7ebf2;
  --text-muted: #9aa3b2;
  --accent: #4c8dff; /* [PLACEHOLDER: owner-approved brand hex] */
  --accent-strong: #6fa3ff;
  --hairline: #232a36;
  --ok: #57c785;
  --warn: #e0a458;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Star tiles retired (owner direction 2026-10-02): the space layer is removed
     completely, replaced by the cloud-network background (.arch-bg, below). */
  --container: 1160px;
  --measure: 72ch;
  color-scheme: dark;
}
[data-theme="light"] {
  /* Light mode per owner direction 2026-09-27: darker still, closer to sky blue (HQA-017 evolution).
     Contrast verified ≥ WCAG AA: on --bg text 12.0:1, muted 5.7:1, accent 5.1:1; on --bg-elevated
     text 13.4:1, muted 6.4:1, accent 5.7:1. */
  --bg: #c9dff2;
  --bg-elevated: #d9eaf9;
  --bg-inset: #bcd6ee;
  --text: #12202e;
  --text-muted: #3f5468;
  --accent: #1552c0;
  --accent-strong: #0f3f9a;
  --hairline: #9fbfdf;
  --ok: #14663e;
  --warn: #8a5c14;
  color-scheme: light;
}
/* [data-theme="light"] .hero-carousel { box-shadow: 0 18px 45px rgba(23, 46, 84, 0.18); }
   (removed v1.4.0: the carousel is no longer a floating card on desktop; see
   the hero section below.) */

/* Light-mode ground (VIS-02 §9): the plain sky-blue HQA-017 color, nothing else —
   the space wash is removed everywhere (not darkened), and the whole .arch-bg
   layer stays unmounted under [data-theme="light"]. */
[data-theme="light"] body { background: var(--bg); }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  /* Flat ground only (VIS-02 §1, owner direction 2026-10-02): the ground gradient,
     architecture artwork and vignette live in the fixed .arch-bg element below —
     no background-attachment, no space imagery. iOS-safe by construction. */
  background: #070b14;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Cloud-network background (VIS-02 — replaces the starfield) ----------
   ONE fixed element carries: the ground gradient + the per-page-variant
   architecture SVG (transparent L1–L3 artwork, mounted by header.php via
   data-variant) + an edge vignette (::after). The packet engine (arch-bg.js)
   overlays a single canvas for L4 traffic; reduced-motion/no-JS never create it.
   Dark mode only: light mode never mounts the layer (VIS-02 §9). */
.arch-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  /* Wrapper safety dial. 2026-10-12 owner direction: push the circuit lines
     further into the background so text stays readable — the whole artwork
     (and its packet canvas) recedes toward the base ground.
     0.68 desktop / 0.62 tablet / 0.66 mobile. */
  opacity: 0.68;
  background-image: var(--arch-art, none), linear-gradient(180deg, #04060b 0%, #0b1322 100%);
  background-repeat: no-repeat;
  background-position: center, 0 0;
  background-size: cover, 100% 100%;
}
.arch-bg[data-variant="a"] { --arch-art: url("assets/img/arch/a-desktop.svg"); }
.arch-bg[data-variant="b"] { --arch-art: url("assets/img/arch/b-desktop.svg"); }
.arch-bg[data-variant="c"] { --arch-art: url("assets/img/arch/c-desktop.svg"); }
.arch-bg[data-variant="d"] { --arch-art: url("assets/img/arch/d-desktop.svg"); }
.arch-bg[data-variant="e"] { --arch-art: url("assets/img/arch/e-desktop.svg"); }
@media (max-width: 1024px) {
  .arch-bg { opacity: 0.62; }
  .arch-bg[data-variant="a"] { --arch-art: url("assets/img/arch/a-tablet.svg"); }
  .arch-bg[data-variant="b"] { --arch-art: url("assets/img/arch/b-tablet.svg"); }
  .arch-bg[data-variant="c"] { --arch-art: url("assets/img/arch/c-tablet.svg"); }
  .arch-bg[data-variant="d"] { --arch-art: url("assets/img/arch/d-tablet.svg"); }
  .arch-bg[data-variant="e"] { --arch-art: url("assets/img/arch/e-tablet.svg"); }
}
@media (max-width: 480px) {
  /* Mobile: ≥0.90 ground under every text zone below the top 24vh band —
     the architecture stays at its reduced strength only in the top band. */
  .arch-bg {
    opacity: 0.66;
    background-image:
      linear-gradient(180deg, rgba(4, 6, 11, 0) 0 24vh, rgba(4, 6, 11, 0.90) 26vh 100%),
      var(--arch-art, none),
      linear-gradient(180deg, #04060b 0%, #0b1322 100%);
    background-size: 100% 100%, cover, 100% 100%;
    background-position: 0 0, center, 0 0;
  }
  .arch-bg[data-variant="a"] { --arch-art: url("assets/img/arch/a-mobile.svg"); }
  .arch-bg[data-variant="b"] { --arch-art: url("assets/img/arch/b-mobile.svg"); }
  .arch-bg[data-variant="c"] { --arch-art: url("assets/img/arch/c-mobile.svg"); }
  .arch-bg[data-variant="d"] { --arch-art: url("assets/img/arch/d-mobile.svg"); }
  .arch-bg[data-variant="e"] { --arch-art: url("assets/img/arch/e-mobile.svg"); }
}
/* Edge vignette: content columns sit on the darkest ground (VIS-02 §1). */
.arch-bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 95% at 50% 42%, rgba(0, 0, 0, 0) 52%, rgba(2, 3, 6, 0.50) 100%);
}
/* Hero scrim (VIS-02 §7) — front page only (body.is-front, set in PHP) so inner
   pages never get it; dies with the layer in light mode. AA/AAA per §7 math. */
body.is-front .arch-bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(640px 420px at 22% 40%, rgba(4, 6, 11, 0.82), transparent 72%),
    linear-gradient(100deg, rgba(4, 6, 11, 0.90) 0%, rgba(4, 6, 11, 0.78) 30%, rgba(4, 6, 11, 0.35) 52%, rgba(4, 6, 11, 0) 66%);
}
/* L4 packet canvas slot (created by arch-bg.js only when motion is allowed):
   above the static artwork, below the vignette, inside the layer's stacking
   context so it can never rise above content. */
.arch-bg canvas {
  position: absolute; inset: 0; z-index: -1; display: block;
  width: 100%; height: 100%; pointer-events: none;
}
/* Layer-opacity changes crossfade, capped at the 700 ms budget; the global
   reduced-motion kill switch (top of this file) already zeroes it. */
@media (prefers-reduced-motion: no-preference) {
  .arch-bg { transition: opacity 0.7s linear; }
}
/* Light mode: the whole layer (artwork, vignette, scrim, canvas) unmounted. */
html[data-theme="light"] .arch-bg { display: none; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.015em; margin: 2.2rem 0 0.8rem; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--hairline); margin: 2.5rem 0; }
code, .mono { font-family: var(--font-mono); font-size: 0.88em; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-muted); margin: 0 0 0.6rem;
}
/* Centered column restored per owner direction 2026-09-27 (round 4): full window
   width withdrawn; the 40/60 hero split stays. */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.prose { max-width: var(--measure); }
/* Grid pages (solutions/projects/about/home) break out of the text measure so
   tile rows and bands span the container; paragraphs keep their reading width. */
.prose-wide { max-width: none; }
.prose-wide > p { max-width: var(--measure); }
.prose-wide > p:has(+ .btn), .prose-wide > .cta-row, .prose-wide > .cta-row + p { max-width: none; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--accent); color: #fff; padding: 0.6rem 1rem; border-radius: 6px;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .container { display: flex; align-items: center; gap: 1.6rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 0.8rem; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .mark {
  display: block; width: 46px; height: 46px;
  border: 1px solid var(--hairline); border-radius: 10px;
}
.brand .name { font-size: 1.35rem; letter-spacing: -0.01em; line-height: 1.1; }
.nav-toggle {
  margin-left: auto; display: none; background: none; border: 1px solid var(--hairline);
  color: var(--text); border-radius: 6px; padding: 0.45rem 0.6rem; cursor: pointer; font-size: 1.1rem;
}
.theme-toggle {
  background: none; border: 1px solid var(--hairline); color: var(--text);
  border-radius: 6px; padding: 0.4rem 0.55rem; cursor: pointer; font-size: 1rem;
}
/* Base rule must precede the mobile media query below: source order was letting
   this display:none override the media query's display:block (DISC-005). */
.header-cta-mobile { display: none; margin-top: 0.6rem; }
.primary-nav { flex: 1 1 auto; }
.primary-nav ul { list-style: none; display: flex; gap: 2.2rem; margin: 0; padding: 0; }
.primary-nav a { color: var(--text-muted); font-size: 1rem; padding: 0.4rem 0; }
.primary-nav a:hover, .primary-nav a:focus-visible, .primary-nav a[aria-current="page"] {
  color: var(--text); text-decoration: none;
  box-shadow: inset 0 -2px 0 var(--accent); /* the single blue underline */
}
.header-cta { margin-left: 0.4rem; white-space: nowrap; }
@media (max-width: 1119px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--hairline);
    display: none; padding: 0.5rem 1.25rem 1rem;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0.4rem; }
  .primary-nav a { display: block; padding: 0.75rem 0.4rem; font-size: 1.08rem; }
  .header-cta { display: none; }
  .header-cta-mobile { display: block; }
}
/* ≤420px: brand name + nav/theme toggles otherwise land within a few px of the
   available width (static audit 2026-09-28; re-budgeted 2026-10-02 for the
   wordmark (then the 15-char camelCase variant, title-case "Cloud Simplified"
   since 2026-10-03): 1.18rem overflowed at 320px and the unguarded 381–399px
   band — clamp the name, widen the guard) — shrink chrome, not content. */
@media (max-width: 420px) {
  .site-header .container { gap: 0.9rem; }
  .brand { gap: 0.6rem; }
  .brand .mark { width: 40px; height: 40px; }
  .brand .name { font-size: clamp(0.9rem, 4.5vw, 1.18rem); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 0.7rem 1.3rem; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; border: 1px solid transparent; cursor: pointer;
  min-height: 44px; line-height: 1.3;
}
/* v1.6.0 PSI a11y finding: white on the bright night-palette accent fails AA
   (3.56:1). Dark text on the bright accent passes (5.4:1); the light palette's
   accent is darker, so white stays there. */
.btn-primary { background: var(--accent); color: #06182f; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; text-decoration: none; }
[data-theme="light"] .btn-primary { color: #fff; }
[data-theme="light"] .btn-primary:hover { color: #fff; }
.btn-secondary { background: none; color: var(--text); border-color: var(--hairline); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.cta-micro { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.5rem; }
.cta-row { display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: center; margin: 1.4rem 0; }

/* ---------- Hero: copy on the left; the problem carousel covers the entire
   right half at full hero height, fading leftward into the hero background
   (v1.4.0 owner direction). ---------- */
.hero { position: relative; border-bottom: 1px solid var(--hairline); }
.hero-inner {
  display: block;
  min-height: min(88vh, 820px);
  min-height: min(88svh, 820px); /* svh: stable under mobile URL-bar show/hide */
  padding-top: clamp(2.2rem, 5vh, 3.6rem);
  padding-bottom: clamp(2.2rem, 5vh, 3.6rem);
}
.hero-who { max-width: min(42%, 34rem); }
.hero-who h1 { font-size: clamp(1.7rem, 2.7vw, 2.55rem); }
.hero .eyebrow { margin-bottom: 0.9rem; }
.hero .credibility { color: var(--text-muted); max-width: 60ch; }

/* Carousel: pinned to the right half, top to bottom of the hero. The elevated
   wash fades in leftward (transparent at the split), so the carousel melts
   into the page background instead of ending at a card edge. Text panels sit
   on the wash and stay readable; the fixed circuit layer shows through. */
.hero-carousel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 52%;
  display: flex; flex-direction: column;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--bg-elevated) 0%, transparent) 0%,
    color-mix(in srgb, var(--bg-elevated) 55%, transparent) 22%,
    color-mix(in srgb, var(--bg-elevated) 88%, transparent) 46%);
  border: 0; border-radius: 0; box-shadow: none; overflow: hidden;
}
.hero-viewport { position: relative; flex: 1 1 auto; min-height: 0; }
.hero-panel {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transform: translateX(26px);
  /* v1.6.0: faster fade-in (0.7s → 0.35s). */
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
}
.hero-panel.is-active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s;
}
.hero-panel-inner {
  height: 100%; display: flex; flex-direction: row; align-items: center; justify-content: flex-start;
  gap: clamp(1.2rem, 2.2vw, 2.4rem); padding: clamp(1.6rem, 3vw, 2.6rem);
}
.hero-panel-intro { flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hero-panel-intro .hero-panel-title { font-size: clamp(1.7rem, 2.8vw, 2.5rem); max-width: 24ch; margin: 0 auto; }
.hero-panel-intro .hero-kicker { margin-bottom: 1rem; }
.hero-kicker {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-muted); margin: 0 0 0.8rem;
}
.hero-panel-title { font-size: clamp(1.4rem, 2.3vw, 2rem); margin: 0 0 0.6rem; letter-spacing: -0.02em; }
.hero-panel-copy { max-width: 46ch; flex: 1 1 auto; min-width: 0; }
.hero-panel-copy .num { font-family: var(--font-mono); color: var(--accent); font-size: 0.9rem; letter-spacing: 0.1em; }
.hero-panel-impact { color: var(--text-muted); font-size: clamp(0.95rem, 1.4vw, 1.08rem); max-width: 44ch; }
.hero-panel-metric { font-size: 0.95rem; margin: 0.8rem 0 0; }
.hero-panel-metric span { color: var(--text-muted); font-size: 0.85rem; }
.hero-panel-art {
  width: clamp(88px, 10vw, 170px); flex: 0 0 auto; align-self: center; color: var(--accent);
  opacity: 0.85; filter: drop-shadow(0 6px 24px color-mix(in srgb, var(--accent) 25%, transparent));
}
.hero-ui {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap;
  border-top: 1px solid var(--hairline); background: transparent;
  padding: 0.9rem clamp(1.6rem, 3vw, 2.6rem);
}
.hero-caption { margin: 0; color: var(--text-muted); font-size: 0.9rem; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-caption strong { color: var(--text); }
/* v1.6.0: controls pinned to the right on every slide — the caption gets a
   flexible, ellipsized track so varying title lengths can never shift them. */
.hero-controls { display: flex; align-items: center; gap: 0.6rem; flex: 0 0 auto; margin-left: auto; }
.hero-controls button {
  background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--hairline); color: var(--text);
  border-radius: 8px; width: 42px; height: 42px; cursor: pointer; font-size: 1rem;
}
.hero-controls button:hover { border-color: var(--accent); color: var(--accent); }
.hero-dots { display: flex; gap: 0.45rem; }
.hero-dots button {
  /* v1.6.0 PSI a11y finding: 11px dots failed the target-size audit. Same
     visual dot, 24px hit area via content-box padding. */
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  padding: 6px; background: var(--hairline); background-clip: content-box;
  border: 1px solid var(--text-muted); position: relative; box-sizing: border-box;
}
.hero-dots button.is-current { background: var(--accent); border-color: var(--accent); }
.hero-dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 980px) {
  /* Stacked: the carousel returns to a normal card under the copy. */
  .hero-inner { min-height: 0; }
  .hero-who { max-width: none; }
  .hero-carousel {
    position: static; width: auto; margin-top: 2.2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--hairline); border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  }
  .hero-viewport { min-height: 430px; }
  .hero-panel-inner { flex-direction: column; align-items: flex-start; justify-content: center; }
  .hero-panel-art { align-self: flex-end; width: clamp(90px, 24vw, 140px); opacity: 0.55; }
  .hero-panel-intro { align-items: center; }
  .hero-ui { flex-direction: column; align-items: flex-start; background: var(--bg-inset); }
  .hero-controls { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  .hero-viewport { min-height: 470px; }
  .hero-panel-art { display: none; }
  .hero-panel-copy .hero-panel-title { font-size: clamp(1.35rem, 6vw, 1.7rem); }
}

/* ---------- Sections / cards / metrics ---------- */
.section { padding: 3.4rem 0; border-bottom: 1px solid var(--hairline); }
/* Single separator before the footer: the footer's own border-top (HQA-021/033). */
main > .section:last-of-type, main > div.container.section:last-of-type { border-bottom: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.metric-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin: 1.8rem 0; }
.metric { background: var(--bg-elevated); border: 1px solid var(--hairline); border-radius: 12px; padding: 1.1rem 1.2rem; }
.metric-value { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.metric-label { color: var(--text-muted); font-size: 0.88rem; }
.metric-status {
  display: inline-block; margin-top: 0.55rem; font-family: var(--font-mono); font-size: 0.7rem;
  border: 1px solid var(--hairline); border-radius: 99px; padding: 0.15rem 0.6rem; color: var(--text-muted);
}
.metric-status.delivered { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.metric-status.target { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin: 1.6rem 0; }
.card { background: var(--bg-elevated); border: 1px solid var(--hairline); border-radius: 12px; padding: 1.25rem 1.35rem; }
.card h3 { margin-top: 0; font-size: 1.05rem; }
.card p { color: var(--text-muted); font-size: 0.93rem; }

/* ---------- Projects: rows with vertical rails (projects-flow reference) ---------- */
.project-row {
  display: grid; grid-template-columns: 10px 1fr; gap: 1.6rem;
  padding: 1.6rem 0 2rem; border-bottom: 1px solid var(--hairline);
}
.project-row:last-of-type { border-bottom: 0; }
.project-rail { position: relative; border-radius: 6px; background: var(--bg-inset); }
.project-rail::before { content: ""; position: absolute; inset: 0; border-radius: 6px; border: 1px solid var(--hairline); }
.rail-fill {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0; border-radius: 6px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 45%, transparent));
  transform-origin: top; transform: scaleY(0.08);
}
.project-meta { font-size: 0.75rem; letter-spacing: 0.08em; color: var(--text-muted); margin: 0 0 0.4rem; }
.project-main { min-width: 0; } /* grid 1fr min-content blowout on mobile (DISC-004) */
.project-main h2 { font-size: clamp(1.25rem, 2.4vw, 1.7rem); margin: 0 0 0.8rem; }
.pio { border-left: 2px solid var(--hairline); padding-left: 1.1rem; margin: 0 0 1rem; }
.pio p { margin: 0 0 0.55rem; color: var(--text-muted); }
.pio strong { color: var(--text); font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; margin-right: 0.35rem; }
.evidence-row { display: flex; flex-direction: row; gap: 0.8rem; margin: 1.1rem 0; }
.evidence-tile {
  flex: 1 1 0; min-width: 0; background: var(--bg-elevated); border: 1px solid var(--hairline);
  border-radius: 10px; padding: 0.8rem 1rem; display: flex; flex-direction: column; gap: 0.2rem;
}
.evidence-tile .metric-value { font-size: 1.45rem; }
.evidence-tile .metric-label { color: var(--text-muted); font-size: 0.8rem; }
@media (max-width: 767px) {
  .project-row { grid-template-columns: 6px 1fr; gap: 1rem; }
  .evidence-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .evidence-tile { flex: 0 0 72%; }
}
.tile .outcome { color: var(--text); }
/* Solutions: one tile per row (HQA-025) with hover-highlight + chip tooltips (HQA-027). */
.solution-list { display: flex; flex-direction: column; gap: 1rem; margin: 1.6rem 0; }
.solution-list .card.tile { transition: border-color 0.2s ease, transform 0.2s ease; }
.solution-list .card.tile:hover,
.solution-list .card.tile:focus-within { border-color: var(--accent); transform: translateY(-2px); }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.8rem; }
.chip {
  position: relative; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted);
  border: 1px solid var(--hairline); border-radius: 99px; padding: 0.18rem 0.6rem;
  display: inline-flex; align-items: center; gap: 0.35rem; cursor: default;
}
.chip:hover, .chip:focus, .chip:focus-visible { color: var(--text); border-color: var(--accent); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chip::after {
  content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 8px);
  width: max-content; max-width: min(240px, 78vw); z-index: 30;
  background: var(--bg-elevated); color: var(--text); border: 1px solid var(--accent);
  border-radius: 8px; padding: 0.45rem 0.65rem; font-family: var(--font-sans); font-size: 0.8rem;
  line-height: 1.4; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  /* display (not visibility) so hidden tips occupy no layout — visibility:hidden
     pseudo-boxes inflated scrollWidth on mobile (DISC-003). */
  display: none;
}
.chip:hover::after, .chip:focus::after, .chip:focus-visible::after, .chip.tip-on::after { display: block; }
.chip.tip-flip::after { left: auto; right: 0; }
.chip.tip-on { color: var(--text); border-color: var(--accent); }
/* Homepage: solution overview tiles, philosophy grid, clients band. */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin: 1.4rem 0; }
/* Tiles are plain cards with a stretched-link overlay (wpautop-safe): an anchor
   wrapping block markup gets split by wpautop and renders as blank tiles
   (DISC-007, owner report 2026-09-28). The overlay anchor contains text only. */
.tile {
  position: relative; background: var(--bg-elevated); border: 1px solid var(--hairline); border-radius: 12px;
  padding: 1.05rem 1.15rem; color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.tile:hover, .tile:focus-within { border-color: var(--accent); transform: translateY(-2px); }
.tile h3 { margin: 0 0 0.4rem; font-size: 1rem; color: var(--accent); }
.tile p { margin: 0; color: var(--text-muted); font-size: 0.85rem; }
.tile-link { color: inherit; }
.tile-link::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.tile-link:focus-visible { outline: none; }
.tile-link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }
.philosophy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; margin: 1.4rem 0; }
.clients-band { display: grid; grid-template-columns: minmax(280px, 5fr) minmax(320px, 7fr); gap: 1.8rem; margin: 1.4rem 0; }
.clients-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.clients-list li { border-left: 3px solid var(--accent); padding-left: 0.9rem; color: var(--text-muted); }
.clients-list li strong { color: var(--text); }
.clients-outcomes .metric-band { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 0; }
@media (max-width: 900px) { .clients-band { grid-template-columns: 1fr; } }
.portrait {
  border-radius: 14px; border: 1px solid var(--hairline); display: block;
  /* 2026-10-12 photo swap (eduPic3.jpg, 794x882) + owner direction "full
     length": show the whole photograph — natural aspect, no crop window. */
  width: 100%; height: auto; aspect-ratio: auto;
}
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 2.4rem; align-items: start; }
@media (max-width: 767px) { .about-grid { grid-template-columns: 1fr; } }
/* About: horizontal distribution (about1.png reference). */
.capability-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.9rem; margin: 1.1rem 0; }
.capability-grid .card h3 { font-size: 0.98rem; }
.stage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; margin: 1.2rem 0; }
.stage-grid .card h3 { font-size: 0.95rem; color: var(--accent); }
.stage-grid .stage-out { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-muted); border-top: 1px dashed var(--hairline); padding-top: 0.5rem; margin: 0.6rem 0 0; }
.about-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; margin-top: 2rem; }
@media (max-width: 900px) { .about-lower { grid-template-columns: 1fr; } .stage-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .stage-grid { grid-template-columns: 1fr; } }
ol.process { list-style: none; counter-reset: step; padding: 0; margin: 1.4rem 0; }
ol.process li { counter-increment: step; padding: 0.55rem 0 0.55rem 2.6rem; position: relative; border-bottom: 1px solid var(--hairline); }
ol.process li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0.62rem;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent);
}
.takeaway {
  background: var(--bg-inset); border: 1px solid var(--hairline); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 1rem 1.2rem; margin: 1.6rem 0;
}
.takeaway .mono { display: block; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.35rem; }
.meta-note { color: var(--text-muted); font-size: 0.82rem; border-top: 1px solid var(--hairline); padding-top: 0.9rem; margin-top: 2rem; }
.article-meta { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--text-muted); font-size: 0.85rem; margin: 0.4rem 0 1.5rem; }
.toc { background: var(--bg-inset); border: 1px solid var(--hairline); border-radius: 10px; padding: 0.9rem 1.2rem; font-size: 0.92rem; }
.toc ol { margin: 0.4rem 0 0; padding-left: 1.3rem; }

/* ---------- Forms ---------- */
.ek-form { max-width: 560px; margin: 1.6rem 0; }
.ek-form label { display: block; font-size: 0.88rem; font-weight: 600; margin: 1.05rem 0 0.3rem; }
.ek-form input[type="text"], .ek-form input[type="email"], .ek-form select, .ek-form textarea {
  width: 100%; padding: 0.65rem 0.75rem; border-radius: 8px; min-height: 44px;
  border: 1px solid var(--hairline); background: var(--bg-elevated); color: var(--text);
  /* ≥16px effective: iOS Safari auto-zooms the viewport on focus below that. */
  font-family: inherit; font-size: max(0.95rem, 16px);
}
.ek-form textarea { min-height: 130px; resize: vertical; }
.ek-form .consent { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; font-size: 0.85rem; color: var(--text-muted); }
.ek-form .consent input { min-height: 0; margin-top: 0.25rem; }
.ek-form .hp { position: absolute; left: -9999px; }
/* Phone row (v1.4.0): country calling code select + national number input.
   v1.6.0: contact.js upgrades the select into a flag dropdown (.ek-cc); the
   native select remains the no-JS fallback and the POSTed source of truth. */
.ek-form .phone-row { display: flex; gap: 0.6rem; }
.ek-form .phone-row select { flex: 0 0 auto; width: auto; max-width: 14rem; }
.ek-form .phone-row input { flex: 1 1 auto; min-width: 0; }
.phone-row[data-ek-cc="enhanced"] select { display: none; }
.phone-row[data-ek-cc="enhanced"] .ek-cc { flex: 0 0 auto; }
@media (max-width: 480px) {
  .ek-form .phone-row { flex-wrap: wrap; }
  .ek-form .phone-row select { flex: 1 1 100%; max-width: none; }
}

/* Calling-code dropdown: toggle, search, scroll-capped list (never all 98 at
   once — the list caps at ~9 rows), smooth keyboard/wheel scrolling. */
.ek-cc { position: relative; }
.ek-cc-toggle {
  display: flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 0.65rem;
  border: 1px solid var(--hairline); border-radius: 8px;
  background: var(--bg-elevated); color: var(--text); cursor: pointer;
  font-family: inherit; font-size: max(0.95rem, 16px); line-height: 1;
}
.ek-cc-toggle:hover { border-color: var(--accent); }
.ek-cc-toggle:focus-visible, .ek-cc-search:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ek-cc-toggle .ek-cc-caret { display: inline-flex; color: var(--text-muted); transition: transform 0.18s ease; }
.ek-cc-open .ek-cc-toggle .ek-cc-caret { transform: rotate(180deg); }
.ek-cc-flag { display: block; width: 21px; height: 14px; object-fit: cover; border-radius: 2px; border: 1px solid color-mix(in srgb, var(--text) 18%, transparent); background: #fff; }
.ek-cc-toggle .ek-cc-flag { width: 22px; height: 15px; }
.ek-cc-dial { font-variant-numeric: tabular-nums; }
.ek-cc-panel {
  position: absolute; top: calc(100% + 0.4rem); left: 0; z-index: 30;
  width: min(20rem, calc(100vw - 3rem));
  background: var(--bg-elevated); border: 1px solid var(--hairline); border-radius: 10px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.18); overflow: hidden;
}
.ek-cc-search {
  width: 100%; padding: 0.55rem 0.75rem; border: 0; border-bottom: 1px solid var(--hairline);
  border-radius: 0; background: transparent; color: var(--text);
  font-family: inherit; font-size: max(0.9rem, 16px);
}
.ek-cc-search:focus { outline: none; border-bottom-color: var(--accent); }
.ek-cc-list {
  max-height: 16.5rem; overflow-y: auto; overscroll-behavior: contain;
  scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--hairline) transparent;
  margin: 0; padding: 0.25rem; list-style: none;
}
.ek-cc-list::-webkit-scrollbar { width: 8px; }
.ek-cc-list::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 4px; }
.ek-cc-list::-webkit-scrollbar-track { background: transparent; }
.ek-cc-option {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.55rem;
  border-radius: 6px; cursor: pointer; font-size: 0.92rem;
}
.ek-cc-option[hidden] { display: none; }
.ek-cc-option .ek-cc-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ek-cc-option .ek-cc-dial { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.8rem; }
.ek-cc-option.is-active { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ek-cc-option[aria-selected="true"] { font-weight: 600; }
.ek-cc-option[aria-selected="true"] .ek-cc-dial { color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .ek-cc-list { scroll-behavior: auto; }
  .ek-cc-toggle .ek-cc-caret { transition: none; }
}
.ek-notice { border-radius: 8px; padding: 0.8rem 1rem; font-size: 0.92rem; margin: 1rem 0; }
.ek-notice.ok { border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent); color: var(--ok); }
.ek-notice.err { border: 1px solid color-mix(in srgb, var(--warn) 60%, transparent); color: var(--warn); }
.ek-field-error { color: var(--warn); font-size: 0.85rem; margin: 0.25rem 0 0; }
.ek-form [aria-invalid] { border-color: var(--warn); }

/* ---------- Insights ---------- */
.post-card { background: var(--bg-elevated); border: 1px solid var(--hairline); border-radius: 12px; padding: 1.3rem 1.4rem; }
/* Welcome digest (v1.5.0): pinned first on the insights grid, visually distinct. */
.post-card.digest { border-color: var(--accent); background: var(--bg-inset); box-shadow: 0 0 0 1px var(--accent); }
.post-card.digest .badge { display: inline-block; margin-bottom: 0.45rem; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--accent); color: #fff; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.07em; text-transform: uppercase; }
.post-card .cat { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent); }
.post-card h3 { margin: 0.45rem 0 0.5rem; }
.post-card p { color: var(--text-muted); font-size: 0.92rem; }
.post-card .date { color: var(--text-muted); font-size: 0.8rem; }
.drafting-note { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); border: 1px dashed var(--hairline); border-radius: 8px; padding: 0.6rem 0.9rem; display: inline-block; }

/* ---------- Assessment: percentage sliders + animated results ---------- */
.assessment fieldset { border: 1px solid var(--hairline); border-radius: 12px; margin: 0 0 1.1rem; padding: 1rem 1.2rem; }
.assessment legend { font-weight: 700; font-size: 0.95rem; padding: 0 0.4rem; }
/* One question at a time (owner direction 2026-09-28): hidden until reached,
   collapsed to a summary row once answered or skipped. */
.assessment fieldset[data-state="hidden"] { display: none; }
.assessment fieldset[data-state="collapsed"] {
  border-style: dashed; padding: 0.65rem 1rem; cursor: pointer; margin-bottom: 0.55rem;
}
.assessment fieldset[data-state="collapsed"]:hover, .assessment fieldset[data-state="collapsed"]:focus-within {
  border-color: var(--accent);
}
.assessment fieldset[data-state="collapsed"] .slider-row,
.assessment fieldset[data-state="collapsed"] .q-skip { display: none; }
.assessment fieldset[data-state="collapsed"] legend { font-weight: 400; font-size: 0.88rem; color: var(--text-muted); }
.answered-value { font-family: var(--font-mono); color: var(--accent); font-size: 0.85rem; white-space: nowrap; }
.q-progress { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 0.7rem; }
.q-skip {
  background: none; border: none; padding: 0.35rem 0; margin-top: 0.35rem; cursor: pointer;
  color: var(--text-muted); font-size: 0.85rem; text-decoration: underline;
}
.q-skip:hover, .q-skip:focus-visible { color: var(--accent); }
/* v1.6.0: manual input (right of the slider), per-question scale, block nav. */
.q-manual {
  width: 4.6rem; flex: 0 0 auto; padding: 0.45rem 0.5rem; text-align: center;
  font-family: var(--font-mono); font-size: 0.9rem;
  background: var(--bg-inset); color: var(--text);
  border: 1px solid var(--hairline); border-radius: 8px;
}
.q-manual:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.q-manual.ek-invalid { border-color: var(--warn); color: var(--warn); }
.q-manual-err { color: var(--warn); font-size: 0.8rem; }
.q-scale { display: flex; justify-content: space-between; margin: 0.45rem 0 0.1rem; font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); }
.q-scale-tick::before { content: "| "; opacity: 0.6; }
.q-scale-tick:first-child::before { content: ""; }
.q-scale-tick:last-child::before { content: ""; }
.q-block-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin: 1.2rem 0; }
.q-block-pos { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.q-end-note { color: var(--text-muted); font-size: 0.9rem; margin: 0.8rem 0 0; }
.slider-row { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.7rem; }
.slider-end { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.slider-row input[type="range"] { flex: 1 1 auto; accent-color: var(--accent); min-height: 44px; margin: 0; }
.slider-value { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); min-width: 3.2ch; text-align: right; }
/* ≤480px: nowrap end labels squeezed the range to ~70px — wrap to a labels row
   above a full-width slider (static audit 2026-09-28). */
@media (max-width: 480px) {
  .slider-row { flex-wrap: wrap; row-gap: 0.25rem; }
  .slider-end { order: 0; }
  .slider-end:last-of-type { order: 1; margin-left: auto; }
  .slider-row input[type="range"] { order: 2; }
  .slider-value { order: 3; }
}
.dim-bar { background: var(--bg-inset); border: 1px solid var(--hairline); border-radius: 8px; margin: 0.6rem 0 1rem; overflow: hidden; }
.dim-bar .fill { height: 10px; border-radius: 7px; background: var(--accent); width: 0; transition: width 0.6s ease; }
.dim-bar.overall { margin-bottom: 1.3rem; }
.dim-bar.overall .fill { height: 14px; }
.dim-line { margin: 0.9rem 0 0.15rem; }
.computing .mono { letter-spacing: 0.1em; text-transform: uppercase; }
.computing-bar .fill { transition: width 0.13s linear; }
.result-overall-label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin: 1.4rem 0 0; }
.result-overall { margin: 0.2rem 0 0.5rem; font-size: clamp(2.4rem, 6vw, 3.6rem); }
.result-overall strong { font-weight: 800; letter-spacing: -0.02em; }
.result-level { font-size: 0.95rem; color: var(--accent); font-family: var(--font-mono); letter-spacing: 0.06em; }
.assessment .takeaway { margin-top: 1.6rem; }

/* ---------- Scroll reveals (animation1.mp4 reference; reduced-motion = appear) ---------- */
.will-reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.will-reveal.in-view { opacity: 1; transform: none; }
.card-grid .will-reveal:nth-child(2), .tile-grid .will-reveal:nth-child(2), .stage-grid .will-reveal:nth-child(2) { transition-delay: 0.06s; }
.card-grid .will-reveal:nth-child(3), .tile-grid .will-reveal:nth-child(3), .stage-grid .will-reveal:nth-child(3) { transition-delay: 0.12s; }
.card-grid .will-reveal:nth-child(4), .tile-grid .will-reveal:nth-child(4), .stage-grid .will-reveal:nth-child(4) { transition-delay: 0.18s; }
.metric-band .will-reveal:nth-child(2) { transition-delay: 0.06s; }
.metric-band .will-reveal:nth-child(3) { transition-delay: 0.12s; }
.metric-band .will-reveal:nth-child(4) { transition-delay: 0.18s; }

/* ---------- Footer / widget / cookie bar ---------- */
/* One horizontal rule at the footer: the border-top (HQA-033). */
.site-footer { border-top: 1px solid var(--hairline); padding: 2.4rem 0 3rem; margin-top: 3rem; color: var(--text-muted); font-size: 0.88rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-legal { margin: 1.6rem 0 0; }
.contact-widget {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 60;
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.55rem;
}
.contact-widget .channels { display: none; flex-direction: column; gap: 0.55rem; }
.contact-widget.is-open .channels, .contact-widget:focus-within .channels { display: flex; }
.contact-widget .channel {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--hairline);
  background: var(--bg-elevated); color: var(--text); display: grid; place-items: center;
  cursor: pointer; font-size: 1.05rem; text-decoration: none;
}
.contact-widget .channel:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.wa-launcher {
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; border: 2px solid #128c4b;
  display: grid; place-items: center; cursor: pointer; text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease;
}
.wa-launcher:hover, .wa-launcher:focus-visible { transform: scale(1.06); text-decoration: none; }
.wa-launcher svg { display: block; }
.cookie-consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: color-mix(in srgb, var(--bg-elevated) 97%, transparent);
  border-top: 1px solid var(--accent);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
  padding: 0.9rem 0;
}
.cookie-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; }
.cookie-inner p { margin: 0; font-size: 0.88rem; color: var(--text-muted); max-width: 62ch; }
.cookie-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }
.cookie-actions .btn { padding: 0.5rem 1.1rem; min-height: 40px; }
/* v1.6.0: granular choices. The copy flexes and wraps to its own line below
   ~18rem so the button row can never squeeze it; the disclosure panel is a
   bordered inset consistent with .toc/.takeaway. No display property here —
   the rows toggle on the [hidden] attribute (site.js). */
.cookie-copy { flex: 1 1 auto; min-width: min(100%, 18rem); }
.cookie-choices-rows {
  background: var(--bg-inset); border: 1px solid var(--hairline); border-radius: 8px;
  margin: 0.7rem 0 0.15rem; padding: 0.7rem 0.9rem;
}
.cookie-choice {
  display: flex; gap: 0.6rem; align-items: flex-start;
  margin: 0; font-size: 0.85rem; color: var(--text-muted);
}
.cookie-choice + .cookie-choice { margin-top: 0.5rem; }
.cookie-choice input { accent-color: var(--accent); margin: 0.2rem 0 0; }
.cookie-choice input:disabled { opacity: 0.6; }
/* v1.6.0: status colors for the upcoming wp-admin research table; unused on
   the front end. */
.tr-up { color: var(--ok); }
.tr-down { color: var(--warn); }
@media (max-width: 767px) {
  .cookie-inner { flex-direction: column; align-items: flex-start; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; }
}
body.has-cookie-bar .contact-widget { bottom: 7.2rem; }
/* v1.6.0: with the choices rows open the bar grows well past the closed-state
   offset (tallest on narrow screens, where the panel stacks under the copy) —
   lift the widget clear of it until the visitor saves or closes. */
body.has-cookie-bar:has(.cookie-choices-rows:not([hidden])) .contact-widget { bottom: 31rem; }

/* ---------- WordPress core ---------- */
.alignleft { float: left; margin: 0 1.2rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.2rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }
.wp-caption { max-width: 100%; }
.screen-reader-text:focus { background: var(--accent); color: #fff; }
.sticky .post-card { border-color: var(--accent); }

/* Insights search + label chips (v1.6.0): keyword filter over the article
   cards; labels reuse the Solutions .chip/.dot vocabulary and colors. */
.ek-search { margin: 1.4rem 0 0.4rem; max-width: 34rem; }
.ek-search-label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.ek-search-input {
  width: 100%; min-height: 44px; padding: 0.55rem 0.9rem;
  border: 1px solid var(--hairline); border-radius: 8px;
  background: var(--bg-elevated); color: var(--text);
  font-family: inherit; font-size: max(0.95rem, 16px);
}
.ek-search-input:hover { border-color: var(--accent); }
.ek-search-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ek-search-hint { margin: 0.4rem 0 0; font-size: 0.82rem; color: var(--text-muted); }
.ek-search-empty { margin: 1.2rem 0; color: var(--text-muted); }
.post-card[hidden] { display: none; }
.post-card .chips { margin-top: 0.7rem; }
.post-card .chip { cursor: default; }
.post-card .chip:hover, .post-card .chip:focus { border-color: var(--hairline); color: inherit; }
.article-meta + .chips { margin-top: 0.9rem; }


/* Reading canvas (v1.6.0, v2): the DEFAULT reading PANE for articles — the
   site chrome (header, footer, circuit background) stays exactly as it is,
   and the article becomes a wide paper box laid over it, with the margins and
   measure of popular blogs and news sites. The body class is server-rendered
   (ek_theme_body_classes); the toggle (single.php + reading.js) flips
   body.ek-reading-canvas for the visit — no stored preference. */
.reading-canvas-bar { margin: 1.2rem 0 0; }
.reading-toggle {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 38px; padding: 0.35rem 0.85rem;
  border: 1px solid var(--hairline); border-radius: 999px;
  background: transparent; color: var(--text-muted);
  font-family: var(--font-sans); font-size: 0.85rem; line-height: 1;
  cursor: pointer;
}
.reading-toggle:hover { color: var(--text); border-color: var(--accent); }
.reading-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The pane: a paper sheet on the site's own ground. Wider than the default
   article column — popular-blog width — with generous, responsive margins. */
body.ek-reading-canvas {
  --ek-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  /* No orange: accents inside the pane are the site's own theme-aware
     accent, so links and CTAs keep one identity and stay visible in both
     site themes. */
  --ek-accent: var(--accent);
  --ek-accent-deep: var(--accent-strong);
}
/* Light site theme: the pane is paper. */
html[data-theme="light"] body.ek-reading-canvas {
  --ek-paper: #f7f2e9;
  --ek-paper-deep: #efe7d6;
  --ek-ink: #2a241a;
  --ek-ink-muted: #6d6250;
  --ek-rule: #e0d5bf;
}
/* Dark site theme: the pane is an elevated dark surface — a deliberately
   different contrast from the page ground (#0b0e13), not a copy of it. */
html[data-theme="dark"] body.ek-reading-canvas {
  --ek-paper: #161c2a;
  --ek-paper-deep: #1e2637;
  --ek-ink: #eae3d2;
  --ek-ink-muted: #a99f8b;
  --ek-rule: #323b4e;
  color-scheme: dark;
}
/* The toggle floats over the page ground while the pane is open — bottom
   right, clear of the sticky header's own controls. Without JS the control
   cannot work, so it is dropped; the pane itself remains the (readable)
   default. */
body.ek-reading-canvas .reading-canvas-bar {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 60; margin: 0;
}
@media (scripting: none) {
  body.ek-reading-canvas .reading-canvas-bar { display: none !important; }
}
body.ek-reading-canvas article.section { padding: 2.4rem 0 4rem; }
body.ek-reading-canvas article.section > .container {
  max-width: 64rem;
  background: var(--ek-paper);
  color: var(--ek-ink);
  border: 1px solid var(--ek-rule);
  border-radius: 14px;
  padding: clamp(2.2rem, 6vw, 4.25rem) clamp(1.4rem, 5vw, 4rem);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.35);
}
@media (max-width: 640px) {
  body.ek-reading-canvas article.section > .container { border-radius: 10px; }
}
@media (prefers-reduced-motion: no-preference) {
  body.ek-reading-canvas article.section > .container { transition: box-shadow 0.25s ease; }
}

/* The toggle floats over the dark site ground while the pane is open. */
body.ek-reading-canvas .reading-toggle {
  position: fixed; top: 1rem; right: 1rem; z-index: 60;
  border-color: rgba(247, 242, 233, 0.25);
  background: rgba(7, 11, 20, 0.72); color: #e8e2d4;
  backdrop-filter: blur(6px);
}
body.ek-reading-canvas .reading-toggle:hover { color: #fff; border-color: rgba(247, 242, 233, 0.55); }
body.ek-reading-canvas .reading-toggle:focus-visible { outline-color: var(--ek-accent); }

/* Typography: serif, ink on paper, news-article measure (~74ch). */
body.ek-reading-canvas .eyebrow { color: var(--ek-ink-muted); letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.8rem; }
body.ek-reading-canvas .crumbs { color: var(--ek-ink-muted); }
body.ek-reading-canvas .crumbs a { color: var(--ek-accent); }
body.ek-reading-canvas .crumbs a:hover { color: var(--ek-accent-deep); }
body.ek-reading-canvas .crumbs [aria-current="page"] { color: var(--ek-ink); }
body.ek-reading-canvas .article h1 {
  font-family: var(--ek-serif); font-weight: 600;
  font-size: clamp(1.95rem, 4.6vw, 2.6rem); line-height: 1.2;
  color: var(--ek-ink); margin-bottom: 0.9rem;
}
body.ek-reading-canvas .article-meta { color: var(--ek-ink-muted); font-size: 0.9rem; }
body.ek-reading-canvas .prose {
  max-width: 74ch;
  font-family: var(--ek-serif);
  font-size: 1.13rem; line-height: 1.78;
}
body.ek-reading-canvas .prose h2 {
  font-family: var(--ek-serif); font-weight: 600; font-size: 1.55rem; line-height: 1.3;
  color: var(--ek-ink); margin: 2.5rem 0 0.85rem; padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--ek-rule);
}
body.ek-reading-canvas .prose h3 { font-family: var(--ek-serif); font-weight: 600; color: var(--ek-ink); }
body.ek-reading-canvas .prose p,
body.ek-reading-canvas .prose li { color: var(--ek-ink); }
/* :not(.btn) — the inline CTA buttons inside prose are .btn-primary; without
   this guard the link rule out-specifies .btn-primary and paints accent text
   on the accent background (invisible button text, 6Rs report 2026-10-27). */
body.ek-reading-canvas .prose a:not(.btn) { color: var(--ek-accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, var(--ek-accent) 45%, transparent); }
body.ek-reading-canvas .prose a:not(.btn):hover { color: var(--ek-accent-deep); text-decoration-color: var(--ek-accent-deep); }

/* Panels: takeaway + related as parchment notes on the sheet. */
body.ek-reading-canvas .takeaway,
body.ek-reading-canvas .related {
  background: var(--ek-paper-deep);
  border: 1px solid var(--ek-rule);
  border-left: 3px solid var(--ek-accent);
  border-radius: 6px;
}
body.ek-reading-canvas .takeaway .mono,
body.ek-reading-canvas .related .mono { font-family: var(--ek-serif); font-style: italic; text-transform: none; letter-spacing: 0.02em; font-size: 0.95rem; color: var(--ek-accent); }
body.ek-reading-canvas .takeaway p,
body.ek-reading-canvas .related li { color: var(--ek-ink); }
body.ek-reading-canvas .related a { color: var(--ek-accent); }

/* Code on parchment; chips keep their Solutions dot colors. */
body.ek-reading-canvas .prose :not(pre) > code { background: var(--ek-paper-deep); border: 1px solid var(--ek-rule); color: var(--ek-ink); }
body.ek-reading-canvas .prose pre,
body.ek-reading-canvas .prose pre code { background: var(--ek-paper-deep) !important; color: var(--ek-ink) !important; border-color: var(--ek-rule); }
body.ek-reading-canvas .chip { background: var(--ek-paper-deep); border-color: var(--ek-rule); color: var(--ek-ink); }
body.ek-reading-canvas .chip:hover, body.ek-reading-canvas .chip:focus { border-color: var(--ek-accent); color: var(--ek-ink); }

/* CTAs inside the pane: the site's own .btn styles apply unchanged — they
   are theme-aware, so primary and secondary stay visible in both themes. */

/* Print: the pane is the print layout — drop the floating control. */
@media print {
  body.ek-reading-canvas .reading-toggle { display: none !important; }
  body.ek-reading-canvas article.section > .container { box-shadow: none; border: none; max-width: none; }
}

/* Where-am-I crumbs (v1.6.0): Insights is the root, the page you are on is
   named and not linked. */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.05em;
  color: var(--text-muted); margin: 0 0 1.15rem;
}
.crumbs a { color: var(--accent); }
.crumbs a:hover { color: var(--accent-strong); }
.crumbs [aria-current="page"] { color: var(--text); }
body.ek-reading-canvas .crumbs { font-family: var(--ek-serif); font-size: 0.85rem; letter-spacing: 0.02em; color: var(--ek-ink-muted); }
body.ek-reading-canvas .crumbs a { color: var(--ek-accent); }
body.ek-reading-canvas .crumbs a:hover { color: var(--ek-accent-deep); }
body.ek-reading-canvas .crumbs [aria-current="page"] { color: var(--ek-ink); }

/* Explicit read link on insight cards (v1.6.0). */
.post-card .more { display: block; margin-top: 0.6rem; }
.post-card .more a { color: var(--accent); font-size: 0.88rem; font-weight: 500; }
.post-card .more a:hover { color: var(--accent-strong); }
body.ek-reading-canvas .post-card .more a { color: var(--ek-accent); }
