/* Rislix concept 08: one finding, start to certificate
   Night to daylight. Familjen Grotesk for titles, Figtree for reading. */

:root {
  --night: #0F1D2E;
  --night-2: #16304A;
  --blue-hour: #2D4C66;
  --mist: #8FA9B8;
  --haze: #D9E4E3;
  --day: #F3F6F1;
  --paper: #F1EFE6;
  --ink-l: #EAF0F4;
  --ink-l-soft: #B8C7D3;
  --ink-d: #102030;
  --ink-d-soft: #3E5163;
  --lantern: #F2B544;
  --lantern-d: #8A5A00;
  --verd: #1F8A70;
  --verd-d: #17725D;
  --risk: #C8473F;
  --line-d: rgba(16, 32, 48, .14);
  --line-l: rgba(234, 240, 244, .16);

  --display: "Familjen Grotesk", "Segoe UI", system-ui, sans-serif;
  --sans: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(.65, .02, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
  --head-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-d);
  background: var(--day);
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--lantern); outline-offset: 3px; border-radius: 4px; }
[data-tone="day"] :focus-visible, .foot :focus-visible { outline-color: var(--verd-d); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--lantern); color: var(--ink-d); padding: 10px 16px; border-radius: 6px; font-weight: 600;
}
.skip:focus { top: 12px; }

.back {
  position: fixed; left: 14px; bottom: 14px; z-index: 150;
  font-size: .875rem; font-weight: 600; text-decoration: none;
  padding: 9px 14px; border-radius: 999px;
  color: var(--ink-l); background: rgba(15, 29, 46, .82);
  border: 1px solid var(--line-l);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background-color .3s, color .3s;
}
.back:hover { background: var(--night); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font-weight: 650; font-size: 1rem; text-decoration: none; letter-spacing: .005em;
  background: var(--lantern); color: var(--ink-d); border: 1px solid transparent;
  transition: transform .25s var(--ease-out), background-color .25s, box-shadow .25s;
  box-shadow: 0 10px 30px -12px rgba(242, 181, 68, .6);
}
.btn:hover { transform: translateY(-2px); background: #F6C566; }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; box-shadow: none; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
[data-tone="day"] .btn { background: var(--ink-d); color: var(--day); box-shadow: 0 12px 30px -16px rgba(16, 32, 48, .6); }
[data-tone="day"] .btn:hover { background: #1D3349; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .9375rem; }
.btn-lg { min-height: 56px; padding: 14px 28px; font-size: 1.0625rem; }

/* ---------- header ---------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--head-h);
  color: var(--ink-l);
  transition: color .4s, background-color .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.site-head.is-scrolled { background: rgba(15, 29, 46, .72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: var(--line-l); }
.site-head[data-tone="day"] { color: var(--ink-d); }
.site-head[data-tone="day"].is-scrolled { background: rgba(243, 246, 241, .82); border-color: var(--line-d); }
.head-in { height: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: .01em; }
.brand img { height: 30px; width: auto; }
.brand .logo-on-day, .site-head[data-tone="day"] .brand .logo-on-night { display: none; }
.site-head[data-tone="day"] .brand .logo-on-day { display: block; }
.nav ul { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.nav a:not(.btn) { text-decoration: none; font-size: .975rem; font-weight: 500; padding: 6px 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s var(--ease-out); }
.nav a:not(.btn):hover { background-size: 100% 1px; }
.site-head[data-tone="night"] .nav .btn { background: var(--lantern); color: var(--ink-d); }
.site-head[data-tone="day"] .nav .btn { background: var(--ink-d); color: var(--day); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid currentColor; background: none; border-radius: 50%; position: relative; }
.nav-toggle i { position: absolute; left: 13px; right: 13px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.nav-toggle i:first-of-type { top: 17px; }
.nav-toggle i:last-of-type { top: 25px; }
.nav-toggle[aria-expanded="true"] i:first-of-type { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] i:last-of-type { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 1120px) {
  .nav-toggle { display: block; }
  .nav ul {
    position: fixed; top: var(--head-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px var(--gutter) 24px;
    background: var(--night); color: var(--ink-l);
    border-bottom: 1px solid var(--line-l);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .3s var(--ease-out), visibility 0s .3s;
  }
  .nav ul.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity .25s, transform .3s var(--ease-out); }
  .nav li a:not(.btn) { display: block; padding: 14px 0; font-size: 1.125rem; border-bottom: 1px solid var(--line-l); background: none; }
  .nav li .btn { margin-top: 16px; width: 100%; }
  .site-head .nav ul .btn { background: var(--lantern); color: var(--ink-d); }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: grid; align-items: center;
  color: var(--ink-l);
  background:
    radial-gradient(120% 80% at 75% 40%, #1B3552 0%, rgba(27, 53, 82, 0) 60%),
    radial-gradient(80% 60% at 10% 110%, #13283F 0%, rgba(19, 40, 63, 0) 70%),
    var(--night);
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(15,29,46,.92) 0%, rgba(15,29,46,.6) 32%, rgba(15,29,46,0) 58%), linear-gradient(0deg, var(--night) 0%, rgba(15,29,46,0) 26%); }
.finding-tag { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; margin: -40px 0 0 14px; padding: 6px 10px; border: 1px solid rgba(242,181,68,.6); border-radius: 6px; background: rgba(15,29,46,.82); color: var(--lantern); font-size: .8125rem; font-weight: 600; white-space: nowrap; opacity: 0; will-change: transform; }
.no-webgl .finding-tag { display: none; }
.hero-still { position: absolute; right: 4vw; top: 50%; width: min(46vw, 600px); transform: translateY(-50%); opacity: 0; pointer-events: none; }
.no-webgl .hero-still { opacity: 1; }
.no-webgl #hero-canvas { display: none; }
.hero-in { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin-inline: auto; padding: calc(var(--head-h) + 40px) var(--gutter) 140px; }
.kicker { font-size: .9375rem; color: var(--ink-l-soft); margin-bottom: 22px; max-width: 34ch; }
.hero-title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2rem, 3.8vw, 3.4rem); line-height: 1.04; letter-spacing: -.02em;
  max-width: 24ch;
}
.hero-title .ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.hero-title .ln > span { display: inline-block; animation: lnUp 1.1s var(--ease-out) .15s both; }
.hero-title .ln + .ln > span { animation-delay: .3s; }
@keyframes lnUp { from { transform: translateY(105%); } }
.hero-lede { margin-top: 20px; max-width: 44ch; font-size: 1.0625rem; color: var(--ink-l-soft); }
.hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-cue {
  position: absolute; z-index: 2; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: .9375rem; color: var(--ink-l-soft); text-decoration: none; text-align: center; width: max-content; max-width: 80vw;
}
.cue-line { width: 1px; height: 54px; background: linear-gradient(var(--lantern), rgba(242, 181, 68, 0)); transform-origin: top; animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 760px) {
  .hero { align-items: start; }
  .hero-in { padding-bottom: 46svh; }
  .hero-still { width: 86vw; right: 7vw; top: auto; bottom: 90px; transform: none; }
}

/* ---------- story ---------- */
.story {
  --bg: var(--night); --ink: var(--ink-l); --ink-soft: var(--ink-l-soft); --nightness: 1; --sun: 0;
  position: relative; color: var(--ink); background: var(--bg);
}
.story-pin { position: relative; overflow: hidden; }
.sky { position: absolute; inset: 0; pointer-events: none; }
.stars {
  position: absolute; inset: 0; opacity: var(--nightness);
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 44% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 38%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 71% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 54%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 93% 9%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 84%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 36% 88%, #fff 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 64% 76%, #fff 50%, transparent 51%);
  background-size: 420px 380px;
  mask-image: linear-gradient(#000 40%, transparent 85%);
  -webkit-mask-image: linear-gradient(#000 40%, transparent 85%);
}
.sun {
  position: absolute; left: 70%; width: 90vmax; height: 90vmax; border-radius: 50%;
  top: calc(100% - var(--sun) * 70%);
  transform: translate(-50%, -20%);
  background: radial-gradient(circle, rgba(255, 236, 196, calc(.15 + var(--sun) * .55)) 0%, rgba(255, 236, 196, 0) 55%);
  opacity: calc(.25 + var(--sun) * .75);
}
.horizon { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(to top, rgba(242, 181, 68, calc((1 - var(--nightness)) * .12)), transparent); }

.story-grid { position: relative; z-index: 1; max-width: var(--maxw); margin-inline: auto; padding: 96px var(--gutter); }
.story-title { font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.25rem); line-height: 1.1; letter-spacing: -.015em; max-width: 18ch; }
.story-note { margin-top: 10px; color: var(--ink-soft); font-size: 1rem; }
.chapters { margin-top: 48px; }
.chapter { position: relative; }
.ch-num {
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-size: clamp(2.4rem, 4vw, 3.6rem); line-height: .9; color: var(--lantern);
}
.chapter h3 { margin-top: 12px; font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 1.8vw, 1.6rem); line-height: 1.1; letter-spacing: -.01em; max-width: 18ch; }
.chapter > p:not(.ch-num) { margin-top: 16px; max-width: 44ch; color: var(--ink-soft); }
.story.is-light .ch-num { color: var(--ink); }

/* stacked fallback (default, small screens, reduced motion) */
.story-stage { display: none; }
.reel { display: none; }
.story:not(.is-pinned) .chapter { padding: 56px 0; border-top: 1px solid var(--line-l); }
.story.is-stacked .chapter { --cbg: var(--night); --cink: var(--ink-l); --csoft: var(--ink-l-soft); background: var(--cbg); color: var(--cink); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); border-top: 0; }
.story.is-stacked .chapter > p:not(.ch-num) { color: var(--csoft); }
.story.is-stacked .chapter.is-day .ch-num { color: var(--cink); }
.story.is-stacked .ch-fig { margin-top: 32px; }
.story.is-stacked .ch-fig .obj-wrap { margin-inline: auto; }

/* pinned (desktop) */
.story.is-pinned .story-pin { height: 100vh; height: 100svh; }
.story.is-pinned .story-grid {
  height: 100%; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 72px);
  align-items: center; padding-top: calc(var(--head-h) + 24px); padding-bottom: 32px;
}
.story.is-pinned .story-stage { display: grid; place-items: center; height: 100%; max-height: 560px; }
.story.is-pinned .story-copy { display: flex; flex-direction: column; height: 100%; max-height: 640px; justify-content: center; }
.story.is-pinned .chapters { display: grid; margin-top: 32px; }
.story.is-pinned .chapter { grid-area: 1 / 1; opacity: 0; transform: translateY(24px); transition: opacity .5s, transform .7s var(--ease-out); pointer-events: none; }
.story.is-pinned .chapter.is-active { opacity: 1; transform: none; pointer-events: auto; transition-delay: .1s; }
.story.is-pinned .ch-fig { display: none; }
.story.is-pinned .reel { display: block; margin-top: 36px; position: relative; }
.reel-track { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--line-l); }
.story.is-light .reel-track { background: var(--line-d); }
.reel-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); background: var(--lantern); }
.story.is-light .reel-fill { background: var(--verd-d); }
.reel ol { display: grid; grid-template-columns: repeat(6, 1fr); }
.reel button {
  width: 100%; background: none; border: 0; padding: 14px 0 6px; text-align: left;
  font-size: .875rem; color: var(--ink-soft); position: relative; min-height: 44px;
}
.reel button::before { content: ""; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink-soft); transition: background-color .3s, border-color .3s; }
.reel button.is-on { color: var(--ink); font-weight: 600; }
.reel button.is-on::before { background: var(--lantern); border-color: var(--lantern); }
.story.is-light .reel button.is-on::before { background: var(--verd-d); border-color: var(--verd-d); }

/* ---------- the object ---------- */
.obj-wrap {
  container-type: inline-size;
  width: 100%; max-width: 560px; height: 480px;
  display: grid; place-items: center; position: relative;
}
.obj {
  --w1: min(400px, 100cqw); --h1: 320px;
  --w2: min(440px, 100cqw); --h2: 470px;
  --w3: min(500px, 100cqw); --h3: 400px;
  --w4: min(460px, 100cqw); --h4: 400px;
  --w5: min(540px, 100cqw); --h5: 440px;
  --w6: min(480px, 100cqw); --h6: 450px;
  --t: 0;
  position: relative; width: var(--w1); height: var(--h1);
  border-radius: 6px; background: var(--paper); color: var(--ink-d);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 40px 90px -30px rgba(242, 181, 68, .45), 0 30px 60px -30px rgba(0, 0, 0, .6);
  transition: width .9s var(--ease), height .9s var(--ease), border-radius .9s var(--ease), background-color .9s var(--ease), color .9s, box-shadow .9s var(--ease), transform .9s var(--ease);
  transform: rotate(-1.5deg);
  isolation: isolate;
}
.obj[data-state="2"] { width: var(--w2); height: var(--h2); border-radius: 18px; background: #12253A; color: var(--ink-l); transform: none; box-shadow: 0 0 0 1px rgba(159, 195, 214, .18), 0 40px 90px -40px rgba(0, 0, 0, .8); }
.obj[data-state="3"] { width: var(--w3); height: var(--h3); border-radius: 14px; background: #183049; color: var(--ink-l); transform: none; box-shadow: 0 0 0 1px rgba(159, 195, 214, .2), 0 40px 90px -40px rgba(0, 0, 0, .7); }
.obj[data-state="4"] { width: var(--w4); height: var(--h4); border-radius: 14px; background: #FFFFFF; color: var(--ink-d); transform: none; box-shadow: 0 0 0 1px rgba(16, 32, 48, .08), 0 40px 80px -40px rgba(16, 32, 48, .55); }
.obj[data-state="5"] { width: var(--w5); height: var(--h5); border-radius: 22px; background: #FFFFFF; color: var(--ink-d); transform: none; box-shadow: 0 0 0 1px rgba(16, 32, 48, .08), 0 40px 80px -40px rgba(16, 32, 48, .45); }
.obj[data-state="6"] { width: var(--w6); height: var(--h6); border-radius: 20px; background: #FFFFFF; color: var(--ink-d); transform: none; box-shadow: 0 0 0 1px rgba(31, 138, 112, .25), 0 50px 90px -40px rgba(23, 114, 93, .5); }

.L {
  position: absolute; left: 50%; top: 50%;
  padding: 22px;
  opacity: 0; transform: translate(-50%, -50%) scale(.96);
  transition: opacity .35s, transform .6s var(--ease);
  pointer-events: none;
  font-size: .9375rem; line-height: 1.45; overflow: hidden;
}
.L1 { width: var(--w1); height: var(--h1); }
.L2 { width: var(--w2); height: var(--h2); }
.L3 { width: var(--w3); height: var(--h3); }
.L4 { width: var(--w4); height: var(--h4); }
.L5 { width: var(--w5); height: var(--h5); }
.L6 { width: var(--w6); height: var(--h6); }
.obj[data-state="1"] .L1, .obj[data-state="2"] .L2, .obj[data-state="3"] .L3,
.obj[data-state="4"] .L4, .obj[data-state="5"] .L5, .obj[data-state="6"] .L6 {
  opacity: 1; transform: translate(-50%, -50%) scale(1); transition-delay: .3s, .2s;
}
.slot { height: 36px; margin: 10px 0; }
.slot-center { margin-inline: auto; width: 60%; }

/* the persistent thread */
.thread {
  position: absolute; left: 50%; top: 50%; z-index: 5;
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px 0 10px; border-radius: 999px;
  white-space: nowrap; max-width: calc(100% - 28px);
  font-weight: 650; font-size: .9375rem;
  background: var(--lantern); color: var(--ink-d);
  transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, -60px)));
  transition: transform .9s var(--ease), background-color .6s, color .6s, box-shadow .6s;
  box-shadow: 0 8px 24px -10px rgba(242, 181, 68, .8);
}
.thread-txt { overflow: hidden; text-overflow: ellipsis; }
.thread-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; flex: none; position: relative; }
.obj[data-state="1"] .thread { background: rgba(242, 181, 68, .55); box-shadow: none; }
.obj[data-state="4"] .thread, .obj[data-state="5"] .thread, .obj[data-state="6"] .thread { background: var(--verd-d); color: #fff; box-shadow: 0 10px 26px -12px rgba(23, 114, 93, .8); }
.obj[data-state="4"] .thread-dot::after, .obj[data-state="5"] .thread-dot::after, .obj[data-state="6"] .thread-dot::after {
  content: ""; position: absolute; left: 3px; top: 0; width: 4px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* L1 finding note */
.L1 { color: var(--ink-d); font-family: var(--sans); }
.note-head { display: flex; justify-content: space-between; gap: 8px; font-size: .8125rem; color: #5B5A50; border-bottom: 1px solid rgba(16, 32, 48, .18); padding-bottom: 8px; }
.note-body { font-family: var(--display); font-size: 1.05rem; line-height: 1.45; color: #1F2A33; }
.note-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: .8125rem; color: #4A4D4F; }
.note-foot b { display: block; font-weight: 600; color: #6B6A60; font-size: .75rem; }
.sev { color: var(--risk); font-weight: 650; }
.note-pen { position: absolute; right: 18px; bottom: 54px; width: 90px; }
.note-pen path { fill: none; stroke: var(--risk); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--t)); }

/* shared ui head */
.ui-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid currentColor; border-color: rgba(159, 195, 214, .2); }
.L4 .ui-head, .L5 .ui-head { border-color: var(--line-d); }
.ui-title { font-family: var(--display); font-weight: 600; font-size: 1.25rem; }
.ui-id { font-size: .8125rem; opacity: .75; }

/* L2 risk */
.L2 { color: var(--ink-l); }
.heat { display: grid; grid-template-columns: 20px 1fr; grid-template-rows: 1fr auto; gap: 6px; }
.axis { font-size: .75rem; color: var(--ink-l-soft); }
.axis-y { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; }
.axis-x { grid-column: 2; text-align: center; }
.heat-grid { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; aspect-ratio: 1.7; }
.heat-grid i { border-radius: 4px; background: rgba(159, 195, 214, .1); transition: background-color .6s; }
.obj[data-state="2"] .heat-grid i[data-s="1"], .obj[data-state="2"] .heat-grid i[data-s="2"], .obj[data-state="2"] .heat-grid i[data-s="3"], .obj[data-state="2"] .heat-grid i[data-s="4"] { background: rgba(31, 138, 112, .45); }
.obj[data-state="2"] .heat-grid i[data-s="5"], .obj[data-state="2"] .heat-grid i[data-s="6"], .obj[data-state="2"] .heat-grid i[data-s="8"], .obj[data-state="2"] .heat-grid i[data-s="9"] { background: rgba(242, 181, 68, .35); }
.obj[data-state="2"] .heat-grid i[data-s="10"], .obj[data-state="2"] .heat-grid i[data-s="12"] { background: rgba(242, 181, 68, .6); }
.obj[data-state="2"] .heat-grid i[data-s="15"], .obj[data-state="2"] .heat-grid i[data-s="16"], .obj[data-state="2"] .heat-grid i[data-s="20"], .obj[data-state="2"] .heat-grid i[data-s="25"] { background: rgba(200, 71, 63, .55); }
.heat-grid i.target { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, calc(var(--t) * .9)); }
.heat-marker {
  --e: clamp(0, var(--t) * 1.4, 1);
  position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: var(--lantern); border: 3px solid #12253A;
  box-shadow: 0 0 0 calc(var(--e) * 8px) rgba(242, 181, 68, .25);
  left: calc((10% + var(--e) * 60%) - 9px);
  top: calc((90% - var(--e) * 60%) - 9px);
}
.risk-foot { display: flex; align-items: flex-start; gap: 18px; margin-top: 12px; }
.score { font-family: var(--display); font-size: 2.4rem; line-height: 1; font-weight: 600; color: var(--lantern); font-variant-numeric: tabular-nums; min-width: 2.2ch; }
.score small { font-size: 1rem; color: var(--ink-l-soft); font-weight: 400; }
.risk-foot dl { display: grid; gap: 3px; font-size: .8125rem; flex: 1; }
.risk-foot dl div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid rgba(159, 195, 214, .14); padding-bottom: 3px; }
.risk-foot dt { color: var(--ink-l-soft); }
.risk-foot dd { font-weight: 600; text-align: right; }

/* L3 tasks */
.L3 { color: var(--ink-l); }
.ui-tabs { display: flex; gap: 12px; font-size: .8125rem; color: var(--ink-l-soft); }
.ui-tabs b { color: var(--ink-l); font-weight: 650; border-bottom: 2px solid var(--lantern); }
.tasks { margin-top: 10px; }
.tasks li { display: flex; gap: 12px; padding: 9px 8px; border-bottom: 1px solid rgba(159, 195, 214, .12); opacity: .6; }
.tasks .task-new {
  opacity: 1; border-radius: 10px; border: 1px solid rgba(242, 181, 68, .5); background: rgba(242, 181, 68, .08);
  transform: translateY(calc((1 - clamp(0, var(--t) * 1.6, 1)) * -16px));
}
.task-new .slot { margin: 0 0 4px; }
.chk { width: 18px; height: 18px; border: 2px solid rgba(159, 195, 214, .5); border-radius: 5px; flex: none; margin-top: 2px; }
.task-main { min-width: 0; flex: 1; }
.task-what { font-weight: 600; font-size: .875rem; }
.task-new .task-what { font-weight: 500; color: var(--ink-l-soft); }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 3px; font-size: .78rem; color: var(--ink-l-soft); }
.ava { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #2D4C66; color: var(--ink-l); font-size: .66rem; font-weight: 700; }
.due { color: var(--lantern); font-weight: 600; }
.tag { padding: 1px 7px; border-radius: 999px; border: 1px solid rgba(242, 181, 68, .6); color: var(--lantern); }

/* L4 evidence */
.L4 { color: var(--ink-d); }
.file { display: flex; gap: 14px; align-items: flex-start; margin-top: 16px; padding: 14px; border: 1px dashed rgba(16, 32, 48, .3); border-radius: 12px; }
.file-ico { width: 30px; flex: none; color: var(--verd-d); }
.file-main { flex: 1; min-width: 0; }
.file-name { font-weight: 650; overflow-wrap: anywhere; }
.bar { height: 6px; border-radius: 6px; background: rgba(16, 32, 48, .1); margin: 8px 0 6px; overflow: hidden; }
.bar span { display: block; height: 100%; width: calc(clamp(0, var(--t) * 1.6, 1) * 100%); background: var(--verd); border-radius: inherit; }
.file-meta { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; color: var(--ink-d-soft); font-variant-numeric: tabular-nums; }
.expiry { margin-top: 16px; }
.exp-label, .link-label { font-size: .78rem; color: var(--ink-d-soft); font-weight: 600; }
.months { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin: 8px 0; }
.months span { text-align: center; font-size: .72rem; padding: 6px 0; border-radius: 5px; background: rgba(16, 32, 48, .05); color: var(--ink-d-soft); }
.months .m-up { background: rgba(31, 138, 112, calc(.12 + var(--t) * .4)); color: var(--ink-d); font-weight: 650; }
.months .m-rem { box-shadow: inset 0 0 0 1.5px rgba(138, 90, 0, calc(var(--t))); color: var(--lantern-d); }
.months .m-exp { box-shadow: inset 0 0 0 1.5px rgba(200, 71, 63, calc(var(--t))); }
.exp-txt { font-size: .8125rem; color: var(--ink-d-soft); }
.L4 .link-label { margin-top: 14px; }
.L4 .slot { margin-top: 6px; }

/* L5 crosswalk */
.L5 { padding: 18px; }
.xw-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.xw-lines path { fill: none; stroke: var(--verd); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .7s var(--ease); opacity: .7; }
.xw-lines path.on { stroke-dashoffset: 0; }
.xw-chip {
  position: absolute; width: 36%; padding: 10px 12px; border-radius: 12px;
  background: #F4F7F5; border: 1px solid var(--line-d);
  transform: translate(-50%, -50%) scale(.94); opacity: .55;
  transition: transform .5s var(--ease-out), opacity .4s, background-color .4s, border-color .4s, box-shadow .4s;
  display: grid; gap: 1px;
}
.xw-chip span { font-size: .72rem; color: var(--ink-d-soft); font-weight: 600; }
.xw-chip b { font-family: var(--display); font-size: 1.15rem; font-weight: 650; line-height: 1.1; }
.xw-chip small { font-size: .72rem; color: var(--ink-d-soft); }
.xw-chip.c0 { left: 22%; top: 15%; }
.xw-chip.c1 { left: 78%; top: 15%; }
.xw-chip.c2 { left: 22%; top: 85%; }
.xw-chip.c3 { left: 78%; top: 85%; }
.xw-chip.on { opacity: 1; transform: translate(-50%, -50%) scale(1); background: #E7F4EF; border-color: rgba(31, 138, 112, .6); box-shadow: 0 14px 30px -18px rgba(23, 114, 93, .7); }
.xw-chip.on b { color: var(--verd-d); }
.xw-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64%; text-align: center; }
.xw-core p:first-child { font-size: .78rem; color: var(--ink-d-soft); font-weight: 600; }
.xw-core .slot { margin: 6px auto; }
.xw-count { font-size: .8125rem; font-weight: 650; color: var(--verd-d); font-variant-numeric: tabular-nums; }

/* L6 certified */
.cert { display: flex; gap: 16px; align-items: center; }
.seal { width: 82px; flex: none; color: var(--verd-d); }
.seal-tick { stroke-dasharray: 1; stroke-dashoffset: calc(1 - clamp(0, var(--t) * 1.8, 1)); }
.obj[data-state="6"] .seal circle:first-child { transform-origin: 50% 50%; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cert-title { font-family: var(--display); font-size: 1.5rem; font-weight: 650; line-height: 1.05; }
.cert-sub { font-size: .8125rem; color: var(--ink-d-soft); margin-top: 4px; }
.L6 .slot { margin: 12px auto; }
.watch { border-top: 1px solid var(--line-d); padding-top: 12px; }
.watch-head { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: .875rem; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--verd); box-shadow: 0 0 0 0 rgba(31, 138, 112, .6); animation: live 1.8s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 9px rgba(31, 138, 112, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 138, 112, 0); } }
.pulse { width: 100%; height: 34px; margin: 6px 0; }
.pulse path { fill: none; stroke: var(--verd); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-dasharray: 60 340; animation: pulse 3.2s linear infinite; }
@keyframes pulse { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }
.watch-list li { display: flex; justify-content: space-between; gap: 10px; font-size: .8125rem; padding: 5px 0; border-bottom: 1px solid var(--line-d); }
.watch-list b { font-weight: 600; }
.watch-list span { color: var(--ink-d-soft); text-align: right; }

/* ---------- section heads (day) ---------- */
[data-tone="day"] { background: var(--day); color: var(--ink-d); }
.sec-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head h2 { font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 2.8vw, 2.4rem); line-height: 1.1; letter-spacing: -.02em; }
.sec-head p { margin-top: 14px; max-width: 56ch; color: var(--ink-d-soft); font-size: 1rem; }
.sec-center { margin-inline: auto; text-align: center; }
.sec-center p { margin-inline: auto; }

/* ---------- loom (crosswalk) ---------- */
.loom { padding: clamp(80px, 11vw, 150px) 0; background: linear-gradient(var(--day), #EAF0EB); }
.loom-body { position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(40px, 8vw, 120px); align-items: center; }
.loom-controls { display: grid; gap: 10px; position: relative; z-index: 2; }
.lc {
  text-align: left; padding: 16px 20px; border-radius: 14px; min-height: 64px;
  background: #fff; border: 1px solid var(--line-d);
  font-size: 1.0625rem; font-weight: 600; line-height: 1.3;
  transition: border-color .3s, box-shadow .3s, transform .3s var(--ease-out), background-color .3s;
}
.lc-k { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-d-soft); margin-bottom: 2px; }
.lc:hover { transform: translateX(4px); border-color: rgba(16, 32, 48, .3); }
.lc[aria-pressed="true"] { background: var(--ink-d); color: var(--day); border-color: var(--ink-d); box-shadow: 0 18px 40px -22px rgba(16, 32, 48, .8); }
.lc[aria-pressed="true"] .lc-k { color: #9FC3D6; }
.loom-rails { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 2vw, 24px); position: relative; z-index: 2; }
.rail { border-top: 2px solid var(--ink-d); padding-top: 12px; }
.rail h3 { font-size: .875rem; font-weight: 700; margin-bottom: 12px; min-height: 2.6em; }
.rail ul { display: grid; gap: 8px; }
.rail li {
  font-family: var(--display); font-size: clamp(1rem, 1.5vw, 1.25rem); font-weight: 600;
  padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; color: rgba(16, 32, 48, .4);
  transition: color .35s, background-color .35s, border-color .35s, transform .45s var(--ease-out);
}
.rail li.on { color: var(--verd-d); background: #fff; border-color: rgba(31, 138, 112, .5); transform: scale(1.04); box-shadow: 0 12px 28px -18px rgba(23, 114, 93, .7); }
.loom-threads { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
.loom-threads path { fill: none; stroke: var(--verd); stroke-width: 1.6; opacity: .75; }
.loom-out { margin-top: 28px; font-size: 1rem; font-weight: 600; min-height: 1.6em; color: var(--verd-d); }
.loom-more { margin-top: 10px; max-width: 64ch; color: var(--ink-d-soft); }
@media (max-width: 900px) {
  .loom-body { grid-template-columns: 1fr; gap: 40px; }
  .loom-rails { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .loom-threads { display: none; }
}

/* ---------- R-Trax ---------- */
.rtrax { padding: clamp(80px, 10vw, 140px) 0; background: #EAF0EB; }
.rt-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.rt-copy h2 { font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.1; letter-spacing: -.015em; }
.rt-copy > p { margin-top: 18px; color: var(--ink-d-soft); }
.rt-facts { margin: 22px 0; display: grid; gap: 8px; }
.rt-facts li { padding-left: 22px; position: relative; }
.rt-facts li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 3px; border: 2px solid var(--verd-d); }
.rt-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; font-size: .9375rem; color: var(--ink-d-soft); }
.sw { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; background: var(--sw); box-shadow: 0 0 0 1px var(--line-d); }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink-d); }

.app {
  border-radius: 18px; background: #fff; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(16, 32, 48, .08), 0 60px 100px -50px rgba(16, 32, 48, .55);
  transform: perspective(1600px) rotateY(-6deg) rotateX(2deg);
  transition: transform .8s var(--ease);
}
.app:hover, .app:focus-within { transform: none; }
.app { position: relative; }
.app-tour { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line-d); background: #F4F7F5; }
.tour-play { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border: 1px solid var(--line-d); border-radius: 999px; background: #fff; font-size: .8125rem; font-weight: 600; }
.tour-play svg { width: 11px; height: 11px; fill: currentColor; }
.tour-play .i-play, .tour-play[aria-pressed="true"] .i-pause { display: none; }
.tour-play[aria-pressed="true"] .i-play { display: inline; }
.tour-steps { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tour-steps li { height: 4px; border-radius: 4px; overflow: hidden; background: rgba(16, 32, 48, .1); }
.tour-steps i { display: block; height: 100%; background: var(--org); transform-origin: left; transform: scaleX(0); }
.cursor { position: absolute; left: -4px; top: -3px; z-index: 5; width: 22px; height: 22px; pointer-events: none; opacity: 0; transform: translate(120px, 200px); transition: transform .9s var(--ease), opacity .3s; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.cursor.on { opacity: 1; }
.cursor svg path { fill: var(--ink-d); stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.cursor::after { content: ""; position: absolute; left: -7px; top: -8px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--org); opacity: 0; }
.cursor.click::after { animation: clickRing .5s var(--ease-out); }
@keyframes clickRing { from { opacity: 1; transform: scale(.3); } to { opacity: 0; transform: scale(1.7); } }
.pane { animation: paneIn .45s var(--ease-out); }
@keyframes paneIn { from { opacity: 0; transform: translateY(8px); } }
.row-new { animation: rowIn .6s var(--ease-out); }
.row-new td { background: rgba(242, 181, 68, .12); }
@keyframes rowIn { from { opacity: 0; transform: translateY(-6px); } }
.evlist li.flash { animation: flash 1.4s var(--ease-out); }
@keyframes flash { from { background: rgba(31, 138, 112, .2); } }
.app-bar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: var(--org); color: #fff; transition: background-color .5s; }
.app-dots { display: flex; gap: 6px; }
.app-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.app-org { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: .9375rem; }
.app-org small { font-weight: 500; opacity: .85; font-size: .78rem; }
.org-badge { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: #fff; color: var(--org); font-family: var(--display); font-weight: 700; transition: color .5s; }
.app-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 400px; }
.app-side { display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; background: #F4F7F5; border-right: 1px solid var(--line-d); }
.app-side [role="tab"] { text-align: left; padding: 11px 12px; border: 0; background: none; border-radius: 8px; font-size: .9375rem; font-weight: 500; color: var(--ink-d-soft); min-height: 44px; }
.app-side [role="tab"]:hover { background: rgba(16, 32, 48, .05); }
.app-side [role="tab"][aria-selected="true"] { background: #fff; color: var(--ink-d); font-weight: 650; box-shadow: inset 3px 0 0 var(--org), 0 1px 3px rgba(16, 32, 48, .08); }
.app-main { padding: 18px 20px; min-width: 0; }
.pane-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.pane-head h3 { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.feed-toggle { border: 1px solid var(--line-d); background: none; border-radius: 999px; padding: 6px 14px; font-size: .875rem; min-height: 36px; }
.feed { display: grid; gap: 8px; }
.feed li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 11px 12px; border: 1px solid var(--line-d); border-radius: 10px; font-size: .9rem; animation: feedIn .6s var(--ease-out); }
.feed li .k { width: 9px; height: 9px; border-radius: 50%; }
.feed li .k-ok { background: var(--verd); }
.feed li .k-warn { background: var(--lantern); }
.feed li .k-bad { background: var(--risk); }
.feed li b { font-weight: 650; display: block; }
.feed li small { color: var(--ink-d-soft); font-size: .8rem; }
.feed time { font-size: .8rem; color: var(--ink-d-soft); font-variant-numeric: tabular-nums; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .78rem; color: var(--ink-d-soft); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--line-d); }
.tbl td { padding: 11px 6px; border-bottom: 1px solid var(--line-d); overflow-wrap: anywhere; }
.st { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.st-red { background: #FBE7E5; color: #9A2F28; }
.st-amb { background: #FCF0D6; color: #7A4F00; }
.st-grn { background: #E2F2EC; color: #145F4D; }
.fwbars { display: grid; gap: 14px; }
.fwbars li { display: grid; grid-template-columns: 110px 1fr 42px; gap: 12px; align-items: center; font-size: .9rem; }
.fwbars i { height: 8px; border-radius: 8px; background: rgba(16, 32, 48, .08); position: relative; overflow: hidden; }
.fwbars i::after { content: ""; position: absolute; inset: 0; width: calc(var(--v) * 100%); background: var(--org); border-radius: inherit; transform-origin: left; animation: grow 1s var(--ease-out); }
@keyframes grow { from { transform: scaleX(0); } }
.fwbars b { text-align: right; font-variant-numeric: tabular-nums; }
.pane-note { margin-top: 18px; font-size: .8125rem; color: var(--ink-d-soft); }
.evlist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-d); font-size: .9rem; }
@media (max-width: 960px) {
  .rt-grid { grid-template-columns: 1fr; }
  .app { transform: none; }
}
@media (max-width: 600px) {
  .app-body { grid-template-columns: 1fr; }
  .app-side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line-d); padding: 8px; }
  .app-side [role="tab"] { white-space: nowrap; flex: none; }
  .app-side [role="tab"][aria-selected="true"] { box-shadow: inset 0 -3px 0 var(--org); }
  .fwbars li { grid-template-columns: 90px 1fr 40px; }
  .tbl th:nth-child(2), .tbl td:nth-child(2) { display: none; }
}

/* ---------- R-Trax (product reel) ---------- */
.rtrax { padding: clamp(80px, 10vw, 140px) 0; background: #EAF0EB; overflow: hidden; }
.rt-head { display: flex; justify-content: space-between; align-items: end; gap: 24px 48px; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 52px); }
.rt-head h2 { max-width: 22ch; font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 2.8vw, 2.4rem); line-height: 1.1; letter-spacing: -.02em; }
.rt-head p { margin-top: 14px; max-width: 60ch; color: var(--ink-d-soft); }
.btn-dark { background: var(--ink-d); color: #fff; }
.btn-dark:hover { background: var(--night-2); }

.reel { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.reel-tabs { display: grid; gap: 4px; }
.reel-tabs [role="tab"] {
  position: relative; display: grid; gap: 3px; text-align: left; padding: 14px 16px 16px; border: 0; border-radius: 12px;
  background: none; color: var(--ink-d-soft); transition: background-color .3s, color .3s;
}
.reel-tabs [role="tab"]:hover { background: rgba(255, 255, 255, .5); }
.reel-tabs [role="tab"] b { font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--ink-d); }
.reel-tabs [role="tab"] span { font-size: .875rem; line-height: 1.4; }
.reel-tabs [role="tab"][aria-selected="true"] { background: #fff; color: var(--ink-d); box-shadow: 0 1px 3px rgba(16, 32, 48, .08), 0 14px 30px -18px rgba(16, 32, 48, .3); }
.reel-prog { position: absolute; left: 16px; right: 16px; bottom: 7px; height: 2px; border-radius: 2px; overflow: hidden; background: transparent; }
[aria-selected="true"] > .reel-prog { background: rgba(16, 32, 48, .08); }
.reel-prog i { display: block; height: 100%; background: var(--verd); transform-origin: left; transform: scaleX(0); }

.device {
  margin: 0; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 32, 48, .08), 0 50px 90px -40px rgba(16, 32, 48, .5);
  transform: perspective(1800px) rotateY(-4deg) rotateX(1.5deg); transition: transform .8s var(--ease);
}
.device:hover, .device:focus-within { transform: none; }
.device-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: #F4F6F8; border-bottom: 1px solid var(--line-d); }
.device-bar .app-dots i { background: rgba(16, 32, 48, .18); }
.device-url { flex: 1; max-width: 340px; margin-inline: auto; padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line-d); font-size: .8125rem; color: var(--ink-d-soft); text-align: center; }
.device-demo { font-size: .75rem; font-weight: 600; color: var(--lantern-d); background: #FCF0D6; padding: 3px 9px; border-radius: 999px; }
.device-screen { position: relative; aspect-ratio: 1536 / 674; overflow: hidden; background: #F3F5F7; }
.shot { position: absolute; inset: 0; }
.shot[hidden] { display: block; visibility: hidden; opacity: 0; }
.shot { opacity: 0; transition: opacity .7s var(--ease), visibility 0s .7s; visibility: hidden; }
.shot.is-on { opacity: 1; visibility: visible; transition: opacity .7s var(--ease); }
.layer { position: absolute; inset: 0; transform-origin: 0 0; transition: transform 1.8s cubic-bezier(.45, 0, .25, 1); will-change: transform; }
.layer img { position: absolute; left: 0; top: 0; width: 100%; height: auto; max-width: none; }

.hot { position: absolute; left: var(--x); top: var(--y); z-index: 2; width: 0; height: 0; opacity: 0; }
.hot::before, .hot::after { content: ""; position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--lantern); box-shadow: 0 0 0 3px rgba(255, 255, 255, .9); }
.hot::after { background: none; box-shadow: none; border: 2px solid var(--lantern); animation: ping 1.8s var(--ease-out) infinite; }
.hot em {
  position: absolute; left: 16px; top: -15px; white-space: nowrap; font-style: normal;
  padding: 6px 11px; border-radius: 8px; background: var(--ink-d); color: #fff; font-size: .8125rem; font-weight: 600;
  box-shadow: 0 10px 24px -10px rgba(16, 32, 48, .6);
}
.hot-l em { left: auto; right: 16px; }
.shot.is-on .hot { animation: hotIn .5s var(--ease-out) forwards; animation-delay: var(--d); }
.hot em { opacity: 0; transform-origin: left center; }
.hot-l em { transform-origin: right center; }
.shot.is-on .hot em { animation: label 2.5s var(--ease) both; animation-delay: var(--d); }
.shot.is-on .hot:last-of-type em { animation-name: labelStay; }
@keyframes label { 0% { opacity: 0; transform: translateY(4px) scale(.96); } 12%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes labelStay { 0% { opacity: 0; transform: translateY(4px) scale(.96); } 12%, 100% { opacity: 1; transform: none; } }
@keyframes hotIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ping { from { transform: scale(1); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
.device-foot { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-top: 1px solid var(--line-d); background: #F4F6F8; font-size: .8125rem; color: var(--ink-d-soft); }
.device-foot .tour-play { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border: 1px solid var(--line-d); border-radius: 999px; background: #fff; font-size: .8125rem; font-weight: 600; color: var(--ink-d); }
.tour-play svg { width: 11px; height: 11px; fill: currentColor; }
.tour-play .i-play, .tour-play[aria-pressed="true"] .i-pause { display: none; }
.tour-play[aria-pressed="true"] .i-play { display: inline; }

.rt-more { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: clamp(36px, 5vw, 56px); border-top: 1px solid var(--line-d); }
.rt-more li { display: grid; gap: 4px; padding: 20px 20px 0 0; }
.rt-more li + li { padding-left: 20px; border-left: 1px solid var(--line-d); }
.rt-more b { font-family: var(--display); font-weight: 600; }
.rt-more span { font-size: .9rem; color: var(--ink-d-soft); }

@media (max-width: 1000px) {
  .reel { grid-template-columns: 1fr; }
  .reel-tabs { grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .device { transform: none; }
}
@media (max-width: 760px) {
  .hot em { display: none; }
  .rt-more { grid-template-columns: 1fr 1fr; }
  .rt-more li:nth-child(3) { padding-left: 0; border-left: 0; }
  .reel-tabs [role="tab"] span { display: none; }
  .reel-tabs { grid-auto-columns: max-content; }
}

.fw-g li.in-rt { position: relative; padding-left: 24px; }
.fw-g li.in-rt::before, .key-dot { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--verd); box-shadow: 0 0 0 3px rgba(31, 138, 112, .18); }
.fw-g li.in-rt::before { position: absolute; left: 10px; top: 50%; margin-top: -3.5px; }
.hub-key { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: clamp(28px, 4vw, 44px); font-size: .9rem; color: var(--ink-d-soft); text-align: center; }

/* ---------- credits (services) ---------- */
.credits { padding: clamp(90px, 12vw, 170px) 0; background: var(--day); }
.roll { max-width: 980px; margin-inline: auto; }
.role {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px);
  align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line-d);
}
.role dt { text-align: right; font-family: var(--display); font-weight: 500; font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.15; letter-spacing: -.01em; transition: color .3s; }
.role dd { max-width: 40ch; color: var(--ink-d-soft); }
.role:hover dt { color: var(--verd-d); }
@media (max-width: 640px) {
  .role { grid-template-columns: 1fr; gap: 6px; }
  .role dt { text-align: left; }
}

/* ---------- engagement track (steps) ---------- */
.track { position: relative; overflow: hidden; background: var(--night); color: var(--ink-l); padding: clamp(80px, 10vw, 130px) 0; }
.track::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line-l) 1px, transparent 1px), linear-gradient(90deg, var(--line-l) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 72%);
}
.track-pin { position: relative; }
.track-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 56px; align-items: end; }
.track-title h2 { font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 2.8vw, 2.4rem); line-height: 1.1; letter-spacing: -.02em; }
.track-title p { margin-top: 12px; max-width: 44ch; color: var(--ink-l-soft); }
.track-rail { position: relative; padding-top: 16px; }
.rail-line { position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px; overflow: hidden; background: var(--line-l); }
.rail-fill { position: absolute; inset: 0; background: var(--lantern); transform-origin: left; transform: scaleX(.02); }
.track-rail ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; font-size: .875rem; color: var(--ink-l-soft); }
.track-rail li { transition: color .3s; }
.track-rail li.on { color: var(--ink-l); font-weight: 600; }
.track:not(.is-pinned) .track-rail { display: none; }
.track-view { margin-top: clamp(36px, 5vw, 56px); }
.track-reel { display: grid; gap: 24px; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.stage {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(22px, 3vw, 40px); border: 1px solid var(--line-l); border-radius: 18px;
  background: linear-gradient(160deg, rgba(45, 76, 102, .45), rgba(15, 29, 46, .25));
}
.stage-n { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(242, 181, 68, .55); color: var(--lantern); font-family: var(--display); font-weight: 600; }
.stage h3 { margin-top: 16px; font-family: var(--display); font-weight: 600; font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.1; }
.stage-copy > p { margin-top: 10px; max-width: 40ch; color: var(--ink-l-soft); }
.stage-copy > .stage-out { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line-l); color: var(--ink-l); }
.stage-out b { margin-right: .3em; color: var(--lantern); font-weight: 600; }
.art { display: grid; place-items: center; min-height: 300px; }

.track.is-pinned { padding: 0; }
.track.is-pinned .track-pin { height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-top: var(--head-h); }
.track.is-pinned .track-reel {
  display: flex; width: max-content; max-width: none; margin: 0; gap: 32px;
  padding-inline: calc((100vw - min(1000px, 76vw)) / 2);
}
.track.is-pinned .art { min-height: 0; }
.track.is-pinned .stage { padding-block: clamp(22px, 3vh, 36px); }
.track.is-pinned .stage { width: min(1000px, 76vw); opacity: .35; transform: scale(.96); transition: opacity .5s, transform .6s var(--ease-out); }
.track.is-pinned .stage.is-on { opacity: 1; transform: none; }

/* output artefacts, paper on the night stage */
.doc, .gantt, .board, .certificate, .mon {
  position: relative; width: min(100%, 440px); padding: 22px; border-radius: 12px;
  background: var(--paper); color: var(--ink-d);
  box-shadow: 0 30px 60px -22px rgba(0, 0, 0, .6);
}
.doc { overflow: hidden; transform: rotate(-1.5deg); }
.doc-t, .m-t, .b-t { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.doc-s { font-size: .8125rem; color: var(--ink-d-soft); }
.doc-rows { margin-top: 14px; }
.doc-rows li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-d); font-size: .9rem; }
.tag { font-style: normal; font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.t-red { background: #FBE7E5; color: #9A2F28; }
.t-amb { background: #FCF0D6; color: #7A4F00; }
.t-grn { background: #E2F2EC; color: #145F4D; }
.doc-lens { position: absolute; left: 0; right: 0; top: 0; height: 44px; opacity: 0; pointer-events: none; background: linear-gradient(rgba(242, 181, 68, 0), rgba(242, 181, 68, .25)); border-bottom: 2px solid var(--lantern); }
.js .tag { opacity: 0; transform: scale(1.7) rotate(-8deg); }
.js .stage.is-on .tag { animation: stamp .45s var(--ease-out) forwards; }
.js .stage.is-on .doc-rows li:nth-child(1) .tag { animation-delay: .5s; }
.js .stage.is-on .doc-rows li:nth-child(2) .tag { animation-delay: .85s; }
.js .stage.is-on .doc-rows li:nth-child(3) .tag { animation-delay: 1.2s; }
.js .stage.is-on .doc-rows li:nth-child(4) .tag { animation-delay: 1.55s; }
.js .stage.is-on .doc-rows li:nth-child(5) .tag { animation-delay: 1.9s; }
.js .stage.is-on .doc-lens { animation: lens 2.3s var(--ease) .2s forwards; }
@keyframes stamp { to { opacity: 1; transform: none; } }
@keyframes lens { 0% { opacity: 0; transform: translateY(56px); } 12%, 88% { opacity: 1; } 100% { opacity: 0; transform: translateY(260px); } }

.gantt { width: min(100%, 480px); }
.g-head, .g-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; }
.g-head { grid-template-columns: 112px repeat(6, minmax(0, 1fr)); padding-bottom: 8px; border-bottom: 1px solid var(--line-d); font-size: .75rem; color: var(--ink-d-soft); }
.g-row { padding: 9px 0; border-bottom: 1px dashed var(--line-d); font-size: .85rem; }
.g-lane { position: relative; height: 24px; background-image: linear-gradient(90deg, var(--line-d) 1px, transparent 1px); background-size: calc(100% / 6) 100%; }
.g-bar {
  position: absolute; top: 2px; bottom: 2px; display: flex; align-items: center; padding-left: 8px; border-radius: 6px;
  left: calc(var(--s) / 6 * 100%); width: calc((var(--e) - var(--s)) / 6 * 100%);
  font-size: .7rem; font-weight: 600; color: #fff; transform-origin: left;
}
.r-h { background: var(--risk); }
.r-m { background: var(--lantern); color: var(--ink-d); }
.r-l { background: var(--verd); }
.js .g-bar { transform: scaleX(0); }
.js .stage.is-on .g-bar { animation: barIn .7s var(--ease-out) forwards; }
.js .stage.is-on .g-row:nth-child(3) .g-bar { animation-delay: .25s; }
.js .stage.is-on .g-row:nth-child(4) .g-bar { animation-delay: .5s; }
.js .stage.is-on .g-row:nth-child(5) .g-bar { animation-delay: .75s; }
.js .stage.is-on .g-row:nth-child(6) .g-bar { animation-delay: 1s; }
@keyframes barIn { to { transform: scaleX(1); } }

.b-t { display: flex; justify-content: space-between; gap: 12px; }
.b-t b { color: var(--verd-d); font-variant-numeric: tabular-nums; }
.b-meter { display: block; margin-top: 12px; height: 8px; border-radius: 8px; overflow: hidden; background: rgba(16, 32, 48, .08); }
.b-meter i { display: block; height: 100%; background: var(--verd); transform-origin: left; }
.b-list { margin-top: 12px; }
.b-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: .9rem; }
.b-list li::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--verd); background-color: var(--verd);
  background: var(--verd) center / 12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 6 2.5 2.5 4.5-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition: background-color .3s, border-color .3s;
}
.js .b-meter i { transform: scaleX(0); }
.js .stage.is-on .b-meter i { transform: scaleX(1); transition: transform 2.6s var(--ease) .3s; }
.js .b-list li { color: var(--ink-d-soft); transition: color .3s; }
.js .b-list li::before { background-color: transparent; border-color: rgba(16, 32, 48, .3); }
.js .stage.is-on .b-list li { color: var(--ink-d); }
.js .stage.is-on .b-list li::before { background-color: var(--verd); border-color: var(--verd); }
.js .stage.is-on .b-list li:nth-child(1), .js .stage.is-on .b-list li:nth-child(1)::before { transition-delay: .5s; }
.js .stage.is-on .b-list li:nth-child(2), .js .stage.is-on .b-list li:nth-child(2)::before { transition-delay: .9s; }
.js .stage.is-on .b-list li:nth-child(3), .js .stage.is-on .b-list li:nth-child(3)::before { transition-delay: 1.3s; }
.js .stage.is-on .b-list li:nth-child(4), .js .stage.is-on .b-list li:nth-child(4)::before { transition-delay: 1.7s; }
.js .stage.is-on .b-list li:nth-child(5), .js .stage.is-on .b-list li:nth-child(5)::before { transition-delay: 2.1s; }
.js .stage.is-on .b-list li:nth-child(6), .js .stage.is-on .b-list li:nth-child(6)::before { transition-delay: 2.5s; }

.certificate { padding: 30px 26px 26px; text-align: center; outline: 5px double rgba(138, 90, 0, .3); outline-offset: -12px; transform: rotate(-1deg); }
.c-k { font-size: .8125rem; color: var(--lantern-d); }
.c-t { margin-top: 10px; font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.1; }
.c-o { margin-top: 4px; color: var(--ink-d-soft); }
.c-lines { display: grid; justify-items: center; gap: 7px; margin: 18px auto 0; width: 70%; }
.c-lines i { width: 100%; height: 5px; border-radius: 4px; background: rgba(16, 32, 48, .1); }
.c-lines i:nth-child(2) { width: 84%; }
.c-lines i:nth-child(3) { width: 60%; }
.c-small { margin-top: 16px; font-size: .75rem; color: var(--ink-d-soft); }
.c-seal { position: absolute; right: 22px; bottom: 18px; width: 58px; fill: none; stroke: var(--lantern-d); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.c-seal circle:first-child { fill: rgba(242, 181, 68, .3); }
.js .certificate { opacity: 0; transform: translateY(26px) rotate(2deg); transition: opacity .6s, transform .9s var(--ease-out); }
.js .stage.is-on .certificate { opacity: 1; transform: rotate(-1deg); }
.js .c-seal { opacity: 0; transform: scale(1.9) rotate(-25deg); }
.js .stage.is-on .c-seal { animation: stamp .5s var(--ease-out) 1s forwards; }

.m-chart { width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.m-grid { fill: none; stroke: var(--line-d); }
.m-area { fill: rgba(31, 138, 112, .12); }
.m-line { fill: none; stroke: var(--verd); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.m-ev { margin-top: 12px; display: grid; gap: 6px; }
.m-ev li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: #fff; font-size: .875rem; }
.m-ev .k { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.m-ev .k-ok { background: var(--verd); }
.m-ev .k-warn { background: var(--lantern); }
.js .m-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .stage.is-on .m-line { stroke-dashoffset: 0; transition: stroke-dashoffset 2s var(--ease) .2s; }
.js .m-area { opacity: 0; }
.js .stage.is-on .m-area { opacity: 1; transition: opacity 1s 1.4s; }
.js .m-ev li { opacity: 0; transform: translateX(16px); }
.js .stage.is-on .m-ev li { opacity: 1; transform: none; transition: opacity .5s, transform .5s var(--ease-out); }
.js .stage.is-on .m-ev li:nth-child(1) { transition-delay: 1.4s; }
.js .stage.is-on .m-ev li:nth-child(2) { transition-delay: 1.8s; }
.js .stage.is-on .m-ev li:nth-child(3) { transition-delay: 2.2s; }

@media (max-width: 900px) {
  .track-head, .stage { grid-template-columns: 1fr; }
  .art { min-height: 0; }
}

/* ---------- register hub (frameworks) ---------- */
.register { padding: clamp(90px, 12vw, 150px) 0; background: var(--day); overflow: hidden; }
.hub { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 270px) minmax(0, 1fr); gap: clamp(48px, 8vw, 140px); align-items: center; }
.hub-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.hub-side { position: relative; display: grid; gap: 26px; }
.hub-l { justify-items: end; text-align: right; }
.fw-g h3 { margin-bottom: 10px; font-size: .875rem; font-weight: 700; color: var(--verd-d); }
.fw-g ul { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hub-l .fw-g ul { align-items: flex-end; }
.fw-g li {
  padding: 5px 12px; border: 1px solid var(--line-d); border-radius: 999px; background: #fff;
  font-family: var(--display); font-weight: 500; font-size: .9375rem; line-height: 1.3;
  transition: border-color .25s, background-color .25s, color .25s;
}
.fw-g li:hover, .fw-g li.hot { border-color: var(--verd); background: #E2F2EC; color: var(--verd-d); }
.hub-core { position: relative; display: grid; place-items: center; aspect-ratio: 1; text-align: center; }
.core-rings, .core-rings i { position: absolute; inset: 0; border-radius: 50%; }
.core-rings i { border: 1px dashed rgba(31, 138, 112, .5); animation: spin 40s linear infinite; }
.core-rings i:nth-child(2) { inset: 12%; border: 1px solid rgba(16, 32, 48, .12); animation-duration: 70s; animation-direction: reverse; }
.core-rings i:nth-child(3) {
  inset: 22%; border: 0; animation: corePulse 3.6s ease-in-out infinite;
  background: radial-gradient(circle at 50% 35%, #fff, #E4EEE7);
  box-shadow: 0 20px 50px -18px rgba(16, 32, 48, .35), inset 0 0 0 1px rgba(16, 32, 48, .08);
}
.core-txt { position: relative; max-width: 13ch; }
.core-txt b { display: block; font-family: var(--display); font-weight: 600; font-size: 1.15rem; line-height: 1.15; }
.core-txt span { display: block; margin-top: 6px; font-size: .8125rem; color: var(--ink-d-soft); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes corePulse { 50% { box-shadow: 0 20px 50px -18px rgba(16, 32, 48, .35), inset 0 0 0 1px rgba(16, 32, 48, .08), 0 0 0 12px rgba(31, 138, 112, .08); } }
.w-base { fill: none; stroke: rgba(16, 32, 48, .16); stroke-width: 1.2; transition: stroke .25s, stroke-width .25s; }
.w-base.hot { stroke: var(--verd); stroke-width: 2; }
.w-pulse { fill: none; stroke: var(--lantern); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 5 95; stroke-dashoffset: 100; animation: wire 3.6s linear infinite; animation-delay: var(--d, 0s); }
@keyframes wire { to { stroke-dashoffset: 0; } }
.hub.js .w-base { stroke-dasharray: 100; stroke-dashoffset: 100; }
.hub.js.in .w-base { stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s var(--ease), stroke .25s, stroke-width .25s; }
.hub.js .w-pulse { opacity: 0; }
.hub.js.in .w-pulse { opacity: 1; transition: opacity .6s 1.2s; }
.hub.js .fw-g li { opacity: 0; transform: translateY(8px); }
.hub.js.in .fw-g li { opacity: 1; transform: none; transition: opacity .5s calc(var(--i, 0) * 40ms), transform .5s var(--ease-out) calc(var(--i, 0) * 40ms), border-color .25s, background-color .25s, color .25s; }
@media (max-width: 899.98px) {
  .hub { grid-template-columns: 1fr; gap: 32px; }
  .hub-core { order: -1; width: 220px; margin-inline: auto; }
  .hub-wires { display: none; }
  .hub-l { justify-items: stretch; text-align: left; }
  .fw-g ul, .hub-l .fw-g ul { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
}

/* ---------- scenes (industries) ---------- */
.scenes { padding: clamp(80px, 10vw, 140px) 0; background: linear-gradient(var(--day), #E9EEE6); }
.scene-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink-d); }
.scene { padding: 28px 24px 32px 0; border-bottom: 1px solid var(--line-d); position: relative; }
.scene:not(:nth-child(3n + 1)) { padding-left: 24px; border-left: 1px solid var(--line-d); }
.slug { font-size: .9rem; color: var(--ink-d-soft); font-style: italic; }
.scene h3 { margin-top: 10px; font-family: var(--display); font-weight: 600; font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.12; }
.scene > p:last-child { margin-top: 10px; color: var(--ink-d-soft); }
.sc-art { width: 120px; height: 64px; margin-bottom: 18px; overflow: visible; }
.sc-art .dw > * { fill: none; stroke: var(--ink-d); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sc-art .ac { fill: none; stroke: var(--lantern-d); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sc-art .ac-f { fill: var(--lantern); }
.sc-art .ac-check circle { fill: rgba(242, 181, 68, .35); }
.sc-art .page { fill: rgba(242, 181, 68, .55); }
.scene-list.js .dw > * { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s var(--ease); }
.scene-list.js .scene.in .dw > * { stroke-dashoffset: 0; }
.scene-list.js .scene.in .dw > :nth-child(2) { transition-delay: .2s; }
.scene-list.js .scene.in .dw > :nth-child(3) { transition-delay: .4s; }
.scene-list.js .scene.in .dw > :nth-child(4) { transition-delay: .6s; }
.scene-list.js .ac, .scene-list.js .ac-f { opacity: 0; transition: opacity .6s .9s; }
.scene-list.js .scene.in .ac, .scene-list.js .scene.in .ac-f { opacity: 1; }
.scene.in .ac-check { transform-box: fill-box; transform-origin: center; animation: beat 2.4s ease-in-out 1.4s infinite; }
.scene.in .flag { transform-box: fill-box; transform-origin: left center; animation: flag 1.6s ease-in-out infinite; }
.waves path { opacity: .15; }
.scene.in .waves path { animation: wave 1.8s ease-out infinite; }
.scene.in .waves path:nth-child(n + 3) { animation-delay: .3s; }
.ecg { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.scene.in .ecg { animation: ecg 2.6s linear infinite; }
.scene.in .page { transform-box: view-box; transform-origin: 60px 0; animation: flip 4s var(--ease) infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
@keyframes flag { 0%, 100% { transform: skewY(0) scaleX(1); } 50% { transform: skewY(-9deg) scaleX(.84); } }
@keyframes wave { 0% { opacity: .1; } 30% { opacity: 1; } 100% { opacity: .1; } }
@keyframes ecg { from { stroke-dashoffset: 1; } to { stroke-dashoffset: -1; } }
@keyframes flip { 0%, 35% { transform: scaleX(1); } 50%, 85% { transform: scaleX(-1); } 100% { transform: scaleX(1); } }
.logo-slot { margin-top: 40px; padding: 18px; border: 1px dashed rgba(16, 32, 48, .25); border-radius: 10px; text-align: center; color: var(--ink-d-soft); font-size: .9375rem; }
@media (max-width: 900px) {
  .scene-list { grid-template-columns: 1fr 1fr; }
  .scene:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .scene:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line-d); }
}
@media (max-width: 560px) {
  .scene-list { grid-template-columns: 1fr; }
  .scene:nth-child(even) { padding-left: 0; border-left: 0; }
}

/* ---------- finale ---------- */
.finale {
  position: relative; overflow: hidden; color: var(--ink-d);
  padding: clamp(100px, 14vw, 200px) 0;
  background: linear-gradient(180deg, #E9EEE6 0%, #F8E9C8 55%, #F4D9A3 100%);
}
.finale-sun { position: absolute; left: 50%; bottom: -60vmin; width: 120vmin; height: 120vmin; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 246, 225, .95) 0%, rgba(255, 228, 170, .5) 35%, rgba(255, 228, 170, 0) 65%); }
.finale-in { position: relative; text-align: center; }
.finale h2 { font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 4.6vw, 3.8rem); line-height: 1.04; letter-spacing: -.02em; }
.finale-in > p { margin: 18px auto 0; max-width: 52ch; font-size: 1rem; color: #3B4652; }
.finale-cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.finale .btn { background: var(--ink-d); color: var(--day); box-shadow: 0 16px 40px -20px rgba(16, 32, 48, .8); }
.finale .btn-ghost { background: transparent; color: var(--ink-d); box-shadow: none; }
.finale :focus-visible { outline-color: var(--ink-d); }
.contact { margin: 54px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 48px; }
.contact dt { font-size: .875rem; color: #4A5560; }
.contact dd a { font-family: var(--display); font-size: clamp(1.05rem, 1.6vw, 1.25rem); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---------- footer ---------- */
.foot { background: var(--night); color: var(--ink-l); padding: 64px 0 90px; }
.foot-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; }
.foot-logo img { display: block; height: 34px; width: auto; }
.foot-brand p:last-child { margin-top: 8px; color: var(--ink-l-soft); max-width: 40ch; }
.foot nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; }
.foot nav a { text-decoration: none; color: var(--ink-l-soft); display: inline-block; padding: 6px 0; }
.foot nav a:hover { color: var(--ink-l); }
.foot-small { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line-l); font-size: .875rem; color: var(--ink-l-soft); }
@media (max-width: 640px) { .foot-in { grid-template-columns: 1fr; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .cue-line { transform: none; }
  .app { transform: none; }
  .pulse path { stroke-dasharray: none; }
}

@media (max-width: 420px) {
  .obj-wrap { height: 500px; }
  .L { padding: 16px; font-size: .875rem; }
  .xw-chip { width: 42%; padding: 8px 9px; }
  .xw-chip.c0, .xw-chip.c2 { left: 23%; }
  .xw-chip.c1, .xw-chip.c3 { left: 77%; }
  .xw-chip b { font-size: 1.1rem; }
  .cert-title { font-size: 1.6rem; }
  .seal { width: 64px; }
  .thread { font-size: .875rem; }
}
