/* CollateYard — AI Research Collation Workspace · Research workbench / paper yard aesthetic */

:root {
  --forest: #12372A;
  --forest-deep: #0a2419;
  --forest-light: #1a4d3a;
  --bg: #F7F3EA;
  --bg-paper: #FDFBF6;
  --surface: #FFFCF7;
  --surface-raised: #FFFFFF;
  --ink: #1a1f1c;
  --ink-soft: #2d3530;
  --muted: #5c635c;
  --muted-light: #7a8279;
  --accent: #0EA5A4;
  --accent-hover: #0c8f8e;
  --accent-soft: #e6f7f7;
  --accent-glow: rgba(14, 165, 164, 0.18);
  --terra: #C2410C;
  --terra-soft: #fef3ec;
  --ok: #65A30D;
  --ok-soft: #f0f9e8;
  --warn: #D97706;
  --warn-soft: #fef6e8;
  --border: #DED8C9;
  --border-dark: #c9c0ad;
  --linen-line: rgba(18, 55, 42, 0.06);
  --shadow-sm: 0 1px 2px rgba(18, 55, 42, 0.04);
  --shadow: 0 2px 8px rgba(18, 55, 42, 0.06), 0 12px 32px rgba(18, 55, 42, 0.05);
  --shadow-paper: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 2px 12px rgba(18, 55, 42, 0.07);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --container-max: 1180px;
  --gutter: clamp(16px, 4vw, 28px);
  --site-top-h: 112px;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --transition: 0.2s ease;
}

/* ── Reset & base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, var(--linen-line) 1px, transparent 1px),
    linear-gradient(var(--linen-line) 1px, transparent 1px),
    radial-gradient(ellipse at 20% 0%, rgba(14, 165, 164, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(194, 65, 12, 0.03) 0%, transparent 50%);
  background-size: 48px 48px, 48px 48px, 100% 100%, 100% 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

[hidden] {
  display: none !important;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 4.5vw, 2.85rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

p { margin-bottom: 0; }

strong { color: var(--ink-soft); font-weight: 600; }

/* ── Container & shell ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--site-top-h);
}

.site-shell main {
  flex: 1;
}

/* ── Fixed site top: ops bar + forest header ── */
.site-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
}

.header-ops-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.header-ops-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 0;
  min-width: 0;
}

.ops-badge {
  color: var(--forest);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}

.ops-badge::before {
  content: "● ";
  color: var(--ok);
  animation: pulse-dot 2.4s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.ops-detail {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-light);
}

.ops-link {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.ops-link:hover {
  color: var(--terra);
  text-decoration: underline;
}

.site-header {
  background: var(--forest);
  border-bottom: 2px solid rgba(14, 165, 164, 0.35);
  box-shadow: 0 4px 20px rgba(18, 55, 42, 0.22);
}

.header-main {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 13px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #f5f2ea;
  flex-shrink: 0;
}

.brand:hover {
  color: #fff;
  opacity: 0.95;
  text-decoration: none;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(14, 165, 164, 0.28) 0%, rgba(10, 36, 25, 0.6) 100%);
  border: 1px solid rgba(14, 165, 164, 0.4);
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.logo-mark svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.brand-text span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(245, 242, 234, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.nav-links {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 7px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(245, 242, 234, 0.78);
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-login {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(245, 242, 234, 0.75);
  padding: 6px 10px;
}

.nav-login:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: #f5f2ea;
  border-radius: 1px;
  transition: transform var(--transition);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px var(--gutter) 20px;
  background: var(--forest-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav a {
  padding: 12px 14px;
  color: rgba(245, 242, 234, 0.85);
  font-weight: 500;
  border-radius: 8px;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.mobile-nav .btn {
  margin-top: 8px;
}

/* ── Footer ── */
.site-footer {
  margin-top: auto;
  background: var(--forest);
  color: rgba(245, 242, 234, 0.72);
  border-top: 2px solid rgba(14, 165, 164, 0.3);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(5, 1fr);
  gap: 32px 24px;
}

.footer-brand .brand {
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 280px;
  color: rgba(245, 242, 234, 0.6);
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(245, 242, 234, 0.45);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: rgba(245, 242, 234, 0.72);
  padding: 5px 0;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(245, 242, 234, 0.4);
}

.footer-yard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-yard-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid rgba(14, 165, 164, 0.35);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(247, 243, 234, 0.72);
  background: rgba(14, 165, 164, 0.08);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.footer-yard-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(14, 165, 164, 0.14);
  text-decoration: none;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--surface-raised);
  color: var(--forest);
  border-color: var(--border-dark);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-paper);
  border-color: var(--forest-light);
  color: var(--forest);
}

.btn-ghost {
  background: transparent;
  color: var(--forest);
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(18, 55, 42, 0.06);
  color: var(--forest);
}

.site-header .btn-ghost {
  color: rgba(245, 242, 234, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
}

.site-header .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.82rem;
}

.btn-full {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ── Typography utilities ── */
.lead {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 52ch;
}

.eyebrow,
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--terra);
  margin-bottom: 12px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 58ch;
  margin-top: 10px;
}

.section-note {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted-light);
  text-align: center;
}

.text-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--forest);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
}

.text-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted-light);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  opacity: 0.5;
}

/* ── Sections ── */
.section {
  /* base section class from yard_section */
}

.yard-section {
  padding: clamp(56px, 8vw, 88px) 0;
}

.yard-section.is-paper {
  background: var(--bg-paper);
  border-block: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.section-head {
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 48px);
}

.section-head h2 {
  max-width: 20ch;
  margin-inline: auto;
}

.section-head .section-sub {
  margin-inline: auto;
}

.section-cta {
  padding: clamp(48px, 7vw, 72px) 0 clamp(64px, 9vw, 96px);
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.is-highlight {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius-lg);
  animation: highlight-pulse 2s ease;
}

@keyframes highlight-pulse {
  0%, 100% { outline-color: var(--accent); }
  50% { outline-color: var(--terra); }
}

/* ── Home hero-yard ── */
.hero-yard {
  padding: clamp(48px, 7vw, 80px) 0 clamp(56px, 8vw, 88px);
  position: relative;
  overflow: hidden;
}

.hero-yard-desk {
  padding-bottom: clamp(40px, 6vw, 56px);
}

.hero-yard-desk::before {
  background:
    radial-gradient(ellipse at 85% 15%, rgba(194, 65, 12, 0.05) 0%, transparent 45%),
    radial-gradient(ellipse at 15% 80%, rgba(14, 165, 164, 0.06) 0%, transparent 50%);
}

.hero-desk-top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.75fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  margin-bottom: clamp(28px, 4vw, 40px);
}

.hero-desk-copy h1 {
  max-width: min(100%, 580px);
}

.hero-source-deck {
  position: relative;
  min-height: 280px;
  padding: 12px 8px 12px 24px;
}

.deck-card {
  position: absolute;
  width: min(100%, 240px);
  padding: 14px 16px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-paper);
}

.deck-card strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: var(--forest);
  margin: 6px 0 4px;
  line-height: 1.25;
}

.deck-type {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.deck-meta {
  font-size: 0.72rem;
  color: var(--muted-light);
}

.deck-a { top: 0; left: 0; transform: rotate(-6deg); z-index: 1; }
.deck-b { top: 36px; left: 28px; transform: rotate(3deg); z-index: 2; border-color: var(--accent); }
.deck-c { top: 78px; left: 8px; transform: rotate(-2deg); z-index: 3; }
.deck-d { top: 118px; left: 36px; transform: rotate(5deg); z-index: 4; }

.deck-citation {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.hero-flow-rail {
  display: grid;
  grid-template-columns: 1.2fr auto 1.3fr auto 1fr;
  gap: 0;
  align-items: stretch;
  border: 2px solid var(--border-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-paper);
}

.flow-rail-zone {
  padding: 14px 16px;
  min-width: 0;
}

.flow-rail-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}

.flow-rail-sources {
  background: var(--bg-paper);
}

.flow-rail-sources .flow-rail-label { color: var(--muted-light); }

.flow-rail-sources .flow-rail-items span {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-soft);
}

.flow-rail-workspace {
  background: linear-gradient(165deg, var(--forest) 0%, var(--forest-light) 100%);
  color: rgba(247, 243, 234, 0.9);
}

.flow-rail-workspace .flow-rail-label { color: rgba(247, 243, 234, 0.55); }

.flow-rail-workspace .flow-rail-items span {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

.flow-rail-outputs {
  background: var(--accent-soft);
}

.flow-rail-outputs .flow-rail-label { color: var(--accent); }

.flow-rail-outputs .flow-rail-items span {
  background: var(--surface);
  border: 1px solid rgba(14, 165, 164, 0.25);
  color: var(--forest);
  font-weight: 600;
}

.flow-rail-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.flow-rail-items span {
  font-size: 0.68rem;
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.flow-rail-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-light);
}

.flow-rail-connector i {
  font-style: normal;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
}

.hero-desk-copy {
  position: relative;
  z-index: 1;
}

.hero-desk-copy .eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.hero-yard-desk .hero-positioning {
  font-size: 0.86rem;
  padding: 10px 14px;
  margin-bottom: 20px;
}

.hero-yard-desk .lead {
  font-size: 0.95rem;
  line-height: 1.55;
}

.hero-desk-copy .lead {
  margin-bottom: 16px;
  max-width: 560px;
}

.hero-yard-split {
  padding-bottom: clamp(48px, 7vw, 72px);
}

.hero-yard-split .hero-yard-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(28px, 4vw, 44px);
  align-items: center;
}

.hero-yard-intro {
  position: relative;
  z-index: 1;
  max-width: none;
  margin-bottom: 0;
}

.hero-yard-intro .eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.hero-yard-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
  position: relative;
}

.hero-yard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 75% 35%, rgba(14, 165, 164, 0.08) 0%, transparent 55%);
  pointer-events: none;
}

.hero-yard-copy {
  position: relative;
  z-index: 1;
}

.brand-slogan {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--terra);
  margin-bottom: 16px;
}

.hero-yard-intro h1,
.hero-yard-copy h1 {
  margin-bottom: 18px;
  max-width: 14ch;
}

.hero-yard-split .hero-positioning {
  font-size: 0.86rem;
  padding: 10px 14px;
  margin-bottom: 20px;
}

.hero-yard-split .lead {
  font-size: 0.95rem;
  line-height: 1.55;
}

.hero-yard-intro .lead,
.hero-yard-copy .lead {
  margin-bottom: 16px;
  max-width: 560px;
}

.hero-positioning {
  font-size: 0.92rem;
  color: var(--muted);
  padding: 12px 16px;
  margin-bottom: 24px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: 560px;
}

.hero-actions {
  margin-bottom: 20px;
}

.hero-quick-links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--muted-light);
}

.yard-bench {
  position: relative;
  z-index: 1;
  padding: 0;
  background: var(--surface);
  border: 2px solid var(--border-dark);
  border-radius: var(--radius-xl);
  box-shadow:
    var(--shadow-paper),
    0 24px 48px rgba(18, 55, 42, 0.08);
  overflow: hidden;
}

.yard-bench-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: var(--forest);
  color: rgba(247, 243, 234, 0.85);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.yard-bench-title { font-weight: 600; color: #fff; }

.yard-bench-meta { color: rgba(247, 243, 234, 0.55); }

.yard-bench-hero {
  min-height: 100%;
  align-self: stretch;
}

.yard-pipeline-hero {
  padding: 14px;
  gap: 8px;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.yard-pipeline-hero::before {
  display: none;
}

.yard-pipeline-hero .yard-pipeline-col {
  padding: 10px;
}

.yard-pipeline-hero .yard-pipeline-head {
  font-size: 0.58rem;
  margin-bottom: 8px;
}

.yard-pipeline-hero .source-chip,
.yard-pipeline-hero .output-chip {
  font-size: 0.62rem;
  padding: 4px 7px;
}

.yard-pipeline-hero .yard-work-steps {
  font-size: 0.72rem;
  gap: 4px;
}

.yard-pipeline-hero .yard-work-steps li {
  padding: 3px 0;
}

.yard-pipeline-hero .yard-pipeline-arrow {
  font-size: 1rem;
}

.yard-pipeline-wide {
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

.yard-pipeline-wide::before {
  display: none;
}

.hero-yard-visual {
  position: relative;
}

/* ── Page hero-yard (subpages) ── */
.page-hero-yard {
  padding: clamp(36px, 5vw, 56px) 0 clamp(44px, 6vw, 64px);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

.page-hero-yard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
}

.page-hero-yard-copy h1 {
  margin-bottom: 14px;
  max-width: 16ch;
}

.page-hero-yard-copy .lead {
  margin-bottom: 24px;
}

.page-hero-yard-visual {
  min-width: 0;
}

/* ── Yard pipeline (hero visual) ── */
.yard-pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1.15fr auto 1fr;
  gap: 10px;
  align-items: stretch;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-paper);
  position: relative;
}

.yard-pipeline::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 23px,
    rgba(18, 55, 42, 0.025) 23px,
    rgba(18, 55, 42, 0.025) 24px
  );
  pointer-events: none;
}

.yard-pipeline-col {
  position: relative;
  z-index: 1;
  padding: 14px;
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-width: 0;
}

.yard-pipeline-workspace {
  background: linear-gradient(160deg, var(--forest) 0%, var(--forest-light) 100%);
  border-color: rgba(14, 165, 164, 0.35);
  color: rgba(245, 242, 234, 0.9);
}

.yard-pipeline-head {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-light);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

.yard-pipeline-workspace .yard-pipeline-head {
  color: rgba(245, 242, 234, 0.55);
  border-color: rgba(255, 255, 255, 0.15);
}

.yard-pipeline-arrow {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 700;
  padding: 0 2px;
}

/* Source & output stacks */
.source-stack,
.output-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.source-chip,
.output-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--ink-soft);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform var(--transition), box-shadow var(--transition);
}

.source-chip:nth-child(odd) {
  transform: translateX(2px);
}

.source-chip:nth-child(even) {
  transform: translateX(-1px);
}

.output-chip {
  background: var(--accent-soft);
  border-color: rgba(14, 165, 164, 0.25);
  color: var(--forest);
}

.yard-work-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.yard-work-steps li {
  font-size: 0.78rem;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  color: rgba(245, 242, 234, 0.88);
  position: relative;
  padding-left: 18px;
}

.yard-work-steps li::before {
  content: "▸";
  position: absolute;
  left: 6px;
  color: var(--accent);
  font-size: 0.65rem;
}

/* Compact yard flow (page heroes) */
.yard-flow-compact {
  display: grid;
  grid-template-columns: 1fr auto 1.1fr auto 1fr;
  gap: 8px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-paper);
}

.yard-flow-col,
.yard-flow-mid {
  padding: 12px;
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.yard-flow-mid {
  background: var(--forest);
  border-color: rgba(14, 165, 164, 0.3);
}

.yard-flow-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-light);
  margin-bottom: 10px;
}

.yard-flow-mid .yard-flow-label {
  color: rgba(245, 242, 234, 0.5);
}

.source-stack-mini,
.output-stack-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.source-stack-mini span,
.output-stack-mini span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 4px 7px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--ink-soft);
}

.yard-process-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.yard-process-list li {
  font-size: 0.72rem;
  color: rgba(245, 242, 234, 0.85);
  padding-left: 12px;
  position: relative;
}

.yard-process-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── Source cards ── */
.source-type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.source-type-grid span {
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

.source-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.source-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-paper);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
}

.source-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--terra));
  border-radius: 0 0 3px 3px;
  opacity: 0.6;
}

.source-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.source-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.source-type {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 4px;
}

.source-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted-light);
}

.source-alert {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--warn);
  background: var(--warn-soft);
  padding: 3px 8px;
  border-radius: 4px;
}

.source-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.source-author {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted-light);
  margin-bottom: 10px;
}

.source-summary {
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 14px;
}

.source-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

/* ── Tag chips ── */
.tag-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

.tag-chip.validated {
  background: var(--ok-soft);
  border-color: rgba(101, 163, 13, 0.3);
  color: var(--ok);
}

.tag-chip.priority {
  background: var(--terra-soft);
  border-color: rgba(194, 65, 12, 0.25);
  color: var(--terra);
}

.tag-warn {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--warn-soft);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: 4px;
  color: var(--warn);
}

/* ── Citation chips ── */
.citation-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.citation-row-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted-light);
  width: 100%;
  margin-bottom: 4px;
}

.citation-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--surface-raised);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  color: var(--forest);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.citation-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--forest);
}

.cite-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(14, 165, 164, 0.2);
}

.citation-chip span:not(.cite-dot):not(.cite-loc) {
  color: var(--muted-light);
  margin-left: 4px;
}

.cite-loc {
  color: var(--terra) !important;
  font-size: 0.65rem;
  margin-left: 2px !important;
}

.cite-inline {
  font-size: 0.65rem;
  padding: 4px 8px 4px 6px;
  vertical-align: middle;
}

/* ── Doc preview (briefs, memos) ── */
.doc-preview {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-paper);
  overflow: hidden;
  max-width: 720px;
  margin-inline: auto;
}

.doc-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-paper);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--forest);
}

.doc-badge {
  padding: 3px 10px;
  background: var(--warn-soft);
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: 999px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--warn);
}

.doc-badge.ok {
  background: var(--ok-soft);
  border-color: rgba(101, 163, 13, 0.25);
  color: var(--ok);
}

.doc-preview-body {
  padding: 24px;
  background:
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(18, 55, 42, 0.04) 27px,
      rgba(18, 55, 42, 0.04) 28px
    );
}

.doc-preview-body section {
  margin-bottom: 22px;
}

.doc-preview-body section:last-child {
  margin-bottom: 0;
}

.doc-preview-body h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-light);
  margin-bottom: 8px;
}

.doc-preview-body p,
.doc-preview-body li {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.finding-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.finding-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.evidence-count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.contradiction-flag {
  padding: 10px 14px;
  background: var(--warn-soft);
  border-left: 3px solid var(--warn);
  border-radius: 0 6px 6px 0;
  font-size: 0.88rem !important;
}

.reviewer-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  margin-top: 8px;
  background: var(--bg-paper);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: 0.82rem;
}

.reviewer-strip span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.reviewer-panel {
  margin-top: 12px;
  padding: 16px 18px;
  background: var(--accent-soft);
  border: 1px solid rgba(14, 165, 164, 0.25);
  border-radius: var(--radius);
}

.reviewer-panel h4 {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: var(--forest);
  margin-bottom: 10px;
}

.reviewer-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: center;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.reviewer-fields strong { color: var(--forest); }

.reviewer-toggle {
  display: flex;
  gap: 6px;
}

.reviewer-toggle .tag-chip {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.reviewer-notes {
  font-size: 0.84rem;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.memo-preview .doc-preview-body {
  background: var(--surface-raised);
}

/* ── Evidence drawer mock ── */
.evidence-drawer-mock {
  max-width: 680px;
  margin-inline: auto;
  background: var(--forest);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(14, 165, 164, 0.3);
}

.evidence-drawer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(245, 242, 234, 0.6);
}

.evidence-drawer-finding {
  color: var(--accent) !important;
  font-weight: 600;
}

.evidence-drawer-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 340px;
  overflow-y: auto;
}

.evidence-item {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

.evidence-source {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(245, 242, 234, 0.5);
  margin-bottom: 8px;
}

.evidence-item blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(245, 242, 234, 0.92);
  line-height: 1.5;
  padding-left: 12px;
  border-left: 2px solid rgba(14, 165, 164, 0.4);
}

/* ── Insight board mock ── */
.insight-board-mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-paper);
}

.insight-board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--forest);
  color: rgba(245, 242, 234, 0.85);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.board-meta {
  color: rgba(245, 242, 234, 0.5);
  font-weight: 400;
}

.insight-board-table {
  display: flex;
  flex-direction: column;
}

.insight-board-row {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr 0.9fr 0.8fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.insight-board-table.cols-6 .insight-board-row {
  grid-template-columns: 1.4fr 1fr 1.1fr 0.8fr 0.7fr 0.9fr;
}

.quote-cell {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.insight-board-row:last-child {
  border-bottom: none;
}

.insight-board-row.head {
  background: var(--bg-paper);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-light);
}

.insight-board-row strong {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--ink);
}

.row-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--muted-light);
  font-weight: 400;
  margin-top: 2px;
}

.conf-high {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ok);
}

.conf-med {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--warn);
}

/* ── Comparison tables ── */
.compare-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-paper);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.compare-table thead {
  background: var(--bg-paper);
}

.compare-table th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-light);
  text-align: left;
  padding: 14px 16px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
  vertical-align: middle;
}

.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table tbody tr:hover {
  background: rgba(14, 165, 164, 0.04);
}

.compare-table td:first-child {
  font-weight: 600;
  color: var(--forest);
}

.stale-cell {
  color: var(--muted-light) !important;
}

.compare-pricing th,
.compare-pricing td {
  text-align: center;
}

.compare-pricing th:first-child,
.compare-pricing td:first-child {
  text-align: left;
}

.compare-pricing td:not(:first-child) {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* ── Pain cards ── */
.pain-yard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.pain-yard-card {
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.pain-yard-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background: linear-gradient(90deg, var(--terra), transparent);
  border-radius: 2px;
  opacity: 0.5;
}

.pain-yard-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.pain-yard-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--terra);
}

.pain-yard-card p {
  font-size: 0.88rem;
  line-height: 1.55;
}

/* ── Workflow yard ── */
.workflow-yard {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 680px;
  margin-inline: auto;
  position: relative;
}

.workflow-yard::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--border));
  border-radius: 1px;
}

.workflow-yard-step {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  position: relative;
}

.workflow-yard-num {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--bg);
}

.workflow-yard-num::after {
  counter-increment: workflow;
  content: counter(workflow);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--forest);
}

.workflow-yard {
  counter-reset: workflow;
}

.workflow-yard-step strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 10px;
}

.workflow-ui-snippet {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 4px;
}

.snippet-label {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-light);
  margin-bottom: 2px;
}

.workflow-source-card {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.workflow-source-card span:not(.snippet-label) {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.workflow-evidence-mini {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  border-left: 3px solid var(--accent);
}

.workflow-evidence-mini blockquote {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--ink-soft);
  padding-left: 8px;
}

.workflow-evidence-mini .evidence-source {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted-light);
}

.doc-snippet {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.doc-snippet span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 4px 8px;
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--forest);
}

/* ── Feature cards ── */
.feature-yard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.feature-yard-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-paper);
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-yard-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--forest));
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-yard-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border-dark);
  color: inherit;
  text-decoration: none;
}

.feature-yard-card:hover::before {
  opacity: 1;
}

.feature-yard-icon {
  font-size: 1.6rem;
  margin-bottom: 14px;
  line-height: 1;
}

.feature-yard-card h3 {
  margin-bottom: 10px;
}

.feature-yard-card p {
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 14px;
}

.feature-yard-example {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  padding: 8px 10px;
  background: var(--accent-soft);
  border-radius: 6px;
  margin-bottom: 14px;
}

.feature-yard-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--forest);
  margin-top: auto;
}

.feature-yard-card:hover .feature-yard-link {
  color: var(--accent);
}

/* ── Use case cards ── */
.use-case-yard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.use-case-yard-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
}

.use-case-yard-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}

.use-case-yard-card h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.use-case-desc {
  font-size: 0.84rem;
  line-height: 1.45;
  margin-bottom: 12px;
  flex: 1;
}

.use-case-in,
.use-case-out {
  font-size: 0.85rem;
  margin-bottom: 8px;
  line-height: 1.5;
}

.use-case-in strong,
.use-case-out strong {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-light);
}

.use-case-out {
  margin-bottom: 16px;
}

/* ── Product chain ── */
.product-chain {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.chain-step {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition);
}

.chain-step:hover {
  border-color: var(--accent);
}

.chain-num {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: var(--forest);
  border-radius: 8px;
}

.chain-step strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.chain-step span {
  font-size: 0.78rem;
  color: var(--muted-light);
}

/* ── Diff grid ── */
.diff-yard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 800px;
  margin-inline: auto;
}

.diff-yard-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.diff-yard-card h3 {
  margin-bottom: 16px;
  font-size: 1.15rem;
}

.diff-yard-card ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.diff-yard-card li {
  font-size: 0.9rem;
  padding-left: 18px;
  position: relative;
}

.diff-yard-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.muted-side {
  background: var(--bg-paper);
}

.muted-side li::before {
  background: var(--border-dark);
}

.muted-side h3 {
  color: var(--muted);
}

.accent-side {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow);
}

.accent-side li::before {
  background: var(--accent);
}

.accent-side h3 {
  color: var(--forest);
}

/* ── Audience list ── */
.audience-yard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
  margin-inline: auto;
}

.audience-yard-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  transition: background var(--transition);
}

.audience-yard-item:hover {
  background: var(--accent-soft);
}

.audience-yard-item strong {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--ink);
}

.audience-yard-item span {
  font-size: 0.88rem;
  color: var(--muted);
}

/* ── IO yard grid ── */
.io-yard-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
  max-width: 760px;
  margin-inline: auto;
}

.io-yard-panel {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.io-yard-panel.accent {
  border-color: var(--accent);
  background: linear-gradient(160deg, var(--accent-soft) 0%, var(--surface) 100%);
}

.io-yard-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-light);
  margin-bottom: 14px;
}

.io-yard-panel ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.io-yard-panel li {
  font-size: 0.88rem;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 5px;
  color: var(--ink-soft);
}

.io-yard-panel.accent li {
  background: rgba(255, 255, 255, 0.7);
}

.io-yard-arrow {
  display: flex;
  align-items: center;
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 700;
}

/* ── Brief setup, memo builder, table gen ── */
.brief-setup,
.memo-builder,
.table-gen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 720px;
  margin-inline: auto;
}

.brief-setup-col,
.memo-builder > div,
.table-gen > div {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.brief-setup-col h3,
.memo-builder h3,
.table-gen h3 {
  font-size: 0.95rem;
  margin-bottom: 14px;
  color: var(--forest);
}

.brief-setup-col ul,
.memo-builder ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brief-setup-col li,
.memo-builder li {
  font-size: 0.88rem;
  padding: 6px 10px;
  background: var(--bg-paper);
  border-radius: 5px;
  color: var(--ink-soft);
}

.table-gen p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Dedup yard ── */
.dedup-yard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.dedup-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--warn);
}

.dedup-card h4 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  margin: 10px 0 8px;
  color: var(--ink);
}

.dedup-card p {
  font-size: 0.85rem;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── Cluster flow & example ── */
.cluster-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.cluster-step {
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--forest);
}

.cluster-flow > span:not(.cluster-step) {
  color: var(--accent);
  font-weight: 700;
}

.cluster-caption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 52ch;
  margin-inline: auto;
  margin-top: 16px;
}

.cluster-example {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  max-width: 720px;
  margin-inline: auto;
}

.cluster-raw,
.cluster-theme {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.cluster-raw h4,
.cluster-theme h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-light);
  margin-bottom: 12px;
}

.cluster-raw li {
  font-size: 0.85rem;
  font-style: italic;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--ink-soft);
}

.cluster-raw li:last-child {
  border-bottom: none;
}

.cluster-arrow {
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 700;
}

.cluster-theme strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--forest);
  margin-bottom: 6px;
}

.cluster-theme p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted-light);
}

/* ── Quote library ── */
.quote-library {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
  margin-inline: auto;
}

.quote-library blockquote {
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--terra);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.55;
  box-shadow: var(--shadow-sm);
}

.quote-library cite {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-style: normal;
  color: var(--muted-light);
}

/* ── Change track ── */
.change-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.change-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.change-card p {
  font-size: 0.85rem;
  margin-top: 10px;
  line-height: 1.5;
}

/* ── Feature board (product research) ── */
.feature-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.feature-idea-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.feature-idea-card h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin-bottom: 14px;
  color: var(--forest);
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}

.feature-idea-card li {
  font-size: 0.82rem;
  padding: 5px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--linen-line);
}

.feature-idea-card li:last-child {
  border-bottom: none;
}

.feature-idea-card li strong {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-light);
  margin-right: 6px;
}

/* ── Export chips ── */
.export-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.export-chips span {
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--forest);
  cursor: default;
  transition: background var(--transition), border-color var(--transition);
}

.export-chips span:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* ── Integrations ── */
.import-flow-yard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
}

.import-flow-step {
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--accent-soft);
  border: 1px solid rgba(14, 165, 164, 0.25);
  border-radius: 999px;
  color: var(--forest);
}

.import-flow-arrow {
  color: var(--accent);
  font-weight: 700;
}

.integration-yard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.integration-yard-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.integration-yard-card:hover,
.integration-yard-card.is-highlight {
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.integration-yard-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--forest);
  color: #fff;
  border-radius: 10px;
  margin-bottom: 14px;
}

.integration-yard-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.integration-yard-card p {
  font-size: 0.85rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ── Trust & permissions ── */
.trust-yard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.trust-yard-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.trust-yard-card span {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 12px;
}

.trust-yard-card h4 {
  font-family: var(--font-serif);
  margin-bottom: 8px;
}

.trust-yard-card p {
  font-size: 0.85rem;
  line-height: 1.5;
}

.perm-yard-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.perm-yard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.perm-yard-table th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-light);
  padding: 14px 16px;
  background: var(--bg-paper);
  border-bottom: 2px solid var(--border);
  text-align: center;
}

.perm-yard-table th:first-child {
  text-align: left;
}

.perm-yard-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  color: var(--ink-soft);
}

.perm-yard-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--forest);
}

.perm-yard-table tbody tr:hover {
  background: rgba(14, 165, 164, 0.04);
}

.yard-disclaimer {
  max-width: 680px;
  margin: 0 auto 32px;
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-align: center;
  color: var(--muted);
  background: var(--warn-soft);
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: var(--radius);
}

/* ── Pricing ── */
.pricing-yard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.plan-yard-card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.plan-yard-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.plan-yard-card.is-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow);
  position: relative;
}

.plan-yard-card.is-featured::before {
  content: "Most popular";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
}

.plan-yard-card.is-selected {
  border-color: var(--forest);
  box-shadow: 0 0 0 2px rgba(18, 55, 42, 0.15), var(--shadow);
}

.plan-yard-tier {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}

.plan-yard-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.plan-yard-price {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.plan-yard-price strong {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--forest);
}

.plan-yard-card ul {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.plan-yard-card li {
  font-size: 0.88rem;
  padding-left: 18px;
  position: relative;
  color: var(--ink-soft);
}

.plan-yard-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ok);
  font-size: 0.78rem;
  font-weight: 700;
}

/* ── Resource cards ── */
.resource-yard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.resource-yard-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.resource-yard-card h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.resource-audience,
.resource-fields,
.resource-links {
  font-size: 0.85rem;
  margin-bottom: 8px;
  line-height: 1.5;
}

.resource-audience strong,
.resource-fields strong,
.resource-links strong {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-light);
}

.resource-yard-card .btn {
  margin-top: 16px;
}

/* ── CTA yard ── */
.cta-yard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(36px, 5vw, 52px);
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-light) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(14, 165, 164, 0.35);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.cta-yard::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 20%, rgba(14, 165, 164, 0.15) 0%, transparent 45%),
    repeating-linear-gradient(
      -3deg,
      transparent,
      transparent 40px,
      rgba(255, 255, 255, 0.02) 40px,
      rgba(255, 255, 255, 0.02) 41px
    );
  pointer-events: none;
}

.cta-yard-copy {
  position: relative;
  z-index: 1;
  flex: 1;
}

.cta-yard-copy .section-eyebrow {
  color: rgba(245, 242, 234, 0.55);
}

.cta-yard-copy h2 {
  color: #fff;
  margin-bottom: 10px;
}

.cta-yard-copy p {
  color: rgba(245, 242, 234, 0.72);
  font-size: 1rem;
  max-width: 42ch;
}

.cta-yard .btn-row {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.cta-yard .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.cta-yard .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

/* ── Modals ── */
body.modal-open {
  overflow: hidden;
}

.site-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.site-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 55, 42, 0.55);
  backdrop-filter: blur(4px);
}

.site-modal-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 28px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(18, 55, 42, 0.25);
}

.site-modal-panel.modal-wide {
  max-width: 620px;
}

.site-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  line-height: 1;
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.site-modal-close:hover {
  background: var(--terra-soft);
  color: var(--terra);
}

.site-modal-panel h2 {
  font-size: 1.35rem;
  margin-bottom: 8px;
  padding-right: 36px;
}

.site-modal-lead {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.55;
}

.site-modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-light);
  margin-bottom: 6px;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-field textarea {
  resize: vertical;
  min-height: 80px;
}

.form-success {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ok);
  padding: 10px 14px;
  background: var(--ok-soft);
  border-radius: var(--radius);
  text-align: center;
}

/* Demo modal mock */
.demo-yard-mock {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

.demo-yard-screen {
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--forest);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(14, 165, 164, 0.3);
  color: rgba(245, 242, 234, 0.7);
}

.demo-play {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.demo-yard-screen p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.demo-chapters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-chapters li {
  padding: 10px 14px;
  font-size: 0.85rem;
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink-soft);
  position: relative;
  padding-left: 28px;
}

.demo-chapters li::before {
  content: counter(demo-chapter);
  counter-increment: demo-chapter;
  position: absolute;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
}

.demo-chapters {
  counter-reset: demo-chapter;
}

/* ── Auth page ── */
.auth-page {
  min-height: 100vh;
  background: var(--bg);
  background-image:
    linear-gradient(90deg, var(--linen-line) 1px, transparent 1px),
    linear-gradient(var(--linen-line) 1px, transparent 1px);
  background-size: 48px 48px;
}

.auth-top {
  background: var(--forest);
  border-bottom: 2px solid rgba(14, 165, 164, 0.35);
  padding: 14px 0;
}

.auth-top-inner {
  display: flex;
  align-items: center;
}

.auth-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 70px);
  padding: 40px var(--gutter);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 8px;
  text-align: center;
}

.auth-sub {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 28px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-light);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--muted);
}

.auth-footer a {
  font-weight: 600;
  color: var(--accent);
}

/* ── Page body variants ── */
.home-page {
  /* home-specific overrides if needed */
}

.yard-page {
  /* subpage body class */
}

/* ── Responsive: 1024px ── */
@media (max-width: 1024px) {
  :root {
    --site-top-h: 108px;
  }

  .nav-links,
  .header-actions .nav-login,
  .header-actions .btn:not(.nav-toggle) {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-yard-grid,
  .page-hero-yard-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-desk-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-source-deck {
    min-height: 240px;
    max-width: 360px;
    margin: 0 auto;
  }

  .hero-flow-rail {
    grid-template-columns: 1fr;
  }

  .flow-rail-connector {
    flex-direction: row;
    padding: 8px 16px;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .flow-rail-connector i {
    transform: rotate(90deg);
  }

  .hero-yard-intro h1,
  .hero-yard-copy h1,
  .hero-desk-copy h1,
  .page-hero-yard-copy h1 {
    max-width: none;
  }

  .yard-pipeline {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .yard-pipeline-arrow {
    justify-content: center;
    transform: rotate(90deg);
    padding: 4px 0;
  }

  .yard-flow-compact {
    grid-template-columns: 1fr;
  }

  .pain-yard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .use-case-yard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-chain {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 28px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .pricing-yard-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-inline: auto;
  }

  .plan-yard-card.is-featured {
    order: -1;
  }

  .trust-yard-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-inline: auto;
  }

  .insight-board-row {
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    font-size: 0.78rem;
  }

  .insight-board-row.head span:nth-child(4),
  .insight-board-row.head span:nth-child(5),
  .insight-board-row span:nth-child(4),
  .insight-board-row span:nth-child(5) {
    display: none;
  }

  .cta-yard {
    flex-direction: column;
    text-align: center;
  }

  .cta-yard-copy p {
    margin-inline: auto;
  }

  .cta-yard .btn-row {
    justify-content: center;
  }

  .demo-yard-mock {
    grid-template-columns: 1fr;
  }

  .io-yard-grid {
    grid-template-columns: 1fr;
  }

  .io-yard-arrow {
    justify-content: center;
    transform: rotate(90deg);
  }

  .cluster-example {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cluster-arrow {
    transform: rotate(90deg);
  }
}

/* ── Responsive: 640px ── */
@media (max-width: 640px) {
  :root {
    --site-top-h: 104px;
    --gutter: 16px;
  }

  .header-ops-inner {
    flex-wrap: wrap;
    gap: 6px;
  }

  .ops-detail {
    order: 3;
    width: 100%;
    white-space: normal;
    font-size: 0.65rem;
  }

  .pain-yard-grid,
  .use-case-yard-grid,
  .product-chain,
  .diff-yard-grid,
  .trust-yard-grid {
    grid-template-columns: 1fr;
  }

  .brief-setup,
  .memo-builder,
  .table-gen {
    grid-template-columns: 1fr;
  }

  .feature-yard-grid {
    grid-template-columns: 1fr;
  }

  .source-card-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-row .btn {
    width: 100%;
  }

  .hero-quick-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .hero-quick-links span {
    display: none;
  }

  .hero-source-deck {
    min-height: 320px;
    padding-left: 8px;
  }

  .deck-card {
    width: min(100%, 210px);
    padding: 12px 14px;
  }

  .deck-a { top: 0; left: 4px; }
  .deck-b { top: 52px; left: 20px; }
  .deck-c { top: 104px; left: 0; }
  .deck-d { top: 156px; left: 16px; }

  .flow-rail-zone {
    padding: 12px 14px;
  }

  .flow-rail-items span {
    font-size: 0.64rem;
    padding: 4px 8px;
  }

  .yard-pipeline {
    padding: 14px;
  }

  .yard-pipeline-col {
    padding: 12px;
  }

  .compare-table {
    font-size: 0.78rem;
  }

  .compare-table th,
  .compare-table td {
    padding: 10px 12px;
  }

  .insight-board-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 14px;
  }

  .insight-board-row.head {
    display: none;
  }

  .insight-board-row span:first-child {
    grid-column: 1 / -1;
  }

  .site-modal-panel {
    padding: 24px 20px;
    border-radius: var(--radius-lg);
  }

  .auth-card {
    padding: 28px 22px;
  }

  .cta-yard {
    padding: 28px 22px;
  }

  .chain-step {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .workflow-yard::before {
    left: 15px;
  }

  .workflow-yard-num {
    width: 32px;
    height: 32px;
  }

  .workflow-yard-step {
    gap: 14px;
  }

  .export-chips {
    gap: 8px;
  }

  .export-chips span {
    font-size: 0.68rem;
    padding: 6px 12px;
  }

  .integration-yard-grid {
    grid-template-columns: 1fr;
  }

  .resource-yard-grid {
    grid-template-columns: 1fr;
  }

  .citation-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .evidence-drawer-body {
    max-height: 280px;
  }
}

/* ── About page — index catalog layout ── */
.about-index-hero {
  padding: 48px 0 40px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.about-index-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-index-copy h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--forest);
  line-height: 1.12;
  margin-bottom: 14px;
}

.about-index-copy .lead { max-width: 520px; margin-bottom: 24px; }

.brand-meaning {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.brand-meaning article {
  padding: 16px;
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.brand-meaning strong {
  display: block;
  font-family: var(--font-serif);
  color: var(--forest);
  margin-bottom: 6px;
}

.brand-meaning span { font-size: 0.84rem; line-height: 1.45; }

.about-index-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

.about-index-split h2 {
  font-family: var(--font-serif);
  color: var(--forest);
  margin-bottom: 14px;
}

.about-catalog h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--forest);
  margin-bottom: 14px;
}

.about-catalog-row {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
  transition: color var(--transition);
}

.about-catalog-row:hover { color: var(--forest); }

.about-catalog-row span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  min-width: 28px;
}

.about-catalog-row strong {
  display: block;
  font-size: 0.92rem;
  color: var(--forest);
  margin-bottom: 2px;
}

.about-catalog-row p { font-size: 0.82rem; }

.principle-yard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.principle-yard-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-paper);
}

.principle-yard-card strong {
  display: block;
  font-family: var(--font-serif);
  color: var(--forest);
  margin-bottom: 6px;
}

.principle-yard-card span { font-size: 0.84rem; line-height: 1.45; }

.about-index-cta {
  padding: 56px 0;
  background: var(--forest);
  text-align: center;
  color: rgba(247, 243, 234, 0.88);
}

.about-index-cta h2 {
  font-family: var(--font-serif);
  color: #fff;
  font-size: 1.65rem;
}

.muted { color: var(--muted-light); font-size: 0.9rem; }

/* ── Contact page — correspondence desk layout ── */
.contact-desk-hero {
  padding: 44px 0 28px;
  background: var(--bg-paper);
  border-bottom: 2px solid var(--forest);
}

.contact-desk-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  color: var(--forest);
  margin: 8px 0 10px;
}

.contact-desk-hero .lead { max-width: 560px; }

.contact-desk-body { padding: 48px 0 64px; }

.contact-desk-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: start;
}

.contact-desk-ledger {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-paper);
  background-image: repeating-linear-gradient(
    transparent,
    transparent 27px,
    rgba(18, 55, 42, 0.04) 27px,
    rgba(18, 55, 42, 0.04) 28px
  );
}

.ledger-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--forest);
  color: rgba(247, 243, 234, 0.9);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ledger-stamp {
  padding: 3px 10px;
  border: 1px solid rgba(14, 165, 164, 0.5);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.62rem;
}

.ledger-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
}

.ledger-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-light);
}

.ledger-row strong { color: var(--forest); font-size: 0.88rem; }

.ledger-notes {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.ledger-notes p {
  font-size: 0.84rem;
  margin-bottom: 12px;
  line-height: 1.5;
}

.contact-inquiry-list {
  padding: 16px 18px 20px;
}

.contact-inquiry-list h3 {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--forest);
  margin-bottom: 12px;
}

.contact-inquiry-list article {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.contact-inquiry-list article:last-child { border-bottom: none; }

.contact-inquiry-list strong {
  display: block;
  font-size: 0.88rem;
  color: var(--forest);
  margin-bottom: 4px;
}

.contact-inquiry-list p { font-size: 0.8rem; }

.contact-desk-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.contact-desk-form-head {
  padding: 20px 22px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface) 100%);
  border-bottom: 2px solid var(--accent);
}

.contact-desk-form-head h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--forest);
  margin-bottom: 4px;
}

.contact-desk-form-head p { font-size: 0.84rem; }

.contact-desk-form .form-group,
.contact-desk-form .form-row-2,
.contact-desk-form .btn,
.contact-desk-form .site-form-success {
  margin-left: 22px;
  margin-right: 22px;
}

.contact-desk-form .form-group:first-of-type,
.contact-desk-form .form-row-2:first-of-type { margin-top: 22px; }

.contact-desk-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.contact-desk-form .form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.contact-desk-form label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.contact-desk-form input,
.contact-desk-form textarea,
.contact-desk-form select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  background: var(--bg-paper);
}

.contact-desk-form input:focus,
.contact-desk-form textarea:focus,
.contact-desk-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.contact-desk-form textarea { min-height: 120px; resize: vertical; }

.contact-desk-form .btn { margin-bottom: 22px; }

.site-form-success {
  font-size: 0.88rem;
  color: var(--ok);
  margin-top: -10px;
  margin-bottom: 18px;
}

@media (max-width: 1024px) {
  .about-index-grid,
  .about-index-split,
  .contact-desk-grid {
    grid-template-columns: 1fr;
  }

  .principle-yard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .brand-meaning {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .principle-yard-grid {
    grid-template-columns: 1fr;
  }

  .contact-desk-form .form-row-2 {
    grid-template-columns: 1fr;
  }
}
