/* /product: the feature index. Seven groups, each with a working fragment,
   the two screens, where the model may act, and where it fits. */

/* ── the groups: a fragment of each surface, filterable by stage ── */
.feats { margin-top: 36px; }
.feats__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.feat { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 18px 20px 22px; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--card); overflow: hidden; }
.feat--forms, .feat--integrity { grid-column: span 2; }
.feat__fig { display: grid; gap: 6px; align-content: start; min-height: 112px; padding: 12px; border: 1px solid var(--edge); border-radius: 12px; background: linear-gradient(180deg, rgba(16, 28, 44, 0.92), rgba(9, 14, 22, 0.96)); font-size: 12px; color: rgba(255, 255, 255, 0.84); }
.feat__key { margin: 18px 0 0; font: 500 10px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: #9fd8ff; }
.feat h3 { margin: 8px 0 0; font: 500 22px/1.2 var(--font-display); letter-spacing: -0.01em; color: var(--fg); }
.feat > p:not(.feat__key) { margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.feat ul { display: grid; gap: 6px; margin: auto 0 0; padding: 14px 0 0; list-style: none; }
.feat ul::before { content: ""; display: block; height: 1px; margin-bottom: 8px; background: var(--line-soft); }
.feat li { position: relative; padding-left: 16px; font-size: 13px; line-height: 1.5; color: rgba(236, 239, 244, 0.78); }
.feat li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 7px; height: 1px; background: #5cc8ff; }

.ff-tabs, .ff-outs, .ff-fmts { display: flex; flex-wrap: wrap; gap: 4px; }
.ff-tabs i, .ff-chips i, .ff-outs i, .ff-fmts i { padding: 4px 8px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 6px; font: 500 9.5px var(--font-mono); font-style: normal; letter-spacing: 0.06em; color: var(--label); }
.ff-tabs i.is-on { border-color: rgba(92, 200, 255, 0.5); background: rgba(92, 200, 255, 0.12); color: #fff; }
.ff-fmts i { color: #fff; }
.ff-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 7px 10px; border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 8px; background: rgba(255, 255, 255, 0.025); }
.ff-line b { flex: none; font-size: 12px; font-weight: 500; color: #fff; }
.ff-line em { min-width: 0; overflow: hidden; font: 500 9px var(--font-mono); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); }
.ff-line em.calc { color: #b6f6ff; }
.ff-line em.ok { color: var(--live); }
.ff-chips { display: flex; gap: 6px; }
.ff-chips i { flex: 1; padding: 9px 4px; border-color: rgba(92, 200, 255, 0.35); background: rgba(92, 200, 255, 0.06); color: #fff; text-align: center; }
.ff-msg { justify-self: start; max-width: 88%; padding: 6px 10px; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 10px 10px 10px 2px; background: rgba(255, 255, 255, 0.03); font-size: 11.5px; line-height: 1.4; }
.ff-msg b { margin-right: 6px; font: 600 9px var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: #ff8a82; }
.ff-msg--site { justify-self: end; border-radius: 10px 10px 2px 10px; }
.ff-msg--site b { color: #9fd8ff; }
.ff-msg--ok b { color: var(--live); }
.ff-arms { display: grid; gap: 7px; padding: 4px 0; }
.ff-arms > span { display: flex; align-items: center; gap: 7px; }
.ff-arms b { width: 48px; font: 500 9.5px var(--font-mono); letter-spacing: 0.06em; color: var(--label); }
.ff-arms i { width: 14px; height: 14px; border-radius: 50%; background: #5cc8ff; box-shadow: 0 0 8px rgba(92, 200, 255, 0.6); }
.ff-arms > span + span i { background: #b6f6ff; box-shadow: 0 0 8px rgba(182, 246, 255, 0.5); }
.ff-src { padding: 8px 10px; border: 1px dashed rgba(255, 255, 255, 0.16); border-radius: 8px; background: rgba(255, 255, 255, 0.02); font: 500 11px var(--font-mono); color: var(--muted); }
.ff-src mark { padding: 0 3px; border-radius: 3px; background: rgba(92, 200, 255, 0.22); color: #fff; }
.ff-arrow { justify-self: start; width: 1px; height: 12px; margin-left: 46px; background: #5cc8ff; box-shadow: 0 0 6px #5cc8ff; }
.ff-lock { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.ff-lock i { position: relative; padding: 16px 2px 2px; font: 500 8.5px var(--font-mono); font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; color: var(--label); }
.ff-lock i::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 4px; border-radius: 99px; background: linear-gradient(90deg, #1a7dff, #5cc8ff); transform-origin: left; }
.ff-lock i:last-child::before { background: linear-gradient(90deg, #5cc8ff, var(--live)); }

/* Each fragment assembles once, when its card arrives. */
.feat.is-in .feat__fig > * { animation: kitIn 520ms var(--ease-out) both; animation-delay: calc(var(--d, 0ms) + 260ms); }
.feat.is-in .feat__fig > :nth-child(2) { animation-delay: calc(var(--d, 0ms) + 400ms); }
.feat.is-in .feat__fig > :nth-child(3) { animation-delay: calc(var(--d, 0ms) + 540ms); }
.feat.is-in .ff-lock i::before { animation: lockFill 420ms var(--ease-out) both; animation-delay: calc(var(--d, 0ms) + 500ms); }
.feat.is-in .ff-lock i:nth-child(2)::before { animation-delay: calc(var(--d, 0ms) + 760ms); }
.feat.is-in .ff-lock i:nth-child(3)::before { animation-delay: calc(var(--d, 0ms) + 1020ms); }
.feat.is-in .ff-lock i:nth-child(4)::before { animation-delay: calc(var(--d, 0ms) + 1280ms); }
.feat.is-in .ff-lock i:nth-child(5)::before { animation-delay: calc(var(--d, 0ms) + 1540ms); }
.feat.is-in .ff-arms i { animation: armPop 420ms var(--ease-out) both; animation-delay: calc(var(--d, 0ms) + 420ms); }
.feat.is-in .ff-arms > span + span i { animation-delay: calc(var(--d, 0ms) + 560ms); }
.feat.is-in .ff-arms i:nth-of-type(2) { animation-delay: calc(var(--d, 0ms) + 700ms); }
.feat.is-in .ff-arms > span + span i:nth-of-type(2) { animation-delay: calc(var(--d, 0ms) + 840ms); }
.feat.is-in .ff-arms i:nth-of-type(3) { animation-delay: calc(var(--d, 0ms) + 980ms); }
.feat.is-in .ff-arms > span + span i:nth-of-type(3) { animation-delay: calc(var(--d, 0ms) + 1120ms); }
.feat.is-in .ff-arms i:nth-of-type(4) { animation-delay: calc(var(--d, 0ms) + 1260ms); }
.feat.is-in .ff-arms > span + span i:nth-of-type(4) { animation-delay: calc(var(--d, 0ms) + 1400ms); }
@keyframes lockFill { from { transform: scaleX(0); } to { transform: none; } }
@keyframes armPop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }

/* ── where the model may act: four gated lanes and a wall ── */
.gates { margin-top: 44px; }
.gates__lane { display: grid; grid-template-columns: 124px minmax(0, 1fr) 118px; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.gates__lane:last-child { border-bottom: 0; }
.gates__lane > b { font: 500 11px var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); }
.gates__track { position: relative; height: 34px; border-radius: 99px; background: linear-gradient(90deg, rgba(92, 200, 255, 0.1), rgba(92, 200, 255, 0.02)); }
.gates__gate { position: absolute; right: 0; top: 0; bottom: 0; display: flex; align-items: center; padding: 0 12px; border: 1px solid rgba(110, 231, 183, 0.45); border-radius: 99px; background: rgba(110, 231, 183, 0.08); font: 500 10px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; color: var(--live); }
.gates__lane--wall .gates__gate { border-color: rgba(255, 69, 58, 0.5); background: rgba(255, 69, 58, 0.1); color: #ff8a82; }
.gates__lane--wall > b { color: #ff8a82; }
.gates .gates__run { position: absolute; inset: 0; transform: translateX(calc(100% - 252px)); pointer-events: none; }
.gates .gates__run[data-at] { transition: transform 1.3s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.3s ease; }
.gates.is-armed .gates__run[data-at]:not(.is-on) { opacity: 1; transform: translateX(0); transition: none; }
.gates__run i { position: absolute; left: 5px; top: 5px; bottom: 5px; display: flex; align-items: center; padding: 0 10px; border: 1px solid rgba(92, 200, 255, 0.6); border-radius: 99px; background: rgba(13, 38, 60, 0.96); box-shadow: 0 0 16px rgba(92, 200, 255, 0.5); font: 500 9.5px var(--font-mono); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; color: #fff; }
.gates.is-armed .gates__lane--wall .gates__run.is-on i { animation: gateBump 420ms ease-out 1.3s both; }
@keyframes gateBump { 0% { transform: none; } 35% { transform: translateX(6px); } 100% { transform: translateX(-4px); } }
.gates__lane > em { font: 600 10px var(--font-mono); font-style: normal; letter-spacing: 0.1em; text-transform: uppercase; color: var(--live); }
.gates__lane--wall > em { color: #ff8a82; }
.gates__notes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 28px 0 0; padding: 0; list-style: none; }
.gates__notes li { padding-top: 14px; border-top: 1px solid var(--line); }
.gates__notes b { display: block; font: 500 19px var(--font-display); color: var(--fg); }
.gates__notes span { display: block; margin-top: 6px; font-size: 13.5px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }

/* ── fit: a spectrum from strong fit to not us ── */
.fit { position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px 18px; margin-top: 44px; padding-top: 30px; }
.fit__line { position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--live), #5cc8ff 55%, rgba(236, 239, 244, 0.25)); transform-origin: left; }
.fit .fit__line[data-at] { transition: transform 1.6s var(--ease-out); }
.fit.is-armed .fit__line[data-at]:not(.is-on) { opacity: 1; transform: scaleX(0); }
.fit__col { display: grid; gap: 12px; align-content: start; min-width: 0; }
.fit__col > .kit-state { justify-self: start; }
.fit article { position: relative; padding: 20px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--card); overflow: hidden; }
.fit__col:nth-child(4) article { border-style: dashed; background: transparent; }
.fit h3 { margin: 0; font: 500 20px/1.25 var(--font-display); color: var(--fg); text-wrap: balance; }
.fit article p { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.fit__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 18px 0 0; padding: 18px 20px; border: 1px solid rgba(92, 200, 255, 0.3); border-radius: 14px; background: rgba(92, 200, 255, 0.05); }
.fit__price b { font: 500 10.5px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: #9fd8ff; }
.fit__price span { font-size: 14.5px; line-height: 1.6; color: var(--fg); }

@media (max-width: 980px) {
  .feats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat--export { grid-column: span 2; }
  .gates__notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fit { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .feats__grid { grid-template-columns: 1fr; }
  .feat--forms, .feat--integrity, .feat--export { grid-column: auto; }
  .gates__lane { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px 0; }
  .gates__lane > b { grid-column: 1; grid-row: 1; }
  .gates__lane > em { grid-column: 2; grid-row: 1; text-align: right; }
  .gates__track { grid-column: 1 / -1; }
  .gates .gates__run { transform: translateX(calc(100% - 236px)); }
  .gates__gate { padding: 0 10px; font-size: 9px; }
  .gates__notes { grid-template-columns: 1fr; }
}
html[data-motion="paused"] .feat *, html[data-motion="paused"] .feat *::before { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .feat *, .feat *::before { animation: none; }
  .gates .gates__run[data-at] { transition: none; }
}

/* ══ The page's own world: the manual's index. Display-size serif entries,
   dotted leaders, italic section heads under double rules, nothing behind
   the type. ══ */
.page-index { --rule: rgba(255, 255, 255, 0.16); }

/* the hero: title and lede on one line, the index beneath at full width */
.index-hero { padding: 136px 0 80px; }
.index-hero__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 24px 64px; align-items: end; }
.index-hero .page-title { max-width: none; font-size: clamp(44px, 5.4vw, 80px); }
.index-hero .page-lede { margin-top: 0; }
.mindex { margin: 56px 0 0; border-top: 3px double var(--rule); }
.mindex ol { margin: 0; padding: 0; list-style: none; }
.mindex li { border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.mindex a { display: grid; grid-template-columns: 52px auto minmax(40px, 1fr) auto 32px; align-items: baseline; gap: 18px; padding: 14px 4px 12px; color: var(--fg); transition: background-color 200ms ease; }
.mindex__n { font: 500 12px var(--font-mono); color: var(--label); }
.mindex b { font: 400 clamp(30px, 3.4vw, 50px)/1.05 var(--font-display); letter-spacing: -0.015em; color: #fff; transition: color 200ms ease; }
.mindex__dots { align-self: end; height: 1px; margin-bottom: 0.55em; background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 1px, transparent 1.4px) 0 0 / 9px 2px repeat-x; transform-origin: left; transition: transform 500ms var(--ease-out); }
.mindex small { font: italic 400 18px var(--font-display); color: var(--muted); }
.mindex__go { font: 400 18px var(--font-ui); color: var(--label); transition: transform 200ms var(--ease-out), color 200ms ease; }
.mindex a:hover, .mindex a:focus-visible { background: rgba(255, 255, 255, 0.03); outline: none; }
.mindex a:hover b, .mindex a:focus-visible b { color: var(--accent); }
.mindex a:hover .mindex__go, .mindex a:focus-visible .mindex__go { color: var(--accent); transform: translateY(3px); }
.mindex a:focus-visible { box-shadow: inset 0 0 0 1px #9fd8ff; }
.mindex.is-armed li[data-at]:not(.is-on) .mindex__dots { transform: scaleX(0); }

/* sections open like a book: double rule, italic head */
.page-index .section-head { max-width: none; padding-top: 22px; border-top: 3px double var(--rule); }
.page-index .section-head > * { max-width: 760px; }
.page-index .section-head .kicker { font: italic 400 18px var(--font-display); letter-spacing: 0; text-transform: none; color: #cfd6e0; }
.page-index .feat { scroll-margin-top: 100px; }
.page-index .feat:target { border-color: rgba(92, 200, 255, 0.6); box-shadow: 0 0 0 1px rgba(92, 200, 255, 0.3); }

@media (max-width: 980px) {
  .index-hero__top { grid-template-columns: 1fr; }
  .mindex a { grid-template-columns: 40px auto minmax(24px, 1fr) auto; }
  .mindex__go { display: none; }
}
@media (max-width: 640px) {
  .index-hero { padding-top: 112px; }
  .mindex a { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; padding: 12px 2px; }
  .mindex__dots { display: none; }
  .mindex b { font-size: 25px; }
  .mindex small { font-size: 14px; }
}
