/* Copyright (c) 2026 Nitin Sauran. All Rights Reserved. See LICENSE. */
/* The paged pages: the home story and About. Tokens come from site.css. */
.story { position: fixed; inset: 0; z-index: 1000; background: var(--bg); color: var(--text); overflow: hidden;
  touch-action: none; overscroll-behavior: none; outline: none; animation: fade 300ms var(--ease-out); }
.story--leaving { animation: fadeOut 320ms var(--ease-out) forwards; }
/* the story takes focus itself so its keys work; as a full-screen layer it gets no ring and no rounded corners */
.story:focus-visible { outline: none; border-radius: 0; }
.story__hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-3); pointer-events: none; }
.story__hint span { width: 20px; height: 32px; border-radius: 12px; border: 1.5px solid var(--text-3); position: relative; }
.story__hint span::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: var(--text-3);
  animation: wheelCue 1.6s var(--ease-out) infinite; }
@keyframes wheelCue { 0% { opacity: 0; transform: translateY(0) } 30% { opacity: 1 } 100% { opacity: 0; transform: translateY(10px) } }
@media (prefers-reduced-motion: reduce) { .story__hint span::after { animation: none; } }
/* ── Story v3: real mini tool cards, too many of them, then yours ── */
/* the story keeps its own pastel pills in either theme (light darkens mint and amber for text) */
.story--v3 { --pick: 0; --rank: 0; --mint: #92e2a4; --amber: #f3c75b; }
.s3-stage { position: absolute; inset: 0; pointer-events: none; }
.s3-card, .s3-profile, .s3-lens { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform, opacity; }
.s3-card { width: 236px; height: 92px; padding: 14px 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
/* on the first page the cards are a toy: lift on hover, drag and throw (story-v3.js) */
.story--v3.s3-play .s3-card { pointer-events: auto; cursor: grab; touch-action: none; }
.story--v3.s3-play .s3-card:hover, .s3-card.is-held { box-shadow: 0 22px 50px rgba(0, 0, 0, .35); border-color: var(--line-2); }
.s3-card.is-held { cursor: grabbing; }
.s3-card__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.s3-kind { height: 22px; padding: 0 9px; border-radius: 99px; background: var(--k); color: var(--ink); font-size: 11.5px; font-weight: 600;
  display: inline-flex; align-items: center; flex-shrink: 0; }
.s3-cat { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s3-card__name { font-family: var(--font-display); font-size: 19px; font-weight: 500; letter-spacing: -.01em; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* a pick grows a fit row as it lifts out of the belt, and a rank once the list forms */
.s3-card--pick { height: calc(92px + var(--pick) * 40px); border-color: color-mix(in srgb, var(--a) calc(var(--pick) * 100%), var(--line)); }
.s3-fit { display: flex; align-items: center; gap: 8px; height: calc(var(--pick) * 34px); opacity: var(--pick); overflow: hidden; }
.s3-fit svg { width: 30px; height: 30px; flex-shrink: 0; transform: rotate(-90deg); }
.s3-fit circle { fill: none; stroke-width: 4; }
.s3-fit .t { stroke: var(--line-2); }
.s3-fit .f { stroke: var(--a); stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: calc(100 - var(--f) * var(--pick)); }
.s3-fit b { white-space: nowrap; font-size: 18px; font-weight: 400; color: var(--text); font-variant-numeric: tabular-nums; }
.s3-fit small { font-size: 12px; color: var(--text-3); margin-left: 2px; }
.s3-area { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; height: 22px; padding: 0 9px; border-radius: 99px; background: var(--a); color: var(--ink);
  font-size: 11.5px; font-weight: 600; display: block; line-height: 22px; white-space: nowrap; }
.s3-rank { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0; opacity: var(--rank); }
/* lime by night, ink on paper, so the lens reads on both */
/* the lens draws over the belt cards running through it; the picks and the profile sit above both */
.s3-lens { z-index: 2; --lc: color-mix(in srgb, var(--ink) calc(var(--day, 0) * 100%), var(--lime)); border-radius: 26px; border: 2px solid var(--lc); box-shadow: 0 0 0 6px rgba(230, 247, 122, .12), 0 0 40px rgba(230, 247, 122, .25); }
.s3-lens span { position: absolute; left: 50%; top: 100%; margin-top: 10px; transform: translateX(-50%); font-size: 12px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--lc); white-space: nowrap; }
.s3-profile { z-index: 6; width: 300px; padding: 20px; border-radius: 26px; color: var(--ink);
  background: linear-gradient(180deg, var(--sage) 0%, var(--sage-2) 100%); box-shadow: 0 18px 50px rgba(0, 0, 0, .25); }
.s3-profile__head { display: flex; align-items: center; gap: 12px; }
.s3-profile__head b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.s3-profile__head small { font-size: 12.5px; color: rgba(0, 0, 0, .58); }
.s3-avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: var(--lime); display: grid; place-items: center; }
.s3-avatar svg { width: 22px; height: 22px; }
.s3-profile__role { margin: 16px 0 12px; font-size: 14px; font-weight: 500; }
.s3-profile ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.s3-profile li { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px; border-radius: 12px; background: rgba(255, 255, 255, .55); font-size: 13.5px; font-weight: 500; }
.s3-profile li i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); flex-shrink: 0; }
.s3-profile li small { margin-left: auto; font-size: 12px; color: rgba(0, 0, 0, .55); }
/* each scene is one sentence: the lead paragraph on the top line (the same line the right side
   starts on, see buildLayout), the big word that finishes it at the bottom, on one left edge */
.s3-units { position: absolute; inset: 0; pointer-events: none; }
.s3-unit { position: absolute; inset: 0; opacity: 0; will-change: transform, opacity; }
.s3-lead { position: absolute; left: 6vw; top: max(96px, 16vh); width: min(32vw, 460px); margin: 0; font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 34px); font-weight: 400; line-height: 1.15; letter-spacing: -.02em; color: var(--text); will-change: transform, opacity; }
.s3-word { position: absolute; left: 6vw; bottom: 4vh; display: block; white-space: nowrap; font-family: var(--font-display); font-weight: 300; font-size: clamp(100px, 22vh, 270px);
  line-height: .8; letter-spacing: -.045em; color: var(--text); pointer-events: auto; cursor: default; }
/* hover: the word stretches wide and a little shorter; the letters near the cursor take the weight (set in story-v3.js) */
.s3-word i { display: inline-block; font-style: normal; transform-origin: 0 100%; transition: transform 500ms var(--ease-out); }
.s3-word.is-hot i { transform: scale(1.1, .9); }
/* each letter's weight is eased frame by frame in story-v3.js, so no CSS transition here */
.s3-word span { display: inline-block; font-weight: 300; }
.s3-word small { font-size: .2em; font-weight: 500; letter-spacing: -.01em; margin-left: .7em; vertical-align: .3em; color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { .s3-word i { transition-duration: 150ms; } }
/* the last page: the big Start word is the button */
.s3-end { position: absolute; left: 6vw; bottom: 4vh; display: flex; align-items: flex-end; }
.s3-end .s3-word { position: static; }
.s3-start { border: 0; padding: 0; background: none; text-align: left; pointer-events: none; }
.s3-done .s3-start { pointer-events: auto; cursor: pointer; }
/* hover or focus: a lime marker sweeps in behind the word and the ink turns black on it */
.s3-start i { padding: 0 .16em 0 .06em; margin-left: -.06em; border-radius: .08em;
  background: linear-gradient(var(--lime), var(--lime)) no-repeat 0 100% / 0% 100%;
  transition: transform 500ms var(--ease-out), background-size 420ms var(--ease-out), color 200ms var(--ease-out); }
.s3-done .s3-start:hover i, .s3-start:focus-visible i { background-size: 100% 100%; color: var(--ink); }
.s3-start:focus-visible { outline: none; }
.s3-start:active i { transform: scale(1.06, .94); }
/* the logo, the paragraphs and the big words share one left edge (6vw); the nav and the page pills mirror it on the right */
.s3-bar { position: absolute; left: 6vw; top: 20px; height: 36px; display: flex; align-items: center; gap: 16px; z-index: 5; }
.s3-logo { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
/* the mark is lime by night and ink on paper; its ink starts 3/32 into its box, cancelled so the ink sits on the edge */
.s3-logo svg { width: 24px; height: 24px; margin-left: -2.25px; color: color-mix(in srgb, var(--ink) calc(var(--day, 0) * 100%), var(--lime)); }
.s3-nav { position: absolute; right: 6vw; top: 20px; height: 36px; display: flex; align-items: center; gap: 26px; font: 500 14px var(--font); z-index: 5; }
.s3-nav a { color: var(--text-2); text-decoration: none; }
.s3-nav a:hover, .s3-nav a[aria-current] { color: var(--text); }
.s3-nav a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }
.story--v3 .story__hint { left: auto; right: 6vw; bottom: 72px; transform: none; }
/* the page indicator: a pill per screen; the current one widens and carries a thinking orb */
.pg-dots { position: absolute; right: 6vw; bottom: 24px; display: flex; align-items: center; gap: 6px; z-index: 5; }
.pg-dots button { position: relative; display: grid; place-items: center; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px;
  background: var(--line-2); cursor: pointer; overflow: hidden;
  transition: width 420ms var(--ease-out), height 420ms var(--ease-out), background-color 200ms var(--ease-out); }
.pg-dots button:hover:not([aria-current]) { background: var(--text-3); }
.pg-dots button[aria-current] { width: 46px; height: 28px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); }
.pg-dots__orb { display: block; width: 20px; height: 20px; }
.pg-dots button:not([aria-current]) .pg-dots__orb { display: none; }
@media (prefers-reduced-motion: reduce) { .pg-dots button { transition-duration: 150ms; } }
@media (max-width: 700px) {
  .s3-lead { left: 16px; top: 9vh; width: calc(100vw - 32px); font-size: 19px; }
  .s3-word { left: 16px; bottom: 3vh; }
  .s3-end { left: 16px; bottom: 3vh; }
  .s3-word { font-size: min(12vh, 18vw); }
  .s3-word small { display: block; margin: .3em 0 0 .1em; font-size: .24em; vertical-align: 0; }
  .story--v3 .story__hint { display: none; }
  .s3-bar { left: 16px; top: 14px; }
  .s3-nav { right: 16px; top: 14px; gap: 16px; font-size: 13px; }
  .pg-dots { right: 16px; bottom: 17vh; }
}

/* ── Whole-page paged pages (home, About): the page never scrolls ── */
body.paged { margin: 0; overflow: hidden; background: #0f1410; font-family: var(--font); line-height: 1.5; -webkit-font-smoothing: antialiased; }
body.paged *, body.paged *::before, body.paged *::after { box-sizing: border-box; }
.noscript { padding: 10vh 6vw; font: 400 20px var(--font); color: #f4f4f2; }
.noscript a { color: var(--lime); }

/* ── About: a visual on the right of each screen, sliding with its sentence ── */
.pg-panels { position: absolute; inset: 0; pointer-events: none; }
.pg-panel { position: absolute; left: 44vw; right: 6vw; top: max(96px, 16vh); pointer-events: auto; transform-origin: 0 0; will-change: transform, opacity; }
.pg-panel[inert] { pointer-events: none; }
.ab-stats { display: flex; flex-direction: column; gap: 14px; }
.ab-stat { display: grid; grid-template-columns: minmax(150px, 30%) 1fr; gap: 20px; align-items: center; padding: 22px 24px; border-radius: 22px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--text); }
.ab-stat b { font: 300 clamp(44px, 4.6vw, 70px)/.9 var(--font-display); letter-spacing: -.04em; }
.ab-stat p { margin: 0; font: 500 clamp(15px, 1.2vw, 18px)/1.35 var(--font-display); }
.ab-stat small { display: block; margin-top: 8px; font: 500 12px var(--font); opacity: .62; }
.ab-stat--hot { background: var(--lime); color: var(--ink); border-color: transparent; }
/* the funnel: a row of labels, a row of three boxes of one height with the orbs centred between them, a row of captions */
.ab-funnel { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr) 64px minmax(0, 1fr); row-gap: 12px; color: var(--text); }
.ab-label { margin: 0; font: 600 12px var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.ab-label.ab-hot { color: var(--lime); }
.ab-box { display: flex; flex-direction: column; min-height: 100%; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.ab-box.ab-profile { background: linear-gradient(180deg, var(--sage), #cfdcc4); border-color: transparent; }
.ab-cap { font: 500 12px var(--font); color: var(--text-3); }
.ab-big { display: block; margin-bottom: 12px; font: 300 clamp(40px, 3.8vw, 56px)/.9 var(--font-display); letter-spacing: -.04em; }
.ab-tools, .ab-picks, .ab-profile ul { list-style: none; margin: 0; padding: 0; }
.ab-tools li { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 8px 10px; border-radius: 11px; font: 500 12.5px var(--font-display);
  color: var(--text-2); background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.ab-kind { width: 9px; height: 9px; border-radius: 50%; background: var(--k); flex-shrink: 0; }
.ab-orb { display: grid; place-items: center; }
.ab-profile { color: var(--ink); }
.ab-profile > b { display: block; font: 600 16px var(--font-display); }
.ab-profile > small { display: block; margin-bottom: 6px; font: 400 11px var(--font); opacity: .6; }
.ab-profile li { display: flex; align-items: center; gap: 7px; margin-top: 5px; padding: 6px 9px; border-radius: 9px; background: rgba(255, 255, 255, .55); font: 500 12px var(--font); }
.ab-profile li i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ab-profile li em { margin-left: auto; font-style: normal; opacity: .6; }
.ab-picks li { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 11px 12px; border-radius: 14px; background: #fff; color: var(--ink); font: 500 14px var(--font-display); }
.ab-picks li b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 10px var(--font); }
.ab-picks li span { margin-left: auto; font: 500 12px var(--font); }
/* rows stay on one line: slightly tighter type so full names fit at desktop widths */
.ab-picks li { gap: 5px; padding: 10px 9px; font-size: 12.5px; }
.ab-profile li { white-space: nowrap; font-size: 11.5px; }
/* a long tool name wraps on desktop; on a phone it is trimmed so its score always shows */
.ab-n { min-width: 0; font-style: normal; line-height: 1.2; }
.ab-picks li span { flex-shrink: 0; }
.ab-made { grid-column: 1 / -1; margin: 22px 0 0; font: 400 clamp(15px, 1.2vw, 18px)/1.45 var(--font-display); color: var(--text-2); }
.ab-maker { display: grid; grid-template-columns: 1.05fr 1fr; gap: 16px; color: var(--ink); }
.ab-card { padding: 24px; border-radius: 24px; background: #fff; box-shadow: 0 18px 50px rgba(0, 0, 0, .1); }
.ab-who { display: flex; align-items: center; gap: 14px; }
.ab-who img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.ab-who b { display: block; font: 600 26px var(--font-display); }
.ab-who small { font: 400 14px var(--font); color: #666; }
.ab-card > p { margin: 16px 0 0; font: 400 14px/1.55 var(--font); color: #444; }
.ab-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.ab-links a { padding: 11px 13px; border-radius: 12px; background: #efede7; color: var(--ink); font: 500 13.5px var(--font); text-decoration: none; }
.ab-links a:hover { background: #e4e2da; }
.ab-open { display: inline-block; margin-top: 16px; padding: 7px 14px; border-radius: 99px; background: var(--lime); font: 600 13px var(--font); }
.ab-work { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ab-work li { padding: 16px 18px; border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .07); }
.ab-work b { font: 600 17px var(--font-display); }
.ab-work p { margin: 4px 0 0; font: 400 13px/1.45 var(--font); color: #555; }
.ab-work small { display: block; margin-top: 8px; font: 500 12px var(--font); color: #888; }
.ab-work .ab-quote { padding: 4px 0 4px 14px; border-radius: 0; background: none; box-shadow: none; border-left: 3px solid var(--lime); font: 400 14px/1.5 var(--font-display); color: #333; }
@media (max-width: 1100px) {
  .ab-maker { grid-template-columns: 1fr; }
  .ab-work li:not(:first-child):not(.ab-quote) { display: none; }
}
@media (max-width: 700px) {
  .pg-panel { left: 16px; right: 16px; top: 34vh; }
  .ab-stat { grid-template-columns: 96px 1fr; padding: 12px 14px; gap: 12px; border-radius: 16px; }
  .ab-stat b { font-size: 34px; }
  .ab-stat p { font-size: 13px; }
  .ab-stat small { font-size: 10.5px; margin-top: 4px; }
  .ab-stats { gap: 8px; }
  .ab-funnel { grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); row-gap: 8px; }
  /* narrow boxes: one line per row, trimmed if it must be, instead of words breaking across lines */
  .ab-profile li, .ab-picks li { min-width: 0; white-space: nowrap; font-size: 11px; gap: 5px; padding: 7px 7px; }
  .ab-profile li em, .ab-picks li span { flex-shrink: 0; }
  .ab-profile li, .ab-picks li { overflow: hidden; text-overflow: ellipsis; }
  .ab-box { padding: 10px; }
  /* the circles and dots keep their shape; the box title already says these are gaps */
  .ab-profile li i, .ab-picks li b { flex-shrink: 0; }
  .ab-gw { display: none; }
  .ab-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ab-funnel .c1 { display: none; }
  .ab-made { margin-top: 12px; font-size: 13px; }
  .ab-card { padding: 16px; }
  .ab-card > p, .ab-work { display: none; }
  .ab-who b { font-size: 21px; }
}

/* ── Motion: the dashboard's own vocabulary (same keyframes, curves and durations as app.html) ── */
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes fadeOut { to { opacity: 0 } }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); filter: blur(2px) } to { opacity: 1; transform: none; filter: none } }
@keyframes chipIn { from { opacity: 0; transform: translateY(8px) scale(.94) } to { opacity: 1; transform: none } }
/* a screen's visual arrives piece by piece each time it comes on screen (--d is the stagger) */
.pg-panel:not([inert]) .m { animation: arrive var(--dur-ui) var(--ease-out) calc(var(--d, 0) * 70ms + 120ms) both; }
.pg-panel:not([inert]) .m-chip { animation: chipIn var(--dur-ui) var(--ease-out) calc(var(--d, 0) * 70ms + 160ms) both; }
/* a highlight: the lime marker sweeps in behind a key phrase once its screen is on, at most one per screen */
.hl { color: inherit; padding: 0 .12em; margin: 0 -.06em; border-radius: .14em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(var(--lime), var(--lime)) no-repeat 0 100% / 0% 100%;
  transition: background-size 700ms var(--ease-out) 350ms, color 300ms var(--ease-out) 350ms; }
.s3-unit[aria-hidden="false"] .hl, .pg-panel:not([inert]) .hl { background-size: 100% 100%; color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .pg-panel .m, .pg-panel .m-chip { animation-duration: 150ms !important; animation-delay: 0ms !important; filter: none; }
  .hl { transition-duration: 150ms; transition-delay: 0ms; }
}
