:root {
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --accent: #ea580c;
  --link: #b8410b;
  --warm: #fff7ed;
}
body { color: var(--ink); background: white; }
[hidden] { display: none !important; }
:where(a, button, summary):focus-visible { outline: 3px solid #0369a1; outline-offset: 4px; }
.wrap { width: min(1080px, calc(100% - 64px)); margin-inline: auto; }
.site-head { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); }
.head-inner { min-height: 68px; display: flex; align-items: center; gap: 20px; }
.brand img { display: block; height: 30px; width: auto; }
.head-sections, .head-auth { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 14px; }
.head-sections { margin-left: auto; }
.head-sections a, .head-auth a { padding-block: 8px; }
.head-sections a:hover, .head-auth a:hover { color: var(--ink); }
.head-auth .register { padding: 8px 16px; color: white; background: var(--accent); border-radius: 99px; font-weight: 600; }
.head-auth .register:hover { background: #c2410c; color: white; }

.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(30px,5vw,80px); align-items: center; padding-block: clamp(44px,5.3vw,79px); }
.hero-copy h1 { margin: 0; }
.hero-copy h1 span { color: var(--accent); }
.hero-copy .lead { max-width: 490px; margin: 20px 0 24px; }
.hero-art { width: 100%; height: auto; border-radius: 22px; }
.action { display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 13px 23px; background: var(--accent); border-radius: 99px; color: white; font-size: 16px; font-weight: 700; line-height: 1.5; }
.action span { font-size: 19px; line-height: 1; }
.action:hover { background: #c2410c; }

.guide-index { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding-block: 20px; border-block: 1px solid var(--line); }
.guide-index a { display: grid; position: relative; align-content: start; gap: 5px; padding: 8px 42px 8px 25px; color: var(--ink); }
.guide-index a:first-child { padding-left: 0; }
.guide-index a + a { border-left: 1px solid var(--line); }
.guide-index a::after { content: '↓'; position: absolute; right: 16px; top: 8px; color: var(--link); }
.guide-index a:hover strong { color: var(--link); }
.guide-index strong { font-size: 17px; line-height: 1.35; letter-spacing: -.015em; }
.guide-index span { color: var(--muted); font-size: 14px; line-height: 1.4; }

.story { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,380px); gap: clamp(40px,7.7vw,112px); padding-block: clamp(44px,4.2vw,60px); }
.story { row-gap: 24px; }
.story-action { grid-column: 1 / -1; }
.story, .how, .guide-index { scroll-margin-top: 88px; }
.story-intro h2, .closing h2 { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
.story-intro p { margin-top: 16px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.benefits { margin-top: 26px; }
.benefits h3, .scope h3 { color: var(--ink); font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
.benefits ul { list-style: none; margin: 13px 0 0; padding: 0; }
.benefits li { position: relative; padding-left: 17px; color: #334155; font-size: 17px; line-height: 1.7; }
.benefits li + li { margin-top: 12px; }
.benefits li::before { content: ''; position: absolute; top: .68em; left: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.benefits strong, .how strong { color: var(--ink); font-weight: 700; }
.reading-band { background: #fcf9f5; border-block: 1px solid #f1eae1; }

.how { margin-top: 24px; border-block: 1px solid #d4dce4; }
.how summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 15px; cursor: pointer; color: var(--ink); font-weight: 700; font-size: 17px; line-height: 1.4; list-style: none; }
.how summary::-webkit-details-marker { display: none; }
.how summary::after { content: ''; flex: none; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); color: var(--link); margin-right: 5px; }
.how[open] summary::after { transform: translateY(2px) rotate(225deg); }
.how summary:hover { color: var(--link); }
.how-body { padding-bottom: 19px; font-size: 16px; line-height: 1.6; }
.how-body p { font-size: 17px; line-height: 1.7; }
.how-body ol { list-style: decimal; padding-left: 1.5em; }
.how-body li { padding-left: .23em; }
.how-body li::marker { color: var(--link); font-weight: 700; }
.how-body li + li, .how-body > * + * { margin-top: 12px; }
.how-body a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
code { font-size: .92em; overflow-wrap: anywhere; }

.evidence, .narrative { min-width: 0; }
.chat-demo { margin: 0; }
.zoom { display: block; border-radius: 13px; overflow: hidden; border: 1px solid #d5dedc; background: white; box-shadow: 0 6px 20px -15px rgb(15 23 42 / 34%); cursor: zoom-in; }
.zoom img { width: 100%; height: auto; display: block; }
figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.6; }
figcaption strong { color: var(--ink); }
.scope { margin-top: 16px; }
.scope p { margin-top: 7px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.sequence { position: relative; }
.sequence figcaption { min-height: 4.35em; }
.frame-controls {
  position: absolute;
  inset: 0 0 auto;
  aspect-ratio: 800 / 980;
  display: flex;
  align-items: end;
  justify-content: space-between;
  z-index: 1;
  pointer-events: none;
}
.group-sequence .frame-controls { aspect-ratio: 800 / 1292; }
.frame-controls button {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 2px;
  padding: 0;
  pointer-events: auto;
  cursor: pointer;
}
.frame-controls .previous { transform: translateX(-18px); }
.frame-controls .next { transform: translateX(18px); }
.frame-controls button::before {
  content: '';
  width: 33px;
  height: 33px;
  grid-area: 1 / 1;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 6px rgb(15 23 42 / 16%);
}
.frame-controls button:hover::before { background: var(--warm); border-color: var(--accent); }
.frame-controls button::after {
  content: '';
  grid-area: 1 / 1;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
}
.previous::after { transform: translateX(2px) rotate(-135deg); }
.next::after { transform: translateX(-2px) rotate(45deg); }
.closing { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 36px 42px; background: var(--warm); border-radius: 20px; margin-bottom: 56px; }
.closing p { color: var(--muted); margin-top: 7px; line-height: 1.5; }
.closing .action { flex-shrink: 0; }

@media (max-width: 859px) {
  .wrap { width: calc(100% - 48px); }
  .story { grid-template-columns: minmax(0,1fr) minmax(0,34%); gap: 28px; }
  .guide-index a { padding-left: 15px; padding-right: 30px; }
  .guide-index a::after { right: 9px; }
}
@media (max-width: 820px) {
  .wrap { width: min(530px,calc(100% - 40px)); }
  .head-inner { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding-top: 8px; }
  .brand img { height: 24px; }
  .head-auth { grid-column: 2; grid-row: 1; gap: 10px; }
  .head-auth .register { padding-inline: 12px; }
  .head-sections { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: 6px; margin: 3px 0 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; padding-block: 34px 27px; }
  .hero-copy .lead { margin: 15px 0 19px; }
  .hero-art { border-radius: 14px; }
  .guide-index { grid-template-columns: 1fr; padding: 0; }
  .guide-index a, .guide-index a:first-child { border: 0; padding: 12px 33px 12px 0; }
  .guide-index a + a { border-top: 1px solid var(--line); border-left: 0; }
  .guide-index a::after { top: 14px; right: 4px; }
  .story { display: flex; flex-direction: column; gap: 20px; padding-block: 39px; }
  .narrative, .evidence { display: contents; }
  .story-intro { order: 1; }
  .story-intro p { margin-top: 10px; font-size: 17px; }
  .benefits { order: 2; margin: 0; }
  .evidence > figure, .sequence { order: 3; width: min(100%,380px); margin-inline: auto; }
  .how { order: 4; margin: 0; }
  .story-action { order: 6; }
  .scope { order: 5; margin: 0; border: 0; padding: 0; }
  .closing { flex-direction: column; align-items: start; padding: 24px; margin-bottom: 32px; gap: 18px; }
  .story, .how, .guide-index { scroll-margin-top: 100px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
