/* Kriya One portal: the shared look. tokens.css (the Kriya brand) loads first; this file re-tunes the dark theme to a
   navy-black developer-tool look, adds the neon glows, the dot-matrix background and the mono labels. hero.css and
   fx.css (landing page only) add the animated pieces. Dark is the default; the light theme is kept and tuned too. */

/* Fonts, self-hosted (latin; other scripts fall back to the system fonts in the brand stacks). */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url(/fonts/plex-sans-var.woff2) format("woff2"); }
@font-face { font-family: "Roboto Slab"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/roboto-slab-var.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/plex-mono-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/plex-mono-500.woff2) format("woff2"); }

/* ---------- Theme: brand anchors + glows ---------- */
:root {
  --k-indigo: #4868DA;           /* navy-400 */
  --k-indigo-hi: #6F8BFF;        /* neon indigo for glows */
  --k-amber: #F5A524;            /* brand amber */
  --k-amber-hi: #FFC15C;
  --k-mint: #2FE3A0;             /* status ticks (dark) */
  --k-pink: #FF6FA8;
  --k-ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --k-ease-out: cubic-bezier(.16, 1, .3, 1);
  --k-mono: var(--ts-font-mono);
  --k-topbar-h: 64px;
}
:root[data-theme="light"] {
  --ts-bg: #F4F6FC;
  --ts-surface: #FFFFFF;
  --ts-surface-raised: #FFFFFF;
  --ts-surface-sunken: #EBEFF8;
  --ts-border: #D3DAEC;
  --ts-border-strong: #A2AECF;
  --ts-text-muted: #4F5973;      /* a touch darker than the brand token for AA on tinted cards */
  --ts-text-subtle: #5F6982;
  --k-grid: rgba(17, 38, 114, .10);
  --k-glow: rgba(72, 104, 218, .22);
  --k-glow-amber: rgba(245, 165, 36, .28);
  --k-mint: #0E8A5C;
  --k-line: rgba(17, 38, 114, .12);
  --k-card-hi: rgba(72, 104, 218, .10);
  --k-term-bg: #0A1030;          /* terminals stay dark in light theme */
  --k-term-fg: #E6EBFF;
  --k-kicker: #1C3EBA;
  --k-head-grad: linear-gradient(100deg, #0B1433 0%, #112672 55%, #1C3EBA 100%);
}
:root[data-theme="dark"] {
  --ts-bg: #04060E;
  --ts-surface: #0A0F20;
  --ts-surface-raised: #10172E;
  --ts-surface-sunken: #03050B;
  --ts-border: #1A2342;
  --ts-border-strong: #34416B;
  --ts-text: #E9EDF9;
  --ts-text-muted: #9FAACB;
  --ts-text-subtle: #8590B2;
  --ts-primary: #5B7BFF;
  --ts-primary-hover: #7690FF;
  --ts-primary-tint: #0E1636;
  --ts-link: #9BB0FF;
  --k-grid: rgba(136, 157, 231, .13);
  --k-glow: rgba(91, 123, 255, .35);
  --k-glow-amber: rgba(245, 165, 36, .35);
  --k-line: rgba(136, 157, 231, .14);
  --k-card-hi: rgba(111, 139, 255, .16);
  --k-term-bg: #050918;
  --k-term-fg: #E6EBFF;
  --k-kicker: #FFC15C;
  --k-head-grad: linear-gradient(100deg, #FFFFFF 0%, #C9D4FF 55%, #9BB0FF 100%);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--ts-bg); color: var(--ts-text); min-width: 320px; overflow-x: hidden; }
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, pre, figure { margin: 0; }
h1, h2 { text-wrap: balance; }
p, li { text-wrap: pretty; }
code { overflow-wrap: anywhere; }
a:hover { color: var(--ts-primary-hover); }
::selection { background: var(--k-amber); color: #0B1433; }

/* The dot-matrix field behind every page: fixed, one composited layer, faded towards the bottom. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(var(--k-grid) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 30%, transparent 80%); }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 24px; height: 24px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: 16px; top: -60px; z-index: 60; padding: 10px 16px; border-radius: var(--ts-radius-sm);
  background: var(--ts-surface); color: var(--ts-text); }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--k-amber); outline-offset: 3px; }

/* Mono labels: kickers, eyebrows, small caps-ish tags */
.mono, .eyebrow, .group-h, .tl-time, .cmp dt, .cmp-adds, .toc h2 { font-family: var(--k-mono); }

/* ---------- Top bar: glass navy, glowing underline ---------- */
.topbar { position: sticky; top: 0; z-index: 30; color: #fff;
  background: rgba(8, 15, 48, .82); -webkit-backdrop-filter: saturate(150%) blur(12px); backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid rgba(136, 157, 231, .16); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(111, 139, 255, .8) 30%, rgba(245, 165, 36, .8) 70%, transparent); opacity: .55; }
.topbar .wrap { display: flex; align-items: center; gap: 12px; min-height: var(--k-topbar-h); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-height: 44px;
  margin-right: auto; }
.brand:hover { color: #fff; }
.brand img { width: 32px; height: 32px; transition: transform .5s var(--k-ease-spring), filter .3s; }
.brand:hover img { transform: rotate(-8deg) scale(1.06); filter: drop-shadow(0 0 10px rgba(111, 139, 255, .7)); }
.brand span { font-family: var(--ts-font-display); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--ts-radius-sm);
  color: rgba(255, 255, 255, .82); text-decoration: none; font-weight: 500; font-size: .9375rem; }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 8px; height: 2px; border-radius: 2px;
  background: var(--k-amber); transform: scaleX(0); transform-origin: left; transition: transform .28s var(--k-ease-out); }
.nav a:hover { color: #fff; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: #fff; }
.kbd-hint { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; margin-left: 4px;
  border-radius: var(--ts-radius-sm); border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .78); font: 500 .75rem/1 var(--k-mono); cursor: pointer; }
.kbd-hint:hover { color: #fff; border-color: rgba(245, 165, 36, .6); box-shadow: 0 0 0 3px rgba(245, 165, 36, .12); }
.kbd-hint kbd { font: inherit; padding: 2px 5px; border-radius: 4px; background: rgba(255, 255, 255, .1); }
@media (max-width: 720px) { .kbd-hint { display: none; } }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: var(--ts-radius-sm); border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: #fff;
  cursor: pointer; overflow: hidden; }
.theme-toggle:hover { background: rgba(255, 255, 255, .08); }
.theme-toggle .icon { transition: transform .45s var(--k-ease-spring), opacity .2s; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
.theme-toggle:active .icon { transform: rotate(90deg) scale(.8); }
@media (max-width: 440px) {
  .topbar .wrap { gap: 6px; }
  .brand span { display: none; }
  .nav a { padding: 0 10px; }
  .nav .nav-extra { display: none; }
}
/* Releases and Security: in the top bar from 600 px, in every footer always. Below 900 px the links get tighter;
   below 960 px the home page's in-page "Get started" link leaves the bar (the hero's button and the / palette still
   reach it). */
@media (max-width: 899px) {
  .topbar .wrap { gap: 8px; }
  .nav a { padding: 0 9px; }
}
@media (max-width: 959px) { .nav .nav-extra { display: none; } }
@media (max-width: 599px) { .nav .nav-rel, .nav .nav-sec { display: none; } }
.nav a, .brand span { white-space: nowrap; }
.topbar .brand { flex-shrink: 0; }
/* Below 820 px the mark alone stands for the name (its link keeps the "Kriya One home" label). */
@media (max-width: 819px) { .brand span { display: none; } }

/* ---------- Buttons: the primary ones get a travelling gradient border ---------- */
@property --k-ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: 10px; border: 1px solid transparent; font: 600 .9375rem/1.2 var(--ts-font-sans);
  text-decoration: none; cursor: pointer; isolation: isolate;
  transition: transform .18s var(--k-ease-out), box-shadow .25s, background .15s, border-color .15s, color .15s; }
.btn .icon { transition: transform .25s var(--k-ease-spring); }
.btn:hover .icon:last-child { transform: translateX(3px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-accent, .btn-primary {
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--btn-fill), var(--btn-fill)) padding-box,
    conic-gradient(from var(--k-ang), #F5A524, #FFD88A, #6F8BFF, #2FE3A0, #F5A524) border-box;
  animation: k-spin 4s linear infinite; }
.btn-accent { --btn-fill: var(--k-amber); color: #0B1433; box-shadow: 0 6px 24px -8px var(--k-glow-amber); }
.btn-accent:hover { --btn-fill: var(--k-amber-hi); color: #0B1433; box-shadow: 0 10px 32px -6px var(--k-glow-amber); }
.btn-primary { --btn-fill: #112672; color: #fff; box-shadow: 0 6px 24px -8px var(--k-glow); }
.btn-primary:hover { --btn-fill: #1C3EBA; color: #fff; }
@keyframes k-spin { to { --k-ang: 360deg; } }
.btn-secondary { background: color-mix(in srgb, var(--ts-surface) 70%, transparent); color: var(--ts-text);
  border-color: var(--ts-border-strong); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn-secondary:hover { color: var(--ts-text); border-color: var(--ts-primary); box-shadow: 0 0 0 3px var(--k-card-hi), 0 0 24px -6px var(--k-glow); }
.btn[aria-disabled="true"], .btn:disabled { background: var(--ts-surface-sunken); color: var(--ts-text-muted);
  border-color: var(--ts-border); cursor: not-allowed; animation: none; }

/* ---------- Small page heroes (download, docs, 404) ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--k-line); }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px;
  align-items: center; padding-top: 72px; padding-bottom: 80px; }
.hero-small .wrap { grid-template-columns: minmax(0, 1fr); padding-top: 64px; padding-bottom: 56px; }
.iso { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 280px at 85% 0%, var(--k-glow), transparent 70%),
    radial-gradient(420px 220px at 10% 100%, var(--k-glow-amber), transparent 70%),
    repeating-linear-gradient(0deg, var(--k-line) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, var(--k-line) 0 1px, transparent 1px 32px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .7) 60%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .7) 60%, transparent 100%); opacity: .9; }
.hero-small .iso::after { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(0, 0, 0, .05) 3px 4px); }
:root[data-theme="light"] .hero-small .iso::after { background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(17, 38, 114, .025) 3px 4px); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 6px 12px 6px 10px;
  border-radius: 999px; border: 1px solid var(--k-line); background: color-mix(in srgb, var(--ts-surface) 60%, transparent);
  font: 500 .75rem/1.4 var(--k-mono); letter-spacing: .04em; color: var(--k-kicker); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--k-mint);
  box-shadow: 0 0 0 0 var(--k-mint); animation: k-pulse 2.2s ease-out infinite; }
@keyframes k-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--k-mint) 70%, transparent); }
  80%, 100% { box-shadow: 0 0 0 8px transparent; } }
.hero h1 { font-size: var(--ts-text-display); line-height: 1.06; font-weight: 800; letter-spacing: -0.025em; }
.hero-small h1 { font-size: clamp(2.125rem, 1.4rem + 2.4vw, 3rem); }
.grad-text, .hero h1 { background: var(--k-head-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { margin-top: 20px; max-width: 36em; font-size: var(--ts-text-body-lg); line-height: 1.62; color: var(--ts-text-muted); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; padding-bottom: 48px; }
  .hero-small .wrap { padding-top: 40px; padding-bottom: 40px; }
}

/* ---------- Command card (tabs, a command, copy) ---------- */
.cmd-card { position: relative; background: var(--ts-surface); border: 1px solid var(--ts-border); border-radius: var(--ts-radius-lg);
  box-shadow: 0 24px 60px -24px var(--k-glow); overflow: hidden; min-width: 0; }
.cmd-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 12px 0 16px; }
.cmd-card-head h2, .cmd-card-head h3 { font: 600 .9375rem/1.4 var(--ts-font-sans); color: var(--ts-text); }
.tabs { position: relative; display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--ts-radius-md);
  background: var(--ts-surface-sunken); border: 1px solid var(--ts-border); }
.tab { position: relative; min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--ts-radius-sm); background: transparent;
  color: var(--ts-text-muted); font: 500 .8125rem/1 var(--k-mono); cursor: pointer; transition: color .15s, background .2s, box-shadow .2s; }
.tab:hover { color: var(--ts-text); }
.tab[aria-selected="true"] { background: var(--ts-surface-raised); color: var(--ts-text);
  box-shadow: 0 0 0 1px var(--ts-border-strong), 0 0 16px -4px var(--k-glow); }
@media (pointer: coarse) { .tab { min-height: 44px; } }
.cmd-card-body { padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.cmd-card-body p { font-size: .875rem; color: var(--ts-text-muted); }
.panel[hidden] { display: none; }

.cmd { position: relative; display: flex; align-items: stretch; gap: 0; min-width: 0; border-radius: var(--ts-radius-md);
  background: var(--k-term-bg); color: var(--k-term-fg); border: 1px solid rgba(136, 157, 231, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.cmd::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 2px, rgba(255, 255, 255, .018) 2px 3px); }
.cmd pre { flex: 1; min-width: 0; padding: 14px 16px; overflow-x: auto; white-space: pre;
  font: 400 .875rem/1.6 var(--k-mono); }
.cmd pre.wrap-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.cmd pre .prompt { color: var(--k-amber); user-select: none; }
.cmd pre .comment { color: #8C96B8; }
.copy { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: 44px;
  margin: 4px; align-self: flex-start; border-radius: var(--ts-radius-sm); border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06); color: #E1E6F9; cursor: pointer;
  transition: background .15s, border-color .2s, transform .15s var(--k-ease-out), box-shadow .3s; }
.copy:hover { background: rgba(255, 255, 255, .14); border-color: rgba(245, 165, 36, .5); }
.copy:active { transform: scale(.9); }
.copy .ok { display: none; }
.copy.done { border-color: var(--k-mint); color: var(--k-mint); background: rgba(47, 227, 160, .1);
  box-shadow: 0 0 0 4px rgba(47, 227, 160, .14), 0 0 18px rgba(47, 227, 160, .4); }
.copy.done .ok { display: block; animation: k-pop .45s var(--k-ease-spring); }
.copy.done .cp { display: none; }
.copy.done::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid var(--k-mint);
  animation: k-ring .6s ease-out forwards; pointer-events: none; }
@keyframes k-pop { 0% { transform: scale(.3) rotate(-25deg); } 100% { transform: none; } }
@keyframes k-ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.7); } }
.cmd :focus-visible { outline-color: var(--k-amber); }

/* ---------- Sections ---------- */
.section { position: relative; padding: 88px 0; }
.section + .section { border-top: 1px solid var(--k-line); }
.section-alt { background: linear-gradient(180deg, color-mix(in srgb, var(--ts-surface) 70%, transparent), color-mix(in srgb, var(--ts-surface) 35%, transparent)); }
.section-head { max-width: 46em; margin-bottom: 40px; }
/* A decorative mono kicker above each section heading (data-kicker on the section). */
.section-head[data-kicker]::before { content: attr(data-kicker); display: block; margin-bottom: 12px;
  font: 500 .75rem/1.4 var(--k-mono); letter-spacing: .08em; color: var(--k-kicker); }
.section-head h2 { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.375rem); letter-spacing: -0.02em; line-height: 1.15; }
.section-head p { margin-top: 14px; color: var(--ts-text-muted); font-size: var(--ts-text-body-lg); line-height: 1.62; }
@media (max-width: 600px) { .section { padding: 56px 0; } .section-head { margin-bottom: 28px; } }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid, .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* Cards: hairline border, a glow that follows the pointer (--mx/--my set by fx.js), lift on hover. */
.card { position: relative; min-width: 0; background: color-mix(in srgb, var(--ts-surface) 88%, transparent);
  border: 1px solid var(--ts-border); border-radius: var(--ts-radius-lg); padding: 24px;
  transition: border-color .25s, box-shadow .3s, transform .3s var(--k-ease-out); }
.card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), var(--k-card-hi), transparent 60%);
  transition: opacity .3s; }
.card:hover::before, .card:focus-within::before { opacity: 1; }
.card:hover { border-color: color-mix(in srgb, var(--ts-primary) 55%, var(--ts-border)); }
.section-alt .card { background: color-mix(in srgb, var(--ts-bg) 85%, transparent); }
.card > * { position: relative; }
.feature .ic, .os-steps .ic { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 12px; background: var(--ts-primary-tint); color: var(--ts-primary); margin-bottom: 16px;
  border: 1px solid var(--k-line); transition: box-shadow .3s, color .3s, transform .4s var(--k-ease-spring); }
:root[data-theme="dark"] .feature .ic, :root[data-theme="dark"] .os-steps .ic { color: var(--k-indigo-hi); }
.card:hover .ic { box-shadow: 0 0 0 4px var(--k-card-hi), 0 0 24px -2px var(--k-glow); }
.feature h3 { font-size: 1.125rem; font-weight: 700; }
.feature p { margin-top: 8px; color: var(--ts-text-muted); }

.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; padding: 0; }
@media (max-width: 960px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.steps li { counter-increment: step; position: relative; padding-left: 56px; min-width: 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 40px;
  border-radius: var(--ts-radius-full); display: flex; align-items: center; justify-content: center;
  background: var(--ts-primary); color: var(--ts-text-on-brand); font: 700 1rem/1 var(--k-mono); }
.steps h3 { font-size: 1.125rem; font-weight: 700; line-height: 40px; }
.steps p { color: var(--ts-text-muted); }

.muted { color: var(--ts-text-muted); }
.small { font-size: .875rem; }
code.inline, p code, li code, td code { padding: 1px 6px; border-radius: var(--ts-radius-xs); background: var(--ts-surface-sunken);
  border: 1px solid var(--ts-border); font-size: .85em; color: var(--ts-text); }
:root[data-theme="dark"] code.inline, :root[data-theme="dark"] p code, :root[data-theme="dark"] li code, :root[data-theme="dark"] td code { color: var(--k-amber-hi); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: var(--ts-radius-full);
  font: 500 .6875rem/1 var(--k-mono); letter-spacing: .04em; text-transform: uppercase; }
.badge-soft { background: var(--ts-surface-sunken); color: var(--ts-text-muted); border: 1px solid var(--ts-border); }
.badge-coming { background: var(--ts-amber-100); color: #6B4000; border: 1px solid var(--ts-amber-300); }
:root[data-theme="dark"] .badge-coming { background: rgba(245, 165, 36, .1); color: var(--k-amber-hi); border-color: rgba(245, 165, 36, .4);
  box-shadow: 0 0 12px -2px rgba(245, 165, 36, .35); }

/* ---------- Download page ---------- */
.sha { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: .75rem; color: var(--ts-text-muted); }
.sha .lbl { flex: none; font-weight: 600; margin-right: 4px; }
.sha code { flex: 1; min-width: 0; font: 400 .75rem/1.5 var(--k-mono); color: var(--ts-text); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; background: none; border: 0; padding: 0; }
:root[data-theme="dark"] .sha code { color: var(--k-mint); background: none; }
.sha.open code { white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
.sha button { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px;
  padding: 0 8px; border: 1px solid transparent; border-radius: var(--ts-radius-sm); background: transparent;
  color: var(--ts-link); font: 500 .75rem/1 var(--k-mono); cursor: pointer; transition: background .15s, border-color .15s; }
.sha button:hover { background: var(--ts-primary-tint); border-color: var(--k-line); }
.sha button .icon { width: 16px; height: 16px; }
@media (pointer: coarse) { .sha button { min-width: 44px; min-height: 44px; } }

.table-wrap { overflow-x: auto; border: 1px solid var(--ts-border); border-radius: var(--ts-radius-md);
  background: color-mix(in srgb, var(--ts-surface) 90%, transparent); }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ts-border); }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--ts-primary-tint); }
tr:last-child td { border-bottom: 0; }
th { font: 500 .75rem/1.4 var(--k-mono); letter-spacing: .05em; text-transform: uppercase; background: var(--ts-surface-sunken); color: var(--ts-text-muted); }
.scripts td { min-width: 0; }
.scripts .sha { max-width: 380px; }
@media (max-width: 720px) {
  .scripts, .scripts tbody, .scripts tr, .scripts td { display: block; width: 100%; }
  .scripts thead { display: none; }
  .scripts tr { padding: 12px 14px; border-bottom: 1px solid var(--ts-border); }
  .scripts tr:last-child { border-bottom: 0; }
  .scripts td { padding: 4px 0; border: 0; }
  .scripts .sha { max-width: none; }
}
.status { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--ts-radius-md); background: var(--ts-warning-bg);
  color: var(--ts-text); font-size: .9375rem; border: 1px solid rgba(245, 165, 36, .35); }
.status .icon { color: var(--ts-warning); margin-top: 2px; }
.status[hidden] { display: none; }
.dl-h { font-size: 1.125rem; font-weight: 700; }

/* ---------- Docs ---------- */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 88px; }
.toc { position: sticky; top: 88px; align-self: start; padding: 16px 10px 16px 0; }
.toc h2 { font: 500 .75rem/1.4 var(--k-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--k-kicker);
  margin: 0 0 10px 12px; }
.toc ol { list-style: none; padding: 0; display: grid; counter-reset: toc; border-left: 1px solid var(--ts-border); }
.toc li { counter-increment: toc; }
.toc a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 12px; margin-left: -1px;
  color: var(--ts-text-muted); text-decoration: none; font-size: .9375rem; border-left: 2px solid transparent;
  transition: color .15s, border-color .2s, background .2s; }
.toc a::before { content: counter(toc, decimal-leading-zero); font: 500 .6875rem/1 var(--k-mono); color: var(--ts-text-subtle); }
.toc a:hover { color: var(--ts-text); background: var(--ts-primary-tint); }
.toc a.active { color: var(--ts-text); border-left-color: var(--k-amber); background: linear-gradient(90deg, var(--k-card-hi), transparent); }
.toc a.active::before { color: var(--k-amber); }
@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 24px; }
  .toc { position: static; padding: 16px; border: 1px solid var(--ts-border); border-radius: var(--ts-radius-md);
    background: var(--ts-surface); }
  .toc h2 { margin-left: 0; }
  .toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 0; }
  .toc a { min-height: 44px; margin-left: 0; }
}
.doc { min-width: 0; max-width: 780px; }
.doc section { padding-top: 8px; margin-bottom: 56px; }
.doc h2 { font-size: 1.875rem; margin-bottom: 18px; letter-spacing: -0.015em; display: flex; align-items: baseline; gap: 12px; }
.doc h2::before { content: "#"; font: 500 1.25rem/1 var(--k-mono); color: var(--k-amber); opacity: .85; }
.doc h3 { font-size: 1.1875rem; font-weight: 700; margin: 28px 0 10px; }
.doc p, .doc ul, .doc ol { margin-bottom: 14px; line-height: 1.68; }
.doc ul, .doc ol { padding-left: 1.25em; }
.doc li + li { margin-top: 6px; }
.doc li::marker { color: var(--k-amber); }
.doc .cmd { margin: 4px 0 16px; }
.doc .table-wrap { margin: 4px 0 18px; }
.doc table { font-size: .875rem; }
.callout { display: flex; gap: 12px; padding: 14px 16px; margin: 4px 0 18px; border-radius: var(--ts-radius-md);
  border: 1px solid var(--k-line); border-left: 3px solid var(--ts-primary); background: var(--ts-primary-tint); }
.callout .icon { color: var(--ts-primary); margin-top: 2px; }
:root[data-theme="dark"] .callout .icon { color: var(--k-indigo-hi); }
.callout p { margin: 0; }
.os-tabs { margin-bottom: 12px; }
details.faq { border: 1px solid var(--ts-border); border-radius: var(--ts-radius-md); background: var(--ts-surface); margin-bottom: 10px;
  transition: border-color .2s, box-shadow .3s; }
details.faq:hover { border-color: var(--ts-border-strong); }
details.faq[open] { border-color: color-mix(in srgb, var(--ts-primary) 50%, var(--ts-border)); box-shadow: 0 0 24px -12px var(--k-glow); }
details.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px;
  padding: 12px 16px; cursor: pointer; font-weight: 600; list-style: none; border-radius: inherit; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .icon { transition: transform .3s var(--k-ease-spring); color: var(--ts-text-muted); }
details.faq[open] summary .icon { transform: rotate(180deg); color: var(--k-amber); }
details.faq > div { padding: 0 16px 6px; }

/* ---------- Footer ---------- */
.footer { position: relative; border-top: 1px solid var(--k-line); padding: 36px 0 44px; color: var(--ts-text-muted); font-size: .875rem; }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
/* "Kriya One, powered by True Skill Academy": full text colour, not the muted grey */
.footer .foot-by { margin: 0; font-size: .9375rem; font-weight: 500; color: var(--ts-text); }
.footer .foot-by a { display: inline-block; padding-block: 12px; color: var(--ts-primary); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
:root[data-theme="dark"] .footer .foot-by a { color: var(--k-indigo-hi); }
.footer .foot-by a:hover { text-decoration-thickness: 2px; }
.footer nav { display: flex; gap: 4px; flex-wrap: wrap; }
.footer nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ts-text-muted); }
.footer nav a:hover { color: var(--ts-text); }
.footer .legal { flex-basis: 100%; font-size: .8125rem; line-height: 1.55; color: var(--ts-text-subtle); max-width: 60em; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 70;
  padding: 10px 16px; border-radius: var(--ts-radius-md); background: #0A1030; color: #fff; font: 500 .8125rem/1.3 var(--k-mono);
  border: 1px solid rgba(47, 227, 160, .45); box-shadow: 0 0 24px -6px rgba(47, 227, 160, .5), var(--ts-shadow-3);
  transition: opacity .2s var(--ts-ease-in), transform .35s var(--k-ease-spring); pointer-events: none; }
.toast::before { content: "✓ "; color: #2FE3A0; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.notfound { min-height: 64vh; display: flex; align-items: center; }
.notfound .wrap { width: 100%; }
.glitch { font: 500 clamp(4rem, 3rem + 6vw, 8rem)/1 var(--k-mono); color: transparent; -webkit-text-stroke: 1px var(--ts-border-strong);
  letter-spacing: -.02em; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); pointer-events: none; opacity: .7; }
@media (max-width: 700px) { .glitch { display: none; } }

/* Phones: commands wrap instead of scrolling sideways, so the whole command is visible before copying it. */
@media (max-width: 720px) {
  .cmd pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px 12px 12px 14px; }
  .card { padding: 20px; }
}

/* ---------- Landing page: shared bits (the animated pieces live in hero.css / fx.css) ---------- */
.cmd-note { font-size: .875rem; color: var(--ts-text-muted); margin-top: 10px; }
.cmd-note + .cmd { margin-top: 8px; }
.feature h4 { font-family: var(--ts-font-display); font-size: 1.125rem; line-height: 1.35; font-weight: 700;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.group-h { display: flex; align-items: center; gap: 12px; font: 500 .8125rem/1.4 var(--k-mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--k-kicker); margin: 48px 0 18px; }
.group-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--k-line), transparent); }
.section-head + .group-h { margin-top: 0; }
.what-is .section-head { margin-bottom: 0; }
.fine { margin-top: 24px; max-width: 52em; font-size: .875rem; line-height: 1.6; color: var(--ts-text-muted); }

/* Get started */
.pwa-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .pwa-grid { grid-template-columns: minmax(0, 1fr); } }
.pwa { padding: 18px 20px; }
.pwa h3, .pwa h4 { font-family: var(--ts-font-sans); font-size: 1rem; font-weight: 600; }
.pwa p { margin-top: 4px; color: var(--ts-text-muted); font-size: .9375rem; }
.gs-callout { margin: 20px 0 0; max-width: none; }
.gs-callout p { line-height: 1.6; }
.gs-card { max-width: 760px; }
.os-steps { list-style: none; padding: 0; margin-top: 24px; display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1020px) { .os-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .os-steps { grid-template-columns: minmax(0, 1fr); } }
.os-steps .card { padding: 20px; }
.os-steps .ic { width: 40px; height: 40px; margin-bottom: 12px; }
.os-steps h3 { font-size: 1.125rem; font-weight: 700; }
.os-steps p { margin-top: 6px; color: var(--ts-text-muted); font-size: .9375rem; }
.optional-host { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: center; }
@media (max-width: 860px) { .optional-host { grid-template-columns: minmax(0, 1fr); } }
.optional-host h3 { font-size: 1.125rem; font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.optional-host p { margin-top: 6px; color: var(--ts-text-muted); }

/* ---------- Command palette ---------- */
.pal { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.pal[hidden] { display: none; }
.pal-back { position: absolute; inset: 0; background: rgba(2, 4, 12, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .2s; }
.pal-box { position: relative; width: 100%; max-width: 560px; border-radius: 14px; overflow: hidden;
  background: #070C22; color: #E6EBFF; border: 1px solid rgba(136, 157, 231, .35);
  box-shadow: 0 0 0 1px rgba(245, 165, 36, .12), 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 60px -20px rgba(111, 139, 255, .6);
  opacity: 0; transform: translateY(-8px) scale(.98); transition: opacity .2s, transform .3s var(--k-ease-spring); }
.pal.on .pal-back { opacity: 1; }
.pal.on .pal-box { opacity: 1; transform: none; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid rgba(136, 157, 231, .2); }
.pal-caret { color: #F5A524; font: 600 1rem/1 var(--k-mono); }
.pal-in input { flex: 1; min-width: 0; min-height: 54px; border: 0; background: transparent; color: inherit; font: 400 1rem/1.4 var(--k-mono); }
.pal-in input:focus { outline: none; }
.pal-in input::placeholder { color: #8590B2; }
.pal kbd { font: 500 .6875rem/1 var(--k-mono); padding: 3px 6px; border-radius: 4px; border: 1px solid rgba(136, 157, 231, .3);
  background: rgba(136, 157, 231, .08); color: #B9C4E8; }
.pal-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.pal-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 12px;
  border-radius: 8px; cursor: pointer; font-size: .9375rem; }
.pal-list li code { font: 400 .75rem/1 var(--k-mono); color: #8590B2; background: none; border: 0; padding: 0; }
.pal-list li[aria-selected="true"] { background: linear-gradient(90deg, rgba(111, 139, 255, .22), rgba(111, 139, 255, .06));
  box-shadow: inset 2px 0 0 #F5A524; }
.pal-list li[aria-selected="true"] code { color: #FFC15C; }
.pal-list .pal-empty { color: #8590B2; cursor: default; font-family: var(--k-mono); font-size: .8125rem; }
.pal-foot { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid rgba(136, 157, 231, .2);
  font: 400 .6875rem/1.4 var(--k-mono); color: #8590B2; }
.pal-foot kbd { margin-right: 3px; }
html.pal-open { overflow: hidden; }

/* ---------- Reduced motion: no animation, no smooth scroll, no lifts ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .card:hover, .btn:active { transform: none !important; }
}

/* Decorations that start outside their box (the approval stamp's slam, glows) never widen the page. */
main { overflow-x: clip; }

/* Help screenshots in the docs (#help): the light or dark one follows the page's theme. */
.doc .shot { margin: 8px 0 20px; }
.doc .shot img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--k-line); }
.doc .shot figcaption, .doc .shot-grid figcaption { font-size: .875rem; color: var(--ts-text-muted); margin-top: 8px; }
.doc .shot-dark { display: none; }
:root[data-theme="dark"] .doc .shot-light { display: none; }
:root[data-theme="dark"] .doc .shot-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .doc .shot-light { display: none; }
  :root:not([data-theme="light"]) .doc .shot-dark { display: block; }
}
.doc .shot-pair { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.doc .shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 8px 0 16px; }
.doc .shot-grid img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--k-line); }
@media (max-width: 640px) { .doc .shot-pair { grid-template-columns: 1fr; } .doc .shot-phone { max-width: 260px; } }
/* 0.4.10 sections: text beside a phone shot or a settings card, and the "What's new" list. */
.doc .shot-pair-phone { grid-template-columns: minmax(0, 1fr) minmax(0, 240px); gap: 24px; }
.doc .shot-pair-card { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 24px; }
.doc .shot-pair > div > :first-child, .doc .shot-pair > ol { margin-top: 0; }
@media (max-width: 720px) { .doc .shot-pair-phone, .doc .shot-pair-card { grid-template-columns: 1fr; } .doc .shot-card { max-width: 420px; } }
.doc .news { padding-left: 0; list-style: none; display: grid; gap: 10px; }
.doc .news li { margin: 0; padding: 10px 14px; border: 1px solid var(--k-line); border-left: 3px solid var(--k-amber);
  border-radius: var(--ts-radius-md); background: var(--ts-surface); }

/* The GitHub link in the top bar (launch): an icon button like the theme toggle, the word on wide screens */
.gh-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px;
  padding: 0 12px; border-radius: var(--ts-radius-sm); border: 1px solid rgba(255, 255, 255, .18); color: #fff;
  font: 500 .875rem/1 var(--ts-font-sans); text-decoration: none; }
.gh-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.gh-link:focus-visible { outline: 2px solid var(--k-amber); outline-offset: 2px; }
@media (max-width: 1100px) { .gh-link { padding: 0; } .gh-txt { display: none; } }
/* phones: the top bar has no room; the footer and Get started carry the link */
@media (max-width: 440px) { .gh-link { display: none; } }
