/* Every value here is the app's own dark theme (frame/src/styles/tokens.css,
   controls.css, the sidebar, new tab and settings components). The app has
   no accent hue: states are white overlays of rising strength, and so is
   everything on this page. */
:root {
  --canvas: #1a1a1d;
  --page: #121214;
  --chrome: #1f1f22;
  --surface: #26262a;
  --raised: #2c2c30;
  --float: #3d3d44;
  --text: #f4f4f6;
  --label: #d8d8db;
  --muted: rgb(244 244 246 / 0.68);
  --faint: rgb(244 244 246 / 0.44);
  --lit: #ededf0;
  --hair: rgb(255 255 255 / 0.07);
  --hover: rgb(255 255 255 / 0.04);
  --active: rgb(255 255 255 / 0.075);
  --rim: inset 0 0 0 1px rgb(255 255 255 / 0.06);
  --font: "Segoe UI Variable Text", "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { background: var(--chrome); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--chrome);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid rgb(255 255 255 / 0.5); outline-offset: 2px; border-radius: 10px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 550;
  letter-spacing: -0.006em;
  transition: background 120ms, transform 70ms;
}
.btn:active { transform: scale(0.97); }
.btn-lit { background: var(--lit); color: var(--canvas); }
.btn-lit:hover { background: #fff; }
.btn-quiet { background: var(--active); color: var(--text); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1); }
.btn-quiet:hover { background: rgb(255 255 255 / 0.1); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--chrome) 82%, transparent);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--hair);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.brand img { border-radius: 6px; }
.nav-links { display: flex; gap: 4px; margin-right: auto; }
.nav-links a {
  padding: 7px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--muted);
  transition: background 120ms, color 120ms;
}
.nav-links a:hover { background: var(--hover); color: var(--text); }
.nav-source { height: 34px; padding: 0 14px; font-size: 13px; }

/* ---------- hero ---------- */
.hero {
  padding: clamp(48px, 8vw, 96px) 16px 0;
  text-align: center;
}
.hero h1 {
  font-family: "Segoe UI Variable Display", var(--font);
  font-size: clamp(36px, 5.6vw, 64px);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.035em;
}
.lede {
  max-width: 44ch;
  margin: 18px auto 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}
.actions { display: flex; justify-content: center; gap: 10px; margin-top: 28px; flex-wrap: wrap; }

/* The window is drawn at the app's real size and scaled to fit. */
.stage {
  --s: 1;
  position: relative;
  width: min(1120px, 100%);
  height: calc(680px * var(--s));
  margin: clamp(44px, 6vw, 72px) auto 0;
}
.win {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1120px;
  height: 680px;
  transform: translateX(-50%) scale(var(--s));
  transform-origin: top center;
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  background: var(--chrome);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.09), 0 50px 120px -30px rgb(0 0 0 / 0.75), 0 20px 40px -20px rgb(0 0 0 / 0.5);
  font-size: 13px;
  text-align: left;
  overflow: hidden;
}

/* sidebar */
.win-side { width: 240px; flex: none; display: flex; flex-direction: column; }
.side-head { display: flex; align-items: center; gap: 2px; height: 32px; padding: 0 6px; }
.side-head-gap { flex: 1; }
.ib { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.ib svg { width: 16px; height: 16px; }
.ib.is-off { opacity: 0.45; color: var(--faint); }

.seg {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 30px;
  margin: 2px 0 6px;
  padding: 3px;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.05);
}
.seg-thumb {
  position: absolute;
  inset: 3px auto 3px 3px;
  width: calc(50% - 3px);
  border-radius: 9px;
  background: var(--active);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1);
}
.seg-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: 500;
  color: var(--muted);
}
.seg-item svg { width: 13px; height: 13px; opacity: 0.65; }
.seg-item.is-on { color: var(--text); }
.seg-item.is-on svg { opacity: 1; }

.addr {
  height: 34px;
  margin-bottom: 8px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.065);
  font-size: 13.5px;
  color: var(--label);
}

.space { display: flex; align-items: center; padding: 2px 0 6px; }
.space-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 7px 0 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--label);
}
.space-chip svg { width: 12px; height: 12px; stroke-width: 2; color: var(--faint); }
.space-plus { margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); }
.space-plus svg { width: 16px; height: 16px; }

.tab {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 8px;
  border-radius: 12px;
  font-weight: 550;
  color: var(--text);
}
.tab svg { width: 14px; height: 14px; color: var(--faint); margin: 0 1px; }
.tab.is-on { background: var(--active); box-shadow: var(--rim); }

.side-fill { flex: 1; }

.dock { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.dock-me {
  width: 40px;
  height: 40px;
  margin: 0 2px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--active);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1);
  color: var(--label);
}
.dock-me svg { width: 17px; height: 17px; }
.dock-rule { width: 1px; height: 30px; border-radius: 999px; background: var(--hair); flex: none; }
.tile {
  position: relative;
  flex: 1;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgb(255 255 255 / 0.06);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.13), inset 0 -1px 0 rgb(255 255 255 / 0.04), inset 0 0 0 1px rgb(255 255 255 / 0.05);
}
.tile img { width: 18px; height: 18px; opacity: 0.82; filter: saturate(0.85); }
.tile.is-front { background: rgb(255 255 255 / 0.12); }
.tile.is-front img { opacity: 1; filter: none; }
.tile i { position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--label); }

/* new tab page */
.win-page {
  position: relative;
  flex: 1;
  border-radius: 12px;
  background: var(--page);
  overflow: hidden;
  isolation: isolate;
}
.sky { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; image-rendering: pixelated; }
.vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgb(18 18 20 / 0.58) 0, rgb(18 18 20 / 0.28) 2.5%, rgb(18 18 20 / 0.09) 5.5%, transparent 9%, transparent 91%, rgb(18 18 20 / 0.09) 94.5%, rgb(18 18 20 / 0.28) 97.5%, rgb(18 18 20 / 0.58) 100%);
}
.notch {
  position: absolute;
  top: 0;
  left: 50%;
  width: 600px;
  height: 50px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  background: var(--chrome);
  border-radius: 0 0 18px 18px;
  font-size: 15px;
  letter-spacing: -0.008em;
  color: var(--faint);
}
.notch-flare { position: absolute; top: 0; width: 14px; height: 14px; }
.notch-flare.l { left: -14px; background: radial-gradient(circle at 0 100%, transparent 13.5px, var(--chrome) 14px); }
.notch-flare.r { right: -14px; background: radial-gradient(circle at 100% 100%, transparent 13.5px, var(--chrome) 14px); }
.notch-icon { width: 16px; height: 16px; color: var(--muted); }
.notch-hint { position: relative; }
.notch-hint::before { content: ""; position: absolute; left: -2px; top: 1px; bottom: 1px; width: 1px; background: var(--text); animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.discs { position: absolute; top: 9px; right: 14px; display: flex; gap: 6px; }
.disc {
  height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.1);
  box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 0.18), inset 0 1px 0 rgb(255 255 255 / 0.18);
  color: #fff;
}
.disc svg { width: 16px; height: 16px; }
.disc-wide { width: 96px; padding: 0 6px; justify-content: space-around; }
.disc-wide svg { width: 13px; height: 13px; }

.center {
  position: absolute;
  left: 0;
  right: 0;
  top: 44%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.mark { width: 150px; }
.when {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  font-size: 16px;
  color: #fff;
  text-shadow: 0 0 1px rgb(2 8 24 / 0.46), 0 1px 5px rgb(2 8 24 / 0.46), 0 1px 18px rgb(2 8 24 / 0.4);
}
.when b { font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.when small { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; opacity: 0.86; }
.when-date { opacity: 0.86; margin-left: 4px; }
.when-date::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-right: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
  vertical-align: middle;
}

.figures { position: absolute; left: 0; right: 0; bottom: 24px; display: flex; justify-content: center; gap: 8px; }
.fig {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: rgb(244 244 246 / 0.05);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.fig svg { width: 14px; height: 14px; color: var(--faint); }
.fig b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.fig em { font-style: normal; color: var(--faint); }
.meter { width: 28px; height: 3px; margin-left: 2px; border-radius: 999px; background: rgb(255 255 255 / 0.22); }

/* ---------- settings band ---------- */
.band {
  max-width: 1120px;
  margin: clamp(96px, 12vw, 150px) auto 0;
  padding: 0 clamp(16px, 4vw, 24px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.band-copy { position: sticky; top: 96px; }
.band h2, .sheet h2 {
  font-family: "Segoe UI Variable Display", var(--font);
  font-size: clamp(27px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.band-copy p { margin-top: 14px; font-size: 15.5px; line-height: 1.65; color: var(--muted); max-width: 40ch; }
.band-copy .hint { font-size: 13.5px; color: var(--faint); }
.band-demo { display: grid; gap: 16px; }

.group-title { margin: 0 0 10px; padding: 0 16px; font-size: 15px; font-weight: 600; line-height: 20px; letter-spacing: -0.012em; }
.card { position: relative; border-radius: 18px; background: var(--surface); overflow: hidden; }
.row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  padding: 14px 18px;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--hair); }
.row-text { flex: 1; min-width: 0; }
.row-text h4 { font-size: 14px; font-weight: 500; line-height: 19px; letter-spacing: -0.008em; }
.row-text p { margin-top: 2px; max-width: 440px; font-size: 12px; line-height: 1.5; color: var(--muted); }

.select {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 120px;
  height: 24px;
  padding: 0 8px 0 10px;
  border-radius: 10px;
  background: var(--active);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1);
  font-size: 12px;
  font-weight: 450;
  flex: none;
}
.select svg { width: 11px; height: 14px; stroke-width: 1.6; color: var(--muted); }

.slider { display: flex; align-items: center; gap: 12px; width: 240px; flex: none; }
.slider input {
  --v: 43.75%;
  flex: 1;
  height: 22px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.slider input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--lit) var(--v), rgb(255 255 255 / 0.14) var(--v));
}
.slider input::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2.5px rgb(0 0 0 / 0.2), 0 0 0 0.5px rgb(0 0 0 / 0.07);
  transition: transform 120ms;
}
.slider input:active::-webkit-slider-thumb { transform: scale(1.08); }
.slider input::-moz-range-track { height: 4px; border-radius: 2px; background: rgb(255 255 255 / 0.14); }
.slider input::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--lit); }
.slider input::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; }
.slider output { min-width: 3ch; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--label); }

.switch {
  position: relative;
  width: 45px;
  height: 20px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.14);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.07);
  cursor: pointer;
  transition: background 200ms;
}
.switch span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 26px;
  height: 16px;
  border-radius: 999px;
  background: #dadadd;
  box-shadow: 0 1px 2.5px rgb(0 0 0 / 0.2), 0 0 0 0.5px rgb(0 0 0 / 0.07);
  transition: transform 260ms cubic-bezier(0.3, 1.4, 0.5, 1), background 200ms;
}
.switch[aria-checked="true"] { background: #9c9ca1; }
.switch[aria-checked="true"] span { transform: translateX(15px); background: #fff; }

/* live preview: a desktop with the window over it */
.desk {
  --o: 0.55;
  --blur: 22px;
  position: relative;
  height: 300px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(60% 80% at 18% 30%, #3f6fd8 0%, transparent 60%),
    radial-gradient(55% 70% at 85% 25%, #c0508f 0%, transparent 60%),
    radial-gradient(70% 80% at 60% 100%, #1fa6a0 0%, transparent 65%),
    linear-gradient(135deg, #182a5c, #2a1640);
}
.desk-icons { position: absolute; top: 18px; left: 18px; display: grid; gap: 14px; }
.desk-icons span { width: 34px; height: 34px; border-radius: 9px; background: rgb(255 255 255 / 0.85); }
.desk-icons span:nth-child(2) { background: #ffd34d; }
.desk-icons span:nth-child(3) { background: #7cd47c; }
.mini {
  position: absolute;
  inset: 34px 34px 34px 70px;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12), 0 30px 60px -20px rgb(0 0 0 / 0.6);
  background: rgb(31 31 34 / var(--o));
  backdrop-filter: blur(var(--blur)) saturate(1.3);
  transition: background 150ms, backdrop-filter 200ms;
}
.mini-side { width: 30%; display: flex; flex-direction: column; gap: 7px; padding: 8px 6px; }
.mini-side i { display: block; height: 9px; border-radius: 4px; background: rgb(255 255 255 / 0.2); }
.mini-side i.on { height: 20px; border-radius: 7px; background: rgb(255 255 255 / 0.12); box-shadow: var(--rim); }
.mini-side .w70 { width: 70%; } .mini-side .w55 { width: 100%; } .mini-side .w60 { width: 60%; } .mini-side .w45 { width: 45%; }
.mini-page { flex: 1; border-radius: 9px; background: var(--canvas); padding: 16px; }
.mini-page i { display: block; height: 8px; border-radius: 3px; background: rgb(255 255 255 / 0.12); margin-bottom: 9px; }
.mini-page .bar { width: 36%; height: 10px; background: rgb(255 255 255 / 0.24); margin-bottom: 16px; }
.mini-page .l80 { width: 80%; } .mini-page .l60 { width: 60%; }
.mini-page .block { height: 86px; margin-top: 14px; border-radius: 10px; background: var(--surface); }

/* ---------- sheets ---------- */
.sheet {
  max-width: 760px;
  margin: clamp(96px, 11vw, 140px) auto 0;
  padding: 0 clamp(16px, 4vw, 24px);
}
.sheet h2 { margin: 0 0 18px 16px; }
.value { flex: none; font-size: 13px; color: var(--label); }
.value-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.value-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #7bd88f; box-shadow: 0 0 0 3px rgb(123 216 143 / 0.18); }
.row-link { transition: background 120ms; }
.row-link:hover { background: var(--hover); }
.row-icon { width: 36px; height: 36px; flex: none; border-radius: 9px; }
.row-icon-empty { border: 1px dashed rgb(255 255 255 / 0.14); }
.row.is-dim .row-text, .row.is-dim .value { opacity: 0.55; }
.row.has-icon, .row:has(.row-icon) { justify-content: flex-start; gap: 14px; }

/* profile */
.profile { padding-bottom: 22px; }
.profile-banner { position: relative; height: 150px; overflow: hidden; }
.profile-banner img:first-child { width: 100%; height: 100%; object-fit: cover; object-position: center 65%; image-rendering: pixelated; }
.profile-mark { position: absolute; right: 22px; bottom: 18px; width: 120px; opacity: 0.9; }
.profile-head { display: flex; align-items: flex-end; gap: 16px; padding: 0 22px; margin-top: -32px; position: relative; }
.avatar {
  width: 80px;
  height: 80px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(180deg, oklch(70% 0.012 265), oklch(53% 0.012 265));
  box-shadow: 0 0 0 4px var(--surface), inset 0 0 0 0.5px rgb(0 0 0 / 0.14);
  font-size: 30px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
  overflow: hidden;
}
.avatar:has(img) { background: #ededf0; }
.avatar img { width: 86%; height: 86%; margin-top: 10%; object-fit: contain; }
.profile-head h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.profile-head p { margin-top: 2px; padding-bottom: 6px; font-size: 13px; color: var(--muted); }
.profile-bio { margin: 18px 22px 0; max-width: 60ch; font-size: 14px; line-height: 1.65; color: var(--muted); }
.langs {
  list-style: none;
  margin: 20px 22px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 6px;
}
.lang {
  position: relative;
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 18px;
  background: rgb(255 255 255 / 0.06);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.13), inset 0 -1px 0 rgb(255 255 255 / 0.04), inset 0 0 0 1px rgb(255 255 255 / 0.05);
}
.lang img { width: 22px; height: 22px; }
.lang span { font-size: 11.5px; color: var(--muted); }
.lang.is-front { background: rgb(255 255 255 / 0.12); }
.lang.is-front img { filter: invert(1); }
.lang.is-front span { color: var(--text); font-weight: 550; }
.lang i { position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--label); }

/* ---------- footer ---------- */
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: clamp(96px, 11vw, 140px) auto 0;
  padding: 22px clamp(16px, 4vw, 24px) 36px;
  border-top: 1px solid var(--hair);
  font-size: 13px;
  color: var(--faint);
}
.foot span:first-child { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.foot img { border-radius: 5px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .band { grid-template-columns: 1fr; }
  .band-copy { position: static; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav { justify-content: space-between; }
  .row { flex-wrap: wrap; gap: 12px; }
  .slider { width: 100%; }
  .desk { height: 240px; }
  .mini { inset: 24px 18px 24px 62px; }
  .profile-mark { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .win { animation: rise 0.8s var(--ease) both 0.1s; }
}
@keyframes rise { from { opacity: 0; transform: translateX(-50%) translateY(24px) scale(var(--s)); } }
