/*
 * ingres.si: one stylesheet, no build step.
 *
 * Tokens follow the product (app/globals.css): dark is the default, light the
 * alternative; IBM Plex Sans and Mono; violet (`--brand`) only for actions,
 * links and focus; the traffic colours keep their product meaning (blue
 * served, the orange family stopped by Ingressi, red upstream errors).
 * Every text token meets 4.5:1 on --ground, --panel and --panel2.
 *
 * Theme: the system preference, unless the visitor picked one with the theme
 * button (assets/js/theme.js sets data-theme on <html>).
 */

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

/* ── Tokens ─────────────────────────────────────────────────────────────── */

:root {
  --ground: #0e1014;
  --panel: #15181e;
  --panel2: #1b1f27;
  --raise: #262b35;
  --line: #252a33;
  --line2: #343b48;
  --text: #e8eaef;
  --text-muted: #a3aab8;
  --soft: #878f9f;
  --brand: #a194ff;
  --brand-fill: #5b49dc;
  --brand-fill-hover: #6a59e6;
  --on-brand-fill: #ffffff;
  --brand-tint: rgba(150, 135, 255, 0.14);
  --served: #4d8eff;
  --served2: #a5c4ff;
  --waf: #ff7a2e;
  --access: #ffb070;
  --rl: #ffddb0;
  --err5: #f2555b;
  --ok: #3dd68c;
  --warn: #f5b83d;
  --warn-tint: rgba(245, 184, 61, 0.14);
  --bad: #ff6b70;
  --header-bg: rgba(14, 16, 20, 0.92);
  --grid-line: rgba(255, 255, 255, 0.035);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --wireframe: url("../img/wireframe-dark.svg");

  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 10px;
  --header-h: 4rem;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground: #f4f5f7;
    --panel: #ffffff;
    --panel2: #f4f5f8;
    --raise: #e8ebf0;
    --line: #e3e6eb;
    --line2: #cdd3dc;
    --text: #13161b;
    --text-muted: #4d5564;
    --soft: #5d6575;
    --brand: #5240d6;
    --brand-fill: #5240d6;
    --brand-fill-hover: #4433c4;
    --brand-tint: rgba(82, 64, 214, 0.09);
    --served: #2f6fe4;
    --served2: #93b6f4;
    --waf: #e2570b;
    --access: #f2994a;
    --rl: #f5c98c;
    --err5: #d42f3b;
    --ok: #0e7c4d;
    --warn: #9a630b;
    --warn-tint: rgba(230, 160, 40, 0.16);
    --bad: #c42834;
    --header-bg: rgba(244, 245, 247, 0.94);
    --grid-line: rgba(19, 22, 27, 0.045);
    --shadow: 0 16px 40px rgba(20, 24, 32, 0.12);
    --wireframe: url("../img/wireframe-light.svg");
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --ground: #f4f5f7;
  --panel: #ffffff;
  --panel2: #f4f5f8;
  --raise: #e8ebf0;
  --line: #e3e6eb;
  --line2: #cdd3dc;
  --text: #13161b;
  --text-muted: #4d5564;
  --soft: #5d6575;
  --brand: #5240d6;
  --brand-fill: #5240d6;
  --brand-fill-hover: #4433c4;
  --brand-tint: rgba(82, 64, 214, 0.09);
  --served: #2f6fe4;
  --served2: #93b6f4;
  --waf: #e2570b;
  --access: #f2994a;
  --rl: #f5c98c;
  --err5: #d42f3b;
  --ok: #0e7c4d;
  --warn: #9a630b;
  --warn-tint: rgba(230, 160, 40, 0.16);
  --bad: #c42834;
  --header-bg: rgba(244, 245, 247, 0.94);
  --grid-line: rgba(19, 22, 27, 0.045);
  --shadow: 0 16px 40px rgba(20, 24, 32, 0.12);
  --wireframe: url("../img/wireframe-light.svg");
  color-scheme: light;
}

/* ── Base ───────────────────────────────────────────────────────────────── */

/* Elements the scripts reveal stay hidden whatever their display style. */
[hidden] {
  display: none !important;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.35rem + 2.8vw, 3.25rem);
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.125rem);
}

h3 {
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

h4 {
  font-size: 1rem;
}

/* A heading that is a section in the outline but looks like a card title. */
.h3 {
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

strong {
  font-weight: 600;
}

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

:not(pre) > code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel2);
  overflow-wrap: anywhere;
}

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

img {
  height: auto;
}

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

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

::selection {
  background: var(--brand-tint);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--brand-fill);
  color: var(--on-brand-fill);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.wrap {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.wrap-narrow {
  width: min(100% - 2rem, 46rem);
  margin-inline: auto;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
}

@supports (backdrop-filter: blur(8px)) {
  .site-header {
    backdrop-filter: blur(8px);
  }
}

.header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-right: auto;
}

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

.brand-mark .mark-bg {
  fill: var(--brand-fill);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.65rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

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

.nav-links a[aria-current="page"] {
  color: var(--text);
  background: var(--panel2);
  box-shadow: inset 0 -2px 0 var(--brand);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text-muted);
  cursor: pointer;
}

.icon-button:hover {
  color: var(--text);
  background: var(--panel2);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme-current="light"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme-current="light"] .theme-toggle .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
}

@media (max-width: 60rem) {
  /* Not sticky on small screens: an open menu must never cover the focused element. */
  .site-header {
    position: relative;
  }

  .header-row {
    flex-wrap: wrap;
    padding-block: 0.5rem;
  }

  .js .nav-toggle {
    display: inline-grid;
  }

  .site-nav {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .js .site-nav:not(.is-open) {
    display: none;
  }

  .nav-links {
    flex-direction: column;
  }

  .nav-links a {
    width: 100%;
    min-height: 2.75rem;
  }

  .nav-links a[aria-current="page"] {
    box-shadow: inset 2px 0 0 var(--brand);
  }

  .nav-actions {
    flex-wrap: wrap;
  }
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-sm {
  min-height: 2.5rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--brand-fill);
  color: var(--on-brand-fill);
}

.btn-primary:hover {
  background: var(--brand-fill-hover);
}

.btn-secondary {
  border-color: var(--line2);
  background: var(--panel2);
  color: var(--text);
}

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

.btn-ghost {
  color: var(--brand);
}

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

/* A button-shaped label for an action that is not available yet. */
.btn-static,
.btn-static:hover {
  background: var(--panel2);
  cursor: default;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ── Sections ───────────────────────────────────────────────────────────── */

.section {
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-alt {
  background: var(--panel);
}

.section-head {
  max-width: 46rem;
  margin-bottom: 2.25rem;
}

.section-head p:last-child {
  margin-bottom: 0;
}

.section-head:last-child {
  margin-bottom: 0;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  color: var(--text-muted);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
}

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

.small {
  font-size: 0.875rem;
}

/* ── Page header (inner pages) ──────────────────────────────────────────── */

.page-head {
  padding-block: clamp(2.5rem, 1.75rem + 3vw, 4.25rem) clamp(2rem, 1.5rem + 2vw, 3rem);
  border-bottom: 1px solid var(--line);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
}

.page-head .lead {
  max-width: 46rem;
  margin-bottom: 0;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(2.5rem, 2rem + 3vw, 4rem);
  background-image:
    radial-gradient(60rem 26rem at 70% -10%, var(--brand-tint), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
}

.hero-copy {
  max-width: 50rem;
}

.hero .lead {
  max-width: 44rem;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.facts li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.hero-shot {
  margin-top: clamp(2.5rem, 2rem + 3vw, 4rem);
}

/* ── Cards and grids ────────────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.section-alt .card {
  background: var(--panel2);
}

.card > :last-child {
  margin-bottom: 0;
}

.card p {
  color: var(--text-muted);
}

.card h3 {
  margin-bottom: 0.4rem;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.875rem;
}

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

.link-list li {
  border-top: 1px solid var(--line);
}

.link-list li:first-child {
  border-top: 0;
}

.link-list a {
  display: flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.35rem 0;
}

.card-links a {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--line2);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.6;
  text-transform: uppercase;
}

.tag-paid {
  border-color: transparent;
  background: var(--brand-tint);
  color: var(--brand);
}

.tag-new {
  border-color: transparent;
  background: var(--warn-tint);
  color: var(--warn);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.swatch-served {
  background: var(--served);
}

.swatch-waf {
  background: var(--waf);
}

.swatch-access {
  background: var(--access);
}

.swatch-geo {
  background: var(--brand);
}

.swatch-auth {
  background: var(--served2);
}

.swatch-rl {
  background: var(--rl);
}

.swatch-err5 {
  background: var(--err5);
}

/* ── Screenshots ────────────────────────────────────────────────────────── */

/*
 * Each screenshot slot shows a neutral wireframe and its name until the real
 * PNG is dropped in: the placeholder files are fully transparent, so the
 * wireframe behind them shows through; a real screenshot covers it.
 */
.shot {
  margin: 0;
}

.shot-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  background: var(--panel) var(--wireframe) center / cover no-repeat;
  box-shadow: var(--shadow);
  aspect-ratio: 1440 / 900;
}

.shot-label {
  position: absolute;
  inset: auto 0.75rem 0.75rem auto;
  padding: 0.2rem 0.6rem;
  border: 1px dashed var(--line2);
  border-radius: 6px;
  background: var(--panel);
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.shot img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.shot figcaption {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.shots {
  display: grid;
  gap: 2rem 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr));
}

/* ── Split layouts ──────────────────────────────────────────────────────── */

.split {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
  }

  .split-wide-left {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  }
}

/* ── Lists ──────────────────────────────────────────────────────────────── */

.checks {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.45rem;
}

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

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose h2 {
  margin-top: 2.5rem;
}

.prose h3 {
  margin-top: 1.75rem;
}

.prose > :first-child {
  margin-top: 0;
}

.promises {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.promises li {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ok);
  border-radius: var(--radius);
  background: var(--panel);
}

.promises strong {
  display: block;
  margin-bottom: 0.25rem;
}

.promises span {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ── Code ───────────────────────────────────────────────────────────────── */

.code {
  position: relative;
  margin: 0 0 1.25rem;
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  background: var(--panel2);
}

.code pre {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.65;
  tab-size: 2;
}

.code .comment {
  color: var(--soft);
}

.copy-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  min-height: 2rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text-muted);
  font: 500 0.75rem var(--sans);
  cursor: pointer;
}

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

.code.has-copy pre {
  padding-right: 5rem;
}

/* ── Tables ─────────────────────────────────────────────────────────────── */

.table-wrap {
  /* Positioned, so the visually hidden labels in its cells scroll with the
     table instead of widening the page on small screens. */
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

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

caption {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  text-align: left;
}

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

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

thead th {
  background: var(--panel2);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody th {
  font-weight: 500;
}

.matrix td,
.matrix thead th:not(:first-child) {
  text-align: center;
  white-space: nowrap;
}

.matrix tbody th {
  min-width: 14rem;
}

.matrix .group th {
  background: var(--panel2);
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.yes,
.no {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  vertical-align: -0.2em;
}

.yes {
  color: var(--ok);
}

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

/* A paid feature that is not available yet. */
.soon {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* ── Features page ──────────────────────────────────────────────────────── */

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
}

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

.feature-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.feature-list > li {
  display: grid;
  gap: 0.25rem 1.5rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.feature-list > li:last-child {
  border-bottom: 0;
}

@media (min-width: 48rem) {
  .feature-list > li {
    grid-template-columns: minmax(0, 1fr) 13rem;
  }
}

.feature-list h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.feature-list p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.feature-list .tags {
  margin: 0;
  align-self: start;
}

@media (min-width: 48rem) {
  .feature-list .tags {
    justify-content: flex-end;
  }
}

.area {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.area + .area {
  margin-top: 3.5rem;
}

.area-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.area-head p {
  margin: 0;
  color: var(--text-muted);
}

/* ── Pricing ────────────────────────────────────────────────────────────── */

.plans {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

@media (min-width: 40rem) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 62rem) {
  .plans {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 76rem) {
  .plans {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.plan-featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand) inset;
}

.plan h2,
.plan h3 {
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
}

.plan-for {
  min-height: 3em;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.price {
  margin: 0.5rem 0 0.15rem;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.875rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.price .price-from {
  margin-right: 0.15rem;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0;
}

.price small {
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
}

.price-note {
  min-height: 2.6em;
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.plan .checks {
  flex: 1 0 auto;
  font-size: 0.875rem;
}

.plan-actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.plan-actions .btn {
  width: 100%;
}

/* ── Callouts and notes ─────────────────────────────────────────────────── */

.callout {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  background: var(--panel);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout-warn {
  border-left-color: var(--warn);
}

/* The pricing page's line while online checkout is not open yet. */
.checkout-note {
  margin: 0 0 1.5rem;
}

/* ── Steps ──────────────────────────────────────────────────────────────── */

.steps {
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps > li {
  position: relative;
  padding: 0 0 1.75rem 3rem;
  counter-increment: step;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line2);
  border-radius: 50%;
  background: var(--panel2);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.875rem;
}

.steps > li > h3,
.steps > li > .h3 {
  padding-top: 0.2rem;
}

.steps > li > :last-child {
  margin-bottom: 0;
}

.prose .steps {
  padding-left: 0;
}

/* ── Forms ──────────────────────────────────────────────────────────────── */

.form {
  display: grid;
  gap: 1.1rem;
  max-width: 34rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-weight: 500;
}

.field .hint {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: var(--ground);
  color: var(--text);
  font: inherit;
}

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

input:disabled,
select:disabled {
  opacity: 0.6;
}

.turnstile-slot {
  min-height: 65px;
}

.form-status {
  margin: 0;
  font-size: 0.9375rem;
}

.form-status:empty {
  display: none;
}

.form-status.is-error {
  color: var(--bad);
}

.form-status.is-ok {
  color: var(--ok);
}

/* ── CTA band ───────────────────────────────────────────────────────────── */

.cta-band {
  display: grid;
  /* minmax(0, …): the code block scrolls inside itself instead of widening the band. */
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem 3rem;
  align-items: center;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--line2);
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(40rem 14rem at 100% 0%, var(--brand-tint), transparent 70%),
    var(--panel);
}

@media (min-width: 56rem) {
  .cta-band {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
}

.cta-band .code {
  margin: 0;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  margin-top: auto;
  padding-block: 3rem 2rem;
  border-top: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
}

.footer-brand {
  grid-column: 1 / -1;
  max-width: 28rem;
}

@media (min-width: 56rem) {
  .footer-grid {
    grid-template-columns: 1.6fr repeat(3, 1fr);
  }

  .footer-brand {
    grid-column: auto;
  }
}

.footer-grid h2 {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-grid li a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-legal {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
}

.footer-legal p {
  margin-bottom: 0.4rem;
}

/* ── Utilities ──────────────────────────────────────────────────────────── */

.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: 1rem;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-0 {
  margin-bottom: 0;
}

.center {
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .copy-button,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
