/* kleaf.app. Tokens are the app's midnight theme (src/index.css in the app repo). */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-greek-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  --background: 220 14% 95.5%;
  --card: 220 22% 98.6%;
  --popover: 0 0% 100%;
  --secondary: 220 14% 91.5%;
  --foreground: 220 13% 16%;
  --heading: 220 16% 9%;
  --muted: 219 9% 37%;
  --border: 220 13% 89%;
  --border-strong: 218 12% 81%;
  --accent: 144.9 78.8% 57.45%;
  --accent-hover: 145 75% 48%;
  --accent-ink: 0 0% 10%;
  --accent-text: 146 73% 24%;
  --warning: 32 80% 34%;
  --fill-hover: 220 14% 50% / 0.08;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 12px;
  --hairline: 1px;

  --dur-fast: 150ms;
  --dur-med: 220ms;
  --dur-slow: 320ms;
  --dur-scene: 480ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* The grid every panel sits on: a cell, and the quarter the mosaic splits it into. */
  --cols: 2;
  --cell: calc((100vw - 3.5rem) / 2);
  --q: calc(var(--cell) / 4);
  --pad: clamp(1.25rem, 3.5vw, 2.75rem);
  --bar-h: 3.5rem;

  /* The arrow on a link that leaves the site. */
  --ext: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.500' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.500 8.500l5-5M4.250 3.500H8.500v4.250'/%3E%3C/svg%3E");

  color-scheme: light;
}
.dark {
  --background: 210 11% 3.5%;
  --card: 210 6.25% 6.3%;
  --popover: 210 4.35% 9%;
  --secondary: 222.9 9.1% 15.1%;
  --foreground: 217.5 20.5% 84.7%;
  --heading: 0 0% 100%;
  --muted: 218.6 6.4% 59%;
  --border: 222.9 9.1% 15.1%;
  --border-strong: 214.3 5.9% 23.3%;
  --accent-hover: 145 82% 66%;
  --accent-text: 144.9 78.8% 57.45%;
  --warning: 40 78% 58%;
  --fill-hover: 220 20% 80% / 0.07;
  color-scheme: dark;
}
@media (min-resolution: 2dppx) {
  :root { --hairline: 0.5px; }
}
@media (min-width: 56.25rem) {
  :root {
    --cols: 4;
    --cell: min(17.5rem, calc((100vw - 4rem) / 4));
  }
}

/* Between pages: the panels leave, the next page's panels come in, then the mosaic flips (site.js). */
@view-transition { navigation: auto; }
::view-transition-group(root) { animation-duration: 180ms; }
@media (prefers-reduced-motion: no-preference) {
  .arriving main > *, .arriving .foot { animation: rise 440ms var(--ease) both; animation-delay: calc(var(--n, 0) * 70ms + 80ms); }
  .arriving main > :nth-child(2) { --n: 1; }
  .arriving main > :nth-child(n + 3), .arriving .foot { --n: 2; }
  .is-leaving main, .is-leaving .foot-wrap { opacity: 0; translate: 0 -0.75rem; transition: opacity 160ms ease-in, translate 160ms ease-in; }
}
@keyframes rise { from { opacity: 0; transform: translateY(1.500rem); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 1rem); }
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font: 400 1rem/1.6 "Inter Variable", system-ui, sans-serif;
  font-feature-settings: "calt", "cv01", "ss03", "zero";
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, figure, pre, table { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { color: hsl(var(--heading)); font-weight: 590; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.5rem); line-height: 1.04; letter-spacing: -0.032em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2rem); line-height: 1.15; letter-spacing: -0.024em; }
h3 { font-size: 1rem; line-height: 1.4; letter-spacing: -0.012em; }
p { text-wrap: pretty; }
a { color: hsl(var(--accent-text)); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
a[href^="http"]:not(.btn)::after {
  content: "";
  display: inline-block;
  width: 0.65em;
  height: 0.65em;
  margin-left: 0.3em;
  background: currentColor;
  -webkit-mask: var(--ext) center / contain no-repeat;
  mask: var(--ext) center / contain no-repeat;
}
code, pre { font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-size: 0.875em; letter-spacing: 0; }
:not(pre) > code { padding: 0.1em 0.35em; border-radius: var(--radius-sm); background: hsl(var(--secondary)); color: hsl(var(--heading)); }
:focus-visible { outline: 2px solid hsl(var(--accent)); outline-offset: 2px; border-radius: var(--radius-sm); }
[hidden] { display: none !important; }
.lead { color: hsl(var(--muted)); font-size: 1.0625rem; }
.muted { color: hsl(var(--muted)); }
.small { font-size: 0.875rem; line-height: 1.5; }

/* The mosaic: the app's gate backdrop, fixed behind every page. */
.mosaic {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  --mosaic-grid: hsl(var(--border));
  --mosaic-surface: hsl(var(--card));
  --mosaic-hatch: hsl(var(--border-strong));
  --mosaic-glow: hsl(var(--accent) / 0.14);
  --mosaic-glow-off: hsl(var(--accent) / 0);
}

.cell-probe { position: fixed; visibility: hidden; width: var(--cell); }

/* Top bar */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: hsl(var(--background));
  border-bottom: var(--hairline) solid hsl(var(--border-strong));
}
.bar-in {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 0.25rem;
  width: calc(var(--cols) * var(--cell));
  min-height: var(--bar-h);
  margin: 0 auto;
}
.lockup { display: flex; align-items: center; gap: 0.625rem; margin-right: auto; }
.logo {
  display: block;
  width: 4.4rem;
  aspect-ratio: 2000 / 637;
  background: hsl(var(--heading));
  -webkit-mask: url("/logo.png") center / contain no-repeat;
  mask: url("/logo.png") center / contain no-repeat;
}
.by {
  display: inline-flex;
  /* The mark has no text, so its bottom edge is its baseline: "by" stands on the same line. */
  align-items: baseline;
  gap: 0.3125rem;
  padding-left: 0.625rem;
  border-left: var(--hairline) solid hsl(var(--border-strong));
  color: hsl(var(--muted));
  font-size: 0.6875rem;
  line-height: 1rem;
  white-space: nowrap;
}
.lm12 {
  display: block;
  width: 2rem;
  aspect-ratio: 795 / 244;
  background: hsl(var(--foreground));
  -webkit-mask: url("/lm12.svg") center / contain no-repeat;
  mask: url("/lm12.svg") center / contain no-repeat;
}
.bar-links { display: flex; align-items: center; gap: 0.25rem; }
.bar a.navlink, .icon-btn, .lang summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2rem;
  padding: 0 0.625rem;
  border: 0;
  border-radius: var(--radius-md);
  background: none;
  color: hsl(var(--muted));
  font: inherit;
  font-size: 0.875rem;
  font-weight: 510;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.bar a.navlink:hover, .icon-btn:hover, .lang summary:hover, .lang[open] summary { color: hsl(var(--heading)); background: hsl(var(--fill-hover)); }
.bar a.navlink[aria-current="page"] { color: hsl(var(--heading)); }
.icon-btn { width: 2rem; padding: 0; justify-content: center; }
.icon { width: 1rem; height: 1rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dark .icon-sun, :root:not(.dark) .icon-moon { display: none; }
.lang { position: relative; }
.lang summary { list-style: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.375rem);
  min-width: 10rem;
  padding: 0.25rem;
  border: var(--hairline) solid hsl(var(--border-strong));
  border-radius: 8px;
  background: hsl(var(--popover));
  box-shadow: 0 8px 24px hsl(0 0% 0% / 0.18);
  animation: pop var(--dur-fast) var(--ease);
  transform-origin: top right;
}
.lang-menu a {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-sm);
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  text-decoration: none;
}
.lang-menu a:hover { background: hsl(var(--fill-hover)); color: hsl(var(--heading)); }
.lang-menu a[aria-current="true"]::after { content: ""; width: 0.375rem; height: 0.375rem; margin: auto 0; border-radius: 50%; background: hsl(var(--accent)); }
@keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }
.menu-open { display: none; }
@media (max-width: 43.75rem) {
  .bar-links, .bar .lang { display: none; }
  .menu-open { display: inline-flex; }
}

/* Phones: the navigation, full screen. */
.menu {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0 calc((100vw - var(--cols) * var(--cell)) / 2) 2rem;
  border: 0;
  background: hsl(var(--background));
  color: inherit;
  overflow-y: auto;
}
.menu[open] { display: flex; flex-direction: column; animation: menu-in var(--dur-med) var(--ease); }
.menu::backdrop { background: hsl(var(--background)); }
.menu-top { display: flex; align-items: center; gap: 0.25rem; min-height: var(--bar-h); }
.menu-links { display: flex; flex-direction: column; margin-top: 1.5rem; }
.menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 0;
  border-bottom: var(--hairline) solid hsl(var(--border-strong));
  color: hsl(var(--heading));
  font-size: 1.75rem;
  font-weight: 590;
  letter-spacing: -0.024em;
  line-height: 1.2;
  text-decoration: none;
}
.menu-link[aria-current="page"] { color: hsl(var(--accent-text)); }
.menu-langs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; padding-top: 2.5rem; }
.menu-langs a {
  padding: 0.5rem 0.875rem;
  border: var(--hairline) solid hsl(var(--border-strong));
  border-radius: var(--radius-md);
  color: hsl(var(--foreground));
  font-size: 0.9375rem;
  text-decoration: none;
}
.menu-langs a[aria-current="true"] { border-color: hsl(var(--accent)); color: hsl(var(--heading)); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-0.5rem); } }
@media (prefers-reduced-motion: no-preference) {
  .menu[open] .menu-link { animation: settle var(--dur-slow) var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms + 60ms); }
  .menu-link:nth-child(2) { --i: 1; }
  .menu-link:nth-child(3) { --i: 2; }
  .menu-link:nth-child(4) { --i: 3; }
}

.offer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: hsl(var(--card));
  border-bottom: var(--hairline) solid hsl(var(--border-strong));
  font-size: 0.875rem;
}

/* Panels: every block of content is a window on the mosaic, like the gate's panel. */
main, .foot-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--q); }
main { padding: calc(var(--q) * 2) 0 var(--q); }
main:has(> .hero-home) { padding-top: var(--q); }
.foot-wrap { padding-bottom: var(--q); }
.panel {
  position: relative;
  width: calc(var(--cols) * var(--cell));
  padding: var(--pad);
  border: var(--hairline) solid hsl(var(--border-strong));
  border-radius: var(--radius-md);
  background: hsl(var(--background));
  /* A height rounded up to the grid (site.js) shares the spare room above and below. */
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.panel > * + * { margin-top: 1rem; }
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  border: var(--hairline) solid hsl(var(--border-strong));
  border-radius: var(--radius-md);
  background: hsl(var(--card));
  color: hsl(var(--heading));
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 510;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:hover { background: hsl(var(--secondary)); }
.btn:active { transform: scale(0.98); }
.btn-primary { border-color: transparent; background: hsl(var(--accent)); color: hsl(var(--accent-ink)); }
.btn-primary:hover { background: hsl(var(--accent-hover)); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.625rem; }

/* Hero: centred words. On the home page it fills what the bar leaves of the screen and has
   no surface: the mosaic shows through, its tiles lit in the accent colour behind the words.
   The headline's letters step away from the pointer (site.js). */
.hero { align-items: center; text-align: center; min-height: calc(2 * var(--cell)); }
.hero > * + * { margin-top: 1.25rem; }
.hero .lead { max-width: 38rem; }
.hero .btn-row { justify-content: center; margin-top: 1.75rem; }
.hero-home { min-height: calc(100svh - var(--bar-h) - var(--offer-h, 0px) - var(--q) * 2); border-color: transparent; background: none; }
.hero-home h1 { position: relative; font-size: clamp(2.75rem, 1.2rem + 6.4vw, 5.5rem); }
.hero-home h1 .word, .hero-home h1 .word span { display: inline-block; white-space: nowrap; }
.hero-home h1 .word span { transition: translate 450ms cubic-bezier(0.2, 0.9, 0.3, 1.25); }
.hero-home .lead { font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.25rem); }
/* One entrance: the mosaic ripples out from the hero (site.js), then its words settle. */
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: settle var(--dur-scene) var(--ease) both; animation-delay: calc(var(--dur-slow) + var(--i, 0) * 70ms); }
  .hero > .lead { --i: 1; }
  .hero > .btn-row { --i: 2; }
}
@keyframes settle { from { opacity: 0; transform: translateY(0.5rem); } }

/* Home: screenshots */
.shots { padding-bottom: 0; overflow: hidden; }
.shots-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.75rem 2rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.tab {
  position: relative;
  padding: 0.375rem 0;
  border: 0;
  background: none;
  color: hsl(var(--muted));
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 510;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease);
}
.tab:hover, .tab[aria-selected="true"] { color: hsl(var(--heading)); }
.tab::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  border-radius: 1px;
  background: hsl(var(--accent));
  transform: scaleX(0);
  transition: transform var(--dur-med) var(--ease);
}
.tab[aria-selected="true"]::after { transform: scaleX(1); }
.stage {
  display: grid;
  margin: 1.5rem calc(var(--pad) * -1) 0;
  border-top: var(--hairline) solid hsl(var(--border-strong));
}
.stage > * { grid-area: 1 / 1; opacity: 0; transition: opacity var(--dur-med) var(--ease); }
.stage > .is-active { opacity: 1; }
.shot img { width: 100%; }
:root:not(.dark) .shot-dark, .dark .shot-light { display: none; }

/* Home: the MCP section, the loudest thing after the hero. */
.mcp h2 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); }
/* The replay: an agent on the left, kleaf on the right, the bridge between them. */
.demo {
  position: relative;
  margin-top: 2rem;
  padding: 2.75rem 1.25rem 1.25rem;
  border: 1px dashed hsl(var(--border-strong));
  border-radius: var(--radius-lg);
}
.demo-where { position: absolute; top: 0.875rem; left: 1.25rem; color: hsl(var(--muted)); font-size: 0.8125rem; font-weight: 510; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.pane {
  display: flex;
  flex-direction: column;
  border: var(--hairline) solid hsl(var(--border-strong));
  border-radius: var(--radius-md);
  background: hsl(var(--card));
  overflow: hidden;
}
.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.5rem;
  padding: 0 0.875rem;
  border-bottom: var(--hairline) solid hsl(var(--border-strong));
  color: hsl(var(--heading));
  font-size: 0.875rem;
  font-weight: 510;
}
.pane-app { border-color: hsl(var(--accent)); box-shadow: 0 0 0 3px hsl(var(--accent) / 0.14); transition: border-color var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease); }
.pane-app.is-off { border-color: hsl(var(--border-strong)); box-shadow: none; }
.log { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; padding: 0.875rem; list-style: none; font-size: 0.875rem; line-height: 1.45; }
.is-live .log { height: 20rem; justify-content: flex-end; overflow: hidden; }
.l-you { align-self: flex-end; max-width: 88%; padding: 0.375rem 0.625rem; border-radius: 10px 10px 2px 10px; background: hsl(var(--secondary)); color: hsl(var(--heading)); }
.l-agent { max-width: 92%; }
.l-call, .l-back { color: hsl(var(--muted)); font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-size: 0.75rem; letter-spacing: 0; }
.l-call::before { content: "\2192\00a0"; color: hsl(var(--accent-text)); }
.l-back::before { content: "\2190\00a0"; }
.l-call span { color: hsl(var(--heading)); }
/* Words in the reader's language stay in Inter: the mono face has no Greek. */
.l-back, .l-call span { font-family: "Inter Variable", system-ui, sans-serif; letter-spacing: -0.011em; }
.l-call span::before, .l-call span::after { content: '"'; }
.l-back.is-off { color: hsl(var(--warning)); }
.link { display: flex; flex-direction: column; align-items: center; height: 9.5rem; }
.wire { position: relative; flex: 1; align-self: stretch; }
.wire::before { content: ""; position: absolute; inset: 0 auto 0 50%; border-left: 1px solid hsl(var(--border-strong)); }
.wire em { position: absolute; top: 50%; left: calc(50% + 0.875rem); translate: 0 -50%; color: hsl(var(--muted)); font-size: 0.6875rem; font-style: normal; white-space: nowrap; }
/* A call on its way: a tile like the mosaic's, lit. */
.wire i {
  position: absolute;
  top: 0;
  left: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 2.5px;
  background: hsl(var(--accent));
  box-shadow: 0 0 0 3px hsl(var(--accent) / 0.2), 0 0 16px 2px hsl(var(--accent) / 0.6);
  opacity: 0;
}
.wire i.is-refused { background: hsl(var(--warning)); box-shadow: 0 0 0 3px hsl(var(--warning) / 0.2); }
.hop {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border: var(--hairline) solid hsl(var(--border-strong));
  border-radius: var(--radius-md);
  background: hsl(var(--card));
  color: hsl(var(--heading));
  font-size: 0.8125rem;
  font-weight: 510;
  line-height: 1.35;
}
.hop small { color: hsl(var(--muted)); font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-size: 0.6875rem; font-weight: 400; letter-spacing: 0; }
.switch { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0; border: 0; background: none; color: hsl(var(--muted)); font: inherit; font-size: 0.75rem; cursor: pointer; }
.switch i { position: relative; width: 1.875rem; height: 1.125rem; border-radius: 999px; background: hsl(var(--border-strong)); transition: background-color var(--dur-fast) var(--ease); }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.125rem - 4px); aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.3); transition: translate var(--dur-fast) var(--ease); }
.switch[aria-checked="true"] i { background: hsl(var(--accent)); }
.switch[aria-checked="true"] i::after { translate: 0.75rem 0; }
.stock { width: 100%; border-collapse: collapse; font-size: 0.8125rem; line-height: 1.35; transition: opacity var(--dur-med) var(--ease); }
.stock th, .stock td { padding: 0.5rem 0.875rem; border-bottom: var(--hairline) solid hsl(var(--border)); text-align: left; transition: background-color var(--dur-med) var(--ease), color var(--dur-med) var(--ease); }
.stock th { color: hsl(var(--muted)); font-size: 0.75rem; font-weight: 510; }
.stock td:nth-child(3), .stock .cost { font-family: "JetBrains Mono Variable", ui-monospace, monospace; letter-spacing: 0; }
/* The agent's permissions: one switch each. */
.perms { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.25rem; padding: 0.5rem 0.875rem 0.25rem; border-bottom: var(--hairline) solid hsl(var(--border-strong)); color: hsl(var(--muted)); font-size: 0.75rem; }
/* Its label takes the first line, the switches the next. */
.perms > span { flex-basis: 100%; }
/* The cost column: hatched until prices are shared. */
.stock th:last-child { width: 5.5rem; }
.stock:not(.has-prices) .cost, .stock.has-prices .veil { display: none; }
.stock .veil {
  width: 5.5rem;
  padding: 0.25rem;
  border-left: var(--hairline) solid hsl(var(--border));
  background: repeating-linear-gradient(135deg, hsl(var(--border-strong)) 0 1px, transparent 1px 7px);
  text-align: center;
  vertical-align: middle;
}
.veil span { display: inline-block; padding: 0.125rem 0.375rem; border-radius: var(--radius-sm); background: hsl(var(--card)); color: hsl(var(--muted)); font-size: 0.6875rem; line-height: 1.3; }
.is-find [data-hit] td:first-child, .is-read [data-hit] td:not(.veil), .is-price [data-hit] .cost, .is-add [data-new] td, .is-change [data-rename] { background: hsl(var(--accent) / 0.16); color: hsl(var(--heading)); }
.is-off .stock { opacity: 0.45; }
.filechip { display: flex; align-items: center; gap: 0.5rem; margin-top: auto; padding: 0.625rem 0.875rem; color: hsl(var(--muted)); font-size: 0.75rem; }
.filechip span { margin-left: auto; padding: 0.0625rem 0.4rem; border: var(--hairline) solid hsl(var(--border-strong)); border-radius: var(--radius-sm); }
.demo-note { margin-top: 0.75rem; color: hsl(var(--muted)); font-size: 0.8125rem; }
.outside { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.375rem; color: hsl(var(--muted)); font-size: 0.8125rem; }
.outside::before { content: ""; flex: none; width: 1.25rem; border-top: 1px dashed hsl(var(--warning)); }
.points { display: grid; gap: 1.5rem 2rem; margin-top: 2rem; }
.points h3 + p { margin-top: 0.25rem; color: hsl(var(--muted)); font-size: 0.9375rem; }
.caveat { margin-top: 1.75rem; padding-left: 0.875rem; border-left: 2px solid hsl(var(--warning)); color: hsl(var(--muted)); font-size: 0.9375rem; }
.more { display: inline-block; margin-top: 1.25rem; font-weight: 510; }
@media (min-width: 40rem) {
  .points { grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); }
}
@media (min-width: 56.25rem) {
  .demo-grid { grid-template-columns: minmax(0, 1fr) 15rem minmax(0, 1.3fr); }
  .stock th { white-space: nowrap; }
  .link { flex-direction: row; height: auto; }
  .wire { align-self: center; height: 3rem; }
  .wire::before { inset: 50% 0 auto; border-top: 1px solid hsl(var(--border-strong)); border-left: 0; }
  .wire em { top: 0; left: 0; right: 0; translate: none; text-align: center; }
  .wire i { top: 50%; left: 0; }
}

/* Home: comparison */
.compare { width: 100%; margin-top: 1.5rem; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
.compare th, .compare td { padding: 0.75rem 0.875rem; border-bottom: var(--hairline) solid hsl(var(--border-strong)); text-align: left; vertical-align: top; }
.compare thead th { color: hsl(var(--muted)); font-size: 0.875rem; font-weight: 510; }
.compare tbody th { width: 22%; padding-left: 0; color: hsl(var(--muted)); font-weight: 400; }
.compare td { width: 26%; color: hsl(var(--muted)); }
.compare .us { color: hsl(var(--heading)); font-weight: 510; background: hsl(var(--accent) / 0.07); }
.compare thead .us { color: hsl(var(--accent-text)); border-radius: var(--radius-md) var(--radius-md) 0 0; }
@media (max-width: 43.75rem) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .compare, .compare tbody, .compare tr, .compare tbody th, .compare tbody td { display: block; width: auto; }
  .compare tr { padding: 0.875rem 0; border-bottom: var(--hairline) solid hsl(var(--border-strong)); }
  .compare tbody th, .compare tbody td { padding: 0.25rem 0; border: 0; }
  .compare tbody th { color: hsl(var(--heading)); font-weight: 590; }
  .compare tbody td { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.75rem; }
  .compare td::before { content: attr(data-col); color: hsl(var(--muted)); font-weight: 400; font-size: 0.8125rem; }
  .compare tbody .us { margin: 0.125rem -0.5rem; padding: 0.375rem 0.5rem; border-radius: var(--radius-sm); }
}

.closing { text-align: center; }
.closing .lead { max-width: 38rem; margin-inline: auto; }
.closing .btn-row { justify-content: center; margin-top: 1.5rem; }

/* Features */
.group + .group { margin-top: 2.25rem; padding-top: 2.25rem; border-top: var(--hairline) solid hsl(var(--border-strong)); }
.group h2 { font-size: 1.25rem; }
.modules { display: grid; gap: 1.25rem 2rem; margin-top: 1.25rem; }
.modules p { margin-top: 0.125rem; color: hsl(var(--muted)); font-size: 0.9375rem; }
@media (min-width: 40rem) { .modules { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 56.25rem) { .modules { grid-template-columns: repeat(3, 1fr); } }
/* A whole screenshot from edge to edge of its panel, between the words and the points. */
.wide-shot { margin: 2rem calc(var(--pad) * -1) 0; border-block: var(--hairline) solid hsl(var(--border-strong)); background: hsl(var(--card)); }
.wide-shot img { width: 100%; }
.snippet { position: relative; margin-top: 1.5rem; border: var(--hairline) solid hsl(var(--border-strong)); border-radius: var(--radius-md); background: hsl(var(--card)); }
.snippet-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.375rem 0.375rem 0.375rem 0.875rem; border-bottom: var(--hairline) solid hsl(var(--border-strong)); color: hsl(var(--muted)); font-size: 0.8125rem; }
.snippet + p { margin-top: 0.625rem; }
.snippet pre { padding: 0.875rem; overflow-x: auto; color: hsl(var(--heading)); line-height: 1.6; }
.copy { min-height: 1.75rem; padding: 0.125rem 0.625rem; font-size: 0.8125rem; }
.copy[data-done] { border-color: hsl(var(--accent)); color: hsl(var(--accent-text)); }

/* Manifesto */
.manifesto .lead { font-size: 1.25rem; color: hsl(var(--foreground)); }
.prose h2 { margin-top: 2.75rem; font-size: 1.375rem; }
.prose p, .prose li { font-size: 1.0625rem; line-height: 1.65; }
.prose p { margin-top: 0.875rem; }
.prose .closing-line { margin-top: 3rem; padding-top: 2rem; border-top: var(--hairline) solid hsl(var(--border-strong)); color: hsl(var(--heading)); font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2rem); font-weight: 590; line-height: 1.2; letter-spacing: -0.024em; text-wrap: balance; }
.linklist { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1.5rem; font-weight: 510; }

/* Project documents, rendered from Markdown. */
.md h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem); }
.md h3 { margin-top: 1.75rem; font-size: 1.0625rem; }
.md ul, .md ol { margin-top: 0.875rem; padding-left: 1.25rem; list-style: revert; }
.md li + li { margin-top: 0.375rem; }
.md li > ul, .md li > ol { margin-top: 0.375rem; }
.md pre { margin-top: 1rem; padding: 0.875rem; overflow-x: auto; border: var(--hairline) solid hsl(var(--border-strong)); border-radius: var(--radius-md); background: hsl(var(--card)); color: hsl(var(--heading)); line-height: 1.6; }
.md table { width: 100%; margin-top: 1rem; border-collapse: collapse; font-size: 0.9375rem; }
.md th, .md td { padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: var(--hairline) solid hsl(var(--border-strong)); text-align: left; }
.md .licence { white-space: pre-wrap; font-size: 0.8125rem; }
.md a { overflow-wrap: anywhere; }
.doc > .small { margin-top: 2rem; }

/* Download */
.platforms { display: grid; gap: 0; margin-top: 2rem; border: var(--hairline) solid hsl(var(--border-strong)); border-radius: var(--radius-md); }
.platform { padding: 1.25rem; }
.platform + .platform { border-top: var(--hairline) solid hsl(var(--border-strong)); }
.platform h2 { display: flex; align-items: center; gap: 0.625rem; font-size: 1.125rem; }
.platform .btn-row { margin-top: 1rem; flex-direction: column; align-items: stretch; }
.platform .btn { justify-content: space-between; }
.platform .btn small { color: hsl(var(--muted)); font-size: 0.75rem; font-weight: 400; }
.platform .packages { margin-top: 0.75rem; }
.badge { display: none; padding: 0.125rem 0.5rem; border-radius: var(--radius-sm); background: hsl(var(--accent) / 0.16); color: hsl(var(--accent-text)); font-size: 0.75rem; font-weight: 510; letter-spacing: 0; }
.platform[data-here] .badge { display: inline-block; }
.platform[data-here] { background: hsl(var(--accent) / 0.05); }
@media (min-width: 56.25rem) {
  .platforms { grid-template-columns: repeat(3, 1fr); }
  .platform + .platform { border-top: 0; border-left: var(--hairline) solid hsl(var(--border-strong)); }
}

/* Footer */
.foot { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 1.25rem; color: hsl(var(--muted)); font-size: 0.875rem; }
.foot > * + * { margin-top: 0; }
.foot-who { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.foot .lockup { margin-right: 0; }
.foot .logo { width: 3.6rem; }
.foot ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
@media (max-width: 43.75rem) {
  .foot { flex-direction: column; align-items: flex-start; gap: 1.5rem; padding-block: 1.5rem; }
  .foot ul { gap: 0.875rem 1.5rem; }
}
.foot a { color: hsl(var(--muted)); }
.foot a:hover { color: hsl(var(--heading)); }
.doc, .manifesto { justify-content: flex-start; }
/* Phones: the replay's table gets tighter and its hatched column narrower. */
@media (max-width: 40rem) {
  .demo { padding-inline: 0.75rem; }
  .demo-where { left: 0.75rem; }
  .stock { table-layout: fixed; font-size: 0.75rem; }
  .stock th, .stock td { padding: 0.5rem 0.375rem; overflow-wrap: break-word; }
  .stock th:first-child, .stock td:first-child { width: 36%; padding-left: 0.75rem; hyphens: auto; }
  .stock th:nth-child(3) { width: 3.75rem; }
  .stock th:last-child { width: 2.75rem; overflow: hidden; text-overflow: clip; white-space: nowrap; color: transparent; }
  .filechip { flex-wrap: wrap; }
  .stock .veil { width: 2.75rem; }
  .veil span { writing-mode: vertical-rl; padding: 0.375rem 0.125rem; }
  /* With prices shared the column needs its heading and room for an amount. */
  .stock.has-prices { font-size: 0.6875rem; }
  .stock.has-prices :is(th, td) { padding-inline: 0.25rem; font-size: inherit; hyphens: auto; }
  .stock.has-prices :is(th, td):first-child { width: 34%; padding-left: 0.75rem; }
  .stock.has-prices th:nth-child(3) { width: 3.25rem; }
  .stock.has-prices th:last-child { width: 3.75rem; color: inherit; }
}
