/* tokens — inherited from warm-notebook */
:root {
  color-scheme: light;
  --paper: #f8f0dd;
  --paper-deep: #efe0bc;
  --paper-soft: #fbf6e8;
  --ink: #30261c;
  --ink-muted: #6f614f;
  --ink-faint: #9b8d77;
  --line: #d9c79f;
  --line-strong: #b8975f;
  --clay: #9f4f32;
  --clay-dark: #733521;
  --sage: #647257;
  --sage-soft: #dfe5cf;
  --ochre: #bd8128;
  --blue-ink: #314f65;
  --shadow: 0 24px 60px rgba(87, 60, 26, 0.16);
  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --serif-display: "Fraunces", "Source Serif 4", Georgia, serif;
  --serif-body: "Source Serif 4", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(189, 129, 40, 0.16), transparent 34rem),
    radial-gradient(circle at 82% 0%, rgba(100, 114, 87, 0.18), transparent 28rem),
    linear-gradient(180deg, var(--paper-soft), var(--paper));
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 18px;
  line-height: 1.65;
}

body::before {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; content: "";
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(90, 60, 30, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 60, 30, 0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

a {
  color: var(--clay-dark);
  text-decoration-color: rgba(159, 79, 50, 0.35);
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-color: currentColor; }

button, summary { font: inherit; }
button { cursor: pointer; }

code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: rgba(159, 79, 50, 0.08);
  border: 1px solid rgba(159, 79, 50, 0.18);
  padding: 0.06em 0.4em;
  border-radius: 6px;
  color: var(--clay-dark);
}

.shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* progress bar */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--clay), var(--ochre) 60%, var(--sage));
  width: 0%;
  z-index: 50;
  transition: width 80ms linear;
}

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(248, 240, 221, 0.78);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 16px 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand .mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--clay), var(--ochre));
  color: var(--paper-soft);
  display: grid; place-items: center;
  font-family: var(--serif-display); font-weight: 700; font-size: 18px;
  box-shadow: var(--shadow);
}
.brand .name { font-family: var(--serif-display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.brand .kind { display: block; font-size: 12px; color: var(--ink-muted); font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.actions { display: flex; gap: 10px; }
.ghost-button {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  transition: all 120ms ease;
}
.ghost-button:hover { color: var(--clay-dark); border-color: var(--clay); }
.ghost-button[aria-pressed="true"] { background: var(--clay); color: var(--paper-soft); border-color: var(--clay); }

/* hero */
.hero {
  padding: 80px 0 56px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: end;
}
.hero .eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--clay);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.hero .lede {
  font-size: 21px;
  color: var(--ink-muted);
  line-height: 1.55;
  max-width: 36ch;
  margin: 0 0 28px;
}
.hero .cta {
  border: 1px solid var(--line-strong);
  background: var(--paper-soft);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.hero .cta .label {
  font-family: var(--mono); font-size: 11px;
  color: var(--sage); letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 10px;
}
.hero .cta .prompt {
  font-family: var(--mono); font-size: 15px;
  color: var(--ink); background: var(--paper-deep);
  padding: 14px 16px; border-radius: var(--radius-md);
  border: 1px dashed var(--line-strong);
  line-height: 1.5;
}
.hero .cta .note {
  font-size: 14px; color: var(--ink-muted); margin-top: 14px;
}

/* sections */
.section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.section .eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--clay);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section h2 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
}
.section .intro {
  font-size: 19px;
  color: var(--ink-muted);
  max-width: 64ch;
  margin: 0 0 36px;
}

/* invented: flow-stepper — clickable 5-step pipeline */
.flow-stepper {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow);
}
.flow-stepper .steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.flow-stepper .step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: left;
  cursor: pointer;
  transition: all 160ms ease;
  font-family: inherit;
  color: inherit;
}
.flow-stepper .step:hover { border-color: var(--clay); transform: translateY(-2px); }
.flow-stepper .step[aria-pressed="true"] {
  background: linear-gradient(160deg, var(--clay), var(--clay-dark));
  border-color: var(--clay-dark);
  color: var(--paper-soft);
  box-shadow: 0 16px 28px rgba(115, 53, 33, 0.28);
}
.flow-stepper .step .n {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.1em; opacity: 0.7;
}
.flow-stepper .step[aria-pressed="true"] .n { opacity: 1; color: var(--paper-deep); }
.flow-stepper .step .title {
  font-family: var(--serif-display); font-weight: 600; font-size: 17px;
  margin-top: 8px; line-height: 1.2;
}
.flow-stepper .step + .step::before {
  content: "";
  position: absolute; left: -8px; top: 50%;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--line-strong);
}
.flow-stepper .panel {
  border-top: 1px dashed var(--line-strong);
  padding-top: 24px;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px;
  align-items: start;
}
.flow-stepper .panel .text {
  font-size: 17px; color: var(--ink); line-height: 1.6;
}
.flow-stepper .panel .text .what {
  font-family: var(--serif-display); font-weight: 600; font-size: 22px;
  margin: 0 0 10px; color: var(--clay-dark);
}
.flow-stepper .panel .example {
  background: var(--paper-deep);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-family: var(--mono); font-size: 13px; line-height: 1.7;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.flow-stepper .panel .example .you { color: var(--blue-ink); }
.flow-stepper .panel .example .agent { color: var(--clay-dark); }
.flow-stepper .panel .example .files { color: var(--sage); }

/* invented: conversation-sim — turn-based chat chassis */
.convo {
  display: flex; flex-direction: column; gap: 28px;
}
.convo .turn {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 28px;
  align-items: start;
}
.convo .friend {
  background: var(--paper-deep);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-lg);
  padding: 20px 22px;
  font-size: 17px;
  color: var(--ink);
  position: relative;
}
.convo .friend .who {
  font-family: var(--mono); font-size: 11px;
  color: var(--sage); letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 8px;
}
.convo .friend .says { line-height: 1.55; }
.convo .agent {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-sm);
  padding: 20px 22px;
  font-size: 16px;
  color: var(--ink);
  box-shadow: 0 12px 24px rgba(87, 60, 26, 0.08);
}
.convo .agent .who {
  font-family: var(--mono); font-size: 11px;
  color: var(--clay); letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 8px;
}
.convo .agent .does { line-height: 1.55; margin-bottom: 14px; }
.convo .agent .does strong { color: var(--clay-dark); }
.convo .agent .chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.convo .agent .verb-chip {
  font-family: var(--mono); font-size: 11px;
  background: var(--clay); color: var(--paper-soft);
  padding: 4px 10px; border-radius: 999px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
/* invented: files-touched chips */
.convo .agent .file-chip {
  font-family: var(--mono); font-size: 11px;
  background: var(--paper-deep);
  border: 1px solid var(--line-strong);
  color: var(--ink-muted);
  padding: 4px 10px; border-radius: 999px;
}
.convo .agent .file-chip.added {
  background: var(--sage-soft); border-color: var(--sage); color: var(--sage);
}

/* invented: folder-anatomy — interactive folder tree */
.anatomy {
  display: grid; grid-template-columns: 320px 1fr;
  gap: 32px; align-items: start;
}
.anatomy .tree {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  font-family: var(--mono); font-size: 14px;
  box-shadow: var(--shadow);
}
.anatomy .tree .root {
  color: var(--clay-dark); font-weight: 600; margin-bottom: 8px;
}
.anatomy .tree button {
  display: block; width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink);
  padding: 6px 10px; margin: 2px 0;
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px;
  transition: all 120ms ease;
}
.anatomy .tree button:hover { background: var(--paper-deep); border-color: var(--line); }
.anatomy .tree button[aria-pressed="true"] {
  background: var(--clay); color: var(--paper-soft); border-color: var(--clay-dark);
}
.anatomy .tree .indent { padding-left: 14px; }
.anatomy .detail {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  min-height: 280px;
}
.anatomy .detail .file-name {
  font-family: var(--mono); font-size: 13px;
  color: var(--clay); letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.anatomy .detail h3 {
  font-family: var(--serif-display); font-weight: 600;
  font-size: 26px; margin: 0 0 12px; letter-spacing: -0.01em;
}
.anatomy .detail p { margin: 0 0 14px; color: var(--ink); }
.anatomy .detail .role-strip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px;
  background: var(--paper-deep);
  border: 1px solid var(--line-strong);
  padding: 6px 12px; border-radius: 999px;
  color: var(--ink-muted);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 18px;
}
.anatomy .detail ul { padding-left: 1.2em; margin: 0; }
.anatomy .detail li { margin: 6px 0; }

/* invented: compare slider — before/after */
.compare {
  position: relative;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 360px;
}
.compare .tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper-deep);
}
.compare .tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 18px 24px;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 2px solid transparent;
  transition: all 150ms ease;
}
.compare .tab[aria-pressed="true"] {
  background: var(--paper-soft);
  color: var(--clay-dark);
  border-bottom-color: var(--clay);
}
.compare .panels {
  display: grid; grid-template-columns: 1fr; padding: 28px 32px;
}
.compare .panel {
  display: none;
}
.compare .panel[data-active="true"] {
  display: block;
}
.compare .md-panel {
  font-family: var(--mono); font-size: 14px;
  color: var(--ink-muted); line-height: 1.7;
  white-space: pre-wrap;
  background: var(--paper-deep);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}
.compare .doc-panel[data-active="true"] { display: flex; flex-direction: column; gap: 18px; }

/* invented: funnel — reactive chart that proves the four pillars in one component */
.compare .doc-panel .funnel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.compare .doc-panel .funnel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.compare .doc-panel .funnel-title {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 24px;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.compare .doc-panel .funnel-sub {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.compare .doc-panel .funnel-toggle {
  display: inline-flex;
  background: var(--paper-deep);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
}
.compare .doc-panel .funnel-toggle button {
  background: transparent;
  border: 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 140ms ease;
}
.compare .doc-panel .funnel-toggle button[aria-pressed="true"] {
  background: var(--clay);
  color: var(--paper-soft);
  box-shadow: 0 4px 10px rgba(115, 53, 33, 0.22);
}

.compare .doc-panel .funnel-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.compare .doc-panel .funnel-row {
  display: grid;
  grid-template-columns: 90px 1fr 70px;
  align-items: center;
  gap: 14px;
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.compare .doc-panel .funnel-row:hover {
  background: var(--paper-deep);
  border-color: var(--line);
  transform: translateX(2px);
}
.compare .doc-panel .funnel-row[aria-pressed="true"] {
  background: var(--paper-deep);
  border-color: var(--clay);
}
.compare .doc-panel .funnel-step {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.compare .doc-panel .funnel-bar-wrap {
  height: 22px;
  background: rgba(159, 79, 50, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.compare .doc-panel .funnel-bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--clay), var(--ochre));
  border-radius: 999px;
  transition: width 320ms cubic-bezier(.4, .14, .3, 1);
}
.compare .doc-panel .funnel-val {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--clay-dark);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.compare .doc-panel .funnel-drawer {
  background: var(--paper-deep);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 280ms ease, padding 200ms ease;
}
.compare .doc-panel .funnel-drawer[data-open="true"] {
  padding: 16px 20px;
  max-height: 300px;
}
.compare .doc-panel .funnel-drawer .drawer-title {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--clay-dark);
  letter-spacing: -0.005em;
  margin-bottom: 8px;
}
.compare .doc-panel .funnel-drawer .drawer-body {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}

.compare .doc-panel .funnel-foot {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0;
  font-style: italic;
  line-height: 1.5;
}

.compare .doc-panel .funnel-tip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 140ms ease;
  white-space: nowrap;
  z-index: 20;
  box-shadow: 0 8px 18px rgba(48, 38, 28, 0.28);
}

/* invented: problem-grid — six cards naming the markdown ceiling */
.problem-grid {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 22px;
}
.problem-grid li {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
  padding: 18px 22px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.problem-grid li strong {
  color: var(--clay-dark);
  display: block;
  margin-bottom: 6px;
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 17.5px;
  letter-spacing: -0.005em;
}
.problem-grid li em {
  color: var(--clay);
  font-style: italic;
}

/* invented: pillars-grid — the five-axis contract, one card each */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.pillars-grid .pillar {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  box-shadow: 0 14px 28px rgba(87, 60, 26, 0.08);
  transition: transform 160ms ease, border-color 160ms ease;
}
.pillars-grid .pillar:hover {
  transform: translateY(-3px);
  border-color: var(--clay);
}
.pillars-grid .pillar-n {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--clay);
  letter-spacing: 0.16em;
  margin-bottom: 10px;
}
.pillars-grid h3 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 19px;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.pillars-grid p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
  margin: 0;
}
.pillars-grid p em { color: var(--clay-dark); font-style: italic; }

/* invented: examples-list — three reference renders linked */
.examples-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 14px;
}
.examples-list li {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: transform 140ms ease, border-color 140ms ease;
}
.examples-list li:hover {
  border-color: var(--clay);
  transform: translateY(-2px);
}
.examples-list li a {
  display: block;
  padding: 20px 24px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15.5px;
  line-height: 1.55;
}
.examples-list li a:hover { color: var(--ink); }
.examples-list li a strong {
  color: var(--clay-dark);
  display: block;
  margin-bottom: 6px;
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}

/* try-it section */
.try-it {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
.try-it .card {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}
.try-it .card .step-n {
  font-family: var(--mono); font-size: 12px; color: var(--sage);
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 10px;
}
.try-it .card h3 {
  font-family: var(--serif-display); font-weight: 600;
  font-size: 22px; margin: 0 0 12px; letter-spacing: -0.01em;
}
.try-it .card p { color: var(--ink); margin: 0 0 14px; }
.try-it .card .prompt {
  font-family: var(--mono); font-size: 14px;
  background: var(--paper-deep);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--ink);
  line-height: 1.5;
}

/* meta footer with event-log reveal */
.meta-foot {
  margin-top: 56px;
  padding: 36px 0 80px;
  border-top: 1px dashed var(--line-strong);
}
.meta-foot .lede {
  font-style: italic; color: var(--ink-muted); margin-bottom: 18px;
}
.meta-foot details {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}
.meta-foot summary {
  cursor: pointer;
  font-family: var(--mono); font-size: 13px;
  color: var(--clay-dark);
  letter-spacing: 0.06em;
}
.meta-foot pre {
  margin: 16px 0 0;
  font-family: var(--mono); font-size: 12px;
  color: var(--ink-muted);
  background: var(--paper-deep);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.6;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  font-family: var(--mono); font-size: 12px;
  color: var(--ink-faint);
  text-align: center;
  letter-spacing: 0.08em;
}

/* responsive */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 56px; }
  .flow-stepper .steps { grid-template-columns: repeat(2, 1fr); }
  .flow-stepper .panel { grid-template-columns: 1fr; }
  .convo .turn { grid-template-columns: 1fr; }
  .anatomy { grid-template-columns: 1fr; }
  .try-it { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: 1fr 1fr; }
  .problem-grid { grid-template-columns: 1fr; }
  .shell { padding: 0 20px; }
}

@media (max-width: 600px) {
  .pillars-grid { grid-template-columns: 1fr; }
}

/* ─── intro paragraph modifiers — promoted from inline style attrs ─── */
.intro--spaced { margin-top: 40px; margin-bottom: 24px; }
.intro--lead-in { margin-top: 44px; }

/* ─── meta-foot H2 — promoted from inline style attrs ─── */
.meta-foot h2 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 24px;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ─── focus mode — dims non-content chrome so prose carries the page.
   Toggled by #focusToggle in the topbar (adds .focus-on to <body>). */
.topbar,
.progress,
.footer,
.actions {
  transition: opacity 200ms ease;
}
body.focus-on .topbar,
body.focus-on .progress,
body.focus-on .footer {
  opacity: 0.18;
}
body.focus-on .topbar:hover,
body.focus-on .topbar:focus-within,
body.focus-on .footer:hover,
body.focus-on .footer:focus-within {
  opacity: 1;
}
body.focus-on .actions .ghost-button:not(#focusToggle) {
  opacity: 0.4;
}
body.focus-on #focusToggle {
  color: var(--clay-dark);
  border-color: var(--clay);
}
@media (prefers-reduced-motion: reduce) {
  .topbar, .progress, .footer, .actions { transition: none; }
}

/* ─── print stylesheet — archive-worthy artifact, no chrome ─── */
@media print {
  @page { margin: 0.6in; }

  html, body {
    background: #ffffff !important;
    color: #1a1a1a;
    font-size: 11pt;
    line-height: 1.5;
  }
  body::before { display: none !important; }

  .topbar,
  .progress,
  .actions,
  .ghost-button,
  .compare .tabs,
  .funnel-toggle,
  .funnel-tip {
    display: none !important;
  }

  .shell { max-width: 100%; padding: 0; }

  a { color: var(--clay-dark); text-decoration: none; }

  .hero {
    padding: 0 0 24pt;
    grid-template-columns: 1fr;
    gap: 18pt;
  }
  .hero h1 { font-size: 28pt; line-height: 1.1; margin: 0 0 10pt; }
  .hero .lede { font-size: 12pt; color: #444; }
  .hero .cta {
    box-shadow: none;
    border-color: #ccc;
    background: #fafafa;
  }

  .section {
    padding: 18pt 0;
    border-top: 1px solid #ccc;
    page-break-inside: avoid;
  }
  .section h2 { font-size: 18pt; line-height: 1.15; }
  .section .intro { font-size: 11.5pt; color: #444; }
  .section .eyebrow,
  .hero .eyebrow { color: var(--clay-dark); }

  /* tone down all card chrome */
  .flow-stepper,
  .anatomy .tree,
  .anatomy .detail,
  .compare,
  .try-it .card,
  .meta-foot details,
  .pillars-grid .pillar,
  .problem-grid li,
  .examples-list li,
  .convo .agent,
  .convo .friend {
    box-shadow: none !important;
    background: #ffffff !important;
    border-color: #ccc !important;
    page-break-inside: avoid;
  }

  /* flow-stepper: all 5 steps visible, panel content stacked */
  .flow-stepper .step,
  .flow-stepper .step[aria-pressed="true"] {
    background: #fafafa !important;
    color: #1a1a1a !important;
    border-color: #ccc !important;
    box-shadow: none !important;
  }
  .flow-stepper .step .n,
  .flow-stepper .step[aria-pressed="true"] .n {
    color: var(--clay-dark) !important;
    opacity: 1;
  }
  .flow-stepper .panel { grid-template-columns: 1fr; gap: 12pt; }

  /* compare: show BOTH panels stacked */
  .compare .panels { display: block; padding: 12pt 14pt; }
  .compare .panel,
  .compare .panel[data-active="true"],
  .compare .doc-panel[data-active="true"] {
    display: block !important;
    margin-bottom: 14pt;
  }
  .compare .md-panel { background: #fafafa; color: #333; }

  /* funnel: drawer always open, no hover affordances */
  .compare .doc-panel .funnel-drawer,
  .compare .doc-panel .funnel-drawer[data-open="true"] {
    max-height: none !important;
    padding: 10pt 12pt !important;
    background: #fafafa;
    border-color: #ccc;
  }
  .compare .doc-panel .funnel-row {
    cursor: default;
    border-color: transparent !important;
    background: transparent !important;
    transform: none !important;
  }
  .compare .doc-panel .funnel-bar {
    background: var(--clay) !important;
  }

  /* anatomy: detail expanded, tree compact */
  .anatomy { grid-template-columns: 1fr; gap: 14pt; }
  .anatomy .tree button,
  .anatomy .tree button[aria-pressed="true"] {
    background: transparent !important;
    color: #1a1a1a !important;
    border-color: transparent !important;
  }

  /* meta-foot: tidy event log */
  .meta-foot details { padding: 10pt 12pt; }
  .meta-foot details > summary {
    list-style: none;
    cursor: default;
  }
  .meta-foot details > summary::-webkit-details-marker { display: none; }
  .meta-foot pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 8.5pt;
    background: #fafafa;
  }

  /* tiny footer line */
  .footer {
    border-top: 1px solid #ccc;
    padding: 10pt 0 0;
    font-size: 8pt;
    color: #666;
    opacity: 1 !important;
  }

  h1, h2, h3 { page-break-after: avoid; }
  img, pre, blockquote { page-break-inside: avoid; }
}
