/* okah.ai — the story engine (card oh1, 2026-11-16): one stage that stays on screen while the page changes around it.
   Ported from the approved prototype (~/Desktop/okah-historia/site/index.html, template fonte/historia.template.txt):
   same composition, tokens, type, line art and motion. Every class is prefixed `sy-` so nothing here collides with
   site.css (which keeps the header, footer, buttons, consent banner and the inner pages). Loaded only by pages whose
   content returns "story": True (build.py). Reused by the other tabs (cards oh2-oh8): the generic engine is the first
   half of this file, the home scene (`[data-scene="home"]`) the second.
   Rules kept from the repo: every rule that hides something starts with `.js` (without JavaScript everything is
   visible); motion uses transform / opacity (plus stroke-dashoffset for the line art, as the hub did in round 4);
   under prefers-reduced-motion nothing slides or scales, each chapter is shown in its final state. */

.sy {
  /* the prototype's palette (direction B tokens, scoped so site.css keeps its own values elsewhere) */
  --paper: #FAF7EF; --paper-2: #FFFDF8; --forest: #173E32; --forest-2: #1E4A3C;
  --ink: #202A24; --ink-2: #59665B; --clay: #AD4B32; --clay-text: #9A4229;
  --amber: #E4AE55; --lime: #DCE9B9; --sand: #EDF0E4; --line: #DDE1D4; --line-dark: #3C5A4D; --on-dark-2: #C6D2C4;
  --shadow-1: 0 1px 2px rgb(36 26 21 / .05), 0 10px 24px -16px rgb(23 62 50 / .22);
  --shadow-2: 0 2px 5px rgb(36 26 21 / .06), 0 24px 56px -20px rgb(36 26 21 / .28);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hdr: var(--sy-hdr, 75px);      /* the site header's real height, measured by story.js */
  color: var(--ink); line-height: 1.6;
}
.sy p { margin: 0 0 1em; }
.sy h1, .sy h2, .sy h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -.012em; text-wrap: balance; color: inherit; }
.sy :focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; border-radius: 6px; }
.sy .is-dark :focus-visible { outline-color: var(--amber); }
/* the approved prototype's content width (1240 px, its .wrap) — not site.css's --wrap (1320 px, header/footer/inner pages) */
.sy-wrap { max-width: var(--sy-wrap, 1240px); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
.sy-eb { font: 600 .78rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--t-acc, var(--clay-text)); margin: 0 0 14px; }
/* buttons: site.css .btn, at the prototype's size */
.sy .btn { min-height: 46px; padding: 0 22px; font-size: 1rem; }
.sy .btn-primary::after { content: none; }
.sy .btn-dark { background: var(--forest); color: #fff; border-color: var(--forest); }
.sy .btn-dark:hover { background: #285745; }
.sy .btn-outline { border-color: var(--forest); color: var(--forest); }
.sy .btn-outline:hover { background: var(--sand); }
.sy .is-dark .btn-dark { background: var(--amber); border-color: var(--amber); color: var(--ink); }

/* ---------- the thread (progress line under the header) and the chapter rail ---------- */
.sy-thread { position: fixed; left: 0; top: var(--hdr); z-index: 39; height: 3px; width: 100%; background: var(--clay); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none; }
.sy-rail { position: fixed; left: 16px; top: 50%; z-index: 38; transform: translateY(-50%); display: none; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.sy-rail button { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 5px 4px; min-height: 24px; color: var(--ink-2); font: 600 .72rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.sy-rail i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor; transition: transform .25s, background-color .25s; flex: none; }
.sy-rail b { font-weight: 600; opacity: 0; transform: translateX(-4px); transition: opacity .25s, transform .25s; white-space: nowrap; background: var(--paper); padding: 4px 7px; border-radius: 6px; }
.sy.is-ondark .sy-rail b { background: var(--forest); }
.sy-rail button:hover b, .sy-rail button:focus-visible b { opacity: 1; transform: none; }
@media (min-width: 1620px) { .sy-rail .on b { opacity: 1; transform: none; } }
.sy-rail .on { color: var(--clay-text); }
.sy-rail .on i { background: currentColor; transform: scale(1.35); }
.sy-rail .done i { background: currentColor; }
.sy.is-ondark .sy-rail button { color: var(--on-dark-2); }
.sy.is-ondark .sy-rail .on { color: var(--amber); }
@media (min-width: 1400px) { .js .sy-rail { display: flex; } }

/* ---------- theater: steps on the left, one stage on the right ---------- */
.sy-theater { position: relative; background: var(--paper); color: var(--t-ink); transition: background-color .7s var(--ease); overflow-x: clip;
  --t-ink: var(--ink); --t-ink2: var(--ink-2); --t-acc: var(--clay-text); --t-bg: var(--paper); }
.sy-theater.is-dark { background: var(--forest); --t-ink: #FAF7EF; --t-ink2: var(--on-dark-2); --t-acc: var(--amber); --t-bg: var(--forest); }
.sy-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); column-gap: clamp(24px, 4vw, 64px); }
.sy-stagecol { grid-column: 2; grid-row: 1; }
.sy-steps { grid-column: 1; grid-row: 1; }
.sy-stage { position: sticky; top: var(--hdr); height: calc(100vh - var(--hdr)); display: grid; place-items: center; }
.sy-scene { position: relative; width: min(100%, calc((100vh - var(--hdr) - 56px) * 1.087)); aspect-ratio: 1000 / 920; container-type: inline-size;
  /* without JavaScript the window is solid and shows the recording's poster; story.js starts the story from the empty frame */
  --conv: 1; --video: 1; --build: 0; --phone: 0; --chaos: 0; }
.js .sy-scene { --conv: 0; --video: 0; --chaos: 1; }

.sy-step { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; padding: 8vh 0; color: var(--t-ink); }
.js .sy-step { opacity: .26; transition: opacity .45s var(--ease); }
.js .sy-step.is-active { opacity: 1; }
.sy-step--hero { min-height: calc(100vh - var(--hdr)); padding: 3vh 0 6vh; }
.sy-step h2 { font-size: clamp(1.7rem, 2.55vw, 2.45rem); line-height: 1.14; }
.sy-sub { color: var(--t-ink2); font-size: 1.1rem; margin: 18px 0 0 !important; max-width: 34ch; transition: color .7s; }
.sy-stem { font: 500 italic 1.15rem/1.2 var(--serif); color: var(--t-acc); margin: 0 0 6px !important; }
.sy-count { color: var(--t-ink2); font-weight: 600; letter-spacing: .08em; }
.sy-mark { width: 54px; height: 54px; margin-bottom: 22px; }
.sy-h1 { font-size: clamp(2.5rem, 4.1vw, 3.7rem); line-height: 1.04; color: var(--ink); }
.sy-lede { color: var(--ink-2); font-size: 1.14rem; max-width: 36ch; margin: 6px 0 26px !important; }
.sy-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.sy-hint { display: inline-flex; align-items: center; gap: 10px; margin-top: 30px; font: 600 .8rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--clay-text); text-decoration: none; align-self: flex-start; min-height: 44px; }
.sy-hint i { width: 1.5px; height: 34px; background: currentColor; transform-origin: 50% 0; animation: sy-drop 1.8s var(--ease) infinite; }
@keyframes sy-drop { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.sy-trio { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; color: var(--t-ink2); font-size: 1.06rem; }
.sy-trio li { display: flex; gap: 12px; align-items: baseline; }
.sy-trio li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--clay); flex: none; transform: translateY(-2px); }
.sy-bridge { margin-top: 26px !important; font: 500 italic 1.08rem/1.3 var(--serif); color: var(--t-acc); }

/* the typed ending (A1). Every phrase sits invisible in the same grid cell (.sy-ty-ghost), so the line is as tall as
   the tallest phrase from the first paint; the untyped rest stays in place, invisible, so a word never jumps to the
   next line while it is typed; the caret is the right edge of the typed span (inset shadow, no width): no layout shift. */
.sy-typed { display: grid; align-content: start; min-height: 3.5em; margin-top: 14px; font-size: clamp(1.35rem, 2vw, 1.85rem); line-height: 1.16; color: var(--clay); letter-spacing: -.005em; }
.sy-typed > * { grid-area: 1 / 1; min-width: 0; display: block; padding-bottom: .08em; }
.sy-ty-ghost, .sy-ty-rest { visibility: hidden; }
.js .sy-ty-live [data-sy-typed] { padding-right: .11em; margin-right: -.11em; box-shadow: inset -2px 0 0 var(--clay); }
.js .sy-typed.is-idle [data-sy-typed] { animation: sy-blink 1s steps(2, start) infinite; }
@keyframes sy-blink { to { box-shadow: inset -2px 0 0 transparent; } }

/* the sequence marker (Thiago's Consultar -> fonte -> revisar) on the stops where each step happens */
.sy-seq { display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; margin: 0 0 14px !important; padding: 6px 13px 6px 10px; border-radius: 999px; background: var(--lime); color: var(--forest); font: 600 .9rem/1.2 var(--sans); }
.sy-seq-bars { display: inline-flex; gap: 3px; }
.sy-seq-bars i { width: 14px; height: 4px; border-radius: 4px; background: rgb(23 62 50 / .22); }
.sy-seq-bars i.on { background: var(--forest); }

/* ---------- the stage: one window ---------- */
.sy-arc { position: absolute; left: -3cqw; top: 4.4cqw; width: 88cqw; height: 80cqw; border-radius: 30cqw 3cqw 3cqw 3cqw; background: var(--lime); opacity: calc(var(--conv) * (1 - min(1, var(--build) * 3.2))); z-index: 1; }
.sy-win { position: absolute; left: 0; top: 9.35cqw; width: 100cqw; border-radius: 1.8cqw; z-index: 3; transform-origin: 50% 50%; will-change: transform; }
.sy-win-frame { position: absolute; inset: 0; border-radius: inherit; border: max(1.5px, .24cqw) dashed #B9C3AD; opacity: calc(1 - var(--conv)); }
.sy-win-solid { position: absolute; inset: 0; border-radius: inherit; background: var(--paper-2); border: 1px solid var(--line); box-shadow: var(--shadow-2); opacity: var(--conv); }
.sy-win-bar { position: relative; height: 5.2cqw; display: flex; align-items: center; justify-content: space-between; padding: 0 2.2cqw; font: 600 max(9px, 1.7cqw)/1 var(--sans); color: var(--ink-2); border-bottom: 1px solid var(--line); opacity: var(--conv); }
.sy-win-bar em { font-style: normal; color: var(--forest); background: var(--lime); padding: .55cqw 1.1cqw; border-radius: 99px; font-size: max(8px, 1.45cqw); }
.sy-win-body { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.sy-win-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1.4cqw; opacity: calc(1 - var(--conv) * 1.6); color: var(--ink-2); font: 500 italic max(12px, 2.5cqw)/1 var(--serif); }
.sy-win-empty img { width: 9cqw; height: 9cqw; opacity: .9; }
.sy-dock { position: absolute; inset: 0; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 3.4cqw 3cqw; padding: 0 3cqw; }
.sy-slot { width: 20cqw; height: 12.5cqw; }
/* the recording: the poster is a real <img> under the video (round 4 rule: the page's largest paint is the small
   poster, never the recording's first frame); the video loads after the page, see story.js */
.sy-poster, .sy-rec { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: var(--video); }
.sy-poster { background: #F4EFE6; }
.sy-rec { background: transparent; }
.sy-win-strip { position: relative; height: 5.6cqw; display: flex; align-items: center; justify-content: space-between; gap: 2cqw; padding: 0 2.2cqw; background: var(--forest); color: #FAF7EF; border-radius: 0 0 1.8cqw 1.8cqw; font: 600 max(9px, 1.7cqw)/1 var(--sans); opacity: var(--video); }
.sy-segs { display: flex; gap: .6cqw; margin-right: 1.4cqw; flex: none; }
.sy-segs i { width: 2.6cqw; height: .55cqw; border-radius: 9px; background: rgb(255 255 255 / .28); transition: background-color .3s; }
.sy-segs i.on { background: var(--amber); }
.sy-strip-l { display: flex; align-items: center; min-width: 0; gap: 1.2cqw; }
.sy-strip-l > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sy-strip-l em { font-style: normal; white-space: nowrap; color: var(--forest); background: var(--lime); border-radius: 99px; padding: .5cqw 1.1cqw; font-size: max(8px, 1.45cqw); flex: none; }
.sy-strip-l em:empty { display: none; }
.sy-strip-r { display: flex; align-items: center; gap: 1.6cqw; color: var(--lime); letter-spacing: .08em; text-transform: uppercase; font-size: max(8px, 1.35cqw); white-space: nowrap; }
.sy-replay { background: none; border: 1px solid rgb(255 255 255 / .35); color: #fff; border-radius: 99px; padding: .7cqw 1.4cqw; font: 600 max(9px, 1.45cqw)/1 var(--sans); letter-spacing: 0; text-transform: none; cursor: pointer; }
.sy-replay:hover { background: rgb(255 255 255 / .12); }

.sy-callout { position: absolute; z-index: 6; display: flex; align-items: center; gap: 1cqw; opacity: 0; transform: translateY(-50%) scale(.92); transform-origin: 0 50%; transition: opacity .35s var(--ease), transform .35s var(--ease); pointer-events: none; }
.sy-callout.left { flex-direction: row-reverse; transform-origin: 100% 50%; translate: -100% 0; margin-left: 1.8cqw; }
.sy-callout.show { opacity: 1; transform: translateY(-50%) scale(1); }
.sy-callout i { width: 1.8cqw; height: 1.8cqw; min-width: 9px; min-height: 9px; border-radius: 50%; background: var(--clay); flex: none; }
.sy-callout.show i { animation: sy-ping 1.5s ease-out 3; }
@keyframes sy-ping { 0% { box-shadow: 0 0 0 0 rgb(173 75 50 / .55); } 100% { box-shadow: 0 0 0 2.6cqw rgb(173 75 50 / 0); } }
.sy-callout b { background: var(--forest); color: #fff; font: 600 max(10px, 1.65cqw)/1 var(--sans); padding: 1cqw 1.5cqw; border-radius: 99px; white-space: nowrap; box-shadow: var(--shadow-1); }

/* the stage's pause control (WCAG 2.2.2): stops typing, drift, pulses and the recording; shown only with JavaScript */
.sy-pause { position: absolute; right: 0; bottom: 8px; z-index: 8; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper-2); color: var(--forest); font: 600 .8rem/1 var(--sans); cursor: pointer; box-shadow: var(--shadow-1); }
.sy-pause::before { content: ""; position: absolute; inset: -5px; }   /* 46 px hit area */
.sy-pause:hover { background: #fff; }
.sy-pause svg { flex: none; }
.sy-theater.is-dark .sy-pause { background: var(--forest-2); color: #FAF7EF; border-color: var(--line-dark); }
.sy.is-paused .sy-frag-i, .sy.is-paused .sy-hint i, .sy.is-paused .sy-callout.show i { animation-play-state: paused; }

/* ---------- after the theater ---------- */
.sy-sec { padding: clamp(72px, 9vw, 128px) 0; background: var(--paper); }
.sy-sec h2 { font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: 1.12; max-width: 20ch; }
.sy-sec--sand { background: var(--sand); }
.js .sy-rv { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .sy-rv.is-in { opacity: 1; transform: none; }

/* ---------- reduced motion: nothing slides or scales; fades stay (Thiago's rule, round 4) ---------- */
@media (prefers-reduced-motion: reduce) {
  .sy-hint i, .sy-callout.show i { animation: none; }
  .sy-callout, .sy-callout.show { transform: translateY(-50%); }
  .js .sy-rv { transform: none; }
  .sy-rail i, .sy-rail b { transition: none; transform: none !important; }
  .sy .btn:hover { transform: none; }
}

/* ======================================================================================================== home scene */
/* scattered pieces (A2, A3) */
.sy-frag { position: absolute; left: 0; top: 0; width: 30cqw; z-index: 4; will-change: transform; opacity: calc(1 - var(--video)); }
.sy-frag-i { background: var(--paper-2); border: 1px solid var(--line); border-radius: 1.5cqw; box-shadow: var(--shadow-1); padding: 1.7cqw 1.9cqw 1.9cqw; animation: sy-drift var(--d, 7s) ease-in-out infinite alternate; animation-delay: var(--dl, 0s); }
@keyframes sy-drift {
  from { transform: translate3d(0, calc(var(--chaos) * -1.3cqw), 0) rotate(calc(var(--chaos) * -1.5deg)); }
  to { transform: translate3d(calc(var(--chaos) * .9cqw), calc(var(--chaos) * 1.3cqw), 0) rotate(calc(var(--chaos) * 1.5deg)); }
}
.sy-fg-tag { display: block; font: 600 max(8px, 1.4cqw)/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--clay-text); }
.sy-fg-tt { display: block; font: 600 max(10px, 2cqw)/1.25 var(--sans); color: var(--ink); margin-top: .9cqw; }
.sy-fg-ln { display: block; height: .7cqw; border-radius: 9px; background: #E3E7D8; margin-top: 1.1cqw; }
.sy-fg-ln.s { width: 62%; }
.sy-frag--chat .sy-frag-i { background: var(--lime); border-color: #C9D9A2; border-radius: 2.4cqw 2.4cqw 2.4cqw .5cqw; }
.sy-frag--chat .sy-fg-tag { color: var(--forest); }
.sy-frag--note .sy-frag-i { background: #F3D48E; border-color: #E4BC62; border-radius: .4cqw; box-shadow: 0 1.2cqw 2cqw -1.2cqw rgb(36 26 21 / .35); }
.sy-frag--note .sy-fg-tt { font: 500 italic max(11px, 2.3cqw)/1.2 var(--serif); }
.sy-frag--note .sy-fg-tag { color: #6B4A10; }
.sy-frag--head .sy-frag-i { background: transparent; border: max(1.5px, .22cqw) dashed #B9C3AD; box-shadow: none; }
.sy-frag--head .sy-fg-tt { font: 500 italic max(11px, 2.15cqw)/1.22 var(--serif); color: var(--ink-2); }
.sy-fg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45cqw; margin-top: 1.1cqw; }
.sy-fg-grid i { height: 1.25cqw; background: #E3E7D8; border-radius: 2px; }
.sy-fg-grid i.h { background: #C9D9A2; }
.sy-fg-grid i.w { background: #F0C9BC; }

/* the building (A5, A6) */
.sy-bld { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; overflow: visible; pointer-events: none; }
.sy-bld .b-draw { fill: none; stroke: var(--lime); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--build)); }
.sy-bld .b-net { stroke: var(--amber); stroke-width: 2.5; }
.sy-bld .b-soft { opacity: var(--build); }
.sy-bld text { font: 600 20px/1 var(--sans); fill: var(--on-dark-2); }
.sy-bld .b-strong { fill: #FAF7EF; font-size: 21px; }
.sy-bld .b-pulse { fill: var(--amber); opacity: calc((var(--build) - .85) * 7); }
.sy-bld .b-cloud { fill: none; stroke: var(--on-dark-2); stroke-width: 2.5; opacity: .75; }
.sy-bld .b-cut { stroke: var(--on-dark-2); stroke-width: 2.5; stroke-dasharray: 7 9; opacity: .6; fill: none; }
.sy-bld .b-bar { stroke: #F0C9BC; stroke-width: 4; stroke-linecap: round; }
.sy-bld .b-phone { opacity: var(--phone); }
.sy-bld .b-phone rect { fill: var(--forest-2); stroke: var(--lime); stroke-width: 3; }
.sy-bld .b-tunnel { stroke: var(--lime); stroke-width: 18; stroke-linecap: round; opacity: calc(var(--phone) * .16); fill: none; }
.sy-bld .b-priv { fill: none; stroke: var(--amber); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--phone)); }
.sy-bld .b-pulse2 { fill: #FAF7EF; opacity: calc((var(--phone) - .85) * 7); }
.sy-bld .b-ticks { fill: none; stroke: var(--lime); stroke-width: 3; stroke-linecap: round; opacity: var(--build); }
.sy-bld .b-m { display: none; }   /* the narrow-screen labels (below) */

/* hub: the same story in every area (A7) */
.sy-hub { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 250px minmax(0, 1fr); align-items: center; column-gap: clamp(48px, 7vw, 110px); margin-top: 56px; }
.sy-hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.sy-hub-lines path { fill: none; stroke: #CDB79A; stroke-width: 1.6; }
.js .sy-hub-lines path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .8s var(--ease); transition-delay: calc(var(--i) * .16s); }
.js .sy-hub.is-in .sy-hub-lines path { stroke-dashoffset: 0; }
.sy-hub-lines circle { fill: var(--clay); opacity: 0; }
.sy-hub.is-in .sy-hub-lines circle { opacity: 1; }
.sy-hub-col { display: grid; gap: 22px; position: relative; }
.sy-area { background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.js .sy-area { opacity: .25; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease), border-color .6s; transition-delay: calc(var(--i) * .16s + .25s); }
.js .sy-hub.is-in .sy-area { opacity: 1; transform: none; }
.sy-hub-l .sy-area { text-align: right; }
.sy-area h3 { font-size: 1.3rem; margin-bottom: 4px; }
.sy-area p { margin: 0 !important; color: var(--ink-2); font-size: 1rem; line-height: 1.45; }
.sy-core { position: relative; width: 250px; height: 250px; border-radius: 50%; background: var(--forest); color: #FAF7EF; display: grid; place-content: center; justify-items: center; text-align: center; padding: 26px; }
.js .sy-core { transform: scale(.82); opacity: .4; transition: transform .8s var(--ease), opacity .8s var(--ease); }
.sy-core::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1.5px solid var(--amber); }
.js .sy-core::after { transform: scale(.9); opacity: 0; transition: transform 1s var(--ease) .9s, opacity 1s var(--ease) .9s; }
.js .sy-hub.is-in .sy-core, .js .sy-hub.is-in .sy-core::after { transform: none; opacity: 1; }
.sy-core img { width: 46px; height: 46px; margin-bottom: 6px; }
.sy-core strong { font: 500 1.7rem/1.1 var(--serif); }
.sy-core span { font-size: .93rem; line-height: 1.35; color: var(--on-dark-2); margin-top: 6px; }
.sy-hub-foot { text-align: center; color: var(--ink-2); margin: 44px 0 0 !important; }

/* what changes: today struck out, with Okah slides in (A8) */
.sy-swaps { list-style: none; margin: 52px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.sy-swap { display: grid; grid-template-columns: minmax(0, 5fr) 90px minmax(0, 7fr); align-items: center; padding: 30px 0; border-bottom: 1px solid var(--line); }
.sy-tag { display: block; font: 600 .72rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.sy-now .sy-tag { color: var(--clay-text); }
.sy-swap h3 { font-size: clamp(1.25rem, 1.9vw, 1.65rem); line-height: 1.2; }
/* struck-out grey: #737F74 (3.6:1 on sand, large text) instead of the prototype's #8B958B (2.7:1) */
.sy-was h3 { display: inline; color: #737F74; background: linear-gradient(var(--clay), var(--clay)) no-repeat 0 58% / 100% 2px; }
.js .sy-was h3 { color: var(--ink); background-size: 0% 2px; transition: background-size .7s var(--ease), color .7s; transition-delay: calc(var(--i) * .22s + .15s); }
.js .sy-swap.is-in .sy-was h3 { background-size: 100% 2px; color: #737F74; }
.sy-arrow { height: 2px; background: var(--clay); margin: 0 18px; transform-origin: 0 50%; position: relative; }
.js .sy-arrow { transform: scaleX(0); transition: transform .5s var(--ease); transition-delay: calc(var(--i) * .22s + .6s); }
.sy-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; width: 10px; height: 10px; border-top: 2px solid var(--clay); border-right: 2px solid var(--clay); transform: rotate(45deg); }
.js .sy-swap.is-in .sy-arrow { transform: none; }
.js .sy-now { opacity: 0; transform: translateX(-22px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i) * .22s + .85s); }
.js .sy-swap.is-in .sy-now { opacity: 1; transform: none; }
.sy-now p { margin: 6px 0 0 !important; color: var(--ink-2); max-width: 52ch; }

/* where to start */
.sy-routes { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 48px; }
.sy-route { display: block; text-decoration: none; color: var(--ink); background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px; padding: 30px 30px 26px; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.sy-route:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: #C9D9A2; }
.sy-route h3 { font-size: 1.5rem; margin-bottom: 8px; }
.sy-route p:not(.sy-eb) { color: var(--ink-2); margin: 0 0 18px; }
.sy-go { font-weight: 600; color: var(--clay-text); display: inline-flex; gap: 8px; align-items: center; }
.sy-go::after { content: "→"; transition: transform .25s var(--ease); }
.sy-route:hover .sy-go::after { transform: translateX(5px); }
.sy-pills { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.sy-pills a { display: inline-flex; align-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .95rem; color: var(--forest); background: var(--paper); text-decoration: none; }
.sy-pills a:hover { border-color: #C9D9A2; background: var(--paper-2); }
.sy-fin { background: var(--lime); color: var(--forest); padding: clamp(64px, 8vw, 110px) 0; }
.sy-fin h2 { font-size: clamp(2rem, 3.3vw, 2.9rem); }
.sy-fin p { font-size: 1.14rem; max-width: 44ch; margin: 14px 0 26px !important; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .sy-grid { grid-template-columns: minmax(0, 1fr); }
  .sy-stagecol, .sy-steps { grid-column: 1; }
  .sy-stagecol { grid-row: 1; position: sticky; top: var(--hdr); z-index: 5; }
  .sy-steps { grid-row: 2; }
  .sy-stage { position: relative; top: auto; height: 46vh; background: var(--t-bg); transition: background-color .7s var(--ease); border-bottom: 1px solid var(--line); margin: 0 calc(clamp(20px, 4vw, 48px) * -1); }
  .is-dark .sy-stage { border-color: var(--line-dark); }
  .sy-scene { width: min(92%, calc((46vh - 18px) * 1.087)); }
  .sy-step { min-height: 58vh; padding: 5vh 0; }
  .sy-step--hero { min-height: 0; padding: 30px 0 60px; }
  .sy-pause { right: 8px; bottom: 6px; min-height: 32px; padding: 0 11px 0 9px; font-size: .75rem; }
  .sy-hub { grid-template-columns: 1fr; row-gap: 22px; }
  .sy-hub-lines { display: none; }
  .sy-hub-l .sy-area { text-align: left; }
  .sy-core { margin: 0 auto; order: -1; }
  .sy-swap { grid-template-columns: 1fr; row-gap: 12px; }
  .sy-arrow { width: 70px; margin: 4px 0; }
  .sy-routes { grid-template-columns: 1fr; }
  /* the building on a narrow stage: its own labels, larger, none over the window (the server's name goes under
     the ground line, the cloud's note and the phone's note are split into short lines at the edges) */
  .sy-bld .b-d { display: none; }
  .sy-bld .b-m { display: inline; }
  .sy-bld text { font-size: 31px; }
  .sy-bld .b-strong { font-size: 32px; }
}
@media (max-width: 560px) {
  .sy-pause span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sy-pause { padding: 0; width: 36px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .sy-frag-i { animation: none; }
  .sy-bld .b-pulse, .sy-bld .b-pulse2, .sy-hub-lines circle { display: none; }
  .js .sy-area, .js .sy-core, .js .sy-core::after, .js .sy-now { transform: none !important; }
  .js .sy-arrow { transform: none; transition: none; }
  .sy-route:hover, .sy-route:hover .sy-go::after { transform: none; }
}

/* ================================================================================= from versao-hermes (t_abe1ba5a)
   Four blocks brought from the branch versao-hermes (2026-11-16), drawn with this file's own tokens (--shadow-1/2,
   --forest, --clay, --lime, --amber, --line): no new colour, font or radius. Each block is independent: deleting it
   puts that piece back exactly as the prototype had it. What came from where: docs/DECISIONS.md, "Junção
   Pedro + versao-hermes"; side-by-side captures: qa/merge-pedro-hermes/. */

/* --- H1 · elevation: cards rest on level 1 and bloom to level 2 (the prototype's routes already lifted on hover).
   The area cards are not links, so they do not move: only the shadow blooms, on a layer of its own (opacity only),
   which keeps the staggered entrance (transition-delay on .sy-area) out of the hover. */
.sy-area, .sy-route { box-shadow: var(--shadow-1); }
.sy-area { position: relative; }
.sy-area::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: var(--shadow-2); opacity: 0; transition: opacity .25s var(--ease); pointer-events: none; }
.sy-area:hover::after { opacity: 1; }
.sy-core { box-shadow: var(--shadow-2); }
.sy-pills a { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s, background-color .25s; }
.sy-pills a:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }

/* --- H2 · hub: the connectors in the signature colour; on one column, the core becomes a banner and the six areas
   hang from one thread, each with its dot (instead of a 250 px circle followed by six loose cards). */
.sy-hub-lines path { stroke: var(--clay); stroke-opacity: .5; }
/* a fixed dot where each connector leaves its card (the prototype's travelling dot starts here, and is not shown under
   reduced motion: without this, a visitor with animations off sees lines with no ends) */
.sy-area::before { content: ""; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--clay); }
.sy-hub-l .sy-area::before { right: -5.5px; }
.sy-hub-r .sy-area::before { left: -5.5px; }
@media (max-width: 900px) {
  .sy-hub { row-gap: 12px; padding-left: 26px; margin-top: 36px; }
  .sy-hub::before { content: ""; position: absolute; left: 6px; top: 40px; bottom: 52px; width: 2px; background: var(--line); }
  .sy-hub-col { gap: 12px; }
  .sy-core { z-index: 1; width: auto; height: auto; margin: 0 0 8px -26px; border-radius: 16px; grid-template-columns: 52px minmax(0, 1fr); column-gap: 16px; place-content: normal; align-items: center; justify-items: start; text-align: left; padding: 18px 20px; }
  .sy-core::after { inset: -6px; border-radius: 21px; }
  .sy-core img { grid-row: 1 / 3; width: 52px; height: 52px; margin: 0; }
  .sy-core strong { font-size: 1.4rem; align-self: end; }
  .sy-core span { margin-top: 2px; align-self: start; }
  .sy-area { padding: 16px 18px; }
  .sy-hub-l .sy-area::before, .sy-hub-r .sy-area::before { left: -24.5px; right: auto; width: 10px; height: 10px; margin-top: -5px; }
  .sy-area h3 { font-size: 1.18rem; }
}

/* --- H3 · where to start: the public-sector route is the forest card, so the two routes read as two doors */
.sy-route--forest { --t-acc: var(--amber); background: var(--forest); border-color: var(--forest); color: #FAF7EF; box-shadow: var(--shadow-2); }
.sy-route--forest p:not(.sy-eb) { color: var(--on-dark-2); }
.sy-route--forest .sy-go { color: var(--lime); }
.sy-route--forest:hover { border-color: var(--amber); }

/* --- H4 · the top as a conversation with Okah (opt-in: config.HOME_HERO = "chat", or ?topo=conversa on any build).
   Off, the wrappers are neutral and the two extra lines are [hidden]: the top is the prototype's. */
.sy-chat, .sy-chat-a { display: contents; }
.sy-chat.is-chat { display: grid; gap: 12px; margin: 2px 0 20px; }
.sy .sy-chat-q { margin: 0; justify-self: end; max-width: 92%; }
.sy-chat-q span { display: inline-block; padding: 10px 16px 11px; border-radius: 18px 18px 5px 18px; background: var(--forest); color: #FAF7EF; font: 500 1rem/1.3 var(--sans); box-shadow: var(--shadow-1); }
.is-chat .sy-chat-a { display: block; background: var(--paper-2); border: 1px solid var(--line); border-radius: 6px 22px 22px 22px; box-shadow: var(--shadow-2); padding: 16px clamp(16px, 1.7vw, 24px) 20px; }
.sy .sy-chat-who { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font: 600 .875rem/1 var(--sans); color: var(--forest); white-space: nowrap; }
.sy .sy-chat-who[hidden] { display: none; }
.sy-chat-who img { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--clay); padding: 3px 3px 4px; }   /* the A4 symbol, linen on clay: the app's icon */
.sy-chat-st { display: inline-grid; align-items: center; color: var(--ink-2); font-weight: 500; }
.sy-chat-st .st { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 7px; opacity: 0; visibility: hidden; transition: opacity .16s var(--ease); }
.sy-chat-who[data-state="typing"] .st-typing, .sy-chat-who[data-state="ready"] .st-ready { opacity: 1; visibility: visible; }
.sy-chat-dots { display: inline-flex; gap: 3px; }
.sy-chat-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--clay); animation: sy-dot 1.1s var(--ease) infinite; }
.sy-chat-dots i:nth-child(2) { animation-delay: .16s; }
.sy-chat-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes sy-dot { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.sy.is-paused .sy-chat-dots i { animation-play-state: paused; }
.sy-chat-ok { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--lime); color: var(--forest); }
.is-chat .sy-h1 { font-size: clamp(1.9rem, 2.7vw, 2.45rem); line-height: 1.08; }
.is-chat .sy-typed { margin-top: 6px; min-height: 2.4em; font-size: clamp(1.3rem, 1.85vw, 1.7rem); }
@media (max-width: 900px) { .is-chat .sy-typed { min-height: 2.4em; } }
