/* ============================================================
   Agentic Engineering — design system
   Paleta: papel off-white, navy, âmbar de acento, grafite.
   ============================================================ */

:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --ink-mute: #64748b;
  --paper: #f7f4ee;
  --paper-deep: #efeae0;
  --line: #d9d2c4;
  --accent: #d97706;
  --accent-soft: #fcd9a8;
  --navy: #1e3a8a;
  --navy-soft: #c7d2fe;
  --teal: #0d9488;
  --crimson: #b91c1c;
  --good: #15803d;
  --shadow: 0 14px 40px -20px rgba(15, 23, 42, 0.25);
  --radius: 14px;
  --radius-lg: 22px;
  --container: min(1180px, 92vw);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(247, 244, 238, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-soft);
}
.topbar .brand a { text-decoration: none; }
.topbar nav { display: flex; gap: 22px; font-size: 14px; }
.topbar nav a { text-decoration: none; color: var(--ink-soft); }
.topbar nav a:hover { color: var(--accent); }

.edit-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: white;
  padding: 8px 14px; border-radius: 999px;
  font-family: var(--mono); font-size: 12px;
  cursor: pointer; transition: all 0.2s ease;
}
.edit-toggle:hover { border-color: var(--accent); color: var(--accent); }
.edit-toggle.active {
  background: var(--accent); color: white; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.edit-status {
  position: fixed; bottom: 22px; right: 22px; z-index: 60;
  background: var(--ink); color: white; padding: 10px 16px;
  border-radius: 999px; font-family: var(--mono); font-size: 12px;
  opacity: 0; transform: translateY(8px); transition: all 0.25s ease;
}
.edit-status.show { opacity: 1; transform: translateY(0); }
.edit-status.err { background: var(--crimson); }

body.editing [data-edit] {
  outline: 1px dashed rgba(217, 119, 6, 0.45);
  outline-offset: 4px;
  border-radius: 4px;
}
body.editing [data-edit]:hover {
  outline: 1px dashed var(--accent);
  background: rgba(252, 217, 168, 0.18);
}
body.editing [data-edit]:focus {
  outline: 2px solid var(--accent);
  background: rgba(252, 217, 168, 0.28);
}

/* ---------- Layout ---------- */
.wrap { width: var(--container); margin: 0 auto; }
section { padding: 92px 0; }
section + section { border-top: 1px solid var(--line); }

.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2.2rem, 4.5vw, 4rem); line-height: 1.05; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.1; }
h3 { font-size: 1.2rem; line-height: 1.3; font-weight: 600; font-family: var(--sans); }

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- Landing (index) ---------- */
.landing {
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.landing main {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 60px 0 120px;
}
.landing .intro { max-width: 720px; margin-bottom: 64px; }
.landing .intro h1 { margin: 18px 0 22px; }
.doors {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
@media (max-width: 880px) { .doors { grid-template-columns: 1fr; } }

.door {
  position: relative; overflow: hidden;
  background: white; border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px 28px;
  text-decoration: none; color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  min-height: 320px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.door::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(217,119,6,0.04));
  opacity: 0; transition: opacity 0.3s ease;
}
.door:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent-soft); }
.door:hover::before { opacity: 1; }
.door .num {
  font-family: var(--mono); font-size: 12px; color: var(--ink-mute);
  letter-spacing: 0.18em; text-transform: uppercase;
}
.door h2 { margin: 12px 0 16px; }
.door p { color: var(--ink-soft); margin: 0; }
.door .go {
  margin-top: 24px; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.door .go::after { content: '→'; transition: transform 0.3s ease; }
.door:hover .go::after { transform: translateX(6px); }

/* ---------- Simple version ---------- */
.simple-hero {
  padding: 120px 0 80px;
  background:
    radial-gradient(circle at 80% 20%, rgba(217,119,6,0.08), transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(30,58,138,0.06), transparent 50%);
}
.simple-hero h1 { margin: 18px 0 22px; max-width: 18ch; }
.simple-hero .lede { max-width: 56ch; }
.cta-pill {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 32px; padding: 14px 24px;
  background: var(--ink); color: white; border-radius: 999px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  text-decoration: none; transition: transform 0.2s ease;
}
.cta-pill:hover { transform: translateY(-2px); }

.step {
  display: grid; grid-template-columns: 200px 1fr; gap: 56px;
  align-items: start;
}
@media (max-width: 760px) { .step { grid-template-columns: 1fr; gap: 16px; } }
.step .kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  padding-top: 12px; border-top: 2px solid var(--ink);
}
.step h2 { margin-bottom: 18px; max-width: 22ch; }
.step .body { color: var(--ink-soft); font-size: 1.05rem; max-width: 62ch; }
.step .highlight {
  margin-top: 22px; padding: 16px 22px; border-left: 3px solid var(--accent);
  background: rgba(252,217,168,0.18); font-family: var(--serif);
  font-style: italic; font-size: 1.1rem;
}

/* ---------- Playful version ---------- */
.playful { background: linear-gradient(180deg, #fff7ed 0%, var(--paper) 30%); }
.playful-hero { padding: 100px 0 60px; }
.playful-hero h1 { max-width: 20ch; }
.scene {
  display: grid; grid-template-columns: 160px 1fr; gap: 44px; align-items: start;
  padding: 36px 0; border-top: 1px solid var(--line);
}
@media (max-width: 760px) { .scene { grid-template-columns: 1fr; gap: 16px; } }
.scene .icon {
  font-size: 96px; line-height: 1;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 8px 16px rgba(15,23,42,0.1));
  cursor: pointer;
}
.scene:hover .icon { transform: rotate(-6deg) scale(1.1); }
.scene h2 { margin-bottom: 14px; }
.scene .story { color: var(--ink-soft); font-size: 1.05rem; max-width: 62ch; }
.scene .metaphor {
  display: inline-block; margin-top: 20px;
  font-family: var(--serif); font-style: italic; font-size: 1.15rem;
  color: var(--navy);
  border-bottom: 2px dashed var(--navy-soft);
}

/* ---------- Technical version ---------- */
.tech-hero {
  padding: 120px 0 80px;
  background: linear-gradient(180deg, #fff 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
}
.tech-hero .eyebrow { margin-bottom: 18px; display: block; }
.tech-hero h1 { max-width: 20ch; margin-bottom: 22px; }
.hero-headline {
  display: grid; grid-template-columns: minmax(280px, 0.9fr) 1.1fr;
  gap: 48px; align-items: end;
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
@media (max-width: 880px) {
  .hero-headline { grid-template-columns: 1fr; gap: 24px; }
}
.hero-headline .hh-figure { display: flex; flex-direction: column; gap: 6px; }
.hero-headline .hh-value {
  font-family: var(--serif);
  font-size: clamp(3.4rem, 7vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-feature-settings: "tnum";
  background: linear-gradient(90deg, var(--accent) 0%, var(--navy) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-headline .hh-label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-mute);
}
.hero-headline .hh-body { display: flex; flex-direction: column; gap: 18px; }
.hero-headline .hh-sub {
  font-family: var(--serif); font-size: 1.15rem; line-height: 1.5;
  color: var(--ink-soft); margin: 0; max-width: 52ch;
}
.hero-headline .hh-cta {
  align-self: flex-start;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
  text-decoration: none;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  transition: background 200ms ease, color 200ms ease;
}
.hero-headline .hh-cta:hover { background: var(--accent); color: white; }

.section-head { display: grid; grid-template-columns: 220px 1fr; gap: 56px; margin-bottom: 48px; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; gap: 18px; } }
.section-head .kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  padding-top: 12px; border-top: 2px solid var(--ink);
  align-self: start;
}
.section-head h2 { margin-bottom: 14px; }

.three-up { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 760px) { .three-up { grid-template-columns: 1fr; } }
.card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-soft); margin: 0; }

.caption {
  margin-top: 28px; padding: 18px 22px; background: var(--ink); color: white;
  border-radius: var(--radius); font-family: var(--serif); font-size: 1.1rem;
}

/* Comparison columns */
.compare { display: grid; grid-template-columns: 1fr 24px 1fr; gap: 22px; align-items: stretch; }
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }
.compare .arrow {
  display: flex; align-items: center; justify-content: center; color: var(--accent);
  font-size: 28px;
}
.compare-col {
  background: white; border-radius: var(--radius); padding: 26px 24px;
  border: 1px solid var(--line);
}
.compare-col.bad { background: #fef2f2; border-color: #fecaca; }
.compare-col.good { background: #ecfdf5; border-color: #a7f3d0; }
.compare-col h3 { margin-bottom: 16px; }
.compare-col .row { padding: 12px 0; border-top: 1px dashed var(--line); }
.compare-col .row:first-of-type { border-top: 0; }
.compare-col .row .label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-mute);
}
.compare-col .row .value { margin-top: 4px; font-size: 1rem; }

/* Assembly line / fluxo */
.assembly {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: stretch;
}
@media (max-width: 1000px) { .assembly { grid-template-columns: 1fr; } }
.station {
  position: relative; background: white; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 18px;
  transition: all 0.3s ease;
}
.station:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.station .name { font-weight: 600; margin-bottom: 6px; }
.station .agent {
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  letter-spacing: 0.04em; margin-bottom: 12px;
}
.station .desc { color: var(--ink-soft); font-size: 0.93rem; }
.tollbooths {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 24px;
}
@media (max-width: 760px) { .tollbooths { grid-template-columns: 1fr; } }
.tollbooth {
  background: var(--ink); color: white; border-radius: var(--radius);
  padding: 22px 20px; position: relative; overflow: hidden;
}
.tollbooth::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), #f59e0b);
}
.tollbooth .n {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  color: var(--accent-soft);
}
.tollbooth h3 { color: white; margin: 8px 0 12px; }
.tollbooth .what { font-size: 0.95rem; opacity: 0.9; }
.tollbooth .why {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.18);
  font-family: var(--serif); font-style: italic; opacity: 0.85;
}

/* Squad cards */
.squad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) { .squad { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .squad { grid-template-columns: 1fr; } }
.agent-card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; transition: all 0.3s ease;
  position: relative; overflow: hidden; min-height: 220px;
  display: flex; flex-direction: column;
}
.agent-card:hover {
  border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-3px);
}
.agent-card .emoji {
  font-size: 36px; line-height: 1; margin-bottom: 14px;
  transition: transform 0.3s ease;
}
.agent-card:hover .emoji { transform: scale(1.2) rotate(-6deg); }
.agent-card .name { font-weight: 600; margin-bottom: 4px; }
.agent-card .role { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 14px; flex: 1; }
.agent-card .skills {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.agent-card .skill {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em;
  background: var(--paper-deep); padding: 3px 8px; border-radius: 999px;
}
.agent-card .outputs {
  font-size: 0.85rem; color: var(--ink-soft); font-style: italic;
  margin-bottom: 10px;
}
.agent-card .tollbooth-tag {
  font-family: var(--mono); font-size: 10px; color: var(--accent);
  letter-spacing: 0.04em;
}

/* Phase / task file */
.phases {
  display: grid; grid-template-columns: 1fr; gap: 4px;
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; font-family: var(--mono);
}
.phase-row {
  display: grid; grid-template-columns: 100px 200px 1fr; gap: 18px;
  padding: 16px 22px; align-items: start;
  border-top: 1px dashed var(--line);
  transition: background 0.3s ease;
}
.phase-row:first-child { border-top: 0; }
.phase-row:hover { background: var(--paper); }
.phase-row .tag {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); padding-top: 4px;
}
.phase-row .ptitle { font-weight: 600; font-family: var(--sans); font-size: 0.95rem; }
.phase-row .pbody { color: var(--ink-soft); font-family: var(--sans); font-size: 0.93rem; }
@media (max-width: 760px) {
  .phase-row { grid-template-columns: 1fr; }
}
.task-example {
  margin-top: 24px; padding: 24px 26px;
  background: var(--ink); color: #f5f5f4; border-radius: var(--radius);
  font-family: var(--mono); font-size: 0.92rem;
}
.task-example .title-line { color: var(--accent-soft); margin-bottom: 10px; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  position: relative; background: white; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px 28px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.pillar:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-3px); }
.pillar .n {
  position: absolute; right: 24px; top: 18px;
  font-family: var(--serif); font-size: 4rem; line-height: 1;
  color: var(--paper-deep); user-select: none;
  transition: color 0.3s ease;
}
.pillar:hover .n { color: var(--accent-soft); }
.pillar h3 { margin-bottom: 12px; max-width: 18ch; }
.pillar p { color: var(--ink-soft); margin: 0; max-width: 42ch; }

/* Constitution rules */
.constitution { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .constitution { grid-template-columns: 1fr; } }
.repo-rules {
  background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px;
}
.repo-rules h3 { font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.repo-rules ul { padding-left: 0; list-style: none; margin: 0; }
.repo-rules li {
  padding: 12px 0 12px 28px; position: relative;
  border-top: 1px dashed var(--line); color: var(--ink-soft);
  font-size: 0.95rem;
}
.repo-rules li:first-child { border-top: 0; }
.repo-rules li::before {
  content: '⚠'; position: absolute; left: 0; top: 12px; color: var(--crimson);
}

/* ADR template */
.adr-template {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; font-family: var(--mono); font-size: 0.92rem;
  counter-reset: adr;
}
.adr-template div { padding: 10px 0; border-top: 1px dashed var(--line); }
.adr-template div:first-child { border-top: 0; }

/* QA groups */
.qa-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 880px) { .qa-groups { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .qa-groups { grid-template-columns: 1fr; } }
.qa-group {
  background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px;
}
.qa-group h3 { margin-bottom: 14px; }
.qa-group ul { margin: 0; padding-left: 0; list-style: none; }
.qa-group li {
  padding: 6px 0 6px 22px; position: relative; font-size: 0.93rem; color: var(--ink-soft);
}
.qa-group li::before {
  content: '✓'; position: absolute; left: 0; color: var(--good); font-weight: 700;
}

/* Slash commands */
.cmds {
  background: var(--ink); color: #f5f5f4; border-radius: var(--radius);
  padding: 26px 28px; font-family: var(--mono);
}
.cmds .cmd {
  display: grid; grid-template-columns: 200px 1fr; gap: 22px;
  padding: 14px 0; border-top: 1px dashed rgba(255,255,255,0.15);
}
.cmds .cmd:first-of-type { border-top: 0; }
.cmds .cmd .name { color: var(--accent-soft); }
.cmds .cmd .desc { font-family: var(--sans); color: #e7e5e4; font-size: 0.95rem; }
@media (max-width: 760px) { .cmds .cmd { grid-template-columns: 1fr; gap: 4px; } }

/* Lessons */
.lessons { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .lessons { grid-template-columns: 1fr; } }
.lessons-col { background: white; border-radius: var(--radius); padding: 26px 24px; border: 1px solid var(--line); }
.lessons-col.wins { background: linear-gradient(180deg, #ecfdf5 0%, white 100%); border-color: #a7f3d0; }
.lessons-col.traps { background: linear-gradient(180deg, #fef2f2 0%, white 100%); border-color: #fecaca; }
.lessons-col h3 { margin-bottom: 16px; }
.lessons-col ul { margin: 0; padding-left: 0; list-style: none; }
.lessons-col li {
  padding: 10px 0 10px 26px; position: relative; border-top: 1px dashed var(--line);
  color: var(--ink-soft); font-size: 0.97rem;
}
.lessons-col li:first-child { border-top: 0; }
.lessons-col.wins li::before { content: '✓'; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.lessons-col.traps li::before { content: '⚠'; position: absolute; left: 0; color: var(--accent); }

/* Trinity venn */
.trinity-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 880px) { .trinity-wrap { grid-template-columns: 1fr; } }
.trinity-list .vertex {
  padding: 16px 0; border-top: 1px solid var(--line);
}
.trinity-list .vertex:first-child { border-top: 0; }
.trinity-list .vertex h3 { color: var(--accent); margin-bottom: 6px; }
.trinity-closer {
  margin-top: 30px; padding: 20px 24px; background: var(--ink); color: white;
  border-radius: var(--radius); font-family: var(--serif); font-size: 1.2rem; line-height: 1.35;
}

/* Hero showpiece — degradation curve */
.curve-hero {
  background: white; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 36px; margin-top: 40px;
}
.curve-hero .label { font-family: var(--mono); font-size: 11px; color: var(--ink-mute); letter-spacing: 0.12em; text-transform: uppercase; }
.curve-hero .slider-wrap { margin: 22px 0 8px; }
.curve-hero input[type=range] {
  width: 100%; accent-color: var(--accent);
}
.curve-hero .complexity-label {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  letter-spacing: 0.08em; margin-top: 4px;
}
.curve-hero svg { margin-top: 18px; }

/* Task file showpiece */
.taskfile-demo {
  background: white; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 30px; font-family: var(--mono); font-size: 0.9rem; line-height: 1.7;
}
.taskfile-demo .filename {
  font-family: var(--mono); font-size: 0.85rem; color: var(--ink-mute);
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line);
}
.taskfile-demo .grow { animation: grow-in 0.5s ease forwards; opacity: 0; transform: translateY(8px); }
@keyframes grow-in { to { opacity: 1; transform: translateY(0); } }
.taskfile-demo h4 { margin: 14px 0 4px; font-family: var(--sans); color: var(--accent); font-size: 0.95rem; }
.taskfile-demo .grow-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: white; border: 0; padding: 8px 16px;
  border-radius: 999px; cursor: pointer; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.04em; margin-top: 14px;
}

/* Tollbooth simulator */
.toll-sim {
  background: white; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px; margin-top: 24px; overflow: hidden;
}
.toll-sim .road {
  position: relative; height: 120px; background: linear-gradient(180deg, var(--paper-deep) 0%, white 100%);
  border-radius: var(--radius); overflow: hidden;
}
.toll-sim .road::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--ink-mute) 0 10px, transparent 10px 22px);
  opacity: 0.4;
}
.toll-sim .booth {
  position: absolute; top: 12px; bottom: 12px; width: 70px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.toll-sim .booth::before {
  content: ''; width: 4px; flex: 1; background: var(--accent);
  border-radius: 4px 4px 0 0; transition: background 0.3s ease;
}
.toll-sim .booth.open::before { background: var(--good); }
.toll-sim .booth span { margin-top: 4px; }
.toll-sim .booth:nth-of-type(1) { left: 22%; }
.toll-sim .booth:nth-of-type(2) { left: 50%; }
.toll-sim .booth:nth-of-type(3) { left: 78%; }
.toll-sim .car {
  position: absolute; left: 2%; top: 50%; transform: translate(0, -50%);
  font-size: 32px;
  transition: left 1.2s cubic-bezier(0.4, 0.2, 0.4, 1);
}
.toll-sim .controls { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.toll-sim button {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  border: 1px solid var(--line); background: white; padding: 10px 18px;
  border-radius: 999px; cursor: pointer; transition: all 0.2s ease;
}
.toll-sim button:hover { border-color: var(--accent); color: var(--accent); }
.toll-sim button.danger:hover { border-color: var(--crimson); color: var(--crimson); }
.toll-sim .verdict {
  margin-top: 12px; font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
}

/* Footer */
footer.foot {
  padding: 60px 0 80px; text-align: center;
  color: var(--ink-soft); font-family: var(--serif); font-size: 1.3rem;
  font-style: italic;
}

/* Utility */
.spacer-sm { height: 24px; }
.spacer-md { height: 48px; }

/* Print-friendly */
@media print {
  .topbar, .edit-toggle, .edit-status { display: none; }
  section { page-break-inside: avoid; }
}

/* ============================================================
   New components — Vibe Wave, Statutes, Review Cycle, Superpower, Cases
   ============================================================ */

/* Vibe wave — two halves */
.wave-halves { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 8px; }
@media (max-width: 880px) { .wave-halves { grid-template-columns: 1fr; } }
.wave-half {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; position: relative;
}
.wave-half.appeal { background: linear-gradient(180deg, #fefce8 0%, white 100%); border-color: #fde68a; }
.wave-half.wall { background: linear-gradient(180deg, #fef2f2 0%, white 100%); border-color: #fecaca; }
.wave-half h3 {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 18px;
}
.wave-half.appeal h3 { color: #92400e; }
.wave-half.wall h3 { color: #b91c1c; }
.wave-half ul { margin: 0; padding: 0; list-style: none; }
.wave-half li {
  padding: 14px 0; border-top: 1px dashed var(--line);
}
.wave-half li:first-child { border-top: 0; }
.wave-half li b { display: block; margin-bottom: 4px; font-family: var(--sans); }
.wave-half li span { color: var(--ink-soft); font-size: 0.95rem; }
.curve-explainer {
  font-size: 0.95rem; color: var(--ink-soft); max-width: 70ch;
  margin: 6px 0 16px;
}

/* Spaghetti vs Spec mock */
.vs-mock {
  display: grid; grid-template-columns: 1fr 40px 1fr; gap: 18px;
  margin-top: 28px; align-items: stretch;
}
@media (max-width: 880px) { .vs-mock { grid-template-columns: 1fr; } }
.vs-divider {
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--accent);
}
.vs-col {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.vs-col:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.vs-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: var(--paper-deep);
  border-bottom: 1px solid var(--line);
}
.vs-head .dot { width: 10px; height: 10px; border-radius: 50%; }
.vs-head .dot.red { background: #ef4444; }
.vs-head .dot.yellow { background: #facc15; }
.vs-head .dot.green { background: #22c55e; }
.vs-head .vs-fname {
  margin-left: 10px; font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
}
.vs-body { flex: 1; padding: 18px 20px; font-family: var(--mono); font-size: 12px; line-height: 1.7; }
.vs-body.code { background: #0f172a; color: #e2e8f0; }
.vs-body.code .line { white-space: nowrap; overflow-x: auto; }
.vs-body.code .kw { color: #c4b5fd; }
.vs-body.code .fn { color: #fde68a; }
.vs-body.code .str { color: #86efac; }
.vs-body.code .cm { color: #f87171; font-style: italic; }
.vs-body.code .any { color: #fca5a5; text-decoration: underline wavy; }
.vs-body.spec { background: white; }
.spec-row { padding: 4px 0; }
.spec-row.body { padding-left: 38px; color: var(--ink-soft); font-family: var(--sans); font-size: 13px; }
.spec-row.signed {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line);
  color: var(--good); font-family: var(--sans); font-size: 13px;
}
.spec-tag {
  display: inline-block; width: 32px; padding: 1px 0; margin-right: 6px;
  text-align: center; border-radius: 4px;
  font-size: 10px; letter-spacing: 0.08em; color: white;
}
.spec-tag.pm { background: var(--navy); }
.spec-tag.ux { background: var(--teal); }
.spec-tag.arch { background: var(--accent); }
.vs-foot {
  padding: 10px 14px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.04em; border-top: 1px solid var(--line);
}
.vs-foot.bad { background: #fef2f2; color: #b91c1c; }
.vs-foot.good { background: #ecfdf5; color: var(--good); }

/* Journey simulator (prompt → tollbooths → entrega) */
.journey {
  background: white; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 30px; margin-top: 22px;
}
.journey .label {
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px;
}
.jr-track {
  position: relative; height: 140px; margin: 18px 0;
  background: linear-gradient(180deg, var(--paper-deep) 0%, white 100%);
  border-radius: var(--radius); overflow: visible;
}
.jr-track::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, var(--ink-mute) 0 10px, transparent 10px 22px);
  opacity: 0.45;
}
.jr-stop, .jr-booth {
  position: absolute; top: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; width: 90px;
}
.jr-start { left: 0; }
.jr-end { right: 0; }
.jr-icon { font-size: 30px; line-height: 1; }
.jr-label {
  margin-top: 4px; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.04em; color: var(--ink-soft); max-width: 90px;
}
.jr-booth {
  width: 60px; cursor: pointer; user-select: none;
}
.jr-booth:nth-of-type(2) { left: 24%; }
.jr-booth:nth-of-type(3) { left: 46%; }
.jr-booth:nth-of-type(4) { left: 68%; }
.jr-booth .jr-bar {
  width: 6px; height: 60px; background: var(--accent);
  border-radius: 4px 4px 0 0;
  transition: background 0.3s ease, transform 0.3s ease;
  transform-origin: top center;
}
.jr-booth.open .jr-bar { background: var(--good); transform: rotate(-72deg); }
.jr-booth:hover .jr-bar { box-shadow: 0 0 0 6px rgba(217,119,6,0.12); }
.jr-booth .jr-label { margin-top: 6px; }
.jr-parcel {
  position: absolute; top: 50%; left: 8%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  transition: left 1.2s cubic-bezier(0.4, 0.2, 0.4, 1);
}
.jr-verdict {
  margin-top: 14px; padding: 16px 18px;
  background: var(--paper-deep); border-radius: var(--radius);
  border-left: 3px solid var(--ink-mute);
}
.jr-verdict.ok { background: #ecfdf5; border-left-color: var(--good); }
.jr-verdict.warn { background: #fef2f2; border-left-color: var(--crimson); }
.jr-vhead { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; font-weight: 600; }
.jr-vhead.muted { color: var(--ink-mute); font-weight: 400; }
.jr-props {
  margin: 10px 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 22px;
}
@media (max-width: 760px) { .jr-props { grid-template-columns: 1fr; } }
.jr-props li {
  padding: 4px 0 4px 22px; position: relative; font-size: 0.92rem; color: var(--ink-soft);
}
.jr-props li::before { content: '✓'; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.jr-props.bad li::before { content: '✗'; color: var(--crimson); }
.jr-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.jr-controls button {
  font-family: var(--mono); font-size: 12px; border: 1px solid var(--line);
  background: white; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  transition: all 0.2s ease;
}
.jr-controls button:hover { border-color: var(--accent); color: var(--accent); }
.jr-controls button.danger:hover { border-color: var(--crimson); color: var(--crimson); }

/* Statutes — two tables */
.statutes { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 880px) { .statutes { grid-template-columns: 1fr; } }
.statute {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px;
  transition: all 0.3s ease;
}
.statute:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.statute.business { border-top: 4px solid var(--navy); }
.statute.architecture { border-top: 4px solid var(--accent); }
.statute h3 { margin-bottom: 4px; }
.statute .st-sub {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--ink-mute); margin-bottom: 18px;
}
.statute .st-meta {
  display: grid; grid-template-columns: 90px 1fr; gap: 10px;
  font-size: 0.88rem; padding: 12px 0; border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line); margin-bottom: 16px;
}
.statute .st-meta .k {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--ink-mute); text-transform: uppercase;
}
.statute .st-meta .v { color: var(--ink-soft); }
.statute ul { margin: 0; padding: 0; list-style: none; }
.statute li {
  padding: 10px 0 10px 26px; position: relative; border-top: 1px dashed var(--line);
  color: var(--ink-soft); font-size: 0.94rem; line-height: 1.5;
}
.statute li:first-child { border-top: 0; }
.statute.business li::before {
  content: '§'; position: absolute; left: 0; top: 8px;
  color: var(--navy); font-weight: 700; font-family: var(--serif); font-size: 1.1rem;
}
.statute.architecture li::before {
  content: '◆'; position: absolute; left: 0; top: 12px;
  color: var(--accent); font-size: 0.7rem;
}

/* Review Cycle — stage with diagram + active card */
.cycle-wrap { margin-top: 8px; }
.cycle-stage {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px;
  align-items: center;
}
@media (max-width: 880px) { .cycle-stage { grid-template-columns: 1fr; gap: 20px; } }
.cycle-svg { max-width: 460px; margin: 0 auto; }
.cy-node { transition: fill 0.3s ease, stroke 0.3s ease, stroke-width 0.3s ease; }
.cy-arc { transition: stroke 0.3s ease, stroke-width 0.3s ease; }
.cy-cmd { transition: fill 0.3s ease; }

.cycle-active {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px;
  min-height: 260px;
}
.cycle-active.swap-in {
  animation: swap-in 0.4s ease forwards;
}
@keyframes swap-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}
.ca-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ca-num {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  background: var(--accent); color: white;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.ca-actor {
  font-family: var(--mono); font-size: 12px; color: var(--ink-mute);
  letter-spacing: 0.04em;
}
.ca-cmd {
  margin-left: auto; font-family: var(--mono); font-size: 11px;
  background: var(--ink); color: var(--accent-soft);
  padding: 3px 10px; border-radius: 4px;
}
.ca-title {
  font-family: var(--serif); font-size: 1.4rem; line-height: 1.25; font-weight: 500;
  margin-bottom: 10px; color: var(--ink);
}
.ca-body {
  color: var(--ink-soft); font-size: 1rem; line-height: 1.55;
  margin-bottom: 22px;
}
.ca-progress {
  display: flex; gap: 8px; padding-top: 18px; border-top: 1px dashed var(--line);
}
.ca-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--paper-deep);
  border: 1px solid var(--line); cursor: pointer; transition: all 0.25s ease;
}
.ca-dot:hover { border-color: var(--accent); }
.ca-dot.on { background: var(--accent); border-color: var(--accent); transform: scale(1.2); }

.cycle-controls {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; justify-content: center;
}
.cycle-controls button {
  font-family: var(--mono); font-size: 12px; border: 1px solid var(--line);
  background: white; padding: 9px 18px; border-radius: 999px; cursor: pointer;
  transition: all 0.2s ease;
}
.cycle-controls button:hover { border-color: var(--accent); color: var(--accent); }
.cycle-controls button.autoplay.on { background: var(--accent); color: white; border-color: var(--accent); }

.qa-scope-title {
  margin: 36px 0 14px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.cmd-block {
  margin-top: 32px;
}
.cmd-block .cb-head {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.cmd-block .cb-lede { color: var(--ink-soft); margin-bottom: 16px; }

.cmds-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  background: var(--ink); color: #f5f5f4; border-radius: var(--radius);
  padding: 22px 24px; font-family: var(--mono);
}
@media (max-width: 760px) { .cmds-grid { grid-template-columns: 1fr; } }
.cmds-grid .cmd-row {
  padding: 10px 0; border-top: 1px dashed rgba(255,255,255,0.15);
}
.cmds-grid .cmd-row:nth-child(-n+2) { border-top: 0; }
.cmds-grid .cmd-name { color: var(--accent-soft); }
.cmds-grid .cmd-actor { font-size: 10px; color: rgba(255,255,255,0.5); margin-left: 6px; }
.cmds-grid .cmd-desc {
  font-family: var(--sans); color: #e7e5e4; font-size: 0.92rem; margin-top: 2px;
}

/* Superpower */
.super-cmp { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 18px; align-items: stretch; margin-bottom: 32px; }
@media (max-width: 880px) { .super-cmp { grid-template-columns: 1fr; } }
.super-col {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px;
}
.super-col.before { background: #f8fafc; }
.super-col.after { background: linear-gradient(180deg, #ecfdf5 0%, white 100%); border-color: #a7f3d0; }
.super-col .super-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 18px;
}
.super-col.after .super-label { color: var(--good); }
.super-col ul { margin: 0; padding: 0; list-style: none; }
.super-col li {
  padding: 10px 0 10px 26px; position: relative; border-top: 1px dashed var(--line);
  color: var(--ink-soft); font-size: 0.97rem; line-height: 1.5;
}
.super-col li:first-child { border-top: 0; }
.super-col.before li::before { content: '◦'; position: absolute; left: 0; top: 10px; color: var(--ink-mute); }
.super-col.after li::before { content: '✦'; position: absolute; left: 0; top: 10px; color: var(--good); }

.outcomes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 880px) { .outcomes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .outcomes { grid-template-columns: 1fr; } }
.outcome {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.outcome:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent-soft); }
.outcome .val {
  font-family: var(--serif); font-size: 2rem; line-height: 1.1; color: var(--accent);
  margin-bottom: 10px;
}
.outcome p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }

.punchline {
  margin-top: 32px; padding: 22px 26px;
  background: var(--ink); color: white; border-radius: var(--radius);
  font-family: var(--serif); font-size: 1.25rem; line-height: 1.35; font-style: italic;
}

/* Trindade intent block */
.intent-block {
  margin-top: 36px; padding: 28px 32px;
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}
.intent-block h3 {
  font-family: var(--serif); font-size: 1.4rem; font-weight: 500; color: var(--accent);
  margin-bottom: 14px;
}
.intent-block p {
  color: var(--ink-soft); font-size: 1.02rem; line-height: 1.65; margin: 0;
}

/* Cases page */
.cases-hero {
  padding: 120px 0 80px;
  background: linear-gradient(180deg, #fff 0%, var(--paper) 100%);
}
.cases-hero h1 { max-width: 22ch; margin: 18px 0 22px; }

/* Productivity bars */
.productivity {
  padding: 60px 0 80px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.productivity .wrap { width: var(--container); margin: 0 auto; }
.prod-head {
  display: grid; grid-template-columns: 240px 1fr; gap: 56px; margin-bottom: 36px;
}
.prod-head .ck {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  padding-top: 12px; border-top: 2px solid var(--ink);
}
.prod-head h2 {
  font-family: var(--serif); font-size: 2.4rem; line-height: 1.1;
  margin: 0 0 12px; color: var(--ink);
}
.prod-head .lede { color: var(--ink-soft); font-size: 1.05rem; max-width: 62ch; margin: 0; }
@media (max-width: 880px) {
  .prod-head { grid-template-columns: 1fr; gap: 14px; }
}

.prod-row {
  display: grid;
  grid-template-columns: 220px 1fr 90px;
  gap: 24px; align-items: center;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.prod-row:last-child { border-bottom: 1px solid var(--line); }
.prod-row .plabel {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em;
  color: var(--ink); text-transform: uppercase;
}
.prod-row .ptrack {
  position: relative; height: 16px;
  background: var(--paper-deep); border-radius: 999px; overflow: hidden;
}
.prod-row .pbar {
  position: absolute; inset: 0 auto 0 0; width: 0;
  border-radius: 999px;
  transition: width 1100ms cubic-bezier(.22,1,.36,1);
}
.prod-row.trad  .pbar { background: var(--ink-mute); }
.prod-row.vibe  .pbar { background: var(--accent-soft); }
.prod-row.squad .pbar { background: linear-gradient(90deg, var(--accent) 0%, var(--navy) 100%); }
.prod-row .pmult {
  font-family: var(--serif); font-size: 1.7rem;
  text-align: right; color: var(--ink);
  font-feature-settings: "tnum";
}
.prod-row.squad .pmult { color: var(--navy); font-weight: 500; }
.prod-row .pnote {
  grid-column: 1 / -1;
  color: var(--ink-soft); font-size: 0.95rem;
  max-width: 78ch; margin: 4px 0 0;
}
@media (max-width: 720px) {
  .prod-row { grid-template-columns: 1fr 70px; gap: 12px; }
  .prod-row .plabel { grid-column: 1 / -1; }
  .prod-row .ptrack { grid-column: 1 / 2; }
  .prod-row .pmult { font-size: 1.4rem; }
}
.case {
  padding: 60px 0;
}
.case-meta {
  display: grid; grid-template-columns: 240px 1fr; gap: 56px; margin-bottom: 48px;
}
@media (max-width: 880px) { .case-meta { grid-template-columns: 1fr; gap: 14px; } }
.case-meta .ck { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); padding-top: 12px; border-top: 2px solid var(--ink); }
.case-meta h2 { margin-bottom: 8px; }
.case-meta .csub { color: var(--ink-soft); font-size: 1.1rem; }

.act-head {
  display: grid; grid-template-columns: 160px 1fr; gap: 30px; align-items: baseline;
  margin: 56px 0 26px;
}
@media (max-width: 760px) { .act-head { grid-template-columns: 1fr; gap: 8px; } }
.act-head .act-tag {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-mute);
}
.act-head.antes .act-tag { color: var(--crimson); }
.act-head.depois .act-tag { color: var(--good); }
.act-head h3 {
  font-family: var(--serif); font-size: 1.8rem; font-weight: 500;
  max-width: 28ch;
}

.story-panels {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
@media (max-width: 880px) { .story-panels { grid-template-columns: 1fr; } }
.panel {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.panel:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.panel .img {
  aspect-ratio: 16 / 9;
  background: repeating-linear-gradient(45deg, var(--paper-deep) 0 12px, var(--paper) 12px 24px);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  text-align: center; padding: 14px;
  position: relative;
}
.panel .img.has-img {
  background: var(--ink-soft);
}
.panel .img img {
  width: 100%; height: 100%; object-fit: cover;
}
.panel .img .placeholder-note {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(15,23,42,0.85); color: white;
  padding: 4px 8px; border-radius: 4px;
  font-size: 10px;
}
.panel .pcap {
  padding: 16px 18px; flex: 1;
}
.panel .pcap b { display: block; margin-bottom: 4px; }
.panel .pcap span { color: var(--ink-soft); font-size: 0.93rem; }

.story-narrative {
  margin: 24px 0 0; padding: 22px 26px;
  background: var(--paper-deep); border-radius: var(--radius);
}
.story-narrative.antes { border-left: 3px solid var(--crimson); }
.story-narrative.depois { border-left: 3px solid var(--good); }
.story-narrative ul { margin: 0; padding-left: 20px; }
.story-narrative li {
  margin: 8px 0; color: var(--ink-soft); font-family: var(--serif); font-style: italic;
  font-size: 1.08rem; line-height: 1.5;
}

.arch-shift {
  margin: 48px 0;
  display: grid; grid-template-columns: 1fr 60px 1fr; gap: 18px; align-items: center;
}
@media (max-width: 760px) { .arch-shift { grid-template-columns: 1fr; } }
.arch-card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px;
}
.arch-card.old { background: #fef2f2; border-color: #fecaca; }
.arch-card.new { background: #ecfdf5; border-color: #a7f3d0; }
.arch-card h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 14px; }
.arch-card.old h4 { color: var(--crimson); }
.arch-card.new h4 { color: var(--good); }
.arch-card ul { margin: 0; padding: 0; list-style: none; }
.arch-card li {
  padding: 8px 0 8px 22px; position: relative; font-size: 0.95rem; color: var(--ink-soft);
}
.arch-card.old li::before { content: '◯'; position: absolute; left: 0; color: var(--ink-mute); }
.arch-card.new li::before { content: '◆'; position: absolute; left: 0; color: var(--good); }
.arch-arrow { text-align: center; font-size: 32px; color: var(--accent); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lb-frame {
  position: relative;
  max-width: min(1400px, 95vw); max-height: 90vh;
  display: flex; flex-direction: column; align-items: center;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lightbox.open .lb-frame { transform: scale(1); }
.lb-frame img {
  max-width: 100%; max-height: 80vh;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
  background: white;
}
.lb-cap { margin-top: 16px; max-width: 720px; text-align: center; color: white; }
.lb-cap b { display: block; font-family: var(--serif); font-size: 1.3rem; margin-bottom: 6px; }
.lb-cap span { color: rgba(255,255,255,0.85); font-size: 0.95rem; line-height: 1.5; }
.lb-close {
  position: absolute; top: -16px; right: -16px;
  width: 40px; height: 40px; border-radius: 50%;
  background: white; border: 0; cursor: pointer;
  font-size: 18px; line-height: 1;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease;
}
.lb-close:hover { transform: rotate(90deg) scale(1.1); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.9); border: 0; cursor: pointer;
  font-size: 22px; line-height: 1;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease;
}
.lb-nav:hover { transform: translateY(-50%) scale(1.1); }
.lb-prev { left: -64px; }
.lb-next { right: -64px; }
@media (max-width: 820px) {
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-close { top: 4px; right: 4px; }
}

.panel .img.has-img { cursor: zoom-in; overflow: hidden; }
.panel .img img { transition: transform 0.4s ease; }
.panel:hover .img.has-img img { transform: scale(1.04); }

.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-top: 24px;
}
@media (max-width: 880px) { .features-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features-grid { grid-template-columns: 1fr; } }
.feature {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.feature:hover { transform: translateY(-3px); border-color: var(--accent); }
.feature .fi { font-size: 24px; line-height: 1; margin-bottom: 8px; }
.feature b { display: block; margin-bottom: 4px; }
.feature span { color: var(--ink-soft); font-size: 0.92rem; }


/* ============================================================
   Spec-Driven Demo — mesmo prompt, dois mundos
   Append no final de css/styles.css
   ============================================================ */

.spec-demo {
  margin-top: 22px;
}

.spec-demo .prompt-bar {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 22px;
  align-items: center;
  position: relative;
}
.spec-demo .prompt-bar::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  margin: 0 auto;
  width: 2px; height: 22px;
  background: linear-gradient(180deg, var(--accent), transparent);
}
.spec-demo .prompt-bar .lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-align: right;
  border-right: 1px solid var(--line);
  padding-right: 22px;
}
.spec-demo .prompt-bar .text {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
  line-height: 1.5;
}
.spec-demo .prompt-bar .text .caret {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 4px;
  animation: spec-demo-blink 1s steps(2) infinite;
}
@keyframes spec-demo-blink { 50% { opacity: 0; } }

.spec-demo .split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 960px) { .spec-demo .split { grid-template-columns: 1fr; } }

.spec-demo .pane {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 580px;
  position: relative;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}
.spec-demo .pane.active { box-shadow: var(--shadow); }
.spec-demo .pane.left.active { border-color: var(--crimson); }
.spec-demo .pane.right.active { border-color: var(--good); }

.spec-demo .pane-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--paper-deep);
  border-bottom: 1px solid var(--line);
}
.spec-demo .pane-head .dots { display: flex; gap: 6px; }
.spec-demo .pane-head .dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.spec-demo .pane-head .dot.red { background: #ef4444; }
.spec-demo .pane-head .dot.yellow { background: #facc15; }
.spec-demo .pane-head .dot.green { background: #22c55e; }
.spec-demo .pane-head .fname {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
  margin-left: 8px;
}
.spec-demo .pane-head .badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.spec-demo .pane.left .pane-head .badge { background: rgba(185, 28, 28, 0.1); color: var(--crimson); }
.spec-demo .pane.right .pane-head .badge { background: rgba(21, 128, 61, 0.1); color: var(--good); }

.spec-demo .pane-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
}
.spec-demo .pane-body::-webkit-scrollbar { width: 6px; }
.spec-demo .pane-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.spec-demo .pane.left .pane-body {
  background: #0f172a;
  color: #cbd5e1;
}
.spec-demo .pane.left .kw { color: #c4b5fd; }
.spec-demo .pane.left .fn { color: #fde68a; }
.spec-demo .pane.left .str { color: #86efac; }
.spec-demo .pane.left .cm { color: #f87171; font-style: italic; }
.spec-demo .pane.left .any { color: #fca5a5; text-decoration: underline wavy; }
.spec-demo .pane.left .var { color: #93c5fd; }
.spec-demo .pane.left .lineno {
  display: inline-block;
  width: 28px;
  color: #475569;
  text-align: right;
  margin-right: 14px;
  user-select: none;
}

.spec-demo .pane.right .pane-body { background: white; }

.spec-demo .pane-foot {
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  border-top: 1px solid var(--line);
  min-height: 42px;
  display: flex;
  align-items: center;
  transition: background 0.4s ease, color 0.4s ease;
}
.spec-demo .pane.left .pane-foot { background: #1e1b1b; color: #94a3b8; }
.spec-demo .pane.left .pane-foot.bad { background: #2d1517; color: #fca5a5; }
.spec-demo .pane.right .pane-foot { background: var(--paper-deep); color: var(--ink-mute); }
.spec-demo .pane.right .pane-foot.good { background: #ecfdf5; color: var(--good); }

.spec-demo .code-line {
  opacity: 0;
  animation: spec-demo-type-in 0.05s ease forwards;
  white-space: pre;
}
@keyframes spec-demo-type-in {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}

.spec-demo .spec-block {
  margin-bottom: 18px;
  padding: 14px 16px 14px 18px;
  background: var(--paper);
  border-radius: 8px;
  border-left: 3px solid var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
  opacity: 0;
  transform: translateY(12px);
  animation: spec-demo-slide-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes spec-demo-slide-in {
  to { opacity: 1; transform: translateY(0); }
}

.spec-demo .spec-block.pm { border-left-color: var(--navy); }
.spec-demo .spec-block.ux { border-left-color: var(--teal); }
.spec-demo .spec-block.arch { border-left-color: var(--accent); }
.spec-demo .spec-block.eng { border-left-color: var(--ink-soft); background: #0f172a; color: #e2e8f0; }
.spec-demo .spec-block.eng .kw { color: #c4b5fd; }
.spec-demo .spec-block.eng .fn { color: #fde68a; }
.spec-demo .spec-block.eng .str { color: #86efac; }
.spec-demo .spec-block.eng .type { color: #67e8f9; }
.spec-demo .spec-block.qa { border-left-color: var(--good); background: #ecfdf5; }

.spec-demo .spec-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  color: white;
  margin-right: 8px;
  vertical-align: 2px;
}
.spec-demo .spec-tag.pm { background: var(--navy); }
.spec-demo .spec-tag.ux { background: var(--teal); }
.spec-demo .spec-tag.arch { background: var(--accent); }
.spec-demo .spec-tag.eng { background: var(--ink-soft); }
.spec-demo .spec-tag.qa { background: var(--good); }

.spec-demo .spec-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}
.spec-demo .spec-block.eng .spec-title { color: #fde68a; }

.spec-demo .spec-body {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.spec-demo .spec-block.eng .spec-body { color: #cbd5e1; }
.spec-demo .spec-block.qa .spec-body { color: var(--good); }

.spec-demo .spec-body ul {
  margin: 4px 0; padding-left: 18px;
}
.spec-demo .spec-body li { padding: 2px 0; }

.spec-demo .controls {
  margin-top: 28px;
  padding: 20px 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.spec-demo .ctrl-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-right: 8px;
}
.spec-demo .btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  background: white;
  padding: 11px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.spec-demo .btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.spec-demo .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.spec-demo .btn.primary-left {
  background: var(--crimson); color: white; border-color: var(--crimson);
}
.spec-demo .btn.primary-left:hover:not(:disabled) { background: #991b1b; color: white; }
.spec-demo .btn.primary-right {
  background: var(--good); color: white; border-color: var(--good);
}
.spec-demo .btn.primary-right:hover:not(:disabled) { background: #166534; color: white; }
.spec-demo .btn.reset { margin-left: auto; }

.spec-demo .progress {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  padding: 6px 14px;
  background: var(--paper-deep);
  border-radius: 999px;
}

.spec-demo .comparison {
  margin-top: 28px;
  padding: 28px 32px;
  background: var(--ink);
  color: white;
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.spec-demo .comparison.show {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}
.spec-demo .comparison h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0 0 22px;
  color: white;
}
.spec-demo .comparison .rows {
  display: grid;
  grid-template-columns: 220px 1fr 1fr;
  gap: 14px 32px;
  font-family: var(--mono);
  font-size: 13px;
}
@media (max-width: 760px) {
  .spec-demo .comparison .rows { grid-template-columns: 1fr; }
}
.spec-demo .comparison .rh {
  color: var(--accent-soft);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.18);
}
.spec-demo .comparison .rk {
  color: #94a3b8;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.1);
}
.spec-demo .comparison .rv {
  padding: 14px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.1);
}
.spec-demo .comparison .rv.bad { color: #fca5a5; }
.spec-demo .comparison .rv.good { color: #86efac; }
