/*
 * Uplink for Mac: the site. Same design language as Lantern's site: the app's own tokens (ink and
 * paper, monochrome surfaces), colour only in the dither fields and the marks that mean something
 * (amber = waiting, red = error, green = done). UI mocks are set in Inter, as the app is.
 */

@font-face { font-family: 'Neue Montreal'; src: url('../fonts/ppneuemontreal-book.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Neue Montreal'; src: url('../fonts/ppneuemontreal-medium.otf') format('opentype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Neue Montreal'; src: url('../fonts/ppneuemontreal-bold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('../fonts/geist-mono-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #070708;
  --sheet: #0c0c0e;
  --panel: #121214;
  --panel-2: #18181b;
  --panel-3: #1f1f23;
  --fill-1: rgb(255 255 255 / 0.035);
  --fill-2: rgb(255 255 255 / 0.06);
  --fill-3: rgb(255 255 255 / 0.09);
  --fill-4: rgb(255 255 255 / 0.125);
  --line: rgb(255 255 255 / 0.06);
  --line-2: rgb(255 255 255 / 0.09);
  --line-3: rgb(255 255 255 / 0.15);
  --text-rgb: 242 241 238;
  --bg-rgb: 7 7 8;
  --sheet-rgb: 12 12 14;
  --panel-rgb: 18 18 20;
  --accent-hover: #fff;
  --mark-0: #e8ebee;
  --mark-1: #b1b5b9;
  --mark-2: #777b7f;
  --mark-3: #4e5255;
  --mark-4: #2f3133;
  --text: #f2f1ee;
  --text-2: #d6d4ce;
  --text-3: #a6a49e;
  --text-4: #85837c;
  --text-inverse: #0a0a0b;
  --amber: oklch(0.84 0.135 82);
  --red: oklch(0.71 0.175 24);
  --green: oklch(0.8 0.15 150);
  --amber-dim: oklch(0.84 0.135 82 / 0.12);
  --red-dim: oklch(0.71 0.175 24 / 0.14);
  --green-dim: oklch(0.8 0.15 150 / 0.12);
  --heart-k: #000;
  --heart-r: #fe0000;
  --heart-d: #9c0000;
  --heart-off: rgb(242 241 238 / 0.3);
  --focus: rgb(242 241 238 / 0.55);
  --shadow-pop: 0 18px 44px -14px rgb(0 0 0 / 0.8), 0 0 0 1px rgb(0 0 0 / 0.4);
  --shadow-app: 0 40px 120px -30px rgb(0 0 0 / 0.9), 0 0 0 1px rgb(255 255 255 / 0.07);
  --glass: rgb(14 14 16 / 0.72);
  --dither-50: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Cpath fill='%23f2f1ee' d='M0 0h1v1h-1zM2 0h1v1h-1zM1 1h1v1h-1zM3 1h1v1h-1zM0 2h1v1h-1zM2 2h1v1h-1zM1 3h1v1h-1zM3 3h1v1h-1z'/%3E%3C/svg%3E");
  --dither-25: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Cpath fill='%23f2f1ee' d='M0 0h1v1h-1zM2 0h1v1h-1zM0 2h1v1h-1zM2 2h1v1h-1z'/%3E%3C/svg%3E");
  --dither-12: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Cpath fill='%23f2f1ee' d='M0 0h1v1h-1zM2 2h1v1h-1z'/%3E%3C/svg%3E");
  /* The dither colour of the moment: the backdrop colour picked in the Appearance section. */
  --ink: hsl(244 100% 77%);
  --ink-hot: hsl(244 90% 90%);

  --font: 'Neue Montreal', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --d-1: 90ms;
  --d-2: 120ms;
  --d-3: 200ms;
  --d-4: 340ms;
  --r-md: 10px;
  --r-lg: 12px;
  --wrap: 1240px;
  --gutter: 32px;
  --nav-h: 64px;
  --cursor-hand: image-set(url('../img/cursor-hand.svg') 1x, url('../img/cursor-hand@2x.svg') 2x) 8 1, pointer;
}
:root[data-colour='ember'] { --ink: hsl(22 100% 68%); --ink-hot: hsl(28 100% 86%); }
:root[data-colour='mint'] { --ink: hsl(156 68% 66%); --ink-hot: hsl(156 60% 88%); }
:root[data-colour='mono'] { --ink: #b9b7b1; --ink-hot: #f2f1ee; }

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #e6e3dd;
  --sheet: #eeebe5;
  --panel: #f4f2ed;
  --panel-2: #f8f6f2;
  --panel-3: #fdfcfa;
  --fill-1: rgb(38 32 24 / 0.04);
  --fill-2: rgb(38 32 24 / 0.065);
  --fill-3: rgb(38 32 24 / 0.095);
  --fill-4: rgb(38 32 24 / 0.13);
  --line: rgb(38 32 24 / 0.085);
  --line-2: rgb(38 32 24 / 0.12);
  --line-3: rgb(38 32 24 / 0.19);
  --text-rgb: 28 27 25;
  --bg-rgb: 230 227 221;
  --sheet-rgb: 238 235 229;
  --panel-rgb: 244 242 237;
  --accent-hover: #34322e;
  --mark-0: #1f2022;
  --mark-1: #4b4e52;
  --mark-2: #7c7f84;
  --mark-3: #aaadb1;
  --mark-4: #cfd1d4;
  --text: #1c1b19;
  --text-2: #45433e;
  --text-3: #66635c;
  --text-4: #8f8b83;
  --text-inverse: #f4f2ee;
  --amber: oklch(0.64 0.15 72);
  --red: oklch(0.56 0.19 25);
  --green: oklch(0.56 0.14 150);
  --amber-dim: oklch(0.64 0.15 72 / 0.13);
  --red-dim: oklch(0.56 0.19 25 / 0.1);
  --green-dim: oklch(0.56 0.14 150 / 0.12);
  --heart-off: rgb(28 27 25 / 0.3);
  --focus: rgb(28 27 25 / 0.45);
  --shadow-pop: 0 18px 40px -16px rgb(60 45 25 / 0.32), 0 0 0 1px rgb(60 45 25 / 0.08);
  --shadow-app: 0 40px 100px -40px rgb(60 45 25 / 0.45), 0 0 0 1px rgb(60 45 25 / 0.1);
  --glass: rgb(244 242 237 / 0.78);
  --dither-50: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Cpath fill='%231c1b19' d='M0 0h1v1h-1zM2 0h1v1h-1zM1 1h1v1h-1zM3 1h1v1h-1zM0 2h1v1h-1zM2 2h1v1h-1zM1 3h1v1h-1zM3 3h1v1h-1z'/%3E%3C/svg%3E");
  --dither-25: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Cpath fill='%231c1b19' d='M0 0h1v1h-1zM2 0h1v1h-1zM0 2h1v1h-1zM2 2h1v1h-1z'/%3E%3C/svg%3E");
  --dither-12: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Cpath fill='%231c1b19' d='M0 0h1v1h-1zM2 2h1v1h-1z'/%3E%3C/svg%3E");
  --ink: hsl(244 45% 44%);
  --ink-hot: hsl(244 50% 70%);
}
:root[data-theme='light'][data-colour='ember'] { --ink: hsl(20 70% 42%); --ink-hot: hsl(24 80% 66%); }
:root[data-theme='light'][data-colour='mint'] { --ink: hsl(160 60% 30%); --ink-hot: hsl(158 45% 58%); }
:root[data-theme='light'][data-colour='mono'] { --ink: #3a3834; --ink-hot: #8f8b83; }

/* ── base ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scroll-padding-top: var(--nav-h); overflow-anchor: none; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow-x: clip;
  transition: background-color var(--d-4) var(--ease), color var(--d-4) var(--ease);
}
h1, h2, h3, p, ol, ul, figure, fieldset { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
a, button, [role='radio'], [role='tab'], [role='option'], summary, label { cursor: var(--cursor-hand); }
img, svg { display: block; }
.ic { width: 16px; height: 16px; fill: currentColor; flex: none; }
::selection { background: rgb(var(--text-rgb) / 0.2); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip { position: fixed; left: 16px; top: 12px; z-index: 100; padding: 10px 14px; border-radius: var(--r-md); background: var(--text); color: var(--text-inverse); font-weight: 500; transform: translateY(-160%); }
.skip:focus-visible { transform: none; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

/* ── type ── */
.display { font-weight: 500; font-size: clamp(46px, 6.6vw, 96px); line-height: 0.94; letter-spacing: -0.026em; text-wrap: balance; }
.h2 { font-weight: 500; font-size: clamp(36px, 4.6vw, 64px); line-height: 0.98; letter-spacing: -0.037em; text-wrap: balance; }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.45; color: var(--text-2); max-width: 36em; letter-spacing: -0.005em; -webkit-font-smoothing: auto; }
.body { font-size: 18px; line-height: 1.5; color: var(--text-2); max-width: 32em; }
.body.dim { color: var(--text-3); font-size: 16px; }
.meta { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-3); -webkit-font-smoothing: auto; }
.meta .dot { width: 3px; height: 3px; background: currentColor; opacity: 0.6; }
.center { justify-content: center; text-align: center; margin-inline: auto; }
.link { background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size var(--d-4) var(--ease-out); color: var(--text); padding-bottom: 1px; }
.link:hover { background-size: 100% 1px; }

/* ── the Uplink mark (built in JS from the app's 11 tiles) ── */
.mark { display: inline-block; width: 22px; height: 22px; flex: none; }
.mark svg { width: 100%; height: 100%; overflow: visible; }
.mark-lg { width: 64px; height: 64px; margin-bottom: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; justify-self: start; padding: 8px 0; color: var(--text); }
.wordmark { height: 22px; width: auto; color: var(--text); }
.brand:hover .mark rect { animation: tile-wave 1.2s var(--ease) infinite; animation-delay: calc((4 - var(--t, 0)) * 80ms); }
.brand .mark rect[data-t='1'] { --t: 1; } .brand .mark rect[data-t='2'] { --t: 2; } .brand .mark rect[data-t='3'] { --t: 3; }
@keyframes tile-wave { 0%, 100% { opacity: 1; } 40% { opacity: 0.2; } }

/* ── nav ── */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); transition: background-color var(--d-4) var(--ease), box-shadow var(--d-4); }
.nav[data-scrolled] { background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 1px 0 var(--line); }
.nav-row { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 12px; border-radius: var(--r-md); font-size: 16px; font-weight: 500; transition: background-color var(--d-2); }
.nav-links a:hover { background: var(--fill-2); }
.nav-end { justify-self: end; display: flex; align-items: center; gap: 12px; }
.theme-switch { position: relative; display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--fill-2); }
.theme-switch-pill { position: absolute; top: 2px; left: 2px; width: 34px; height: 32px; border-radius: 999px; transition: transform var(--d-4) var(--ease-out); }
:root[data-theme='dark'] .theme-switch-pill { transform: translateX(36px); }
.theme-switch-btn { position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 32px; border-radius: 999px; color: var(--text-3); transition: color var(--d-2), scale var(--d-1) var(--ease-out); }
.theme-switch-btn .ic { transition: transform var(--d-4) var(--ease-out); }
.theme-switch-btn:hover, .theme-switch-btn[aria-checked='true'] { color: var(--text); }
.theme-switch-btn:hover .ic { transform: rotate(-14deg) scale(1.06); }
.theme-switch-btn:active { scale: 0.92; }
.dither-sel { background-color: var(--fill-4); overflow: hidden; }
.dither-sel::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--dither-25) 0 0 / 4px 4px; image-rendering: pixelated; opacity: 0.1; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 26px; border-radius: var(--r-md);
  font-size: 15.5px; font-weight: 500; letter-spacing: -0.005em; white-space: nowrap;
  transition: background-color var(--d-2) var(--ease), color var(--d-2), box-shadow var(--d-2), transform var(--d-1) var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; pointer-events: none; }
.btn-sm { height: 38px; padding: 0 18px; font-size: 14.5px; }
.btn-primary { background: var(--text); color: var(--text-inverse); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--fill-3); box-shadow: inset 0 0 0 1px var(--line-3); }
/* Dither on hover, as on Lantern's site: cells built by ditherHover() in main.js. */
.btn-fx { position: relative; overflow: hidden; isolation: isolate; --fx-a: 0.16; }
.btn-fx .fx-label, .btn-fx .dl-main, .btn-fx .dl-tag { position: relative; z-index: 1; }
.btn-fx .fx { position: absolute; inset: 0; z-index: 0; display: grid; gap: 1px; align-content: center; justify-content: start; padding-left: 1px; color: var(--text-inverse); pointer-events: none; opacity: 0; transition: opacity 220ms var(--ease); }
.btn-fx:hover .fx, .btn-fx:focus-visible .fx { opacity: 1; }
.btn-fx .fx i { width: 2px; height: 2px; background: currentColor; opacity: 0; }
.btn-fx .fx.go i { animation: fx-in 220ms linear both; animation-delay: calc(var(--x) * 5ms); }
.btn-fx .fx.go i.blink { animation: fx-in 220ms linear both, fx-blink var(--bdur) steps(1) infinite; animation-delay: calc(var(--x) * 5ms), var(--bd); }
@keyframes fx-in { 0% { opacity: 0; } 35% { opacity: 0.32; } 100% { opacity: calc(var(--on) * var(--fx-a)); } }
@keyframes fx-blink { 0%, 100% { opacity: var(--fx-a); } 50% { opacity: 0; } 75% { opacity: calc(var(--fx-a) * 1.5); } }
.dl { display: inline-flex; align-items: stretch; height: 52px; border-radius: var(--r-lg); background: var(--text); color: var(--text-inverse); overflow: hidden; position: relative; transition: background-color var(--d-2) var(--ease), transform var(--d-2) var(--ease-out); }
.dl:hover { background: var(--accent-hover); transform: translateY(-1px); }
.dl:active { transform: scale(0.98); }
.dl-main { display: inline-flex; align-items: center; gap: 10px; padding: 0 18px 0 16px; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.dl-main .ic { width: 18px; height: 18px; transition: transform var(--d-4) var(--ease-out); }
.dl:hover .dl-main .ic { transform: translateY(2px); }
.dl-tag { display: inline-flex; align-items: center; padding: 0 16px; font-size: 14px; opacity: 0.62; box-shadow: inset 1px 0 0 rgb(var(--bg-rgb) / 0.16); }
.dl-lg { height: 60px; }
.dl-lg .dl-main { font-size: 17px; padding: 0 22px 0 20px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cta-row .btn { height: 52px; border-radius: var(--r-lg); }

/* ── sections ── */
.sec { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 56px) 0 96px; }
.sec-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: end; margin-bottom: 56px; }
.sec-intro .h2 { max-width: 11em; }
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(48px, 6vw, 96px); align-items: center; }
.split-rev .split-copy { order: 2; }
.split-copy { display: flex; flex-direction: column; gap: 24px; }
.split-copy .h2 { max-width: 10em; }
.points { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; max-width: 32em; }
.points li { display: grid; grid-template-columns: 10px 1fr; gap: 16px; font-size: 16.5px; line-height: 1.5; color: var(--text-3); }
.points strong { font-weight: 500; color: var(--text); }
.pt { width: 8px; height: 8px; margin-top: 0.55em; background: var(--ink); box-shadow: 4px 4px 0 -2px var(--ink); }

/* ── hero ── */
.hero { position: relative; padding-top: calc(var(--nav-h) + clamp(56px, 10vh, 120px)); overflow: clip; }
.hero-field { position: absolute; inset: 0 0 auto; height: min(1150px, 130vh); }
.hero-field canvas, .close-field canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.hero-veil { position: absolute; inset: 0 0 auto; height: min(1150px, 130vh); pointer-events: none;
  background:
    linear-gradient(to bottom, rgb(var(--bg-rgb) / 0.6), transparent 140px),
    radial-gradient(70% 60% at 16% 26%, rgb(var(--bg-rgb) / 0.9) 0%, rgb(var(--bg-rgb) / 0.55) 45%, transparent 75%),
    linear-gradient(to bottom, transparent 55%, var(--bg)); }
.hero-copy { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.hero-copy .display { max-width: 10.5em; }
.hero-copy .cta-row { margin-top: 8px; }
.hero-app { position: relative; margin-top: clamp(64px, 10vh, 112px); padding-bottom: 120px; }
.hero-app .scaler { position: relative; z-index: 1; }
[data-enter] { animation: rise 900ms var(--ease-out) both; }
.hero-app[data-enter] { animation-delay: 160ms; animation-duration: 1200ms; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ── scaled UI mocks ── */
.scaler { position: relative; width: 100%; }
.scaler > * { position: absolute; left: 0; top: 0; transform-origin: 0 0; }

/* ══════════ the app window (Uplink, at its own size: 1100 x 700, Inter, the app's tokens) ══════════ */
.app { width: 1100px; height: 700px; border-radius: 14px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow-app); font-family: var(--ui); font-size: 13px; line-height: 1.35; color: var(--text); container-type: inline-size; isolation: isolate; }
:root[data-theme='light'] .app { background: var(--sheet); }
.app .ic { width: 15px; height: 15px; }
.app .dim { color: var(--text-3); }
.app .faint { color: var(--text-4); margin-left: 6px; }
.app-field { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; transition: opacity 400ms var(--ease); }
.app:has(.scr-browse.is-on) .app-field { opacity: 0; }
.scr { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 280ms var(--ease), visibility 0s 280ms; }
.scr.is-on { opacity: 1; visibility: visible; transition: opacity 280ms var(--ease); }
.bar { position: relative; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 20px; }
.bar-brand { display: flex; align-items: center; gap: 9px; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.bar-brand .mark { width: 17px; height: 17px; }
.bar-end { display: flex; align-items: center; gap: 18px; }
.bar-live { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 16px 0 12px; border-radius: 999px; background: rgb(var(--sheet-rgb) / 0.8); box-shadow: inset 0 0 0 1px var(--line-2); animation: pop-in 420ms var(--ease-out); }
.bar-live b { font-weight: 560; }
.bar-live span:last-child { color: var(--text-3); }
@keyframes pop-in { from { opacity: 0; transform: translate(-50%, -6px) scale(0.96); } }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-dim); flex: none; }
.a-btn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 8px; font-weight: 550; font-size: 13px; white-space: nowrap; transition: background-color 160ms, transform 120ms var(--ease-out), box-shadow 160ms; }
.a-solid { background: var(--text); color: var(--text-inverse); }
.a-ghost { background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.a-sm { height: 28px; }
.a-btn.hover { transform: translateY(-1px); box-shadow: 0 0 0 3px rgb(var(--text-rgb) / 0.14); }
.a-btn kbd { font: 500 11px/1 var(--ui); padding: 3px 5px; border-radius: 4px; background: rgb(var(--bg-rgb) / 0.1); color: inherit; opacity: 0.7; }
.a-settings { position: absolute; right: 14px; bottom: 14px; background: rgb(var(--panel-rgb) / 0.9); box-shadow: inset 0 0 0 1px var(--line-2); }
.dash { position: absolute; left: 92px; right: 92px; top: 82px; }
.a-h { display: flex; align-items: baseline; gap: 8px; margin: 0 0 14px; font-size: 19px; font-weight: 640; letter-spacing: -0.015em; }
.a-h > span:first-of-type { font-size: 13px; font-weight: 500; color: var(--text-3); }
.a-link { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.heart { display: inline-block; width: 20px; height: 20px; flex: none; }
.heart svg { width: 100%; height: 100%; overflow: visible; }
.fav-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 36px; }
.fav { display: flex; flex-direction: column; gap: 4px; height: 134px; padding: 16px; border-radius: 12px; background: rgb(var(--panel-rgb) / 0.84); box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color 200ms, box-shadow 200ms, transform 200ms var(--ease-out); }
.fav .heart { width: 22px; height: 22px; margin-bottom: 16px; }
.fav b { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.fav-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; }
.fav .when { margin-left: auto; }
.fav-foot { white-space: nowrap; }
.fav-foot .wait:not([hidden]) + .when { display: none; }
.fav.hover { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-3); transform: translateY(-2px); }
.proto { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px 0 7px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 12px; font-weight: 500; color: var(--text-3); }
.proto .ic { width: 12px; height: 12px; }
.proto.warn { color: var(--amber); }
.wait { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.wait i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.hist { padding: 4px; border-radius: 12px; background: rgb(var(--panel-rgb) / 0.84); box-shadow: inset 0 0 0 1px var(--line-2); }
.hrow { display: grid; grid-template-columns: 20px auto 1fr auto 100px; gap: 12px; align-items: center; height: 40px; padding: 0 12px; border-radius: 8px; }
.hrow + .hrow { box-shadow: 0 -1px 0 var(--line); }
.hrow .heart { width: 18px; height: 18px; }
.hrow b { font-weight: 560; }
.hrow .when { text-align: right; }
.connecting { position: absolute; left: 50%; top: 50%; width: 300px; padding: 18px 20px 14px; border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--line-2); opacity: 0; transform: translate(-50%, -46%) scale(0.97); transition: opacity 240ms var(--ease), transform 320ms var(--ease-out); pointer-events: none; }
.connecting.on { opacity: 1; transform: translate(-50%, -50%); }
.cn-title { font-size: 14px; font-weight: 620; margin-bottom: 10px; }
.cn-list li { position: relative; display: flex; align-items: center; gap: 10px; height: 27px; color: var(--text-4); transition: color 200ms; }
.cn-list li::before { content: ''; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-3); flex: none; transition: background-color 200ms, box-shadow 200ms; }
.cn-list li.ok { color: var(--text); }
.cn-list li.ok::before { background: var(--green); box-shadow: none; }
.cn-list li.ok::after { content: ''; position: absolute; left: 4.5px; top: 9px; width: 5px; height: 3px; border: solid var(--bg); border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg); }
/* Browser */
.bar-crumbs { display: flex; align-items: center; gap: 10px; }
.bar-crumbs .dim, .bar-end .dim { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; font-size: 13.5px; }
.bar-crumbs b { font-weight: 600; font-size: 13.5px; }
.bar-crumbs .sep { width: 1px; height: 18px; background: var(--line-3); margin: 0 4px; }
.bar-crumbs .heart { width: 17px; height: 17px; margin: 0 4px; }
.b-head { display: flex; align-items: center; gap: 14px; height: 78px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.b-where { display: none; align-items: center; gap: 14px; animation: step-in 320ms var(--ease-out); }
.scr-browse[data-at='home'] [data-where='home'], .scr-browse[data-at='public'] [data-where='public'] { display: flex; }
@keyframes step-in { from { opacity: 0; transform: translateX(-6px); } }
.home-badge { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--text); color: var(--text-inverse); }
.home-badge [data-home] { width: 26px; height: 26px; }
.home-badge svg { width: 100%; height: 100%; overflow: visible; }
.b-title { font-size: 23px; font-weight: 660; letter-spacing: -0.02em; line-height: 1.1; }
.b-sub { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 13px; }
.b-sub .ic { width: 13px; height: 13px; }
.b-sub .chev { width: 11px; height: 11px; opacity: 0.6; }
.back-pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14px; font-weight: 540; }
.b-tools { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.linkbar { display: none; align-items: center; gap: 9px; height: 46px; margin: 0 18px; border-bottom: 1px solid var(--line); animation: step-in 360ms var(--ease-out); }
.scr-browse[data-at='public'] .linkbar { display: flex; }
.linkbar [data-sync-btn] { margin-left: auto; }
.linkbar [data-link-note] { margin-left: 8px; }
.link-dash { position: relative; width: 30px; height: 2px; background: radial-gradient(circle, var(--text-2) 1px, transparent 1.3px) 0 50% / 5px 2px repeat-x; animation: march 900ms linear infinite; }
.link-dash::after { content: ''; position: absolute; right: -3px; top: -2.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--text); }
@keyframes march { to { background-position: 5px 50%; } }
.tbl-head, .trow { display: grid; grid-template-columns: 22px minmax(0, 1fr) 80px 170px 140px; gap: 12px; align-items: center; }
.tbl-head { height: 38px; padding: 0 26px; font-size: 12.5px; color: var(--text-3); border-bottom: 1px solid var(--line); }
.tbl-head > span:first-child { grid-column: span 2; display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.tbl-head > span:first-child .ic { width: 11px; height: 11px; }
.tbl-head > span:nth-child(2) { text-align: right; }
.tbl { display: none; padding: 6px 8px; }
.scr-browse[data-at='home'] [data-tbl='home'], .scr-browse[data-at='public'] [data-tbl='public'] { display: block; animation: step-in 320ms var(--ease-out); }
.trow { height: 34px; padding: 0 18px; border-radius: 8px; font-size: 13.5px; transition: background-color 160ms; }
.trow > span:nth-child(3) { text-align: right; }
.trow.hover { background: var(--fill-2); }
.ic.fold { color: var(--text-3); }
.scrim { position: absolute; inset: 0; background: rgb(0 0 0 / 0.5); opacity: 0; transition: opacity 260ms var(--ease); pointer-events: none; }
:root[data-theme='light'] .scrim { background: rgb(60 45 25 / 0.2); }
.scrim.on { opacity: 1; }
.sheet { position: absolute; left: 50%; top: 50%; width: 486px; padding: 22px; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--line-2); opacity: 0; transform: translate(-50%, -47%) scale(0.98); transition: opacity 240ms var(--ease), transform 340ms var(--ease-out); pointer-events: none; }
.sheet.on { opacity: 1; transform: translate(-50%, -50%); }
.sh-title { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 630; letter-spacing: -0.01em; }
.sh-sub { margin-top: 4px; }
.sh-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 20px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-2); }
.stat b { display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.sw { display: inline-block; width: 10px; height: 10px; flex: none; border-radius: 1px; }
.sw-new { background: var(--text); }
.sw-chg { background: var(--dither-50) 0 0 / 4px 4px; image-rendering: pixelated; box-shadow: inset 0 0 0 1px rgb(var(--text-rgb) / 0.2); }
.sw-same { background: var(--dither-12) 0 0 / 4px 4px; image-rendering: pixelated; box-shadow: inset 0 0 0 1px rgb(var(--text-rgb) / 0.2); }
.sh-q { font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.radio { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 9px; }
.radio i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-3); }
.radio span { margin-left: auto; font-size: 12.5px; }
.radio.is-on { background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.radio.is-on i { box-shadow: inset 0 0 0 4px var(--text); background: var(--bg); }
.sh-foot { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.sh-foot > span:first-child { margin-right: auto; font-size: 12.5px; }
.tray { position: absolute; left: 50%; bottom: 20px; width: 520px; padding: 13px 16px 14px; border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--line-2); opacity: 0; transform: translate(-50%, 24px); transition: opacity 260ms var(--ease), transform 380ms var(--ease-out); }
.tray.on { opacity: 1; transform: translate(-50%, 0); }
.tray-row { display: flex; align-items: center; gap: 10px; }
.tray-row b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.tray-end { margin-left: auto; display: flex; gap: 14px; }
.tray-ic { display: grid; place-items: center; width: 16px; height: 16px; flex: none; }
.tray-ic:empty::before { content: ''; width: 12px; height: 12px; background: var(--dither-50) 0 0 / 4px 4px; image-rendering: pixelated; animation: flick 0.6s steps(2) infinite; }
.tray-ic .ic { width: 17px; height: 17px; color: var(--green); }
@keyframes flick { 50% { background-position: 1px 0; } }
.tray-hiccup { display: flex; align-items: center; gap: 8px; max-height: 0; overflow: hidden; color: var(--text-2); font-size: 12.5px; transition: max-height 300ms var(--ease-out), margin 300ms var(--ease-out); }
.tray-hiccup .ic { color: var(--amber); width: 14px; height: 14px; }
.tray-hiccup b { font-weight: 600; color: var(--text); }
.tray-hiccup.on { max-height: 30px; margin-top: 8px; }
.pixel-meter { display: block; width: 100%; height: 6px; margin-top: 11px; color: var(--text); image-rendering: pixelated; }
.pixel-meter.big { height: 9px; }
.pixel-meter.is-failed { color: var(--red); }
.cursor { position: absolute; left: 0; top: 0; z-index: 9; width: 22px; height: 22px; pointer-events: none; transition: transform 700ms var(--ease-out), opacity 300ms; opacity: 0; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.35)); }
.cursor svg { width: 100%; height: 100%; fill: var(--text); stroke: var(--bg); stroke-width: 1.4px; }
.cursor.on { opacity: 1; }
.cursor.down svg { transform: scale(0.86); transform-origin: 5px 3px; transition: transform 90ms; }
.click-ring { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgb(var(--text-rgb) / 0.6); animation: ring-out 520ms var(--ease-out) forwards; pointer-events: none; z-index: 8; }
@keyframes ring-out { from { transform: scale(0.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
/* The phone layout of the window: narrower, the same parts. */
@container (max-width: 800px) {
  .dash { left: 28px; right: 28px; top: 74px; }
  .hrow { grid-template-columns: 20px auto 1fr auto 86px; }
  .hrow > span.dim:not(.when) { visibility: hidden; }
  .fav > span.dim { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fav .wait { display: none; }
  .tbl-head, .trow { grid-template-columns: 22px minmax(0, 1fr) 70px 130px; }
  .tbl-head .k, .trow .k { display: none; }
  .b-tools > .ic, .b-tools .a-ghost { display: none; }
  .linkbar [data-link-note] { display: none; }
  .bar-crumbs .proto, .bar-crumbs > .ic { display: none; }
  .a-settings { display: none; }
}

/* ── the UI cards on the page share the app's type ── */
.review, .errs, .xfer, .card-vis, .appearance { font-family: var(--ui); }
.panel-card { border-radius: 20px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 80px -40px rgb(0 0 0 / 0.6); }

/* ── download ── */
.close { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: clip; padding: calc(var(--nav-h) + 40px) 0 80px; }
.close-field { position: absolute; inset: 0; }
.close-veil { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(50% 48% at 50% 50%, rgb(var(--bg-rgb) / 0.82), rgb(var(--bg-rgb) / 0.25) 72%, transparent), linear-gradient(to bottom, var(--bg), transparent 26%); }
.close-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 26px; }
.close-inner .display { max-width: 10em; }
.close-inner .lead { text-align: center; }
/* ── footer ── */
.foot { border-top: 1px solid var(--line); padding: 36px 0 44px; }
.foot-row { display: flex; justify-content: space-between; gap: 40px; align-items: flex-start; }
.foot-start { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.foot-brand { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--text-2); }
.foot-legal { max-width: 30em; font-size: 13px; line-height: 1.55; color: var(--text-4); text-align: right; }
.support-btn { display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 16px 0 13px; border-radius: 999px; font-size: 14.5px; font-weight: 500; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color var(--d-2), box-shadow var(--d-2), transform var(--d-1) var(--ease-out); }
.support-btn:hover { background: var(--fill-3); box-shadow: inset 0 0 0 1px var(--line-3); }
.support-btn:active { transform: scale(0.97); }
.support-btn .ic { color: var(--text-2); }
.support-btn .arrow { width: 13px; height: 13px; transition: translate var(--d-3) var(--ease-out); }
.support-btn:hover .arrow { translate: 2px -2px; }

/* ── responsive ── */
@media (max-width: 1100px) {
  .split, .sec-intro, .errs { grid-template-columns: 1fr; }
  .split-rev .split-copy { order: 0; }
  .sec-intro { gap: 20px; align-items: start; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .nav-links { display: none; }
  .nav-row { grid-template-columns: 1fr auto; }
  .setup { grid-template-columns: 1fr; max-width: 26rem; gap: 26px; }
  .setup::before { left: 17px; right: auto; top: 18px; bottom: 18px; width: 2px; height: auto; background: radial-gradient(circle, rgb(var(--text-rgb) / 0.35) 1px, transparent 1.2px) 50% 0 / 2px 8px repeat-y; }
  .su { display: grid; grid-template-columns: 36px 1fr; column-gap: 18px; row-gap: 4px; align-items: center; text-align: left; justify-items: start; }
  .su-num { grid-row: span 2; margin: 0; align-self: start; }
  .su-dl .dl { margin: 0; }
  .foot-row { flex-direction: column; }
  .foot-legal { text-align: left; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --nav-h: 58px; }
  body { font-size: 16px; }
  .hero-copy { gap: 22px; }
  .cta-row { width: 100%; }
  .cta-row .dl, .cta-row .btn { width: 100%; }
  .dl-main { flex: 1; justify-content: center; }
  .nav-end .btn { display: none; }
  .theme-switch-btn, .theme-switch-pill { width: 40px; height: 40px; }
  :root[data-theme='dark'] .theme-switch-pill { transform: translateX(42px); }
  .meta { flex-wrap: wrap; row-gap: 4px; }
  .steps { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1) 16px; padding: 4px var(--gutter) 12px; }
  .steps::-webkit-scrollbar { display: none; }
  .step { flex: none; height: 44px; font-size: 14.5px; }
  .hero-app { margin-top: 48px; padding-bottom: 72px; }
  .cards { grid-template-columns: 1fr; }
  .review, .xfer, .err-card, .errs-log { padding: 18px; }
  .rv-stat b { font-size: 24px; }
  .rv-list li { grid-template-columns: 10px minmax(0, 1fr) 56px 56px; }
  .rv-why { display: none; }
  .rv-foot { flex-wrap: wrap; }
  .rv-go { width: 100%; }
  .err-act, .err-tech { padding-left: 0; }
  .err-raw code { font-size: 13px; }
  .xf-list li { grid-template-columns: 16px minmax(0, 1fr) 60px 70px; }
  .xf-controls, .xf-btns { width: 100%; }
  .xf-btns .btn { flex: 1; }
  .ap-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .ap-cards, .ap-rows { margin-inline: 0; }
  .seg button { height: 40px; }
  .link { display: inline-block; min-height: 44px; line-height: 44px; }
  .foot-brand { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
