/* Hyprmux landing page. Colors and motion come from config/hyprmux.conf. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght.woff2") format("woff2-variations"),
       url("../fonts/inter-latin-wght.woff2") format("woff2");
  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: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("../fonts/jetbrains-mono-latin-wght.woff2") format("woff2-variations"),
       url("../fonts/jetbrains-mono-latin-wght.woff2") format("woff2");
  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;
}

:root {
  --bg: #0b0c11;
  --bg-2: #0f1017;
  --panel: #12141c;
  --tile: #1d1f28;
  --tile-2: #171920;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #e7eaf2;
  --muted: #9aa2b6;
  --dim: #7f879c;

  /* general:col.active_border and col.inactive_border */
  --cyan: #33ccff;
  --green: #00ff99;
  --grad: linear-gradient(135deg, var(--cyan), var(--green));
  --inactive: rgba(89, 89, 89, 0.67);

  /* activity:col.* */
  --working: #ff9f0a;
  --blocked: #ff453a;
  --done: #30d158;

  /* animations: easeOutQuint and quick; durations are Hyprland speed × 100 ms */
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-quick: cubic-bezier(0.15, 0, 0.1, 1);
  --t-windows: 479ms;
  --t-border: 539ms;
  --t-fade: 303ms;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1160px;
  --radius: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: 0.88em; color: #cfe9ff; background: rgba(51, 204, 255, 0.08); border: 1px solid rgba(51, 204, 255, 0.14); padding: 0.08em 0.38em; border-radius: 6px; }
::selection { background: rgba(51, 204, 255, 0.3); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 14px; background: var(--panel); border-radius: 8px; }
.skip:focus { top: 12px; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.wrap--wide { width: min(1240px, 100% - 32px); }
.wrap--narrow { width: min(800px, 100% - 48px); }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Reveal on scroll. Without JS everything is visible. */
.js .reveal { opacity: 0; transform: translateY(16px); }
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
  transition-delay: var(--delay, 0ms);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background var(--t-fade) var(--ease-quick), border-color var(--t-fade) var(--ease-quick);
}
.nav.is-scrolled {
  background: rgba(11, 12, 17, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--line);
}
.nav__inner { width: min(1240px, 100% - 32px); margin-inline: auto; height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -0.01em; }
.brand img { border-radius: 7px; }
.nav__links { display: flex; gap: 4px; margin-left: 16px; }
.nav__links a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 14.5px; transition: color 200ms, background 200ms; }
.nav__links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-link { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: var(--muted); transition: color 200ms, background 200ms; }
.icon-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: transform 250ms var(--ease), box-shadow 250ms var(--ease), background 250ms var(--ease), border-color 250ms;
}
.btn--small { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.btn--large { height: 50px; padding: 0 22px; font-size: 16px; }
.btn--primary {
  color: #04140f;
  background: var(--grad);
  box-shadow: 0 8px 30px -8px rgba(0, 255, 153, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 12px 38px -8px rgba(0, 255, 153, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn--ghost { color: var(--text); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }

/* ---------- Hero ---------- */

.hero { position: relative; padding: 64px 0 72px; isolation: isolate; }
.hero__glow {
  position: absolute;
  inset: -80px 0 auto;
  height: 900px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(600px 340px at 50% 58%, rgba(51, 204, 255, 0.16), transparent 70%),
    radial-gradient(500px 300px at 62% 66%, rgba(0, 255, 153, 0.09), transparent 70%),
    radial-gradient(900px 500px at 50% 0%, rgba(51, 204, 255, 0.06), transparent 70%);
}
.hero__glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 20%, transparent 75%);
}
.hero__copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero h1 {
  font-size: clamp(34px, 6.2vw, 80px);
  font-weight: 680;
  letter-spacing: -0.04em;
  line-height: 1.06;
  max-width: 18ch;
  text-wrap: balance;
}
/* Wide screens break the headline after "Hyprland-style"; narrow ones let it wrap. */
@media (min-width: 720px) { .h1__line { display: block; } }
.hero h1 .grad { white-space: nowrap; }  /* never "Hyprland- / style" */
.lede { margin-top: 28px; max-width: 38em; color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; text-wrap: balance; }
/* Wide screens break the subline after "window"; narrow ones let it wrap. */
@media (min-width: 720px) { .lede__line { display: block; } }
.cta { margin-top: 34px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.meta { margin-top: 18px; color: var(--dim); font-size: 13.5px; }
/* The hero comes in on its own, without waiting for JS. The headline only slides, so it
   counts as painted at once (it's the page's largest contentful paint). */
.js .hero .reveal { opacity: 1; transform: none; }
.hero__copy > *, .hero > .wrap--wide { animation: heroIn 900ms var(--ease) both; animation-delay: var(--delay, 0ms); }
.hero h1 { animation-name: heroSlide; }
@keyframes heroIn { from { opacity: 0; transform: translateY(16px); } }
@keyframes heroSlide { from { transform: translateY(16px); } }
.hero__copy .reveal:nth-child(2) { --delay: 60ms; }
.hero__copy .reveal:nth-child(3) { --delay: 120ms; }
.hero__copy .reveal:nth-child(4) { --delay: 180ms; }
.hero__copy .reveal:nth-child(5) { --delay: 240ms; }
.hero > .wrap--wide { margin-top: 52px; --delay: 300ms; }

/* ---------- The Hyprmux window ---------- */

.hm {
  --u: 1cqw;                                   /* one unit = 1% of the window width */
  --fs: clamp(6.5px, calc(var(--u) * 1.02), 13px);
  --gap-out: calc(var(--u) * 1.1);             /* gaps_out = 14 */
  --gap-in: calc(var(--u) * 0.42);             /* gaps_in = 5 */
  --rounding: clamp(6px, calc(var(--u) * 0.85), 11px);
  container-type: inline-size;
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #08090d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 40px 120px -30px rgba(51, 204, 255, 0.28),
    0 30px 80px -20px rgba(0, 0, 0, 0.8);
  user-select: none;
}
/* Container units resolve against .hm only on its children. */
.hm > * { font-size: var(--fs); }
@supports not (container-type: inline-size) {
  .hm { --u: 11px; }
}
.hm__bar {
  position: relative;
  height: 6.5%;
  min-height: 22px;
  display: flex;
  align-items: center;
  padding: 0 1.2%;
  gap: 1.4%;
  background: linear-gradient(#14151c, #101118);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.hm__lights { display: flex; gap: 0.6em; }
.hm__lights i { width: 1em; height: 1em; border-radius: 50%; background: #ff5f57; }
.hm__lights i:nth-child(2) { background: #febc2e; }
.hm__lights i:nth-child(3) { background: #28c840; }
.hm__workspaces { display: flex; gap: 0.5em; }
.ws {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-width: 1.9em;
  height: 1.6em;
  padding: 0 0.55em;
  justify-content: center;
  border-radius: 999px;
  font: 600 0.9em/1 var(--sans);
  color: var(--dim);
  background: rgba(255, 255, 255, 0.05);
  transition: background var(--t-border) var(--ease), color var(--t-border) var(--ease);
}
.ws--active { color: #071219; background: #7fd4ff; }
.hm__title { position: absolute; left: 50%; transform: translateX(-50%); color: #b8bfcd; font: 500 1em/1 var(--sans); }

.hm__area {
  position: absolute;
  inset: max(6.5%, 22px) 0 0 0;
  padding: var(--gap-out);
  background:
    radial-gradient(70% 90% at 15% 10%, rgba(51, 204, 255, 0.10), transparent 60%),
    radial-gradient(60% 80% at 90% 100%, rgba(0, 255, 153, 0.07), transparent 60%),
    #0b0c12;
}

/* Tiles: a slot is a rectangle in the tiled area; the frame sits gaps_in inside it. */
.tile {
  position: absolute;
  left: calc(var(--gap-out) + (100% - 2 * var(--gap-out)) * var(--x) / 100);
  top: calc(var(--gap-out) + (100% - 2 * var(--gap-out)) * var(--y) / 100);
  width: calc((100% - 2 * var(--gap-out)) * var(--w) / 100);
  height: calc((100% - 2 * var(--gap-out)) * var(--h) / 100);
  padding: var(--gap-in);
}
.tile[data-slot="a"] { --x: 0;  --y: 0;  --w: 50; --h: 100; }
.tile[data-slot="b"] { --x: 50; --y: 0;  --w: 50; --h: 50; }
.tile[data-slot="c"] { --x: 50; --y: 50; --w: 25; --h: 50; }
.tile[data-slot="d"] { --x: 75; --y: 50; --w: 25; --h: 50; }

.frame {
  position: relative;
  height: 100%;
  border-radius: var(--rounding);
  background: var(--tile);
  box-shadow: 0 0 12px rgba(26, 26, 26, 0.93);       /* decoration:shadow */
  overflow: hidden;
  corner-shape: var(--corner-shape, round);
}
/* Borders are rings drawn over the frame's edge, so overflow: hidden can't clip them.
   The active border is a gradient ring that fades in, like Hyprland's border animation. */
.frame::before, .frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  padding: var(--border-size, 2px);                    /* general:border_size */
  background: var(--inactive);
  corner-shape: var(--corner-shape, round);           /* decoration:rounding_power */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.frame::after {
  background: var(--active-border, var(--grad));
  opacity: 0;
  transition: opacity var(--t-border) var(--ease-border, var(--ease));
}
.tile--focused .frame::after { opacity: 1; }

/* Terminal */
.term { height: 100%; padding: 1.1em 1.3em; font: 400 1em/1.55 var(--mono); color: #d6dbe6; overflow: hidden; }
.term__banner {
  margin: 0.55em 0 0.4em 0.9em;
  font: 200 3.3em/1 var(--mono);
  letter-spacing: 0.22em;
  background: linear-gradient(90deg, #8be3ff, #7ff5c8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.term__line { margin-left: 1.25em; }
.p { color: #7dcfff; }
.g { color: #9ece6a; }
.y { color: #e0af68; }
.gr { color: #73daca; }
.d { color: #6b7389; }
.cursor { display: inline-block; width: 0.6em; height: 1.15em; vertical-align: -0.2em; background: #c0caf5; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Terminal-like text keeps its spaces, line by line. */
.term p, .editor__code li { white-space: pre; }

/* Editor */
.editor { height: 100%; display: flex; flex-direction: column; font: 400 0.92em/1.6 var(--mono); background: #191b23; }
.editor__tabs { display: flex; height: 2.3em; flex: none; background: #14161d; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.editor__tab { display: flex; align-items: center; padding: 0 1.1em; color: #c8cede; background: #191b23; border-right: 1px solid rgba(255, 255, 255, 0.05); font-family: var(--sans); font-size: 0.95em; }
.editor__tab--dim { color: #646b7e; background: transparent; }
.editor__code { padding: 0.8em 0; counter-reset: ln; overflow: hidden; color: #c8d3f5; }
.editor__code li { counter-increment: ln; padding-left: 0.6em; }
.editor__code li::before { content: counter(ln); display: inline-block; width: 2em; margin-right: 1em; text-align: right; color: #3d4356; }
.k { color: #c099ff; }
.n { color: #82aaff; }
.v { color: #ff966c; }
.c1 { color: var(--cyan); }
.c2 { color: var(--green); }
.cm { color: #5f6884; font-style: italic; }

/* Web */
.web { height: 100%; display: flex; flex-direction: column; background: #f5f6f8; color: #1d2230; }
.web__bar { display: flex; align-items: center; gap: 0.7em; height: 2.4em; flex: none; padding: 0 0.7em; background: #1a1c24; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-family: var(--sans); }
.web__nav { color: #6d7487; letter-spacing: 0.2em; font-size: 0.95em; }
.web__url { flex: 1; height: 1.75em; display: flex; align-items: center; padding: 0 0.8em; border-radius: 0.5em; background: #0f1016; color: #aeb5c6; font-size: 0.9em; overflow: hidden; white-space: nowrap; }
.web__page { flex: 1; padding: 1em; display: flex; flex-direction: column; gap: 0.8em; min-height: 0; }
.web__h { font: 700 1.25em/1 var(--sans); letter-spacing: -0.02em; }
.web__chart { flex: 1; min-height: 0; display: flex; align-items: flex-end; gap: 6%; padding: 0.6em; border-radius: 0.6em; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.web__chart i { flex: 1; height: var(--h); border-radius: 0.3em 0.3em 0.1em 0.1em; background: linear-gradient(#33ccff, #00d68a); }
.web__rows { display: grid; gap: 0.45em; }
.web__rows i { height: 0.7em; border-radius: 0.35em; background: #e1e4ea; }
.web__rows i:nth-child(2) { width: 80%; }
.web__rows i:nth-child(3) { width: 60%; }

/* Device */
.device { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.8em; padding: 0.8em; background: #15161d; }
.phone { height: 80%; aspect-ratio: 9 / 19.5; padding: 2.2%; border-radius: 16% / 7.5%; background: #050506; border: 1px solid #3a3d47; box-shadow: 0 0.6em 1.6em rgba(0, 0, 0, 0.5); }
.phone__screen { height: 100%; border-radius: 14% / 6.6%; overflow: hidden; background: linear-gradient(180deg, #f3f4f7, #e9ebf0); padding: 8% 7%; display: flex; flex-direction: column; gap: 5%; color: #111; }
.phone__status { display: flex; align-items: center; justify-content: space-between; font: 600 0.62em/1 var(--sans); }
.phone__island { width: 34%; height: 1.2em; border-radius: 1em; background: #000; }
.phone__title { margin-top: 6%; font: 750 1.05em/1 var(--sans); letter-spacing: -0.02em; }
.phone__card { height: 15%; border-radius: 0.6em; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.phone__card--hi { height: 24%; background: linear-gradient(135deg, #33ccff, #00d68a); }
.device__buttons { display: flex; gap: 0.5em; font: 500 0.78em/1 var(--sans); color: #8a91a3; }
.device__buttons span { padding: 0.4em 0.8em; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }

/* Keycast HUD */
.keycast {
  position: absolute;
  left: 50%;
  bottom: 3.2%;
  z-index: 10;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.45em 0.8em 0.45em 0.55em;
  border-radius: 0.8em;
  background: rgba(18, 20, 28, 0.86);
  border: 1px solid rgba(127, 212, 255, 0.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0.6em 2em rgba(0, 0, 0, 0.5);
  font: 500 1.05em/1 var(--sans);
  color: #dfe5f1;
  white-space: nowrap;
}
.keycast kbd { min-width: 1.7em; height: 1.7em; font-size: 0.9em; }
.keycast span { margin-left: 0.4em; }

/* ---------- Keycaps ---------- */

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 0.5em;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-width: 2px;
  background: linear-gradient(#23262f, #1a1c23);
  color: #dfe4ee;
  font: 500 12.5px/1 var(--mono);
  vertical-align: 0.1em;
}
h3 kbd, p kbd { height: 22px; min-width: 22px; font-size: 11.5px; margin-left: 4px; }

/* ---------- Sections ---------- */

.section { position: relative; padding: 112px 0; }
.section + .section { border-top: 1px solid rgba(255, 255, 255, 0.04); }
.section__head { max-width: 740px; margin: 0 auto 56px; text-align: center; }
.kicker {
  display: inline-block;
  margin-bottom: 14px;
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 { font-size: clamp(34px, 4.6vw, 56px); letter-spacing: -0.035em; text-wrap: balance; }
.section__lede { margin-top: 18px; color: var(--muted); font-size: clamp(16px, 1.4vw, 18.5px); line-height: 1.6; text-wrap: pretty; }
.note { margin-top: 28px; text-align: center; color: var(--dim); font-size: 14.5px; }
.note a { color: var(--muted); text-underline-offset: 3px; }
.note a:hover { color: var(--text); }

/* ---------- Bento ---------- */

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  transition: border-color 400ms var(--ease), transform 600ms var(--ease);
}
.card:hover { border-color: var(--line-2); }
.card--terminal, .card--web { grid-column: span 3; }
.card--md { grid-column: span 2; }
.card--devices { grid-column: span 4; }
.card:nth-child(2) { --delay: 80ms; }
.card:nth-child(3) { --delay: 40ms; }
.card:nth-child(4) { --delay: 120ms; }

.card__media {
  --ar: 1040 / 500;
  position: relative;
  aspect-ratio: var(--ar);
  background: #0b0b14;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.card--md .card__media { --ar: 760 / 560; }
.card--devices .card__media { --ar: 1300 / 470; }
.card__video { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform 900ms var(--ease); }
.card:hover .card__video { transform: scale(1.025); }
.card__body { padding: 26px 28px 30px; }
.card__body h3 { font-size: 21px; letter-spacing: -0.02em; }
.card__body p { margin-top: 10px; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.card__body--split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.chips { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: #b9c0cf; font-size: 13px; background: rgba(255, 255, 255, 0.025); }
.badge { display: inline-block; margin-left: 6px; padding: 3px 9px; border-radius: 999px; font: 600 11px/1.2 var(--sans); letter-spacing: 0.02em; color: var(--working); background: rgba(255, 159, 10, 0.1); border: 1px solid rgba(255, 159, 10, 0.3); vertical-align: 0.25em; }

/* ---------- Code cards ---------- */

.codecard {
  margin: 0;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: #0f1118;
  box-shadow: 0 30px 80px -30px rgba(51, 204, 255, 0.22), 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}
.codecard__bar { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 16px; background: #13151d; border-bottom: 1px solid var(--line); color: #7c8498; font: 500 12.5px/1 var(--mono); font-size: 12.5px; }
.codecard__bar .hm__lights { font-size: 11px; }
.code { margin: 0; padding: 20px 22px; overflow-x: auto; font: 400 13.5px/1.75 var(--mono); color: #c8d3f5; tab-size: 4; }
.code code { font: inherit; color: inherit; background: none; border: 0; padding: 0; }

/* ---------- Agents ---------- */

.agents { display: grid; grid-template-columns: 1.05fr 1fr; gap: 20px; align-items: stretch; margin-bottom: 64px; }
.agents__board { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.agents__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; color: var(--dim); font-size: 13px; }
.agents__legend li { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot--working { background: var(--working); }
.dot--blocked { background: var(--blocked); }
.dot--done { background: var(--done); }
.bub { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; font: 700 10px/1 var(--sans); color: #0b0c11; }
.bub--working { background: var(--working); }
.bub--blocked { background: var(--blocked); animation: pulse 0.9s ease-in-out infinite; }
.bub--done { background: var(--done); }
@keyframes pulse { 50% { opacity: 0.55; } }
.codecard--term { display: flex; flex-direction: column; --delay: 100ms; }
.codecard--term .code { flex: 1; white-space: pre; font-size: 13px; }

/* ---------- Feature grid ---------- */

.features { display: grid; gap: 0 32px; }
.features--3 { grid-template-columns: repeat(3, 1fr); }
.feature { padding: 26px 0 30px; border-top: 1px solid var(--line); }
.feature h3 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 17px; letter-spacing: -0.01em; }
.feature h3 code { font-size: 15px; }
.feature p { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.feature:nth-child(3n + 2) { --delay: 60ms; }
.feature:nth-child(3n) { --delay: 120ms; }

/* ---------- Keys ---------- */

.keys { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; max-width: 900px; margin: 0 auto; }
.keys > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.keys dt { display: flex; gap: 4px; flex: none; order: 2; }
.keys dd { color: var(--muted); font-size: 15px; }

/* ---------- Install ---------- */

.install {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 40px 48px;
  text-align: center;
  border-radius: 28px;
  background:
    radial-gradient(70% 60% at 50% 0%, rgba(51, 204, 255, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 120px -40px rgba(0, 255, 153, 0.25);
}
.install__icon { margin: 0 auto 22px; width: 112px; height: 112px; filter: drop-shadow(0 16px 40px rgba(51, 204, 255, 0.35)); }
.install .section__lede { max-width: 32em; margin-inline: auto; }
.steps { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }
.steps li { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 14px; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--line); color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.steps span { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--grad); color: #04140f; font: 700 12px/1 var(--sans); }
.source { margin-top: 28px; text-align: left; }
.source summary { cursor: pointer; width: fit-content; margin: 0 auto; color: var(--muted); font-size: 14.5px; list-style: none; padding: 6px 12px; border-radius: 8px; }
.source summary::-webkit-details-marker { display: none; }
.source summary::after { content: " ▾"; color: var(--dim); }
.source[open] summary::after { content: " ▴"; }
.source summary:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.copyblock { position: relative; margin-top: 16px; border-radius: 12px; background: #0b0d13; border: 1px solid var(--line); }
.copyblock .code { padding-right: 84px; font-size: 13px; }
.copy { position: absolute; top: 12px; right: 12px; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.05); color: var(--muted); font: 500 12.5px/1 var(--sans); cursor: pointer; transition: color 200ms, background 200ms; }
.copy:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); }
.source .note { text-align: left; margin-top: 12px; font-size: 13.5px; }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 22px 44px 22px 0;
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 200ms;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--muted);
  transition: transform 350ms var(--ease), background 200ms;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { color: #fff; }
.faq summary:hover::before, .faq summary:hover::after { background: var(--cyan); }
.faq details p { padding: 0 0 24px; color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 68ch; }
.faq details[open] p { animation: faqIn 450ms var(--ease); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Footer ---------- */

.footer { padding: 56px 0 64px; border-top: 1px solid var(--line); }
.footer__inner { display: grid; grid-template-columns: auto 1fr; gap: 18px 32px; align-items: center; }
.footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.footer__brand img { border-radius: 6px; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 22px; }
.footer__links a { color: var(--muted); text-decoration: none; font-size: 14.5px; }
.footer__links a:hover { color: var(--text); }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .nav__links { display: none; }
  .agents { grid-template-columns: 1fr; gap: 40px; }
  .features--3 { grid-template-columns: repeat(2, 1fr); }
  .card--terminal, .card--web, .card--md, .card--devices { grid-column: span 6; }
  .card--md { grid-column: span 6; }
}
@media (max-width: 720px) {
  .section { padding: 80px 0; }
  .card__body--split { grid-template-columns: 1fr; }
  .keys { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .install { padding: 48px 22px 36px; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__links { justify-content: flex-start; }

  /* The window turns portrait, like dwindle would split it, and drops the editor. */
  .hm { aspect-ratio: 4 / 5; --fs: clamp(7px, calc(var(--u) * 2.2), 12px); --gap-out: calc(var(--u) * 2.2); --gap-in: calc(var(--u) * 0.8); }
  .hm__bar { height: 7%; }
  .hm__area { inset: max(7%, 22px) 0 0 0; }
  .tile[data-slot="a"] { --x: 0;  --y: 0;  --w: 100; --h: 50; }
  .tile[data-slot="b"] { display: none; }
  .tile[data-slot="c"] { --x: 0;  --y: 50; --w: 55; --h: 50; }
  .tile[data-slot="d"] { --x: 55; --y: 50; --w: 45; --h: 50; }
  .hm__title { display: none; }
}
@media (max-width: 560px) {
  .features--3 { grid-template-columns: 1fr; }
  .card--devices .card__media { --ar: 16 / 9; }
  .card--devices .card__video { object-position: 82% 50%; }
  .hero { padding-top: 56px; }
  .cta .btn { width: 100%; justify-content: center; }
  .cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- 404 ---------- */

.notfound { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 40px 24px; text-align: center; }
.notfound__window { width: min(560px, 100%); aspect-ratio: 16 / 7; margin-bottom: 24px; }
.notfound h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.035em; }
@media (max-width: 720px) {
  .code, .codecard--term .code { font-size: 12px; }
}

/* ---------- The live compositor (js/compositor) ---------- */

.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; }

.hm--live { cursor: default; outline: none; transition: box-shadow 400ms var(--ease); }
.hm--live:focus-visible { outline: none; }
.hm--engaged {
  box-shadow:
    0 0 0 1px rgba(51, 204, 255, 0.45),
    0 0 0 5px rgba(51, 204, 255, 0.08),
    0 40px 120px -30px rgba(51, 204, 255, 0.35),
    0 30px 80px -20px rgba(0, 0, 0, 0.8);
}
.hm--live .tile[data-slot], .hm--live .tile {
  display: block;
  padding: 0;
  transform-origin: 50% 50%;
  transition:
    left var(--t-windows) var(--ease-windows, var(--ease)),
    top var(--t-windows) var(--ease-windows, var(--ease)),
    width var(--t-windows) var(--ease-windows, var(--ease)),
    height var(--t-windows) var(--ease-windows, var(--ease)),
    transform 410ms var(--ease),                                 /* windowsIn */
    opacity 173ms cubic-bezier(0.5, 0.5, 0.75, 1);               /* fadeIn, almostLinear */
}
.hm--live .tile.is-entering { transform: scale(0.87); opacity: 0; transition: none; }
.hm--live .tile.is-leaving {
  z-index: 0;
  pointer-events: none;
  transform: scale(0.87);
  opacity: 0;
  transition: transform 149ms linear, opacity 146ms cubic-bezier(0.5, 0.5, 0.75, 1);  /* windowsOut, fadeOut */
}
.hm--instant .tile, .hm--instant .tile * { transition: none !important; }
.hm--empty .hm__area::after {
  content: "Empty workspace. Press ↩ for a terminal.";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--dim);
  font: 500 1.2em/1 var(--sans);
}

/* Keycast, as the app draws it: the chord in the accent color, then the label. */
.keycast { gap: 0.9em; padding: 0.55em 1.2em; border-radius: 0.75em; transition: opacity 150ms linear, transform 150ms linear; }
.keycast__chord { color: #7fd4ff; font: 700 1.25em/1 var(--sans); letter-spacing: 0.04em; }
.keycast__label { margin: 0; color: #e7eaf2; }
.keycast__count { color: #8b93a7; }
.keycast__count:empty { display: none; }
.hm--live .keycast:not(.is-hidden) { transition: opacity 400ms var(--ease), transform 400ms var(--ease); }  /* layersIn */
.keycast.is-hidden { opacity: 0; transform: translate(-50%, 30%) scale(0.9); }

/* The hint under the window: the mouse binds up front, the keys behind a toggle. */
.hm-hint { margin-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hm-hint__mouse {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: #c3c9d6;
  font-size: 15px;
}
.hm-hint__icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #7fd4ff; background: rgba(51, 204, 255, 0.1); }
.hm-hint__mouse kbd { height: 22px; min-width: 22px; font-size: 12px; margin: 0 2px; }
.hm-hint__touch { display: none; }
@media (hover: none) {
  .hm-hint__pointer, .hm-hint__icon, .hm-keys { display: none; }
  .hm-hint__touch { display: inline; }
  .hm-hint__mouse { padding: 0; border: 0; background: none; color: var(--muted); font-size: 14px; }
}

.hm-keys { display: flex; flex-direction: column; align-items: center; }
.hm-keys summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px 0 12px;
  cursor: pointer;
  list-style: none;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  user-select: none;
  transition: color 200ms, background 200ms, border-color 200ms;
}
.hm-keys summary::-webkit-details-marker { display: none; }
.hm-keys summary:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); border-color: var(--line-2); }
.hm-keys[open] summary { color: var(--text); border-color: var(--line-2); }
.hm-keys__icon { opacity: 0.8; }
.hm-keys__chevron { margin-left: 2px; opacity: 0.7; transition: transform 350ms var(--ease); }
.hm-keys[open] .hm-keys__chevron { transform: rotate(180deg); }
.hm-keys__dot { display: none; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.hm-hint.is-live .hm-keys__dot { display: inline-block; }
.hm-keys__panel {
  margin-top: 10px;
  width: min(640px, 100%);
  padding: 18px 22px 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  animation: faqIn 400ms var(--ease);
}
.hm-keys__intro { color: var(--muted); font-size: 14px; text-align: center; }
.hm-keys__intro kbd, .hm-keys__grid kbd { height: 22px; min-width: 22px; font-size: 11.5px; padding: 0 6px; }
.hm-keys__grid { margin-top: 16px; display: grid; grid-template-columns: repeat(3, auto); justify-content: center; gap: 10px 36px; }
.hm-keys__grid div { display: flex; align-items: center; gap: 10px; }
.hm-keys__grid dt { display: flex; gap: 3px; }
.hm-keys__grid dd { color: var(--muted); font-size: 13.5px; white-space: nowrap; }
@media (max-width: 720px) { .hm-keys__grid { grid-template-columns: 1fr 1fr; } }

/* Content of tiles the compositor opens. */
.web__page--site { background: #0b0c11; color: var(--text); align-items: center; justify-content: center; text-align: center; }
.web__site-h { font: 700 1.3em/1.1 var(--sans); letter-spacing: -0.03em; max-width: 12em; }
.web__site-btn { width: 5.5em; height: 1.4em; border-radius: 0.4em; background: var(--grad); }
.web__site-tiles { display: flex; gap: 0.4em; width: 70%; max-width: 14em; }
.web__site-tiles i { flex: 1; aspect-ratio: 16 / 10; border-radius: 0.3em; border: 1px solid rgba(255, 255, 255, 0.12); background: #1d1f28; }
.web__site-tiles i:first-child { border-color: var(--cyan); }
.phone__row { height: 9%; border-radius: 0.5em; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }

/* Mouse binds: ⌘-drag moves a tile, ⌘-right-drag resizes it. */
.hm--live * { cursor: inherit; }
.hm--live .tile.is-dragging {
  z-index: 6;
  transition: none;
}
.hm--live .tile.is-dragging .frame { box-shadow: 0 1.5em 4em rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(51, 204, 255, 0.25); }
.hm--live .tile.is-resizing { transition: none; }

/* ---------- Workspaces, the scratchpad, groups, fullscreen, activity ---------- */

.hm--live .hm__area { overflow: hidden; }
.hm__ws { position: absolute; inset: 0; z-index: 1; visibility: hidden; will-change: transform; }
.hm__ws.is-shown { visibility: visible; }
.hm__ws[data-ws="special"] { z-index: 3; }
.hm__dim { position: absolute; inset: 0; z-index: 2; background: #000; opacity: 0; pointer-events: none; transition: opacity 303ms cubic-bezier(0.15, 0, 0.1, 1); }
.hm--special .hm__ws:not([data-ws="special"]) { pointer-events: none; }
.hm--live .keycast { z-index: 10; }

.hm--live .tile.is-tab-hidden { display: none; }
.hm--live .tile.tile--maximized, .hm--live .tile.tile--fullscreen { z-index: 4; }
.tile--fullscreen .frame { border-radius: 0; }
.tile--fullscreen .frame::before, .tile--fullscreen .frame::after { display: none; }

/* group { col.border_active = rgba(ffaa33ee) rgba(ff5f5fee) 45deg; col.border_inactive = rgba(775533aa) } */
.tile--grouped .frame { padding-top: var(--groupbar, 20px); }
.tile--grouped .frame::before { background: rgba(119, 85, 51, 0.67); }
.tile--grouped .frame::after { background: linear-gradient(135deg, rgba(255, 170, 51, 0.93), rgba(255, 95, 95, 0.93)); }
.groupbar {
  position: absolute;
  z-index: 4;
  top: 2px;
  left: 2px;
  right: 2px;
  height: var(--groupbar, 20px);
  display: flex;
  gap: 2px;
  padding: 2px max(2px, calc(var(--rounding) - 4px));
  border-radius: calc(var(--rounding) - 2px) calc(var(--rounding) - 2px) 0 0;
  background: rgba(58, 58, 74, 0.35);
}
.groupbar__tab {
  flex: 1;
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 0 0.6em;
  border-radius: 4px;
  background: rgba(58, 58, 74, 0.93);       /* groupbar:col.inactive */
  color: rgba(255, 255, 255, 0.7);
  font: 500 0.85em/1 var(--sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.groupbar__tab.is-active { background: rgba(51, 204, 255, 0.93); color: #fff; }   /* groupbar:col.active */

/* activity: unfocused tiles' borders take the state's color and pulse; a pill names it. */
.tile--working:not(.tile--focused) .frame::before { background: var(--working); animation: activity 2.4s ease-in-out infinite; }
.tile--blocked:not(.tile--focused) .frame::before { background: var(--blocked); animation: activity 0.9s ease-in-out infinite; }
.tile--done:not(.tile--focused) .frame::before { background: var(--done); animation: activity 3.6s ease-in-out infinite; }
@keyframes activity { 50% { opacity: 0.45; } }
.tile__pill {
  position: absolute;
  z-index: 5;
  top: -0.55em;
  left: 1.1em;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  font: 650 0.8em/1.2 var(--sans);
  color: #0b0c11;
  pointer-events: none;
}
.tile--working .tile__pill { background: var(--working); }
.tile--blocked .tile__pill { background: var(--blocked); }
.tile--done .tile__pill { background: var(--done); }
.hm--live .tile { overflow: visible; }

/* The bar: pills with activity bubbles, and the scratchpad while it's shown. */
.hm__workspaces .ws { cursor: pointer; }
.hm__workspaces .bub { min-width: 1.35em; height: 1.35em; padding: 0 0.3em; font-size: 0.72em; margin-left: 0.1em; }
.hm__workspaces .bub--blocked { animation: pulse 0.9s ease-in-out infinite; }
.ws--special { color: #071219; background: #c3a6ff; padding: 0 0.8em; cursor: default; }

/* The page's own demo pointer. */
.hm-cursor {
  position: absolute;
  z-index: 11;
  left: 0;
  top: 0;
  margin: -2px 0 0 -2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms linear;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}
.hm-cursor.is-shown { opacity: 1; }
.hm-cursor svg { transition: transform 150ms var(--ease); }
.hm-cursor.is-holding svg { transform: scale(0.88); }
.hm-cursor__mod {
  position: absolute;
  left: 18px;
  top: 18px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(18, 20, 28, 0.92);
  border: 1px solid rgba(127, 212, 255, 0.45);
  color: #7fd4ff;
  font: 700 12px/1.2 var(--sans);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 150ms linear, transform 200ms var(--ease);
}
.hm-cursor.is-holding .hm-cursor__mod { opacity: 1; transform: none; }

/* Touch screens get buttons for the binds. */
.hm-touch { display: none; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 520px; }
.hm-touch button {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: 500 14px/1 var(--sans);
  -webkit-tap-highlight-color: transparent;
}
.hm-touch button:active { background: rgba(51, 204, 255, 0.15); border-color: rgba(51, 204, 255, 0.5); }
@media (hover: none) { .hm-touch { display: flex; } }

/* A README in a web tile. */
.web__page--docs { background: #fff; gap: 0.55em; padding: 1.1em 1.3em; }
.web__docs-h { font: 700 1.5em/1 var(--sans); letter-spacing: -0.02em; padding-bottom: 0.35em; border-bottom: 1px solid #e5e7eb; color: #1f2328; }
.web__docs-h2 { margin-top: 0.4em; font: 650 1.05em/1 var(--sans); color: #1f2328; }
.web__docs-p { height: 0.6em; border-radius: 0.3em; background: #e6e8ec; }
.web__docs-p--short { width: 70%; }
.web__docs-code { height: 2.6em; border-radius: 0.5em; background: #f3f4f6; border: 1px solid #e5e7eb; }

/* ---------- The config playground ---------- */

/* decoration: active_opacity, inactive_opacity, dim_inactive, dim_strength (fadeSwitch, fadeDim) */
.hm--live .tile .frame > :not(.groupbar) {
  opacity: var(--active-opacity, 1);
  transition: opacity 303ms cubic-bezier(0.15, 0, 0.1, 1), filter 303ms cubic-bezier(0.15, 0, 0.1, 1);
}
.hm--live .tile:not(.tile--focused) .frame > :not(.groupbar) {
  opacity: var(--inactive-opacity, 1);
  filter: brightness(var(--dim-brightness, 1));
}
.hm--no-shadow .frame { box-shadow: none; }

.playground { margin-bottom: 72px; }
.presets { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-bottom: 22px; }
.presets[hidden] { display: none; }
.presets__label { margin-right: 6px; color: var(--dim); font: 500 12.5px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.preset {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: 500 13.5px/1 var(--sans);
  cursor: pointer;
  transition: color 200ms, background 200ms, border-color 200ms;
}
.preset:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.preset[aria-pressed="true"] { color: #04140f; background: var(--grad); border-color: transparent; }

.playground__grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
.playground__editor { transition: box-shadow 300ms var(--ease), border-color 300ms; }
.playground__editor:focus-within { border-color: rgba(51, 204, 255, 0.45); }
.playground__preview { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }

.cfg { display: grid; grid-template-columns: auto minmax(0, 1fr); font: 400 13px/1.7 var(--mono); }
.cfg__gutter { margin: 0; padding: 16px 8px 16px 16px; color: #3d4356; text-align: right; user-select: none; overflow: hidden; font: inherit; }
.cfg__body { position: relative; min-width: 0; }
.cfg__hl, .cfg__input {
  margin: 0;
  padding: 16px 18px 16px 8px;
  border: 0;
  font: inherit;
  letter-spacing: normal;
  white-space: pre;
  tab-size: 4;
  overflow: auto;
}
.cfg__hl { display: none; position: absolute; inset: 0; pointer-events: none; color: #c8d3f5; overflow: hidden; }
.cfg__input {
  display: block;
  width: 100%;
  height: calc(23 * 1.7em + 32px);
  resize: none;
  background: transparent;
  color: #c8d3f5;
  caret-color: #c0caf5;
  outline: none;
}
.playground--live .cfg__hl { display: block; }
.playground--live .cfg__input { color: transparent; }
.playground--live .cfg__input::selection { color: transparent; background: rgba(51, 204, 255, 0.28); }
.cfg-color { font-weight: 500; }

.hm.hm--mini { aspect-ratio: 16 / 10; --fs: clamp(7.5px, calc(var(--u) * 1.55), 12px); }
.hm.hm--mini .tile[data-slot="a"] { --x: 0; --y: 0; --w: 50; --h: 100; }
.hm.hm--mini .tile[data-slot="b"] { --x: 50; --y: 0; --w: 50; --h: 50; display: block; }
.hm.hm--mini .tile[data-slot="c"] { --x: 50; --y: 50; --w: 50; --h: 50; }
.hm--mini .web__chart { gap: 10%; }
.hm__errors {
  position: absolute;
  z-index: 12;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.55em 1.1em;
  background: rgba(176, 36, 36, 0.94);
  color: #fff;
  font: 500 1em/1.45 var(--mono);
  transform: translateY(-105%);
  transition: transform 300ms var(--ease);
}
.hm__errors.is-shown { transform: none; }

.playground__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.playground__actions[hidden] { display: none; }
.playground__replay { gap: 8px; }
.playground__tip { color: var(--dim); font-size: 13.5px; }
.playground__tip kbd { height: 20px; min-width: 20px; font-size: 11px; padding: 0 5px; }

.features--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .playground__grid { grid-template-columns: 1fr; }
  .playground__preview { position: static; order: -1; }
  .features--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .features--4 { grid-template-columns: 1fr; }
  .cfg { font-size: 12px; }
}
@media (hover: none) { .playground__tip { display: none; } }
.hm--mini .phone__status > span:not(.phone__island) { visibility: hidden; }

/* ---------- The agents board ---------- */

.hm.hm--board { aspect-ratio: 16 / 11; }
/* decoration:title with show_id: every tile's pill shows its number and title. */
.hm--board .tile__pill { background: #3a3d4a; color: #dfe4ee; font-weight: 600; }
.hm--board .tile--working .tile__pill { background: var(--working); color: #0b0c11; }
.hm--board .tile--blocked .tile__pill { background: var(--blocked); color: #0b0c11; }
.hm--board .tile--done .tile__pill { background: var(--done); color: #0b0c11; }
.hm--board .tile__pill { transition: background 539ms var(--ease), color 539ms var(--ease); }
.hm--board .term { padding-top: 1.5em; }

.web__page--app { transition: background 400ms var(--ease), color 400ms var(--ease); }
.web__page--app.is-dark { background: #14161d; color: #e7eaf2; }
.web__page--app.is-dark .web__rows i { background: #262935; }
.web__toggle { display: flex; align-items: center; justify-content: space-between; padding: 0.6em 0.8em; border-radius: 0.6em; background: rgba(127, 127, 127, 0.1); font: 500 0.95em/1 var(--sans); }
.web__switch { position: relative; width: 2.6em; height: 1.45em; border-radius: 1em; background: #c9ccd4; transition: background 300ms var(--ease); }
.web__switch::after { content: ""; position: absolute; top: 0.18em; left: 0.18em; width: 1.09em; height: 1.09em; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 300ms var(--ease); }
.is-dark .web__switch { background: var(--green); }
.is-dark .web__switch::after { transform: translateX(1.15em); }
.agent-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
  padding: 0.35em 0.8em;
  background: rgba(51, 204, 255, 0.16);
  border-bottom: 1px solid rgba(51, 204, 255, 0.4);
  color: #bfe9ff;
  font: 500 0.85em/1.3 var(--sans);
  animation: faqIn 300ms var(--ease);
}
.agent-banner b { padding: 0.15em 0.6em; border-radius: 0.4em; background: rgba(255, 255, 255, 0.12); color: #fff; font-weight: 600; }

/* The script's terminal: new lines push the old ones up. */
.code--live { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-height: 360px; overflow: hidden; }
.code--live code { display: flex; flex-direction: column; }
.code__line { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.75em; padding-left: 1.4em; text-indent: -1.4em; }
.code__line.d { color: #6b7389; }
@media (max-width: 980px) { .code--live { min-height: 300px; } }
