/* Fonts are self-hosted subsets (Latin-1). Bricolage comes as two fixed styles:
   800 for h1/h2 and 700 (with an opsz axis) for smaller headings. */
@font-face { font-family: "Bricolage Grotesque"; src: url(fonts/bricolage-800.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url(fonts/bricolage-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Geist"; src: url(fonts/geist.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url(fonts/silkscreen.woff2) format("woff2"); font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #f7f4ee;
  --card: #fffdf9;
  --ink: #17161a;
  --muted: #67625b;
  --line: #e6e0d5;
  --accent: #ff5a36;
  --accent-text: #c4381a;
  --dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Crect x='10' y='10' width='2' height='2' fill='%2317161a' fill-opacity='.07'/%3E%3C/svg%3E");
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --text: "Geist", system-ui, -apple-system, sans-serif;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111013;
    --card: #19181c;
    --ink: #f4f1ea;
    --muted: #a39e96;
    --line: #2a282e;
    --accent-text: #ff5a36;
    --dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Crect x='10' y='10' width='2' height='2' fill='%23f4f1ea' fill-opacity='.07'/%3E%3C/svg%3E");
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* The cursor pixel blinks a few times, then stays on. */
.px {
  display: inline-block;
  width: 0.24em;
  height: 0.24em;
  margin-left: 0.05em;
  background: var(--accent);
  animation: blink 1.2s steps(1) 3 .6s;
}

@keyframes blink { 50% { opacity: 0; } }

/* Header */

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font: 400 15px var(--pixel);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.mark {
  display: grid;
  grid-template-columns: 9px 9px;
  gap: 2px;
  transition: transform .5s var(--spring);
}

.logo:hover .mark { transform: rotate(90deg); }
.mark i { width: 9px; height: 9px; background: var(--ink); }
.mark i:nth-child(2), .mark i:nth-child(3) { opacity: 0.3; }
.mark i:nth-child(4) { background: var(--accent); }

.site-header nav { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 15px; }
.site-header nav a { padding: 10px 4px; text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--ink); }

/* Home hero */

.hero {
  position: relative;
  margin-top: -80px;
  padding: 128px 0 56px;
}

.pixels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--dots);
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}

.hero-inner { position: relative; }

.kicker {
  margin: 0 0 18px;
  font: 13px var(--pixel);
  color: var(--accent-text);
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 11.5em;
  font: 800 clamp(44px, 8.4vw, 104px)/1.02 var(--display);
  letter-spacing: -0.01em;
}

.hl {
  display: inline-block;
  margin: 0.04em 0;
  padding: 0 0.12em 0.04em;
  border-radius: 0.12em;
  background: var(--accent);
  color: #fff;
  transform: rotate(-1.5deg);
}

.lede {
  max-width: 34em;
  margin: 26px 0 0;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
}

/* App grid */

.section-head { margin-bottom: 20px; }

.section-head h2 {
  margin: 0;
  font: 13px var(--pixel);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.apps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding-bottom: 96px;
}

.app {
  --tint: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s;
}

.app:hover, .app:has(.card-link:focus-visible) {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tint) 45%, var(--line));
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 24px 48px -28px color-mix(in srgb, var(--tint) 45%, transparent);
}

.app:has(.card-link:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }

.stage {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--stage, color-mix(in srgb, var(--tint) 14%, var(--card)));
}

.stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .6s var(--ease);
}

/* A window that peeks up from the bottom of the stage. */
.stage.peek img {
  width: 72%;
  height: auto;
  margin: 4% auto 0;
  border-radius: var(--r-md);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .35);
}

.app:hover .stage img { transform: scale(1.02); }

.app .body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 22px 22px;
}

.app h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  font: 700 24px/1.15 var(--display);
  font-variation-settings: "opsz" 48;
  letter-spacing: -0.01em;
}

.mini-icon { flex: none; width: 40px; height: 40px; }

.app p { margin: 0; color: var(--muted); font-size: 15px; }


.card-link { text-decoration: none; }
.card-link:focus-visible { outline: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tint) 12%, transparent);
  color: color-mix(in srgb, var(--tint) 75%, var(--ink));
  font-size: 12.5px;
  font-weight: 500;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: auto;
  padding-top: 18px;
}

.btn {
  padding: 8px 18px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background .2s, color .2s;
}

/* Hover colour is darkened so white text keeps 4.5:1 contrast. */
.btn:hover, .app:hover .btn, .app:focus-within .btn {
  background: color-mix(in srgb, var(--tint, var(--accent)) 85%, #000);
  color: #fff;
}

.link { font-size: 14px; color: var(--muted); text-underline-offset: 3px; }
.link:hover { color: var(--ink); }

/* App page */

.app-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 72px;
  padding-top: 32px;
  padding-bottom: 96px;
}

.app-hero > * { min-width: 0; }

.app-icon {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18));
}

.app-page h1 { font-size: clamp(56px, 9vw, 112px); }
.app-hero .actions { margin-top: 32px; padding-top: 0; }
.btn.big { padding: 13px 28px; font-size: 16px; }

.meta { margin: 20px 0 0; font-size: 14px; color: var(--muted); }
.meta b { color: var(--ink); font-weight: 500; }
.on-phone { display: none; }

.showcase { margin: 0; }

.showcase img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  box-shadow: 0 40px 80px -36px color-mix(in srgb, var(--plate) 90%, #000);
  transition: box-shadow .4s var(--ease);
}

.picker {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.picker legend { padding: 0; margin-bottom: 10px; font-size: 14px; color: var(--muted); }
.picker legend b { color: var(--ink); font-weight: 500; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }

.swatches button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid var(--bg);
  border-radius: 8px;
  background: var(--c);
  box-shadow: 0 0 0 1px var(--muted);
  cursor: pointer;
  transition: transform .3s var(--spring);
}

.swatches button:hover { transform: translateY(-2px); }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); transform: scale(1.12); }

.block { padding-bottom: 96px; }

.block h2, .install h2 {
  margin: 0;
  font: 800 clamp(32px, 5vw, 48px)/1.05 var(--display);
  letter-spacing: -0.01em;
}

.section-lede { max-width: 38em; margin: 14px 0 32px; color: var(--muted); font-size: 17px; }
.section-lede b { color: var(--ink); font-weight: 500; }

.faces {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.face { margin: 0; }

.faces img, .wide {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  box-shadow: 0 0 0 1px var(--line);
  transition: transform .5s var(--ease);
}

.face:hover img { transform: translateY(-3px); }

.face figcaption, .shot figcaption { margin-top: 12px; font-size: 15px; color: var(--muted); }

.face figcaption b, .shot figcaption b, .features b {
  display: block;
  color: var(--ink);
  font: 700 19px/1.3 var(--display);
  font-variation-settings: "opsz" 24;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.features li {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.features b { margin-bottom: 6px; }

kbd {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  font: 500 0.85em var(--text);
  white-space: nowrap;
}

/* Screenshots of an app's windows, shown at their real size. */
.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 300px));
  gap: 32px 40px;
  align-items: start;
}

.shot { margin: 0; }
.shot.tall { grid-row: span 2; }

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -32px rgba(0, 0, 0, .3);
}


/* WordPop: a small working copy of the popup. Its colours match the app, in both modes. */
.wp-demo {
  padding: 32px;
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--tint) 10%, var(--card));
}

.wp-doc { margin: 0 0 18px; font: 24px/1.5 ui-serif, "New York", Georgia, serif; }

#wp-word {
  padding: 0 3px;
  border-radius: 3px;
  background: rgba(61, 139, 253, .3);
  color: inherit;
}

#wp-word.flash { animation: flash .8s var(--ease); }
@keyframes flash { from { background: rgba(61, 139, 253, .75); } }

.wp-pop {
  max-width: 420px;
  margin-left: 32px;
  padding: 22px 24px 24px;
  border: 1px solid #e6e1d6;
  border-radius: var(--r-md);
  background: #fcfaf5;
  color: #1d1d1f;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .4);
}

.wp-pop p { margin: 0; }
.wp-head { font: italic 17px ui-serif, "New York", Georgia, serif; color: #6e6a62; }
.wp-headword { font: 700 34px/1.1 ui-serif, "New York", Georgia, serif; font-style: normal; color: #1d1d1f; }
.wp-ipa { margin-top: 4px !important; font: 15px ui-monospace, Menlo, monospace; color: #6e6a62; }
.wp-def { margin: 14px 0 18px !important; padding-top: 14px; border-top: 1px solid #e6e1d6; font-size: 16px; }
.wp-label { margin-bottom: 10px !important; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #3b7d3b; }

.wp-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.wp-pills button {
  padding: 4px 14px;
  border: 1px solid #cfe5cb;
  border-radius: 999px;
  background: #e9f4e6;
  color: #1d1d1f;
  font: 17px ui-serif, "New York", Georgia, serif;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.wp-pills button:hover { background: #dcefd7; }
.wp-pills button[aria-pressed="true"] { border-color: #3b7d3b; background: #3b7d3b; color: #fff; }
.wp-pills button:focus-visible { outline-color: #1d1d1f; }

.wp-hint { margin: 20px 0 0; font-size: 14px; color: var(--muted); }

.wp-undo {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Window captures with transparent corners, so the shadow follows the window. */
.stage.pad img { padding: 0 8%; }

.window-shot {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 28px rgba(0, 0, 0, .3));
}

/* A full-screen capture has no window corners of its own. */
.window-shot.flat { border-radius: var(--r-md); }

.window-shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 40px;
  align-items: end;
}

/* Flip Clock page: a dark, warm stage in both modes, like the app itself. */
.fc-page {
  color-scheme: dark;
  --bg: #11100e;
  --card: #1b1916;
  --ink: #f3eee6;
  --muted: #a59e94;
  --line: #2d2a26;
  --accent-text: #f0a43a;
}

html:has(.fc-page) { background: #11100e; }
.fc-page .kicker { margin-bottom: 12px; }

/* A flip clock. --fs is the digit size; everything else is measured in em from it. */
.fc-clock {
  --fs: min(15.5vw, 180px);
  --fall: .28s;
  --settle: .34s;
  display: flex;
  align-items: center;
  gap: .08em;
  width: max-content;
  margin: 0 auto;
  padding: .14em .16em;
  border-radius: .1em;
  background: #000;
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .05);
  font: 700 var(--fs)/1 "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}

.fc-group { display: flex; gap: .06em; }

.fc-colon { display: flex; flex-direction: column; gap: .24em; padding: 0 .03em; }
.fc-colon i { display: block; width: .11em; height: .11em; border-radius: 50%; background: #f2f2f2; }

.fc-card { position: relative; width: .72em; height: 1.06em; perspective: 3.5em; }

.fc-half {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  overflow: hidden;
  background: #f2f2f2;
  color: #000;
}

.fc-half span {
  position: absolute;
  left: 0;
  right: 0;
  height: 200%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fc-top { top: 0; border-radius: .05em .05em 0 0; }
.fc-top span { top: 0; }
.fc-bottom { bottom: 0; border-radius: 0 0 .05em .05em; }
.fc-bottom span { bottom: 0; }

/* The split across the middle of each card. */
.fc-card::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: calc(50% - .5px);
  height: 1px;
  background: rgba(0, 0, 0, .6);
}

/* The leaves: the old top half falls, then the new bottom half settles and bounces. */
.fc-leaf { z-index: 2; backface-visibility: hidden; }
.fc-leaf::before { content: ""; position: absolute; inset: 0; z-index: 1; background: #000; opacity: 0; }
.fc-leaf.fc-top { transform-origin: 50% 100%; animation: fc-fall var(--fall) cubic-bezier(.55, .05, .9, .45) both; }
.fc-leaf.fc-top::before { animation: fc-dark var(--fall) ease-in both; }
.fc-leaf.fc-bottom { transform-origin: 50% 0; animation: fc-settle var(--settle) cubic-bezier(.3, 1.45, .55, 1) var(--fall) both; }
.fc-leaf.fc-bottom::before { animation: fc-light var(--settle) ease-out var(--fall) both; }

@keyframes fc-fall { from { transform: rotateX(0); } to { transform: rotateX(-90deg); } }
@keyframes fc-settle { from { transform: rotateX(90deg); } to { transform: rotateX(0); } }
@keyframes fc-dark { from { opacity: 0; } to { opacity: .55; } }
@keyframes fc-light { from { opacity: .5; } to { opacity: 0; } }

.fc-hero { padding: 40px 16px 96px; text-align: center; }
.fc-hero .fc-clock { margin-bottom: 56px; }
.fc-intro .lede { margin-left: auto; margin-right: auto; }
.fc-intro .actions { justify-content: center; margin-top: 30px; padding-top: 0; }
.fc-icon { display: block; width: 64px; height: 64px; margin: 0 auto 18px; }
.fc-page h1 { max-width: none; font-size: clamp(48px, 7vw, 88px); }

.fc-split, .fc-fit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
  padding-bottom: 120px;
}

.fc-split h2, .fc-fit h2 { margin: 0; font: 800 clamp(32px, 5vw, 48px)/1.05 var(--display); letter-spacing: -0.01em; }
.fc-split .section-lede, .fc-fit .section-lede { margin-bottom: 0; }

.fc-slow-stage {
  display: grid;
  justify-items: center;
  gap: 28px;
  padding: 48px 24px 32px;
  border-radius: var(--r-lg);
  background: radial-gradient(circle at 50% 40%, #2a2520, #15130f 70%);
}

.fc-single { --fs: min(44vw, 220px); }

.fc-speed, .fc-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.fc-sizes { margin-top: 28px; }

.fc-speed button, .fc-sizes button {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: 500 14px var(--text);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.fc-speed button:hover, .fc-sizes button:hover { border-color: var(--accent-text); }
.fc-speed button[aria-pressed="true"] { background: var(--accent-text); border-color: var(--accent-text); color: #1a1205; }
.fc-sizes kbd { margin-right: 4px; }

.fc-hint { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

.fc-desk {
  display: grid;
  place-items: center;
  height: 420px;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, #3a2e22, #1d1813);
}

/* A resizable window. Its clock is sized from the window, as in the app. */
.fc-window {
  position: relative;
  display: grid;
  place-items: center;
  width: 460px;
  height: 177px;
  min-width: 140px;
  min-height: 110px;
  max-width: calc(100% - 32px);
  max-height: 390px;
  overflow: hidden;
  resize: both;
  container-type: size;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08);
  transition: width .45s var(--ease), height .45s var(--ease);
}

.fc-window.dragging { transition: none; }

.fc-lights { position: absolute; top: 10px; left: 12px; display: flex; gap: 7px; opacity: 0; transition: opacity .3s; }
.fc-lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.fc-lights i:nth-child(2) { background: #febc2e; }
.fc-lights i:nth-child(3) { background: #28c840; }
.fc-window:hover .fc-lights { opacity: 1; }

.fc-mini { --fs: min(27cqw, 72cqh); padding: 0; box-shadow: none; background: none; }

.fc-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fc-details b { display: block; margin: 18px 0 6px; font: 700 19px/1.3 var(--display); font-variation-settings: "opsz" 24; }
.fc-details p { margin: 0; color: var(--muted); font-size: 15px; }

/* A copy of the live Dock icon. */
.fc-dock {
  display: flex;
  gap: 4px;
  width: 64px;
  height: 64px;
  padding: 14px 8px;
  border-radius: 15px;
  background: linear-gradient(#2b2b2b, #161616);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .8);
}

.fc-dock span {
  flex: 1;
  display: grid;
  place-items: center;
  border-radius: 3px;
  background: linear-gradient(#262626 50%, #1d1d1d 50%);
  color: #f2f2f2;
  font: 700 17px "Helvetica Neue", Helvetica, sans-serif;
}

.fc-key {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-bottom-width: 4px;
  border-radius: 14px;
  background: var(--card);
  font: 600 20px var(--text);
}

/* Sound Deck page: a dark stage with glowing pads, in both modes. */
.sd-page {
  color-scheme: dark;
  --bg: #0c0b14;
  --card: #161424;
  --ink: #f1effa;
  --muted: #a29fb8;
  --line: #272440;
  --accent-text: #a78bfa;
  background:
    radial-gradient(60rem 30rem at 85% -5%, rgba(123, 84, 232, .28), transparent 70%),
    radial-gradient(40rem 24rem at 0% 30%, rgba(45, 212, 191, .10), transparent 70%),
    var(--bg);
}

html:has(.sd-page) { background: #0c0b14; }
.sd-page .kicker { margin-bottom: 12px; }
.sd-hero { align-items: start; }

.sd-deck {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(22, 20, 36, .85);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.sd-now {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #100e1b;
}

.sd-title, .sd-sub { margin: 0; white-space: nowrap; }
.sd-title { font-weight: 600; font-size: 15px; }
.sd-sub { font-size: 13px; color: var(--muted); }
.sd-wave { width: 100%; height: 44px; }

.sd-pads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.sd-pad {
  --glow: 0;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 4px 10px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--pad) calc(18% + var(--glow) * 60%), var(--line));
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--pad) calc(10% + var(--glow) * 30%), transparent), transparent 70%),
    #1b1930;
  box-shadow: 0 0 calc(var(--glow) * 28px) color-mix(in srgb, var(--pad) 60%, transparent);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform .15s var(--spring), border-color .25s, box-shadow .25s;
}

.sd-pad:hover { transform: translateY(-2px); }
.sd-pad:active, .sd-pad.hit { transform: scale(.96); }
.sd-pad.playing { --glow: 1; }

.sd-emoji {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--pad) 22%, #1b1930);
  font-size: 18px;
}

.sd-name { font: 600 14px/1.25 var(--text); padding-top: 2px; }
.sd-pad kbd { grid-column: 1; align-self: end; justify-self: start; margin-top: 8px; }

.sd-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.sd-stop {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #1b1930;
  color: var(--ink);
  font: 600 13px var(--text);
  cursor: pointer;
}

.sd-stop:hover { border-color: var(--accent-text); }

/* The route into a call: three stops with arrows between them. */
.sd-route {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.sd-route li {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--pad) 35%, var(--line));
  border-radius: var(--r-md);
  background: radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--pad) 14%, transparent), transparent 70%), var(--card);
}

.sd-route li + li::before {
  content: "→";
  position: absolute;
  left: -36px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-text);
  font-size: 24px;
}

.sd-route b { font: 700 19px/1.3 var(--display); font-variation-settings: "opsz" 24; }
.sd-route span:last-child { color: var(--muted); font-size: 14px; }
.sd-node-icon { font-size: 26px; }
.sd-route-note { margin: 24px 0 0; color: var(--muted); font-size: 15px; }

.sd-real {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 56px;
  padding-bottom: 96px;
}

.sd-real h2, .sd-page .block h2 { margin: 0; }
.sd-real h2 { font: 800 clamp(32px, 5vw, 48px)/1.05 var(--display); letter-spacing: -0.01em; }
.sd-real .section-lede { margin-bottom: 0; }

.sd-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.sd-tiles li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 14px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--pad) 25%, var(--line));
  border-radius: 14px;
  background: #15132a;
  color: var(--muted);
  font-size: 14px;
}

.sd-tiles span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--pad) 22%, #1b1930);
  font-size: 20px;
}

.sd-tiles b { color: var(--ink); font: 700 16px/1.3 var(--display); font-variation-settings: "opsz" 24; }

/* Prompt page: a dark theatre with the app's purple-to-orange light, in both modes. */
.pr-page {
  color-scheme: dark;
  --bg: #0d0b12;
  --card: #18151f;
  --ink: #f4f0f7;
  --muted: #aaa2b4;
  --line: #2a2533;
  --accent-text: #f0a06a;
  --grad: linear-gradient(100deg, #a77ee0, #e39468);
  background: radial-gradient(70rem 34rem at 70% -10%, rgba(167, 126, 224, .22), transparent 70%), var(--bg);
}

html:has(.pr-page) { background: #0d0b12; }
.pr-page .kicker { margin-bottom: 12px; }
.pr-page h2 { margin: 0; font: 800 clamp(32px, 5vw, 48px)/1.05 var(--display); letter-spacing: -0.01em; }
.pr-btn { background: var(--grad); color: #160f1c; }

.pr-hero {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 64px;
  padding-top: 32px;
  padding-bottom: 112px;
}

.pr-hero > * { min-width: 0; }

/* The prompter: text moves up through a reading band. */
.pr-screen {
  --mirror: 1;
  position: relative;
  height: 360px;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: #08070b;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06);
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}

.pr-screen:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; }

.pr-band {
  position: absolute;
  left: 0;
  right: 0;
  top: 38%;
  height: 25%;
  border-top: 1px solid rgba(255, 255, 255, .12);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .03);
}

.pr-text {
  padding: 0 32px;
  transform: translateY(var(--y, 0)) scaleX(var(--mirror));
  font: 600 clamp(22px, 2.6vw, 30px)/1.45 var(--text);
  text-align: center;
  color: rgba(244, 240, 247, .5);
  will-change: transform;
}

.pr-text p { margin: 0 0 .9em; }
.pr-text em { font-style: normal; color: #fff; }

.pr-cue {
  display: inline-block;
  padding: 0 .3em;
  border-radius: 6px;
  background: rgba(240, 160, 106, .14);
  color: #f0a06a;
  font-size: .62em;
  font-weight: 700;
  letter-spacing: .04em;
  vertical-align: .25em;
}

.pr-cue.on { background: #f0a06a; color: #160f1c; }
.pr-text .lit { color: #fff; transition: color .3s; }

.pr-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin: -32px auto 0;
  padding: 8px 12px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(30, 26, 38, .9);
  backdrop-filter: blur(12px);
}

.pr-bar button {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 600 15px var(--text);
  cursor: pointer;
}

.pr-bar button:hover { background: rgba(255, 255, 255, .08); }
.pr-bar .pr-play { width: 40px; height: 40px; padding: 0; background: var(--grad); color: #160f1c; font-size: 12px; }
.pr-bar [aria-pressed="true"] { background: rgba(240, 160, 106, .2); color: #f0a06a; }
.pr-bar output { min-width: 40px; text-align: center; font: 600 14px var(--text); }
.pr-status { min-width: 72px; padding-right: 4px; color: #f0a06a; font-size: 13px; font-weight: 600; }
.pr-hint { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--muted); }

.pr-write {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 56px;
  padding-bottom: 104px;
}

.pr-flip { grid-template-columns: 1fr 1.2fr; }
.pr-write .section-lede { margin-bottom: 16px; }

.pr-cues { display: grid; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; color: var(--muted); }
.pr-cues code {
  display: inline-block;
  min-width: 120px;
  margin-right: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(240, 160, 106, .14);
  color: #f0a06a;
  font: 700 13px ui-monospace, Menlo, monospace;
}

.pr-pace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}

.pr-calc { display: grid; gap: 10px; }
.pr-calc label { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.pr-calc output { color: var(--ink); font-weight: 600; }

.pr-calc input[type="number"] {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #0f0d14;
  color: var(--ink);
  font: 600 18px var(--text);
}

.pr-calc input[type="range"] { width: 100%; accent-color: #c48ad0; }
.pr-time { margin: 18px 0 0; font: 800 clamp(48px, 7vw, 72px)/1 var(--display); }
.pr-time output { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pr-time span { font: 500 16px var(--text); color: var(--muted); }

.pr-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 36px 0 48px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.pr-steps li {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--muted);
  font-size: 15px;
  counter-increment: step;
}

.pr-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--grad);
  color: #160f1c;
  font-weight: 700;
}

.pr-steps b { display: block; margin-bottom: 4px; color: var(--ink); font: 700 19px/1.3 var(--display); font-variation-settings: "opsz" 24; }
.pr-more { margin-top: 0; }

/* Glance page: soft greens with room to breathe. It follows light and dark, like the app. */
.gl-page {
  --bg: #eef3ec;
  --card: #f8fbf6;
  --ink: #1d2a20;
  --muted: #5a6b5d;
  --line: #d5e1d2;
  --accent-text: #2f6b43;
  --gl: #3d7a50;
  --gl-soft: #cfe0c9;
}

@media (prefers-color-scheme: dark) {
  .gl-page {
    --bg: #0e1511;
    --card: #16201a;
    --ink: #e7efe8;
    --muted: #9bb0a0;
    --line: #243329;
    --accent-text: #8fd1a3;
    --gl: #8fd1a3;
    --gl-soft: #233a2b;
  }
}

html:has(.gl-page) { background: var(--bg, #eef3ec); }
.gl-page .kicker { margin-bottom: 12px; }
.gl-page h2 { margin: 0; font: 800 clamp(32px, 5vw, 48px)/1.05 var(--display); letter-spacing: -0.01em; }

.gl-hero { padding-top: 56px; padding-bottom: 128px; text-align: center; }
.gl-hero h1 { max-width: none; font-size: clamp(56px, 9vw, 112px); }
.gl-hero .lede { margin-left: auto; margin-right: auto; }
.gl-hero .actions { justify-content: center; margin-top: 32px; padding-top: 0; }

/* The menu bar ring, large: it fills as screen time adds up. */
.gl-ring { width: 120px; height: 120px; margin-bottom: 28px; transform: rotate(-90deg); }
.gl-ring circle { fill: none; stroke-width: 6; }
.gl-ring-track { stroke: var(--gl-soft); }
.gl-ring-fill { stroke: var(--gl); stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: 314.16; animation: gl-fill 20s linear infinite; }
.gl-ring .gl-ring-dot { fill: var(--gl); stroke: none; }
@keyframes gl-fill { to { stroke-dashoffset: 0; } }

.gl-try {
  padding: 12px 24px;
  border: 1px solid color-mix(in srgb, var(--gl) 50%, var(--line));
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font: 600 16px var(--text);
  cursor: pointer;
  transition: background .2s;
}

.gl-try:hover { background: var(--gl-soft); }

/* The break: the soft green horizon, over everything. */
.gl-break {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(90% 70% at 50% 35%, #e7efe1, #d3e1cb 60%, #b9cdaf);
  color: #1f3324;
  animation: gl-in .8s var(--ease);
}

.gl-break[hidden] { display: none; }
.gl-break.out { animation: gl-out .7s var(--ease) forwards; }
@keyframes gl-in { from { opacity: 0; } }
@keyframes gl-out { to { opacity: 0; } }

.gl-horizon i {
  position: absolute;
  left: -20%;
  right: -20%;
  height: 60%;
  border-radius: 50%;
  background: rgba(150, 180, 140, .25);
  animation: gl-drift 24s ease-in-out infinite alternate;
}

.gl-horizon i:first-child { top: 58%; }
.gl-horizon i:last-child { top: 66%; background: rgba(130, 165, 122, .3); animation-duration: 30s; }
@keyframes gl-drift { to { transform: translateX(6%); } }

@media (prefers-color-scheme: dark) {
  .gl-break { background: radial-gradient(90% 70% at 50% 35%, #1f2f25, #13201a 60%, #0b130e); color: #e2ece4; }
  .gl-horizon i { background: rgba(90, 140, 105, .18); }
  .gl-horizon i:last-child { background: rgba(80, 130, 95, .22); }
}

.gl-break-body { position: relative; display: grid; justify-items: center; gap: 6px; padding: 24px; text-align: center; }
.gl-break-ring { width: 88px; height: 88px; margin-bottom: 18px; transform: rotate(-90deg); }
.gl-break-ring circle { fill: none; stroke-width: 3; }
.gl-break .gl-ring-track { stroke: rgba(61, 122, 80, .2); }
.gl-break-fill { stroke: currentColor; stroke-linecap: round; stroke-dasharray: 276.46; stroke-dashoffset: 276.46; transition: stroke-dashoffset 1s linear; }
.gl-break h2 { font: 500 clamp(28px, 4vw, 40px)/1.2 var(--text); letter-spacing: -0.01em; }
.gl-break p { margin: 0; opacity: .75; }
.gl-count { margin-top: 18px !important; opacity: 1 !important; font: 300 clamp(72px, 12vw, 120px)/1 var(--text); font-variant-numeric: tabular-nums; }
.gl-dots { display: flex; gap: 8px; margin: 14px 0 22px; }
.gl-dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .2; transition: opacity .4s; }
.gl-dots i.on { opacity: .8; }

.gl-skip {
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(61, 122, 80, .12);
  color: inherit;
  font: 500 14px var(--text);
  cursor: pointer;
}

.gl-skip kbd { margin-left: 6px; background: transparent; }
.gl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Smart Pause timeline. */
.gl-timeline { position: relative; height: 120px; margin: 48px 0 8px; }
.gl-track { position: absolute; left: 0; right: 0; top: 46px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--gl-soft), color-mix(in srgb, var(--gl) 45%, var(--gl-soft))); }

.gl-call {
  position: absolute;
  top: 30px;
  height: 40px;
  border: 1px dashed color-mix(in srgb, #8a63d2 60%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, #8a63d2 14%, transparent);
}

.gl-call span { position: absolute; top: -26px; left: 0; right: 0; text-align: center; font-size: 13px; font-weight: 600; color: #8a63d2; }

.gl-mark { position: absolute; top: 36px; transform: translateX(-50%); display: grid; justify-items: center; text-align: center; }
.gl-mark::before { content: ""; width: 28px; height: 28px; border: 4px solid var(--bg); border-radius: 50%; background: var(--gl); }
.gl-mark b { margin-top: 10px; font-size: 14px; }
.gl-mark span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.gl-held::before { background: var(--bg); border: 2px dashed var(--muted); }

.gl-pauses, .gl-why {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.gl-pauses li, .gl-why li {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--muted);
  font-size: 15px;
}

.gl-pauses b, .gl-why b { display: block; margin-bottom: 6px; color: var(--ink); font: 700 18px/1.3 var(--display); font-variation-settings: "opsz" 24; }
.gl-why .link { display: inline-block; margin-top: 8px; font-size: 13px; }
.gl-note { margin: 24px 0 0; color: var(--muted); }
.gl-shots { margin-top: 48px; }

.gl-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 40px;
  border-radius: var(--r-lg);
  background: var(--gl-soft);
}

.gl-stats div { display: grid; gap: 6px; }
.gl-stats b { font: 800 clamp(48px, 7vw, 80px)/1 var(--display); color: var(--accent-text); }
.gl-stats span { color: var(--ink); font-size: 15px; }

/* Aloud page: warm paper and teal, a reading room. It follows light and dark. */
.al-page {
  --bg: #f6f1e7;
  --card: #fffaf0;
  --ink: #1f2423;
  --muted: #64665f;
  --line: #e4dccb;
  --accent-text: #0f7a6b;
  --al: #14917f;
  --al-soft: #d7ece6;
}

@media (prefers-color-scheme: dark) {
  .al-page {
    --bg: #121514;
    --card: #1a1e1d;
    --ink: #ece9e2;
    --muted: #a1a49d;
    --line: #2a2f2d;
    --accent-text: #5fd0bd;
    --al: #3cc2ac;
    --al-soft: #183a34;
  }
  .al-read, .al-w.now { color: #0b1f1b; }
  .al-read kbd { border-color: rgba(0, 0, 0, .25); background: rgba(0, 0, 0, .08); color: #0b1f1b; }
}

html:has(.al-page) { background: var(--bg, #f6f1e7); }
.al-page .kicker { margin-bottom: 12px; }
.al-page h2 { margin: 0; font: 800 clamp(32px, 5vw, 48px)/1.05 var(--display); letter-spacing: -0.01em; }

.al-hero { display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 64px; padding-top: 32px; padding-bottom: 104px; }
.al-hero > * { min-width: 0; }

.al-demo {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: 0 40px 80px -48px rgba(40, 30, 10, .45);
}

/* A slice of the macOS menu bar, with Aloud's icon. */
.al-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 5%, var(--card));
  font-size: 13px;
}

.al-bar-apple { width: 12px; height: 14px; border-radius: 40% 40% 50% 50%; background: var(--ink); opacity: .8; }
.al-bar-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }

.al-icon { display: flex; align-items: center; gap: 2px; height: 16px; padding: 0 5px; border-radius: 5px; transition: background .2s; }
.al-icon i { width: 2px; height: 6px; border-radius: 1px; background: var(--ink); }
.al-icon i:nth-child(2), .al-icon i:nth-child(4) { height: 10px; }
.al-icon i:nth-child(3) { height: 14px; }
.al-icon.on { background: color-mix(in srgb, var(--al) 22%, transparent); }
.al-icon.on i { background: var(--al); animation: al-wave .8s ease-in-out infinite alternate; }
.al-icon.on i:nth-child(2) { animation-delay: -.2s; }
.al-icon.on i:nth-child(3) { animation-delay: -.4s; }
.al-icon.on i:nth-child(4) { animation-delay: -.6s; }
@keyframes al-wave { from { transform: scaleY(.35); } to { transform: scaleY(1.1); } }

.al-page-text { padding: 26px 30px 6px; font: 19px/1.65 ui-serif, "New York", Georgia, serif; }
.al-page-text h3 { margin: 0 0 12px; font: 700 24px/1.2 ui-serif, "New York", Georgia, serif; }
.al-page-text p { margin: 0 0 14px; }
.al-page-text ::selection { background: color-mix(in srgb, var(--al) 30%, transparent); }
.al-w { border-radius: 3px; transition: background .15s, color .15s; }
.al-w.said { color: var(--muted); }
.al-w.now { background: var(--al); color: #fff; box-shadow: 0 0 0 2px var(--al); }

.al-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 30px 4px; }

.al-read, .al-stop {
  padding: 9px 16px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--al);
  color: #fff;
  font: 600 14px var(--text);
  cursor: pointer;
}

.al-read kbd { margin-right: 6px; border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .15); color: #fff; }
.al-stop { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.al-status { font-size: 14px; color: var(--muted); }
.al-note { margin: 0; padding: 4px 30px 22px; font-size: 13px; color: var(--muted); }

.al-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 40px; border-radius: var(--r-lg); background: var(--al-soft); }
.al-stats div { display: grid; gap: 6px; }
.al-stats b { font: 800 clamp(48px, 7vw, 80px)/1 var(--display); color: var(--accent-text); }
.al-stats span { font-size: 15px; }

.al-where, .al-real { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; padding-bottom: 104px; }
.al-real { grid-template-columns: 1.1fr 1fr; }
.al-where .section-lede, .al-real .section-lede { margin-bottom: 14px; }

.al-apps, .al-voices { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.al-apps li {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-weight: 500;
}

.al-voices { margin-top: 32px; }
.al-voices li {
  min-width: 92px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  font: 600 16px ui-serif, "New York", Georgia, serif;
  text-align: center;
}

.al-voices li.on { border-color: var(--al); background: var(--al-soft); color: var(--accent-text); }

/* maclink page: a terminal-dark, keyboard-first look with a teal cursor, in both modes. */
.ml-page {
  color-scheme: dark;
  --bg: #0f1416;
  --card: #161d20;
  --ink: #e6efee;
  --muted: #95a7a5;
  --line: #24302f;
  --accent-text: #4fd1bd;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

html:has(.ml-page) { background: #0f1416; }
.ml-page .kicker { margin-bottom: 12px; font-family: var(--mono); text-transform: none; }
.ml-page .kicker::before { content: "#+"; margin-right: 6px; opacity: .6; }
.ml-page h2 { margin: 0; font: 800 clamp(32px, 5vw, 48px)/1.05 var(--display); letter-spacing: -0.01em; }
.ml-page code { padding: 1px 5px; border-radius: 4px; background: var(--card); font: .9em var(--mono); color: var(--accent-text); }

.ml-hero { padding-top: 32px; padding-bottom: 72px; }
.ml-hero h1 { font-family: var(--mono); font-weight: 700; letter-spacing: -0.04em; }
.ml-cursor { display: inline-block; width: .5em; height: .9em; margin-left: .06em; vertical-align: -.08em; background: var(--accent-text); animation: blink 1.1s steps(1) infinite; }

.ml-demo {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}

.ml-app { position: relative; display: grid; align-content: start; gap: 16px; padding: 22px; border-right: 1px solid var(--line); background: #f4f2ee; color: #1d1d1f; }
.ml-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 9px; background: #e3e0da; width: max-content; }
.ml-tabs button { padding: 5px 14px; border: 0; border-radius: 7px; background: none; color: #444; font: 500 13px var(--text); cursor: pointer; }
.ml-tabs [aria-selected="true"] { background: #fff; color: #111; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }

.ml-pane { min-height: 190px; }
.ml-path { margin: 0 0 8px; font: 12px var(--mono); color: #777; }
.ml-files { margin: 0; padding: 0; list-style: none; }
.ml-files li { display: flex; gap: 10px; padding: 7px 10px; border-radius: 6px; font-size: 14px; }
.ml-files li.sel { background: #2b6fd6; color: #fff; }

.ml-mail, .ml-web { padding: 14px 16px; border-radius: 10px; background: #fff; font-size: 14px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.ml-mail p, .ml-web p { margin: 0 0 6px; }
.ml-mail span, .ml-url { color: #888; font-size: 12px; }
.ml-subject { font-weight: 600; font-size: 16px; }

.ml-move, .ml-capture {
  margin-top: 14px;
  padding: 7px 12px;
  border: 1px solid #cfcac1;
  border-radius: 8px;
  background: #fff;
  color: #222;
  font: 500 13px var(--text);
  cursor: pointer;
}

.ml-capture { justify-self: start; margin-top: 0; border: 0; background: #0f7f73; color: #fff; font-weight: 600; }
.ml-capture kbd { margin-right: 6px; border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .15); color: #fff; }

/* The item a link points to lights up when the link is opened. */
.ml-found { animation: ml-found 1.4s var(--ease); }
@keyframes ml-found { 0%, 40% { box-shadow: 0 0 0 3px #4fd1bd, 0 0 30px rgba(79, 209, 189, .6); } }

.ml-toast {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(30, 30, 30, .92);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  animation: gl-in .3s var(--ease);
}

.ml-toast span { color: #9fd9cf; }

/* An Emacs frame. */
.ml-emacs { display: grid; grid-template-rows: auto 1fr auto; background: #1c1f24; font: 14px/1.65 var(--mono); color: #c8ccd4; }
.ml-emacs-bar, .ml-mode { display: flex; gap: 16px; padding: 6px 14px; background: #262a31; color: #8b92a0; font-size: 12px; }
.ml-mode { background: #2f343d; color: #b8bfcc; }
.ml-buffer { min-height: 280px; padding: 14px 18px; }
.ml-buffer p { margin: 0; }
.ml-h1 { color: #61afef; font-weight: 700; }
.ml-h2 { color: #c678dd; }
.ml-hint { margin-top: 12px !important; color: #5c6370; font-style: italic; }

.ml-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: #4fd1bd;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.ml-link:hover { color: #8ff0e0; }
.ml-entry { padding-left: 2ch; animation: gl-in .4s var(--ease); }
.ml-entry .k { color: #98c379; }
.ml-demo-note { margin: 16px 0 0; color: var(--muted); font-size: 14px; }

.ml-ladder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 36px 0 0; padding: 0; list-style: none; counter-reset: step; }
.ml-ladder li { position: relative; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); color: var(--muted); counter-increment: step; }
.ml-ladder li::before { content: counter(step) "."; display: block; margin-bottom: 10px; font: 700 14px var(--mono); color: var(--accent-text); }
.ml-ladder b { display: block; margin-bottom: 4px; color: var(--ink); font: 700 19px/1.3 var(--display); font-variation-settings: "opsz" 24; }

.ml-org { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; padding-bottom: 104px; }
.ml-org .section-lede { margin-bottom: 14px; }

.ml-code {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #1c1f24;
  color: #c8ccd4;
  font: 14px/1.7 var(--mono);
}

.ml-code code { padding: 0; background: none; color: inherit; font: inherit; }
.ml-code .c { color: #5c6370; }

/* Bookdrop page: paper, ink and a little violet. It follows light and dark. */
.bd-page {
  --bg: #f3efe6;
  --card: #fbf8f1;
  --ink: #221d2e;
  --muted: #6a6474;
  --line: #e1d9c8;
  --accent-text: #5b3fc4;
  --bd: #6a4bd1;
  --bd-soft: #e6dffa;
  --serif: ui-serif, "New York", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  .bd-page {
    --bg: #14121a;
    --card: #1c1a24;
    --ink: #ece8f4;
    --muted: #a39db0;
    --line: #2c2838;
    --accent-text: #b7a3ff;
    --bd: #8f74ee;
    --bd-soft: #2a2442;
  }
}

html:has(.bd-page) { background: var(--bg, #f3efe6); }
.bd-page .kicker { margin-bottom: 12px; }
.bd-page h2 { margin: 0; font: 800 clamp(32px, 5vw, 48px)/1.05 var(--display); letter-spacing: -0.01em; }
.bd-hero { padding-top: 32px; padding-bottom: 64px; }
.bd-hero h1 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.02em; }

.bd-demo { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: stretch; }
.bd-side { display: grid; align-content: start; gap: 18px; }

.bd-drop {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  border: 2px dashed color-mix(in srgb, var(--bd) 45%, var(--line));
  border-radius: var(--r-lg);
  background: var(--card);
  text-align: center;
  transition: background .2s, border-color .2s;
}

.bd-drop.over { border-color: var(--bd); background: var(--bd-soft); }
.bd-drop p { margin: 0; font-size: 14px; color: var(--muted); }
.bd-drop.done { grid-template-columns: auto 1fr; justify-items: start; text-align: left; border-style: solid; padding: 16px; }

.bd-book {
  display: grid;
  align-content: space-between;
  width: 96px;
  height: 140px;
  padding: 12px 10px;
  border-radius: 3px 8px 8px 3px;
  background: linear-gradient(90deg, #4b2fa8 0 8px, #6a4bd1 8px);
  box-shadow: 0 12px 24px -10px rgba(40, 20, 90, .6), inset -2px 0 0 rgba(255, 255, 255, .15);
  color: #fff;
  font: 700 13px/1.2 var(--serif);
  text-align: left;
  cursor: grab;
}

.bd-book small { font: 11px var(--serif); opacity: .8; }
.bd-done-book { cursor: default; width: 60px; height: 88px; font-size: 9px; padding: 8px 6px; }
.bd-done-book small { font-size: 8px; }

.bd-sample { padding: 0; border: 0; background: none; color: var(--accent-text); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.bd-options { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.bd-options[hidden] { display: none; }
.bd-label { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.bd-seg { display: grid; grid-template-columns: repeat(5, 1fr); padding: 3px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.bd-seg button { padding: 7px 0; border: 0; border-radius: 8px; background: none; color: var(--ink); font: 600 13px var(--text); cursor: pointer; }
.bd-seg [aria-checked="true"] { background: var(--bd); color: #fff; }

.bd-pdf { display: grid; gap: 12px; }
.bd-pdf[hidden] { display: none; }
.bd-pdf label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.bd-pdf output { float: right; color: var(--ink); font-weight: 600; }
.bd-pdf select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: 14px var(--text); }
.bd-pdf input[type="range"] { accent-color: var(--bd); }
.bd-check { display: flex !important; align-items: center; gap: 8px !important; color: var(--ink) !important; }
.bd-check input { accent-color: var(--bd); }
.bd-out { margin: 0; font-size: 14px; color: var(--muted); }
.bd-out b { color: var(--ink); font-weight: 600; }

/* The preview: one look per output format. */
.bd-preview {
  display: grid;
  place-items: center;
  min-height: 560px;
  padding: 28px;
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--ink) 6%, var(--bg));
}

.bd-empty { color: var(--muted); font-size: 15px; }

.bd-out-page {
  --pw: 400px;
  --ratio: 8.5 / 11;
  --pad: 54px;
  --fs: 15px;
  position: relative;
  width: min(var(--pw), 100%);
  aspect-ratio: var(--ratio);
  overflow: hidden;
  padding: var(--pad) var(--pad) calc(var(--pad) + 14px);
  background: #fffdf8;
  color: #1b1b1b;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .06);
  font: var(--fs)/1.55 var(--serif);
  text-align: justify;
  hyphens: auto;
  transition: aspect-ratio .4s var(--ease), padding .4s var(--ease), width .4s var(--ease);
}

.bd-out-page[hidden] { display: none; }
.bd-out-page h4 { margin: 0 0 1.2em; font-size: 1.5em; font-weight: 700; text-align: center; line-height: 1.25; }
.bd-out-page h4 span { font-size: .7em; font-weight: 400; font-style: italic; }
.bd-out-page p { margin: 0 0 .8em; text-indent: 1.4em; }
.bd-head { position: absolute; top: calc(var(--pad) * .4); left: 0; right: 0; text-align: center !important; text-indent: 0 !important; font-size: .75em; font-style: italic; color: #888; }
.bd-num { position: absolute; bottom: calc(var(--pad) * .4); left: 0; right: 0; margin: 0 !important; text-align: center !important; text-indent: 0 !important; font-size: .8em; color: #666; }

.bd-preview[data-format="epub"] .bd-out-page {
  --ratio: 9 / 16;
  width: 280px;
  padding: 44px 22px 30px;
  border: 10px solid #1d1d1f;
  border-radius: 30px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .14);
  font-size: 13px;
  text-align: left;
}

.bd-preview[data-format="txt"] .bd-out-page { --ratio: 4 / 3.2; width: 100%; max-width: 560px; padding: 22px; border-radius: 10px; background: #fff; font: 12px/1.6 ui-monospace, Menlo, monospace; text-align: left; }
.bd-preview[data-format="txt"] .bd-out-page h4 { font: inherit; text-align: left; text-transform: uppercase; }
.bd-preview[data-format="txt"] .bd-out-page h4 span { font: inherit; text-transform: none; }
.bd-preview[data-format="txt"] .bd-out-page p { text-indent: 0; }

.bd-preview[data-format="html"] .bd-out-page { --ratio: 4 / 3.2; width: 100%; max-width: 560px; padding: 52px 40px 24px; border-radius: 10px; font: 14px/1.6 system-ui, sans-serif; text-align: left; }
.bd-preview[data-format="html"] .bd-out-page::before { content: "file:///Books/On the Origin of Species.html"; position: absolute; top: 0; left: 0; right: 0; padding: 8px 14px; background: #ececec; color: #777; font: 11px system-ui, sans-serif; }
.bd-preview[data-format="html"] .bd-out-page h4 { text-align: left; font-family: Georgia, serif; }
.bd-preview[data-format="html"] .bd-out-page p { text-indent: 0; }

.bd-preview[data-format="docx"] .bd-out-page { --ratio: 8.5 / 11; padding: 70px 52px 40px; font: 11px/1.5 Calibri, "Segoe UI", system-ui, sans-serif; text-align: left; }
.bd-preview[data-format="docx"] .bd-out-page::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 30px; background: linear-gradient(#2b579a, #2b579a) top / 100% 6px no-repeat, #f3f3f3; }
.bd-preview[data-format="docx"] .bd-out-page h4 { color: #2b579a; font-family: inherit; text-align: left; }
.bd-preview[data-format="docx"] .bd-out-page p { text-indent: 0; }

.bd-preview:not([data-format="pdf"]) .bd-head, .bd-preview:not([data-format="pdf"]) .bd-num { display: none; }

.bd-io { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 32px; margin-top: 36px; }
.bd-io > div:not(.bd-arrow) { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.bd-io ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.bd-io li { padding: 6px 12px; border-radius: 6px; background: var(--bd-soft); color: var(--accent-text); font: 600 14px var(--text); }
.bd-arrow { font-size: 36px; color: var(--accent-text); }
.bd-honest { margin-top: 28px; }

.bd-two { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 56px; padding-bottom: 104px; }
.bd-two .section-lede { margin-bottom: 14px; }

.bd-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.bd-tiles li { padding: 22px; border-top: 3px solid var(--bd); border-radius: 4px 4px var(--r-md) var(--r-md); background: var(--card); color: var(--muted); font-size: 15px; }
.bd-tiles b { display: block; margin-bottom: 6px; color: var(--ink); font: 700 18px/1.3 var(--serif); }

/* Formzeit page: Bauhaus. Primary red, blue and yellow shapes on paper, in both modes. */
.fz-page {
  --fz-red: #e3402c;
  --fz-blue: #2450b8;
  --fz-yellow: #f2b705;
  --accent-text: #c4321f;
}

@media (prefers-color-scheme: dark) {
  .fz-page { --fz-blue: #5b84e6; --accent-text: #ff7a5c; }
}

.fz-page .kicker { margin-bottom: 12px; }
.fz-page h2 { position: relative; display: inline-block; padding-bottom: 10px; }
.fz-page .block h2::after, .fz-live h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 6px; background: var(--fz-yellow); }
.fz-page .block .section-lede, .fz-page .block .faces, .fz-page .block .features, .fz-page .block .wide { margin-top: 20px; }

/* Three shapes behind the hero: circle, square, triangle. */
.fz-page .app-hero { position: relative; }
.fz-page .app-hero::before, .fz-page .app-hero::after, .fz-page main::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.fz-page .app-hero::before { top: -40px; left: 38%; width: 180px; height: 180px; border-radius: 50%; background: var(--fz-red); opacity: .9; }
.fz-page .app-hero::after { bottom: 40px; left: -24px; width: 90px; height: 90px; background: var(--fz-blue); transform: rotate(12deg); }
.fz-page main { position: relative; isolation: isolate; }
.fz-page main::before { top: 560px; right: 2%; width: 0; height: 0; border-left: 70px solid transparent; border-right: 70px solid transparent; border-bottom: 120px solid var(--fz-yellow); }

.fz-live {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 72px;
  padding-bottom: 112px;
}

.fz-live h2 { margin: 0; font: 800 clamp(32px, 5vw, 48px)/1.05 var(--display); letter-spacing: -0.01em; }
.fz-live .section-lede { margin-top: 20px; }

.fz-clock-stage {
  --dial: var(--plate, #96d8c8);
  --ink-dial: #1d4a42;
  --hand: #f6faf8;
  --sec: #d2402e;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 10%;
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--dial) 55%, #fff);
  transition: background .6s var(--ease);
}

[data-plate="slate"] .fz-clock-stage { --ink-dial: #d8dee4; --hand: #e9eef2; }
.fz-clock-stage.night { --dial: #121a1c; --ink-dial: #6fe0a5; --hand: #8af0b8; --sec: #c9d6cf; background: #0b1012; }

.fz-clock { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .18)); }
.fz-dial { fill: var(--dial); transition: fill .6s var(--ease); }
.fz-face { fill: var(--ink-dial); transition: fill .6s var(--ease); }
.fz-face text { font: 500 36px "Geist", system-ui, sans-serif; text-anchor: middle; dominant-baseline: central; }
.fz-hand rect { fill: var(--hand); stroke: rgba(0, 0, 0, .12); stroke-width: 1; transition: fill .6s; }
.fz-sec rect { fill: var(--sec); }
.fz-hub { fill: var(--hand); stroke: var(--sec); stroke-width: 2.5; }
.fz-hand, .fz-sec { transform-origin: 200px 200px; }
.night .fz-face, .night .fz-hand { filter: url(#fz-glow); }

/* Quartz: a small bounce at each second. Mechanical: a firm step. Sweep: no steps at all. */
.fz-sec.quartz { transition: transform .32s cubic-bezier(.34, 1.9, .5, 1); }
.fz-sec.mechanical { transition: none; }
.fz-sec.sweep { transition: none; }

.fz-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 28px; }
.fz-seg button {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  color: var(--ink);
  font: 700 16px var(--display);
  text-align: left;
  cursor: pointer;
}

.fz-seg small { font: 400 13px var(--text); color: var(--muted); }
.fz-seg [aria-checked="true"] { border-color: var(--ink); box-shadow: 4px 4px 0 var(--fz-red); }

.fz-day { display: grid; gap: 10px; margin-top: 28px; font-weight: 600; }
.fz-day span { display: flex; justify-content: space-between; }
.fz-day output { font: 600 15px var(--text); color: var(--muted); font-variant-numeric: tabular-nums; }
.fz-day input { accent-color: var(--fz-blue); }
.fz-day-note { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

/* WordPop page: a writer's desk. Ink on paper, serif headings, violet notes. */
.wp-page {
  --bg: #f7f3ea;
  --card: #fffdf7;
  --ink: #1d1b22;
  --muted: #625d6b;
  --line: #e5dfd2;
  --accent-text: #5b3fd0;
  --serif: ui-serif, "New York", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  .wp-page { --bg: #151419; --card: #1d1c22; --ink: #ece9f2; --muted: #a5a0ae; --line: #2c2a33; --accent-text: #b4a2ff; }
}

html:has(.wp-page) { background: var(--bg, #f7f3ea); }
.wp-page h1, .wp-page h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.015em; }
.wp-page h2 { margin: 0; font-size: clamp(32px, 4.6vw, 46px); line-height: 1.1; }
.wp-page .kicker { margin-bottom: 12px; }
.wp-page .kicker kbd { font-family: var(--text); text-transform: none; }
.wp-page code { padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--accent-text) 12%, transparent); color: var(--accent-text); font: 600 .9em ui-monospace, Menlo, monospace; }
.wp-small { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

.wp-split { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 64px; padding-bottom: 112px; }
.wp-split > * { min-width: 0; }
.wp-split .section-lede { margin-bottom: 0; }

.wp-search { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); box-shadow: 0 30px 60px -40px rgba(30, 20, 60, .4); overflow: hidden; }
.wp-search-box { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 20px; color: var(--muted); }
.wp-search-box input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: 22px var(--serif); outline: none; }
.wp-search-box:focus-within { box-shadow: inset 0 -2px 0 var(--accent-text); }
.wp-results { height: 340px; margin: 0; padding: 6px 0; overflow-y: auto; list-style: none; }
.wp-results li { display: grid; grid-template-columns: 9.5em 1fr; gap: 14px; padding: 9px 18px; }
.wp-results li:nth-child(odd) { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.wp-results b { font: 600 18px var(--serif); }
.wp-results b mark { background: color-mix(in srgb, var(--accent-text) 22%, transparent); color: inherit; border-radius: 2px; }
.wp-results span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.wp-results .wp-none { display: block; color: var(--muted); }

.wp-notes { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; margin-top: 32px; }

.wp-draft {
  min-height: 260px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  font: 19px/1.75 var(--serif);
  outline: none;
  white-space: pre-wrap;
}

.wp-draft:focus { border-color: var(--accent-text); }
.wp-long { text-decoration: underline wavy color-mix(in srgb, #e0483a 70%, transparent); text-underline-offset: 5px; }
.wp-adv { border-bottom: 2px solid #f0a33a; }
.wp-rep { background: color-mix(in srgb, var(--accent-text) 16%, transparent); border-radius: 3px; }
.wp-pas { font-style: italic; color: color-mix(in srgb, var(--ink) 75%, #2a7de1); }

.wp-cards { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 12px; }
.wp-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.wp-card b { display: block; font: 700 30px/1.1 var(--serif); }
.wp-card span { font-size: 13px; color: var(--muted); }
.wp-card.wide { grid-column: 1 / -1; }
.wp-card p { margin: 6px 0 0; font-size: 14px; }
.wp-card i { font-style: normal; display: inline-block; margin: 4px 6px 0 0; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, transparent); font-size: 13px; }

.wp-popup-part { grid-template-columns: 300px 1fr; }
.wp-tall { width: 100%; height: auto; border-radius: var(--r-md); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -36px rgba(0, 0, 0, .35); }
.wp-list { display: grid; gap: 14px; margin: 24px 0 0; padding: 0; list-style: none; color: var(--muted); }
.wp-list b { color: var(--ink); font-weight: 600; }

/* Install: a little Mac window */

.install { padding-bottom: 96px; }

.window {
  max-width: 720px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 3%, var(--card));
  font-size: 13px;
  color: var(--muted);
}

.titlebar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.titlebar i:nth-child(2) { background: #febc2e; }
.titlebar i:nth-child(3) { background: #28c840; }
.titlebar span { flex: 1; margin-right: 52px; text-align: center; }

.window-body { padding: 28px 32px 32px; }
.install h2 { font-size: clamp(28px, 4vw, 36px); margin-bottom: 14px; }
.window-body p, .window-body ol { color: var(--muted); }
.window-body ol { padding-left: 1.4em; }
.window-body li { margin: 8px 0; }
.window-body li::marker { font-family: var(--pixel); color: var(--accent-text); }
.window-body b { color: var(--ink); font-weight: 500; }
.window-body a { text-underline-offset: 3px; }
.note { margin-bottom: 0; font-size: 14px; }

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  padding-bottom: 40px;
  background: linear-gradient(var(--line), var(--line)) center top / calc(100% - 32px) 1px no-repeat;
  font-size: 14px;
  color: var(--muted);
}

.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* Smaller screens */

@media (max-width: 920px) {
  .faces { grid-template-columns: repeat(3, 1fr); }
  .gl-pauses, .gl-why, .bd-tiles { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .apps, .features, .shots, .window-shots { grid-template-columns: 1fr; }
  .fc-split, .fc-fit, .fc-details { grid-template-columns: 1fr; gap: 32px; }
  .fc-split, .fc-fit { padding-bottom: 80px; }
  .fc-desk { height: 320px; }
  .fc-hero { padding-bottom: 72px; }
  .sd-route, .sd-real, .sd-tiles { grid-template-columns: 1fr; gap: 20px; }
  .sd-route { gap: 40px; }
  .sd-route li + li::before { content: "↓"; left: 50%; top: -32px; transform: translateX(-50%); }
  .sd-pad { min-height: 80px; padding: 10px; }
  .sd-name { font-size: 13px; }
  .pr-hero, .pr-write, .pr-flip, .pr-pace, .pr-steps { grid-template-columns: 1fr; gap: 32px; }
  .pr-hero { padding-bottom: 80px; }
  .pr-pace { padding: 24px; }
  .pr-screen { height: 300px; }
  .gl-pauses, .gl-why, .gl-stats { grid-template-columns: 1fr; }
  .gl-stats { padding: 24px; gap: 24px; }
  .gl-mark span { display: none; }
  .gl-hero { padding-bottom: 88px; }
  .al-hero, .al-where, .al-real, .al-stats { grid-template-columns: 1fr; gap: 32px; }
  .al-stats { padding: 24px; }
  .al-page-text, .al-controls, .al-note { padding-left: 20px; padding-right: 20px; }
  .ml-demo, .ml-ladder, .ml-org { grid-template-columns: 1fr; gap: 24px; }
  .ml-demo { gap: 0; }
  .fz-live { grid-template-columns: 1fr; gap: 32px; padding-bottom: 80px; }
  .wp-split, .wp-popup-part, .wp-notes { grid-template-columns: 1fr; gap: 28px; }
  .wp-split { padding-bottom: 80px; }
  .wp-tall { max-width: 300px; }
  .wp-results li { grid-template-columns: 1fr; gap: 2px; }
  .fz-page .app-hero::before { width: 110px; height: 110px; left: auto; right: 0; }
  .fz-page main::before { display: none; }
  .bd-demo, .bd-two, .bd-tiles, .bd-io { grid-template-columns: 1fr; gap: 20px; }
  .bd-arrow { transform: rotate(90deg); justify-self: center; }
  .bd-preview { min-height: 420px; padding: 16px; }
  .ml-app { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 72px; }
  .al-bar span:not(.al-bar-right):not(.al-bar-apple), .al-bar-right > span:last-child { display: none; }
  .shot.tall { grid-row: auto; }
  .wp-demo { padding: 22px; }
  .wp-pop { margin-left: 0; }
  .hero { padding-bottom: 40px; }
  .window-body { padding: 22px; }
  .app-hero { grid-template-columns: 1fr; gap: 40px; padding-top: 16px; padding-bottom: 72px; }
  .faces { grid-template-columns: 1fr 1fr; gap: 12px; }
  .faces .face:last-child { grid-column: 1 / -1; }
  .swatches button { width: 40px; height: 40px; }
  .block { padding-bottom: 72px; }
}

@media (pointer: coarse) and (max-width: 640px) {
  .on-phone { display: block; }
}

@media (forced-colors: active) {
  .swatches button { forced-color-adjust: none; border-color: CanvasText; }
  .swatches button[aria-pressed="true"] { outline: 3px solid Highlight; }
}

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