/* Dockscene site. Tokens first; the hero's sky is driven from app.js. */

/* Self-hosted, latin subset, variable weight (SIL OFL 1.1, see fonts/). */
@font-face { font-family: "Unbounded"; src: url("/fonts/unbounded-latin.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("/fonts/martian-mono-latin.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }

@property --sky1 { syntax: "<color>"; inherits: true; initial-value: #2F6FB8; }
@property --sky2 { syntax: "<color>"; inherits: true; initial-value: #E8A07E; }
@property --t1 { syntax: "<color>"; inherits: true; initial-value: #4DA3FF; }
@property --t2 { syntax: "<color>"; inherits: true; initial-value: #0A6CF0; }

:root {
  --bg: #E8ECF2;
  --surface: #F6F7FA;
  --ink: #101626;
  --ink-2: #4A5469;
  --ink-3: #737C91;
  --rule: #D2D8E2;
  --accent: #1C6DA6;
  --accent-ink: #FFFFFF;

  /* macOS UI replicas follow the page's appearance */
  --ui-bg: #ECECEF;
  --ui-group: #FFFFFF;
  --ui-line: #E4E4E8;
  --ui-text: #1D1D1F;
  --ui-note: #6E6E73;
  --ui-switch: #34C759;
  --ui-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 30px 60px -30px rgba(16,22,38,.35), 0 0 0 1px rgba(16,22,38,.08);

  --display: "Unbounded", ui-rounded, system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --page: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0F19;
    --surface: #131A28;
    --ink: #E9EDF5;
    --ink-2: #A5AEC0;
    --ink-3: #6F7890;
    --rule: #242D40;
    --accent: #5AAEE6;
    --accent-ink: #06121E;

    --ui-bg: #1F1F22;
    --ui-group: #2A2A2E;
    --ui-line: #3A3A3E;
    --ui-text: #F2F2F7;
    --ui-note: #9A9AA0;
    --ui-switch: #30D158;
    --ui-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 30px 60px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.06);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

.g { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header ---------- */

.top {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 18px var(--gutter) 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 7px; }
.brand span { font: 600 16px/1 var(--display); letter-spacing: -0.01em; }
.top-link {
  font: 500 14px/1 var(--sans); text-decoration: none;
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--rule);
}
.top-link:hover { border-color: var(--ink-3); }

/* ---------- Hero screen ---------- */

.hero {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.screen {
  position: relative;
  min-height: clamp(560px, 82vh, 720px);
  border-radius: 26px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: linear-gradient(178deg, var(--sky1) 8%, var(--sky2) 100%);
  transition: --sky1 1.2s ease, --sky2 1.2s ease;
  box-shadow: 0 40px 80px -40px rgba(16, 22, 38, .55), 0 0 0 1px rgba(16, 22, 38, .08);
}
.screen::after { /* faint low horizon so the dock has ground to sit on */
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(180deg, transparent, rgba(8, 10, 24, .22));
  pointer-events: none; z-index: -1;
}

.menubar {
  position: absolute; inset: 0 0 auto 0; height: 28px;
  display: flex; align-items: center; gap: 18px;
  padding: 0 16px;
  font: 500 13px/1 var(--sans);
  background: rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.menubar b { font-weight: 700; }
.menubar span { opacity: .92; }
.mb-right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-variant-numeric: tabular-nums; }
.mb-dock { width: 17px; height: 17px; stroke-width: 1.8; }

.hero-copy {
  position: relative;
  padding: clamp(72px, 11vh, 108px) clamp(20px, 5vw, 64px) 150px;
  max-width: 780px;
}
h1 {
  font: 500 clamp(2.35rem, 5.6vw, 4.5rem)/1.02 var(--display);
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(8, 10, 30, .18);
}
.lede {
  margin-top: 22px;
  max-width: 34em;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.5;
  color: rgba(255, 255, 255, .9);
  text-wrap: pretty;
}

/* ---------- Download ---------- */

.get-row { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.get {
  display: inline-flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 22px;
  font: 600 16px/1 var(--sans); text-decoration: none;
  color: #0E1426; background: #fff;
  border-radius: 14px;
  transition: transform .15s ease, opacity .15s ease;
}
.get:hover { transform: translateY(-1px); }
.get:active { transform: none; opacity: .9; }
.get:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.get svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.get-beta, .get-more { font: 500 14px/1.3 var(--sans); color: rgba(255, 255, 255, .86); }
.get-more { text-decoration: underline; text-underline-offset: 3px; }
.get-more:hover { color: #fff; }
/* The Homebrew command, for those who'd rather install from Terminal. */
.brew {
  margin-top: 14px;
  display: flex; align-items: center; gap: 6px;
  width: fit-content; max-width: 100%;
  padding: 4px 4px 4px 14px;
  border-radius: 12px;
  background: rgba(10, 14, 30, .26);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.brew code {
  min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none;
  font: 400 13px/1.6 var(--mono); color: #fff;
}
.brew code::-webkit-scrollbar { display: none; }
.brew code::before { content: "$ " / ""; color: rgba(255, 255, 255, .55); }
.brew .copy {
  flex: none; height: 30px; padding: 0 12px;
  font: 600 12.5px/1 var(--sans); color: #fff;
  border: 0; border-radius: 8px; cursor: pointer;
  background: rgba(255, 255, 255, .16);
}
.brew .copy:hover { background: rgba(255, 255, 255, .26); }
.brew .copy:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* Too long for a phone's width: it breaks after --cask instead of hiding its end. */
@media (max-width: 560px) { .brew code { white-space: normal; } }
.hp { position: absolute; left: -9999px; }
.fine {
  margin-top: 12px;
  font: 400 11px/1.6 var(--mono);
  letter-spacing: .01em;
  color: rgba(255, 255, 255, .78);
}

/* ---------- The dock ---------- */

.dock-area {
  position: absolute; left: 0; right: 0; bottom: 14px;
  display: flex; justify-content: center;
  transition: transform .6s cubic-bezier(.3, .7, .2, 1), opacity .4s ease;
}
.dock { position: relative; transform: scale(var(--s, 1)); transform-origin: 50% 100%; }
.glass {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .06)), rgba(22, 24, 40, .34);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .4), 0 20px 40px -16px rgba(0, 0, 0, .45);
}
.row {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px;
  height: 66px;
  white-space: nowrap;
}
.row > * { flex: none; }
/* Items leaving the dock fade where they stood; .dock > raises this above .app's position. */
.dock > .ghost { position: absolute; margin: 0; pointer-events: none; }

.badge {
  height: 48px; min-width: 48px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 11px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(180deg, var(--t1), var(--t2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
  overflow: hidden;
  transition: --t1 .45s ease, --t2 .45s ease;
}
.badge .g { width: 26px; height: 26px; flex: none; }
.badge-text { display: grid; line-height: 1.15; padding-right: 6px; }
.badge-text b { font: 700 14px/1.15 var(--sans); }
.badge-text span { font-size: 12.5px; opacity: .9; }
.badge:not(.open):not(.closing) .badge-text { display: none; }

.app {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: var(--fg, #fff);
  background: var(--bgc);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25), inset 0 0 0 .5px rgba(255, 255, 255, .3), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.app .g { width: 27px; height: 27px; }
.app.run::after {
  content: ""; position: absolute; left: 50%; bottom: -7px;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: rgba(255, 255, 255, .8);
}
.app .num {
  position: absolute; top: -5px; right: -6px;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px;
  font: 700 11.5px/19px var(--sans); text-align: center;
  color: #fff; background: #FF3B30;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.app.cal { background: #fff; color: #1D1D1F; display: grid; grid-template-rows: 15px 1fr; place-items: center; padding: 3px 0 4px; }
.app.cal small { font: 700 9px/1 var(--sans); color: #FF3B30; letter-spacing: .04em; align-self: end; }
.app.cal b { font: 400 25px/1 var(--sans); margin-top: 1px; }
.app.notes { background: linear-gradient(180deg, #FFD43B 0 30%, #FFFDF5 30%); }
.app.notes i { position: absolute; left: 9px; right: 9px; height: 1.5px; background: #D8D4C8; }
.app.notes i:nth-child(1) { top: 22px; } .app.notes i:nth-child(2) { top: 29px; } .app.notes i:nth-child(3) { top: 36px; right: 17px; }

.sep { width: 1px; height: 38px; margin: 0 3px; background: rgba(255, 255, 255, .26); }

/* widgets: straight on the glass, like the app's Glass surface */
.w {
  height: 48px; min-width: 128px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px 0 8px;
  border-radius: 12px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.w.tinted { background: var(--wt); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.w .st { display: grid; line-height: 1.15; }
.w .big { font: 650 19px/1.1 var(--sans); letter-spacing: -.01em; }
.w .mid { font: 600 14px/1.2 var(--sans); }
.w .sm { font-size: 11.5px; color: rgba(255, 255, 255, .74); }
.w .wg { width: 30px; height: 30px; flex: none; }
.w .wg.sun { color: #FFD43B; }
.w .wg.moon { color: #E8E6FF; }
.w .ring { width: 34px; height: 34px; flex: none; position: relative; display: grid; place-items: center; }
.w .ring svg { position: absolute; inset: 0; width: 34px; height: 34px; transform: rotate(-90deg); }
.w .ring circle { fill: none; stroke-width: 3.4; stroke-linecap: round; }
.w .ring .bg { stroke: rgba(255, 255, 255, .2); }
.w .ring b { font: 700 10.5px/1 var(--sans); }
.w .bars { display: grid; gap: 5px; width: 132px; }
.w .bar { display: grid; grid-template-columns: 44px 1fr 20px; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; }
.w .bar i { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.w .bar i::before { content: ""; display: block; height: 100%; width: var(--v); background: var(--c, #7BE38F); border-radius: 2px; }
.w .bar em { font-style: normal; text-align: right; color: rgba(255, 255, 255, .8); }
.w .glyphbox { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--gb, rgba(255, 255, 255, .16)); }
.w .glyphbox .g { width: 19px; height: 19px; }
.w .join { margin-left: 4px; padding: 5px 10px; border-radius: 8px; background: #fff; color: #1C8A3E; font: 700 12px/1 var(--sans); }
.w .notebar { width: 3px; align-self: stretch; margin: 7px 0; border-radius: 2px; background: #FFD43B; }
.w .cover { width: 34px; height: 34px; border-radius: 7px; flex: none; background: conic-gradient(from 210deg at 30% 70%, #F7B267, #F4845F, #7B5EA7, #355C7D, #F7B267); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .3); }
.w .dayline { width: 80px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.w .dayline::before { content: ""; display: block; height: 100%; width: var(--v); background: #fff; }

/* full screen at the end of the day */
.screen.full .menubar { transform: translateY(-100%); }
.screen.full .dock-area { transform: translateY(140%); opacity: 0; }
.fs-note {
  position: absolute; right: 22px; bottom: 20px;
  font: 400 11px/1 var(--mono); letter-spacing: .02em;
  color: rgba(255, 255, 255, .7);
  opacity: 0; transition: opacity .4s ease .3s;
}
.screen.full .fs-note { opacity: 1; }

/* ---------- Day timeline ---------- */

.day { padding: 18px 2px 0; }
.day-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 34px; }
.label, .eyebrow {
  font: 400 11px/1.4 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.play {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 9px;
  font: 500 13px/1 var(--sans); color: var(--ink-2);
  background: transparent; border: 1px solid var(--rule); border-radius: 999px;
  cursor: pointer;
}
.play:hover { color: var(--ink); border-color: var(--ink-3); }
.play .g { width: 15px; height: 15px; stroke-width: 2.2; }
.play .i-play { fill: currentColor; }
.play[data-playing="true"] .i-play, .play[data-playing="false"] .i-pause { display: none; }

.track { position: relative; height: 40px; }
.bands { position: absolute; inset: 0; display: flex; gap: 3px; }
.band {
  position: relative; height: 100%;
  border-radius: 9px;
  background: color-mix(in srgb, var(--c) 18%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 34%, transparent);
  overflow: hidden;
  transition: background .3s ease;
}
.band.now { background: color-mix(in srgb, var(--c) 34%, transparent); }
.band span {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font: 500 11px/1 var(--mono); letter-spacing: .01em;
  color: color-mix(in srgb, var(--c) 70%, var(--ink));
  white-space: nowrap;
}
.track input {
  position: absolute; inset: -6px 0; width: 100%; height: calc(100% + 12px);
  margin: 0; opacity: 0; cursor: grab; z-index: 2;
}
.track input:active { cursor: grabbing; }
.track:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; }
.head {
  position: absolute; top: -6px; bottom: -6px; width: 2px; margin-left: -1px;
  background: var(--ink); border-radius: 1px; pointer-events: none; z-index: 1;
}
.head span {
  position: absolute; top: -24px; left: 50%; transform: translateX(-50%);
  padding: 3px 6px; border-radius: 6px;
  font: 500 11px/1 var(--mono);
  color: var(--bg); background: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ticks { display: flex; justify-content: space-between; margin-top: 8px; font: 400 10.5px/1 var(--mono); color: var(--ink-3); }

/* ---------- Sections ---------- */

.section {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(96px, 14vw, 150px) var(--gutter) 0;
}
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.split.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.narrow { max-width: 720px; }

.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.swatches { display: flex; gap: 3px; }
.swatches i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }

h2 {
  font: 500 clamp(1.7rem, 3.1vw, 2.45rem)/1.12 var(--display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h3 { font: 650 18px/1.3 var(--sans); letter-spacing: -.01em; }
.body { margin-top: 20px; color: var(--ink-2); max-width: 36em; text-wrap: pretty; }
.body + .body { margin-top: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.chips li {
  padding: 7px 10px;
  font: 400 11.5px/1 var(--mono);
  border: 1px solid var(--rule); border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
}

.rules { margin-top: 30px; display: grid; gap: 16px; }
.rules div { display: grid; gap: 2px; }
.rules dt { font-weight: 650; }
.rules dd { color: var(--ink-2); }

/* ---------- macOS replicas ---------- */

.mac-fig figcaption, .script-fig figcaption {
  margin-top: 14px;
  font: 400 11px/1.5 var(--mono); color: var(--ink-3);
}
.mac {
  font: 13px/1.35 var(--sans);
  color: var(--ui-text);
  background: var(--ui-bg);
  border-radius: 16px;
  box-shadow: var(--ui-shadow);
  user-select: none;
}
.switch {
  width: 38px; height: 22px; flex: none;
  border-radius: 11px; position: relative;
  background: color-mix(in srgb, var(--ui-note) 45%, transparent);
}
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch.on { background: var(--ui-switch); }
.switch.on::after { left: 18px; }

.picker-fig { width: 100%; max-width: 420px; margin-left: auto; }
.picker { padding: 18px 16px 14px; }
.picker-now { display: grid; padding: 2px 6px 14px; border-bottom: 1px solid var(--ui-line); }
.picker-now b { font-size: 17px; }
.picker-now span { color: var(--ui-note); }
.picker-list { padding: 8px 0; border-bottom: 1px solid var(--ui-line); }
.picker-list li { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 7px 6px; border-radius: 9px; }
.picker-list li.on { background: color-mix(in srgb, #5E5CE6 16%, transparent); }
.picker-list span { display: grid; min-width: 0; }
.picker-list b { font-size: 15px; font-weight: 500; }
.picker-list small { font-size: 12.5px; color: var(--ui-note); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-list kbd { font: 12px var(--sans); color: var(--ui-note); }
.sq { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, var(--t1), var(--t2)); }
.sq .g { width: 20px; height: 20px; }
.picker-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 6px 2px; font-size: 15px; }

.settings { padding: 20px; }
.set-head { margin: 22px 0 8px 14px; font-weight: 700; }
.set-group { background: var(--ui-group); border-radius: 11px; box-shadow: 0 0 0 1px var(--ui-line); padding: 0 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 0; }
.set-row + .set-row { border-top: 1px solid var(--ui-line); }
.set-row > span:first-child { display: grid; gap: 2px; }
.set-row b { font-weight: 500; font-size: 13.5px; }
.set-row small { font-size: 12px; color: var(--ui-note); }
.popup { flex: none; font-weight: 500; padding: 3px 8px; border-radius: 6px; background: color-mix(in srgb, var(--ui-note) 16%, transparent); }
.popup::after { content: " ⌃"; display: inline-block; transform: rotate(180deg) translateY(2px); font-size: 10px; opacity: .6; margin-left: 2px; }

/* ---------- Widget gallery: pick one, try its layouts and sizes, open its popover ---------- */

.gallery {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.g-list { display: grid; gap: 18px; position: sticky; top: 24px; }
.g-cat { display: grid; gap: 2px; }
.g-cat .label { margin: 0 0 6px 10px; }
.g-list button {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 0; border-radius: 9px;
  font: 500 15px/1.2 var(--sans); text-align: left;
  color: var(--ink-2); background: transparent;
  cursor: pointer;
}
.g-list button:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.g-list button[aria-pressed="true"] { color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--rule); }
.g-list i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); flex: none; }

.g-main { min-width: 0; }
.g-stage {
  position: relative;
  height: 700px;
  border-radius: 24px;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: 0 20px 22px;
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(255, 190, 150, .42), transparent 55%),
    linear-gradient(165deg, #2E3378 0%, #6E4A8C 55%, #BD687E 100%);
  box-shadow: 0 0 0 1px rgba(16, 22, 38, .08);
}

.g-strip {
  position: relative; z-index: 1;
  padding: 9px 11px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .06)), rgba(22, 24, 40, .34);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .4), 0 20px 40px -16px rgba(0, 0, 0, .45);
}
.g-tile {
  display: block; padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 17px;
  transition: transform .18s ease;
}
.g-tile:hover { transform: translateY(-2px); }
.g-tile:active { transform: translateY(0) scale(.98); }
.g-tile:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.g-tile img {
  display: block; height: auto;
  border-radius: 16px;
  box-shadow: 0 0 0 .5px rgba(255, 255, 255, .18);
  transition: width .28s cubic-bezier(.3, .8, .25, 1);
}
.g-hint {
  margin-top: 10px;
  font: 400 10.5px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
  transition: opacity .3s ease;
}
.g-stage.opened .g-hint { opacity: 0; }

/* The popover: its front is the detail, its back the options page, as in the app. */
.g-pop {
  position: absolute; left: 50%; z-index: 2;
  transform: translateX(-50%);
  perspective: 1600px;
  transform-origin: 50% 100%;
}
.g-pop.showing { animation: g-rise .28s cubic-bezier(.3, .8, .25, 1); }
@keyframes g-rise { from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.96); } }
.g-pop::after { /* the arrow down to the tile */
  content: ""; position: absolute; left: 50%; bottom: -9px; margin-left: -10px;
  border: 10px solid transparent; border-bottom: 0; border-top-color: var(--pop-edge, #323232);
  transition: opacity .2s ease;
}
.g-pop.flipped::after { border-top-color: var(--pop-edge-back, #323232); }
.g-card {
  position: relative;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.3, .8, .25, 1), height .35s ease;
}
.g-pop.flipped .g-card { transform: rotateY(180deg); }
.g-face {
  position: absolute; left: 0; top: 0; width: 100%;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  border-radius: 13px; overflow: hidden;
  box-shadow: 0 0 0 .5px rgba(255, 255, 255, .22), 0 30px 60px -20px rgba(0, 0, 0, .6);
}
.g-face.back { transform: rotateY(180deg); }
.g-face img { display: block; width: 100%; height: auto; }
.g-flip {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; cursor: pointer;
  color: #fff; background: rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .35);
}
.g-flip:hover { background: rgba(255, 255, 255, .32); }
/* On the back, the options page draws its own back button top left: this one sits over it, unseen. */
.g-pop.flipped .g-flip { left: 10px; right: auto; top: 10px; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.g-pop.flipped .g-flip .g-icon { visibility: hidden; }
.g-flip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.g-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-pop:not(.flipped) .i-back, .g-pop.flipped .i-options { display: none; }

.g-info {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px 32px;
  margin-top: 22px;
}
.g-name { font: 650 20px/1.25 var(--sans); letter-spacing: -.01em; }
.g-blurb { margin-top: 4px; color: var(--ink-2); max-width: 30em; }
.g-controls { display: grid; gap: 10px; }
.g-row { display: grid; grid-template-columns: 58px auto; align-items: center; gap: 10px; }
.g-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.g-chips button {
  padding: 7px 11px;
  border: 0; border-radius: 8px;
  font: 500 13.5px/1 var(--sans);
  color: var(--ink-2); background: var(--surface);
  box-shadow: 0 0 0 1px var(--rule);
  cursor: pointer;
}
.g-chips button:hover:not([disabled]) { color: var(--ink); }
.g-chips button[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); box-shadow: none; }
.g-chips button[disabled] { opacity: .4; cursor: default; }
.g-note { margin-top: 18px; font: 400 11px/1.6 var(--mono); color: var(--ink-3); }

/* ---------- The small things ---------- */

.cards { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  overflow: hidden;
  padding-bottom: 24px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--rule);
}
.shot {
  height: 260px; overflow: hidden;
  display: flex; justify-content: center; align-items: flex-start;
  padding-top: 26px;
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(255, 190, 150, .4), transparent 55%),
    linear-gradient(160deg, #3A3F86 0%, #7A4F8E 60%, #C06A7E 100%);
}
.shot img {
  width: 240px; height: auto;
  border-radius: 13px 13px 0 0;
  box-shadow: 0 0 0 .5px rgba(255, 255, 255, .2), 0 24px 44px -14px rgba(0, 0, 0, .6);
}
.card h3 { margin: 20px 22px 0; }
.card p { margin: 6px 22px 0; color: var(--ink-2); font-size: 15.5px; }
.card code { font: 400 12px/1.5 var(--mono); padding: 1px 5px; border-radius: 5px; color: var(--ink); background: var(--bg); box-shadow: 0 0 0 1px var(--rule); white-space: nowrap; }

/* ---------- Script ---------- */

.script-fig { min-width: 0; }
.code {
  border-radius: 16px;
  background: #0F1422;
  color: #D9E0EE;
  padding: 18px 20px 20px;
  overflow-x: auto;
  box-shadow: 0 30px 60px -30px rgba(16, 22, 38, .5), 0 0 0 1px rgba(255, 255, 255, .06);
}
.code-path { font: 400 11px/1.5 var(--mono); color: #8390AA; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid #222A3C; overflow-wrap: anywhere; }
.code-path b { color: #fff; font-weight: 500; }
.code pre { margin: 0; font: 400 12.5px/1.75 var(--mono); }
.code .c { color: #7C88A2; }
.script-out { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.script-out .arrow { font: 400 11px/1 var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.script-out .arrow::after { content: " →"; }
.tile-demo { padding: 14px; border-radius: 18px; background: linear-gradient(160deg, #2F6FB8, #4B7FC4 50%, #D99A82); }
.script-fig figcaption b { color: var(--ink); font-weight: 500; }

/* ---------- Energy & privacy ---------- */

.trio { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.trio > div { padding-top: 18px; border-top: 2px solid var(--ink); }
.trio p { margin-top: 10px; color: var(--ink-2); }

/* ---------- Questions ---------- */

.faq-split { align-items: start; }
.faq-split > div:first-child { position: sticky; top: 32px; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 18px 0;
  font: 650 18px/1.35 var(--sans);
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 20px/1 var(--mono); color: var(--ink-3); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline-offset: 2px; }
.faq details > :not(summary) { color: var(--ink-2); }
.faq details > :last-child { margin-bottom: 22px; }
.faq details p + p, .faq details ul + p, .faq details p + ul, .faq details p + pre { margin-top: 12px; }
.faq ul { list-style: disc; padding-left: 20px; display: grid; gap: 6px; }
.faq b { color: var(--ink); font-weight: 600; }
.faq kbd { font: 500 12.5px/1.5 var(--sans); padding: 1px 6px; border-radius: 5px; background: var(--surface); box-shadow: 0 0 0 1px var(--rule), 0 1px 0 var(--rule); }
.faq code { font: 400 12.5px/1.5 var(--mono); padding: 1px 5px; border-radius: 5px; background: var(--surface); box-shadow: 0 0 0 1px var(--rule); overflow-wrap: anywhere; }
.faq pre { padding: 12px 14px; border-radius: 10px; background: #0F1422; overflow-x: auto; }
.faq pre code { padding: 0; background: none; box-shadow: none; color: #D9E0EE; white-space: pre-wrap; word-break: break-all; }

/* ---------- Closing ---------- */

.closing {
  position: relative; overflow: hidden;
  padding: clamp(40px, 7vw, 80px) clamp(22px, 6vw, 72px);
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(178deg, #141B3E 0%, #3A2C5E 100%);
}
.closing .body { color: rgba(255, 255, 255, .82); }
.closing .fine { color: rgba(255, 255, 255, .6); }

.foot {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font: 400 11px/1.6 var(--mono); color: var(--ink-3);
}

/* ---------- Thanks & 404 ---------- */

.plain { max-width: 640px; margin: 0 auto; padding: 18vh var(--gutter) 0; }
.plain .body { margin-top: 16px; }
.plain .back { display: inline-block; margin-top: 28px; font-weight: 600; color: var(--accent); }

/* ---------- Problem report ---------- */

.report { margin-top: 28px; display: grid; gap: 18px; }
.report label { display: grid; gap: 7px; font-weight: 600; }
.report label small { font-weight: 400; color: var(--ink-3); }
.report textarea, .report input[type="email"] {
  width: 100%; padding: 12px 14px;
  font: 16px/1.5 var(--sans); color: var(--ink);
  border: 0; border-radius: 12px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--rule);
}
.report textarea { min-height: 170px; resize: vertical; }
.report textarea:focus-visible, .report input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.report button {
  justify-self: start; height: 46px; padding: 0 22px;
  font: 600 15px/1 var(--sans); color: var(--accent-ink); background: var(--accent);
  border: 0; border-radius: 12px; cursor: pointer;
}
.report button[disabled] { opacity: .6; cursor: progress; }
.report .about { font: 400 12px/1.6 var(--mono); color: var(--ink-3); }
.report .about:empty { display: none; }
.report .status { font-weight: 600; }
.report .status:empty { display: none; }
.report.done label, .report.done button, .report.done .about { display: none; }

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .split, .split.flip { grid-template-columns: minmax(0, 1fr); }
  .split.flip > figure { order: 2; }
  .picker-fig { margin-left: 0; }
  .trio { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-split > div:first-child { position: static; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .g-list {
    position: static;
    display: flex; gap: 6px;
    overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 8px;
    scrollbar-width: none;
  }
  .g-list::-webkit-scrollbar { display: none; }
  .g-cat { display: contents; }
  .g-cat .label { display: none; }
  .g-list button { width: auto; white-space: nowrap; background: var(--surface); box-shadow: 0 0 0 1px var(--rule); }
  .g-list button[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); box-shadow: none; }
  .g-list button[aria-pressed="true"] i { background: var(--accent-ink); }
  .g-stage { height: 620px; }
  .g-row { grid-template-columns: 48px auto; }
}
@media (max-width: 720px) {
  .screen { border-radius: 20px; min-height: 0; }
  .menubar { gap: 12px; font-size: 12px; }
  .mb-menu { display: none; }
  .hero-copy { padding-top: 64px; padding-bottom: 120px; }
  .band span { display: none; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .ticks li:nth-child(even) { visibility: hidden; }
  .settings { padding: 14px; }
  .set-row { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .screen, .menubar, .dock-area, .fs-note, .band { transition: none; }
  .g-card, .g-tile img { transition: none; }
  .g-pop.showing { animation: none; }
}
