/* Alacrán website v6: calm, light, one accent. See DESIGN.md. */
@font-face { font-family: "Onest"; src: url("/fonts/onest.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrainsmono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #f4f2ee;
  --sheet: #ffffff;
  --text: #17181c;
  --text-2: #4a4c55;
  --text-3: #5c5e67;
  --rule: #e3dfd7;
  --rule-2: #d2cdc2;
  --red: #d6202f;
  --red-hover: #b61a28;
  --marker: #a81424;
  --red-wash: #fbe9eb;
  --ink-dark: #17181c;
  --sans: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --r: 10px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(23, 24, 28, .05), 0 8px 24px -8px rgba(23, 24, 28, .12);
  --wrap: 1200px;
  --gut: clamp(20px, 4vw, 48px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scrollbar-color: var(--rule-2) var(--bg); scrollbar-width: thin; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.6 var(--sans); 
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .22em; }
a:hover { text-decoration-color: currentColor; }
::selection { background: var(--red-wash); color: var(--marker); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }
code, kbd { font-family: var(--mono); font-size: .88em; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
strong { font-weight: 600; }
table { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--text); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gut) * 2); margin-inline: auto; padding-inline: var(--gut); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border-radius: var(--r);
  font: 500 .98rem/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid var(--rule-2); background: var(--sheet); color: var(--text);
  transition: background-color .2s, border-color .2s, transform .35s var(--ease), box-shadow .2s;
}
.btn:hover { border-color: var(--text-3); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hover); border-color: var(--red-hover); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.caret { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .3s var(--ease); }
details[open] > summary .caret { transform: translateY(1px) rotate(-135deg); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color .25s, background-color .25s; }
.nav.is-scrolled { border-bottom-color: var(--rule); background: color-mix(in srgb, var(--bg) 92%, #fff); }
.nav-in { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; font-size: 1.28rem; letter-spacing: -.02em; }
.brand img { width: 34px; height: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav-links > a, .guides > summary { padding: 8px 12px; border-radius: 8px; text-decoration: none; font-size: .96rem; color: var(--text-2); cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.guides > summary::-webkit-details-marker, .dl > summary::-webkit-details-marker { display: none; }
.nav-links > a:hover, .guides > summary:hover { color: var(--text); background: rgba(23, 24, 28, .05); }
.nav-links a[aria-current="page"], .guides > summary.is-current { color: var(--text); }
.guides, .dl { position: relative; }
.menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px; background: var(--sheet); color: var(--text); border: 1px solid var(--rule); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); display: grid; gap: 2px; z-index: 60; }
.menu a { display: grid; gap: 1px; padding: 10px 12px; border-radius: 8px; text-decoration: none; }
.menu a:hover { background: var(--bg); }
.menu small { color: var(--text-3); font-size: .84rem; }
.menu .tag { display: none; }
.dl-nav { margin-left: auto; }
.dl-nav .menu { left: auto; right: 0; }
.dl-nav > summary { min-height: 42px; padding: 0 18px; }
.dl .menu a { grid-template-columns: 1fr auto; align-items: baseline; }
.dl .menu a strong { font-weight: 500; }
.dl .menu a small { grid-column: 1; }
.dl .menu a .tag { display: inline; grid-column: 2; grid-row: 1 / span 2; font: 500 .78rem var(--mono); color: var(--text-3); }
.dl .menu .menu-foot { display: block; border-top: 1px solid var(--rule); border-radius: 0 0 8px 8px; margin-top: 4px; padding-top: 12px; color: var(--text-2); font-size: .92rem; }
.nav-toggle { display: none; margin-left: 8px; width: 44px; height: 44px; border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--sheet); cursor: pointer; padding: 0; position: relative; }
.nav-toggle span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--text); transition: transform .3s var(--ease); }
.nav-toggle span:first-child { top: 18px; } .nav-toggle span:last-child { top: 25px; }
.nav.open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav.open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- hero (home) ---------- */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(24px, 4vw, 56px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 48px); align-items: center; }
.hero h1 { font-weight: 300; font-size: clamp(2.4rem, 4.2vw, 3.85rem); line-height: 1.06; letter-spacing: -.036em; max-width: 11.5em; }
.hero .lede { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; color: var(--text-2); max-width: 31em; margin: 28px 0 0; }
.hero .actions { margin-top: 36px; }
.hero .fine { margin: 20px 0 0; font-size: .92rem; color: var(--text-3); max-width: 42ch; }
.hero-art { position: relative; }
.art { width: 100%; height: auto; overflow: visible; }
.art-pause { position: absolute; right: 0; bottom: -4px; font: 500 .82rem var(--sans); color: var(--text-3); background: none; border: 0; padding: 6px 4px; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; text-decoration-color: var(--rule-2); }
.art-pause:hover { color: var(--text); }
.art .t-label { font: 600 15px var(--sans); letter-spacing: -.01em; }
.art .t-mono { font: 500 11px var(--mono); }

/* hero motion: slabs build once, then one 10s loop: task in, draft, approve, saved */
.art .slab { animation: rise .95s var(--ease) both; animation-delay: calc(var(--i) * 110ms); }
@keyframes rise { from { opacity: 0; transform: translateY(46px); } to { opacity: 1; transform: none; } }
.art .drift { transition: transform .5s var(--ease); transform: translate(calc(var(--px, 0) * 7px), calc(var(--py, 0) * 5px)); }
.art .flow { fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 5 11; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -16; } }
.art .flow-out { opacity: 0; animation: dash 1s linear infinite, outvis 10s infinite; }
@keyframes outvis { 0%, 64% { opacity: 0; } 70%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }
.art .chip { animation: chipvis 10s infinite; }
@keyframes chipvis { 0%, 3% { opacity: 0; } 7%, 32% { opacity: 1; } 36%, 100% { opacity: 0; } }
.art .glow { opacity: 0; animation: glow 10s infinite; }
@keyframes glow { 0%, 33% { opacity: 0; } 38% { opacity: .5; } 46%, 100% { opacity: 0; } }
.art .card { animation: card 10s var(--ease) infinite; }
@keyframes card { 0%, 38% { opacity: 0; transform: translateY(16px); } 45%, 91% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: translateY(-6px); } }
.art .stamp { transform-box: fill-box; transform-origin: center; animation: stamp 10s var(--ease) infinite; }
@keyframes stamp { 0%, 59% { opacity: 0; transform: scale(1.8) rotate(-16deg); } 64% { opacity: 1; transform: scale(1) rotate(-9deg); } 91% { opacity: 1; transform: scale(1) rotate(-9deg); } 97%, 100% { opacity: 0; transform: scale(1) rotate(-9deg); } }
.art .approve { animation: approve 10s infinite; }
@keyframes approve { 0%, 54% { fill: var(--red); } 57%, 62% { fill: var(--red-hover); } 66%, 100% { fill: var(--red); } }
.art .saved { opacity: 0; animation: outvis 10s infinite; }

/* ---------- sections ---------- */
.sec { padding: clamp(56px, 8vw, 112px) 0; }
.sec + .sec { border-top: 1px solid var(--rule); }
.sec h2, .page-h2 { font-weight: 300; font-size: clamp(1.9rem, 3.7vw, 3.1rem); line-height: 1.08; letter-spacing: -.032em; max-width: 20ch; }
.sec .lede, .lede { font-size: 1.18rem; line-height: 1.55; color: var(--text-2); max-width: 38em; margin-top: 20px; }
.sec-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head p { font-size: 1.18rem; line-height: 1.55; color: var(--text-2); max-width: 38em; margin: 20px 0 0; }
.js .reveal { transition-delay: calc(var(--i, 0) * 80ms); }
.tail { padding-bottom: clamp(40px, 6vw, 80px); }
.prose-tail + .prose-tail { margin-top: 56px; }
.prose-tail .page-h2 { margin-bottom: 18px; }
.more { margin: 22px 0 0; }
.go { display: inline-flex; gap: 8px; align-items: baseline; font-weight: 500; text-decoration: none; color: var(--marker); }
.go span { transition: transform .35s var(--ease); }
.go:hover span { transform: translateX(4px); }
.go:hover { text-decoration: underline; text-underline-offset: .22em; }

/* tour */
.tabs { position: relative; display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); margin-bottom: 28px; }
.tabs button { position: relative; padding: 12px 18px 14px; border: 0; background: none; font: 500 1rem var(--sans); color: var(--text-3); cursor: pointer; border-radius: 8px 8px 0 0; transition: color .2s; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; }
.tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.tabs.playing button[aria-selected="true"]::after { animation: progress var(--dur, 7s) linear forwards; }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.shot-frame { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.shot-frame .bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--rule); background: #faf9f6; }
.shot-frame .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule-2); }
.shot-frame .bar span { margin-left: 10px; font-size: .84rem; color: var(--text-3); }
.shot-frame img { width: 100%; }
.shot { margin: 0; }
.tour-panel[hidden] { display: none; }
.tour-panel { animation: fadein .6s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tour-cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding: 18px 20px 20px; }
.tour-cap p { margin: 0; }
.shot-foot { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; font-size: .9rem; color: var(--text-3); margin: 0; }
figcaption.shot-foot { padding: 14px 4px 0; }
.disclosure { color: var(--text-3); }
.zoom { font: 500 .9rem var(--sans); color: var(--marker); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .22em; }
.zoom:hover { color: var(--red-hover); }

/* features: four plain columns */
.feat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 40px); }
.feat article { border-top: 1px solid var(--text); padding-top: 22px; }
.feat h3 { font-weight: 500; font-size: 1.22rem; line-height: 1.25; letter-spacing: -.015em; margin-bottom: 12px; }
.feat p { color: var(--text-2); margin: 0; }
.feat.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* scenarios: a real situation, what you ask, what you get, how you stay in control */
.scn-list { list-style: none; margin: 0; padding: 0; counter-reset: scn; border-bottom: 1px solid var(--rule); }
.scn { counter-increment: scn; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.5fr); gap: 16px clamp(20px, 4vw, 56px); padding: 36px 0; border-top: 1px solid var(--rule); }
.scn h3 { font-weight: 300; font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -.028em; line-height: 1.12; }
.scn h3::before { content: counter(scn); display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 14px; border-radius: 50%; border: 1px solid var(--text); font: 500 .85rem var(--sans); letter-spacing: 0; }
.scn-body p { color: var(--text-2); max-width: 46em; }
.scn-body .lab span { color: var(--text); }
.scn-body .disclosure { font: 500 .78rem var(--mono); margin-bottom: 14px; }
.scn-body .prompt { margin: 0 0 .9em; }

/* departments: quiet list rows */
.dept-list { border-bottom: 1px solid var(--rule); }
.dept-row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.5fr) 15rem; gap: 16px clamp(20px, 4vw, 56px); align-items: baseline; padding: 30px 0; border-top: 1px solid var(--rule); }
.dept-row .more { justify-self: end; }
.dept-row h3 { font-weight: 300; font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.028em; line-height: 1.1; }
.dept-row p { margin: 0; color: var(--text-2); max-width: 46ch; }
.dept-row .more { margin: 0; white-space: nowrap; }

/* how it works */
.how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); counter-reset: s; position: relative; }
.how article { position: relative; padding-top: 36px; border-top: 1px solid var(--rule-2); }
.how article::before { counter-increment: s; content: counter(s); position: absolute; top: -15px; left: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); border: 1px solid var(--text); display: grid; place-items: center; font: 500 .85rem var(--sans); }
.how h3 { font-weight: 500; font-size: 1.2rem; line-height: 1.25; letter-spacing: -.015em; margin-bottom: 10px; }
.how p { color: var(--text-2); margin: 0; }
.how-more { margin-top: 40px; }

/* split rows with a small visual */
.split-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.split-row.flip .split-vis { order: -1; }
.split-copy p { color: var(--text-2); max-width: 36em; }
.split-copy h2 { margin-bottom: 22px; }
.vis { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow); min-height: 280px; display: grid; align-content: center; gap: 10px; }
.vis small { font: 500 .78rem var(--mono); color: var(--text-3); }
.file { display: flex; gap: 14px; align-items: baseline; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--bg); font: 500 .92rem var(--mono); }
.file span { margin-left: auto; font: 400 .85rem var(--sans); color: var(--text-3); }
.commit { margin-top: 8px; padding: 12px 14px; border-radius: 8px; background: var(--red-wash); color: var(--marker); font-size: .92rem; }
.space { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 10px; color: var(--text-3); transition: border-color .5s var(--ease), background-color .5s var(--ease), color .5s, transform .6s var(--ease); }
.space b { font-weight: 500; }
.space.on { border-color: var(--red); background: var(--red-wash); color: var(--text); transform: translateX(8px); }
.agents { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.agents li { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border: 1px solid var(--rule); border-radius: 10px; color: var(--text-3); font-weight: 500; transition: border-color .5s var(--ease), background-color .5s var(--ease), color .5s, transform .6s var(--ease); }
.agents li.on { border-color: var(--red); background: var(--red-wash); color: var(--text); transform: translateX(8px); }
.bi { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.faq-grid .sec-head { position: sticky; top: 104px; margin: 0; }
.faq { border-bottom: 1px solid var(--rule); }
.faq details { border-top: 1px solid var(--rule); }
.faq summary { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 22px 0; cursor: pointer; font-weight: 500; font-size: 1.1rem; letter-spacing: -.01em; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--marker); }
.plus { position: relative; flex: none; width: 14px; height: 14px; }
.plus::before, .plus::after { content: ""; position: absolute; background: currentColor; transition: transform .35s var(--ease); }
.plus::before { left: 0; right: 0; top: 6.25px; height: 1.5px; }
.plus::after { top: 0; bottom: 0; left: 6.25px; width: 1.5px; }
details[open] > summary .plus::after { transform: scaleY(0); }
.faq-a { padding: 0 40px 22px 0; color: var(--text-2); max-width: 62ch; }
.faq-a p:last-child { margin-bottom: 0; }

/* closing call to action */
.cta { padding: 0 0 clamp(56px, 8vw, 112px); }
.cta + * { border-top: 0; }
.cta-card { background: var(--ink-dark); color: #fff; border-radius: 24px; padding: clamp(40px, 7vw, 96px) clamp(24px, 6vw, 80px); position: relative; isolation: isolate; }
/* The card does not clip, so the download menu can open in it. Only the decorative scorpion is clipped, in its own box. */
.cta-art { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; pointer-events: none; }
.cta .actions { align-items: flex-start; }
.cta .dl > summary { min-width: 232px; } /* wide enough that the open menu keeps "Read the setup guide" on one line */
.cta .dl .menu { position: static; width: 0; min-width: 100%; margin-top: 10px; box-shadow: none; scroll-margin: 90px 0 24px; } /* as wide as the button, so opening it does not push its neighbour away */
.cta-card h2 { font-weight: 300; font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.04; letter-spacing: -.034em; max-width: 16ch; color: #fff; }
.cta-card p { color: rgba(255, 255, 255, .78); max-width: 34em; font-size: 1.14rem; margin-top: 20px; }
.cta-card .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.cta-card .btn-ghost:hover { border-color: #fff; }
.cta-card .go { color: #fff; }
.cta-mark { position: absolute; right: clamp(-40px, 2vw, 40px); bottom: -8%; width: clamp(160px, 28vw, 380px); opacity: .09; pointer-events: none; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule); padding: 56px 0 40px; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 48px; }
.foot-brand p { color: var(--text-2); max-width: 30em; margin: 16px 0 0; }
.foot-brand .foot-tag { color: var(--text); font-weight: 500; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.foot-cols h2 { font: 600 .84rem var(--sans); color: var(--text-3); margin-bottom: 14px; letter-spacing: .01em; }
.foot-cols a, .foot-dl a { display: block; padding: 5px 0; text-decoration: none; color: var(--text-2); font-size: .96rem; }
.foot-cols a:hover, .foot-dl a:hover { color: var(--text); text-decoration: underline; }
.foot-dl { margin-top: 24px; }
.foot-dl h2 { font: 600 .84rem var(--sans); color: var(--text-3); margin-bottom: 10px; letter-spacing: .01em; }
.foot-dl a { display: flex; gap: 8px; align-items: baseline; }
.foot-dl strong { font-weight: 500; color: var(--text); }
.foot-dl small, .foot-dl .tag { color: var(--text-3); font-size: .88rem; }
.foot-dl .menu-foot { color: var(--marker); }
.foot-base { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: baseline; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: .9rem; color: var(--text-3); }
.foot-base p { margin: 0; }
.foot-base button { font: inherit; color: var(--text-3); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.foot-base button:hover, .foot-base a:hover { color: var(--text); }

/* ---------- inner pages ---------- */
.phead { padding: clamp(40px, 6vw, 80px) 0 clamp(28px, 4vw, 48px); }
.phead h1 { font-weight: 300; font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.04; letter-spacing: -.036em; max-width: 18ch; }
.phead .lede { margin-top: 22px; }
.phead p:not(.lede):not(.crumb):not(.meta) { color: var(--text-2); max-width: 42em; }
.crumb { margin: 0 0 20px; font-size: .92rem; color: var(--text-3); }
.crumb a { color: var(--text-3); }
.meta { margin: 18px 0 0; color: var(--text-3); font-size: .95rem; }
.phead .actions { margin-top: 28px; }
.dept-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }

.docs { display: grid; grid-template-columns: 232px minmax(0, 1fr) 196px; gap: clamp(28px, 4vw, 64px); padding-bottom: clamp(56px, 8vw, 112px); align-items: start; }
.docs.no-toc { grid-template-columns: 232px minmax(0, 1fr); }
.side, .toc { position: sticky; top: 96px; font-size: .94rem; max-height: calc(100vh - 120px); overflow: auto; }
.side h2, .toc h2 { font: 600 .84rem var(--sans); color: var(--text); margin: 0 0 10px; }
.side ul, .toc ul { list-style: none; margin: 0 0 28px; padding: 0; }
.side a, .toc a { display: block; padding: 6px 10px; margin-left: -10px; border-radius: 6px; text-decoration: none; color: var(--text-2); line-height: 1.35; }
.side a:hover, .toc a:hover { color: var(--text); background: rgba(23, 24, 28, .05); }
.side a[aria-current="page"] { color: var(--marker); background: var(--red-wash); font-weight: 500; }
.toc li.on a { color: var(--marker); font-weight: 500; }
.prose { min-width: 0; max-width: 72ch; }
.prose > section { padding-top: 8px; scroll-margin-top: 96px; }
.prose h2 { font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 1.95rem); line-height: 1.15; letter-spacing: -.024em; margin: 56px 0 18px; scroll-margin-top: 96px; }
.prose section:first-child h2 { margin-top: 0; }
.prose h3 { font-weight: 600; font-size: 1.1rem; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--text-2); }
.prose p strong, .prose li strong { color: var(--text); }
.prose ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose a { color: var(--marker); }
.prose code { background: rgba(23, 24, 28, .06); border-radius: 5px; padding: .1em .35em; }
.steps { padding-left: 0; list-style: none; counter-reset: st; margin: 0 0 1.4em; display: grid; gap: 12px; }
.steps li { counter-increment: st; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; align-items: start; margin: 0; }
.steps li::before { content: counter(st); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--text); font: 500 .82rem var(--sans); color: var(--text); margin-top: 1px; }
.lab { margin: 0 0 .9em; }
.lab span { font-weight: 600; color: var(--text); }
.lab span::after { content: ":"; }
.prompt { margin: 22px 0; padding: 20px 22px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); }
.prompt figcaption { font: 500 .78rem var(--mono); color: var(--text-3); margin-bottom: 10px; }
.prompt blockquote { margin: 0; }
.prompt p { margin: 0; color: var(--text); font-size: 1.02rem; }
.prompt p + p { margin-top: .6em; }
.prose .shot { margin: 28px 0 8px; }
.next { display: grid; gap: 10px; margin-top: 16px; }
.next-card { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); text-decoration: none; font-weight: 500; transition: border-color .2s, transform .35s var(--ease); }
.next-card:hover { border-color: var(--text); transform: translateX(4px); }
.cards { display: grid; gap: 14px; margin: 18px 0; }
.cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 22px; }
.card h3 { margin-top: 0; }
.card .num { display: none; }
.card > :last-child { margin-bottom: 0; }
.prose .cards.cols-2, .prose .cards.cols-3 { grid-template-columns: 1fr; }

/* catalogue table */
.table-wrap { overflow-x: auto; margin: 18px 0 26px; }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: .96rem; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-top: 1px solid var(--rule); }
.table-wrap thead th { font: 600 .84rem var(--sans); color: var(--text-3); border-top: 0; padding-top: 0; }
.table-wrap tbody th { font-weight: 500; color: var(--text); width: 28%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--rule-2); border-radius: 999px; background: var(--sheet); font-size: .88rem; color: var(--text-2); }
.chips .bi { width: 16px; height: 16px; }

/* starter packs */
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-bottom: 24px; }
.pack { display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 28px; transition: border-color .25s, transform .5s var(--ease), box-shadow .3s; }
.pack:hover { border-color: var(--rule-2); transform: translateY(-3px); box-shadow: var(--shadow); }
.pack h2 { font-weight: 400; font-size: 1.5rem; letter-spacing: -.024em; line-height: 1.15; margin-bottom: 14px; max-width: none; }
.pack p { color: var(--text-2); }
.pack p strong { color: var(--text); font-weight: 500; display: block; font-size: 1.02rem; }
.pack .prompt { margin: auto 0 0; background: var(--bg); border-color: transparent; }
.pack .prompt p { font-size: .95rem; }

/* use cases */
.cases { padding-bottom: clamp(40px, 6vw, 80px); }
.case { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(24px, 5vw, 80px); padding: 44px 0; border-top: 1px solid var(--rule); scroll-margin-top: 90px; }
.case h2 { font-weight: 300; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.1; letter-spacing: -.03em; max-width: 14ch; }
.case-body p { color: var(--text-2); }
.case-body .lab span { color: var(--text); }
.case-body .prompt { margin-top: 0; }

/* dialogs */
dialog { border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 0; background: var(--sheet); color: var(--text); box-shadow: 0 30px 80px -20px rgba(23, 24, 28, .35); max-width: min(960px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(23, 24, 28, .5); }
.viewer-bar { display: flex; justify-content: flex-end; padding: 12px; margin: 0; }
.viewer img { max-height: 80vh; width: auto; margin: 0 auto; }
.mac-help { max-width: 640px; }
.mac-body { padding: 8px 32px 32px; }
.mac-body h2 { font-weight: 400; font-size: 1.6rem; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 14px; }
.mac-steps { padding-left: 1.2em; color: var(--text-2); }
.mac-steps li { margin: 14px 0; }
.mac-steps li b { color: var(--text); }
.cmd { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 10px; background: var(--bg); border: 1px solid var(--rule); border-radius: 10px; }
.cmd code { flex: 1 1 200px; min-width: 0; white-space: nowrap; overflow-x: auto; padding: 4px 6px; } /* one line, scrolls sideways; never breaks inside the command */
.fine { font-size: .92rem; color: var(--text-3); }

/* ---------- motion: reveals ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); filter: blur(5px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .04em .16em 0; margin-bottom: -.16em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(108%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 55ms); }
.js [data-split].in .w > span { transform: none; }
html[data-motion="off"] .tabs * { animation-play-state: paused !important; }
/* paused by the visitor: show the settled end of the story, never an arbitrary frame */
html[data-motion="off"] .art .chip, html[data-motion="off"] .art .glow, html[data-motion="off"] .art .flow { display: none; }
html[data-motion="off"] .art .card, html[data-motion="off"] .art .stamp, html[data-motion="off"] .art .flow-out, html[data-motion="off"] .art .saved,
html[data-motion="off"] .ac-card, html[data-motion="off"] .ac-stamp { opacity: 1; animation: none; transform: none; }
html[data-motion="off"] .art .stamp { transform: rotate(-9deg); }
html[data-motion="off"] .ac-stamp { transform: rotate(-9deg); }
html[data-motion="off"] .art .slab { animation: none; }
.art-card { display: none; }
.btn:focus-visible, summary.btn:focus-visible, .nav-toggle:focus-visible { border-radius: var(--r); }
.sent { display: block; text-wrap: balance; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .feat, .feat.three { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .how { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
  .docs, .docs.no-toc { grid-template-columns: 220px minmax(0, 1fr); }
  .toc { display: none; }
  .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-top { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; margin-left: auto; }
  .dl-nav { margin-left: 0; }
  .nav-in { gap: 12px; flex-wrap: wrap; }
  .nav-links { display: none; order: 5; width: 100%; flex-direction: column; align-items: stretch; margin: 0 0 12px; padding: 8px 0 4px; border-top: 1px solid var(--rule); }
  .nav.open .nav-links { display: flex; }
  .nav-links > a, .guides > summary { padding: 12px 8px; }
  .guides .menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; }
  .hero-grid, .split-row, .faq-grid, .dept-hero { grid-template-columns: 1fr; }
  .split-row.flip .split-vis { order: 0; }
  .faq-grid .sec-head { position: static; }
  .hero h1 { max-width: 14ch; }
  .dept-row { grid-template-columns: 1fr; gap: 10px; padding: 26px 0; }
  .case, .scn { grid-template-columns: 1fr; gap: 18px; }
  .case h2 { max-width: none; }
  .docs, .docs.no-toc { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
  .side ul { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
  .side .grp:not(.cur) { display: none; }
  .side h2 { display: none; }
  .side a { margin-left: 0; border: 1px solid var(--rule); background: var(--sheet); }
}
@media (max-width: 720px) {
  .feat, .feat.three, .how, .cards.cols-2, .cards.cols-3, .packs { grid-template-columns: 1fr; }
  .brand { font-size: 1.15rem; }
  .brand img { width: 30px; }
  .hero { padding-top: 16px; }
  .hero-art { overflow: hidden; }
  .art { width: 128%; max-width: none; margin-left: -6%; }
  .art .card, .art .stamp { display: none; }
  .art .t-label { font-size: 19px; }
  .art .t-mono { font-size: 12px; }
  .art-pause { right: 0; bottom: 0; }
  .hero-art { padding-bottom: 28px; }
  .art-card { display: block; position: relative; margin: 4px 0 8px; }
  .ac-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); animation: card 10s var(--ease) infinite; }
  .ac-card small { display: block; font: 500 .72rem var(--mono); color: var(--text-3); }
  .ac-card b { display: block; margin: 4px 0 10px; font-size: .95rem; }
  .ac-card p { margin: 0 0 6px; padding: 5px 8px; border-radius: 5px; font: 500 .78rem var(--mono); }
  .ac-card .del { background: var(--red-wash); color: var(--marker); }
  .ac-card .add { background: #e6f0e8; color: #1f5a35; }
  .ac-btns { display: flex; gap: 8px; margin-top: 10px; font: 500 .82rem var(--sans); }
  .ac-btns span { padding: 6px 12px; border: 1px solid var(--rule-2); border-radius: 6px; }
  .ac-btns .ac-ok { background: var(--red); border-color: var(--red); color: #fff; }
  .ac-stamp { position: absolute; right: 12px; bottom: -14px; padding: 5px 12px; border: 2px solid var(--marker); border-radius: 4px; background: rgba(255, 255, 255, .92); color: var(--marker); font: 700 1rem var(--sans); letter-spacing: .12em; transform-origin: center; animation: stamp 10s var(--ease) infinite; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs button { white-space: nowrap; }
  .cta-card { border-radius: 18px; }
  .foot { padding-bottom: 104px; } /* room for the fixed Buy Me a Coffee button, so it never covers the last line */
  .cta-mark { display: none; }
  .mac-body { padding: 4px 20px 24px; }
  .prose h2 { margin-top: 44px; }
}
@media (max-width: 480px) {
  .nav-in { gap: 8px; }
  .nav-toggle { margin-left: 0; flex: none; }
  .dl-nav { margin-left: auto; }
  .dl-nav > summary { min-height: 40px; padding: 0 12px; font-size: .9rem; }
  .actions .btn, .actions .dl { width: 100%; }
  .actions .dl > summary { width: 100%; }
  .actions .dl .menu { min-width: 0; width: 100%; }
  .table-wrap tbody th { width: 34%; }
  .faq-a { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .js .reveal, .js [data-split] .w > span { opacity: 1; transform: none; filter: none; }
  .art .chip, .art .flow, .art .glow { display: none; }
  .art .card, .art .stamp, .art .flow-out, .art .saved, .ac-card, .ac-stamp { opacity: 1; animation: none; transform: none; }
  .art .stamp, .ac-stamp { transform: rotate(-9deg); }
  .art .slab { animation: none; }
  .motion-toggle { display: none; }
}
