/* The pages: the Kassandra home (Kassandra herself, the mission, markets
   and AI, the finale), the Exchange (the market and its visions),
   Kassandra AI (the session, the site it changes, one session everywhere),
   both pricing pages and the not-found page's oracle ball. */

/* ---- Heroes ------------------------------------------------------------------------ */

.hero {
  position: relative;
  display: flex; flex-direction: column;
  min-height: max(640px, min(calc(100svh - var(--nav-h) - 36px), 920px));
  overflow: hidden;
  isolation: isolate;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
/* The light behind Kassandra in the home hero, placed by home/hero.rs and
   breathing on the compositor. */
.hero-glow {
  position: absolute; width: 0; aspect-ratio: 1; translate: -50% -50%; z-index: -3;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--klavender) 16%, transparent), transparent);
  animation: hero-breathe 3.2s ease-in-out infinite alternate;
}
@keyframes hero-breathe { from { opacity: 0.62; } }
[data-theme="light"] .hero-glow { background: radial-gradient(closest-side, color-mix(in srgb, var(--klavender) 6%, transparent), transparent); animation: none; }
@media (prefers-reduced-motion: reduce) { .hero-glow { animation: none; opacity: 0.62; } }
.hero-veil {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 46% 40% at 50% 40%, rgba(30, 29, 30, 0.86) 0%, rgba(30, 29, 30, 0.5) 60%, rgba(30, 29, 30, 0) 100%);
  transition: opacity 400ms var(--ease);
}
[data-theme="light"] .hero-veil { background: radial-gradient(ellipse 46% 40% at 50% 40%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.55) 60%, rgba(255, 255, 255, 0) 100%); }
.hero-copy {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-s);
  padding-top: var(--space-l); padding-bottom: calc(var(--space-3xl) + 64px);
  text-align: center;
  pointer-events: none;
  transition: opacity 300ms var(--ease), transform 300ms var(--ease), visibility 0ms linear 300ms;
}
.hero-copy > * { pointer-events: auto; animation: enter 800ms var(--ease) backwards; }
.hero-copy > :nth-child(2) { animation-delay: 90ms; }
.hero-copy > :nth-child(3) { animation-delay: 180ms; }
.hero-copy > :nth-child(4) { animation-delay: 260ms; }
@keyframes enter { from { opacity: 0; transform: translateY(16px); } }
.hero-title { font-size: var(--step-6); line-height: 1.02; letter-spacing: -0.04em; font-weight: 500; max-width: 13em; text-wrap: balance; }
.hero-title .line { display: block; }
.hero-title .accent {
  background: linear-gradient(92deg, var(--klavender) 10%, var(--kpurple) 55%, var(--kpink) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%;
  animation: shimmer 7s var(--ease) infinite alternate;
}
@keyframes shimmer { to { background-position: 100% 0; } }
/* Words that take turns in one place: each lifts away exactly as the next
   rises into its place, so the line is never empty. Still, they're said
   together. */
.hero-title .swap { display: grid; }
.swap > span { grid-area: 1 / 1; animation: swap 6s var(--ease-in-out) infinite both; }
.swap > span:nth-child(2) { animation-delay: -3s; }
.swap > .swap-still { display: none; }
@keyframes swap {
  0%, 44% { opacity: 1; transform: none; filter: blur(0); }
  50% { opacity: 0; transform: translateY(-0.3em); filter: blur(6px); }
  50.01%, 94% { opacity: 0; transform: translateY(0.3em); filter: blur(6px); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .swap > span { display: none; animation: none; }
  .swap > .swap-still { display: block; }
}
[data-theme="light"] .hero-title .accent { background-image: linear-gradient(92deg, var(--strong-klavender), var(--strong-kpurple) 55%, var(--strong-kpink)); }
.hero-lede { text-align: center; max-width: 34em; }
.hero-ctas { justify-content: center; margin-top: var(--space-2xs); }

/* The home hero: the headline on the left, Kassandra herself on the right
   (drawn by the canvas), filling the screen. */
.home-hero { min-height: max(640px, calc(100svh - var(--nav-h) - 36px)); }
.home-copy { flex: 1; justify-content: center; align-items: flex-start; text-align: left; padding-top: var(--space-l); padding-bottom: var(--space-l); }
.home-copy > * { max-width: min(30rem, 46%); }
.home-copy .hero-title { max-width: min(38rem, 50%); text-align: left; font-size: var(--step-5); }
.home-copy .hero-lede { text-align: left; }
.home-copy .hero-ctas { justify-content: flex-start; }
@media (max-width: 999px) {
  .home-hero { min-height: 880px; }
  .home-copy { flex: none; align-items: center; text-align: center; justify-content: flex-start; padding-top: var(--space-xl); }
  .home-copy > *, .home-copy .hero-title, .home-copy .hero-lede { max-width: none; text-align: center; }
  .home-copy .hero-ctas { justify-content: center; }
}
@media (max-width: 640px) {
  /* Tall enough for the copy and her, with no empty band between them. */
  .home-hero { min-height: 720px; }
  .home-copy .hero-title { font-size: clamp(2.4rem, 11vw, 3rem); }
  .home-copy .hero-ctas { flex-wrap: nowrap; }
  .home-copy .hero-ctas .btn { height: 46px; padding: 0 18px; font-size: 15px; }
}

/* Kassandra's oracle ball (blocks/oracle.rs): a canvas filling its box. */
.oracle { position: relative; touch-action: pan-y; }
.oracle canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The light the ball gives off, stronger while you gaze into it. */
.oracle::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 120%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--klavender) 16%, transparent) 0%, color-mix(in srgb, var(--kpurple) 7%, transparent) 38%, transparent 66%);
  opacity: 0.75; transition: opacity 500ms var(--ease), scale 500ms var(--ease);
  animation: breathe 7s ease-in-out infinite;
}
.oracle.gazing::before { opacity: 1; scale: 1.08; }
@keyframes breathe { 50% { opacity: 0.55; } }
[data-theme="light"] .oracle::before { background: radial-gradient(circle, rgba(165, 50, 173, 0.12) 0%, rgba(112, 65, 176, 0.05) 38%, transparent 66%); }
@media (prefers-reduced-motion: reduce) { .oracle::before { animation: none; } }

/* ---- Home: markets and AI -------------------------------------------------------- */

/* Two rows, each a word in large type with what it gives you under it, a
   drawing of it and the division; the row is the link. The drawings play
   when the row comes into view; hover lights the word. */
.twin {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px 250px; align-items: center; gap: var(--space-l);
  padding: var(--space-m) var(--space-s); margin: 0 calc(-1 * var(--space-s));
  border-radius: var(--radius-card);
  transition: background-color var(--dur-fast) var(--ease-ui);
}
.twin + .twin { margin-top: var(--space-2xs); }
/* A tint rather than a fill, so whatever is behind (her vision) shows through. */
.twin:hover, .twin:focus-visible { background: color-mix(in srgb, var(--text) 5%, transparent); }
.twin-word {
  font-size: clamp(3rem, 8.5vw, 7.5rem); font-weight: 500; letter-spacing: -0.05em; line-height: 0.95;
  transition: color var(--dur-medium) var(--ease), transform var(--dur-medium) var(--ease);
}
.twin:hover .twin-word, .twin:focus-visible .twin-word { color: var(--accent-ink); transform: translateX(6px); }
.twin-copy { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.twin-line { max-width: 30ch; color: var(--muted); font-size: var(--step-0); line-height: 1.45; }
/* Each division starts the same distance from its picture. */
.twin-meta { display: flex; align-items: center; justify-content: flex-start; gap: var(--space-s); }
.twin-meta h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
/* Its picture in glyphs (home/twins.rs). */
.twin-art { display: block; width: 360px; height: 136px; }
/* Below about 1120px the word, its picture and the division don't fit in
   one row: the picture sits beside the word, the division under both. */
@media (max-width: 1120px) {
  .twin { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--space-xs); padding: var(--space-s) 12px; margin: 0 -12px; }
  .twin-art { width: 280px; height: 106px; }
  .twin-meta { grid-column: 1 / -1; justify-content: space-between; }
}
/* On a phone the picture goes under the words, full width. */
@media (max-width: 640px) {
  .twin { grid-template-columns: 1fr; }
  .twin-art { width: 100%; height: 84px; }
  .twin-line { font-size: var(--step--1); }
}

/* ---- Home: Total Kassandra Volume (home/volume.rs) ------------------------------- */

/* The eyebrow with its live dot, the number as an odometer in the
   headline's gradient, and volume bars in glyphs rising from the mission's
   line, which is their baseline. Hidden until the gateway has the total. */
.volume { padding-top: var(--space-2xl); text-align: center; }
.volume:not(.ready) { display: none; }
.volume-in { display: flex; flex-direction: column; align-items: center; gap: var(--space-xs); }
.volume-eyebrow { gap: 10px; }
.volume-live {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--kgreen);
  animation: volume-live 2.4s var(--ease-out) infinite;
}
@keyframes volume-live {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--kgreen) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--kgreen) 0%, transparent); }
}
[data-theme="light"] .volume-live { background: var(--strong-kgreen); }
.volume-num { font-size: clamp(2.4rem, 12vw, 8.6rem); font-weight: 500; line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.volume-digits { display: inline-flex; animation: volume-shimmer 9s var(--ease-in-out) infinite alternate; }
/* Each place is a window one digit high; a digit's wheel turns behind it,
   fading at its top and bottom edges as a wheel turns away. */
.volume-place { display: block; height: 1.12em; clip-path: inset(0 -0.2em); transition: opacity 500ms var(--ease); }
.volume-place.digit { width: 0.6em; -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); }
.volume-place.comma { width: 0.27em; }
.volume-place.dollar { width: 0.58em; }
.volume-place > .volume-ink, .volume-wheel > span { display: block; height: 1.12em; line-height: 1.12em; text-align: center; }
.volume-wheel { display: block; will-change: transform; }
/* Zeros the number hasn't reached yet, while it spins up. */
.volume-place.lead { opacity: 0.22; }
/* One gradient across the whole number: each place shows its own stretch of
   it (--x, from the number's --w), and the light drifts slowly along it.
   On a wheel it's each digit's own: text clipped through a turning parent
   isn't painted. */
@property --volume-shift { syntax: "<length>"; inherits: true; initial-value: 0px; }
@keyframes volume-shimmer { to { --volume-shift: -3.5em; } }
.volume-ink, .volume-wheel > span {
  background-image: linear-gradient(92deg, var(--klavender), var(--kpurple) 25%, var(--kpink) 50%, var(--kpurple) 75%, var(--klavender));
  background-size: calc(var(--w) * 2) 100%;
  background-position: calc(var(--volume-shift) - var(--x)) 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="light"] :is(.volume-ink, .volume-wheel > span) { background-image: linear-gradient(92deg, var(--strong-klavender), var(--strong-kpurple) 25%, var(--strong-kpink) 50%, var(--strong-kpurple) 75%, var(--strong-klavender)); }
.volume-bars { display: block; width: 100%; height: clamp(92px, 12vw, 172px); margin-top: var(--space-l); }
@media (prefers-reduced-motion: reduce) {
  .volume-live, .volume-digits { animation: none; }
}
/* The same total, small, on the Terminal's top bar (VolumeChip): a pill like
   the bar's other controls, centered in the room between the search and
   the wallet, and gone where the bar has no room for it. */
.volume-chip {
  display: inline-flex; align-items: center; gap: 9px; flex: none;
  height: 38px; padding: 0 16px 0 14px; margin-left: auto;
  border-radius: var(--radius-pill); border: 1px solid var(--rule, var(--border)); background: var(--raised, var(--card));
  font-size: 13px; white-space: nowrap;
}
.volume-chip .volume-live { width: 7px; height: 7px; }
.volume-chip-label { color: var(--muted); font-weight: 500; }
.volume-chip-num {
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
  background: linear-gradient(92deg, var(--klavender), var(--kpurple) 55%, var(--kpink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="light"] .volume-chip-num { background-image: linear-gradient(92deg, var(--strong-klavender), var(--strong-kpurple) 55%, var(--strong-kpink)); }
@media (max-width: 1180px) {
  .volume-chip-label { display: none; }
}
@media (max-width: 900px) {
  .volume-chip { display: none; }
}

/* ---- Home: the mission ---------------------------------------------------------- */

.mission { border-top: 1px solid var(--border); padding-bottom: var(--space-2xl); }
/* "Why Kassandra" lands with the mission's first line just under the nav,
   past the section's empty padding, so the whole of it fits on screen. */
.mission { scroll-margin-top: calc(8px - var(--space-3xl)); }
/* The facts lead straight into Markets and AI below, with no line between. */
.twins { padding-top: var(--space-l); }
.mission-text {
  margin: var(--space-s) 0 var(--space-2xl);
  font-size: var(--step-4); line-height: 1.22; letter-spacing: -0.025em; font-weight: 500;
  max-width: 24em;
}
.mword { color: var(--faint); transition: color 350ms var(--ease); }
/* Everyone, in glyphs (home/crowd.rs), lit as the words are, and the box
   around the professionals that grows to take everyone in: placed by the
   crowd frame by frame, hidden until it is. */
.crowd-scene { position: relative; margin: calc(-1 * var(--space-m)) 0 var(--space-xl); }
.crowd { display: block; width: 100%; height: clamp(130px, min(16vw, 24vh), 220px); }
.crowd-fence {
  position: absolute; pointer-events: none;
  border: 1.5px solid var(--border); border-radius: 10px;
  transition: border-color 450ms var(--ease);
}
.crowd-fence:not([style]) { display: none; }
.crowd-fence.pro { border-color: var(--accent-2); }
.crowd-fence.all { border-color: color-mix(in srgb, var(--accent-ink) 55%, transparent); }
.crowd-tag {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -54%);
  display: grid; padding: 0 10px; background: var(--bg);
  font-size: var(--step--1); font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.crowd-tag > span { grid-area: 1 / 1; text-align: center; transition: opacity 450ms var(--ease), color 450ms var(--ease); }
.tag-pro { color: var(--faint); }
.tag-all { opacity: 0; color: var(--accent-ink); }
.crowd-fence.pro .tag-pro { color: var(--accent-2); }
.crowd-fence.all .tag-pro { opacity: 0; }
.crowd-fence.all .tag-all { opacity: 1; }
/* On white, Strong Kpurple is for large text; the label is small, so a
   shade darker. */
[data-theme="light"] .tag-all, [data-theme="light"] .crowd-fence.pro .tag-pro { color: color-mix(in srgb, var(--accent-ink) 75%, var(--text)); }
/* Unlit words still read at 3:1 (they are large text). */
[data-theme="dark"] .mword { color: #736E73; }
.mword.lit { color: var(--text); }
.mword.key.lit { color: var(--accent-ink); }
.mword.pro.lit { color: var(--accent-2); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); }
.fact { display: flex; flex-direction: column; gap: 4px; padding: var(--space-m) var(--space-m) 0 0; }
.fact + .fact { padding-left: var(--space-m); border-left: 1px solid var(--border); }
.fact-num { font-size: var(--step-5); font-weight: 500; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.fact-label { font-weight: 600; font-size: var(--step--1); margin-top: 6px; }
.fact-tag { color: var(--faint); font-size: var(--step--2); margin-bottom: 8px; }
@media (max-width: 640px) {
  .mission-text { font-size: 1.55rem; line-height: 1.3; margin-bottom: var(--space-xl); }
  .crowd-tag { font-size: var(--step--2); padding: 0 8px; }
  .fact-num { font-size: var(--step-4); }
}
@media (max-width: 900px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
}

/* ---- Questions --------------------------------------------------------------------- */

.markets-section, .faq-section, .pricing { border-top: 1px solid var(--border); }

/* ---- Exchange ------------------------------------------------------------------------- */

/* The Exchange hero: the headline above the market's day, which fills the
   screen down to the price strip. */
.ex-hero { min-height: max(640px, calc(100svh - var(--nav-h) - 36px)); cursor: default; }
/* The copy sits midway between the nav and where the market's line
   begins (the chart fills the space under it). */
.ex-copy { flex: none; justify-content: flex-start; padding-top: clamp(72px, 15vh, 160px); padding-bottom: 0; }
/* On a laptop or larger, the space above the copy grows with the screen's
   height (70px at 760 tall, 135px at 900, 160px from 1000), and the title
   shrinks a little on short screens, so the market's day always has room
   under it. */
@media (min-width: 641px) {
  .ex-copy { padding-top: clamp(48px, calc(46.4vh - 283px), 160px); }
  .ex-hero .hero-title { font-size: min(var(--step-6), 9.5vh); }
}
.ex-hero .hero-veil { background: radial-gradient(ellipse 50% 34% at 50% 30%, rgba(30, 29, 30, 0.82) 0%, rgba(30, 29, 30, 0.4) 60%, rgba(30, 29, 30, 0) 100%); }
[data-theme="light"] .ex-hero .hero-veil { background: radial-gradient(ellipse 50% 34% at 50% 30%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.45) 60%, rgba(255, 255, 255, 0) 100%); }
.ex-hero .ticker { margin-top: auto; }
/* Each line ends in a comma or a full stop; room for one on the left too
   puts the words themselves in the middle. */
.ex-hero .hero-title .line { padding-left: 0.25em; }
@media (max-width: 640px) {
  /* The first screen exactly: the copy, the market's day and the price strip
     at its foot. */
  .ex-hero { min-height: max(600px, calc(100svh - var(--nav-h) - 36px)); }
  .ex-hero .hero-title { font-size: clamp(2.4rem, 11vw, 3rem); }
  .ex-hero .hero-lede { font-size: var(--step--1); }
  .ex-hero .hero-ctas { flex-wrap: nowrap; }
  .ex-hero .hero-ctas .btn { height: 46px; padding: 0 18px; font-size: 15px; }
}

.stages { border-top: 1px solid var(--border); }
.stages-grid { display: grid; grid-template-columns: 180px 1fr; gap: var(--space-l); }
.stage-nav { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 4px; }
.stage-nav-slider { position: absolute; left: 0; top: 0; width: 100%; height: 44px; border-radius: var(--radius-m); background: var(--card); transform: translateY(calc(48px * var(--i))); transition: transform 380ms var(--ease-ui); }
.stage-nav-slider::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--accent); }
.stage-nav a {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 14px; border-radius: var(--radius-m);
  color: var(--muted); font-size: 16px;
  transition: color var(--dur-fast) var(--ease-ui);
}
.stage-nav a:hover, .stage-nav a.on { color: var(--text); }
.stage-num { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.stage-nav a.on .stage-num { color: var(--text); }
.stage-list { display: flex; flex-direction: column; }
.stage { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--space-l); align-items: center; padding: var(--space-xl) 0; border-top: 1px solid var(--border); }
.stage > * { min-width: 0; }
.stage:first-child { border-top: 0; padding-top: 0; }
.stage-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-xs); }
.stage-kicker { color: var(--faint); font-size: 13px; font-family: var(--font-mono); }
.stage-copy h3 { font-size: var(--step-3); line-height: 1.1; letter-spacing: -0.02em; font-weight: 500; }
.stage-body { color: var(--muted); }
.points { display: flex; flex-direction: column; gap: 14px; margin: var(--space-2xs) 0; }
.points li { display: flex; gap: 12px; align-items: flex-start; }
.points div { display: flex; flex-direction: column; }
.points b { font-size: var(--step--1); }
.points span:not(.point-ico) { color: var(--muted); font-size: var(--step--2); }
.point-ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--card-hover); color: var(--text); }
.point-ico .ico { width: 16px; height: 16px; }
.stage-next { display: none; }
/* Below 960px the four ways are tabs that stay under the bar, and one way
   shows at a time instead of four stacked screens of them. */
@media (max-width: 960px) {
  .stages-grid { grid-template-columns: 1fr; gap: var(--space-m); }
  .stage-nav {
    top: calc(var(--nav-h) + 10px); z-index: 5;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
    padding: 4px; border-radius: 999px;
    scroll-margin-top: calc(var(--nav-h) + 10px);
  }
  /* While it sticks, a band of the page's own background runs behind it
     from the header down, so the stage's words don't scroll by around it. */
  .stage-nav::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    top: -10px; bottom: -10px; left: calc(50% - 50vw); width: 100vw;
    background: var(--bg);
  }
  /* The pill itself, over that band. */
  .stage-nav::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), 0 10px 24px -16px rgba(0, 0, 0, 0.5);
  }
  .stage-nav-slider { top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 4); height: auto; border-radius: 999px; background: var(--card-hover); transform: translateX(calc(100% * var(--i))); }
  .stage-nav-slider::before { display: none; }
  .stage-nav a { justify-content: center; height: 40px; padding: 0 6px; border-radius: 999px; font-size: 15px; }
  .stage-num { display: none; }
  .stage { grid-template-columns: 1fr; padding: var(--space-m) 0 0; border-top: 0; }
  .stage:not(.shown) { display: none; }
  /* The way itself first (its tab names it), then what it says. */
  .stage-demo { order: -1; }
  .stage-next { display: inline-flex; justify-self: start; }
  .stage.shown { animation: stage-in 420ms var(--ease) backwards; }
}
@keyframes stage-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .stage.shown { animation: none; } }

.trust { border-top: 1px solid var(--border); }
.widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.widgets > * { min-width: 0; }
.widget { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--radius-card); border: 1px solid var(--border); background: var(--card); }
.widget-head { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.widget-head > :last-child { margin-left: auto; }
.widget-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--card-hover); color: var(--muted); }
.widget-ico .ico { width: 16px; height: 16px; }
.activity { display: flex; flex-direction: column; }
.activity li { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 9px 6px; border-radius: 10px; }
.activity li { animation: pv-in 520ms var(--ease) backwards; animation-delay: calc(var(--k) * 70ms + 200ms); }
.js .reveal.wait .activity li { animation-play-state: paused; }
.act-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--card-hover); color: var(--muted); }
.act-ico .ico { width: 15px; height: 15px; }
.act-text { display: flex; flex-direction: column; min-width: 0; }
.act-text b { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-text small { color: var(--muted); font-size: 12px; }
.act-when { color: var(--muted); font-size: 13px; }
.widget-foot { color: var(--muted); font-size: 13px; margin-top: auto; }
.reserve-big { font-size: var(--step-5); font-weight: 400; letter-spacing: -0.03em; line-height: 1; margin-top: 12px; }
.reserve-sub { color: var(--muted); }
.reserve-bar { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.reserve-bar p { display: flex; justify-content: space-between; color: var(--muted); }
.reserve-bar b { color: var(--text); }
.rbar { height: 8px; border-radius: 4px; background: var(--card-hover); overflow: hidden; }
.rbar i { display: block; height: 100%; border-radius: 4px; background: var(--text); transform-origin: left; transition: transform 900ms var(--ease) 200ms; }
.rbar.issued i { background: var(--muted); }
.js .reveal.wait .rbar i { transform: scaleX(0); }
.quality-bar { display: flex; gap: 3px; height: 12px; margin-top: 4px; }
.quality-bar span { border-radius: 3px; }
.quality-bar .better, .quality-legend i.better { background: var(--positive); }
.quality-bar .same, .quality-legend i.same { background: var(--muted); }
.quality-bar .worse, .quality-legend i.worse { background: var(--negative); }
.quality-legend { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--muted); }
.quality-legend li { display: flex; align-items: center; gap: 10px; }
.quality-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.quality-legend b { margin-left: auto; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 960px) { .widgets { grid-template-columns: 1fr; } }

.wallets { border-top: 1px solid var(--border); }
.wallets-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: var(--space-xl); align-items: center; }
.wallets-grid > * { min-width: 0; }
.wallets-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-xs); }
.wallet-card { display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: 24px; border: 1px solid var(--border-strong); background: var(--bg); }
.wallet-card-title { font-weight: 600; margin: 0 0 10px 12px; }
.wallet-card .wallet-row { display: flex; align-items: center; gap: 12px; height: 60px; padding: 12px 14px 12px 12px; border-radius: 12px; transition: background-color var(--dur-fast) var(--ease-ui); }
.wallet-card .wallet-row:hover { background: var(--card); }
.wallet-or { display: flex; align-items: center; gap: 12px; margin: 6px 12px; color: var(--faint); font-size: 13px; }
.wallet-or::before, .wallet-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.wallet-card .btn { white-space: normal; height: auto; min-height: 48px; padding-block: 10px; margin-inline: 12px; text-align: center; }
@media (max-width: 960px) { .wallets-grid { grid-template-columns: 1fr; } }

/* ---- Kassandra AI ------------------------------------------------------------------- */

/* The Kassandra AI hero: the headline and the two ways in, centered, then
   the stage: the live session beside the site it's changing (ai/preview.rs),
   then the install command. */
.ai-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(48px, 8vh, 88px) 0 var(--space-2xl);
  background: radial-gradient(ellipse 60% 45% at 50% 62%, color-mix(in srgb, var(--klavender) 8%, transparent), transparent 70%);
}
.ai-hero-in { display: flex; flex-direction: column; align-items: center; gap: var(--space-xl); }
.ai-hero-copy { display: flex; flex-direction: column; align-items: center; gap: var(--space-s); text-align: center; }
.ai-hero-copy > * { animation: enter 800ms var(--ease) backwards; }
.ai-hero-copy > :nth-child(2) { animation-delay: 80ms; }
.ai-hero-copy > :nth-child(3) { animation-delay: 160ms; }
.ai-hero-copy .hero-title { text-align: center; font-size: calc(var(--step-6) * var(--title-scale, 1)); transition: font-size 600ms var(--ease-ui); }
.ai-hero-copy .hero-ctas { justify-content: center; }
/* The session, on its own: its project is this page. It scrolls inside its
   window and never grows the stage. */
.ai-stage {
  width: min(100%, 940px); height: clamp(440px, 58vh, 560px);
  animation: enter 900ms var(--ease) 240ms backwards;
}
.ai-stage .term { height: 100%; box-shadow: 0 40px 120px -40px color-mix(in srgb, var(--klavender) 35%, transparent), var(--shadow), 0 0 0 1px var(--border); }
.ai-install { width: min(100%, 620px); scroll-margin-top: calc(var(--nav-h) + 120px); }
.ai-install .install-note { text-align: center; }
/* On a phone the copy is centered in the first screen, with the top of
   the session peeking in under it. */
@media (max-width: 640px) {
  .ai-hero { padding-top: 0; }
  .ai-hero-copy { min-height: max(440px, calc(100svh - var(--nav-h) - 36px - 150px)); justify-content: center; }
  .ai-hero-copy .hero-title { font-size: calc(clamp(2.4rem, 11vw, 3rem) * var(--title-scale, 1)); }
}
@media (max-width: 900px) {
  .ai-stage { height: 480px; }
}

/* What the session changes on this page (ai/live.rs). The headline's size
   follows a scale the terminal sets; waving, it's a letter at a time, each
   letter colored along the accent's gradient (a clipped gradient can't
   follow letters that move). */
.hero-title { --g1: var(--klavender); --g2: var(--kpink); }
[data-theme="light"] .hero-title { --g1: var(--strong-klavender); --g2: var(--strong-kpink); }
.hero-title .ch { display: inline-block; animation: wave 1.6s var(--ease-in-out) infinite; animation-delay: calc(var(--n) * 70ms); }
@keyframes wave { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-0.12em) rotate(-3deg); } }
.hero-title.waving .accent { background: none; animation: none; }
.hero-title.waving .accent .ch { color: color-mix(in oklab, var(--g2) calc(var(--t) * 100%), var(--g1)); }
@media (prefers-reduced-motion: reduce) { .hero-title .ch { animation: none; } }
/* The button the first request adds: it pops in, ringed in the accent for
   a moment so you see what changed. */
.celebrate { animation: pop-in 560ms var(--ease-bounce) backwards, new-ring 2.6s var(--ease) 300ms backwards; }
.celebrate .ico { color: var(--accent-ink); }
@keyframes pop-in { from { opacity: 0; transform: scale(0.6); } }
@keyframes new-ring { 0% { box-shadow: 0 0 0 0 transparent; } 20%, 70% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .celebrate { animation: none; } }
/* Confetti in the brand's glyphs: out from where it was thrown, then down. */
.confetti { position: fixed; inset: 0; z-index: 80; overflow: hidden; pointer-events: none; }
.burst { position: absolute; width: 0; height: 0; }
.burst i { position: absolute; left: 0; top: 0; font-style: normal; font-size: var(--s); line-height: 1; color: var(--c); animation: fly 1.6s cubic-bezier(0.2, 0.7, 0.3, 1) var(--d) both; }
@keyframes fly {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 1; }
  45% { transform: translate(calc(var(--dx) - 50%), calc(var(--dy) - 50%)) rotate(var(--r)) scale(1); opacity: 1; }
  100% { transform: translate(calc(var(--dx) * 1.2 - 50%), calc(var(--dy) + 280px - 50%)) rotate(calc(var(--r) * 2)) scale(0.8); opacity: 0; }
}
/* A phone can't install it: the hero offers the cloud only. */
html[data-os="phone"] .ai-hero .hero-ctas a[href="#install"] { display: none; }

.features, .local, .everywhere { border-top: 1px solid var(--border); }
/* Each card leads with its proof: a few lines of a session doing it in a
   small terminal well, lit from below in the brand's color, typed in line
   by line as the card comes in; then what it does. */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 8px 8px var(--space-m); border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow var(--dur-fast) var(--ease-ui); }
.feature:hover { box-shadow: inset 0 0 0 1px var(--border-strong); }
.feature h3 { margin-top: var(--space-s); padding: 0 var(--space-s); font-size: var(--step-1); font-weight: 600; }
.feature > p:not(.feature-proof) { padding: 0 var(--space-s); color: var(--muted); font-size: var(--step--1); }
.feature .feature-proof {
  order: -1; display: flex; flex-direction: column; justify-content: center; gap: 2px; height: 128px; padding: 0 22px; border-radius: 15px;
  background: radial-gradient(120% 90% at 50% 120%, color-mix(in srgb, var(--kpurple) 22%, transparent), transparent 60%), var(--term-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: var(--term-text); font-family: var(--font-mono); font-size: 13px; line-height: 1.5;
  white-space: pre; overflow: hidden;
  transition: opacity 500ms var(--ease) 350ms, transform 500ms var(--ease) 350ms;
}
.js .feature.reveal.wait .feature-proof { opacity: 0; transform: translateY(6px); }
.feature-proof .pl { display: block; overflow: hidden; text-overflow: ellipsis; transition: opacity 360ms var(--ease), transform 360ms var(--ease); transition-delay: calc(520ms + var(--l) * 280ms); }
.js .feature.reveal.wait .pl { opacity: 0; transform: translateX(-6px); }
@media (prefers-reduced-motion: reduce) { .feature-proof .pl { transition: none; } }
/* "Any model": the names take turns. */
.models { display: inline-grid; vertical-align: bottom; overflow: hidden; }
.models > span { grid-area: 1 / 1; opacity: 0; animation: model-turn 7.5s var(--ease-in-out) infinite; animation-delay: calc(var(--k) * 2.5s); }
@keyframes model-turn { 0% { opacity: 0; transform: translateY(100%); } 5%, 29% { opacity: 1; transform: none; } 34%, 100% { opacity: 0; transform: translateY(-100%); } }
@media (prefers-reduced-motion: reduce) { .models > span { animation: none; } .models > span:first-child { opacity: 1; } }
.local-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--space-xl); align-items: center; }
.local-grid > * { min-width: 0; }
.local-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-xs); }
/* Private by default (blocks/demos.rs): a laptop in glyphs with the work
   kept inside it, and one line under it saying what runs and what's sent. */
.local-art { position: relative; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.local-art::before { content: ""; position: absolute; left: -4%; top: 4%; width: 72%; height: 76%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--kpurple) 16%, transparent), transparent); pointer-events: none; }
[data-theme="light"] .local-art::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--kpurple) 14%, transparent), transparent); }
.local-art canvas { position: relative; display: block; width: 100%; height: clamp(240px, 30vw, 380px); }
.local-art figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; color: var(--muted); font-size: var(--step--1); text-align: center; }
.local-art figcaption b { color: var(--positive); font-weight: 600; }
.local-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 0 4px var(--positive-wash); }
.local-sep { color: var(--faint); }
@media (max-width: 520px) { .local-sep { display: none; } .local-art figcaption b { flex-basis: 100%; } }
/* One session on a laptop and a phone (ai/everywhere.rs). Everything in
   the scene is in em, off one size that follows the column's width, so
   it scales as a whole; on a phone only the phone is drawn, readable. The
   screens are the app's dark theme in both of the site's themes. */
.desk { position: relative; container-type: inline-size; margin: var(--space-s) 0 var(--space-xl); }
.desk::before { content: ""; position: absolute; inset: 6% 6% -4%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--kpurple) 20%, transparent), color-mix(in srgb, var(--kpink) 6%, transparent) 60%, transparent); pointer-events: none; }
[data-theme="light"] .desk::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--kpurple) 22%, transparent), color-mix(in srgb, var(--kpink) 8%, transparent) 60%, transparent); }
.desk-scene { position: relative; aspect-ratio: 1200 / 590; font-size: clamp(8px, 100cqw / 92, 14px); color: #F4F2F4; }
/* The laptop: a dark bezel with its camera, lit at the rim; under it the
   body, a little wider than the lid, aluminium lit along its front edge and
   tapering to the desk, with the notch to open it by and its shadow on the
   desk. The body starts at the column's edge, like the heading above. */
.laptop { position: absolute; left: 3.3%; top: 0; width: 66%; }
.laptop-screen { position: relative; aspect-ratio: 16 / 10; padding: 1.1em 1em 1em; border-radius: 1.5em 1.5em 0.9em 0.9em; background: linear-gradient(#232123, #0F0E0F 12%); box-shadow: inset 0 0 0 1px #3A373A, 0 0 0 1px #121112, 0 50px 90px -40px rgba(0, 0, 0, 0.85); }
.laptop-cam { position: absolute; left: 50%; top: 0.4em; width: 0.4em; height: 0.4em; translate: -50% 0; border-radius: 50%; background: #2A282A; box-shadow: inset 0 0 0 0.1em #3A373A; }
.laptop-base { position: relative; width: 110%; height: 1.6em; margin-left: -5%; }
.laptop-base::before {
  content: ""; position: absolute; inset: 0;
  clip-path: polygon(0 0, 100% 0, 99% 55%, 97.6% 100%, 2.4% 100%, 1% 55%);
  background: linear-gradient(#77737A, #55525A 18%, #3C3A3F 55%, #2A282C);
}
/* The notch, and the lit front edge. */
.laptop-base::after {
  content: ""; position: absolute; left: 50%; top: 0; width: 13%; height: 0.55em; translate: -50% 0;
  border-radius: 0 0 0.8em 0.8em; background: linear-gradient(#2A282C, #36343A); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}
.laptop-shadow { position: absolute; left: 0; right: 0; bottom: -1.6em; height: 2em; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent); filter: blur(6px); pointer-events: none; }
[data-theme="light"] .laptop-base::before { background: linear-gradient(#F4F2F4, #DAD6DA 18%, #C2BDC2 55%, #A9A4A9); }
[data-theme="light"] .laptop-base::after { background: linear-gradient(#B4AFB4, #C4BFC4); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.6); }
[data-theme="light"] .laptop-shadow { background: radial-gradient(closest-side, rgba(30, 29, 30, 0.22), transparent); }
[data-theme="light"] .laptop-screen { box-shadow: inset 0 0 0 1px #3A373A, 0 0 0 1px #121112, 0 50px 90px -40px rgba(30, 29, 30, 0.45); }
/* The desktop app. */
.app { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 0.4em; background: #1E1D1E; }
.app-bar { position: relative; display: flex; align-items: center; justify-content: space-between; flex: none; height: 2.5em; padding: 0 0.9em; background: #191819; border-bottom: 1px solid #2A282A; }
.app-dots { display: flex; gap: 0.45em; }
.app-dots i { width: 0.75em; height: 0.75em; border-radius: 50%; background: #FF5F57; }
.app-dots i:nth-child(2) { background: #FEBC2E; }
.app-dots i:nth-child(3) { background: #28C840; }
.app-title { position: absolute; left: 50%; translate: -50% 0; color: #8D888D; font-size: 0.85em; font-weight: 500; }
.app-chip { padding: 0.2em 0.6em; border-radius: 1em; background: #2A282A; color: #ACA7AC; font-family: var(--font-mono); font-size: 0.72em; }
.app-body { display: grid; grid-template-columns: 13.5em minmax(0, 1fr); flex: 1; min-height: 0; }
.app-side { display: flex; flex-direction: column; gap: 0.15em; padding: 0.9em 0.7em; background: #191819; border-right: 1px solid #2A282A; font-size: 0.9em; }
.app-new { margin-bottom: 0.7em; padding: 0.55em 0.7em; border-radius: 0.6em; background: color-mix(in srgb, var(--klavender) 14%, transparent); color: var(--klavender); font-weight: 600; }
.app-side b { margin-top: 0.4em; padding: 0 0.7em 0.3em; color: #6F6A6F; font-size: 0.8em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.app-side span:not(.app-new) { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 0.55em; padding: 0.5em 0.7em; border-radius: 0.6em; color: #ACA7AC; }
.app-side span small { grid-column: 2; color: #6F6A6F; font-size: 0.82em; }
.app-side span.on { background: #2A282A; color: #F4F2F4; }
.dot { width: 0.5em; height: 0.5em; border-radius: 50%; background: #F2B35B; box-shadow: 0 0 0 0.2em rgba(242, 179, 91, 0.16); transition: background-color 300ms, box-shadow 300ms; }
.dot.done { background: #49DE78; box-shadow: 0 0 0 0.2em rgba(73, 222, 120, 0.14); }
.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-head { display: flex; align-items: center; justify-content: space-between; flex: none; padding: 0.8em 1.4em; border-bottom: 1px solid #2A282A; }
.app-head > span:first-child, .phone-head > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.app-head small, .phone-head small { color: #6F6A6F; font-size: 0.8em; }
.status { display: inline-flex; align-items: center; gap: 0.45em; padding: 0.25em 0.7em; border-radius: 1em; background: rgba(242, 179, 91, 0.12); color: #F2B35B; font-size: 0.78em; font-weight: 600; transition: background-color 300ms, color 300ms; }
.status i { width: 0.5em; height: 0.5em; border-radius: 50%; background: currentColor; animation: blink 1.2s ease-in-out infinite; }
.status.done { background: rgba(73, 222, 120, 0.12); color: #49DE78; }
.status.done i { animation: none; }
.app-main .thread { flex: 1; }
.app-input { display: flex; align-items: center; justify-content: space-between; margin: 0 1.4em 1.2em; padding: 0.45em 0.45em 0.45em 1em; border-radius: 0.9em; background: #232123; box-shadow: inset 0 0 0 1px #343134; color: #6F6A6F; font-size: 0.92em; }
.send { display: grid; place-items: center; flex: none; width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--klavender); color: #1E1D1E; }
.send .ico { width: 1.05em; height: 1.05em; transform: rotate(-90deg); stroke-width: 2.4; }
/* The session: your words in a bubble, its steps as the terminal prints
   them, its edit as a small diff, its answer as plain text. Older lines
   sit above, a little dimmer; new ones keep their place and fade in, on
   both screens at once. The thread reads from the bottom, like a chat. */
.thread { display: flex; flex-direction: column; justify-content: flex-end; gap: 0.7em; min-height: 0; overflow: hidden; padding: 1.1em 1.4em; }
.msg { display: block; flex: none; opacity: 0; transform: translateY(0.4em); transition: opacity 320ms var(--ease-out), transform 480ms var(--ease-ui); }
.msg.on, .msg.old { opacity: 1; transform: none; }
.msg.old { opacity: 0.55; }
.msg.you { align-self: flex-end; max-width: 80%; padding: 0.6em 0.9em; border-radius: 1em 1em 0.3em 1em; background: color-mix(in srgb, var(--klavender) 18%, transparent); line-height: 1.35; }
.msg.ai { max-width: 92%; line-height: 1.4; }
.msg.step { font-family: var(--font-mono); font-size: 0.85em; color: #8D888D; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg.step .mark { margin-right: 0.7em; color: #49DE78; }
.msg.step .what { margin-right: 0.7em; color: #F4F2F4; font-weight: 600; }
.msg.diff { display: flex; flex-direction: column; gap: 0.3em; padding: 0.6em 0.8em; border-radius: 0.7em; background: #171617; box-shadow: inset 0 0 0 1px #2A282A; font-family: var(--font-mono); font-size: 0.82em; }
.diff-head { display: flex; align-items: center; gap: 0.7em; color: #F4F2F4; }
.diff-head b { font-weight: 600; }
.diff-head .add { color: #49DE78; }
.diff-head .del { color: #FF6B6B; }
.msg.diff code { color: #49DE78; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
/* The phone: a dark frame with its side buttons and a screen that runs to
   rounded corners, the island in the status bar. */
.phone { position: absolute; right: 1%; bottom: 0; width: 24%; aspect-ratio: 9 / 18.4; padding: 0.55em; border-radius: 2.8em; background: linear-gradient(145deg, #3A373A, #121112 30%, #0D0C0D 70%, #2A282A); box-shadow: 0 0 0 1px #2E2B2E, 0 50px 90px -36px rgba(0, 0, 0, 0.85); }
[data-theme="light"] .phone { box-shadow: 0 0 0 1px #2E2B2E, 0 50px 90px -36px rgba(30, 29, 30, 0.45); }
.phone-btn { position: absolute; left: -0.25em; width: 0.25em; border-radius: 0.2em 0 0 0.2em; background: #2A282A; }
.phone-btn.a { top: 16%; height: 5%; }
.phone-btn.b { top: 24%; height: 9%; }
.phone-btn.c { top: 35%; height: 9%; }
.phone-screen { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 2.3em; background: #1E1D1E; font-size: 0.86em; }
.phone-status { position: relative; display: flex; align-items: center; justify-content: space-between; flex: none; height: 2.9em; padding: 0 1.6em; font-weight: 600; font-size: 0.92em; }
.phone-island { position: absolute; left: 50%; top: 0.55em; width: 32%; height: 1.75em; translate: -50% 0; border-radius: 1em; background: #000; }
.phone-icons { display: flex; align-items: center; gap: 0.4em; }
.phone-icons .bars { width: 1.1em; height: 0.75em; background: linear-gradient(90deg, #F4F2F4 0 18%, transparent 18% 27%, #F4F2F4 27% 45%, transparent 45% 54%, #F4F2F4 54% 72%, transparent 72% 81%, #F4F2F4 81%); clip-path: polygon(0 75%, 100% 0, 100% 100%, 0 100%); }
.phone-icons .battery { width: 1.55em; height: 0.75em; border-radius: 0.2em; box-shadow: inset 0 0 0 1px #8D888D; background: linear-gradient(90deg, #F4F2F4 70%, transparent 70%) 0.15em 50% / calc(100% - 0.3em) calc(100% - 0.3em) no-repeat; }
.phone-head { display: flex; align-items: center; gap: 0.7em; flex: none; padding: 0.5em 1em 0.7em; border-bottom: 1px solid #2A282A; }
.phone-head .back { color: var(--klavender); font-size: 1.8em; line-height: 0.8; }
.phone-head > span:nth-child(2) { flex: 1; }
.phone .thread { flex: 1; padding: 0.8em 0.9em; gap: 0.55em; }
.phone .msg.you { max-width: 88%; }
/* The notice when the work is done, dropping in under the island. */
.phone-notice { position: absolute; top: 2.6em; left: 0.6em; right: 0.6em; z-index: 2; display: flex; align-items: center; gap: 0.6em; padding: 0.7em 0.8em; border-radius: 1.3em; background: #343134; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.8); line-height: 1.3; opacity: 0; transform: translateY(-140%); transition: opacity 260ms var(--ease-out), transform 520ms var(--ease-ui); }
.phone-notice.show { opacity: 1; transform: none; }
.phone-notice span { display: flex; flex-direction: column; min-width: 0; color: #ACA7AC; }
.phone-notice b { color: #F4F2F4; font-weight: 600; }
/* Your answer, typed on the phone before it's sent. */
.phone-input { display: flex; align-items: center; gap: 0.5em; flex: none; margin: 0 0.8em 1.4em; padding: 0.4em 0.4em 0.4em 1em; border-radius: 1.4em; background: #232123; box-shadow: inset 0 0 0 1px #343134; color: #6F6A6F; }
.phone-input .field { display: grid; flex: 1; min-width: 0; }
.phone-input .field > span { grid-area: 1 / 1; white-space: nowrap; overflow: hidden; }
.phone-input .draft { width: 0; color: #F4F2F4; }
.phone-input.typing .draft { width: 100%; transition: width 1000ms steps(19, end); }
.phone-input.typing .hint { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .msg, .phone-notice { transition: none; } .status i { animation: none; } }
@media (max-width: 700px) {
  .desk-scene { aspect-ratio: auto; display: flex; justify-content: center; font-size: 13px; }
  .laptop { display: none; }
  .phone { position: relative; right: auto; width: min(280px, 76%); }
}
/* The places, as a row under the scene: what each is, in a line. */
.places { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.place { display: flex; flex-direction: column; gap: 6px; padding: var(--space-m) var(--space-m) 0; border-left: 1px solid var(--border); }
.place:first-child { padding-left: 0; border-left: 0; }
.place-ico { display: grid; width: 20px; height: 20px; margin-bottom: 6px; color: var(--accent-ink); }
.place-ico .ico { width: 20px; height: 20px; }
.place h3 { font-size: var(--step-0); font-weight: 600; }
.place p { color: var(--muted); font-size: var(--step--1); }
.place p code { padding: 1px 6px; border-radius: 6px; background: var(--card-hover); color: var(--text); }
/* Three cards to a row on a laptop leave their wells narrow. */
@media (min-width: 961px) and (max-width: 1240px) { .feature .feature-proof { padding: 0 16px; font-size: 12px; } }
@media (max-width: 960px) {
  .local-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .places { grid-template-columns: 1fr 1fr; row-gap: var(--space-m); }
  .place:nth-child(odd) { padding-left: 0; border-left: 0; }
}
@media (max-width: 600px) {
  /* Six cards stacked would be screens of scrolling: on a phone they're a
     row to swipe, the next one peeking in at the edge. */
  .feature-grid {
    display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px;
    scroll-padding: 0 var(--gutter);
  }
  .feature-grid::-webkit-scrollbar { display: none; }
  .feature-grid > .feature { flex: 0 0 84%; scroll-snap-align: start; }
  /* A line too long for a phone wraps rather than widen its card. */
  .feature .feature-proof { height: auto; padding: 24px 18px; white-space: pre-wrap; }
}
@media (max-width: 520px) {
  .places { grid-template-columns: 1fr; row-gap: 0; }
  .place { padding: var(--space-s) 0; border-left: 0; border-top: 1px solid var(--border); }
  .place:first-child { border-top: 0; }
}

/* ---- Pricing and About ----------------------------------------------------------- */

/* A page's opening screen: the copy on the left and its picture in glyphs
   on the right, both centered in the screen under the nav. On narrow
   screens the picture sits under the copy. */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: max(560px, calc(100svh - var(--nav-h) - 36px));
  display: grid; grid-template-columns: 1fr; align-items: center;
  padding: var(--space-xl) 0;
}
.page-hero > .wrap { grid-area: 1 / 1; }
/* The copy keeps the left half of the content column. */
.page-hero-in { position: relative; z-index: 1; }
.page-hero .page-hero-in > * { max-width: min(34rem, 46%); }
.page-hero-art-wrap { display: flex; justify-content: flex-end; pointer-events: none; }
/* The pricing heroes' pictures are things to use and read, not glyphs. */
.page-hero-art.hero-calc, .page-hero-art.hero-receipt { height: auto; align-self: center; width: min(46%, 500px); }
.hero-calc .calc { padding: var(--space-l); border-radius: 14px; background: var(--surface); }
.hero-calc .calc-amount { font-size: var(--step-4); letter-spacing: -0.02em; }
.hero-calc .calc-out { font-size: var(--step-1); margin-top: var(--space-s); }
.receipt { padding: var(--space-l); border-radius: 14px; background: var(--term-bg); border: 1px solid #2A282A; color: var(--term-text); font-family: var(--font-mono); font-size: 14px; box-shadow: 0 40px 120px -40px color-mix(in srgb, var(--klavender) 30%, transparent), var(--shadow); }
.receipt-done { color: var(--term-muted); }
.receipt dl { display: grid; gap: 10px; margin: var(--space-s) 0; padding: var(--space-s) 0; border-block: 1px dashed #3A373A; }
.receipt dl div { display: flex; justify-content: space-between; gap: 16px; }
.receipt dt { flex: none; color: var(--term-muted); }
.receipt dd { text-align: right; }
.receipt-total { display: flex; justify-content: space-between; align-items: baseline; }
.receipt-total b { font-size: var(--step-3); font-weight: 600; color: var(--term-text); }
.receipt .t-ok { color: #49DE78; }
@media (max-width: 900px) { .page-hero-art.hero-calc, .page-hero-art.hero-receipt { width: 100%; max-width: 520px; } }
.page-hero-art { width: min(52%, 640px); height: min(58svh, 520px); pointer-events: auto; animation: enter 900ms var(--ease) 200ms backwards; }
.glyph-word { position: relative; }
.glyph-word canvas { display: block; width: 100%; height: 100%; }
@media (max-width: 900px) {
  .page-hero { grid-template-rows: auto auto; min-height: 0; padding: var(--space-xl) 0 var(--space-l); gap: var(--space-l); }
  .page-hero > .wrap { grid-area: auto; }
  .page-hero .page-hero-in > * { max-width: none; }
  .page-hero-art-wrap { justify-content: center; }
  .page-hero-art { width: 100%; height: clamp(140px, 34vw, 260px); }
}
.page-hero-in { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-s); }
.page-hero-in > * { animation: enter 800ms var(--ease) backwards; }
.page-hero-in > :nth-child(2) { animation-delay: 80ms; }
.page-hero-in > :nth-child(3) { animation-delay: 160ms; }
.page-hero-in > :nth-child(4) { animation-delay: 240ms; }
.page-title { font-size: var(--step-6); line-height: 1.03; letter-spacing: -0.04em; font-weight: 500; max-width: 15em; text-wrap: balance; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.price-grid > * { min-width: 0; }
.price-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-s); padding: var(--space-l); border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.price-card.ai { background: var(--term-bg); border-color: #2A282A; color: var(--term-text); }
.price-kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.price-kicker .ico { width: 18px; height: 18px; }
.price-big { font-size: var(--step-6); font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.price-big small { font-size: var(--step-0); letter-spacing: 0; color: var(--muted); font-weight: 400; margin-left: 6px; }
.price-card.ai .price-big small { color: var(--term-muted); }
.price-lines { display: flex; flex-direction: column; gap: 12px; width: 100%; padding: var(--space-xs) 0; border-top: 1px solid var(--border); }
.price-card.ai .price-lines { border-color: #2E2C2E; }
.price-lines li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--step--1); }
.price-lines .ico { width: 18px; height: 18px; flex: none; color: var(--positive); margin-top: 2px; }
.price-card .btn { margin-top: auto; }
.price-note { padding: var(--space-s); border-radius: 14px; background: #121112; border: 1px solid #2A282A; color: #ECE7EC; }
.price-note p { color: #ACA7AC; }
.price-note b { display: block; margin-bottom: 4px; font-size: 15px; }
.price-note p { color: var(--term-muted); font-size: var(--step--1); }
.calc { width: 100%; padding: var(--space-s); border-radius: 16px; background: var(--bg); border: 1px solid var(--border); }
.calc-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.calc-amount { color: var(--text); font-size: var(--step-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.calc input[type="range"] { width: 100%; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.calc input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p), var(--border-strong) var(--p)); }
.calc input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p), var(--border-strong) var(--p)); }
.calc input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); transition: transform var(--dur-quick) var(--ease-ui); }
.calc input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--white); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.calc input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.calc-out { margin-top: 8px; color: var(--muted); font-size: var(--step--1); }
.calc-out b { color: var(--text); font-variant-numeric: tabular-nums; }
.price-card.hl { border-color: color-mix(in srgb, var(--klavender) 40%, transparent); box-shadow: 0 30px 80px -40px var(--glow); }
.price-body { color: var(--muted); font-size: var(--step--1); }
.price-card.ai .price-body { color: var(--term-muted); }
.price-note-wrap { margin-top: 20px; }
.price-table { display: flex; flex-direction: column; width: 100%; margin-top: var(--space-xs); border-top: 1px solid var(--border); }
.price-table div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: var(--step--1); }
.price-table dt { color: var(--muted); }
.price-table dd { font-weight: 600; text-align: right; }
/* A note at the card's foot, level with the button in the card beside it. */
.price-foot { display: flex; align-items: flex-start; gap: 10px; margin-top: auto; padding: 14px 16px; border-radius: 14px; background: var(--card-hover); color: var(--muted); font-size: var(--step--1); line-height: 1.45; }
.price-foot .ico { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--accent-ink); }
@media (max-width: 900px) { .price-grid { grid-template-columns: 1fr; } }


/* ---- Where the name comes from (home/name.rs) ------------------------------------ */

.name { border-top: 1px solid var(--border); overflow: hidden; }
.name-in { display: flex; flex-direction: column; align-items: center; gap: var(--space-xs); text-align: center; }
.name .section-title { max-width: 16em; }
.name .lede { margin-top: var(--space-2xs); max-width: 34em; }
/* Her eye: a canvas filling a wide box, with a faint light behind it. */
.eye { position: relative; width: min(100%, 900px); aspect-ratio: 2.3; margin-bottom: var(--space-m); cursor: pointer; touch-action: pan-y; }
.eye canvas { position: relative; display: block; width: 100%; height: 100%; }
.eye::before {
  content: ""; position: absolute; inset: 0 12%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--kpurple) 20%, transparent), color-mix(in srgb, var(--klavender) 7%, transparent) 55%, transparent);
  opacity: 0.6; transition: opacity 700ms var(--ease), scale 900ms var(--ease);
}
[data-theme="light"] .eye::before { background: radial-gradient(closest-side, rgba(112, 65, 176, 0.13), rgba(165, 50, 173, 0.05) 55%, transparent); }
/* Her vision (home/name.rs): a canvas behind the page, as wide as it and
   two screens tall around her eye (placed by name.rs), there only while she
   has one. */
/* Its ends fade, so scrolling well away from her lets the vision go softly. */
.vision-layer { position: absolute; left: 0; width: 100%; z-index: -1; pointer-events: none; mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
/* Overjoyed (home/name.rs), the light behind her swells. */
.eye.joyful::before { opacity: 1; scale: 1.3; transition-duration: 300ms, 400ms; }
/* While her vision plays behind it, the text keeps a soft halo of the page
   color so it reads clearly. */
.name :is(.section-title, .lede) { transition: text-shadow 400ms var(--ease); }
.name:has(.eye.joyful) :is(.section-title, .lede) { text-shadow: 0 0 6px var(--bg), 0 0 18px var(--bg), 0 0 36px var(--bg); }
@media (max-width: 640px) { .eye { aspect-ratio: 1.9; width: calc(100% + 2 * var(--gutter)); max-width: none; } }

/* ---- How the home page ends ------------------------------------------------------ */

.finale { padding: var(--space-3xl) 0 0; border-top: 1px solid var(--border); overflow: hidden; }
.finale-in { display: flex; flex-direction: column; align-items: center; gap: var(--space-m); text-align: center; }
.finale-title { font-size: clamp(2.4rem, 9vw, var(--step-6)); font-weight: 500; letter-spacing: -0.04em; line-height: 1.02; text-wrap: balance; }
.finale-title .accent { background: linear-gradient(90deg, var(--kpurple), var(--klavender)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.finale-actions { display: flex; align-items: center; gap: var(--space-m); flex-wrap: wrap; justify-content: center; }
.finale-links { display: flex; align-items: center; gap: var(--space-m); }
/* On a phone the button sits above the two links. */
@media (max-width: 520px) { .finale-actions { flex-direction: column; gap: var(--space-s); } }
/* Her name across the content column, edge to edge with the logo above
   and the footer below; on a phone, nearly the screen's width. */
.finale-mark { position: relative; height: clamp(80px, 19vw, 360px); max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: var(--space-xl) auto 0; padding: 0 var(--gutter); cursor: default; }
@media (max-width: 640px) { .finale-mark { height: 104px; padding: 0 8px; margin-bottom: var(--space-m); } }

/* /ai for members of the kassandra org: one line under the hero's buttons. */
.ai-member { margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; max-width: 46ch; }
