/* Tailwind's layer order, declared here because this file loads before Fairpage's stylesheet:
   the first file to name a layer fixes its place, and components must come after base. */
@layer properties, theme, base, components, utilities;

/* Geist and Geist Mono (SIL OFL 1.1), self-hosted. Variable fonts: one file covers 400–600. */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("https://media.fairpage.app/3/58a6b173d5ca1dec/geist-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("https://media.fairpage.app/3/9b6f5ff45b278c74/geist-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("https://media.fairpage.app/3/745994b5cd950ec2/geist-mono-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("https://media.fairpage.app/3/5f3d6ad60f29d6cb/geist-mono-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@layer components {

/* Effortless — effortless.run
 *
 * Components. Layout and spacing are Tailwind utilities in the markup; this file holds what the
 * utilities cannot express (pseudo-classes on components, table layout, responsive component
 * rules). Colours and fonts are tokens in _styleguide/theme.css. Wrapped in @layer components so
 * the utilities, which Fairpage puts in a later layer, win over these rules.
 *
 * Palette matches the /_admin UI (src/admin/assets/admin.css): near-black on white, gray
 * hairlines, one blue for links. No accent fills. Type is Geist + Geist Mono. */

/* ---------------------------------------------------------------- tokens */

:root {
  --shell: 1120px;
  --nav-h: 60px;
}

/* ---------------------------------------------------------------- reset
 * Minimal and compatible with Tailwind's Preflight, which Fairpage adds. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--color-surface);
  color: var(--color-body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* The img/svg display rule above would otherwise beat the hidden attribute. */
[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
  font-size: inherit;
}

pre {
  margin: 0;
}

::selection {
  background: var(--color-fg);
  color: var(--color-surface);
}

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

/* Inline code in prose. */
.ic {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--color-fg);
  background: var(--color-subtle);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  padding: 1px 5px;
  white-space: nowrap;
}

/* Small uppercase label above a section. */
.label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* Section headings. */
.h2 {
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-fg);
  text-wrap: balance;
}

.h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--color-fg);
}

.lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-body);
}

@media (min-width: 768px) {
  .lede {
    font-size: 18px;
  }
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-surface) 85%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

/* Hairline once the page has scrolled 8px. Browsers without scroll timelines show it always. */
@supports (animation-timeline: scroll()) {
  .nav {
    animation: nav-hairline linear both;
    animation-timeline: scroll(root);
    animation-range: 0 8px;
  }
}

@supports not (animation-timeline: scroll()) {
  .nav {
    border-bottom-color: var(--color-border);
  }
}

@keyframes nav-hairline {
  to {
    border-bottom-color: var(--color-border);
  }
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-fg);
}

.brand-mark {
  width: 22px;
  height: 22px;
  flex: none;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}

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

.nav-links .sep {
  width: 1px;
  height: 20px;
  margin: 0 8px;
  background: var(--color-border);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  white-space: nowrap;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: -8px;
  border-radius: 6px;
  color: var(--color-fg);
}

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

.nav-panel {
  position: fixed;
  inset: var(--nav-h) 0 auto 0;
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  color: inherit;
  padding: 8px 0 16px;
}

.nav-panel a {
  display: block;
  padding: 10px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-fg);
  border-bottom: 1px solid var(--color-border);
}

.nav-panel a:last-child {
  border-bottom: 0;
}

@media (min-width: 860px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle,
  .nav-panel {
    display: none !important;
  }
}

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

.hero {
  position: relative;
  padding: 72px 0 88px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero {
    padding: 112px 0 128px;
  }
}

/* Faint grid behind the hero, fading out toward the bottom. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--color-border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 100%);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px 0 6px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
  transition: border-color 0.15s ease, color 0.15s ease;
}

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

.pill .tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--color-fg);
  color: var(--color-surface);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}

.hero h1 {
  max-width: 15ch;
  margin: 28px 0 0;
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--color-fg);
  text-wrap: balance;
}

.hero-sub {
  max-width: 58ch;
  margin: 24px 0 0;
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.6;
  color: var(--color-muted);
  text-wrap: pretty;
}

.hero-sub strong {
  font-weight: 500;
  color: var(--color-fg);
}

.copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--color-muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.copy:hover {
  background: var(--color-hover);
  color: var(--color-fg);
}

.copy[data-copied="true"] {
  color: var(--color-ok);
}

/* Autoplay: frames take turns in one grid cell, each for --d seconds, while a bar fills under its
   step. Hovering pauses; with reduced motion the first frame stays and nothing moves. */
.ap-steps {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 8px;
  margin-bottom: 14px;
}

.ap-steps li {
  min-width: 0;
}

.ap-bar {
  display: block;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--color-border);
}

.ap-bar span {
  display: block;
  height: 100%;
  background: var(--color-fg);
  transform: scaleX(0);
  transform-origin: left;
}

.ap-label {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--color-faint);
  text-align: left;
}

.ap-stage {
  display: grid;
}

.ap-frame {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
}
.ap-6 .ap-frame { animation: ap-show-6 calc(var(--d) * 6) calc(var(--i) * var(--d)) infinite; }
.ap-6 .ap-bar span { animation: ap-fill-6 calc(var(--d) * 6) linear calc(var(--i) * var(--d)) infinite; }
.ap-6 .ap-label { animation: ap-on-6 calc(var(--d) * 6) calc(var(--i) * var(--d)) infinite; }
.ap-4 .ap-frame { animation: ap-show-4 calc(var(--d) * 4) calc(var(--i) * var(--d)) infinite; }
.ap-4 .ap-bar span { animation: ap-fill-4 calc(var(--d) * 4) linear calc(var(--i) * var(--d)) infinite; }
.ap-4 .ap-label { animation: ap-on-4 calc(var(--d) * 4) calc(var(--i) * var(--d)) infinite; }
.ap-3 .ap-frame { animation: ap-show-3 calc(var(--d) * 3) calc(var(--i) * var(--d)) infinite; }
.ap-3 .ap-bar span { animation: ap-fill-3 calc(var(--d) * 3) linear calc(var(--i) * var(--d)) infinite; }
.ap-3 .ap-label { animation: ap-on-3 calc(var(--d) * 3) calc(var(--i) * var(--d)) infinite; }
.ap-2 .ap-frame { animation: ap-show-2 calc(var(--d) * 2) calc(var(--i) * var(--d)) infinite; }
.ap-2 .ap-bar span { animation: ap-fill-2 calc(var(--d) * 2) linear calc(var(--i) * var(--d)) infinite; }
.ap-2 .ap-label { animation: ap-on-2 calc(var(--d) * 2) calc(var(--i) * var(--d)) infinite; }

.autoplay:hover * {
  animation-play-state: paused;
}

@keyframes ap-show-4 {
  0% { opacity: 0; visibility: visible; }
  2%, 23% { opacity: 1; visibility: visible; }
  25%, 100% { opacity: 0; visibility: hidden; }
}

@keyframes ap-fill-4 {
  0% { transform: scaleX(0); }
  25% { transform: scaleX(1); }
  25.01%, 100% { transform: scaleX(0); }
}

@keyframes ap-on-4 {
  0%, 24.9% { color: var(--color-fg); }
  25%, 100% { color: var(--color-faint); }
}

@keyframes ap-show-3 {
  0% { opacity: 0; visibility: visible; }
  2.5%, 31% { opacity: 1; visibility: visible; }
  33.33%, 100% { opacity: 0; visibility: hidden; }
}

@keyframes ap-fill-3 {
  0% { transform: scaleX(0); }
  33.33% { transform: scaleX(1); }
  33.34%, 100% { transform: scaleX(0); }
}

@keyframes ap-on-3 {
  0%, 33.3% { color: var(--color-fg); }
  33.33%, 100% { color: var(--color-faint); }
}

@keyframes ap-show-2 {
  0% { opacity: 0; visibility: visible; }
  4%, 46% { opacity: 1; visibility: visible; }
  50%, 100% { opacity: 0; visibility: hidden; }
}

@keyframes ap-fill-2 {
  0% { transform: scaleX(0); }
  50% { transform: scaleX(1); }
  50.01%, 100% { transform: scaleX(0); }
}

@keyframes ap-on-2 {
  0%, 49.9% { color: var(--color-fg); }
  50%, 100% { color: var(--color-faint); }
}

@keyframes ap-show-6 {
  0% { opacity: 0; visibility: visible; }
  1.5%, 15.2% { opacity: 1; visibility: visible; }
  16.67%, 100% { opacity: 0; visibility: hidden; }
}

@keyframes ap-fill-6 {
  0% { transform: scaleX(0); }
  16.67% { transform: scaleX(1); }
  16.68%, 100% { transform: scaleX(0); }
}

@keyframes ap-on-6 {
  0%, 16.6% { color: var(--color-fg); }
  16.67%, 100% { color: var(--color-faint); }
}

@media (max-width: 640px) {
  .ap-6 .ap-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .autoplay .ap-frame,
.autoplay .ap-bar span,
.autoplay .ap-label {
    animation: none;
  }

  .autoplay .ap-frame:first-child {
    opacity: 1;
    visibility: visible;
  }
}

/* Keep running text in two-column grids and the footer note to a readable measure. */
#limits p,
footer p.text-faint {
  max-width: 68ch;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--color-fg);
  color: var(--color-surface);
  border-color: var(--color-fg);
}

.btn-primary:hover {
  background: #383838;
  border-color: #383838;
}

.btn-ghost {
  color: var(--color-fg);
  border-color: var(--color-border);
  background: var(--color-surface);
}

.btn-ghost:hover {
  border-color: var(--color-border-strong);
  background: var(--color-subtle);
}

.btn svg {
  flex: none;
}

.btn-primary svg {
  opacity: 0.7;
}

/* Text link with a trailing arrow. */
.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-fg);
}

.more::after {
  content: "→";
  transition: transform 0.15s ease;
}

.more:hover::after {
  transform: translateX(3px);
}

/* ---------------------------------------------------------------- code + terminal panels */

.panel {
  background: var(--color-term);
  border: 1px solid var(--color-term-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.02), 0 24px 48px -24px rgba(0, 0, 0, 0.35);
}

.panel-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  background: var(--color-term-bar);
  border-bottom: 1px solid var(--color-term-line);
}

.panel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #333333;
  flex: none;
}

.panel-name {
  min-width: 0;
  margin-left: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--color-term-dim);
}

.panel-bar .spacer {
  flex: 1;
}

.panel-bar .meta {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--color-term-faint);
}

/* A phone has room for the file name, not the note beside it. */
@media (max-width: 640px) {
  .panel-bar .meta {
    display: none;
  }
}

.panel-body {
  padding: 16px 18px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-term-line) transparent;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--color-term-fg);
  tab-size: 2;
}

.panel-body code {
  font-size: inherit;
}

/* Terminal output wraps, because a real terminal wraps. Code panels do NOT wrap: a wrapped
 * Lua sample misrepresents its line count, and "11 lines of Lua" is a claim on this page. */
.panel-body.term {
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* The "what you'd write otherwise" panel: flat and light next to the dark, coloured EQL panel. */
.panel-light {
  background: var(--color-subtle);
  border-color: var(--color-border);
  box-shadow: none;
}

.panel-light .panel-bar {
  background: var(--color-surface);
  border-bottom-color: var(--color-border);
}

.panel-light .panel-name {
  color: var(--color-muted);
}

.panel-light .panel-body {
  color: var(--color-muted);
}

.cmp-pair .panel-body {
  font-size: 12.5px;
  line-height: 1.7;
}

.cmp-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-faint);
  margin-bottom: 10px;
}

.cmp-label.win {
  color: var(--color-fg);
}

/* Five file names do not fit a phone; wrap them rather than hide the last behind a scroll. */
@media (max-width: 640px) {
  [data-tab-group] .tabs {
    flex-wrap: wrap;
  }
}

/* ---------------------------------------------------------------- syntax colors
 * Hand-authored spans. No highlighter: zero JS, zero flash, samples are short.
 * Restrained: two hues on a grey ramp, so the code reads as text, not as a rainbow. */

.t-key { color: #c4b5fd; }                      /* keyword — soft violet */
.t-str { color: #a7f3d0; }                      /* string — mint */
.t-num { color: #fcd34d; }                      /* number, boolean, nil — amber */
.t-fn  { color: var(--color-term-fg); }                      /* function / module — white */
.t-pun { color: #808080; }                      /* punctuation — grey */
.t-tag { color: #c4b5fd; }                      /* template tag, html tag */
.t-atr { color: var(--color-term-dim); }                      /* html attribute */
.t-com { color: var(--color-term-faint); font-style: italic; }  /* comment */

/* EQL inside a Lua string: the samples' centrepiece. Nests inside .t-str. */
.e-k { color: #fcd34d; }                        /* select / where / insert — amber */
.e-c { color: #a7f3d0; }                        /* .column reference — mint */
.e-p { color: #f9a8d4; }                        /* $form.title, $auth.id — pink */

/* terminal */
.c-pro { color: #808080; }                      /* $ prompt */
.c-cmd { color: var(--color-term-fg); }                      /* typed command */
.c-ok  { color: #4ade80; }                      /* ✓ */
.c-add { color: #4ade80; }                      /* + */
.c-chg { color: #fcd34d; }                      /* ~ */
.c-err { color: #f87171; }                      /* ✗ / error */
.c-dim { color: var(--color-term-dim); }                      /* plain output */
.c-url { color: #93c5fd; }                      /* links in output */

/* ---------------------------------------------------------------- below-the-fold helpers */

.rule {
  height: 1px;
  background: var(--color-border);
  border: 0;
}

/* Bordered feature grid: cells share hairlines, no card shadows. */
.grid-cells {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-border);
  gap: 1px;
}

.grid-cells > * {
  background: var(--color-surface);
  padding: 24px;
}

@media (min-width: 640px) {
  .grid-cells.cols-2,
  .grid-cells.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .grid-cells.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cell-hover {
  transition: background-color 0.15s ease;
}

.cell-hover:hover {
  background: var(--color-subtle);
}

/* Ladder rows */
.ladder {
  border-top: 1px solid var(--color-border);
}

.ladder-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px 40px;
  padding: 32px 0;
  border-bottom: 1px solid var(--color-border);
}

@media (min-width: 860px) {
  .ladder-row {
    grid-template-columns: 5fr 7fr;
    align-items: start;
    padding: 40px 0;
  }
}

.ladder-n {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-faint);
}

/* SQL → EQL primer table */
.cmp {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13px;
}

.cmp th {
  text-align: left;
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-faint);
  padding: 0 0 10px;
  border-bottom: 1px solid var(--color-border);
}

.cmp td {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  line-height: 1.6;
}

.cmp tr:last-child td {
  border-bottom: 0;
}

.cmp .from {
  color: var(--color-faint);
  padding-right: 32px;
  width: 46%;
}

.cmp .to {
  color: var(--color-fg);
}

@media (max-width: 700px) {
  .cmp,
  .cmp tbody,
  .cmp tr,
  .cmp td {
    display: block;
    width: 100%;
  }

  .cmp thead {
    display: none;
  }

  .cmp tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .cmp td {
    border: 0;
    padding: 0;
  }

  .cmp .from {
    width: 100%;
    padding: 0 0 4px;
  }
}

.row-center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

/* Footer */
.powered {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--color-border-strong);
  text-underline-offset: 3px;
}

.powered:hover {
  color: var(--color-fg);
}

.foot-col h3 {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-fg);
}

.foot-col a {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  color: var(--color-muted);
  transition: color 0.15s ease;
}

.foot-col a:hover {
  color: var(--color-fg);
}

/* ---------------------------------------------------------------- home: ledger
 * Each row pairs what the designer typed with the screen it produced. Screens are scenes drawn
 * from the sample project at 720 x 540 and exported at 2x. */

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 56px;
  }
}

.hero-words h1 {
  margin: 24px 0 0;
  font-size: clamp(38px, 4vw, 50px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--color-fg);
  text-wrap: balance;
}

.hero-words .hero-sub {
  margin-top: 20px;
  font-size: 17px;
}

.starter {
  margin-top: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 32px -24px rgba(0, 0, 0, 0.2);
  text-align: left;
}

.starter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border-bottom: 1px solid var(--color-border);
}

.starter-text {
  padding: 14px 16px 16px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-fg);
}

.starter-foot {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-muted);
}

.starter-foot a {
  white-space: nowrap;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  gap: 6px;
}

.scene {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: #eceef1;
}

.scene img {
  width: 100%;
}

.hero-scene figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--color-faint);
}

.band {
  padding: 88px 0;
}

@media (min-width: 768px) {
  .band {
    padding: 128px 0;
  }
}

.band-subtle {
  background: var(--color-subtle);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.band-end {
  padding-bottom: 160px;
}

.ledger {
  display: grid;
  gap: 80px;
  margin-top: 56px;
}

@media (min-width: 768px) {
  .ledger {
    gap: 112px;
    margin-top: 72px;
  }
}

.entry {
  display: grid;
  gap: 28px;
}

@media (min-width: 1024px) {
  .entry {
    grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
    gap: 64px;
    align-items: center;
  }
}

.said-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-faint);
}

.said {
  margin-top: 12px;
  font-size: clamp(21px, 2.3vw, 26px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--color-fg);
  text-wrap: pretty;
}

.said-sm {
  font-size: 19px;
}

.said-plain {
  font-weight: 600;
}

.got {
  margin-top: 16px;
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-muted);
}

/* "Yours": computer, server, members, drawn as one scene with a caption under each. */
.journey {
  margin: 56px 0 0;
}

.journey picture,
.journey img {
  display: block;
  width: 100%;
}

.journey-steps {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}

@media (min-width: 768px) {
  .journey-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
}

.journey-steps p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-muted);
}

.journey-none {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  max-width: 76ch;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-muted);
}

/* Problem and plan, right after the hero. */
.problem {
  display: grid;
  gap: 48px;
}

@media (min-width: 1024px) {
  .problem {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 72px;
    align-items: center;
  }
}

.plan li {
  display: flex;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
}

.plan li:last-child {
  border-bottom: 1px solid var(--color-border);
}

.plan-n {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--color-fg);
  color: var(--color-surface);
  font-size: 14px;
  font-weight: 600;
}

.plan .h3 {
  font-size: 18px;
}

.plan p {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-muted);
}

@media (min-width: 768px) {
  .plan-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .plan-row li,
  .plan-row li:last-child {
    border-bottom: 0;
  }
}

.plan-row {
  text-align: left;
}

.starter-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-top: 16px;
  font-size: 14px;
}

/* Deploy: four short facts beside the deploy prompt. */
.limits {
  margin-top: 24px;
  border-top: 1px solid var(--color-border);
}

.limits li {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-muted);
}

.limits li b {
  font-weight: 500;
  color: var(--color-fg);
}

@media (max-width: 640px) {
  .limits li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Each row's sentence, set as a prompt you type. */
.prompt-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 32px -24px rgba(0, 0, 0, 0.2);
}

.prompt-box > svg {
  flex: none;
  margin-top: 7px;
  color: var(--color-faint);
}

.prompt-box .said {
  margin-top: 0;
}

/* The admin's question sits in the admin's own Ask box: rounder, with its send button. */
.prompt-ask {
  border-radius: 16px;
  padding-right: 56px;
  position: relative;
}

.prompt-ask::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--color-fg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 12.5v-9M4 7.5l4-4 4 4' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

}
