/* ReqForge website.
   Dark by default, because the app is; light theme follows the OS unless the
   toggle in the header says otherwise. The accent is the app's own blue, used
   sparingly: on the one button that matters, the small mono labels, and the
   marks in lists. Everything else is type, space and hairlines. */

:root {
  --accent: #4aa8e8;
  --accent-ink: #06121c;
  --green: #4ec9b0;
  --orange: #d9906f;
  --red: #f48771;

  --bg: #0a0c10;
  --bg-2: #10141a;
  --bg-3: #171c24;
  --border: #1f262f;
  --hair: #182028;
  --text: #e7ecf2;
  --text-dim: #8d99a8;
  --grid: rgb(231 236 242 / 5%);
  --shadow: 0 40px 80px -24px rgb(0 0 0 / 70%), 0 0 0 1px rgb(255 255 255 / 6%);
  --shadow-soft: 0 24px 48px -20px rgb(0 0 0 / 55%);
  --glow: rgb(74 168 232 / 22%);

  /* Three faces from Google Fonts, each with a system fallback for the
     moment before it arrives: Instrument Sans for text, Bricolage Grotesque
     for the headlines and the wordmark, JetBrains Mono for labels and code. */
  --font: "Instrument Sans", "SF Pro Text", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, system-ui, sans-serif;
  --display: "Bricolage Grotesque", var(--font);
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --page: 1120px;
  --radius: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root[data-theme="light"] {
  --accent: #0e639c;
  --accent-ink: #ffffff;
  --green: #1f9c7a;
  --orange: #b8622f;
  --bg: #f7f8fa;
  --bg-2: #ffffff;
  --bg-3: #eef1f5;
  --border: #dfe4ea;
  --hair: #e7ebf0;
  --text: #0f1720;
  --text-dim: #5b6878;
  --grid: rgb(15 23 32 / 6%);
  --shadow: 0 32px 64px -24px rgb(15 30 50 / 28%), 0 0 0 1px rgb(15 30 50 / 8%);
  --shadow-soft: 0 20px 40px -20px rgb(15 30 50 / 22%);
  --glow: rgb(14 99 156 / 14%);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --accent: #0e639c;
    --accent-ink: #ffffff;
    --green: #1f9c7a;
    --orange: #b8622f;
    --bg: #f7f8fa;
    --bg-2: #ffffff;
    --bg-3: #eef1f5;
    --border: #dfe4ea;
    --hair: #e7ebf0;
    --text: #0f1720;
    --text-dim: #5b6878;
    --grid: rgb(15 23 32 / 6%);
    --shadow: 0 32px 64px -24px rgb(15 30 50 / 28%), 0 0 0 1px rgb(15 30 50 / 8%);
    --shadow-soft: 0 20px 40px -20px rgb(15 30 50 / 22%);
    --glow: rgb(14 99 156 / 14%);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--display);
  font-optical-sizing: auto;
}

h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.028em;
}
h3 {
  font-size: 1.28rem;
  letter-spacing: -0.018em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--text) 30%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.15s var(--ease), color 0.15s var(--ease);
}

a:hover {
  text-decoration-color: var(--accent);
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border-radius: 5px;
  padding: 0.12em 0.4em;
}

kbd {
  font-family: var(--mono);
  font-size: 0.78em;
  background: var(--bg-3);
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--text) 12%, transparent);
  border-radius: 5px;
  padding: 0.12em 0.45em;
  white-space: nowrap;
}

hr {
  border: 0;
  border-top: 1px solid var(--hair);
  margin: 3rem 0;
}

/* `height: auto` is load-bearing: the screenshots carry width/height
   attributes so the page does not jump while they load, and without this the
   browser honours that height literally and stretches them. */
img {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: min(100% - 2.5rem, var(--page));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--bg-2);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
}

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

/* A small monospace label over a heading: "for teams", "01 — features".
   The line in front of it does what a pill badge used to, without the pill. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 1.4rem;
  height: 1px;
  background: var(--accent);
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
}

/* The rule under the header fades out at both ends rather than running edge
   to edge, so it reads as part of the page and not a frame around it. */
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 18%, var(--border) 82%, transparent);
  pointer-events: none;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.025em;
}

.brand img,
.brand svg {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-left: auto;
  font-size: 0.93rem;
  font-weight: 500;
}

/* The current page is the link in full colour and the rest are dimmed.
   Nothing is boxed, underlined or given a background. */
.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav .nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease);
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta[aria-current="page"] {
  color: var(--bg);
  background: color-mix(in srgb, var(--text) 86%, var(--accent));
  transform: translateY(-1px);
}

.theme-toggle {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--text-dim);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.theme-toggle:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

/* On a narrow screen the header is two rows: the brand and the theme button
   on the first, the links on a row of their own underneath. Five links do not
   fit beside the brand on a 360px screen, and letting them wrap there put
   "Sign in" on a line by itself under a right-aligned ragged edge. The
   in-page jump links are dropped, since they are a scroll away anyway. */
@media (max-width: 700px) {
  html {
    scroll-padding-top: 108px;
  }
  .site-header .wrap {
    flex-wrap: wrap;
    gap: 0.3rem 0.75rem;
    min-height: 0;
    padding-block: 0.7rem;
  }
  .brand {
    margin-right: auto;
  }
  .site-nav {
    order: 3;
    flex-basis: 100%;
    flex-wrap: wrap;
    align-items: center;
    margin-left: 0;
    gap: 0.35rem 1.1rem;
    font-size: 0.9rem;
  }
  .site-nav .nav-cta {
    margin-left: auto;
    padding: 0.3rem 0.75rem;
  }
  .nav-optional {
    display: none;
  }
}

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

.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(3.5rem, 9vw, 7rem) 0 2rem;
  overflow: clip;
}

/* A faint engineering grid behind the headline, fading out before the
   screenshot, with one soft pool of the accent off to the left. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  mask-image: radial-gradient(90% 70% at 50% 0%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(90% 70% at 50% 0%, #000 10%, transparent 70%);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -240px;
  left: -160px;
  width: 760px;
  height: 640px;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}

.hero h1 {
  max-width: 15ch;
  margin-bottom: 1.4rem;
}

.hero .lede {
  max-width: 58ch;
  margin: 0 0 2.2rem;
  font-size: clamp(1.08rem, 1.9vw, 1.28rem);
  line-height: 1.55;
  color: var(--text-dim);
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* On a phone the buttons fill their rows rather than huddling at the left
   at three different widths: the first on a line of its own, the two after
   it sharing the next. */
@media (max-width: 700px) {
  .cta-row .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 10px;
  border: 0;
  padding: 0.74rem 1.3rem;
  font-weight: 600;
  font-size: 0.97rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  color: var(--text);
  background: color-mix(in srgb, var(--text) 8%, transparent);
  transition: background 0.15s var(--ease), transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 13%, transparent);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 28px -12px color-mix(in srgb, var(--accent) 80%, transparent);
}

.btn-primary:hover {
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 88%, #ffffff);
  box-shadow: 0 14px 32px -12px color-mix(in srgb, var(--accent) 90%, transparent);
}

/* An arrow that nudges to the right when the button is hovered. */
.btn-primary::after {
  content: "→";
  font-weight: 500;
  transition: transform 0.2s var(--ease);
}

.btn-primary:hover::after {
  transform: translateX(3px);
}

.hero-note {
  margin-top: 1.2rem;
  font-size: 0.92rem;
  color: var(--text-dim);
  max-width: 58ch;
}

/* The screenshot leans back very slightly and stands up on hover, with a
   pool of the accent behind it to lift it off the page. */
.hero-shot {
  position: relative;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  perspective: 1800px;
}

.hero-shot::before {
  content: "";
  position: absolute;
  inset: 10% -6% -8%;
  z-index: -1;
  background: radial-gradient(60% 60% at 50% 40%, var(--glow), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.hero-shot img {
  transform: rotateX(3deg);
  transform-origin: 50% 100%;
  transition: transform 0.8s var(--ease), box-shadow 0.8s var(--ease);
}

.hero-shot:hover img {
  transform: rotateX(0deg);
}

/* The hero settles in rather than appearing: the label, the headline, the
   paragraph and the buttons each a beat after the last. */
.hero .wrap > * {
  animation: rise 0.7s var(--ease) both;
}

.hero .wrap > :nth-child(2) {
  animation-delay: 0.06s;
}
.hero .wrap > :nth-child(3) {
  animation-delay: 0.12s;
}
.hero .wrap > :nth-child(4) {
  animation-delay: 0.18s;
}
.hero .wrap > :nth-child(5) {
  animation-delay: 0.24s;
}
.hero .wrap > :nth-child(6) {
  animation-delay: 0.34s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------ screenshots */

figure.shot {
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--bg-2);
  cursor: zoom-in;
}

.shot figcaption {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.25rem 1.75rem;
}

/* Full-size view of a screenshot. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 2rem;
  background: rgb(3 6 10 / 90%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox[open] {
  display: grid;
}

.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 10%), 0 40px 100px rgb(0 0 0 / 60%);
}

.lightbox button {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  background: rgb(255 255 255 / 10%);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.4rem 0.9rem;
}

.lightbox button:hover {
  background: rgb(255 255 255 / 18%);
}

/* --------------------------------------------------------------- sections */

section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section-head {
  max-width: 64ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head .eyebrow {
  margin-bottom: 1rem;
}

.section-head p {
  color: var(--text-dim);
  font-size: 1.08rem;
  margin: 0;
  text-wrap: pretty;
}

/* The line of facts under the hero: small mono labels, each with a mark. */
.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 2.2rem;
  margin: 0;
  border-block: 1px solid var(--hair);
  padding: 1.1rem 0;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.strip span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.strip span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--accent);
  transform: rotate(45deg);
  flex: none;
}

/* Features are cells in one hairline grid, not a dozen boxes, and each is
   numbered in monospace where an icon would otherwise go. */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border);
  counter-reset: feature;
}

.cards-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  position: relative;
  background: var(--bg);
  padding: 1.7rem 1.6rem 1.8rem;
  transition: background 0.2s var(--ease);
}

.card:hover {
  background: var(--bg-2);
}

.card::before {
  counter-increment: feature;
  content: counter(feature, decimal-leading-zero);
  display: block;
  margin-bottom: 1.4rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.card h3 {
  margin-bottom: 0.45rem;
  font-size: 1.08rem;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.55;
}

@media (max-width: 960px) {
  .cards,
  .cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .cards,
  .cards-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A feature explained beside the screenshot that shows it. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.split + .split {
  border-top: 1px solid var(--hair);
}

.split.reverse > :first-child {
  order: 2;
}

.split h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.7rem);
  margin-bottom: 0.8rem;
}

.split p {
  color: var(--text-dim);
}

.split ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-dim);
  font-size: 0.97rem;
}

.split li {
  position: relative;
  padding-left: 1.4rem;
}

.split li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 0.7rem;
  height: 1px;
  background: var(--accent);
}

.split li + li {
  margin-top: 0.5rem;
}

@media (max-width: 860px) {
  .split,
  .split.reverse {
    grid-template-columns: 1fr;
  }
  .split.reverse > :first-child {
    order: 0;
  }
}

/* Sections and cards fade up as they scroll into view. `js` is on the root
   only once site.js is running, so with scripts off nothing is hidden. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------------ code */

pre {
  margin: 0 0 1.2rem;
  padding: 1rem 1.15rem;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--hair);
  border-radius: 10px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.65;
  tab-size: 2;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

.code-block {
  position: relative;
}

.code-block .copy {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  opacity: 0;
  background: var(--bg-3);
  border: 0;
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  font: inherit;
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.25rem 0.55rem;
  transition: opacity 0.15s var(--ease), color 0.15s var(--ease);
}

.code-block:hover .copy,
.code-block .copy:focus-visible {
  opacity: 1;
}

.code-block .copy:hover {
  color: var(--text);
}

/* The terminal is dark in both themes: it is a terminal. */
.terminal {
  background: #090c11;
  border-radius: var(--radius);
  overflow: hidden;
  color: #d9e3ee;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 7%), var(--shadow-soft);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgb(255 255 255 / 7%);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7f8ea0;
  font-family: var(--mono);
}

.terminal-bar::before {
  content: ">_";
  color: #4aa8e8;
  letter-spacing: 0;
}

/* The paragraph that explains the run above it. */
.terminal + p {
  margin-top: 1.5rem;
}

.terminal pre {
  margin: 0;
  padding: 1.1rem 1.25rem 1.25rem;
  background: none;
  box-shadow: none;
  border-radius: 0;
  color: inherit;
}

.terminal .ok {
  color: #5fd9bd;
}
.terminal .dim {
  color: #7f8ea0;
}
.terminal .cmd {
  color: #8ccdf8;
}

/* ----------------------------------------------------------------- table */

.table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--border);
  margin-bottom: 1.5rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
}

thead th {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  border-bottom-color: var(--border);
}

tbody th {
  font-weight: 600;
  white-space: nowrap;
}

tbody tr:last-child td,
tbody tr:last-child th {
  border-bottom: 0;
}

td code {
  white-space: nowrap;
}

/* On a phone a table of three columns is a table of one visible column and a
   sideways scroll nobody notices, so each row becomes a block of its own with
   the column heading over every cell — site.js copies the headings onto the
   cells as `data-label`. The heading row is hidden from sight, not from a
   screen reader. A table with row headings and no heading row (the facts
   about the app) needs no labels: the heading is the first line of the block. */
@media (max-width: 700px) {
  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td {
    display: block;
  }
  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .table-wrap tr {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--hair);
  }
  .table-wrap tbody tr:last-child {
    border-bottom: 0;
  }
  .table-wrap th,
  .table-wrap td {
    padding: 0;
    border: 0;
    background: none;
    white-space: normal;
  }
  .table-wrap th + td,
  .table-wrap td + td {
    margin-top: 0.5rem;
  }
  .table-wrap td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.15rem;
  }
}

/* ------------------------------------------------------------------ note */

.note {
  position: relative;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-radius: 10px;
  padding: 1rem 1.2rem 1rem 1.4rem;
  margin: 0 0 1.5rem;
  color: var(--text-dim);
  font-size: 0.96rem;
}

.note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9rem;
  bottom: 0.9rem;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}

.note strong {
  color: var(--text);
}

.note.warn {
  background: color-mix(in srgb, var(--orange) 9%, transparent);
}

.note.warn::before {
  background: var(--orange);
}

/* --------------------------------------------------------------- callout */

/* The closing panel is the page turned inside out: light on the dark theme,
   dark on the light one, with the accent pooling in one corner. */
.callout {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(70% 90% at 100% 0%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 60%),
    var(--text);
  color: var(--bg);
  padding: clamp(2.25rem, 5vw, 3.5rem);
}

.callout h2 {
  margin-bottom: 0.6rem;
  max-width: 20ch;
}

.callout p {
  color: color-mix(in srgb, var(--bg) 72%, var(--text));
  max-width: 60ch;
  font-size: 1.02rem;
}

/* The panel is the page inverted, so a link in the page's text colour would
   be ink on ink. Links take the panel's own colour instead. */
.callout a:not(.btn) {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--bg) 45%, transparent);
}

.callout a:not(.btn):hover {
  text-decoration-color: var(--bg);
}

.callout .cta-row {
  margin-top: 1.6rem;
}

.callout .btn {
  background: color-mix(in srgb, var(--bg) 12%, transparent);
  color: var(--bg);
}

.callout .btn:hover {
  background: color-mix(in srgb, var(--bg) 20%, transparent);
  color: var(--bg);
}

.callout .btn-primary,
.callout .btn-primary:hover {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 16px 40px -16px rgb(0 0 0 / 50%);
}

/* ------------------------------------------------------------------ docs */

.docs-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 3.5rem;
  align-items: start;
  padding-top: 2.5rem;
}

.docs-nav {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  font-size: 0.9rem;
  padding-bottom: 2rem;
}

.docs-nav strong {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 1.6rem 0 0.6rem;
}

.docs-nav strong:first-child {
  margin-top: 0;
}

/* The section being read is the one link in full colour. No highlight bar,
   no background, no border. */
.docs-nav a {
  display: block;
  padding: 0.2rem 0;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

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

.docs-nav a.active {
  color: var(--text);
  font-weight: 600;
}

/* The sidebar is a list, and its summary only exists for the phone. */
.docs-contents summary {
  display: none;
}

.docs-body {
  max-width: 76ch;
  padding-bottom: 4rem;
  font-size: 16px;
}

.docs-body h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
}

.docs-body .lede {
  color: var(--text-dim);
  font-size: 1.15rem;
  line-height: 1.55;
}

.docs-body h2 {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hair);
  font-size: clamp(1.6rem, 2.8vw, 2rem);
}

.docs-body h2:first-of-type {
  margin-top: 1.5rem;
  padding-top: 0;
  border-top: 0;
}

.docs-body h3 {
  margin-top: 2.2rem;
  font-size: 1.15rem;
}

.docs-body ol,
.docs-body ul {
  padding-left: 1.3rem;
  margin: 0 0 1.2rem;
}

.docs-body li + li {
  margin-top: 0.4rem;
}

.docs-body li::marker {
  color: var(--text-dim);
}

.docs-body figure.shot {
  margin: 1.8rem 0 2.2rem;
}

@media (max-width: 900px) {
  /* minmax(0, …) rather than 1fr: a grid track sizes to its content by
     default, so one wide table would push the whole page sideways instead of
     scrolling inside its own wrapper. */
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .docs-nav {
    position: static;
    max-height: none;
    border-radius: var(--radius);
    padding: 0.9rem 1.2rem;
    background: var(--bg-2);
    box-shadow: 0 0 0 1px var(--hair);
  }
  /* Closed, the contents are one line; open, the same list as the sidebar,
     under a summary that reads as the button it is. */
  .docs-contents summary {
    display: list-item;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    padding: 0.2rem 0;
  }
  .docs-contents[open] summary {
    margin-bottom: 0.4rem;
  }
  .docs-contents strong:first-of-type {
    margin-top: 0.6rem;
  }
}

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

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--hair);
  padding: 3rem 0 3.5rem;
  color: var(--text-dim);
  font-size: 0.86rem;
}

.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* The first row is the wordmark on the left and the links on the right; the
   legal lines sit under it, small and unhurried. */
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.footer-top .brand {
  font-size: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

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

.footer-line {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

.site-footer a {
  color: var(--text-dim);
}

.site-footer a:hover {
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
  .hero-shot img {
    transform: none;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- commercial pages ---------- */

/* Legal prose: narrower than the marketing grid, because a paragraph of terms
   read across a 1100px line is a paragraph nobody reads. */
.legal {
  max-width: 46rem;
  padding-top: 3.5rem;
  padding-bottom: 4rem;
  font-size: 16px;
}

.legal h1 {
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  margin-bottom: 0.5rem;
}

.legal h2 {
  margin-top: 2.8rem;
  font-size: 1.4rem;
}

.legal h3 {
  margin-top: 1.9rem;
  font-size: 1.08rem;
}

.legal p,
.legal li {
  line-height: 1.65;
}

.legal ul,
.legal ol {
  padding-left: 1.2rem;
}

.legal li + li {
  margin-top: 0.5rem;
}

.legal-meta {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-top: 0;
}

.legal .note {
  margin: 1.8rem 0 2.2rem;
}

/* One plan, one card. A pricing table with a single column would be a table
   pretending to offer a choice. */
.plan-card {
  max-width: 38rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: 20px;
  background: var(--bg-2);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-soft);
}

.plan-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 1.4rem;
}

.plan-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-dim);
}

.plan-price {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.plan-price strong {
  display: inline-block;
  margin-right: 0.25rem;
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.plan-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.plan-list li {
  position: relative;
  padding-left: 1.7rem;
  line-height: 1.5;
}

.plan-list li + li {
  margin-top: 0.75rem;
}

.plan-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.55em;
  width: 0.55rem;
  height: 0.3rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.plan-note {
  margin: 1.4rem 0 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* Questions read as a list of hairline-separated entries, not floating
   headings. */
.faq {
  max-width: 46rem;
}

.faq h3 {
  margin-top: 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--hair);
  font-size: 1.1rem;
}

.faq h3:first-child {
  padding-top: 0;
  border-top: 0;
}

.faq p {
  line-height: 1.65;
  color: var(--text-dim);
  margin-bottom: 1.6rem;
}

/* The second way to pay, under the first on the plan card. */
.plan-price-alt {
  margin-top: -0.4rem;
  opacity: 0.8;
}
.plan-price-alt strong { font-size: 1.15em; }

/* --------------------------------------------------------- contact form */

/* The way in, on the contact page. It ships hidden and is shown by
   assets/contact.js once the licence service says the challenge is switched
   on: a form that cannot be sent is worse than the address it replaced. */
.contact-form {
  max-width: 40rem;
  margin: 0 0 2.5rem;
  padding: 1.6rem 1.6rem 1.4rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-form h2 {
  margin-top: 0;
}

.contact-lead {
  color: var(--text-dim);
  margin-top: -0.4rem;
}

/* Label, control, and the small print under it, in one stack. */
.field {
  display: block;
  margin-bottom: 1.1rem;
}

.field > span {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.field > span em {
  font-style: normal;
  font-weight: 400;
  color: var(--text-dim);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.55;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.field small {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-dim);
}

/* Cloudflare draws its own widget in here, at its own size. */
.contact-challenge {
  margin: 0 0 1.1rem;
  min-height: 65px;
}

/* Empty until something has happened, so it takes no room until it does. */
.form-status:empty {
  display: none;
  margin: 0;
}

.form-status {
  margin: 0.8rem 0 0;
  color: var(--text-dim);
}

.form-status[data-kind="bad"] {
  color: var(--red);
}

/* An address written out rather than linked: a person reads it, and the
   machines that copy this page for `mailto:` links do not collect it. */
.address {
  font-family: var(--mono);
  font-size: 0.94em;
  color: var(--text);
  white-space: nowrap;
}

/* What stands where the form does until the challenge is switched on, and
   with scripts off. It says how to reach us in words a person reads and a
   scraper does not collect. */
.contact-fallback {
  max-width: 40rem;
  margin: 0 0 2.5rem;
  padding: 1.4rem 1.6rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-fallback h2 {
  margin-top: 0;
}
