:root {
  --c-bg:        #111111;
  --c-surface:   #1E1E1E;
  --c-card:      #222222;
  --c-fg:        #EEEEEE;
  --c-fg-muted:  #888888;
  --c-fg-dim:    #AAAAAA;
  --c-border:    #2D2D2D;
  --c-accent:    #FFFFFF;
  --c-accent-fg: #0A0A0A;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--c-bg);
  color: var(--c-fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}

a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { text-decoration-thickness: 2px; }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 0 40px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 40px;
}

.hero-art {
  display: block;
  width: 100%;
  max-width: 1024px;
  height: auto;
  color: #fff;
  margin-bottom: 20px;
}
.hero-bell { color: #FFAA00; }
.hero-say { animation: hero-say 4s step-end infinite; }
@keyframes hero-say {
  0% { color: #6E6E6E; }
  75% { color: #fff; }
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-fg);
}

.hero .tagline {
  margin: 0;
  color: var(--c-fg-muted);
  font-size: 17px;
}

h2 {
  font-size: 22px;
  margin: 32px 0 16px;
  color: var(--c-fg);
  font-weight: 600;
}

.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 20px 24px;
}

.note {
  color: var(--c-fg-muted);
  font-size: 15px;
  margin: 0 0 16px;
}

.download-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.download-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-border);
}
.download-list li:last-child { border-bottom: 0; }

.download-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--c-accent);
  color: var(--c-accent-fg);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: opacity 150ms ease;
}
.download-btn:hover { opacity: 0.85; }
.download-btn.disabled {
  background: var(--c-surface);
  color: var(--c-fg-muted);
  border: 1px solid var(--c-border);
  pointer-events: none;
}

.meta {
  color: var(--c-fg-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.policy-text p { margin: 0 0 14px; }
.policy-text .updated {
  color: var(--c-fg-muted);
  font-size: 13px;
  margin-top: -8px;
}

footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
  color: var(--c-fg-muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer a { color: var(--c-fg-muted); }
footer a:hover { color: var(--c-accent); }

@media (max-width: 560px) {
  main { padding: 32px 18px 48px; }
  .hero h1 { font-size: 34px; }
  .download-list li { flex-direction: column; align-items: flex-start; }
}

/* Docs */
:root {
  --c-code-bg: #171717;
  --c-code-fg: #E6E6E6;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: inline-flex;
  align-items: center;
  color: var(--c-fg);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
}
.brand-logo {
  display: block;
  height: 24px;
  width: auto;
}
@media (max-width: 480px) {
  .brand-logo { height: 18px; }
}
.top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
}
.site-header nav a {
  color: var(--c-fg-dim);
  text-decoration: none;
  font-size: 15px;
}
.site-header nav a[aria-current="page"],
.site-header nav a:hover { color: var(--c-fg); }

.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.docs-nav {
  position: sticky;
  top: 57px;
  align-self: start;
  max-height: calc(100vh - 57px);
  overflow-y: auto;
  padding: 32px 0;
}
.nav-tree summary {
  list-style: none;
  cursor: pointer;
}
.nav-tree summary::-webkit-details-marker { display: none; }
.nav-tree summary::before {
  content: "\25B8";
  display: inline-block;
  width: 14px;
  color: var(--c-fg-muted);
  transition: transform 120ms ease;
}
.nav-tree details[open] > summary::before { transform: rotate(90deg); }
.docs-nav-section { margin-bottom: 14px; }
.docs-nav-section > summary {
  color: var(--c-fg);
  font-weight: 600;
  font-size: 15px;
  padding: 4px 0;
}
.docs-nav-group { margin: 2px 0 6px 14px; }
.docs-nav-group > summary {
  color: var(--c-fg-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 0;
}
.docs-nav-group > summary:hover, .docs-nav-section > summary:hover { color: var(--c-fg); }
.docs-nav-title {
  display: block;
  color: var(--c-fg-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.docs-nav-group > a, .docs-nav-section > .docs-nav-top { margin-left: 14px; }
.nav-tree a, .docs-toc a {
  display: block;
  color: var(--c-fg-dim);
  text-decoration: none;
  font-size: 14px;
  padding: 4px 0 4px 10px;
  border-left: 2px solid transparent;
}
.nav-tree a:hover, .docs-toc a:hover { color: var(--c-fg); }
.nav-tree a[aria-current="page"] {
  color: var(--c-fg);
  border-left-color: var(--c-accent);
}

.docs-main {
  margin: 0;
  min-width: 0;
  max-width: 780px;
  padding: 32px 0 64px;
}
.crumb {
  margin: 0 0 8px;
  color: var(--c-fg-muted);
  font-size: 13px;
}
.crumb a { color: var(--c-fg-muted); }

.docs-toc {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 20px 0 8px;
}
.docs-toc a { padding-left: 0; border: 0; }

.prose h1 {
  font-size: 36px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 16px;
}
.prose h2 {
  font-size: 24px;
  margin: 44px 0 12px;
  padding-top: 8px;
  scroll-margin-top: 72px;
}
.prose h3 { font-size: 18px; margin: 28px 0 8px; scroll-margin-top: 72px; }
.prose h2 .anchor, .prose h3 .anchor { color: inherit; text-decoration: none; }
.prose h2 .anchor:hover::after, .prose h3 .anchor:hover::after {
  content: " #";
  color: var(--c-fg-muted);
}
.prose p, .prose li { color: var(--c-fg-dim); }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin: 4px 0; }
.prose strong { color: var(--c-fg); }

.prose code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--c-code-fg);
}
.prose pre {
  background: var(--c-code-bg);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0 0 18px;
  line-height: 1.5;
}
.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 13.5px;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 18px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-border);
}
.prose th {
  background: var(--c-surface);
  color: var(--c-fg);
  font-weight: 600;
}
.prose td { color: var(--c-fg-dim); }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { width: 38%; }
.prose code { overflow-wrap: anywhere; }

/* Windows / macOS / Linux step tabs. Without JavaScript every panel shows, each under its label. */
.os-tabs {
  margin: 0 0 18px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  overflow: hidden;
}
.os-tab-bar {
  display: none;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  overflow-x: auto;
}
.js-tabs .os-tab-bar { display: flex; }
.os-tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--c-fg-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
}
.os-tab:hover { color: var(--c-fg); }
.os-tab[aria-selected="true"] { color: var(--c-fg); border-bottom-color: var(--c-accent); }
.os-tab-panel { padding: 16px 18px 4px; }
.os-tab-panel + .os-tab-panel { border-top: 1px solid var(--c-border); }
.js-tabs .os-tab-panel + .os-tab-panel { border-top: 0; }
.prose .os-tab-label { color: var(--c-fg); font-weight: 600; margin: 0 0 10px; }
.js-tabs .os-tab-label { display: none; }
.os-tab-panel pre, .os-tab-panel .table-wrap { margin-bottom: 14px; }

/* A compact switch beside a single download button. */
.os-tabs-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.os-tabs-compact .os-tab-bar {
  border: 1px solid var(--c-border);
  border-radius: 8px;
  overflow: hidden;
}
.os-tabs-compact .os-tab { padding: 8px 14px; border-bottom: 0; }
.os-tabs-compact .os-tab[aria-selected="true"] { background: var(--c-card); }
.os-tabs-compact .os-tab-panel { padding: 0; display: flex; align-items: center; gap: 10px; }
.os-tabs-compact .os-tab-panel + .os-tab-panel { border-top: 0; }
.os-tab-panel[hidden] { display: none; }
.os-tabs-compact .os-tab-label { color: var(--c-fg-dim); font-size: 14px; }

.docs-main footer { margin-top: 64px; }

.docs-nav-button { display: none; }

@media (max-width: 860px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 18px; }
  .docs-nav-button {
    display: block;
    margin: 12px 18px 0;
    padding: 8px 14px;
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: 8px;
    color: var(--c-fg);
    font-size: 14px;
    cursor: pointer;
  }
  .docs-nav {
    display: none;
    position: static;
    max-height: none;
    padding: 16px 0 8px;
    border-bottom: 1px solid var(--c-border);
  }
  .docs-nav-toggle:checked ~ .docs-layout .docs-nav { display: block; }
  .site-header { padding: 12px 18px; }
  .prose h1 { font-size: 30px; }
}

@media (max-width: 480px) {
  .top-nav { gap: 6px 18px; }
}

/* Front page screenshot strip: Lemmes carry the shots across the page,
   left to right. The track holds every shot twice so the loop is seamless. */
@font-face {
  font-family: "VT323";
  src: url(fonts/VT323.woff2) format("woff2");
  font-display: swap;
}
.showcase {
  position: relative;
  width: 100vw;
  margin: 0 calc(50% - 50vw) 48px;
}
.showcase-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.showcase-depth {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
}
.depth-track {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  gap: 40px;
  width: max-content;
  align-items: flex-end;
  transform-origin: 0 100%;
  will-change: transform;
}
.showcase-strip {
  position: relative;
  z-index: 1;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.talk {
  position: sticky;
  top: 69px;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  box-sizing: border-box;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 0 0 20px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.talk.here {
  opacity: 1;
  transform: none;
}
.showcase .talk { margin: 24px 0 0 24px; }
.talk::before {
  content: "";
  position: absolute;
  left: -6px;
  top: -6px;
  width: 84px;
  height: 84px;
  border-radius: 12px;
  background: var(--c-bg);
  z-index: -1;
}
.talk .narrator {
  flex: none;
  width: 72px;
  height: 72px;
  background: var(--c-accent);
  -webkit-mask: url(lemme.png) center/contain no-repeat;
          mask: url(lemme.png) center/contain no-repeat;
}
.talk .narrator.talking { animation: lemme-walk 0.2s ease-in-out 5 alternate; }
.talk .bubble {
  margin: 6px 0 0;
  font-family: "VT323", ui-monospace, "Consolas", monospace;
  font-size: 22px;
  line-height: 1.05;
  color: var(--c-accent);
  text-shadow: 0 0 6px color-mix(in srgb, var(--c-accent) 55%, transparent);
  white-space: pre;
  overflow: hidden;
  padding: 2px 8px 4px 4px;
  border-radius: 12px;
  background: var(--c-bg);
  box-shadow: 0 0 20px 10px var(--c-bg);
  font-kerning: none;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "clig" 0, "calt" 0, "kern" 0;
}
.showcase-track {
  position: relative;
  display: flex;
  gap: 40px;
  width: max-content;
  align-items: flex-end;
  padding: 4px 20px 8px;
  will-change: transform;
}
.showcase.is-lifted .lemme,
.showcase.is-lifted img { animation-play-state: paused; }
:is(.showcase, .showcase-layer) figure { cursor: zoom-in; }
.showcase.dragging, .showcase.dragging figure { cursor: grabbing; }
.showcase img { -webkit-user-drag: none; }
.showcase-layer { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.showcase-shade {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(0, 0, 0, 0);
  transition: background 0.45s ease;
}
.showcase-shade.on { background: rgba(0, 0, 0, 0.88); }
figure.lifted {
  position: fixed;
  z-index: 20;
  margin: 0;
  transform-origin: 0 0;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: zoom-out;
}
figure.lifted img { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
figure.lifted img,
figure.lifted .lemme { animation: none; }
:is(.showcase, .showcase-layer) figure {
  margin: 0;
  flex: none;
  width: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
:is(.showcase, .showcase-layer) figure.wide { width: 480px; }
:is(.showcase, .showcase-layer) figure.watch { width: 190px; }
:is(.showcase, .showcase-layer) figure.watch img { border-radius: 50%; border-width: 6px; border-color: #2A2A2A; }
.showcase figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.showcase-layer figcaption { display: none; }
:is(.showcase, .showcase-layer) img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--c-border);
  animation: lemme-sway 0.9s ease-in-out infinite alternate;
}
:is(.showcase, .showcase-layer) .carriers {
  position: relative;
  z-index: 0;
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin-top: -6px;
}
:is(.showcase, .showcase-layer) .lemme {
  width: 64px;
  height: 64px;
  background: var(--c-accent);
  -webkit-mask: url(lemme.png) center/contain no-repeat;
          mask: url(lemme.png) center/contain no-repeat;
  animation: lemme-walk var(--walk, 0.45s) ease-in-out infinite alternate;
}
:is(.showcase, .showcase-layer) .lemme + .lemme { animation-delay: -0.22s; }
:is(.showcase, .showcase-layer) figure:nth-child(3n) img { animation-delay: -0.4s; }
@keyframes lemme-walk {
  from { transform: translateY(0) rotate(-5deg); }
  to   { transform: translateY(-4px) rotate(5deg); }
}
@keyframes lemme-sway {
  from { transform: translateY(0) rotate(-0.6deg); }
  to   { transform: translateY(-3px) rotate(0.6deg); }
}
@media (prefers-reduced-motion: reduce) {
  :is(.showcase, .showcase-layer) .lemme, :is(.showcase, .showcase-layer) img { animation: none; }
}
@media (max-width: 560px) {
  :is(.showcase, .showcase-layer) figure { width: 160px; }
  :is(.showcase, .showcase-layer) figure.wide { width: 320px; }
  :is(.showcase, .showcase-layer) figure.watch { width: 150px; }
  :is(.showcase, .showcase-layer) .lemme { width: 48px; height: 48px; }
  .showcase .talk { margin: 14px 0 0 12px; }
  .talk .narrator { width: 52px; height: 52px; }
  .talk::before { width: 64px; height: 64px; }
  .talk .bubble { font-size: 18px; }
}

/* Screenshots inside documentation pages. */
.shots {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 0 24px;
}
.shots figure { margin: 0; flex: 0 1 220px; }
.shots figure:only-child { flex-basis: 260px; }
.shots figure.wide { flex: 1 1 100%; }
.shots .shot-link { display: block; cursor: zoom-in; }
.shots img {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--c-border);
}
.shots figcaption {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--c-fg-muted);
}

/* Previous and next links at the bottom of each documentation page. */
.docs-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 40px 0 8px;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
}
.docs-pager a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 48%;
  padding: 12px 16px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: var(--c-surface);
  text-decoration: none;
  font-weight: 600;
}
.docs-pager a:hover { border-color: var(--c-fg-muted); }
.docs-pager span {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--c-fg-muted);
}
.docs-pager-next { margin-left: auto; text-align: right; }
.docs-pager-prev span::before { content: "\2190  "; }
.docs-pager-next span::after { content: "  \2192"; }

/* Front page: each section fills the screen below the header and the page
   snaps to the top of one section at a time. */
html:has(body.home) {
  scroll-snap-type: y mandatory;
  scroll-padding-top: 57px;
}
body.home { background: transparent; }
body.home::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #000 url(background.svg) center / cover no-repeat;
}
body.home main { padding-top: 0; padding-bottom: 0; }
body.home .hero,
body.home .showcase {
  min-height: calc(100vh - 57px);
  min-height: calc(100svh - 57px);
  scroll-snap-align: start;
  margin-bottom: 0;
}
body.home .hero {
  height: calc(100vh - 57px);
  height: calc(100svh - 57px);
  justify-content: center;
  padding: 24px 0 40px;
  box-sizing: border-box;
  border-bottom: 0;
}
body.home .hero .tagline { font-size: clamp(20px, 3vw, 28px); }
/* The home hero fills the screen, so pinning the badge to its bottom corner,
   pushed out to the window edge, holds it in the screen's corner until the
   hero scrolls away. */
body.home .hero { position: relative; }
.hero-play {
  position: absolute;
  right: calc((100% - 100vw) / 2 + max(8px, env(safe-area-inset-right, 0px)));
  bottom: max(8px, env(safe-area-inset-bottom, 0px));
  margin: 0;
}
body.home { overflow-x: clip; }
body.home .hero-art {
  flex: 0 1 auto;
  min-height: 0;
  width: calc(100vw - 32px);
  max-width: none;
}
body.home .showcase {
  display: flex;
  flex-direction: column;
}
body.home .showcase-strip { margin-top: auto; margin-bottom: 3vh; }
body.home footer {
  margin-top: 0;
  padding-bottom: 24px;
  scroll-snap-align: end;
}

/* Downloads: delivery screen previews */
.screen-card {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.screen-phone {
  position: relative;
  flex: 0 0 220px;
  aspect-ratio: 9 / 20;
  overflow: hidden;
  border-radius: 22px;
  border: 6px solid #2a2a2a;
  background: #000;
}
.screen-phone iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: 0 0;
  pointer-events: none;
}
.screen-tracker {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
  pointer-events: none;
}
.screen-tracker span {
  display: block;
  height: 100%;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.screen-tracker.run span { animation: screen-track var(--loop, 6s) linear forwards; }
@keyframes screen-track { to { transform: scaleX(1); } }
.screen-info { flex: 1 1 auto; min-width: 0; }
.screen-info h3 { margin: 4px 0 8px; font-size: 19px; color: var(--c-fg); }
.screen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
@media (max-width: 560px) {
  .screen-card { flex-direction: column; align-items: center; }
  .screen-phone { flex-basis: auto; width: min(240px, 70vw); }
}
button.download-btn { font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }

/* Downloads: a plugin's notification card, looping under its screen's description. */
.card-demo { margin: 4px 0 16px; max-width: 380px; }
.card-demo-label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-fg-muted);
}
.card-demo-box {
  position: relative;
  aspect-ratio: 360 / 120;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
}
.card-demo-box iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: 0 0;
  pointer-events: none;
}

/* Try it: the Delivery screen / Notification card tabs, and the card over a lock screen. */
.try-tabs { display: flex; gap: 6px; margin: 0 0 12px; }
.try-tab {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-fg-muted);
  cursor: pointer;
}
.try-tab[aria-selected="true"] { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-accent-fg); }
.screen-phone .try-device .try-card-frame {
  position: absolute;
  top: 70px;
  left: 12px;
  border: 0;
  border-radius: 22px;
  overflow: hidden;
}

/* Downloads: the Try it popup (delivery-try.js). The phone sits beside the
   settings on wide screens and above them on narrow ones. */
.try-dialog {
  width: min(1100px, calc(100vw - 32px));
  height: min(880px, calc(100svh - 32px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid var(--c-border);
  border-radius: 14px;
  background: var(--c-surface);
  color: var(--c-fg);
  overflow: hidden;
}
.try-dialog[open] { display: flex; }
.try-dialog [hidden] { display: none !important; }
.try-dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
.try-stage {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--c-bg);
}
.try-phone {
  flex: none;
  box-sizing: content-box;
  height: min(780px, calc(100svh - 96px));
  width: auto;
}
.try-device {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  overflow: hidden;
  background: #000;
}
.screen-phone .try-device iframe { transform: none; }
.try-tap {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.try-tap.idle::after {
  content: attr(data-hint);
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  color: var(--c-fg-dim);
  font-size: 14px;
}
.try-tools {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  padding: 20px 24px 28px;
}
.try-head {
  position: sticky;
  top: -20px;
  z-index: 1;
  margin: -20px -24px 0;
  padding: 20px 24px 10px;
  background: var(--c-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.try-head h2 { margin: 0; font-size: 22px; }
.try-close, .try-mini {
  font: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--c-border);
  background: var(--c-card);
  color: var(--c-fg);
  cursor: pointer;
}
.try-tools .note { margin: 8px 0 4px; font-size: 14px; }
.try-section { border-top: 1px solid var(--c-border); margin-top: 16px; padding-top: 14px; }
.try-section h3 {
  margin: 0 0 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-fg-muted);
}
.try-field { margin-top: 12px; }
.try-label { display: block; font-size: 13px; color: var(--c-fg-dim); margin-bottom: 5px; }
.try-input, .try-select {
  box-sizing: border-box;
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--c-border);
  background: var(--c-card);
  color: var(--c-fg);
}
textarea.try-input { resize: vertical; min-height: 60px; }
.try-section > .try-select { margin-top: 6px; }
.try-field > div > * + * { margin-top: 6px; }
.try-row { display: flex; align-items: center; gap: 8px; }
.try-row > .try-input, .try-row > .try-select { flex: 1 1 auto; min-width: 0; }
.try-row > .try-mini { flex: 0 0 auto; width: auto; }
.try-range { flex: 1 1 auto; min-width: 0; accent-color: var(--c-accent); }
.try-row > .try-number { flex: 0 0 76px; text-align: right; }
.try-suffix { flex: 0 0 auto; min-width: 1.5em; font-size: 13px; color: var(--c-fg-muted); }
.try-color {
  flex: 0 0 40px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-card);
}
.try-status {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--c-fg-muted);
}
.try-toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.try-toggle input { width: 18px; height: 18px; accent-color: var(--c-accent); }
.try-app-note { margin: 4px 0 0; font-size: 13px; color: var(--c-fg-muted); font-style: italic; }
.try-privacy { margin: 24px 0 0; font-size: 12.5px; color: var(--c-fg-muted); }
@media (max-width: 760px) {
  .try-dialog {
    width: 100vw;
    height: 100svh;
    border-radius: 0;
    border: 0;
  }
  .try-dialog[open] { flex-direction: column; }
  .try-stage { padding: 12px; }
  .try-phone { height: 44svh; }
  .try-tools { padding: 14px 16px 24px; }
  .try-head { top: -14px; margin: -14px -16px 0; padding: 14px 16px 8px; }
}

/* Front page sections between and after the hero and the screenshots. Each
   opens with a talking Lemme (talk.js). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.feature {
  display: flex;
  flex-direction: column;
  padding: 12px 0 32px;
  box-sizing: border-box;
}
.feature .talk + h2 + * { margin-top: auto; }
.feature > :last-child { margin-bottom: auto; }
.showoff-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: #000;
}
.feature .lead {
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--c-fg);
}
.feature .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.feature .grid.quad { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) {
  .feature .grid.quad { grid-template-columns: 1fr; }
}
.feature .grid > div {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 18px 20px;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--c-fg);
}
.feature .grid p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--c-fg-muted);
}
.feature .step {
  display: block;
  margin-bottom: 6px;
  font-family: "VT323", ui-monospace, "Consolas", monospace;
  font-size: 26px;
  line-height: 1;
  color: var(--c-accent);
}
.feature .more {
  margin: 22px 0 0;
  font-size: 14.5px;
  color: var(--c-fg-muted);
}
.feature .more a { color: var(--c-fg); }
.feature .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
/* The badge image has clear space built in, so the negative margin lines its
   visible edge up with the buttons beside it. */
.play-badge { display: inline-flex; align-items: center; margin: -10px -8px; }
.play-badge img { height: 58px; width: auto; display: block; }
.feature .actions { align-items: center; }
.feature .trademark { font-size: 12px; color: var(--c-fg-muted); margin-top: 12px; }
.download-btn.ghost {
  background: transparent;
  color: var(--c-fg);
  border: 1px solid var(--c-border);
}
body.home .feature {
  min-height: calc(100vh - 57px);
  min-height: calc(100svh - 57px);
  scroll-snap-align: start;
}

/* Desktop: wider columns and larger type so big screens aren't mostly margin. */
@media (min-width: 1100px) {
  body.home main, body.downloads main { max-width: 1200px; padding-left: 40px; padding-right: 40px; }
  .feature .lead { font-size: 24px; max-width: 900px; margin-bottom: 36px; text-wrap: balance; }
  .feature .grid { gap: 20px; }
  .feature .grid.quad { grid-template-columns: repeat(4, 1fr); }
  .feature .grid > div { padding: 24px 26px; }
  .feature h3 { font-size: 19px; }
  .feature .grid p, .feature .more { font-size: 16px; }
  .feature .step { font-size: 32px; }
  .talk .narrator { width: 96px; height: 96px; }
  .talk::before { width: 108px; height: 108px; }
  .talk .bubble { font-size: 28px; margin-top: 10px; }

  .screen-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
  .screen-grid .screen-card { flex-direction: column; align-items: stretch; margin: 0; }
  .screen-grid .screen-phone { flex: none; width: min(260px, 100%); align-self: center; }

  .docs-layout { max-width: 1480px; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding: 0 40px; }
  .docs-main { max-width: 1000px; }
}
/* Plenty of room: each section's talking Lemme sits centered just above its
   content, and the two are centered on the screen together. */
@media (min-width: 1100px) and (min-height: 760px) {
  .feature .talk { align-self: center; margin: auto 0 32px; }
  .feature .talk + h2 + * { margin-top: 0; }
  .feature > :last-child { margin-bottom: auto; }
  .feature .lead, .feature .more, .feature .trademark { text-align: center; margin-left: auto; margin-right: auto; }
  .feature .actions { justify-content: center; }
  .showcase .talk { align-self: center; margin: 2vh 0 0; }
}
/* Big screens: the screenshots and their carriers grow to fill the height
   left between the caption and the bottom of the screen. */
@media (min-width: 1100px) and (min-height: 760px) {
  body.home { --shot: clamp(210px, (100svh - 250px) * 0.39, 480px); }
  body.home :is(.showcase, .showcase-layer) figure { width: var(--shot); }
  body.home :is(.showcase, .showcase-layer) figure.wide { width: calc(var(--shot) * 480 / 210); }
  body.home :is(.showcase, .showcase-layer) figure.watch { width: calc(var(--shot) * 190 / 210); }
  body.home :is(.showcase, .showcase-layer) .lemme { width: calc(var(--shot) * 64 / 210); height: calc(var(--shot) * 64 / 210); }
  body.home .showcase-track { gap: calc(var(--shot) * 40 / 210); }
  body.home .showcase-strip { margin-bottom: 2vh; }
}
/* Very wide: "On this page" becomes a column beside the article that stays in view. */
@media (min-width: 1500px) {
  .docs-main { max-width: none; }
  .prose { display: grid; grid-template-columns: minmax(0, 1fr) 240px; column-gap: 56px; }
  .prose > * { grid-column: 1; }
  .prose > .docs-toc {
    grid-column: 2;
    grid-row: 1 / span 400;
    align-self: start;
    position: sticky;
    top: 89px;
    margin: 0;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
}


/* A feature documented ahead of the app update that brings it. */
.soon {
  display: inline-block;
  margin-left: 0.5em;
  padding: 0.12em 0.6em;
  border: 1px solid var(--c-fg-dim);
  border-radius: 999px;
  color: var(--c-fg-dim);
  font-size: 0.68em;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}
