:root {
  --bg: #1b2735;
  --panel: #2a3b4e;
  --panel-2: #223142;
  --text: #f4f7fa;
  --muted: #9fb1c4;
  --line: #34475c;
  --red: #e5565b;
  --max: 1080px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
code, kbd { font: 0.9em ui-monospace, Consolas, monospace; background: var(--panel); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); }

.nav {
  position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 12px max(20px, calc((100% - var(--max)) / 2)); background: rgba(27,39,53,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.nav nav { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 15px; }
.nav nav a:hover { color: var(--text); }

.btn {
  display: inline-block; background: var(--red); color: #fff; font-weight: 600; padding: 12px 22px; border-radius: 10px;
  transition: filter .12s;
}
.btn:hover { filter: brightness(1.1); color: #fff; }
.btn-small { padding: 7px 14px; font-size: 14px; color: #fff !important; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); filter: none; color: var(--text); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.hero { text-align: center; padding: 88px 20px 20px; max-width: 800px; margin: 0 auto; }
.eyebrow { color: var(--red); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; margin: 0 0 16px; }
h1 { font-size: clamp(40px, 7vw, 68px); line-height: 1.08; margin: 0 0 20px; letter-spacing: -.02em; }
.accent { color: var(--red); }
.lead { color: var(--muted); font-size: 19px; max-width: 580px; margin: 0 auto 10px; text-wrap: balance; }
.lead-sub { color: var(--muted); font-size: 15px; letter-spacing: .02em; opacity: .85; margin: 0 auto 32px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.demo-wrap { max-width: 920px; margin: 14px auto 0; padding: 0 20px; }
.demo {
  position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,.45); background: #f3f4f6; touch-action: none; user-select: none;
}
.page { position: absolute; inset: 0; color: #111827; display: flex; flex-direction: column; }
.page-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #e5e7eb; font-size: 12px; }
.page-bar i { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.page-bar b { font-weight: 500; margin-left: 10px; background: #fff; border-radius: 6px; padding: 2px 12px; color: #6b7280; }
.page-body { flex: 1; display: flex; min-height: 0; overflow: hidden; }
.scroller { display: flex; align-items: flex-start; width: 100%; min-height: 100%; will-change: transform; }
.scroller > aside { align-self: stretch; }
.scroller .grid { flex: 1; }
.grid > * { flex-shrink: 0; }
.page aside { width: 14%; background: #fff; border-right: 1px solid #e5e7eb; padding: 16px 12px; display: flex; flex-direction: column; gap: 12px; }
.page aside .w { height: 10px; border-radius: 5px; background: #d1d5db; }
.grid { flex: 1; padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.grid h3 { margin: 0; font-size: clamp(13px, 2vw, 18px); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card { background: #fff; border-radius: 10px; padding: 10px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.08); display: flex; flex-direction: column; line-height: 1.3; }
.card small { color: #6b7280; font-size: clamp(9px, 1.4vw, 12px); }
.card strong { font-size: clamp(14px, 2.6vw, 26px); }
.card em { font-style: normal; font-size: clamp(9px, 1.4vw, 12px); font-weight: 600; }
.up { color: #16a34a; } .dn { color: #dc2626; }
.chart { flex: none; height: clamp(80px, 17vw, 150px); background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.chart svg { width: 100%; height: 100%; display: block; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.rows span { height: 10px; border-radius: 5px; background: #d1d5db; }
.rows span:nth-child(2) { width: 80%; } .rows span:nth-child(3) { width: 55%; }

.blur { position: absolute; background: rgba(36,52,71,.12); pointer-events: none; }
/* Same look as the extension: a white edge with dark outlines, and red corner brackets just outside it. */
.hole { position: absolute; border: 1.5px solid rgba(255,255,255,.95); border-radius: 2px; pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,.55), inset 0 0 0 1px rgba(0,0,0,.35); }
.hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: rgba(42,59,78,.94); color: var(--text);
  padding: 5px 14px; border-radius: 999px; font-size: 13px; pointer-events: none; transition: opacity .12s;
}
.hint.hide { opacity: 0; }
.slider { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 16px; color: var(--muted); font-size: 14px; }
.slider input { width: 200px; accent-color: var(--red); }
.slider output { width: 40px; color: var(--text); font-variant-numeric: tabular-nums; }

.section { max-width: var(--max); margin: 0 auto; padding: 96px 20px 0; }
.section.alt { background: none; }
h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; margin: 0 0 36px; letter-spacing: -.01em; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.features article { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.features h3 { margin: 12px 0 6px; font-size: 20px; }
.features p { margin: 0; color: var(--muted); font-size: 15px; }
.n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--red); font-weight: 700; font-size: 15px; }

.uses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 32px; }
.uses li { color: var(--muted); border-left: 3px solid var(--red); padding-left: 16px; }
.uses b { display: block; color: var(--text); font-size: 18px; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.facts strong { display: block; font-size: 18px; margin-bottom: 4px; }
.facts span { color: var(--muted); font-size: 15px; }

.get { text-align: center; padding-bottom: 96px; }
.get img { margin-bottom: 12px; }
.get h2 { margin-bottom: 12px; }
.get p { color: var(--muted); margin: 0 0 28px; }

footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 24px max(20px, calc((100% - var(--max)) / 2)); color: var(--muted); font-size: 14px; }

@media (max-width: 600px) {
  .nav nav a:not(.btn) { display: none; }
  .hero { padding-top: 56px; }
  .page aside { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .hint, .btn { transition: none; } }

.controls { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 16px; }
.controls .slider { margin-top: 0; }
.controls .btn-small { padding: 6px 16px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; }
.zoom { position: absolute; inset: 0; background: rgba(27,39,53,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: default; }
.zoom[hidden] { display: none; }
.zoom-frame { position: absolute; background: #f3f4f6; box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 20px 60px rgba(0,0,0,.5); cursor: none; }
.zoom-inner { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.zoom-frame { overflow: visible; }
.zoom-clip { position: absolute; inset: 0; overflow: hidden; }
.dot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 0 12px 4px rgba(229,86,91,.65); pointer-events: none; display: none; }
.zoom-x { position: absolute; right: 0; top: -34px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(42,59,78,.95); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }

.tbl { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.08); overflow: hidden; }
.tbl > div { display: grid; grid-template-columns: 2fr 1fr 1fr; padding: 8px 14px; font-size: clamp(10px, 1.5vw, 13px); border-top: 1px solid #eef0f3; }
.tbl > .th { border-top: 0; color: #6b7280; font-weight: 600; }
.controls .btn-small[aria-pressed='true'] { background: rgba(229,86,91,.18); border-color: var(--red); }

.brand .tag { color: var(--muted); font-weight: 500; font-size: 14px; padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--line); }
@media (max-width: 720px) { .brand .tag { display: none; } }

.demo.selecting { cursor: crosshair; }
.controls button:disabled, .controls input:disabled { opacity: .4; cursor: default; }

/* Waitlist */
.wl { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 520px; margin: 0 auto; }
.wl input[type=email] { flex: 1 1 260px; min-width: 0; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; font: inherit; }
.wl input[type=email]::placeholder { color: var(--muted); }
.wl input[type=email]:focus-visible { border-color: var(--red); }
.wl .btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.wl .btn:disabled { opacity: .6; cursor: default; }
.wl .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl-msg { flex-basis: 100%; margin: 4px 0 0; min-height: 1.5em; font-size: 14px; color: var(--muted); }
.wl-msg.ok { color: #7fd6a4; }
.wl-msg.err { color: #ff9a9d; }
.cta-sub { margin: 26px 0 0; }
.cta-sub a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--text); background: rgba(229,86,91,.12); border: 1px solid rgba(229,86,91,.55); transition: background .15s, border-color .15s; }
.cta-sub a:hover { background: rgba(229,86,91,.24); border-color: var(--red); }
.cta-arrow { display: inline-block; color: var(--red); animation: cta-bob 1.8s ease-in-out infinite; }
@keyframes cta-bob { 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .cta-arrow { animation: none; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Privacy policy page */
.doc { max-width: 720px; margin: 0 auto; padding: 72px 20px 24px; }
.doc h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 8px; }
.doc h2 { font-size: 22px; margin: 40px 0 12px; letter-spacing: 0; }
.doc p, .doc li { color: var(--muted); font-size: 16px; }
.doc strong { color: var(--text); }
.doc ul { padding-left: 20px; display: grid; gap: 10px; }
.doc a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.doc a:hover { color: var(--red); }
.doc .updated { font-size: 14px; margin: 0 0 28px; }
.doc .lead-doc { color: var(--text); font-size: 19px; }
footer a { text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: var(--text); }
/* Four use cases: one row on wide screens, a 2x2 grid on tablets, one column on phones (no orphan row). */
@media (max-width: 980px) { .uses { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .uses { grid-template-columns: 1fr; } }

/* Intro: a ghost cursor drags a box once, so the blur is seen before anyone touches the demo. */
.ghost { position: absolute; left: 0; top: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px; pointer-events: none; opacity: 0; transition: opacity .25s; z-index: 5; filter: drop-shadow(0 0 2px rgba(255,255,255,.95)); }
.ghost::before, .ghost::after { content: ""; position: absolute; background: #1b2735; border-radius: 1px; }
.ghost::before { left: 12px; top: 0; width: 2px; height: 26px; }
.ghost::after { top: 12px; left: 0; height: 2px; width: 26px; }

/* One frame around the demo and its controls, so the controls read as part of the demo. */
.demo-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.45); background: var(--panel-2); }
.demo-card .demo { border: 0; border-radius: 0; box-shadow: none; }
.demo-card .controls { margin-top: 0; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--panel-2); }

/* Demo controls styled as the real extension toolbar (ash-blue surface, slate text, coral accent). */
.demo-card .controls { display: flex; justify-content: center; }
.tbar { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 10px 12px; padding: 6px 10px 6px 16px; border-radius: 999px; background: #d5e0ec; color: #243447; font: 500 13px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; box-shadow: 0 0 0 1px rgba(60,85,115,.32), 0 4px 14px rgba(43,58,74,.28); }
.tb-brand { padding-right: 12px; border-right: 1px solid rgba(60,85,115,.32); font-size: 14px; font-weight: 700; letter-spacing: .02em; }
.tb-dot { color: var(--red); }
.tbar .slider { margin: 0; gap: 8px; color: #587089; font-size: 13px; }
.tbar .slider input { width: 110px; accent-color: #e5565b; }
.tbar .slider output { width: 34px; text-align: right; color: #243447; }
.tb-btn { all: unset; box-sizing: border-box; padding: 5px 11px; border-radius: 999px; color: #243447; font: inherit; cursor: pointer; }
.tb-btn:hover { background: rgba(70,100,135,.18); }
.tb-btn:focus-visible { outline: 2px solid #e5565b; outline-offset: 1px; }
.tb-btn[aria-pressed='true'] { background: rgba(229,86,91,.18); color: #b4232c; }
.tb-btn:disabled { opacity: .5; cursor: default; background: none; }
@media (max-width: 600px) { .tbar { border-radius: 18px; padding: 8px 12px; } .tbar .slider input { width: 80px; } }

/* Demo tabs and the wiki-style article page */
.demo-tabs { display: flex; gap: 6px; padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.demo-tab { all: unset; box-sizing: border-box; padding: 6px 16px; border-radius: 999px; color: var(--muted); font: 600 14px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; cursor: pointer; }
.demo-tab:hover { color: var(--text); }
.demo-tab[aria-selected='true'] { background: rgba(229,86,91,.18); color: var(--text); box-shadow: inset 0 0 0 1px var(--red); }
.demo-tab:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.page[hidden] { display: none; }
.page[data-page='article'] { background: #fff; }
.wk-nav { background: #f6f7f9 !important; }
.wk-logo { font: 700 clamp(12px, 1.8vw, 16px)/1 Georgia, serif; color: #3b4a5c; margin-bottom: 4px; }
.art { flex: 1; min-width: 0; padding: 0 clamp(12px, 2.4vw, 22px) 18px; font: clamp(10px, 1.45vw, 13px)/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; color: #1f2937; }
.art::after { content: ''; display: block; clear: both; }
.wk-tabs { display: flex; gap: 14px; padding: 8px 0 0; margin: 0 0 8px; border-bottom: 1px solid #d5dbe3; font-size: .9em; color: #3b6db0; }
.wk-tabs b { font-weight: 600; color: #1f2937; padding-bottom: 6px; border-bottom: 2px solid #3d5166; margin-bottom: -1px; }
.wk-tabs span { padding-bottom: 6px; }
.wk-sp { flex: 1; }
.wk-title { margin: 6px 0 8px; font: 400 clamp(20px, 3.4vw, 30px)/1.2 Georgia, "Times New Roman", serif; border-bottom: 1px solid #d5dbe3; padding-bottom: 4px; }
.art h4 { margin: 14px 0 4px; font: 400 clamp(15px, 2.2vw, 20px)/1.25 Georgia, "Times New Roman", serif; border-bottom: 1px solid #e3e7ec; padding-bottom: 2px; }
.art p { margin: 0 0 8px; }
.art a { color: #3b6db0; }
.infobox { float: right; width: 34%; margin: 2px 0 10px 14px; border: 1px solid #c7d0db; background: #f6f7f9; padding: 6px; font-size: .92em; line-height: 1.4; }
.ib-title { text-align: center; font-weight: 700; padding: 4px 0 6px; }
.ib-img { height: clamp(46px, 8.5vw, 80px); border-radius: 3px; background: linear-gradient(180deg, #0f2a3d 0%, #1f6a5a 55%, #6fd3a4 100%); }
.infobox { box-sizing: border-box; overflow: hidden; }
.infobox dl { margin: 6px 0 0; }
.infobox dt { font-size: .82em; color: #6b7280; margin-top: 4px; }
.infobox dd { margin: 0; overflow-wrap: anywhere; }
/* Resize handles, as in the extension: red corner brackets and edge bars just outside the chosen area. They flip
   inside when the area is near the demo's edge (classes in-n/in-s/in-e/in-w set by demo.js). */
.hole { --g: 6px; --t: 2px; --a: 20px; --b: 30px; --o: calc(var(--g) + var(--t) + 1.5px); --vn: calc(-1 * var(--o)); --vs: var(--vn); --vw: var(--vn); --ve: var(--vn); }
.hole.in-n { --vn: var(--g); } .hole.in-s { --vs: var(--g); } .hole.in-w { --vw: var(--g); } .hole.in-e { --ve: var(--g); }
.hh { position: absolute; box-sizing: border-box; pointer-events: auto; touch-action: none; filter: drop-shadow(0 0 1px rgba(255,255,255,.9)); }
.hh::after { content: ''; position: absolute; inset: -8px; } /* bigger invisible grab area */
.hh-nw, .hh-ne, .hh-se, .hh-sw { width: var(--a); height: var(--a); border: 0 solid var(--red); }
.hh-nw { left: var(--vw); top: var(--vn); border-width: var(--t) 0 0 var(--t); cursor: nwse-resize; }
.hh-ne { right: var(--ve); top: var(--vn); border-width: var(--t) var(--t) 0 0; cursor: nesw-resize; }
.hh-se { right: var(--ve); bottom: var(--vs); border-width: 0 var(--t) var(--t) 0; cursor: nwse-resize; }
.hh-sw { left: var(--vw); bottom: var(--vs); border-width: 0 0 var(--t) var(--t); cursor: nesw-resize; }
.hh-n, .hh-s, .hh-e, .hh-w { background: var(--red); }
.hh-n { left: calc(50% - var(--b) / 2); top: var(--vn); width: var(--b); height: var(--t); cursor: ns-resize; }
.hh-s { left: calc(50% - var(--b) / 2); bottom: var(--vs); width: var(--b); height: var(--t); cursor: ns-resize; }
.hh-e { right: var(--ve); top: calc(50% - var(--b) / 2); width: var(--t); height: var(--b); cursor: ew-resize; }
.hh-w { left: var(--vw); top: calc(50% - var(--b) / 2); width: var(--t); height: var(--b); cursor: ew-resize; }
.demo.selecting .hh { display: none; } /* handles appear once the area is chosen */
.brand-dot { color: var(--red); } /* the icon's red dot, as a period after the name */
