/* Fonts are served from this site (SIL Open Font License, see fonts/). */
@font-face { font-family: "Chakra Petch"; font-weight: 500; font-display: swap; src: url("fonts/chakra-petch-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+2500-257F; }
@font-face { font-family: "Chakra Petch"; font-weight: 500; font-display: swap; src: url("fonts/chakra-petch-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F; }
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url("fonts/chakra-petch-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+2500-257F; }
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url("fonts/chakra-petch-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F; }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-display: swap; src: url("fonts/chakra-petch-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }

/* The desk app's own colours. */
:root {
  --bg: #07070D;
  --panel: #0B0B15;
  --raised: #14152A;
  --line: #24263A;
  --line-hi: #3A3D5C;
  --text: #E8E9F3;
  --soft: #B9BBD3;
  --muted: #9A9CB8;
  --cyan: #22E5FF;
  --magenta: #FF2BD6;
  --warn-bg: #1A0C1E;
  --warn-line: #5C1E57;
  --display: "Chakra Petch", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --max: 1200px;
  --gutter: 16px;
  --cut: 12px;
}
@media (min-width: 760px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #9AF3FF; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
code, pre { font-family: var(--mono); font-size: 0.875em; }

.frame { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cyan); color: var(--bg); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.mark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; font-size: 15px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.mark b { font-weight: 700; color: var(--text); }
.top nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.top nav a { font-family: var(--display); font-weight: 500; font-size: 15px; color: var(--soft); text-decoration: none; padding: 8px 12px; white-space: nowrap; }
.top nav a:hover { color: var(--text); background: var(--raised); }
.top nav .gh { border: 1px solid var(--line-hi); margin-left: 8px; }
@media (max-width: 759px) { .top nav a:not(.gh):not([href="#install"]) { display: none; } }

/* Hero: the desk */
.hero { padding-top: 8px; }
.desk { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--line); background: var(--panel); }
.stage { position: relative; min-height: 560px; overflow: hidden; background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 4px),
    radial-gradient(120% 90% at 72% 40%, #12142E 0%, #0A0A14 55%, #07070D 100%); }
.head { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tick { position: absolute; width: 18px; height: 18px; border: 0 solid var(--cyan); }
.tick.tl { left: 0; top: 0; border-width: 2px 0 0 2px; }
.tick.tr { right: 0; top: 0; border-width: 2px 2px 0 0; }
.tick.bl { left: 0; bottom: 0; border-width: 0 0 2px 2px; }
.tick.br { right: 0; bottom: 0; border-width: 0 2px 2px 0; }

.pitch { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: 560px; padding: 24px; max-width: 600px; pointer-events: none; }
.pitch a { pointer-events: auto; }
.product { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--cyan); margin-bottom: 14px; }
.product .ver { font-family: var(--mono); font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 8px; }
h1 { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 1.1rem + 3.4vw, 3.5rem); line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; }
.lede { margin-top: 18px; color: var(--soft); font-size: 17px; max-width: 40ch; }
.actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }

.button { display: inline-block; font-family: var(--display); font-weight: 600; font-size: 16px; text-decoration: none; color: var(--text); padding: 11px 20px; border: 1px solid var(--line-hi); background: var(--panel); }
.button:hover { background: var(--raised); color: var(--text); }
.button.primary { background: var(--cyan); color: var(--bg); border-color: var(--cyan); clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut))); padding-inline: 26px; }
.button.primary:hover { background: #9AF3FF; color: var(--bg); }

.status { position: absolute; top: 16px; right: 20px; z-index: 1; display: grid; justify-items: end; gap: 2px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.desk.urgent .status span:first-child { color: #FF8A7D; }
.talk { border-top: 1px solid var(--line); padding: 0 24px 20px; }
.scenes { display: flex; gap: 0; margin: 0 -24px 18px; padding-inline: 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.scenes button { font: 600 14px var(--display); color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px; cursor: pointer; white-space: nowrap; }
.scenes button:hover { color: var(--text); }
.scenes button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--cyan); }
.no-js .scenes { display: none; }
.no-js .talk { padding-top: 18px; }
.log { min-height: 168px; align-content: start; }
.side .item.none { color: var(--muted); }
.side .item.urgent { color: #FF8A7D; }
.side .item.urgent .dot { background: #FF4D3D; }
.log { display: grid; gap: 12px; }
.log .who { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.log .you { justify-self: end; text-align: right; }
.log .you p { display: inline-block; text-align: left; background: var(--raised); border: 1px solid var(--line); padding: 8px 12px; }
.log .it .who { color: var(--cyan); }
.log .it p { border-left: 2px solid #16404A; padding-left: 12px; max-width: 68ch; min-height: 1.6em; }
.answers { display: flex; gap: 8px; margin-top: 12px; }
.chipbtn { font-family: var(--display); font-weight: 600; font-size: 14px; padding: 7px 14px; border: 1px solid var(--cyan); color: var(--cyan); background: none; cursor: pointer; }
.chipbtn:hover { background: var(--raised); }
.chipbtn.quiet { border-color: var(--line-hi); color: var(--soft); }
.composer { margin-top: 16px; display: flex; justify-content: space-between; align-items: stretch; border: 1px solid var(--line-hi); background: var(--raised); color: var(--muted); }
.composer span { padding: 10px 14px; }
.composer .send { font-family: var(--display); font-weight: 600; background: var(--cyan); color: var(--bg); padding-inline: 22px; clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut)); }

.side { border-top: 1px solid var(--line); padding: 18px 24px 22px; font-size: 14px; }
.side h2 { font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--muted); margin: 20px 0 10px; }
.side h2:first-child { margin-top: 0; }
.side h2.needs { color: var(--magenta); }
.side .item { display: flex; gap: 10px; align-items: baseline; }
.dot { flex: none; width: 7px; height: 7px; background: var(--line-hi); display: inline-block; }
.dot.hot { background: var(--magenta); }
.topics li { position: relative; padding: 8px 0 8px 18px; }
.topics li::before { content: ""; position: absolute; left: 0; top: 16px; width: 7px; height: 7px; background: var(--line-hi); }
.topics li.news::before { background: var(--magenta); }
.topics li.here { background: var(--raised); margin-inline: -24px; padding-inline: 42px 24px; box-shadow: inset 2px 0 0 var(--cyan); }
.topics li.here::before { left: 24px; }
.topics b { display: block; font-family: var(--display); font-weight: 600; font-size: 15px; }
.topics span { color: var(--muted); font-size: 13px; }
.lately li { display: flex; gap: 12px; color: var(--soft); padding: 3px 0; }
.lately time { color: var(--muted); font-variant-numeric: tabular-nums; }

.note { margin-top: 12px; color: var(--muted); font-size: 13.5px; }

@media (min-width: 980px) {
  .desk { grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto auto; }
  .stage { grid-column: 1; grid-row: 1; }
  .talk { grid-column: 1; grid-row: 2; }
  .side { grid-column: 2; grid-row: 1 / span 2; border-top: 0; border-left: 1px solid var(--line); }
  .pitch { padding: 40px; }
}
@media (max-width: 759px) {
  .stage, .pitch { min-height: 620px; }
  .scenes { margin-inline: -16px; padding-inline: 4px; }
  .pitch { padding: 20px; }
  .talk, .side { padding-inline: 16px; }
  .topics li.here { margin-inline: -16px; padding-inline: 34px 16px; }
  .topics li.here::before { left: 16px; }
}

/* Sections */
.block { padding-block: 64px 0; }
.block > h2, .split h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.15; margin-bottom: 24px; }
h3 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; margin-bottom: 10px; }
.block p { color: var(--soft); max-width: 66ch; }
.block p + p { margin-top: 12px; }
.block .intro { margin-bottom: 24px; }

.does { border-top: 1px solid var(--line); }
.does > div { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.does dt { font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.does dd { color: var(--soft); max-width: 70ch; }
.does dt a { text-decoration: none; }
.does dt a:hover { text-decoration: underline; }
@media (min-width: 760px) { .does > div { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: baseline; } }

.split { display: grid; gap: 40px; }
@media (min-width: 980px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; } }

#gate { grid-template-columns: minmax(0, 1fr); gap: 32px; }
.facts { margin-top: 24px; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; } }
.facts li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--soft); }
.facts b { display: block; font-family: var(--display); font-weight: 600; color: var(--text); }
.block .warn { margin-top: 20px; padding: 12px 14px; background: var(--warn-bg); border: 1px solid var(--warn-line); border-left: 2px solid var(--magenta); color: var(--text); font-size: 15px; }

.flow { border: 1px solid var(--line); background: var(--panel); min-width: 0; }
.flow figcaption { border-top: 1px solid var(--line); padding: 10px 24px; color: var(--muted); font-size: 13.5px; }

.people { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.people li { border: 1px solid var(--line-hi); padding: 12px 14px; background: var(--panel); }
.people li:first-child { border-color: var(--cyan); }
.people b { display: block; font-family: var(--display); font-weight: 600; }
.people span { color: var(--muted); font-size: 13.5px; }
@media (max-width: 480px) { .people { grid-template-columns: 1fr; } }

/* Install */
.install { border: 1px solid var(--line); background: var(--panel); }
.tablist { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tablist button { font: 600 15px var(--display); color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 14px 20px; cursor: pointer; white-space: nowrap; }
.tablist button:hover { color: var(--text); }
.tablist button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--cyan); }
.tabpanel { padding: 24px; }
.tabpanel p + p { margin-top: 16px; }
.tabpanel .warn { max-width: 66ch; }
.install .fine { padding: 0 24px 20px; color: var(--muted); font-size: 13.5px; }
.cmd { position: relative; margin-top: 16px; border: 1px solid var(--line-hi); background: var(--bg); }
.cmd pre { padding: 16px 84px 16px 16px; overflow-x: auto; color: var(--text); line-height: 1.7; }
.copy { position: absolute; top: 8px; right: 8px; font: 600 13px var(--display); color: var(--soft); background: var(--raised); border: 1px solid var(--line-hi); padding: 5px 10px; cursor: pointer; }
.copy:hover { color: var(--text); }
.no-js .copy { display: none; }
.state { margin-top: 32px; }

/* Footer */
.foot { margin-top: 96px; padding-block: 28px 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot nav a { color: var(--soft); font-size: 14px; text-decoration: none; }
.foot nav a:hover { color: var(--text); text-decoration: underline; }


/* Page grid, progress, and the rails between sections */
body { background-image: linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px); background-size: 64px 64px; background-position: center top; }
.progress { position: fixed; z-index: 5; left: 0; top: 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--cyan), var(--magenta)); transform-origin: left; transform: scaleX(var(--p, 0)); }
.tele { position: absolute; right: 20px; bottom: 16px; z-index: 1; display: grid; justify-items: end; gap: 2px; font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: pre; }
@media (max-width: 759px) { .tele { display: none; } }

.rail { position: relative; grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; height: 44px; padding-bottom: 12px; margin-bottom: 32px; font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, var(--line-hi) 0 1px, transparent 1px 16px) left bottom / 100% 5px no-repeat; }
.split > .rail { margin-bottom: -8px; }
.rail .tag { color: var(--cyan); }
.rail .beam { position: absolute; left: 0; bottom: -1px; width: 100%; height: 1px; transform-origin: left; transform: scaleX(var(--p, 1));
  background: repeating-linear-gradient(90deg, var(--cyan) 0 10px, rgba(34,229,255,0.35) 10px 16px); background-size: 16px 1px; animation: flow 0.9s linear infinite; }
.rail .tip { position: absolute; bottom: -4px; left: calc(var(--p, 1) * 100%); width: 7px; height: 7px; margin-left: -3px; background: var(--magenta); box-shadow: 0 0 12px var(--magenta); }
@keyframes flow { to { background-position-x: 16px; } }

.rv { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 60ms); }
.rv.in { opacity: 1; transform: none; }
.does > div { position: relative; border-bottom-color: transparent; }
.does > div::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--line); transform-origin: left; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 60ms); }
.does > .rv:not(.in)::after { transform: scaleX(0); }
.does > div:hover dt { color: var(--cyan); }

/* The flow diagram */
.flow .scroll { overflow-x: auto; padding: 24px; }
.flow svg { display: block; width: 100%; min-width: 760px; height: auto; }
.flow .node rect { fill: var(--bg); stroke: var(--line-hi); }
.flow .node text { fill: var(--soft); font-family: var(--mono); font-size: 14px; text-anchor: middle; }
.flow .gate rect { stroke: var(--cyan); }
.flow .gate text { fill: var(--cyan); }
.flow .node.gate:nth-of-type(odd) rect, .flow .gate rect { animation: gate 2.4s ease-in-out infinite; }
.flow .wire { fill: none; stroke: var(--line-hi); stroke-width: 1.5; stroke-dasharray: 5 7; animation: wire 0.8s linear infinite; }
.flow .wire.hot { stroke: var(--cyan); }
.flow .wire.back { stroke: var(--magenta); }
.flow .wire.dim { stroke-dasharray: 2 6; animation-duration: 1.6s; }
.flow marker path { fill: var(--muted); }
@keyframes wire { to { stroke-dashoffset: -12; } }
@keyframes gate { 50% { stroke-width: 2.5; fill: #0A2630; } }
.flow .wire.dim { animation-name: wire8; }
@keyframes wire8 { to { stroke-dashoffset: -8; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rail .beam, .flow .wire, .flow .gate rect { animation: none; }
  .progress { display: none; }
}
