/* 2.35d: the web's layout. Colours, radii, spacing, type and motion come from tokens.css (the app's, copied by
   scripts/web/sync.mjs); the few values only the web needs are the tokens just below. The travelling pill, the ticker, the
   beacon, the suggestions and the copy receipt derive from Moxen's resources (moxen.cl/recursos; docs/CREDITS.md). */
@font-face { font-family: 'Outfit'; src: url('../fonts/Outfit.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

/* ---- web-only tokens ---- */
:root {
  --page-max: 1200px;
  --text-display: clamp(5rem, 15vw, 8.5rem);
  --text-hero: clamp(var(--text-lg), 1.4vw + .8rem, var(--text-xl));
  --orb-hero: min(38dvh, 72vw);
  /* «Jekt s'encén»: the big sphere (guide: 80 % of the height or 60 % of the width; 85 % of the width on a phone). */
  --orb-d: min(80dvh, 60vw);
  --float-size: 72px;
  /* A large move (B10, about 1 s): it gathers itself a little first (B2) and lands softly. */
  --ease-anticipate: cubic-bezier(.45, -.18, .25, 1);
  --header-h: 72px;
}
@media (max-width: 720px) { :root { --orb-d: 85vw; --orb-hero: min(40dvh, 78vw); --header-h: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
:root { scrollbar-color: var(--scrollbar-thumb) transparent; scroll-padding-top: calc(var(--header-h) + var(--space-4)); }
@media (prefers-reduced-motion: no-preference) { :root { scroll-behavior: smooth; } }
body { font-size: var(--text-base); line-height: 1.5; overflow-x: clip; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
a { color: inherit; }
img, video { display: block; max-width: 100%; height: auto; }
.mono, .tabular { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: var(--space-2); left: var(--space-2); z-index: 30; padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); background: var(--surface-3); translate: 0 -200%; }
.skip:focus-visible { translate: none; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* The images of the other mode are not shown (and lazy ones are never fetched). */
:root[data-mode="dark"] .for-light, :root[data-mode="light"] .for-dark { display: none; }

/* ---- the grid (retícula): fixed behind everything; its colour is the text's ---- */
.page-grid { position: fixed; inset: 0; width: 100%; height: 100%; color: var(--text-primary); pointer-events: none; }
/* D10: a touch screen has no cursor for the grid to follow, so the grid is the same rest pattern in CSS, no canvas (the app's
   GRID_LOOK: a 22 px step and 1.2 px dots at 26 % of the text colour). */
@media (pointer: coarse) {
  .page-grid { background-image: radial-gradient(circle, color-mix(in oklch, var(--text-primary) 26%, transparent) 1.2px, transparent 1.6px); background-size: 22px 22px; background-position: center; }
}
.site-header, main, .site-footer { position: relative; }

/* ---- buttons (as the app) ---- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 40px; padding: var(--space-2) var(--space-4); border: var(--border) solid var(--glass-2-border); border-radius: var(--radius-md); background: var(--glass-2); cursor: pointer; transition: background var(--dur-micro) var(--ease-out), scale var(--dur-micro) var(--ease-out); }
.button:hover { background: var(--glass-3); border-color: var(--glass-3-border); }
.button:active { scale: var(--press-scale); }
.icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: var(--border) solid transparent; border-radius: var(--radius-md); background: none; cursor: pointer; }
.icon-button:hover, .icon-button[aria-expanded="true"] { background: var(--glass-2); border-color: var(--glass-2-border); }
.clay { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-3); min-height: 44px; padding: var(--space-3) var(--space-6); text-decoration: none; cursor: pointer; transition: transform var(--dur-micro) var(--ease-out), filter var(--dur-micro) var(--ease-out); }
.clay:hover { filter: brightness(1.06); }
.clay:active { box-shadow: var(--clay-inset); transform: scale(var(--press-scale)); }
.clay.is-large { min-height: 56px; padding: var(--space-4) var(--space-8); font-size: var(--text-lg); border-radius: var(--radius-lg); }

/* ---- header and the navigation (travesano: the active pill travels) ---- */
.site-header { position: sticky; top: 0; z-index: 10; padding: var(--space-3) var(--space-4) 0; }
.bar { --radius-outer: var(--radius-xl); --pad: var(--space-2); display: flex; align-items: center; gap: var(--space-4); max-width: var(--page-max); margin: 0 auto; padding: var(--pad) var(--pad) var(--pad) var(--space-4); }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-brand); font-size: var(--text-xl); font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.brand-mark { width: 24px; height: 24px; }
.brand-jekt { position: relative; display: inline-block; }
.brand-jekt[data-dust="true"], .hero-word[data-dust="true"] { color: transparent; }
.dust-canvas { position: absolute; left: 0; top: 0; color: var(--text-primary); pointer-events: none; }
.nav-list { position: relative; display: flex; gap: var(--space-1); margin: 0 auto; padding: 0; list-style: none; }
.nav-item { position: relative; z-index: 1; display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-4); border-radius: var(--radius-inner); color: var(--text-secondary); text-decoration: none; transition: color var(--dur-short) var(--ease-out); }
.nav-item:hover, .nav-item[aria-current] { color: var(--text-primary); }
.nav-pill { position: absolute; left: 0; top: 0; width: var(--pill-w, 0px); height: 100%; border: var(--border) solid var(--glass-3-border); border-radius: var(--radius-inner); background: var(--glass-3); opacity: var(--pill-o, 0); translate: var(--pill-x, 0px) 0; transition: translate var(--spring-snappy-dur) var(--spring-snappy), width var(--spring-snappy-dur) var(--spring-snappy), opacity var(--dur-short) var(--ease-out); pointer-events: none; }
.bar-end { display: flex; gap: var(--space-1); }
:root[data-mode="dark"] .theme-toggle .icon-moon, :root[data-mode="light"] .theme-toggle .icon-sun { display: none; }
@media (prefers-reduced-motion: no-preference) { .theme-toggle .icon { animation: icon-swap-in var(--dur-short) var(--ease-out); } }
@keyframes icon-swap-in { from { opacity: 0; scale: .6; filter: var(--blur-icon); } to { opacity: 1; scale: 1; filter: none; } }
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .bar { flex-wrap: wrap; }
  .menu-toggle { display: inline-grid; }
  .bar-end { margin-left: auto; }
  .nav-list { order: 3; flex-direction: column; width: 100%; margin: 0; }
  .nav-list:not(.is-open) { display: none; }
  .nav-item { width: 100%; min-height: 44px; }
  .nav-pill { display: none; }
  .nav-item[aria-current] { background: var(--glass-3); box-shadow: var(--shadow-indicator); }
}

/* ---- D12: the language selector. The code in small monospace; pressed, a short glass list. On a phone the three names sit
   in the menu instead. Without JavaScript <details> opens and closes by itself ---- */
.lang-select { position: relative; justify-self: start; }
.lang-current { display: inline-flex; align-items: center; gap: var(--space-1); min-width: 40px; min-height: 40px; padding: 0 var(--space-2); border: var(--border) solid transparent; border-radius: var(--radius-md); color: var(--text-secondary); font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: var(--text-xs); letter-spacing: .04em; list-style: none; cursor: pointer; }
.lang-current::-webkit-details-marker { display: none; }
.lang-current:hover, .lang-select[open] .lang-current { border-color: var(--glass-2-border); background: var(--glass-2); color: var(--text-primary); }
.lang-chevron { width: 14px; height: 14px; }
@media (prefers-reduced-motion: no-preference) { .lang-chevron { transition: rotate var(--dur-short) var(--ease-out); } }
.lang-select[open] .lang-chevron { rotate: 180deg; }
.lang-list { --radius-outer: var(--radius-lg); --pad: var(--space-1); position: absolute; top: calc(100% + var(--space-2)); right: 0; z-index: 20; display: grid; min-width: 10rem; margin: 0; padding: var(--pad); list-style: none; }
.lang-select.is-foot .lang-list { top: auto; right: auto; bottom: calc(100% + var(--space-2)); left: 0; }
.lang-list a, .lang-inline a { display: flex; align-items: center; min-height: 40px; padding: 0 var(--space-3); border-radius: var(--radius-inner); color: var(--text-secondary); text-decoration: none; }
.lang-list a:hover, .lang-list a:focus-visible, .lang-inline a:hover { background: var(--glass-2); color: var(--text-primary); }
.lang-list a[aria-current], .lang-inline a[aria-current] { color: var(--text-primary); font-weight: 600; }
.nav-lang { display: none; }
@media (max-width: 860px) {
  .bar-end .lang-select { display: none; }
  .nav-lang { display: block; margin-top: var(--space-1); padding-top: var(--space-1); border-top: var(--border) solid var(--glass-2-border); }
  .lang-inline { --radius-outer: var(--radius-xl); --pad: var(--space-2); display: flex; flex-wrap: wrap; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
  .lang-inline a { min-height: 44px; }
}

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: var(--space-5); max-width: var(--page-max); margin: 0 auto; padding: var(--space-8) var(--space-4) var(--space-12); text-align: center; }
.ticker { --radius-outer: var(--radius-full); display: inline-flex; min-width: 0; align-items: center; gap: var(--space-3); max-width: 100%; min-height: 40px; padding: var(--space-1) var(--space-4) var(--space-1) var(--space-1); color: var(--text-primary); font-size: var(--text-md); text-decoration: none; }
.ticker:not([hidden]) { animation: ticker-in var(--dur-long) var(--ease-out) both; }
@keyframes ticker-in { from { opacity: 0; translate: 0 calc(-1 * var(--space-2)); } }
.ticker-tag { padding: var(--space-1) var(--space-3); border-radius: var(--radius-full); background: var(--glass-3); font-weight: 600; }
.ticker-version { font-weight: 600; }
.ticker-tag, .ticker-version { flex: none; }
.ticker-note { min-width: 0; overflow: hidden; color: var(--text-secondary); white-space: nowrap; text-overflow: ellipsis; }
.hero-orb { display: grid; place-items: center; width: var(--orb-hero); height: var(--orb-hero); }
.hero-orb canvas { display: block; }
/* D10: a big sphere arrives after the first paint; it comes in once its first frame is drawn, never as an empty jump. */
.hero-orb canvas, .encen-orb canvas { transition: opacity var(--dur-hover-in) var(--ease-out); }
.hero-orb canvas:not([data-ready]), .encen-orb canvas:not([data-ready]) { opacity: 0; }
.hero-title { margin-top: calc(-1 * var(--space-4)); font-family: var(--font-brand); font-size: var(--text-display); font-weight: 600; line-height: .9; letter-spacing: -.01em; }
.hero-word { position: relative; display: inline-block; padding: 0 .06em; }
.hero-lede { max-width: 40rem; color: var(--text-secondary); font-size: var(--text-hero); }
.hero-download, .download-main { display: grid; justify-items: center; gap: var(--space-2); }
.download-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-1) var(--space-3); min-height: 1.5em; color: var(--text-secondary); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.download-meta a { color: var(--text-primary); }
/* While versions.json loads: a still bar, never a spinner (C8). */
.skeleton-line { display: inline-block; width: 14rem; height: .9em; border-radius: var(--radius-full); background: var(--glass-2); vertical-align: middle; }
.hero-video { --radius-outer: var(--radius-2xl); --pad: var(--space-2); width: 100%; max-width: 1040px; margin-top: var(--space-6); padding: var(--pad); }
.hero-video video { width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius-inner); background: var(--surface-data); }
.hero-video figcaption { padding: var(--space-3) var(--space-2) var(--space-1); color: var(--text-secondary); font-size: var(--text-md); }

/* ---- sections ---- */
.section-title { font-family: var(--font-brand); font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl)); font-weight: 600; letter-spacing: -.01em; }
.points { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.points li { position: relative; padding-left: var(--space-5); }
.points li::before { content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 6px; border-radius: var(--radius-round); background: var(--text-secondary); }

/* ---- features ---- */
.features { display: grid; gap: var(--space-12); max-width: var(--page-max); margin: 0 auto; padding: var(--space-12) var(--space-4); }
.features .section-title { text-align: center; }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: var(--space-10); }
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature-text { display: grid; gap: var(--space-4); }
.feature-text h3 { font-family: var(--font-brand); font-size: var(--text-2xl); font-weight: 600; }
.feature-text p { color: var(--text-secondary); font-size: var(--text-lg); }
.shot { --radius-outer: var(--radius-2xl); --pad: var(--space-2); padding: var(--pad); }
.shot img { width: 100%; border-radius: var(--radius-inner); }
@media (max-width: 860px) {
  .feature { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .feature:nth-of-type(even) .feature-text { order: 0; }
}

/* ---- «nou» (baliza): a still mark beside what the latest version added; three rings as it comes on screen ---- */
.beacon { position: relative; display: inline-block; width: 8px; height: 8px; margin-left: var(--space-2); border-radius: var(--radius-round); background: var(--jekt-listening); vertical-align: middle; }
.beacon::after { content: ""; position: absolute; inset: 0; border: var(--ring) solid var(--jekt-listening); border-radius: inherit; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .beacon[data-beat]::after { animation: beacon-ring calc(var(--dur-long) * 3) var(--ease-out) 3 both; }
}
@keyframes beacon-ring { from { opacity: .9; scale: 1; } to { opacity: 0; scale: 3; } }

/* ---- «Jekt s'encén»: sticky for seven screens; the steps take turns over the sphere ---- */
.encen { position: relative; height: 800svh; }
.encen-stage { position: sticky; top: 0; height: 100svh; overflow: clip; }
.encen-orb { position: absolute; left: 50%; top: 50%; width: var(--orb-d); height: var(--orb-d); margin: calc(var(--orb-d) / -2) 0 0 calc(var(--orb-d) / -2); translate: var(--orb-x, 0px) 0; scale: var(--orb-s, 1); transition: translate var(--dur-flight) var(--ease-anticipate), scale var(--dur-flight) var(--ease-in-out); will-change: translate, scale; }
/* The height eases on its own curve: the sphere travels on an arc, not a straight line (B4). */
.encen-orb-lift { position: relative; display: grid; place-items: center; width: 100%; height: 100%; translate: 0 var(--orb-y, 0px); transition: translate var(--dur-flight) var(--ease-out); }
.encen-orb canvas { position: relative; z-index: 1; display: block; }
.encen-steps { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.encen-step { position: absolute; inset: var(--header-h) 0 0; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: end; gap: var(--space-4); padding: var(--space-8) var(--space-6) var(--space-10); opacity: 0; visibility: hidden; translate: 0 var(--space-4); transition: opacity var(--dur-long) var(--ease-out), translate var(--dur-long) var(--ease-out), visibility 0s linear var(--dur-long); }
.encen-step[data-active] { opacity: 1; visibility: visible; translate: none; transition-delay: calc(var(--dur-flight) * .35), calc(var(--dur-flight) * .35), 0s; }
/* data-side: where the sphere goes. The bubble is by the sphere, above it; the detail on the other side (guide). */
.encen-step[data-side="left"], .encen-step[data-side="right"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); justify-items: center; align-items: start; column-gap: var(--space-10); max-width: var(--page-max); margin: 0 auto; }
.encen-step[data-side] > .encen-panel { grid-row: 1 / span 2; align-self: center; }
.encen-step[data-side="left"] > .bubble { grid-column: 1; }
.encen-step[data-side="left"] > .encen-panel { grid-column: 2; }
.encen-step[data-side="right"] > .bubble { grid-column: 2; }
.encen-step[data-side="right"] > .encen-panel { grid-column: 1; }
/* Centre with a detail (step 6): the sphere small at the top, the bubble and the detail under it. */
.encen-step[data-side="center"]:has(.encen-panel) { align-content: end; }
/* The way out: the bubble at the top, the sphere going down towards the download. */
.encen-step[data-step="7"] { align-content: start; }
.encen-hint { color: var(--text-secondary); font-size: var(--text-lg); }
.bubble { --radius-outer: var(--radius-xl); position: relative; max-width: 34rem; padding: var(--space-4) var(--space-5); font-size: var(--text-lg); }
.encen-panel { --radius-outer: var(--radius-2xl); --pad: var(--space-4); display: grid; gap: var(--space-3); width: min(34rem, 100%); padding: var(--space-5); text-align: left; }
.encen-panel h3 { font-family: var(--font-brand); font-size: var(--text-xl); font-weight: 600; }
.encen-panel .points { color: var(--text-secondary); font-size: var(--text-md); }
.panel-shot img { width: 100%; max-height: 34dvh; object-fit: contain; object-position: left top; border-radius: var(--radius-inner); }
@media (max-width: 860px) {
  .encen-step[data-side="left"], .encen-step[data-side="right"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; align-content: end; }
  .encen-step[data-side] > .bubble, .encen-step[data-side] > .encen-panel { grid-column: 1; grid-row: auto; }
  .bubble { font-size: var(--text-base); }
  .encen-panel { padding: var(--space-4); }
  .panel-shot img { max-height: 22dvh; }
  .encen-panel .points li:nth-child(n + 3) { display: none; }
}
/* Reduced motion: the steps stacked, the sphere lit and still at the top (guide). */
@media (prefers-reduced-motion: reduce) {
  :root { --orb-d: min(44dvh, 70vw); }
  .encen { height: auto; padding: var(--space-12) var(--space-4); }
  .encen-stage { position: relative; height: auto; overflow: visible; display: grid; justify-items: center; gap: var(--space-8); }
  .encen-orb { position: relative; left: auto; top: auto; margin: 0; translate: none; scale: none; }
  .encen-orb-lift { translate: none; }
  .encen-steps { position: static; display: grid; gap: var(--space-8); max-width: var(--page-max); }
  .encen-step, .encen-step[data-side] { position: static; inset: auto; grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 0; opacity: 1; visibility: visible; translate: none; }
  .encen-step[data-side] > .bubble, .encen-step[data-side] > .encen-panel { grid-column: 1; grid-row: auto; }
  .encen-step[data-step="0"] { display: none; }
}

/* ---- download ---- */
.download { display: grid; justify-items: center; gap: var(--space-6); max-width: var(--page-max); margin: 0 auto; padding: var(--space-12) var(--space-4); text-align: center; }
.download-lede { max-width: 38rem; color: var(--text-secondary); font-size: var(--text-lg); }
.download-mobile { max-width: 30rem; font-size: var(--text-lg); }
.download-more { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: var(--space-3); }
.other-systems { --radius-outer: var(--radius-lg); min-width: min(26rem, 100%); border: var(--border) solid var(--glass-2-border); border-radius: var(--radius-outer); background: var(--glass-2); text-align: left; }
.other-systems summary { display: flex; align-items: center; min-height: 40px; padding: 0 var(--space-4); cursor: pointer; }
.file-list { display: grid; gap: var(--space-1); margin: 0; padding: 0 var(--space-2) var(--space-2); list-style: none; }
.file-list a { display: flex; justify-content: space-between; gap: var(--space-4); min-height: 40px; align-items: center; padding: 0 var(--space-3); border-radius: var(--radius-sm); text-decoration: none; }
.file-list a:hover { background: var(--glass-3); }
.file-size { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.download-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); gap: var(--space-8); width: 100%; margin-top: var(--space-6); text-align: left; }
.download-notes h3 { margin-bottom: var(--space-3); font-size: var(--text-lg); }
.download-notes p { margin-bottom: var(--space-3); color: var(--text-secondary); }

/* ---- the other pages (D12): a reading column, its title, and what each page adds ---- */
.page { display: grid; gap: var(--space-8); max-width: 48rem; margin: 0 auto; padding: var(--space-12) var(--space-4) var(--space-8); }
.page-head { display: grid; gap: var(--space-3); }
.page-title { font-family: var(--font-brand); font-size: clamp(var(--text-3xl), 5vw, var(--text-4xl)); font-weight: 600; letter-spacing: -.01em; }
.page-lede { color: var(--text-secondary); font-size: var(--text-lg); }
.page-ask { --radius-outer: var(--radius-xl); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5); }
.page-ask p { flex: 1 1 18rem; color: var(--text-secondary); }
.page-ask a { color: var(--text-primary); }
.page-date { color: var(--text-secondary); font-size: var(--text-sm); }
/* The features page: the home's feature rows at the page's full width, each point with its name first. */
.page.is-wide { max-width: var(--page-max); gap: var(--space-12); }
.page.is-wide .page-head { max-width: 48rem; }
.feature-text h2 { font-family: var(--font-brand); font-size: var(--text-2xl); font-weight: 600; text-wrap: balance; }
.points.is-detailed li { color: var(--text-secondary); text-wrap: pretty; }
.points.is-detailed strong { color: var(--text-primary); font-weight: 600; }
/* /jekt: one live sphere, and a button per state and face (the app's FACE_B and EXPRESSIONS) that puts it on the sphere. */
.orb-faces { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--space-6); margin-top: var(--space-2); }
.orb-live { display: grid; place-items: center; width: 168px; height: 168px; }
.orb-choices { display: grid; gap: var(--space-1); }
.orb-choice { min-height: 40px; padding: var(--space-2) var(--space-3); border: var(--border) solid transparent; border-radius: var(--radius-md); background: none; color: var(--text-secondary); font: inherit; text-align: left; cursor: pointer; transition: background var(--dur-micro) var(--ease-out); }
.orb-choice strong { color: var(--text-primary); font-weight: 600; }
.orb-choice:hover { background: var(--glass-1); }
.orb-choice[aria-pressed="true"] { border-color: var(--glass-2-border); background: var(--glass-2); }
/* /novetats: each version with its date and notes; a skeleton while versions.json comes, a sentence if it cannot. */
/* /sobre: the two of us, each with the app's monogram (Monogram.tsx: a disc of a chart colour, lit dots, the initials). */
.people { display: flex; flex-wrap: wrap; gap: var(--space-6) var(--space-10); margin: var(--space-2) 0; padding: 0; list-style: none; }
.person { display: flex; align-items: center; gap: var(--space-3); }
.person-mark { display: inline-block; width: 56px; height: 56px; border-radius: var(--radius-round); background: var(--glass-2); }
.person-mark svg { display: block; width: 100%; height: 100%; }
.person-name { color: var(--text-primary); font-size: var(--text-lg); font-weight: 600; }
.news-lang:empty { display: none; }
/* The 404: Jekt surprised (EXPRESSIONS.surprise), a sentence and the way home. */
.not-found { justify-items: center; gap: var(--space-4); text-align: center; }
.not-found .button { text-decoration: none; }
.not-found-orb { display: grid; place-items: center; width: 200px; height: 200px; }
.news-lang { color: var(--text-secondary); font-size: var(--text-sm); }
.news-list { display: grid; gap: var(--space-8); margin: 0; padding: 0; list-style: none; }
.news-item { display: grid; gap: var(--space-3); }
.news-item .skeleton-line.is-long { width: min(100%, 32rem); }
.news-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); }
.news-head h2 { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: var(--text-xl); font-variant-numeric: tabular-nums; }
.news-head time { color: var(--text-secondary); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.news-beta { padding: 0 var(--space-2); border: var(--border) solid color-mix(in oklch, var(--jekt-working) 60%, transparent); border-radius: var(--radius-full); color: var(--text-primary); font-size: var(--text-xs); }
@media (max-width: 720px) { .orb-faces { grid-template-columns: minmax(0, 1fr); justify-items: center; } }
/* A page to read (privacy, cookies): sections with their headings, paragraphs at a reading measure. */
.prose section { display: grid; gap: var(--space-3); }
.prose h2 { font-family: var(--font-brand); font-size: var(--text-2xl); font-weight: 600; }
.prose h3 { margin-top: var(--space-2); font-size: var(--text-lg); font-weight: 600; }
.prose p, .prose li { color: var(--text-secondary); }
.prose p a, .prose li a { color: var(--text-primary); }
.prose strong { color: var(--text-primary); font-weight: 600; }
/* The cookies: the visitor's choice, and the list (a table that scrolls sideways on a phone, never the page). */
.consent-choice { --radius-outer: var(--radius-xl); justify-items: start; padding: var(--space-5); }
.table-scroll { overflow-x: auto; border: var(--border) solid var(--glass-2-border); border-radius: var(--radius-lg); }
.cookie-table { width: 100%; min-width: 36rem; border-collapse: collapse; font-size: var(--text-sm); }
.cookie-table th, .cookie-table td { padding: var(--space-3); text-align: left; vertical-align: top; color: var(--text-secondary); }
.cookie-table thead th { color: var(--text-primary); font-weight: 600; }
.cookie-table tr + tr > *, .cookie-table tbody tr > * { border-top: var(--border) solid var(--glass-2-border); }
.cookie-table code { color: var(--text-primary); font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; white-space: nowrap; }
/* The questions: each one opens in place (<details>, nothing needs JavaScript). */
.faq-list { display: grid; gap: var(--space-3); }
.faq-item { --radius-outer: var(--radius-xl); --pad: var(--space-2); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 56px; padding: var(--space-3) var(--space-5); list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item h2 { font-size: var(--text-lg); font-weight: 600; }
.faq-chevron { flex: none; width: 18px; height: 18px; color: var(--text-secondary); }
@media (prefers-reduced-motion: no-preference) { .faq-chevron { transition: rotate var(--dur-short) var(--ease-out); } }
.faq-item[open] .faq-chevron { rotate: 180deg; }
.faq-answer { display: grid; justify-items: start; gap: var(--space-3); padding: 0 var(--space-5) var(--space-5); color: var(--text-secondary); }
.faq-link { color: var(--text-primary); }

/* ---- footer, and the copy receipt (resguardo: dot → ✓) ---- */
.site-footer { margin-top: var(--space-12); padding: var(--space-10) var(--space-4) calc(var(--space-12) + var(--float-size)); border-top: var(--border) solid var(--glass-1-border); background: var(--surface-0); }
.footer-inner { display: grid; gap: var(--space-4); max-width: var(--page-max); margin: 0 auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-6); margin: 0; padding: 0; list-style: none; }
.footer-links a, .contact a { display: inline-flex; align-items: center; min-height: 32px; color: var(--text-secondary); }
.footer-links a:hover, .contact a:hover { color: var(--text-primary); }
.contact { display: flex; align-items: center; gap: var(--space-2); }
.credits { color: var(--text-secondary); font-size: var(--text-sm); }
.receipt { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; }
.receipt > * { grid-area: 1 / 1; }
.receipt-dot { width: 6px; height: 6px; border-radius: var(--radius-round); background: var(--buffer-green); opacity: 0; }
.receipt-check { color: var(--buffer-green); opacity: 0; }
.copy-button[data-copied] .receipt-copy { opacity: 0; }
.copy-button[data-copied] .receipt-check { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .copy-button[data-copied] .receipt-dot { animation: receipt-dot var(--dur-short) var(--ease-in) both; }
  .copy-button[data-copied] .receipt-check { animation: icon-swap-in var(--dur-panel) var(--ease-out) var(--dur-short) both; }
}
@keyframes receipt-dot { from { opacity: 1; scale: 1; } to { opacity: 0; scale: 2.4; } }

/* ---- dialogs: they come in from below and go back the same way (B9) ---- */
/* Only the list inside scrolls (masked); the dialog itself never shows a scrollbar. */
dialog { overflow: hidden; color: var(--text-primary); }
dialog::backdrop { background: var(--scrim); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.dialog-head h2 { font-size: var(--text-xl); }
.versions { --radius-outer: var(--radius-2xl); width: min(40rem, calc(100vw - 2 * var(--space-4))); max-height: min(44rem, calc(100dvh - 2 * var(--space-8))); padding: var(--space-5); }
.versions[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: var(--space-4); }
.version-list { display: grid; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.version { display: grid; gap: var(--space-2); padding-bottom: var(--space-4); border-bottom: var(--border) solid var(--glass-2-border); }
.version-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); }
.version-head h3 { font-size: var(--text-lg); font-variant-numeric: tabular-nums; }
.version-date, .version-notes { color: var(--text-secondary); }
.version-channel { padding: 0 var(--space-2); border: var(--border) solid var(--control-border); border-radius: var(--radius-full); font-size: var(--text-xs); }
.version-notes { margin: 0; padding-left: var(--space-5); }
.version .file-list { padding: 0; }
.dialog-empty { color: var(--text-secondary); }
dialog.versions, dialog.jekt-panel { opacity: 0; translate: 0 var(--space-4); transition: opacity var(--dur-panel) var(--ease-out), translate var(--dur-panel) var(--ease-out), overlay var(--dur-panel) allow-discrete, display var(--dur-panel) allow-discrete; }
dialog.versions[open], dialog.jekt-panel[open] { opacity: 1; translate: none; }
@starting-style { dialog.versions[open], dialog.jekt-panel[open] { opacity: 0; translate: 0 var(--space-4); } }

/* The scrolling lists fade at the edge they can still scroll to (C2), as in the app. */
@property --fade-top { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --fade-bottom { syntax: '<length>'; inherits: false; initial-value: 0px; }
.masked { overflow: hidden auto; overscroll-behavior: contain; mask-image: linear-gradient(to bottom, transparent, var(--mask-solid) var(--fade-top), var(--mask-solid) calc(100% - var(--fade-bottom)), transparent); animation: scroll-fade linear both; animation-timeline: scroll(self); }
@keyframes scroll-fade {
  0% { --fade-top: 0px; --fade-bottom: var(--fade); }
  8%, 92% { --fade-top: var(--fade); --fade-bottom: var(--fade); }
  100% { --fade-top: var(--fade); --fade-bottom: 0px; }
}

/* ---- the floating Jekt (72 px, bottom right) and its panel (as JektPanel) ---- */
.jekt-float { position: fixed; right: var(--space-6); bottom: var(--space-6); z-index: 20; width: var(--float-size); height: var(--float-size); transition: opacity var(--dur-long) var(--ease-out), scale var(--dur-long) var(--ease-out), translate var(--dur-panel) var(--ease-out), visibility 0s linear 0s; }
.jekt-float[data-hidden] { opacity: 0; scale: .7; visibility: hidden; transition: opacity var(--dur-long) var(--ease-in), scale var(--dur-long) var(--ease-in), visibility 0s linear var(--dur-long); }
.jekt-orb-button { position: relative; display: grid; place-items: center; width: 100%; height: 100%; padding: 0; border: 0; border-radius: var(--radius-round); background: none; cursor: pointer; }
.jekt-orb-button canvas { position: absolute; left: 50%; top: 50%; z-index: 1; display: block; translate: -50% -50%; transition: scale var(--dur-hover-out) var(--ease-in); }
.jekt-orb-button:hover canvas { scale: var(--orb-hover-scale); transition: scale var(--dur-hover-in) var(--ease-out); }
.jekt-orb-button:active canvas { scale: var(--orb-press-scale); transition-duration: var(--dur-micro); }
/* The aura at rest, as the app's (2.27k): small, the state's colour fading out; added in dark, multiplied in light. */
@property --aura-color { syntax: "<color>"; inherits: true; initial-value: transparent; }
.orb-aura { position: absolute; inset: -16%; border-radius: var(--radius-round); background: radial-gradient(in oklch closest-side, color-mix(in oklch, var(--aura-color) 36%, transparent) 76%, transparent); opacity: .5; transition: --aura-color calc(var(--dur-short) + var(--dur-micro)) var(--ease-in-out); mix-blend-mode: plus-lighter; pointer-events: none; }
:root[data-mode="light"] .orb-aura { mix-blend-mode: multiply; }
[data-orb-state="rest"] { --aura-color: var(--jekt-rest); }
[data-orb-state="listening"] { --aura-color: var(--jekt-listening); }
[data-orb-state="working"] { --aura-color: var(--jekt-working); }
[data-orb-state="done"] { --aura-color: var(--jekt-done); }
[data-orb-state="alert"] { --aura-color: var(--jekt-alert); }
[data-orb-state="off"] { --aura-color: transparent; }

.jekt-panel { --radius-outer: var(--radius-2xl); --pad: var(--space-4); position: fixed; inset: auto var(--space-6) calc(var(--space-6) + var(--float-size) + var(--space-3)) auto; width: min(26rem, calc(100vw - 2 * var(--space-4))); height: min(40rem, calc(100dvh - var(--float-size) - 3 * var(--space-6))); margin: 0; padding: var(--pad); }
.jekt-panel[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: var(--space-3); }
.jekt-panel::backdrop { background: transparent; }
.jekt-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); }
.jekt-head-orb { position: relative; display: grid; place-items: center; width: 40px; height: 40px; }
.jekt-head-orb canvas { position: relative; z-index: 1; }
.jekt-head h2 { font-family: var(--font-brand); font-size: var(--text-xl); font-weight: 600; }
.jekt-sub { color: var(--text-secondary); font-size: var(--text-sm); }
.jekt-thread { display: grid; align-content: start; gap: var(--space-3); padding: var(--space-1) 0; }
.jekt-messages { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.jekt-message { --radius-outer: var(--radius-lg); display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--space-3); padding: var(--space-3); border: var(--border) solid var(--glass-2-border); border-radius: var(--radius-outer); background: var(--glass-2); }
.jekt-message.is-user { margin-left: var(--space-8); background: transparent; }
.jekt-message-avatar { display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; }
.jekt-message-avatar img { width: 20px; height: 20px; }
.jekt-message-avatar.is-user { border-radius: var(--radius-round); background: var(--glass-3); color: var(--text-secondary); font-size: var(--text-2xs); font-weight: 700; }
.jekt-message-body { display: grid; gap: var(--space-1); min-width: 0; }
.jekt-message-text { white-space: pre-wrap; overflow-wrap: anywhere; }
/* D13: the answer comes whole, with a short fade (no streaming). */
@media (prefers-reduced-motion: no-preference) { .jekt-message-text[data-arrived] { animation: jekt-arrive var(--dur-short) var(--ease-out); } }
@keyframes jekt-arrive { from { opacity: 0; } }
.jekt-message-link { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; }
.jekt-message[data-error] { border-color: var(--border-strong); }
/* Ramillete: the three cards in one by one (30 ms), lifted on hover, pressed 4 %; they fold away once the talk starts. */
.jekt-cards { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.jekt-cards[hidden] { display: none; }
.jekt-cards li { opacity: 0; translate: 0 var(--space-2); transition: opacity var(--dur-short) var(--ease-out), translate var(--spring-snappy-dur) var(--spring-snappy); }
.jekt-cards li:nth-child(2) { transition-delay: var(--stagger); }
.jekt-cards li:nth-child(3) { transition-delay: calc(var(--stagger) * 2); }
.jekt-panel[data-shown] .jekt-cards li { opacity: 1; translate: none; }
.jekt-card { --radius-outer: var(--radius-lg); display: grid; gap: var(--space-1); width: 100%; padding: var(--space-3); color: var(--text-primary); text-align: left; cursor: pointer; transition: translate var(--dur-micro) var(--ease-out), scale var(--dur-micro) var(--ease-out); }
.jekt-card:hover { translate: 0 calc(-1 * var(--space-half)); }
.jekt-card:active { scale: var(--press-scale); }
.jekt-card-title { font-size: var(--text-md); font-weight: 600; }
.jekt-card-text { color: var(--text-secondary); font-size: var(--text-sm); }
.jekt-mode { padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--glass-2); color: var(--text-secondary); font-size: var(--text-sm); }
.jekt-prompt-box { display: flex; align-items: flex-end; gap: var(--space-2); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3); border: var(--border) solid var(--glass-3-border); border-radius: var(--radius-lg); background: var(--glass-3); }
.jekt-prompt-box:focus-within { outline: var(--ring) solid var(--focus); outline-offset: var(--ring); }
.jekt-prompt-box textarea { flex: 1; min-width: 0; min-height: calc(var(--text-base) * 1.5); max-height: 8rem; padding: var(--space-2) 0; resize: none; border: 0; background: transparent; outline: none; field-sizing: content; }
.jekt-prompt-box .button { min-height: 40px; padding: 0 var(--space-4); font-size: var(--text-md); }
/* D7: Turnstile's widget, only when Cloudflare asks something: glass above the prompt, its radius inside the panel's. */
.jekt-turnstile { display: flex; justify-content: center; padding: var(--space-2); border: var(--border) solid var(--glass-2-border); border-radius: var(--radius-lg); }
.jekt-turnstile[hidden] { display: none; }
.jekt-retry { display: inline-flex; width: auto; margin-top: var(--space-2); }
.jekt-prompt-box .clay:disabled { cursor: progress; filter: saturate(.6); opacity: .7; }
/* A phone: the panel is a sheet from the bottom. */
@media (max-width: 720px) {
  .jekt-float { right: var(--space-4); bottom: var(--space-4); }
  .jekt-panel { inset: auto 0 0 0; width: 100%; max-width: none; height: min(85dvh, 40rem); border-radius: var(--radius-2xl) var(--radius-2xl) 0 0; padding-bottom: max(var(--pad), env(safe-area-inset-bottom)); }
  dialog.jekt-panel { translate: 0 100%; }
  dialog.jekt-panel[open] { translate: none; }
  @starting-style { dialog.jekt-panel[open] { translate: 0 100%; } }
}

/* Reduced transparency: the surfaces are solid (tokens.css does the glass); no aura. */
@media (prefers-reduced-transparency: reduce) {
  .orb-aura { display: none; }
}

/* ---- D14: «Entra per baixar ezProjekt», the session panel and the confirmation (glass, as the other dialogs) ---- */
.auth, .confirm { --radius-outer: var(--radius-2xl); width: min(28rem, calc(100vw - 2 * var(--space-4))); padding: var(--space-5); }
.auth[open], .confirm[open] { display: grid; gap: var(--space-4); }
dialog.auth, dialog.confirm { opacity: 0; translate: 0 var(--space-4); transition: opacity var(--dur-panel) var(--ease-out), translate var(--dur-panel) var(--ease-out), overlay var(--dur-panel) allow-discrete, display var(--dur-panel) allow-discrete; }
dialog.auth[open], dialog.confirm[open] { opacity: 1; translate: none; }
@starting-style { dialog.auth[open], dialog.confirm[open] { opacity: 0; translate: 0 var(--space-4); } }
.auth-step { display: grid; gap: var(--space-4); }
.auth-step[hidden] { display: none; }
.auth-lede, .auth-privacy, .confirm p { color: var(--text-secondary); }
.auth-providers { display: grid; gap: var(--space-2); }
.auth-provider { width: 100%; min-height: 44px; }
.auth-or { display: flex; align-items: center; gap: var(--space-3); color: var(--text-secondary); font-size: var(--text-sm); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: var(--border) solid var(--glass-2-border); }
.auth-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); }
.auth-form label { grid-column: 1 / -1; font-size: var(--text-sm); color: var(--text-secondary); }
.auth-form input { min-height: 44px; padding: 0 var(--space-3); border: var(--border) solid var(--control-border); border-radius: var(--radius-md); background: var(--glass-3); }
.auth-form input:focus-visible { outline: var(--ring) solid var(--focus); outline-offset: var(--ring); }
#auth-code { font-variant-numeric: tabular-nums; letter-spacing: .3em; }
.auth-news { display: flex; align-items: flex-start; gap: var(--space-3); min-height: 32px; cursor: pointer; }
.auth-news input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--text-primary); }
.auth-privacy { font-size: var(--text-sm); }
.auth-error { min-height: 1.5em; color: var(--buffer-red); font-size: var(--text-sm); }
.auth-error:empty { display: none; }
.auth[aria-busy] { cursor: progress; }
.link-button { justify-self: start; min-height: 32px; padding: 0; border: 0; background: none; color: var(--text-secondary); text-decoration: underline; cursor: pointer; }
/* The receipt (Moxen's Resguardo): the check comes in once, then the sentence and the way to the file. */
.auth-receipt { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-4) 0; text-align: center; }
.auth-receipt-mark { width: 40px; height: 40px; color: var(--buffer-green); }
.auth-receipt-title { font-size: var(--text-lg); }
.auth-receipt-text { color: var(--text-secondary); }
@media (prefers-reduced-motion: no-preference) { .auth-step:not([hidden]) .auth-receipt-mark { animation: icon-swap-in var(--dur-panel) var(--ease-out) both; } }
.button.is-danger { color: var(--buffer-red); }
.confirm-actions, .account-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
.account-actions { justify-content: center; }
.account { display: grid; justify-items: center; gap: var(--space-3); text-align: center; width: min(34rem, 100%); margin-inline: auto; padding: var(--space-4); border: var(--border) solid var(--glass-2-border); border-radius: var(--radius-xl); }
.account[hidden] { display: none; }
.account-email { overflow-wrap: anywhere; }
.account-note { color: var(--text-secondary); font-size: var(--text-sm); }
.account-note:empty { display: none; }
/* A switch: a real checkbox (role="switch"), the track and thumb drawn from it. */
.switch { display: inline-flex; align-items: center; gap: var(--space-3); min-height: 32px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; flex: none; width: 40px; height: 24px; border: var(--border) solid var(--control-border); border-radius: var(--radius-full); background: var(--glass-2); transition: background var(--dur-micro) var(--ease-out); }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: var(--radius-round); background: var(--text-secondary); transition: translate var(--dur-micro) var(--ease-out), background var(--dur-micro) var(--ease-out); }
.switch input:checked + .switch-track { background: var(--text-primary); }
.switch input:checked + .switch-track::after { translate: 16px 0; background: var(--surface-0); }
.switch input:focus-visible + .switch-track { outline: var(--ring) solid var(--focus); outline-offset: var(--ring); }
.switch input:disabled + .switch-track { opacity: .5; }

/* ---- D15: the cookie banner (glass, fixed: it moves nothing on the page) ---- */
.consent { position: fixed; z-index: 40; left: var(--space-4); bottom: var(--space-4); display: grid; gap: var(--space-3); width: min(26rem, calc(100vw - 2 * var(--space-4))); padding: var(--space-4); border-radius: var(--radius-xl); font-size: var(--text-sm); }
.consent a { color: inherit; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.consent-actions .button { min-height: 44px; }
@media (max-width: 640px) { .consent { left: 0; right: 0; bottom: 0; width: auto; border-radius: var(--radius-xl) var(--radius-xl) 0 0; } }
@media (prefers-reduced-motion: no-preference) { .consent { animation: ticker-in var(--dur-long) var(--ease-out) both; } }
/* The floating Jekt lifts above the banner while it shows (--banner-lift, consent-banner.js). */
.jekt-float { translate: 0 calc(-1 * var(--banner-lift, 0px)); }
