/* Flows & AI: the navy hero, the four-stage walkthrough (ai.js pins it on wide
   screens and moves between stages), and the details. Example cards are flat
   panels; no AI colour, glow, sparkle or animated border. */
.ai-hero { padding-block: clamp(48px, 5vw, 72px); }
.ai-hero > .wrap { display: grid; gap: 28px; align-items: end; }
.ai-hero h1 { margin: 0; font-size: clamp(38px, 4.8vw, 62px); }
.ai-hero .lede { margin: 0; max-width: 45ch; }
.ai-hero .actions { margin-top: 28px; }
@media (min-width: 960px) { .ai-hero > .wrap { grid-template-columns: 1.15fr 1fr; gap: 72px; } }
@media (max-width: 599px) { .ai-hero .actions .btn { flex: 1 1 100%; } }

/* The walkthrough: four stage tabs whose underline fills as you go, then one
   stage at a time. Without ai.js the four stages simply stack. */
.ai-story { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.ai-story-stage { padding-block: 32px; }
.ai-story-top, .ai-story-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.ai-story-top p { margin: 0; }
.ai-story-top a { flex: none; }
.ai-story-tabs { display: none; gap: 14px; margin: 18px 0 32px; }
.ai-story-tabs button { position: relative; flex: 1; min-height: 44px; padding: 0 0 16px; border: 0; background: transparent; color: var(--ink-3); text-align: left; font: 700 clamp(15px, 1.7vw, 22px)/1.2 var(--font-display); font-stretch: 92%; letter-spacing: -.02em; cursor: pointer; }
.ai-story-tabs button span { display: block; margin: 0 0 6px; font: 650 12.5px/1 var(--font-text); font-stretch: 112.5%; letter-spacing: 0; }
.ai-story-tabs button:hover, .ai-story-tabs button[aria-selected="true"] { color: var(--ink); }
.ai-story-tabs button::before, .ai-story-tabs button::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; border-radius: 2px; }
.ai-story-tabs button::before { right: 0; background: var(--line); }
.ai-story-tabs button::after { width: calc(var(--fill, 0) * 100%); background: var(--brand); }
.ai-story-panel { display: grid; gap: 28px; align-items: center; margin-bottom: 48px; }
.ai-story-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.ai-story-copy > * { margin: 0; }
.ai-story-copy .num { font: 700 40px/40px var(--font-display); letter-spacing: -.02em; font-variation-settings: "opsz" 96; color: var(--ink-3); }
.ai-story-copy h2 { max-width: 14ch; font-size: clamp(30px, 3.4vw, 48px); }
.ai-story-copy .lede { font-size: 18px; line-height: 28px; }
.ai-story-boundary { align-self: stretch; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; color: var(--ink-3); }
.ai-story-bottom { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.ai-story-bottom [data-story-count] { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ai-story.is-ready .ai-story-tabs { display: flex; }
.ai-story.is-ready .ai-story-panels { display: grid; }
.ai-story.is-ready .ai-story-panel { grid-area: 1 / 1; margin: 0; visibility: hidden; opacity: 0; transition: opacity .18s, visibility 0s linear .18s; }
.ai-story.is-ready .ai-story-panel.is-active { visibility: visible; opacity: 1; transition: opacity .18s; }
.ai-story:not(.is-ready) .ai-story-bottom { display: none; }
@media (min-width: 960px) {
  .ai-story-panel { grid-template-columns: .8fr 1.2fr; gap: 56px; }
  .ai-story.is-pinned { height: calc(100svh + 2600px); }
  .ai-story.is-pinned .ai-story-stage { position: sticky; top: calc(var(--head) + 12px); }
}
@media (max-width: 599px) {
  .ai-story-top p { max-width: 22ch; }
  .ai-story-tabs { gap: 8px; }
  .ai-story-tabs button { font-size: 14px; padding-bottom: 12px; }
  .ai-story-copy .lede { font-size: 17px; line-height: 26px; }
}
@media print {
  .ai-story.is-ready .ai-story-panel { grid-area: auto; visibility: visible; opacity: 1; }
  .ai-story.is-pinned { height: auto; }
  .ai-story.is-pinned .ai-story-stage { position: static; }
}

/* Example cards: one flat panel per stage. */
.flow-demo { margin: 0; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.flow-demo svg { width: 16px; height: 16px; flex: none; }
.flow-head { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.flow-head strong { font-weight: 650; font-stretch: 112.5%; }
.flow-symbol { display: flex; color: var(--ink-3); }
.flow-example { margin-left: auto; font-size: 13px; line-height: 18px; color: var(--ink-3); text-align: right; }
.flow-canvas { display: flex; flex-direction: column; justify-content: center; min-height: 380px; padding: 24px; }
.flow-label { display: block; margin-bottom: 6px; font-size: 13px; line-height: 16px; font-weight: 650; font-stretch: 112.5%; color: var(--ink-3); }
.flow-message { padding: 16px 18px; background: var(--surface-2); border-radius: var(--r); }
.flow-message h3 { margin: 0; font-size: 18px; line-height: 26px; }
.flow-connector { display: flex; justify-content: center; padding: 10px 0; color: var(--ink-3); }
.flow-fields { border-block: 1px solid var(--line); }
.flow-fields > div { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 0; font-size: 14px; line-height: 20px; }
.flow-fields > div + div { border-top: 1px solid var(--line); }
.flow-fields > div > span { color: var(--ink-3); }
.flow-fields strong { font-weight: 600; }
.flow-fields em { font-style: normal; font-size: 13px; color: var(--ink-3); }
.flow-fields em.state { color: var(--ink-2); }
.flow-result, .flow-resolved { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 14px; line-height: 20px; }
.flow-resolved { align-items: flex-start; margin-top: 0; }
.flow-result svg, .flow-resolved svg { color: var(--ok); }
.flow-resolved svg { margin-top: 2px; }
.flow-draft { padding: 16px 0; border-block: 1px solid var(--line); }
.flow-draft-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.flow-draft-head strong { font-size: 14px; font-weight: 650; font-stretch: 112.5%; color: var(--ink); }
.flow-line { margin-bottom: 10px; font-size: 14px; line-height: 22px; }
.flow-citations { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; line-height: 18px; color: var(--ink-3); }
.flow-approval { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; font-size: 14px; line-height: 20px; }
.flow-approval svg { margin-top: 2px; color: var(--ink-3); }
.flow-demo :is(.flow-approval, .flow-resolved) strong { display: block; font-weight: 650; }
.flow-demo :is(.flow-approval, .flow-resolved) p { margin: 4px 0 0; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.flow-caption { padding: 12px 22px; border-top: 1px solid var(--line); font-size: 13px; line-height: 18px; color: var(--ink-3); }
@media (max-width: 599px) {
  .flow-head, .flow-caption { padding-inline: 16px; }
  .flow-canvas { min-height: 0; padding: 18px 16px; }
  .flow-fields > div { grid-template-columns: 64px minmax(0, 1fr); gap: 4px 8px; }
  .flow-fields em { grid-column: 2; }
}

/* The detail, when you need it: disclosure rows on the FAQ card. */
.ai-details .sec-head { max-width: 64ch; }
.ai-disclosures > details { scroll-margin-top: calc(var(--head) + 24px); }
.ai-disclosure-body { display: flex; flex-direction: column; gap: 16px; }
.ai-disclosure-body > * { margin: 0; }
.ai-disclosure-body > :not(.ai-where) { max-width: 76ch; }
.ai-disclosures .ai-disclosure-body > p + p { margin-top: 0; }
.ai-disclosure-body .list-check { font-size: 15px; line-height: 24px; color: var(--ink-2); }
.ai-disclosure-body .list-check b { color: var(--ink); font-weight: 650; }
.ai-disclosure-body .callout h3 { margin-bottom: 6px; font-size: 16px; line-height: 22px; }
.ai-where { display: grid; gap: 20px 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.ai-where > div { padding-top: 16px; border-top: 1px solid var(--line); }
.ai-where h3 { margin-bottom: 8px; font-size: 16px; line-height: 22px; }
.ai-where .note { margin-top: 10px; }
.ai-qa { gap: 0; }
.ai-qa > div { padding: 16px 0; border-top: 1px solid var(--line); }
.ai-qa > div:first-child { padding-top: 0; border-top: 0; }
.ai-qa h3 { margin-bottom: 6px; font-size: 16px; line-height: 22px; }
