:root {
  --bg: #f3f3f1;
  --ink: #17161f;
  --muted: #64636e;
  --line: #e2e1e6;
  --accent: #6e60da;
  --accent-dark: #5c4dc6;
  --soft: #f0edff;
  --danger: #b14758;
  --green: #267962;
  --chrome-blue: #1a73e8;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: #e8e7ee; padding: 2px 6px; border-radius: 5px; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; text-transform: uppercase; margin: 0; letter-spacing: -.2px; }

/* ---------- header ---------- */
.site-header {
  max-width: 1180px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 800; font-size: 24px; text-transform: uppercase; letter-spacing: .3px; }
.logo img { border-radius: 8px; }
.header-nav { display: flex; align-items: center; gap: 26px; font-size: 15px; color: #45444f; }
.header-nav a:not(.btn):hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; font-weight: 600; transition: transform .15s, background .15s; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2c2a3a; transform: translateY(-1px); }
.btn-sm { padding: 10px 20px; font-size: 15px; color: #fff !important; }
.btn-lg { padding: 16px 30px; font-size: 17px; margin-top: 44px; }
.btn svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.meta { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 48px 24px 0; max-width: 1180px; margin: 0 auto; }
.hero h1 { font-size: clamp(46px, 8.4vw, 92px); line-height: .94; }
.lede { max-width: 600px; margin: 22px auto 0; color: var(--muted); font-size: 18px; }

/* =====================================================================
   Browser mockups. All sizes are in cqw so each one scales as a picture.
   ===================================================================== */
.demo { position: relative; max-width: 980px; margin: 56px auto 0; container-type: inline-size; text-align: left; }
.browser {
  position: relative; background: #fff; border-radius: 1.4cqw; overflow: hidden;
  box-shadow: 0 3cqw 8cqw rgba(30, 24, 70, .18), 0 0 0 1px rgba(0, 0, 0, .07);
  font-family: var(--body); transition: opacity .4s;
}
.demo.fade .browser, .demo.fade .notif { opacity: 0; }

.tabstrip { height: 4.2cqw; background: #dee1e6; display: flex; align-items: flex-end; padding: 0 1.4cqw; }
.lights { align-self: center; display: flex; gap: .65cqw; margin-right: 1.6cqw; }
.lights i { width: 1.15cqw; height: 1.15cqw; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.tab {
  position: relative; height: 3.2cqw; width: 21cqw; border-radius: 1cqw 1cqw 0 0;
  display: flex; align-items: center; gap: .8cqw; padding: 0 1.1cqw; font-size: 1.2cqw; color: #45474a;
  overflow: hidden; white-space: nowrap; flex: none;
  transition: width .45s ease, padding .45s ease, opacity .35s ease, background .2s;
}
.tab.active { background: #fff; color: #202124; }
.tab.gone { width: 0; padding: 0; opacity: 0; }
.tab-icon, .tab-img { width: 1.5cqw; height: 1.5cqw; border-radius: .35cqw; flex: none; display: grid; place-items: center; }
.tab-title { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.tab-x { color: #777; font-size: 1.4cqw; }
.fav-tik { background: #111; }
.fav-wiki { background: #fff; box-shadow: inset 0 0 0 1px #c8ccd1; font: 700 1.05cqw Georgia, serif; color: #111; }
.fav-gh { background: #24292f; border-radius: 50%; }
.fav-puzzle svg { width: 1.5cqw; height: 1.5cqw; fill: #5f6368; }

.toolbar { height: 4.6cqw; display: flex; align-items: center; gap: 1cqw; padding: 0 1.4cqw; border-bottom: 1px solid #e6e6e9; }
.nav-btn { position: relative; width: 2.6cqw; height: 2.6cqw; border-radius: 50%; display: grid; place-items: center; transition: background .2s, opacity .3s, width .3s; flex: none; }
.nav-btn svg { width: 1.8cqw; height: 1.8cqw; fill: none; stroke: #5f6368; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn.down { background: #e4e4e8; }
.url { flex: 1; min-width: 0; height: 3.1cqw; border-radius: 1.6cqw; background: #f1f3f4; display: flex; align-items: center; gap: .8cqw; padding: 0 1.3cqw; font-size: 1.3cqw; color: #202124; }
.url svg { width: 1.4cqw; height: 1.4cqw; fill: none; stroke: #5f6368; stroke-width: 2; flex: none; }
.url-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ext { position: relative; width: 3cqw; height: 3cqw; display: grid; place-items: center; border-radius: 50%; transition: background .2s, width .35s, opacity .35s, transform .35s; flex: none; }
.ext img { width: 2.1cqw; height: 2.1cqw; border-radius: .45cqw; }
.ext.down { background: #e4e4e8; }
.badge {
  position: absolute; right: -.5cqw; bottom: -.15cqw; background: #6558d9; color: #fff;
  font-size: .95cqw; font-weight: 700; line-height: 1.35; padding: 0 .45cqw; border-radius: .45cqw;
  transition: transform .25s;
}
.badge:empty { display: none; }
.badge.tick { transform: scale(1.35); }

.viewport { position: relative; height: 50cqw; overflow: hidden; background: #121212; }
.viewport.light { background: #fff; }
.page { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease, filter .5s ease; }
.demo[data-page="feed"] .page-feed,
.demo[data-page="wiki"] .page-wiki,
.demo[data-page="challenge"] .page-challenge,
.demo[data-page="gh"] .page-gh,
.demo[data-page="ext"] .page-ext { opacity: 1; }

/* feed */
.page-feed { display: flex; justify-content: center; gap: 2cqw; background: #121212; }
.demo.stopped .page-feed { filter: brightness(.45) saturate(.6); }
.feed-side { position: absolute; left: 2.2cqw; top: 2.6cqw; display: flex; flex-direction: column; gap: 1.5cqw; }
.feed-side i { width: 12cqw; height: 1.6cqw; border-radius: .8cqw; background: #262626; }
.feed-side i:first-child { width: 15cqw; height: 2.6cqw; background: #2e2e2e; margin-bottom: 1cqw; }
.feed-col { width: 27cqw; height: 100%; overflow: hidden; padding-top: 1.5cqw; }
.feed-track { display: flex; flex-direction: column; gap: 1.5cqw; transition: transform .5s cubic-bezier(.65, 0, .25, 1); }
.clip { flex: none; height: 47cqw; border-radius: 1.3cqw; padding: 1.8cqw; display: flex; flex-direction: column; justify-content: flex-end; gap: .8cqw; }
.c1 { background: linear-gradient(160deg, #ff8a65, #c2185b 70%, #4a148c); }
.c2 { background: linear-gradient(160deg, #4dd0e1, #1e88e5 60%, #283593); }
.c3 { background: linear-gradient(160deg, #ffd54f, #fb8c00 55%, #6d4c41); }
.c4 { background: linear-gradient(160deg, #81c784, #00897b 60%, #004d40); }
.clip-user { width: 9cqw; height: 1.4cqw; border-radius: .7cqw; background: rgba(255, 255, 255, .9); }
.clip-line { width: 19cqw; height: 1.05cqw; border-radius: .6cqw; background: rgba(255, 255, 255, .55); }
.clip-line.short { width: 12cqw; }
.feed-actions { display: flex; flex-direction: column; justify-content: flex-end; gap: 1.8cqw; padding-bottom: 5cqw; }
.feed-actions i { width: 3.4cqw; height: 3.4cqw; border-radius: 50%; background: #2b2b2b; }

/* wiki */
.page-wiki { background: #fff; }
.article { max-width: 54cqw; margin: 4.5cqw auto 0; display: flex; flex-direction: column; gap: 1.35cqw; }
.art-title { font: 400 3.4cqw/1.2 Georgia, "Times New Roman", serif; color: #202122; border-bottom: 1px solid #c8ccd1; padding-bottom: .8cqw; }
.art-sub { width: 32%; height: 1cqw; border-radius: .5cqw; background: #eef0f3; margin-bottom: .8cqw; }
.article span { height: 1.1cqw; border-radius: .55cqw; background: #e7e8ee; width: 100%; }
.article span.s { width: 82%; }
.article span.xs { width: 48%; }

/* challenge page (mirrors challenge/challenge.html) */
.page-challenge { background: #f7f8fc; color: #25243b; }
.ch-shell { width: 54cqw; margin: 0 auto; padding-top: 2.2cqw; }
.ch-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 1.5cqw; border-bottom: 1px solid #e9e7f0; }
.ch-brand { display: flex; align-items: center; gap: .9cqw; color: var(--accent); font-weight: 700; font-size: 1.6cqw; letter-spacing: -.03cqw; }
.ch-brand img { width: 2.5cqw; height: 2.5cqw; border-radius: .6cqw; }
.ch-link { color: var(--accent); font-size: 1.2cqw; }
.ch-card { background: #fff; border: 1px solid #e9e7f0; border-radius: 1.8cqw; padding: 2.6cqw 3cqw; margin-top: 2.2cqw; min-height: 34cqw; }
.ch-eyebrow { font-size: 1cqw; font-weight: 700; text-transform: uppercase; letter-spacing: .15cqw; color: var(--accent); }
.ch-title { font-size: 2.3cqw; font-weight: 700; letter-spacing: -.08cqw; margin-top: .4cqw; }
.ch-desc { font-size: 1.25cqw; color: #76748a; margin-top: .2cqw; }
.ch-progress { display: flex; justify-content: space-between; font-size: 1.05cqw; color: #76748a; margin-top: 1.9cqw; }
.ch-card .meter { height: .55cqw; margin-top: .6cqw; }
.ch-problem { text-align: center; font-size: 3.6cqw; font-weight: 700; letter-spacing: -.1cqw; margin: 2.5cqw 0 2.1cqw; font-variant-numeric: tabular-nums; }
.ch-answer { display: flex; gap: .9cqw; }
.ch-input {
  flex: 1; height: 3.8cqw; border: .15cqw solid var(--accent); border-radius: .9cqw; box-shadow: 0 0 0 .35cqw #e4dfff;
  display: flex; align-items: center; justify-content: center; font-size: 1.9cqw; font-variant-numeric: tabular-nums;
}
.ch-btn { background: var(--accent); color: #fff; border-radius: .9cqw; font-size: 1.25cqw; font-weight: 600; display: grid; place-items: center; padding: 0 1.8cqw; transition: transform .12s, background .12s; }
.ch-btn.pressed { transform: scale(.93); background: var(--accent-dark); }
.ch-feedback { font-size: 1.2cqw; margin-top: 1.2cqw; }
.ch-success { display: none; text-align: center; padding-top: 2.5cqw; }
.ch-success p { color: #76748a; font-size: 1.3cqw; max-width: 38cqw; margin: 1cqw auto 0; }
.ch-check { width: 5.4cqw; height: 5.4cqw; border-radius: 50%; background: #eaf7f0; color: var(--green); display: grid; place-items: center; font-size: 2.4cqw; margin: 0 auto 1.8cqw; }
.ch-open { display: inline-block; margin-top: 2.2cqw; background: var(--accent); color: #fff; font-weight: 600; font-size: 1.25cqw; border-radius: .9cqw; padding: 1cqw 1.8cqw; }
.demo.ch-done .ch-task { display: none; }
.demo.ch-done .ch-success { display: block; animation: pop .45s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }

.caret { width: .15cqw; height: 2.2cqw; background: var(--ink); margin-left: .15cqw; animation: blink 1s steps(1) infinite; opacity: 0; }
@keyframes blink { 50% { opacity: 1; } }

/* notification */
.notif {
  position: absolute; top: 10.4cqw; right: 2cqw; width: 35cqw; z-index: 3;
  display: flex; gap: 1.1cqw; align-items: flex-start; padding: 1.3cqw 1.5cqw;
  background: rgba(246, 246, 250, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 1.6cqw; box-shadow: 0 1.4cqw 4cqw rgba(0, 0, 0, .2), 0 0 0 1px rgba(0, 0, 0, .06);
  font-size: 1.2cqw; line-height: 1.4; color: #1d1d1f;
  opacity: 0; transform: translateX(3cqw) scale(.97); transition: opacity .45s ease, transform .55s cubic-bezier(.2, .9, .3, 1.15);
}
.notif img { width: 3.2cqw; height: 3.2cqw; border-radius: .7cqw; flex: none; }
.notif b { font-size: 1.25cqw; }
.notif p { margin: .15cqw 0 0; color: #3a3a40; }
.notif-time { margin-left: auto; color: #8a8a90; font-size: 1.05cqw; flex: none; }
.demo.show-notif .notif { opacity: 1; transform: none; }

/* toolbar popup */
.popup {
  position: absolute; top: 8.4cqw; right: 1cqw; width: 32cqw; z-index: 2;
  background: #fff; border-radius: 1cqw; padding: 1.5cqw;
  box-shadow: 0 1.2cqw 4cqw rgba(30, 24, 70, .22), 0 0 0 1px rgba(0, 0, 0, .07);
  font-size: 1.05cqw; color: #25243b;
  opacity: 0; transform: translateY(-.8cqw) scale(.96); transform-origin: top right;
  transition: opacity .3s ease, transform .35s ease; pointer-events: none;
}
.demo.show-popup .popup { opacity: 1; transform: none; }
.pop-head { display: flex; align-items: center; gap: .8cqw; padding-bottom: 1.1cqw; border-bottom: 1px solid #e9e7f0; margin-bottom: 1.2cqw; }
.pop-head img { width: 2.2cqw; height: 2.2cqw; border-radius: .5cqw; }
.pop-head b { color: var(--accent); font-size: 1.45cqw; }
.pop-head span { margin-left: auto; color: #76748a; font-size: .95cqw; }
.pop-card { border: 1px solid #e9e7f0; border-radius: 1cqw; padding: 1.3cqw; }
.pop-top { display: flex; align-items: center; gap: 1cqw; }
.pop-letter { width: 2.8cqw; height: 2.8cqw; border-radius: .8cqw; background: var(--soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 1.35cqw; }
.pop-name { display: flex; flex-direction: column; line-height: 1.25; }
.pop-name b { font-size: 1.3cqw; }
.pop-name small { color: #76748a; font-size: 1cqw; }
.pill { margin-left: auto; border-radius: 2cqw; padding: .3cqw .8cqw; font-size: .95cqw; font-weight: 600; white-space: nowrap; }
.pill.blocked { background: #fbeef0; color: var(--danger); }
.pop-usage { display: flex; justify-content: space-between; color: #76748a; margin-top: 1.3cqw; }
.pop-usage b { color: #25243b; }
.meter { height: .5cqw; border-radius: 1cqw; background: #efedf5; overflow: hidden; margin-top: .7cqw; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .6s ease; }
.pop-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1cqw; margin-top: 1.2cqw; color: #76748a; }
.pop-btn { background: var(--accent); color: #fff; font-weight: 600; border-radius: .7cqw; padding: .75cqw 1.2cqw; white-space: nowrap; transition: transform .15s, background .15s, box-shadow .3s; }
.pop-btn.hover { background: var(--accent-dark); box-shadow: 0 0 0 .4cqw rgba(110, 96, 218, .25); }
.pop-btn.pressed { transform: scale(.94); }

/* cursor */
.cursor {
  position: absolute; left: 50%; top: 45%; width: 2.4cqw; height: 2.4cqw; z-index: 9;
  fill: #111; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round;
  opacity: 0; transition: left .8s cubic-bezier(.5, 0, .2, 1), top .8s cubic-bezier(.5, 0, .2, 1), opacity .3s, transform .12s;
  pointer-events: none;
}
.cursor.show { opacity: 1; }
.cursor.click { transform: scale(.82); }

/* step pills under the hero demo */
.demo-steps { list-style: none; counter-reset: s; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0; margin: 28px auto 0; max-width: 900px; }
.demo-steps li {
  counter-increment: s; font-size: 14px; color: var(--muted); padding: 7px 14px 7px 8px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; display: flex; align-items: center; gap: 8px;
  transition: background .3s, color .3s, border-color .3s;
}
.demo-steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: #efeef3; color: var(--muted); display: grid; place-items: center; font-size: 12px; font-weight: 700; transition: inherit; }
.demo-steps li.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.demo-steps li.on::before { background: var(--accent); color: #fff; }

/* ---------- install demo ---------- */
.idemo { margin-top: 48px; }
.ext.pinned { width: 0; opacity: 0; transform: scale(.4); }
.ext.pinned.show { width: 3cqw; opacity: 1; transform: none; }
.nav-btn.dl { width: 0; opacity: 0; }
.nav-btn.dl.show { width: 2.6cqw; opacity: 1; }
.dl-ring {
  position: absolute; inset: 0; border-radius: 50%; --p: 0;
  background: conic-gradient(var(--chrome-blue) calc(var(--p) * 1%), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - .25cqw), #000 calc(100% - .25cqw));
          mask: radial-gradient(farthest-side, transparent calc(100% - .25cqw), #000 calc(100% - .25cqw));
}
.nav-btn.dl.done svg { stroke: var(--chrome-blue); }

.gh { max-width: 68cqw; margin: 3.2cqw auto 0; color: #1f2328; }
.gh-crumb { font-size: 1.3cqw; color: #59636e; }
.gh-crumb b { color: #1f2328; }
.gh-head { display: flex; align-items: center; gap: 1.2cqw; margin-top: 1.8cqw; }
.gh-title { font-size: 2.6cqw; font-weight: 600; }
.gh-latest { font-size: 1cqw; font-weight: 600; color: #1a7f37; border: 1px solid #4ac26b; border-radius: 2cqw; padding: .15cqw .8cqw; }
.gh-lines { display: flex; flex-direction: column; gap: 1.1cqw; margin: 2cqw 0 2.6cqw; }
.gh-lines span { height: 1cqw; border-radius: .5cqw; background: #eaeef2; }
.gh-lines .s { width: 78%; }
.gh-lines .xs { width: 45%; }
.gh-assets { border: 1px solid #d1d9e0; border-radius: .9cqw; overflow: hidden; }
.gh-assets-head { background: #f6f8fa; padding: 1cqw 1.4cqw; font-size: 1.3cqw; font-weight: 600; border-bottom: 1px solid #d1d9e0; }
.gh-assets-head em { font-style: normal; font-size: 1cqw; background: #e1e6ea; border-radius: 1cqw; padding: .1cqw .6cqw; margin-left: .4cqw; }
.gh-asset { display: flex; align-items: center; gap: 1cqw; padding: 1.1cqw 1.4cqw; font-size: 1.25cqw; border-top: 1px solid #eaeef2; transition: background .2s; }
.gh-asset:first-of-type { border-top: 0; }
.gh-asset.hl { background: #eef4ff; }
.gh-name { color: #0969da; font-weight: 600; }
.gh-size { margin-left: auto; color: #59636e; font-size: 1.1cqw; }
.gh-file { width: 1.3cqw; height: 1.6cqw; border-radius: .2cqw; border: .15cqw solid #59636e; flex: none; position: relative; }
.gh-file::after { content: ""; position: absolute; left: 50%; top: .15cqw; bottom: .3cqw; width: .25cqw; transform: translateX(-50%); background: repeating-linear-gradient(#59636e 0 .2cqw, transparent .2cqw .4cqw); }

.dl-bubble {
  position: absolute; top: 8.4cqw; right: 3.6cqw; width: 30cqw; z-index: 2;
  display: flex; align-items: center; gap: 1.2cqw; padding: 1.4cqw 1.6cqw;
  background: #fff; border-radius: 1cqw; box-shadow: 0 1.2cqw 4cqw rgba(30, 24, 70, .2), 0 0 0 1px rgba(0, 0, 0, .07);
  font-size: 1.15cqw; opacity: 0; transform: translateY(-.8cqw); transition: opacity .3s, transform .3s;
}
.dl-bubble.show { opacity: 1; transform: none; }
.dl-bubble .gh-file { width: 1.8cqw; height: 2.2cqw; }
.dl-bubble small { display: block; color: #5f6368; font-size: 1cqw; }

.files {
  position: absolute; left: 50%; top: 13cqw; width: 46cqw; z-index: 4;
  background: #fff; border-radius: 1.2cqw; overflow: hidden;
  box-shadow: 0 2cqw 6cqw rgba(20, 16, 50, .3), 0 0 0 1px rgba(0, 0, 0, .1);
  opacity: 0; transform: translate(-50%, 1.5cqw) scale(.97); transition: opacity .35s, transform .35s;
}
.files.show { opacity: 1; transform: translate(-50%, 0); }
.files-bar { display: flex; align-items: center; height: 3.6cqw; padding: 0 1.2cqw; background: #f3f3f5; border-bottom: 1px solid #e3e3e7; font-size: 1.2cqw; font-weight: 600; color: #444; }
.files-bar span:last-child { flex: 1; text-align: center; margin-right: 5cqw; }
.files-body { display: flex; gap: 4cqw; padding: 3cqw 4cqw 3.4cqw; min-height: 15cqw; }
.file { width: 13cqw; display: flex; flex-direction: column; align-items: center; gap: .9cqw; font-size: 1.05cqw; text-align: center; color: #333; }
.file span:last-child { padding: .1cqw .5cqw; border-radius: .4cqw; word-break: break-all; }
.file.sel span:last-child { background: #2f6fde; color: #fff; }
.file.new { opacity: 0; transform: scale(.6); transition: opacity .35s, transform .35s cubic-bezier(.2, .9, .3, 1.3); }
.file.new.show { opacity: 1; transform: none; }
.ico { display: inline-block; flex: none; }
.ico.zip { width: 5cqw; height: 6.2cqw; border-radius: .5cqw; background: #eceef2; border: .15cqw solid #c9ccd3; position: relative; }
.ico.zip::after { content: ""; position: absolute; left: 50%; top: .4cqw; height: 3cqw; width: .55cqw; transform: translateX(-50%); background: repeating-linear-gradient(#8a8f99 0 .35cqw, transparent .35cqw .7cqw); }
.ico.folder { width: 6.4cqw; height: 5cqw; border-radius: .5cqw; background: linear-gradient(#7ab8f5, #4f97e6); position: relative; margin-top: 1cqw; }
.ico.folder::before { content: ""; position: absolute; left: 0; top: -.8cqw; width: 2.8cqw; height: 1.2cqw; border-radius: .4cqw .4cqw 0 0; background: #6aaaf0; }

.page-ext { background: #f8f9fb; }
.xt-bar { height: 5.2cqw; background: #fff; display: flex; align-items: center; gap: 2cqw; padding: 0 2cqw; border-bottom: 1px solid #e3e5e8; }
.xt-title { font-size: 1.8cqw; color: #202124; }
.xt-search { flex: 1; max-width: 34cqw; margin: 0 auto; height: 3cqw; border-radius: 1.5cqw; background: #f1f3f4; font-size: 1.2cqw; color: #80868b; display: flex; align-items: center; padding: 0 1.5cqw; }
.xt-dev { display: flex; align-items: center; gap: 1cqw; font-size: 1.2cqw; color: #3c4043; }
.toggle { width: 3.4cqw; height: 1.5cqw; border-radius: 1cqw; background: #bdc1c6; position: relative; transition: background .25s; flex: none; }
.toggle i { position: absolute; top: 50%; left: 0; width: 2cqw; height: 2cqw; border-radius: 50%; background: #fff; transform: translateY(-50%); box-shadow: 0 .1cqw .4cqw rgba(0, 0, 0, .3); transition: left .25s, background .25s; }
.toggle.on { background: #a8c7fa; }
.toggle.on i { left: 1.4cqw; background: var(--chrome-blue); }
.xt-sub { display: flex; gap: 1.2cqw; align-items: center; padding: 0 2cqw; height: 0; overflow: hidden; background: #fff; border-bottom: 1px solid transparent; transition: height .35s ease, border-color .35s; }
.xt-sub.show { height: 5cqw; border-color: #e3e5e8; }
.xt-btn { border: 1px solid #dadce0; border-radius: 2cqw; padding: .6cqw 1.5cqw; font-size: 1.15cqw; color: var(--chrome-blue); font-weight: 500; background: #fff; white-space: nowrap; transition: background .15s, transform .12s; }
.xt-btn.primary { background: var(--chrome-blue); border-color: var(--chrome-blue); color: #fff; }
.xt-btn.pressed { transform: scale(.94); background: #e8f0fe; }
.xt-btn.primary.pressed { background: #1557b0; }
.xt-body { padding: 2.6cqw 2cqw; }
.xt-card {
  width: 40cqw; background: #fff; border-radius: 1cqw; box-shadow: 0 .15cqw .5cqw rgba(60, 64, 67, .2), 0 0 0 1px rgba(60, 64, 67, .08);
  opacity: 0; transform: translateY(1.2cqw); transition: opacity .4s, transform .45s cubic-bezier(.2, .9, .3, 1.1);
}
.xt-card.show { opacity: 1; transform: none; }
.xt-card-top { display: flex; gap: 1.6cqw; padding: 1.8cqw; }
.xt-card-top img { width: 4.2cqw; height: 4.2cqw; border-radius: .8cqw; flex: none; }
.xt-card-top b { font-size: 1.4cqw; font-weight: 600; color: #202124; }
.xt-card-top small { font-weight: 400; color: #5f6368; font-size: 1.1cqw; margin-left: .4cqw; }
.xt-card-top p { margin: .5cqw 0 0; font-size: 1.1cqw; line-height: 1.45; color: #5f6368; }
.xt-card-bottom { display: flex; align-items: center; gap: 1cqw; padding: 1cqw 1.8cqw 1.4cqw; }
.xt-link { border: 1px solid #dadce0; border-radius: 2cqw; padding: .45cqw 1.3cqw; font-size: 1.05cqw; color: var(--chrome-blue); }
.xt-card-bottom .toggle { margin-left: auto; }

.picker {
  position: absolute; left: 50%; top: 14cqw; width: 46cqw; z-index: 4;
  background: #fff; border-radius: 1.2cqw; padding: 2cqw;
  box-shadow: 0 2cqw 6cqw rgba(20, 16, 50, .3), 0 0 0 1px rgba(0, 0, 0, .1);
  opacity: 0; transform: translate(-50%, 1.5cqw) scale(.97); transition: opacity .3s, transform .3s;
}
.picker.show { opacity: 1; transform: translate(-50%, 0); }
.picker-title { font-size: 1.4cqw; font-weight: 600; color: #202124; }
.picker-list { margin-top: 1.4cqw; border: 1px solid #e3e5e8; border-radius: .8cqw; padding: .5cqw; }
.picker-row { display: flex; align-items: center; gap: 1.2cqw; padding: .8cqw 1cqw; border-radius: .5cqw; font-size: 1.25cqw; color: #333; transition: background .2s; }
.picker-row .ico.folder { width: 2.4cqw; height: 1.8cqw; margin-top: .3cqw; border-radius: .25cqw; }
.picker-row .ico.folder::before { width: 1.1cqw; height: .5cqw; top: -.35cqw; }
.picker-row.sel { background: #2f6fde; color: #fff; }
.picker-actions { display: flex; justify-content: flex-end; gap: 1cqw; margin-top: 1.6cqw; }

.xmenu {
  position: absolute; top: 8.4cqw; right: 1cqw; width: 27cqw; z-index: 2;
  background: #fff; border-radius: 1cqw; padding: 1.3cqw 1.4cqw;
  box-shadow: 0 1.2cqw 4cqw rgba(30, 24, 70, .2), 0 0 0 1px rgba(0, 0, 0, .07);
  opacity: 0; transform: translateY(-.8cqw); transition: opacity .3s, transform .3s;
}
.xmenu.show { opacity: 1; transform: none; }
.xmenu-head { font-size: 1.35cqw; font-weight: 600; color: #202124; padding-bottom: 1cqw; }
.xmenu-row { display: flex; align-items: center; gap: 1cqw; font-size: 1.2cqw; color: #202124; padding: .5cqw 0; }
.xmenu-row img { width: 2cqw; height: 2cqw; border-radius: .4cqw; }
.pin { margin-left: auto; width: 2.6cqw; height: 2.6cqw; border-radius: 50%; display: grid; place-items: center; transition: background .2s; }
.pin svg { width: 1.6cqw; height: 1.6cqw; fill: none; stroke: #5f6368; stroke-width: 2; stroke-linejoin: round; transition: fill .2s, stroke .2s; }
.pin.on svg { fill: var(--chrome-blue); stroke: var(--chrome-blue); }
.pin.down { background: #e8eaed; }

/* ---------- sections ---------- */
.section { max-width: 1100px; margin: 0 auto; padding: 130px 24px 0; }
.section h2 { font-size: clamp(38px, 6vw, 58px); line-height: 1; }
.hook { color: var(--muted); font-size: 18px; margin: 12px 0 0; }

.row { display: grid; grid-template-columns: 1fr 1.45fr; gap: 56px; align-items: center; margin-top: 72px; }
.row.flip .row-text { order: 2; }
.num { font-family: var(--head); font-weight: 800; font-size: 20px; color: var(--accent); }
.row h3 { font-size: 38px; line-height: 1; margin-top: 6px; }
.row p { color: var(--muted); font-size: 17px; margin: 14px 0 0; }
.shot { margin: 0; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid rgba(0, 0, 0, .07); box-shadow: 0 18px 50px rgba(30, 24, 70, .08); }
.shot-narrow { max-width: 330px; justify-self: center; }

.tiles { list-style: none; padding: 0; margin: 80px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tiles li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.tiles b { display: block; font-family: var(--head); font-weight: 800; text-transform: uppercase; font-size: 26px; line-height: 1.05; }
.tiles span { display: block; color: var(--muted); margin-top: 8px; font-size: 15px; }

/* ---------- math card ---------- */
.break-row { margin-top: 48px; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.facts li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; color: var(--muted); font-size: 16px; }
.facts b { color: var(--ink); }
.card-stage {
  position: relative; aspect-ratio: 100 / 76; border-radius: 16px; overflow: hidden; container-type: inline-size;
  background: linear-gradient(135deg, #7f73e3 0%, #9d8ee6 55%, #b9a4e2 100%);
  display: grid; place-items: center; cursor: pointer;
}
.mini {
  width: 78cqw; background: #fff; border-radius: 3cqw; padding: 4.6cqw 5cqw 4cqw;
  box-shadow: 0 3cqw 7cqw rgba(30, 20, 80, .25); color: #25243b; margin-top: -4cqw;
}
.mini-eyebrow { font-size: 2.2cqw; font-weight: 700; text-transform: uppercase; letter-spacing: .5cqw; color: var(--accent); }
.mini-title { font-size: 4.8cqw; font-weight: 700; letter-spacing: -.15cqw; margin-top: .6cqw; line-height: 1.15; }
.mini-desc { font-size: 2.6cqw; color: #76748a; margin-top: .4cqw; }
.mini-progress { display: flex; justify-content: space-between; font-size: 2.3cqw; color: #76748a; margin-top: 3cqw; }
.mini .meter { height: 1cqw; margin-top: 1.2cqw; }
.mini .meter i { width: 40%; }
.mini-problem { text-align: center; font-size: 7cqw; font-weight: 700; letter-spacing: -.2cqw; margin: 3.4cqw 0 3cqw; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-answer { display: flex; gap: 1.6cqw; }
.mini-input {
  flex: 1; height: 7cqw; border: .25cqw solid #d9d6e6; border-radius: 1.4cqw; display: flex; align-items: center;
  padding: 0 1.8cqw; font-size: 3.4cqw; font-variant-numeric: tabular-nums; transition: border-color .2s, box-shadow .2s;
}
.card.playing .mini-input { border-color: var(--accent); box-shadow: 0 0 0 .6cqw #e4dfff; }
.mini .caret { width: .3cqw; height: 4cqw; animation: none; }
.card.playing .mini .caret { animation: blink 1s steps(1) infinite; }
.mini-btn {
  background: var(--accent); color: #fff; border-radius: 1.4cqw; font-size: 2.6cqw; font-weight: 600;
  display: grid; place-items: center; padding: 0 2.6cqw; white-space: nowrap; transition: transform .12s, background .12s;
}
.mini-btn.pressed { transform: scale(.93); background: var(--accent-dark); }
.mini-feedback { font-size: 2.6cqw; margin-top: 2cqw; min-height: 1.5em; transition: color .2s; }
.mini-feedback.bad { color: var(--danger); }
.replay {
  position: absolute; bottom: 3.2cqw; left: 50%; transform: translateX(-50%);
  background: rgba(23, 22, 31, .78); color: #fff; font-size: 13px; font-weight: 500;
  padding: 6px 14px; border-radius: 999px; white-space: nowrap; transition: opacity .3s;
}
.card.playing .replay { opacity: 0; }

/* ---------- install ---------- */
.install-section { text-align: center; }
.install { list-style: none; padding: 0; margin: 32px auto 0; max-width: 620px; text-align: left; display: grid; gap: 10px; }
.install li {
  display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; font-size: 15px; transition: border-color .3s, box-shadow .3s;
}
.install li span { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #efeef3; color: var(--muted); display: grid; place-items: center; font-size: 13px; font-weight: 700; transition: background .3s, color .3s; }
.install li.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.install li.on span { background: var(--accent); color: #fff; }
.install li p { margin: 0; min-width: 0; }
.install code { overflow-wrap: anywhere; }
.install-section .btn-lg { margin-top: 36px; }

/* ---------- faq ---------- */
.faq { max-width: 760px; }
.h2-sm { font-size: 38px !important; margin-bottom: 18px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 36px 20px 0; font-weight: 600; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: 400; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: -4px 0 20px; color: var(--muted); }

.site-footer {
  max-width: 1100px; margin: 120px auto 0; padding: 28px 24px 40px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--muted); font-size: 14px;
}

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .site-header { padding: 14px 16px; }
  .header-nav a:not(.btn) { display: none; }
  .hero { padding: 36px 16px 0; }
  .lede { font-size: 16px; }
  .demo { margin-top: 36px; }
  .demo-steps { gap: 6px; margin-top: 20px; }
  .demo-steps li { font-size: 12px; padding: 5px 10px 5px 5px; gap: 6px; }
  .demo-steps li::before { width: 18px; height: 18px; font-size: 11px; }
  .section { padding: 96px 16px 0; }
  .row, .row.flip { grid-template-columns: 1fr; gap: 24px; margin-top: 56px; }
  .row.flip .row-text { order: 0; }
  .row h3 { font-size: 32px; }
  .tiles { grid-template-columns: 1fr; margin-top: 56px; }
  .install li { font-size: 14px; padding: 12px 14px; }
  .site-footer { padding: 24px 16px 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
