/* Portfolio — Mary Rose Mathew
   Editorial, restrained, product-designer-forward.
   Inspired by high-quality practitioner portfolios; visual identity is original. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500&display=swap');

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

:root {
  /* Color */
  --ink: #171717;
  --ink-soft: #3a3a3a;
  --muted: #767472;
  --border: #e8e5df;
  --bg: #faf9f7;
  --panel: #f2f0eb;
  --panel-hover: #eae7e0;

  /* Type */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;

  /* Space */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 5rem;
  --space-7: 7rem;

  /* Layout — width tiers (maximum boundaries) */
  --w-narrow: 640px;
  --w-reading: 720px;
  --w-content: 1100px;
  --w-wide: 1280px;

  /* Layout — semantic primitives */
  --page-gutter: 1.5rem;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
}

/* Containers — semantic layout tiers */
.container {
  max-width: var(--w-reading);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.container-reading {
  max-width: var(--w-reading);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.container-content {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.container-wide {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

/* Site nav */
.site-nav {
  padding: var(--space-3) 0;
}
.site-nav .nav-inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.site-nav .site-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.0625rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.005em;
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
}
.site-nav li { margin: 0; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 400;
}
.site-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.site-nav a.disabled {
  color: var(--muted);
  cursor: not-allowed;
}

/* Main */
main { padding: 0 0 var(--space-7); }

/* --------------------------------------------------------
   Home
   -------------------------------------------------------- */

/* Hero */
.hero {
  padding: var(--space-6) 0;
}
/* .hero-inner is a marker class for hero-specific 2-col grid at ≥900px
   (defined below in the responsive block). Container behavior comes from
   applying .container-wide alongside it. */
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  color: var(--ink);
}
.hero-positioning {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  line-height: 1.35;
  letter-spacing: -0.005em;
  font-weight: 400;
  color: var(--ink);
  max-width: 820px;
  margin-bottom: var(--space-3);
}
.hero-support {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: var(--space-5);
  line-height: 1.55;
}
.hero-cta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Hero — 2-column composition (intro left, portrait right).
   Stacks to a single column below 900px. */
.hero-content { max-width: 640px; }
.hero-visual { display: none; }

@media (min-width: 900px) {
  .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
    gap: var(--space-6);
    align-items: start;
  }
  .hero-content { max-width: none; }
  .hero-visual { display: block; }
}

/* Portrait image — 3:4 aspect ratio matches the source photo (1086×1448). */
.hero-portrait {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: var(--panel);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.35rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
  font-family: var(--font-body);
  line-height: 1.2;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover {
  background: var(--ink-soft);
  border-color: var(--ink-soft);
  text-decoration: none;
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}

/* Sections */
.section {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border);
}
.section-first { border-top: none; }
.section-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--space-3);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: var(--space-3);
  color: var(--ink);
}
.section-lead {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: var(--w-reading);
  margin-bottom: var(--space-5);
  line-height: 1.55;
}

/* Work group heading */
.work-group-header { margin-bottom: var(--space-4); }
.work-group-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: var(--space-2);
}
.work-group-desc {
  color: var(--ink-soft);
  font-size: 1.0625rem;
  max-width: 720px;
  line-height: 1.6;
  margin-bottom: var(--space-2);
}
.work-group-link {
  display: inline-block;
  margin-top: var(--space-1);
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(0, 0, 0, 0.3);
}
.work-group-link:hover { text-decoration-color: var(--ink); }

/* Work grid */
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
@media (min-width: 780px) {
  .work-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
}
.work-card {
  background: var(--panel);
  border-radius: 8px;
  padding: var(--space-4);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: background 0.15s ease, transform 0.15s ease;
  min-height: 280px;
  border: 1px solid transparent;
}
.work-card:hover { background: var(--panel-hover); transform: translateY(-2px); text-decoration: none; }
.work-card.is-placeholder {
  background: transparent;
  border: 1px dashed #c8c5be;
  cursor: default;
}
.work-card.is-placeholder:hover { background: transparent; transform: none; }
.work-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.work-card-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
  color: var(--ink);
}
.work-card-desc {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: var(--space-3);
  flex: 1;
}
.work-card-cta {
  font-size: 0.875rem;
  color: var(--ink);
  font-weight: 500;
}

/* Strengths grid */
.strengths {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-top: var(--space-4);
}
@media (min-width: 720px) {
  .strengths { grid-template-columns: 1fr 1fr; gap: var(--space-5); }
}
.strength-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: var(--space-1);
  color: var(--ink);
  letter-spacing: -0.005em;
}
.strength-desc {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Embedded process diagram in the thinking article — figure wrapper +
   small caption. Diagram itself uses the same .op-* classes as Home. */
.op-embed {
  margin: var(--space-5) auto;
  padding: 0 var(--space-3);
}
.op-embed .op { margin: 0; }
.op-caption {
  margin: var(--space-3) auto 0;
  max-width: var(--w-reading);
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
  font-style: italic;
}

/* Double Diamond process diagram — Home "How I work" section.
   Desktop: SVG diamonds at top with numbered activity nodes,
   activity cards below in a 7-column grid, subtle Learn → Discover
   return arc, leadership foundation as continuous behaviors below.
   Mobile/tablet: text-only DD phase header, cards stacked vertically.

   Visual priority (heaviest → lightest):
     1. Double Diamond phases
     2. Seven activities
     3. Divergence / convergence
     4. Leadership foundation
     5. Continuous-learning return
     6. AI detail

   Restrained terracotta accent (#a86238) used only for the return
   arc and the AI-assisted-exploration phrase. */
:root {
  --accent-warm: #a86238;
}

.op {
  margin: var(--space-4) 0 var(--space-5);
}

/* --- Double Diamond SVG (desktop) --- */
.op-dd {
  display: none;
}
.op-dd svg {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

/* Phase labels — DISCOVER · DEFINE · DEVELOP · DELIVER */
.op-phase {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  fill: var(--ink);
  letter-spacing: 0.18em;
  text-anchor: middle;
}

/* Diamond outlines — the recognizable DD shape */
.op-diamond {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

/* Vertical divider through diamond centre — shows diverge/converge split */
.op-divider {
  stroke: var(--ink);
  stroke-width: 1;
  opacity: 0.28;
  stroke-dasharray: 2 3;
}

/* Bridges — thin dashed line between diamonds and after Deliver */
.op-bridge {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

/* Activity nodes on the diamond */
.op-node {
  fill: var(--bg);
  stroke: var(--ink);
  stroke-width: 1.25;
}
.op-node-tail {
  stroke-dasharray: 2 3;
  opacity: 0.9;
}

.op-num {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  fill: var(--ink);
  text-anchor: middle;
  dominant-baseline: central;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.02em;
}

/* --- Mobile / tablet DD text header --- */
.op-dd-mobile {
  display: block;
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.op-dd-mobile span:not(:nth-child(2n)) { color: var(--ink); }
.op-dd-mobile span:nth-child(2n) { color: var(--muted); opacity: 0.5; }

/* --- Activity cards below the DD --- */
.op-cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}
.op-card {
  padding: 0;
}
.op-num-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.06em;
  font-feature-settings: "tnum" 1;
  margin-bottom: 0.35rem;
}
.op-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.4rem 0;
}
.op-desc {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* AI-assisted exploration — restrained terracotta accent, inside stage 04 only */
.op-ai {
  color: var(--accent-warm);
  font-style: italic;
}

/* --- Learn → Discover return arc (desktop only) --- */
.op-return {
  display: none;
}
.op-return svg {
  width: 100%;
  height: 60px;
  display: block;
  overflow: visible;
}
.op-return-path {
  fill: none;
  stroke: var(--accent-warm);
  stroke-width: 1;
  opacity: 0.75;
  stroke-dasharray: 3 4;
}
.op-return-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-style: italic;
  fill: var(--accent-warm);
  text-anchor: middle;
  opacity: 0.9;
}

/* --- Simplified cycle indicator (mobile / tablet) --- */
.op-cycle-simple {
  margin: var(--space-3) 0 0;
  padding-top: var(--space-2);
  border-top: 1px dashed var(--border);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.8125rem;
  color: var(--accent-warm);
  text-align: center;
}
.op-cycle-arrow {
  margin-right: 6px;
  font-style: normal;
  font-size: 1rem;
}

/* --- Leadership foundation (all viewports) --- */
.op-foundation {
  margin-top: var(--space-4);
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.op-foundation span { flex: 1; text-align: center; }
.op-foundation span:first-child { text-align: left; }
.op-foundation span:last-child { text-align: right; }

/* --- Tablet: 2-column card grid --- */
@media (min-width: 600px) {
  .op-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Desktop: DD visible, 7-column card grid, return arc visible --- */
@media (min-width: 900px) {
  .op-dd {
    display: block;
    margin-bottom: var(--space-3);
  }
  .op-dd-mobile { display: none; }

  .op-cards {
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-2);
  }

  .op-return {
    display: block;
    margin-top: var(--space-2);
  }
  .op-cycle-simple { display: none; }
}

/* --------------------------------------------------------
   Reporting ecosystem map — reconstructed editorial SVG.
   Used on the Reporting cluster hero and inside the Report
   Library case study. Same visual language as the Double
   Diamond diagram: muted line weights, dashed flow lines,
   restrained type.
   -------------------------------------------------------- */

.em-figure {
  margin: var(--space-5) auto var(--space-4);
  padding: 0 var(--page-gutter);
}
/* Breakout — allows the diagram to escape a reading-width article
   container (Report Library case study uses .container = 720px). */
.em-figure-breakout {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100vw - 2 * var(--page-gutter)), var(--w-content));
  padding: 0;
}
.em-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--space-2);
  text-align: center;
}
.em-svg {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}
.em-caption {
  margin: var(--space-3) auto 0;
  max-width: var(--w-reading);
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
  font-style: italic;
}

/* SVG element styles */
.em-frame {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 4 5;
  opacity: 0.55;
}
.em-frame-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  fill: var(--muted);
  letter-spacing: 0.18em;
  text-anchor: middle;
  text-transform: uppercase;
}
.em-section-label {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 500;
  fill: var(--muted);
  letter-spacing: 0.14em;
  text-anchor: middle;
  text-transform: uppercase;
}
.em-source {
  fill: var(--bg);
  stroke: var(--ink);
  stroke-width: 1.25;
}
.em-source-name {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  fill: var(--ink);
  letter-spacing: 0.1em;
  text-anchor: middle;
  text-transform: uppercase;
}
.em-source-desc {
  font-family: var(--font-body);
  font-size: 11px;
  fill: var(--muted);
  text-anchor: middle;
}
.em-flow {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.em-flow-solid {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.25;
}
.em-library {
  fill: var(--panel);
  stroke: var(--ink);
  stroke-width: 1.5;
}
.em-library-eyebrow {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  fill: var(--muted);
  letter-spacing: 0.16em;
  text-anchor: middle;
  text-transform: uppercase;
}
.em-library-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  fill: var(--ink);
  letter-spacing: -0.005em;
  text-anchor: middle;
}
.em-library-desc {
  font-family: var(--font-body);
  font-size: 12px;
  fill: var(--ink-soft);
  text-anchor: middle;
}
.em-user-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-style: italic;
  fill: var(--ink);
  text-anchor: middle;
}
.em-user-desc {
  font-family: var(--font-body);
  font-size: 11px;
  fill: var(--muted);
  text-anchor: middle;
}

/* --------------------------------------------------------
   Reinforcing loop diagram — Report Library case study.
   Cyclical arrangement of 4 nodes with clockwise curved
   arrows. Reuses .em-figure wrapper for consistency;
   loop-specific classes are prefixed .rl-*.
   -------------------------------------------------------- */
.rl-node {
  fill: var(--bg);
  stroke: var(--ink);
  stroke-width: 1.25;
}
.rl-num {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 500;
  fill: var(--muted);
  letter-spacing: 0.04em;
  text-anchor: middle;
  font-feature-settings: "tnum" 1;
}
.rl-node-title {
  font-family: var(--font-body);
  font-size: 12px;
  fill: var(--ink);
  text-anchor: middle;
}
.rl-arrow {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
}
.rl-center-eyebrow {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  fill: var(--muted);
  letter-spacing: 0.18em;
  text-anchor: middle;
  text-transform: uppercase;
}

/* --------------------------------------------------------
   Reporting lifecycle flow — Report Library case study.
   7-stage horizontal spine with numbered circle nodes,
   stage names, and short descriptions beneath.
   Reuses .em-figure wrapper for consistency.
   -------------------------------------------------------- */
.lf-header {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  fill: var(--ink);
  letter-spacing: -0.005em;
  text-anchor: middle;
}
.lf-subheader {
  font-family: var(--font-display);
  font-size: 12px;
  fill: var(--muted);
  font-style: italic;
  text-anchor: middle;
}
.lf-spine {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
}
.lf-node {
  fill: var(--bg);
  stroke: var(--ink);
  stroke-width: 1.25;
}
.lf-num {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 500;
  fill: var(--ink);
  text-anchor: middle;
  font-feature-settings: "tnum" 1;
  dominant-baseline: central;
}
.lf-stage {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  fill: var(--ink);
  letter-spacing: 0.08em;
  text-anchor: middle;
  text-transform: uppercase;
}
.lf-desc {
  font-family: var(--font-body);
  font-size: 11px;
  fill: var(--muted);
  text-anchor: middle;
}

/* Thinking list */
.thinking-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
}
.thinking-item {
  border-top: 1px solid var(--border);
  padding: var(--space-4) 0;
}
.thinking-item:first-child { border-top: none; padding-top: 0; }
.thinking-item.is-forthcoming {
  opacity: 0.65;
}
.thinking-item.is-forthcoming .thinking-title {
  color: var(--muted);
}
.thinking-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--space-1);
}
.thinking-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
}
.thinking-title a { color: var(--ink); text-decoration: none; }
.thinking-title a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.thinking-excerpt {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
  max-width: var(--w-reading);
}

/* About preview */
.about-preview { max-width: var(--w-reading); }
.about-preview p {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: var(--space-2);
}
.about-link {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(0, 0, 0, 0.3);
}
.about-link:hover { text-decoration-color: var(--ink); }

/* Contact */
.contact-block { max-width: var(--w-reading); }
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: var(--space-2);
}
.contact-desc {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: var(--space-3);
  line-height: 1.6;
}

/* --------------------------------------------------------
   Article / case-study prose
   Applies to Report Library, Query Builder, Thinking, About
   -------------------------------------------------------- */

h1, h2, h3, h4 { line-height: 1.25; font-weight: 500; }
h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-2);
  line-height: 1.1;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  line-height: 1.2;
}
h3 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  color: var(--ink);
}
h4 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-top: var(--space-3);
  margin-bottom: var(--space-1);
}
p {
  font-size: 1.0625rem;
  margin-bottom: var(--space-2);
  line-height: 1.65;
  color: var(--ink);
}

.subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-soft);
  margin-top: calc(-1 * var(--space-2));
  margin-bottom: var(--space-5);
  font-weight: 400;
  line-height: 1.4;
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

ul, ol { margin: var(--space-2) 0 var(--space-3) var(--space-3); }
li { margin-bottom: var(--space-1); line-height: 1.65; }
li > p { margin-bottom: var(--space-1); }

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 0, 0, 0.35);
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-color: var(--ink); text-decoration-thickness: 2px; }

blockquote {
  border-left: 3px solid var(--ink);
  padding-left: var(--space-3);
  margin: var(--space-4) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1875rem;
  color: var(--ink);
  line-height: 1.5;
  max-width: var(--w-reading);
}
blockquote p { margin-bottom: var(--space-2); font-size: inherit; font-family: inherit; color: inherit; }
blockquote p:last-child { margin-bottom: 0; }
blockquote strong { font-style: normal; font-weight: 500; }

hr { border: none; border-top: 1px solid var(--border); margin: var(--space-5) 0; }

code {
  background: var(--panel);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
pre {
  background: var(--panel);
  padding: var(--space-2);
  border-radius: 4px;
  overflow-x: auto;
  margin: var(--space-3) 0;
}

/* Visual placeholder */
.visual-placeholder {
  border: 1px dashed #c8c5be;
  background: #f5f4ef;
  padding: var(--space-4);
  margin: var(--space-4) 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9375rem;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 6px;
}
.visual-placeholder .visual-label {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: var(--space-2);
}
.visual-placeholder .visual-desc { max-width: 540px; line-height: 1.5; }

/* At-a-glance */
.at-a-glance {
  background: var(--panel);
  padding: var(--space-4);
  margin: var(--space-3) 0 var(--space-5);
  border-radius: 6px;
}
.at-a-glance h2 {
  margin-top: 0;
  margin-bottom: var(--space-2);
  font-family: var(--font-body);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.12em;
}
.at-a-glance ul { margin: 0 0 var(--space-2) var(--space-3); font-size: 0.9375rem; }
.at-a-glance ul:last-child { margin-bottom: 0; }
.at-a-glance p { font-size: 0.9375rem; }
.at-a-glance p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------
   Reconstructed decision frameworks — table treatment
   Used inside case studies to show acceptance criteria,
   prioritization matrices, and similar structured artifacts.
   Every use must be clearly labeled as reconstructed.
   -------------------------------------------------------- */
.framework {
  margin: var(--space-4) 0 var(--space-4);
}
.framework-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.framework-caption {
  font-size: 0.8125rem;
  color: var(--muted);
  font-style: italic;
  margin-top: var(--space-2);
  line-height: 1.55;
  max-width: var(--w-reading);
}
.framework-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--panel);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.framework-table thead th {
  text-align: left;
  padding: 0.75rem 0.9rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  background: var(--panel-hover);
  border-bottom: 1px solid var(--border);
  vertical-align: bottom;
  line-height: 1.3;
}
.framework-table tbody td {
  padding: 0.75rem 0.9rem;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
.framework-table tbody tr:last-child td { border-bottom: none; }
.framework-table td.principle-name {
  font-weight: 500;
  color: var(--ink);
  background: var(--panel-hover);
  white-space: nowrap;
}
.framework-mvp-in { color: #15803d; font-weight: 500; }
.framework-mvp-preserved { color: #15803d; font-weight: 500; opacity: 0.85; }
.framework-mvp-iter { color: #92400e; font-weight: 500; }
.framework-mvp-deferred { color: var(--muted); }

/* Breakout — allows a wide table to escape a reading-width article container.
   Falls back to full available width inside its container on smaller screens.
   Scrolls horizontally when the table's min-width exceeds the viewport. */
.framework-breakout {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100vw - 2 * var(--page-gutter)), var(--w-content));
  margin: var(--space-5) 0 var(--space-4);
}
.framework-breakout-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-2);
}
.framework-table-wide {
  min-width: 820px;
  table-layout: auto;
}

/* Mobile: matrix is inherently desktop-first. Compress padding/type so it
   stays legible in-place; horizontal scroll takes over when the table's
   min-width exceeds the viewport (parent .framework-breakout-scroll). */
@media (max-width: 640px) {
  .framework-table-wide {
    font-size: 0.75rem;
  }
  .framework-table-wide thead th,
  .framework-table-wide tbody td {
    padding: 0.5rem 0.55rem;
  }
  .framework-breakout {
    /* On mobile, break out to the full viewport minus a small gutter so the
       scroll container has room to accept overflow. */
    width: calc(100vw - 2 * var(--page-gutter));
  }
}

/* Principle cards */
.principle-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin: var(--space-3) 0 var(--space-5);
}
@media (min-width: 640px) {
  .principle-cards { grid-template-columns: 1fr 1fr; }
}
.principle-card {
  background: var(--panel);
  padding: var(--space-3);
  border-radius: 6px;
  border-top: 3px solid var(--ink);
}
.principle-card h3 {
  margin-top: 0;
  margin-bottom: var(--space-1);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.principle-card p {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Related links */
.related-links {
  border-top: 1px solid var(--border);
  margin-top: var(--space-6);
  padding-top: var(--space-3);
  color: var(--muted);
  font-size: 0.9375rem;
}
.related-links p { color: var(--muted); font-size: 0.9375rem; }

/* Cluster overview list (legacy — still used for narrative cluster items) */
.cluster-story {
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border);
}
.cluster-story:first-child { border-top: none; padding-top: 0; }
.cluster-story h3 {
  margin-top: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-1);
}
.cluster-story h3 a { color: var(--ink); text-decoration: none; }
.cluster-story h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.cluster-story p { color: var(--ink-soft); line-height: 1.6; margin-bottom: 0; }

/* Case-study cards — visually differentiated entry points on cluster pages.
   Editorial card treatment: panel surface, generous padding, subtle hover.
   2-col grid at ≥720px; single column below. */
.case-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
@media (min-width: 720px) {
  .case-card-grid { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
}
@media (min-width: 1024px) {
  .case-card-grid { grid-template-columns: repeat(3, 1fr); }
}
/* Slot wrapper — lets a secondary .prototype-link hang below the panel
   card without nesting anchors. The card fills the slot; the link sits
   below in the same column, aligned to card's left edge. */
.case-card-slot {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.case-card-slot .case-card { flex: 1; }
.case-card-slot .prototype-link {
  padding-left: var(--space-4);   /* align with card interior */
}
.case-card {
  background: var(--panel);
  border-radius: 10px;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid transparent;
  min-height: 220px;
}
.case-card:hover {
  background: var(--panel-hover);
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(23, 23, 23, 0.06);
}
.case-card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.case-card-title {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2) 0;
  color: var(--ink);
}
.case-card-desc {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 var(--space-3) 0;
  flex: 1;
}
.case-card-cta {
  font-size: 0.9375rem;
  color: var(--ink);
  font-weight: 500;
  margin-top: auto;
}

/* Related thinking strip — sits below case-card grid on cluster pages */
.related-thinking {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}
.related-thinking-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--space-1);
}
.related-thinking-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 var(--space-1) 0;
}
.related-thinking-title a { color: var(--ink); text-decoration: none; }
.related-thinking-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.related-thinking-desc {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.55;
  margin: 0;
  max-width: var(--w-reading);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-4) 0;
  margin-top: var(--space-7);
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer .footer-inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.site-footer p { margin: 0; color: var(--muted); }

/* Emphasis */
strong { font-weight: 600; }
em { font-style: italic; }

/* First-child heading has no top margin */
.container > h1:first-child,
.container > article > h1:first-child,
.container > article > .eyebrow + h1,
.container-content > h1:first-child { margin-top: 0; }

/* --------------------------------------------------------
   Home refinement pass — tighter rhythm, feature visual, teaser
   -------------------------------------------------------- */

/* Slightly tighter vertical rhythm on Home's middle sections */
.section-tight { padding: var(--space-5) 0; }
@media (min-width: 720px) {
  .section-tight { padding: 4rem 0; }
}

/* Feature visual for Reporting & Analytics — large product-image area */
.work-feature {
  display: block;
  margin-top: var(--space-3);
  margin-bottom: var(--space-5);
}
.work-feature-desc {
  max-width: var(--w-reading);
  margin-top: var(--space-4);
}
.work-feature-desc .work-group-desc { margin-bottom: var(--space-2); }
.work-feature .work-feature-visual {
  background: var(--panel);
  border-radius: 8px;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  border: 1px dashed #c8c5be;
  color: var(--muted);
  text-align: center;
}
.work-feature .work-feature-visual .visual-label {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: var(--space-2);
  display: block;
}
.work-feature .work-feature-visual .visual-desc {
  max-width: 380px;
  line-height: 1.5;
  font-size: 0.9375rem;
}

/* --------------------------------------------------------
   Home — Reporting feature mock (Report Library reconstruction)
   Scoped .rl-mock-* — inline HTML/CSS with SVG icons.
   -------------------------------------------------------- */
.work-feature .work-feature-visual.is-filled {
  padding: 0;
  border: none;
  background: transparent;
  min-height: auto;
  display: block;
}

.rl-mock-figure { margin: 0; display: block; }

/* Wrapper — visible frame at the display size.
   Design width 1400 × 820 matches a real desktop enterprise app.
   Scaled proportionally via container queries. */
.rl-mock-wrap {
  width: 100%;
  aspect-ratio: 1400 / 820;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(23, 23, 23, 0.08), 0 2px 6px rgba(23, 23, 23, 0.04);
  background: #ffffff;
  container-type: inline-size;
}
.rl-mock {
  width: 1400px;
  height: 820px;
  transform-origin: top left;
  transform: scale(calc(100cqw / 1400));
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: #ffffff;
  overflow: hidden;
  display: flex;
}

/* Sidebar */
.rl-mock-sidebar {
  width: 260px;
  background: #f7f5f0;
  border-right: 1px solid var(--border);
  padding: 28px 0 20px;
  flex-shrink: 0;
  overflow: hidden;
}
.rl-mock-nav-eyebrow {
  padding: 0 24px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
}
.rl-mock-nav-list {
  list-style: none;
  padding: 0;
  margin: 0 12px 24px;
}
.rl-mock-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 1px;
}
.rl-mock-nav-item.is-active {
  background: #e6efee;
  color: #14544f;
  font-weight: 500;
}
.rl-mock-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
.rl-mock-nav-item.is-active svg { color: #14544f; }
.rl-mock-nav-item .rl-mock-nav-icon-line { color: #2b4c7e; }
.rl-mock-nav-item .rl-mock-nav-icon-folder { color: #d97706; }
.rl-mock-pin-icon { margin-left: auto; color: #2b4c7e; width: 15px; height: 15px; }

/* Main content */
.rl-mock-main {
  flex: 1;
  padding: 32px 40px 0;
  overflow: hidden;
  min-width: 0;
}
.rl-mock-crumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.rl-mock-crumb-sep { color: var(--muted-light, #a5a29d); }
.rl-mock-crumb-current { color: var(--ink); font-weight: 500; }

.rl-mock-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}
.rl-mock-title {
  font-family: var(--font-body);
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.rl-mock-sub { font-size: 13.5px; color: var(--muted); margin: 0; }
.rl-mock-header-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.rl-mock-search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  min-width: 320px;
  font-size: 13.5px;
  color: #a5a29d;
}
.rl-mock-search svg { width: 15px; height: 15px; flex-shrink: 0; }
.rl-mock-btn {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--ink);
  color: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: default;
  white-space: nowrap;
  line-height: 1.2;
}
.rl-mock-btn svg { width: 14px; height: 14px; display: block; }

/* Category chips */
.rl-mock-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.rl-mock-cat {
  font-size: 13.5px;
  color: var(--ink-soft);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 16px;
  font-weight: 500;
}
.rl-mock-cat.is-active { background: #14544f; color: #ffffff; border-color: #14544f; }

/* Facet filter row */
.rl-mock-facets {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.rl-mock-facet {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
}
.rl-mock-facet svg { width: 14px; height: 14px; color: currentColor; }
.rl-mock-facet-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px 7px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
}
.rl-mock-facet-select svg { width: 12px; height: 12px; color: var(--muted); }
.rl-mock-clear {
  color: #b91c1c;
  font-size: 13px;
  font-weight: 500;
  margin-left: 8px;
  cursor: default;
}

/* Results header */
.rl-mock-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.rl-mock-results-count { font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 12px; }
.rl-mock-results-count strong { color: var(--ink); font-weight: 500; }
.rl-mock-sort-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}
.rl-mock-sort-pill svg { width: 11px; height: 11px; color: var(--muted); }
.rl-mock-view-toggle {
  display: flex;
  background: var(--panel);
  border-radius: 6px;
  padding: 3px;
  gap: 2px;
}
.rl-mock-view-btn {
  width: 30px; height: 26px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rl-mock-view-btn.is-active { background: #ffffff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.rl-mock-view-btn svg { width: 14px; height: 14px; display: block; }

/* Data table */
.rl-mock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  table-layout: fixed;
}
.rl-mock-table th {
  text-align: left;
  padding: 14px 14px;
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.rl-mock-table th .rl-mock-sort-arrow {
  color: var(--muted-light, #a5a29d);
  font-size: 10px;
  margin-left: 6px;
  display: inline-block;
  vertical-align: middle;
}
.rl-mock-table td {
  padding: 18px 14px;
  border-bottom: 1px solid #efece6;
  color: var(--ink);
  vertical-align: top;
}
.rl-mock-table tr:last-child td { border-bottom: none; }

/* Column widths — matches reference layout */
.rl-mock-table th:nth-child(1),
.rl-mock-table td:nth-child(1) { width: 48px; padding-left: 8px; padding-right: 0; text-align: left; vertical-align: top; padding-top: 20px; }
.rl-mock-table th:nth-child(2),
.rl-mock-table td:nth-child(2) { width: auto; }
.rl-mock-table th:nth-child(3),
.rl-mock-table td:nth-child(3) { width: 150px; }
.rl-mock-table th:nth-child(4),
.rl-mock-table td:nth-child(4) { width: 160px; }
.rl-mock-table th:nth-child(5),
.rl-mock-table td:nth-child(5) { width: 170px; }
.rl-mock-table th:nth-child(6),
.rl-mock-table td:nth-child(6) { width: 120px; }
.rl-mock-table th:nth-child(7),
.rl-mock-table td:nth-child(7) { width: 90px; }

/* Row cell content */
.rl-mock-row-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.rl-mock-row-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 500px;
}
.rl-mock-row-more {
  font-size: 12.5px;
  color: #2563eb;
  font-weight: 500;
}

.rl-mock-star { display: inline-flex; color: #d5d3ce; }
.rl-mock-star.is-fav { color: #eab308; }
.rl-mock-star svg { width: 18px; height: 18px; display: block; }

.rl-mock-owner-cell { font-size: 13.5px; color: var(--ink); }
.rl-mock-category-cell { font-size: 13.5px; color: var(--ink); line-height: 1.4; }

.rl-mock-lastrun-date { font-size: 13.5px; color: var(--ink); margin-bottom: 6px; }

/* Type pills */
.rl-mock-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: var(--panel);
  color: var(--ink-soft);
  border: 1px solid var(--border);
  line-height: 1.3;
}
.rl-mock-pill.is-template,
.rl-mock-pill-teal {
  background: #e6efee;
  color: #14544f;
  border-color: #b8cdcb;
}

/* Status pills */
.rl-mock-status {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.5;
}
.rl-mock-actions-cell { display: flex; gap: 4px; justify-content: flex-start; align-items: center; }
.rl-mock-action-btn {
  width: 28px; height: 28px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.rl-mock-action-btn.is-pinned { color: #2b4c7e; }
.rl-mock-action-btn svg { width: 15px; height: 15px; }
.rl-mock-status-ok     { color: #15803d; background: #ecfdf5; }
.rl-mock-status-stale  { color: #92400e; background: #fef3c7; }
.rl-mock-status-failed { color: #b91c1c; background: #fee2e2; }

.rl-mock-caption {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  font-style: italic;
  text-align: center;
}
@media (max-width: 520px) {
  .rl-mock-table th:last-child,
  .rl-mock-table td:last-child { display: none; }
  .rl-mock-cats .rl-mock-cat:nth-child(n+4) { display: none; }
}

/* --------------------------------------------------------
   Product composition — dominant primary surface with a
   focused modal/detail panel floating over the right side.
   Referenced from high-end product portfolios.
   -------------------------------------------------------- */
.mock-composition {
  position: relative;
  width: 100%;
  /* Match the primary's native aspect ratio (1400 × 820) so nothing
     stretches. Previous 900:560 was distorting the mock. */
  aspect-ratio: 1400 / 820;
}
.mock-composition .mock-primary {
  position: absolute;
  inset: 0;                  /* primary fills the entire frame */
  z-index: 1;
}
.mock-composition .mock-primary .rl-mock-wrap {
  height: 100%;
  aspect-ratio: auto;        /* parent controls the size now */
  box-shadow: 0 12px 40px rgba(23, 23, 23, 0.10), 0 2px 6px rgba(23, 23, 23, 0.05);
}
.mock-composition .mock-secondary {
  position: absolute;
  top: 7.5%;                 /* aligned near the top row of the table */
  right: 3.5%;
  width: 30%;                /* was 36% — leaves more table visible */
  z-index: 2;
  filter: drop-shadow(0 20px 40px rgba(23, 23, 23, 0.12));
}
.mock-composition .mock-secondary .qd-panel-wrap {
  /* Softer, tighter shadow — the drop-shadow above does the heavy lift */
  box-shadow: 0 1px 3px rgba(23, 23, 23, 0.06);
}

/* Subtle "selected row" hint on row 1 (Payer Activity Overview) — the
   report the detail panel is showing. Very light so it reads as
   selection state without dominating. */
.mock-composition .rl-mock-table tbody tr:first-child {
  background: #eef3f6;
}
.mock-composition .rl-mock-table tbody tr:first-child td:first-child {
  box-shadow: inset 3px 0 0 #2b4c7e;
}

@media (max-width: 720px) {
  .mock-composition { aspect-ratio: auto; }
  .mock-composition .mock-primary,
  .mock-composition .mock-secondary { position: static; width: 100%; margin-bottom: 12px; inset: auto; }
}

/* Query Details panel — modal/detail floating on top of primary */
.qd-panel-wrap {
  width: 100%;
  aspect-ratio: 480 / 560;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow:
    0 24px 60px rgba(23, 23, 23, 0.14),
    0 8px 20px rgba(23, 23, 23, 0.08);
  background: #ffffff;
  container-type: inline-size;
}
.qd-panel {
  width: 480px;
  height: 560px;
  transform-origin: top left;
  transform: scale(calc(100cqw / 480));
  font-family: var(--font-body);
  background: #ffffff;
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.qd-panel-head {
  padding: 20px 24px 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.qd-panel-close {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.qd-panel-close svg { width: 16px; height: 16px; }

.qd-panel-title-row {
  padding: 4px 24px 8px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.qd-panel-title {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
}
.qd-panel-star { color: #eab308; display: inline-flex; align-items: center; }
.qd-panel-star svg { width: 18px; height: 18px; display: block; }

.qd-panel-desc {
  padding: 0 24px 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.qd-panel-warning {
  margin: 4px 24px 14px;
  padding: 12px 14px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #92400e;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12.5px;
  line-height: 1.45;
}
.qd-panel-warning svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.qd-panel-warning strong { display: block; font-weight: 600; margin-bottom: 2px; }

.qd-panel-tags {
  padding: 0 24px 16px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.qd-panel-tag {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--ink-soft);
  background: #ffffff;
  border: 1px solid var(--border);
  font-weight: 500;
}
.qd-panel-tag.is-primary { background: #e6efee; color: #14544f; border-color: #b8cdcb; }

.qd-panel-section {
  padding: 12px 24px;
  border-top: 1px solid #efece6;
}
.qd-panel-section-title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.qd-panel-config-item {
  font-family: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  padding: 4px 0;
  color: var(--ink);
  border-bottom: 1px dashed #efece6;
}
.qd-panel-config-item:last-child { border-bottom: none; }
.qd-panel-config-value { color: #14544f; font-weight: 500; }
.qd-panel-schedule-line {
  font-size: 12.5px;
  padding: 3px 0;
  color: var(--ink-soft);
  display: flex;
  gap: 6px;
}
.qd-panel-schedule-line strong { color: var(--ink); font-weight: 500; min-width: 84px; }

.qd-panel-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: #ffffff;
}
.qd-panel-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  cursor: default;
  line-height: 1.2;
  font-family: var(--font-body);
}
.qd-panel-btn.is-primary {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}
.qd-panel-btn.is-link {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

/* --------------------------------------------------------
   Query Builder mini-mock — Edit Query view.
   Same design width (900) as RL mock so both scale identically.
   -------------------------------------------------------- */
.qb-mock-wrap {
  width: 100%;
  aspect-ratio: 900 / 560;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(23, 23, 23, 0.10), 0 2px 6px rgba(23, 23, 23, 0.05);
  background: #ffffff;
  container-type: inline-size;
}
.qb-mock {
  width: 900px;
  height: 560px;
  transform-origin: top left;
  transform: scale(calc(100cqw / 900));
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  background: #ffffff;
  overflow: hidden;
}
.qb-mock-chrome {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  height: 48px;
  border-bottom: 1px solid var(--border);
  background: #fbfaf7;
}
.qb-mock-dots { display: flex; gap: 6px; }
.qb-mock-dots span { width: 11px; height: 11px; border-radius: 50%; background: #d6d3cb; }
.qb-mock-crumb { font-size: 12.5px; color: var(--muted); letter-spacing: 0.005em; }

.qb-mock-body { display: grid; grid-template-columns: 60px 1fr; height: 512px; }
.qb-mock-nav {
  border-right: 1px solid var(--border);
  background: #fbfaf7;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.qb-mock-nav-item {
  width: 40px; height: 40px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a8783;
}
.qb-mock-nav-item.is-active { background: var(--panel); color: var(--ink); }
.qb-mock-nav-item svg { width: 18px; height: 18px; display: block; }

.qb-mock-main { padding: 20px 28px 0; display: flex; flex-direction: column; height: 100%; overflow: hidden; }

.qb-mock-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.qb-mock-title {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.qb-mock-sub { font-size: 12.5px; color: var(--muted); margin: 0; }
.qb-mock-sub strong { color: var(--ink); font-weight: 500; }

.qb-mock-actions { display: flex; gap: 8px; }
.qb-mock-btn-ghost, .qb-mock-btn-primary {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  cursor: default;
  line-height: 1.2;
}
.qb-mock-btn-primary { background: var(--ink); color: #ffffff; border-color: var(--ink); }

.qb-mock-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding-top: 4px;
  margin-bottom: 0;
}
.qb-mock-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.qb-mock-tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.qb-mock-tab-count {
  font-size: 11px;
  padding: 1px 8px;
  background: var(--panel);
  color: var(--muted);
  border-radius: 10px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}
.qb-mock-tab.is-active .qb-mock-tab-count { background: var(--ink); color: #ffffff; }

.qb-mock-panels {
  flex: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  margin: 0 -14px 20px;
}
.qb-mock-panel-left {
  background: #fbfaf7;
  border-right: 1px solid var(--border);
  padding: 12px 14px;
  overflow: hidden;
}
.qb-mock-panel-right {
  background: #ffffff;
  padding: 12px 14px;
  overflow: hidden;
}
.qb-mock-panel-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.qb-mock-panel-title span.qb-mock-hint {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.qb-mock-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 12.5px;
  color: #a5a29d;
  margin-bottom: 10px;
}

.qb-mock-category { margin-bottom: 8px; }
.qb-mock-cat-header {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.qb-mock-cat-caret { font-size: 8px; color: #a5a29d; }
.qb-mock-attr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 18px;
  font-size: 12.5px;
  color: var(--ink);
  border-radius: 3px;
}
.qb-mock-attr.is-selected { color: var(--muted); }
.qb-mock-chk {
  width: 14px; height: 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #ffffff;
  flex-shrink: 0;
  position: relative;
}
.qb-mock-attr.is-selected .qb-mock-chk {
  background: var(--ink);
  border-color: var(--ink);
}
.qb-mock-attr.is-selected .qb-mock-chk::after {
  content: "";
  position: absolute;
  top: 2px; left: 4px;
  width: 3px; height: 6px;
  border: solid #ffffff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.qb-mock-added-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.qb-mock-added-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 12.5px;
  color: var(--ink);
}
.qb-mock-drag {
  color: #a5a29d;
  font-size: 12px;
  line-height: 1;
  letter-spacing: -0.05em;
}
.qb-mock-added-item.is-new {
  box-shadow: inset 3px 0 0 0 #2d6864;
  background: #f0f5f4;
  border-color: #b8cdcb;
}

/* Story entry points beneath the feature */
.story-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
@media (min-width: 720px) {
  .story-list { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
}
.story-card {
  background: transparent;
  border-top: 1px solid var(--border);
  padding: var(--space-3) 0 var(--space-1);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: opacity 0.15s ease;
}
.story-card:hover { text-decoration: none; opacity: 0.72; }
.story-card .story-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--space-1);
}
.story-card .story-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
  color: var(--ink);
}
.story-card .story-desc {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: var(--space-2);
  flex: 1;
}
.story-card .story-cta {
  font-size: 0.875rem;
  color: var(--ink);
  font-weight: 500;
  margin-top: auto;
  padding-bottom: var(--space-2);
}

/* Story entry wraps a card + a secondary prototype link */
.story-entry {
  display: flex;
  flex-direction: column;
}
.story-prototype-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  align-self: flex-start;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(0, 0, 0, 0.2);
  padding: 0.125rem 0 var(--space-2);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.story-prototype-link:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}
.story-prototype-icon {
  display: inline-block;
  transform: translateY(-1px);
  font-size: 0.875rem;
  color: var(--muted);
}
.story-prototype-link:hover .story-prototype-icon { color: var(--ink); }
.story-prototype-lock {
  color: var(--muted);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
}

/* Unlock page — soft gate for interactive prototypes */
.unlock-section {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: var(--space-5) var(--space-3);
}
.unlock-card {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--space-5) 0;
}
.unlock-title {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: var(--space-3);
  color: var(--ink);
}
.unlock-lead {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: var(--space-4);
}
.unlock-lead a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 0, 0, 0.3);
}
.unlock-lead a:hover { text-decoration-color: var(--ink); }
.unlock-form { margin-bottom: var(--space-3); }
.unlock-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--space-1);
}
.unlock-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: stretch;
}
.unlock-row input {
  flex: 1 1 240px;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  line-height: 1.3;
}
.unlock-row input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.08);
}
.unlock-row .btn { align-self: stretch; }
.unlock-error {
  min-height: 1.4em;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #a03327;
}
.unlock-error:empty { min-height: 0; }
.unlock-fineprint {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.55;
  border-top: 1px solid var(--border);
  padding-top: var(--space-2);
}

/* Subtle teaser row — Publishing / more from this ecosystem */
.ecosystem-teaser {
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
  margin-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.ecosystem-teaser .teaser-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
}
.ecosystem-teaser .teaser-text {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.55;
  max-width: 640px;
}
.ecosystem-teaser .teaser-text strong { color: var(--ink); font-weight: 500; }

/* Compact domains strip */
.domains-strip {
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
  margin-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: baseline;
}
.domains-strip .domains-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
  margin-right: var(--space-2);
}
.domains-strip .domain-item {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.domains-strip .domain-sep {
  color: var(--muted);
  font-size: 0.9375rem;
  padding: 0 0.15rem;
}

/* --------------------------------------------------------
   Query Builder reconstruction — scoped component
   Neutral enterprise-analytics visual language; deliberately
   different from the portfolio's editorial system so the
   product UI reads as a product, not as the portfolio.
   -------------------------------------------------------- */

/* Break out of reading-width container so the figure reads as a desktop app,
   not as a mobile-width panel. Prose around it stays at reading width. */
.qb-figure {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100vw - 3rem), var(--w-wide));
  margin: var(--space-5) 0 var(--space-3);
}
.qb-screen {
  background: #ffffff;
  border: 1px solid #e2e2e0;
  border-radius: 6px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  font-size: 13px;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(15, 15, 15, 0.04), 0 6px 20px rgba(15, 15, 15, 0.06);
  -webkit-font-smoothing: antialiased;
}

.qb-header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #eceae4;
  padding: 0.65rem 1rem;
  gap: 1rem;
  background: #fbfaf7;
}
.qb-tabs { display: flex; gap: 0.15rem; }
.qb-tab {
  padding: 0.42rem 0.85rem;
  font-size: 0.8125rem;
  color: #6b6b6b;
  border-radius: 4px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.qb-tab.is-active {
  background: #ececea;
  color: #1a1a1a;
}
.qb-header-actions { margin-left: auto; display: flex; gap: 0.4rem; }
.qb-btn {
  padding: 0.42rem 0.9rem;
  font-size: 0.8125rem;
  border-radius: 4px;
  border: 1px solid #d5d3ce;
  background: #ffffff;
  color: #1f2937;
  font-weight: 500;
  font-family: inherit;
  cursor: default;
  letter-spacing: -0.005em;
}
.qb-btn.is-primary {
  background: #1f2937;
  color: #ffffff;
  border-color: #1f2937;
}

.qb-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 440px;
}
.qb-panel {
  padding: 0.9rem 1rem 1rem;
}
.qb-panel-left {
  border-right: 1px solid #eceae4;
  background: #fdfcfa;
}
.qb-panel-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7a7773;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.qb-search {
  border: 1px solid #d5d3ce;
  border-radius: 4px;
  padding: 0.42rem 0.6rem;
  font-size: 0.8125rem;
  color: #9a9793;
  margin-bottom: 0.85rem;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.qb-search::before {
  content: "⌕";
  color: #b5b3ae;
  font-size: 0.95rem;
  line-height: 1;
}

.qb-category { margin-bottom: 0.85rem; }
.qb-category:last-child { margin-bottom: 0; }
.qb-category-name {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #7a7773;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.qb-attr-list { list-style: none; margin: 0; padding: 0; }
.qb-attr {
  padding: 0.32rem 0.5rem;
  font-size: 0.8125rem;
  color: #1f2937;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  line-height: 1.35;
}
.qb-attr .qb-attr-marker {
  width: 12px;
  height: 12px;
  border: 1px solid #c8c5be;
  border-radius: 2px;
  background: #ffffff;
  flex-shrink: 0;
}
.qb-attr.is-selected .qb-attr-marker {
  background: #1f2937;
  border-color: #1f2937;
  position: relative;
}
.qb-attr.is-selected .qb-attr-marker::after {
  content: "✓";
  color: #ffffff;
  font-size: 9px;
  position: absolute;
  top: -3px;
  left: 1px;
  font-weight: 700;
}
.qb-attr.is-selected { color: #6b6b6b; }

.qb-panel-right { background: #ffffff; }

.qb-selected-list { list-style: none; margin: 0; padding: 0; }
.qb-selected-item {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  font-size: 0.8125rem;
  color: #1f2937;
  border: 1px solid #eceae4;
  border-radius: 4px;
  margin-bottom: 0.4rem;
  background: #ffffff;
}
.qb-drag-handle { color: #a0a0a0; line-height: 1; font-size: 0.9rem; letter-spacing: -0.05em; }
.qb-remove {
  color: #6b6b6b;
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: #f2f0eb;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.qb-filter-config {
  border: 1px solid #eceae4;
  border-radius: 4px;
  padding: 0.7rem 0.75rem;
  margin-bottom: 0.5rem;
  background: #ffffff;
}
.qb-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.qb-filter-name {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #4d4d4d;
  font-weight: 600;
}
.qb-filter-body { font-size: 0.8125rem; color: #1f2937; display: flex; flex-wrap: wrap; gap: 0.4rem 0.55rem; align-items: center; }
.qb-filter-body .qb-label { color: #7a7773; font-size: 0.75rem; }
.qb-input {
  border: 1px solid #d5d3ce;
  border-radius: 3px;
  padding: 0.3rem 0.55rem;
  font-size: 0.8125rem;
  background: #ffffff;
  color: #1f2937;
  min-width: 108px;
}
.qb-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  background: #f2f0eb;
  color: #1f2937;
  border: 1px solid #e2e0d9;
  border-radius: 12px;
  font-size: 0.7625rem;
  font-weight: 500;
  line-height: 1.2;
}
.qb-chip .qb-chip-x { color: #7a7773; font-size: 0.7rem; line-height: 1; }
.qb-add-value {
  font-size: 0.75rem;
  color: #4d4d4d;
  padding: 0.22rem 0;
  font-weight: 500;
}

.qb-results {
  border-top: 1px solid #eceae4;
  padding: 0.85rem 1rem 1rem;
  background: #fbfaf7;
}
.qb-results-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}
.qb-results-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7a7773;
  font-weight: 600;
}
.qb-results-meta { font-size: 0.72rem; color: #7a7773; }

.qb-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.8125rem;
  background: #ffffff;
  border: 1px solid #eceae4;
  border-radius: 4px;
  overflow: hidden;
}
.qb-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a7773;
  background: #f7f5f1;
  border-bottom: 1px solid #eceae4;
  white-space: nowrap;
}
.qb-table td {
  padding: 0.55rem 0.75rem;
  color: #1f2937;
  border-bottom: 1px solid #f4f2ed;
  white-space: nowrap;
}
.qb-table td.qb-num { text-align: right; font-variant-numeric: tabular-nums; }
.qb-table tr:last-child td { border-bottom: none; }

.qb-caption {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.85rem;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
}

/* Responsive */
@media (max-width: 780px) {
  .qb-body { grid-template-columns: 1fr; }
  .qb-panel-left {
    border-right: none;
    border-bottom: 1px solid #eceae4;
  }
  .qb-header { flex-wrap: wrap; gap: 0.5rem; }
  .qb-header-actions { margin-left: 0; }
  .qb-table { display: block; overflow-x: auto; }
}

/* --------------------------------------------------------
   Responsive (portfolio)
   -------------------------------------------------------- */

/* Responsive page gutter — generous on desktop, progressively smaller on mobile */
@media (max-width: 1024px) {
  :root {
    --page-gutter: 1.25rem;  /* 20px on tablet */
  }
}

@media (max-width: 640px) {
  :root {
    --page-gutter: 1rem;  /* 16px on mobile */
  }
  main { padding: 0 0 var(--space-6); }
  .hero { padding: var(--space-4) 0 var(--space-5); }
  .site-nav .nav-inner { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
  .site-nav ul { gap: var(--space-3); flex-wrap: wrap; }
  .site-footer .footer-inner { flex-direction: column; }
  h2 { margin-top: var(--space-5); }
  .btn { padding: 0.625rem 1rem; width: 100%; text-align: center; }
  .hero-cta { flex-direction: column; }
}

/* --------------------------------------------------------
   Home — reshape (2026-09).
   Editorial front page: quiet hero → Selected work (feature +
   list) → Thinking list → About with small portrait → Contact.
   -------------------------------------------------------- */

/* Hero — short intro on the left, cutout portrait fills the right side
   full-height and pushes to the container's right edge (no right gutter).
   Stacks on mobile with text first, portrait beneath. */
.home-hero {
  padding: var(--space-4) 0 0;
}
.home-hero-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: stretch;
}
/* Kill right padding on the hero's container so the portrait touches
   the container's right edge. */
.container-wide.home-hero-row { padding-right: 0; }
.home-hero-portrait {
  margin: 0;
  max-width: none;
  height: 100%;
  line-height: 0;
  align-self: stretch;
}
.home-hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom right;
  display: block;
  /* No border-radius, no fallback background: cutout PNG. */
}
.home-hero-body {
  min-width: 0;
  align-self: center;
}
.home-lede {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 var(--space-4);
  max-width: 22ch;
}
.home-byline {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 640px;
  margin: 0;
}
.home-byline-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.28);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  white-space: nowrap;
}
.home-byline-link:hover { text-decoration-color: var(--ink); }

@media (min-width: 720px) {
  .home-hero-row {
    grid-template-columns: 1fr 480px;
    gap: var(--space-5);
    align-items: stretch;
  }
}
@media (min-width: 900px) {
  .home-lede { max-width: 24ch; }
}
@media (max-width: 640px) {
  .home-hero { padding: var(--space-3) 0 var(--space-5); }
  .home-lede { max-width: none; }
}

/* Editorial work list — no cards; rhythm via horizontal rules */
.work-list {
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0 0;
  border-top: 1px solid var(--border);
}
.work-list-item {
  padding: var(--space-4) 0 var(--space-5);
  border-bottom: 1px solid var(--border);
}
.work-list-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
  color: var(--ink);
}
.work-list-title a {
  color: inherit;
  text-decoration: none;
}
.work-list-title a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(0, 0, 0, 0.35);
}
.work-list-desc {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 62ch;
  margin: 0 0 var(--space-3);
}
.work-list-meta {
  margin: 0;
  font-size: 0.9375rem;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
  align-items: baseline;
}
.work-list-cta {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  padding-bottom: 1px;
  transition: border-color 0.15s ease;
}
.work-list-cta:hover { border-bottom-color: var(--ink); text-decoration: none; }
.work-list-cta.is-quiet {
  color: var(--muted);
  font-weight: 400;
  border-bottom-color: transparent;
}
.work-list-cta.is-quiet:hover { color: var(--ink); border-bottom-color: rgba(0, 0, 0, 0.35); }
.work-list-lock {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-left: 0.25rem;
}

/* Compact Thinking list — labels + titles, no excerpts */
.thinking-compact {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 var(--space-3);
  border-top: 1px solid var(--border);
}
.thinking-compact-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem 1.5rem;
  align-items: baseline;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}
.thinking-compact-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
}
.thinking-compact-link {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.thinking-compact-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(0, 0, 0, 0.35);
}
@media (min-width: 720px) {
  .thinking-compact-item {
    grid-template-columns: 200px 1fr;
    gap: 0 var(--space-4);
    padding: var(--space-3) 0;
  }
  .thinking-compact-link { font-size: 1.375rem; }
}

.quiet-link {
  display: inline-block;
  margin-top: var(--space-3);
  color: var(--ink);
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(0, 0, 0, 0.3);
}
.quiet-link:hover { text-decoration-color: var(--ink); }

/* About row — smaller portrait + short intro, stacked on mobile.
   Row is capped so it doesn't sprawl inside container-wide. */
.home-about {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: start;
  max-width: 780px;
}
.home-about-portrait {
  margin: 0;
  max-width: 220px;
}
.home-about-portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  background: var(--panel);
}
.home-about-body { max-width: 60ch; }
.home-about-body .section-eyebrow { margin-bottom: var(--space-2); }
.home-about-lede {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 0 0 var(--space-2);
}
@media (min-width: 720px) {
  .home-about {
    grid-template-columns: 220px 1fr;
    gap: var(--space-5);
    align-items: center;
  }
  .home-about-portrait { max-width: 220px; }
}

/* Contact — one confident line */
.home-contact {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--ink);
  max-width: 42ch;
  margin: 0;
}
.home-contact a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}
.home-contact a:hover { text-decoration-color: var(--ink); }

/* How I work on Home — recruiter-scannable process signal.
   Warm cream ground breaks the sheet-of-white monotony.
   DD SVG on desktop, DISCOVER · DEFINE · DEVELOP · DELIVER text on mobile.
   No activity cards on Home — the article carries them. */
.how-i-work-home {
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.how-i-work-home .section-lead { max-width: 60ch; }

.op-home { margin: var(--space-4) 0 var(--space-3); }
.op-home .op-dd svg { max-width: 900px; margin: 0 auto; }
.op-home-caption {
  margin: var(--space-3) auto 0;
  max-width: 56ch;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
  font-style: italic;
}
.how-i-work-home .quiet-link { margin-top: var(--space-2); }

/* Featured cluster on Home — 50/50 text left, image right.
   Stacks to a single column on smaller screens. */
.feature-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
  margin: var(--space-4) 0 var(--space-6);
}
.feature-split-body { max-width: 60ch; }
.feature-split-body .work-group-title {
  margin-bottom: var(--space-3);
}
.feature-split-body .work-group-desc {
  margin-bottom: var(--space-3);
}
.feature-split-visual {
  margin: 0;
  background: var(--panel);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  position: relative;
  box-shadow:
    0 20px 45px rgba(23, 23, 23, 0.08),
    0 4px 10px rgba(23, 23, 23, 0.04);
}
.feature-split-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
}
.feature-split-visual figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--space-2) var(--space-3);
  background: linear-gradient(to top, rgba(23, 23, 23, 0.6), rgba(23, 23, 23, 0));
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  font-style: italic;
  pointer-events: none;
}
@media (min-width: 900px) {
  .feature-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: var(--space-5);
  }
}

/* Three horizontal cards below the feature.
   Restrained: no background, no rounded pill, no shadow.
   Editorial: eyebrow, Fraunces title, muted description, quiet CTA.
   Row is unified by a thin top border with per-card left dividers on desktop.
   Each card sits inside a .feature-card-slot so a secondary prototype
   link can hang below the primary card without breaking anchor nesting. */
.feature-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: var(--space-5) 0 0;
  border-top: 1px solid var(--border);
}
.feature-card-slot {
  display: flex;
  flex-direction: column;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}
.feature-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.feature-card:hover { text-decoration: none; opacity: 0.72; }
.feature-card:hover .feature-card-title {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(0, 0, 0, 0.35);
}
.feature-card-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.feature-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 var(--space-2);
}
.feature-card-desc {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 var(--space-3);
  max-width: 42ch;
}
.feature-card-cta {
  font-size: 0.875rem;
  color: var(--ink);
  font-weight: 500;
  margin-top: auto;
}

@media (min-width: 900px) {
  .feature-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }
  .feature-card-slot {
    padding: var(--space-4) var(--space-4) var(--space-4) 0;
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
  .feature-card-slot + .feature-card-slot { padding-left: var(--space-4); }
  .feature-card-slot:last-child { border-right: none; padding-right: 0; }
}

/* Shared prototype-link — secondary CTA sitting under a primary case-study
   card. Used on Home (.feature-card-slot) and on the Reporting cluster
   (.case-card-slot). Deliberately quiet so it never competes with the
   primary "Read the case study" CTA. */
.prototype-link {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 0.55rem;
  margin-top: var(--space-3);
  align-self: flex-start;
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.25);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.prototype-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
  text-decoration: none;
}
.prototype-link-pw {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
  padding-left: 0.55rem;
  border-left: 1px solid var(--border);
}
