/* Cloister landing page. Same palette and type as the app's Quiet Room theme. */

@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --bg: #121110;
  --bg-deep: #0c0b0a;
  --chrome: #0e0d0c;
  --panel: #161513;
  --raised: #1a1917;
  --hover: #1f1d1a;
  --active: #2a2724;
  --line: #2a2724;
  --line-soft: #1f1d1a;
  --line-strong: #3a3631;
  --text: #ede8e1;
  --muted: #a39c92;
  --faint: #8a8378;
  --accent: #f2a33a;
  --accent-hover: #ffb85c;
  --accent-ink: #1a1206;
  --veil: #1e1a15;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --wrap: 1160px;
  --radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

img {
  display: block;
}

ul {
  list-style: none;
}

.mono {
  font-family: var(--mono);
  font-weight: 500;
}

.wrap {
  width: min(var(--wrap), 100% - 48px);
  margin-inline: auto;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

h2 {
  font-size: clamp(30px, 3.6vw, 44px);
}

.soft {
  color: var(--muted);
}

.lead {
  color: var(--muted);
  font-size: 18px;
}

.kicker {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.section-head {
  max-width: 640px;
}

.section-head h2 {
  margin-top: 14px;
}

.section-head .lead {
  margin-top: 14px;
}

/* ------------------------------------------------------------------ nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
}

.brand.small {
  gap: 8px;
  font-size: 15px;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 120ms;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-gh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transition: background 120ms;
}

.nav-gh:hover {
  background: var(--hover);
}

/* -------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition:
    background 120ms,
    border-color 120ms,
    transform 120ms;
}

.btn-lg {
  height: 52px;
  padding: 0 26px;
  font-size: 16px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.25),
    0 8px 24px -10px rgb(242 163 58 / 0.6);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--hover);
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ----------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding-top: 84px;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgb(242 163 58 / 0.07), transparent 70%),
    linear-gradient(var(--bg), var(--bg));
}

.hero::before {
  /* Faint grid that fades out, for depth. */
  content: '';
  position: absolute;
  inset: 0 0 30% 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: 0.55;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: border-color 120ms;
}

.pill:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.pill-tag {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--veil);
  color: var(--accent);
  font-size: 12px;
}

h1 {
  margin-top: 28px;
  font-size: clamp(42px, 6.4vw, 78px);
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.hero .lead {
  max-width: 620px;
  margin-top: 24px;
  font-size: 19px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.fine {
  margin-top: 16px;
  color: var(--faint);
  font-size: 13px;
}

/* --------------------------------------------------- stage (app model) */

.stage {
  position: relative;
  margin-top: 64px;
  padding-bottom: 40px;
}

.glow {
  position: absolute;
  left: 50%;
  top: 30%;
  width: 70%;
  height: 60%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgb(242 163 58 / 0.16), transparent);
  filter: blur(40px);
  pointer-events: none;
}

.app {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--bg);
  overflow: hidden;
  font-size: 13px;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.4),
    0 40px 120px -40px rgb(0 0 0 / 0.9),
    inset 0 1px 0 rgb(255 255 255 / 0.04);
}

.app-bar {
  display: grid;
  grid-template-columns: 1fr minmax(0, 360px) 1fr;
  align-items: center;
  gap: 16px;
  height: 46px;
  padding: 0 0 0 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--chrome);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sep {
  width: 1px;
  height: 14px;
  background: var(--line);
}

.muted {
  color: var(--muted);
}

.app-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 6px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--faint);
}

.app-search kbd {
  margin-left: auto;
  font-size: 11px;
}

.app-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.focus-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
}

.focus-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgb(242 163 58 / 0.2);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 5px rgb(242 163 58 / 0.05);
  }
}

.veil-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 999px;
  background: var(--veil);
  color: var(--accent);
  font: 500 12px var(--sans);
  cursor: pointer;
  transition:
    background 120ms,
    color 120ms;
}

.veil-toggle[aria-pressed='false'] {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.winctl {
  display: flex;
  height: 46px;
}

.winctl i {
  position: relative;
  width: 44px;
}

.winctl i::before {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 10px;
  height: 1px;
  background: var(--faint);
  transform: translate(-50%, -50%);
}

.winctl i:nth-child(2)::before {
  height: 9px;
  width: 9px;
  border: 1px solid var(--faint);
  background: none;
}

.winctl i:nth-child(3)::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.winctl i:nth-child(3)::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 11px;
  height: 1px;
  background: var(--faint);
  transform: translate(-50%, -50%) rotate(-45deg);
}

.app-body {
  display: grid;
  grid-template-columns: 68px minmax(0, 300px) 1fr;
  height: 480px;
}

/* Service tiles: the site's own icon on a quiet tile. Falls back to a letter. */

.svc {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--raised);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

.svc .svc-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: contain;
}

.svc.no-icon::after {
  content: attr(data-letter);
}

.svc.no-icon .svc-icon {
  display: none;
}

.svc em {
  position: absolute;
  top: -6px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid var(--chrome);
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 10px/14px var(--sans);
  font-style: normal;
  text-align: center;
}

.svc em.dot {
  min-width: 12px;
  width: 12px;
  height: 12px;
  top: -3px;
  right: -3px;
  padding: 0;
}

.svc.add {
  border-style: dashed;
  background: transparent;
  color: var(--faint);
  font-weight: 400;
  font-size: 18px;
}

.svc.big {
  width: 64px;
  height: 64px;
  border-radius: 18px;
}

.svc.big .svc-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.svc.sm {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.svc.sm .svc-icon {
  width: 17px;
  height: 17px;
}

.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-right: 1px solid var(--line-soft);
  background: var(--chrome);
}

.rail .svc.is-active {
  border-color: var(--line-strong);
  background: var(--active);
}

.rail .svc.is-active::before {
  content: '';
  position: absolute;
  left: -15px;
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.rail-foot {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: auto;
  padding-bottom: 4px;
}

.rail-foot i {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--faint);
  border-radius: 50%;
  opacity: 0.7;
}

.rail-foot i:nth-child(3) {
  border-radius: 3px;
}

.list {
  border-right: 1px solid var(--line-soft);
  background: var(--panel);
  overflow: hidden;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  font-size: 16px;
}

.search-mini {
  width: 92px;
  height: 24px;
  border-radius: 7px;
  background: var(--raised);
}

.chat {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 10px 16px;
  transition: filter 180ms;
}

.chat.is-open {
  background: var(--hover);
}

.chat .av {
  grid-row: span 2;
}

.chat b {
  font-weight: 500;
  font-size: 14px;
}

.chat .msg {
  grid-column: 2 / 4;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat em {
  grid-row: 1;
  grid-column: 3;
  color: var(--faint);
  font-style: normal;
  font-size: 11px;
}

.av {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: 600;
  font-size: 13px;
}

.a1 {
  background: #3b2a1a;
  color: #f5cf9d;
}
.a2 {
  background: #22303e;
  color: #b8d3ee;
}
.a3 {
  background: #2c3a2a;
  color: #c4e3bd;
}
.a4 {
  background: #3a2532;
  color: #ecc2da;
}
.a5 {
  background: #2d2a42;
  color: #cbc6f2;
}
.a6 {
  background: #3d2f22;
  color: #e9d0b3;
}

/* Veil: every row blurs; the hovered one comes through after a beat. */
.list.is-veiled .chat {
  filter: blur(7px);
}

.list.is-veiled .chat:hover {
  filter: none;
  transition-delay: 150ms;
}

.convo {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  transition: filter 180ms;
}

.list.is-veiled ~ .convo {
  filter: blur(10px);
}

.convo-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.convo-head .av {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.convo-head b {
  display: block;
  font-weight: 500;
  font-size: 14px;
}

.convo-head span {
  color: var(--faint);
  font-size: 12px;
}

.bubbles {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px;
}

.bubble {
  max-width: 70%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13.5px;
}

.bubble.in {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  background: var(--raised);
}

.bubble.out {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: color-mix(in srgb, var(--accent) 18%, var(--raised));
  color: var(--text);
}

.composer {
  margin: 0 20px 18px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--faint);
}

.stage-hint {
  margin-top: 18px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

/* ----------------------------------------------------------------- apps */

.apps {
  padding: 72px 0 40px;
  text-align: center;
}

.app-wall {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px 12px;
  max-width: 820px;
  margin: 36px auto 0;
}

.app-wall li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.app-wall .svc {
  transition:
    transform 160ms,
    border-color 160ms;
}

.app-wall li:hover .svc {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

/* ------------------------------------------------------------- features */

.features {
  padding: 120px 0 40px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  margin-top: 88px;
}

.row.flip .row-copy {
  order: 2;
}

.row-copy h3 {
  font-size: clamp(24px, 2.4vw, 30px);
}

.row-copy p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 17px;
}

.ticks {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.ticks li {
  position: relative;
  padding-left: 28px;
  color: var(--text);
  font-size: 15px;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 6px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.scene {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, rgb(242 163 58 / 0.07), transparent), var(--panel);
  overflow: hidden;
}

/* Veil scene */
.mini-list {
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  overflow: hidden;
}

.mini-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.mini-row:last-child {
  border-bottom: 0;
}

.mini-row .av {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.mini-row b {
  font-weight: 500;
}

.mini-row span:not(.av) {
  color: var(--muted);
  font-size: 13px;
}

.mini-row i {
  height: 9px;
  width: 70%;
  border-radius: 5px;
  background: var(--active);
}

.mini-row i.short {
  width: 45%;
  margin-top: 6px;
  opacity: 0.6;
}

.mini-row.blur {
  filter: blur(4px);
}

.mini-row:not(.blur) {
  background: var(--hover);
  box-shadow: inset 3px 0 0 var(--accent);
}

.toast {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 230px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--raised);
  box-shadow: 0 16px 40px -12px rgb(0 0 0 / 0.7);
}

.toast b {
  display: block;
  font-size: 13px;
  font-weight: 500;
}

.toast span:not(.svc) {
  color: var(--muted);
  font-size: 12px;
}

/* Focus scene */
.scene-focus {
  grid-template-columns: auto auto;
  gap: 32px;
}

.timer {
  position: relative;
  display: grid;
  place-items: center;
}

.timer div {
  position: absolute;
  text-align: center;
}

.timer b {
  display: block;
  font-size: 22px;
}

.timer span {
  color: var(--faint);
  font-size: 12px;
}

.summary {
  width: 220px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
}

.summary > b {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  font-size: 13px;
}

.sum-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
}

.sum-row em {
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--veil);
  color: var(--accent);
  font: 500 11px var(--mono);
}

/* Small features */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 96px;
}

.tile-feature {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.tile-feature h3 {
  margin-top: 20px;
  font-size: 17px;
}

.tile-feature p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.scene-sm {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 140px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--bg);
  overflow: hidden;
}

.btn-fake {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 500;
}

.scene-mem {
  align-items: stretch;
  gap: 12px;
  padding: 0 18px;
}

.mem {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.mem i {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent) var(--w), var(--active) var(--w));
}

.mem i.asleep {
  background: var(--active);
}

.mem em {
  color: var(--faint);
  font-style: normal;
  font-size: 11px;
}

.toast.small {
  position: static;
  width: 88%;
}

.cursor {
  position: absolute;
  right: 26%;
  bottom: 18px;
  width: 14px;
  height: 18px;
  background: var(--text);
  clip-path: polygon(0 0, 0 100%, 30% 75%, 50% 100%, 65% 92%, 46% 68%, 85% 68%);
}

.scene-private {
  gap: 8px;
}

.scene-private span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}

.scene-private span::before {
  content: '';
  width: 10px;
  height: 5px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) translateY(-2px);
}

/* --------------------------------------------------------------- themes */

.themes {
  padding: 120px 0 40px;
}

.themes-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}

.themes-copy .lead {
  margin-top: 16px;
}

.themes-copy h2 {
  margin-top: 14px;
}

.theme-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 32px 0 14px;
}

.theme-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 140ms,
    background 140ms;
}

.theme-chip:hover {
  background: var(--hover);
}

.theme-chip.is-on {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
}

.theme-chip b {
  display: block;
  font-weight: 500;
  font-size: 14px;
}

.theme-chip span span {
  color: var(--faint);
  font-size: 12px;
}

.swatch {
  position: relative;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--sw-bg);
}

.swatch::after {
  content: '';
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sw-accent);
}

/* The preview window takes its colours from the chosen theme. */
.app-sm {
  color: var(--text);
  transition:
    background 220ms,
    color 220ms;
}

.app-sm .app-body {
  height: 380px;
  grid-template-columns: 64px minmax(0, 240px) 1fr;
}

.app-sm .app-bar {
  grid-template-columns: 1fr auto auto;
}

.app-sm .app-actions {
  padding-right: 14px;
}

.app-sm .list,
.app-sm .convo,
.app-sm .rail,
.app-sm .app-bar,
.app-sm .svc,
.app-sm .chat,
.app-sm .bubble,
.app-sm .composer {
  transition:
    background 220ms,
    border-color 220ms,
    color 220ms;
}

.mark-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.app[data-theme='paper'] .av,
.app[data-theme='daylight'] .av {
  /* Turns the dark avatar tints into light ones of the same hue. */
  filter: invert(1) hue-rotate(180deg);
}

.app[data-theme='quiet-room'] {
  --chrome: #0e0d0c;
  --bg-deep: #0c0b0a;
  --bg: #121110;
  --panel: #161513;
  --raised: #1a1917;
  --hover: #1f1d1a;
  --active: #2a2724;
  --line-soft: #1f1d1a;
  --line: #2a2724;
  --line-strong: #3a3631;
  --text: #ede8e1;
  --muted: #a39c92;
  --faint: #8a8378;
  --accent: #f2a33a;
  --accent-ink: #1a1206;
  --veil: #1e1a15;
}

.app[data-theme='midnight'] {
  --chrome: #0a0e15;
  --bg-deep: #090c12;
  --bg: #0e131b;
  --panel: #121822;
  --raised: #161d28;
  --hover: #1b2330;
  --active: #243041;
  --line-soft: #1a2130;
  --line: #232d3d;
  --line-strong: #33405a;
  --text: #e6ecf5;
  --muted: #9aa6b8;
  --faint: #8693a8;
  --accent: #6cb4ff;
  --accent-ink: #06121f;
  --veil: #101a28;
}

.app[data-theme='forest'] {
  --chrome: #0b0f0c;
  --bg-deep: #0a0d0b;
  --bg: #0f1411;
  --panel: #131915;
  --raised: #171e19;
  --hover: #1c241e;
  --active: #26302a;
  --line-soft: #1a211c;
  --line: #232c26;
  --line-strong: #334037;
  --text: #e7ede8;
  --muted: #9caaa0;
  --faint: #87968c;
  --accent: #8fcb9b;
  --accent-ink: #0b1a0f;
  --veil: #121c15;
}

.app[data-theme='mono'] {
  --chrome: #0a0a0a;
  --bg-deep: #080808;
  --bg: #101010;
  --panel: #151515;
  --raised: #191919;
  --hover: #202020;
  --active: #2b2b2b;
  --line-soft: #1e1e1e;
  --line: #2a2a2a;
  --line-strong: #3d3d3d;
  --text: #f2f2f2;
  --muted: #a6a6a6;
  --faint: #8f8f8f;
  --accent: #f2f2f2;
  --accent-ink: #0a0a0a;
  --veil: #181818;
}

.app[data-theme='paper'] {
  --chrome: #efeae2;
  --bg-deep: #e8e2d8;
  --bg: #f6f2ec;
  --panel: #efeae2;
  --raised: #fbf9f5;
  --hover: #e7e1d7;
  --active: #ddd5c9;
  --line-soft: #e3dcd1;
  --line: #d5ccbf;
  --line-strong: #bdb2a3;
  --text: #1e1b17;
  --muted: #554e45;
  --faint: #6a6257;
  --accent: #b5541c;
  --accent-ink: #ffffff;
  --veil: #efe5d6;
}

.app[data-theme='daylight'] {
  --chrome: #eef1f5;
  --bg-deep: #e9edf2;
  --bg: #f7f8fa;
  --panel: #eef1f5;
  --raised: #ffffff;
  --hover: #e4e8ee;
  --active: #d8dee7;
  --line-soft: #e1e5eb;
  --line: #d0d6df;
  --line-strong: #b5bdc9;
  --text: #161a20;
  --muted: #4a5360;
  --faint: #5d6673;
  --accent: #2563d9;
  --accent-ink: #ffffff;
  --veil: #e6edf8;
}

/* --------------------------------------------------------------- memory */

.memory {
  margin-top: 120px;
  padding: 104px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(ellipse 50% 70% at 100% 40%, rgb(242 163 58 / 0.07), transparent), var(--bg-deep);
}

.mem-board {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 24px;
  margin-top: 48px;
}

.mem-apps,
.mem-result {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.mem-apps {
  padding: 8px 20px;
}

.mem-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
}

.mem-row:first-child {
  border-top: 0;
}

.mem-name b {
  display: block;
  font-weight: 500;
}

.mem-name span {
  color: var(--faint);
  font-size: 12px;
}

sup {
  margin-left: 2px;
  color: var(--faint);
  font-size: 0.7em;
}

.mem-seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}

.mem-seg button {
  padding: 4px 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--faint);
  font: 500 12px var(--sans);
  cursor: pointer;
  transition:
    background 140ms,
    color 140ms;
}

.mem-seg button:hover {
  color: var(--text);
}

.mem-seg[data-state='awake'] [data-set='awake'] {
  background: var(--veil);
  color: var(--accent);
}

.mem-seg[data-state='paused'] [data-set='paused'],
.mem-seg[data-state='asleep'] [data-set='asleep'] {
  background: var(--active);
  color: var(--text);
}

.mem-plus {
  color: var(--muted);
  font-size: 14px;
}

.mem-result {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 32px;
}

.mem-big b {
  display: block;
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
}

.mem-big span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.bars {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 64px;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}

.bar-row span {
  color: var(--muted);
}

.bar-row b {
  text-align: right;
  font-size: 13px;
}

.bar {
  height: 12px;
  border-radius: 6px;
  background: var(--bg);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 6px;
  transition: width 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bar-fill.old {
  background: var(--line-strong);
}

.bar-fill.new {
  background: var(--accent);
}

.disk {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

.disk b {
  display: block;
  font-size: 22px;
}

.disk span {
  color: var(--faint);
  font-size: 13px;
}

.sources {
  max-width: 900px;
  margin-top: 24px;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.7;
}

.sources a {
  color: var(--muted);
}

.sources sup {
  margin-left: 8px;
}

/* -------------------------------------------------------------- install */

.install {
  padding: 120px 0 40px;
}

[data-release-status] {
  color: var(--faint);
}

.platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.platform {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  transition: border-color 160ms;
}

.platform.is-yours {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgb(242 163 58 / 0.08), transparent), var(--panel);
}

/* Once we know the visitor's system, only its button stays bright. */
.knows-os .platform:not(.is-yours) .btn-primary {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.knows-os .platform:not(.is-yours) .btn-primary:hover {
  background: var(--hover);
}

.platform-head h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
}

.platform.is-yours .platform-head h3::after {
  content: 'Your system';
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--veil);
  color: var(--accent);
  font: 500 11px var(--mono);
  letter-spacing: 0;
}

.req {
  display: block;
  margin-top: 8px;
  color: var(--faint);
  font-size: 12px;
}

.alt {
  margin-top: -4px;
  color: var(--faint);
  font-size: 14px;
}

.alt a {
  color: var(--muted);
}

details {
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}

summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: '+';
  display: inline-block;
  width: 18px;
  color: var(--faint);
  font-family: var(--mono);
}

details[open] summary::before {
  content: '−';
}

summary:hover {
  color: var(--text);
}

details p,
details pre {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

details b {
  color: var(--text);
  font-weight: 500;
}

pre {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-deep);
  overflow-x: auto;
  font-size: 13px;
}

.note {
  margin-top: 24px;
  color: var(--faint);
  font-size: 14px;
}

/* ------------------------------------------------------------------ faq */

.faq {
  padding: 120px 0 40px;
}

.faq-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
}

.faq details {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
}

.faq details p {
  padding-left: 18px;
  font-size: 16px;
}

.faq a {
  color: var(--text);
}

/* -------------------------------------------------------------- final */

.final {
  padding: 120px 0;
}

.final-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 72px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: radial-gradient(ellipse 60% 70% at 50% 100%, rgb(242 163 58 / 0.12), transparent), var(--panel);
  text-align: center;
}

/* --------------------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 0 40px;
}

.footer .brand {
  color: var(--text);
}

.footer a {
  color: var(--muted);
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 1040px) {
  .app-bar {
    grid-template-columns: 1fr auto;
  }
  .app-search,
  .focus-pill {
    display: none;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .row,
  .mem-board,
  .themes-inner,
  .faq-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .row.flip .row-copy {
    order: 0;
  }
  .platforms {
    grid-template-columns: 1fr;
  }
  .app-wall {
    grid-template-columns: repeat(4, 1fr);
  }
  .app-body {
    grid-template-columns: 64px 1fr;
  }
  .convo {
    display: none;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .hero {
    padding-top: 56px;
  }
  .app-body {
    height: 420px;
  }
  .rail-foot {
    display: none;
  }
  .app-wall {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .scene-focus {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .toast {
    right: 16px;
    bottom: 16px;
  }
  .winctl {
    display: none;
  }
  .app-actions {
    padding-right: 10px;
  }
}

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