/*
 * Velsigil website - the only stylesheet.
 *
 * Same identity as the panel (web/src/index.css): near-black surfaces, hard edges (0-4 px radius), 1 px
 * borders, one violet and one magenta from the logo, used sparingly. 45-degree corner cuts ("blade cuts",
 * like the panel's sidebar plate) are the signature motif; they are drawn by pseudo-elements BEHIND the
 * content, so no clip-path ever cuts a focus outline. The violet -> magenta gradient appears only in the
 * logo, in 1 px rules and on the edge of a few highlighted plates.
 *
 * Dark is the default; prefers-color-scheme: light switches the tokens. No JavaScript, no inline styles
 * (the Content-Security-Policy is style-src 'self').
 */

/* ------------------------------------------------------------------------------------------ font */
/* Inter (variable, Latin subset), SIL Open Font License 1.1: ../fonts/OFL.txt */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-latin-wght-normal.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;
}

/* ------------------------------------------------------------------------------------------ tokens: dark (default) */
:root {
  color-scheme: dark;

  --background: #060507;
  --foreground: #eceaf0;
  --card: #0d0b10;
  --plate: #0f0b14;
  --muted: #15131a;
  --muted-foreground: #9a95a4;
  --subtle: #1c1922;
  --border: #25222d;
  --border-strong: #332f3d;
  /* Outline of secondary buttons: at least 3:1 against --background and --card (WCAG 1.4.11). */
  --control-border: #666170;
  --ring: #a24bff;

  --primary: #9333f5;
  --primary-hover: #7f22e0;
  --primary-foreground: #ffffff;
  --link: #bb85ff;
  --accent: #ff2fa8;
  --success: #3fcf8e;

  --grid-line: rgb(255 255 255 / 0.035);
  --glow: rgb(147 51 245 / 0.14);

  /* The code plate stays dark in both themes. */
  --code-bg: #0d0b10;
  --code-border: #2b2733;
  --code-fg: #e4e1ea;
  --code-muted: #8f8a99;
  --code-key: #c79bff;
  --code-str: #ff7cc6;

  --edge: linear-gradient(135deg, var(--primary), var(--accent));
  --rule: linear-gradient(90deg, var(--primary), var(--accent));

  --font-sans: 'Inter Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  /* Display face, as in the panel: Bahnschrift ships with Windows 10+, DIN Alternate with macOS. */
  --font-display: Bahnschrift, 'DIN Alternate', 'DIN Next', 'Inter Variable', ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas,
    'Liberation Mono', monospace;

  --radius: 2px;
  --cut: 14px;
  --gutter: 16px;
  --container: 1200px;
  --header-h: 64px;
}

/* ------------------------------------------------------------------------------------------ tokens: light */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --background: #f7f6f9;
    --foreground: #110f15;
    --card: #ffffff;
    --plate: #efedf2;
    --muted: #efedf2;
    --muted-foreground: #625d6c;
    --subtle: #e6e3eb;
    --border: #dcd8e3;
    --border-strong: #c6c0d0;
    --control-border: #8a8494;
    --ring: #8a2be6;

    --primary: #8325e8;
    --primary-hover: #6f17cf;
    --link: #7419d6;
    --accent: #c00c7b;
    --success: #087a4c;

    --grid-line: rgb(17 15 21 / 0.05);
    --glow: rgb(131 37 232 / 0.1);
  }
}

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

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

/* Column layout keeps the footer at the bottom of short pages (404). */
body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
  text-wrap: balance;
}

p,
ul,
ol,
dl,
pre,
figure {
  margin: 0;
}

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

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--foreground);
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

::selection {
  background-color: rgb(147 51 245 / 0.32);
}

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

strong {
  font-weight: 600;
  color: var(--foreground);
}

/* ------------------------------------------------------------------------------------------ utilities */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  color: var(--primary-foreground);
}

/* Small uppercase label with wide tracking, led by a 1 px gradient rule (the "LICENSE DISTRIBUTION" line). */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--muted-foreground);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  flex: none;
  width: 32px;
  height: 1px;
  background: var(--rule);
}

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

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

.nowrap {
  white-space: nowrap;
}

.break {
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.btn svg {
  flex: none;
  width: 16px;
  height: 16px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: var(--primary-foreground);
}

.btn-secondary {
  border-color: var(--control-border);
  background-color: transparent;
  color: var(--foreground);
}

.btn-secondary:hover {
  border-color: var(--muted-foreground);
  background-color: var(--muted);
  color: var(--foreground);
}

.btn-sm {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 0.875rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ------------------------------------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--plate);
}

/* The plate's 1 px gradient edge. */
.site-header::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--rule);
  opacity: 0.85;
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'brand nav cta';
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  color: var(--foreground);
  text-decoration: none;
}

.brand svg {
  width: auto;
  height: 28px;
}

.site-nav {
  grid-area: nav;
}

.nav-list {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 0;
  list-style: none;
}

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

.nav-list a:hover {
  background-color: var(--muted);
  color: var(--foreground);
}

.nav-list a[aria-current='page'] {
  color: var(--foreground);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.header-cta {
  grid-area: cta;
}

.header-cta .short {
  display: none;
}

@media (max-width: 859px) {
  /* Two header rows would take too much of a small screen: the header scrolls away here. */
  :root {
    --header-h: 0px;
  }

  .site-header {
    position: relative;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'brand cta'
      'nav nav';
    gap: 0 12px;
    padding-top: 10px;
  }

  .brand svg {
    height: 24px;
  }

  .site-nav {
    margin-inline: -8px;
    padding-block: 4px 6px;
  }

  .nav-list {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0;
  }

  .nav-list a {
    min-height: 40px;
    padding: 8px;
    font-size: 0.875rem;
  }
}

@media (max-width: 479px) {
  .header-cta .long {
    display: none;
  }

  .header-cta .short {
    display: inline;
  }
}

/* ------------------------------------------------------------------------------------------ sections */
main {
  display: block;
  flex: 1 0 auto;
}

.section {
  position: relative;
  padding-block: 72px;
  border-top: 1px solid var(--border);
}

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

.section-head {
  max-width: 760px;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem);
}

.lead {
  margin-top: 16px;
  color: var(--muted-foreground);
  font-size: 1.0625rem;
  line-height: 1.65;
  max-width: 68ch;
}

.section-foot {
  margin-top: 32px;
}

@media (max-width: 639px) {
  .section {
    padding-block: 56px;
  }

  .section-head {
    margin-bottom: 32px;
  }
}

/* ------------------------------------------------------------------------------------------ hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 88px 96px;
}

/* A faint grid and a low violet glow, fading out towards the copy. Decorative only. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 75% 35%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 75% 35%, #000 10%, transparent 75%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: -20% -10% auto 40%;
  height: 90%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 56px;
}

.hero h1 {
  font-size: clamp(2.25rem, 1.55rem + 2.9vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.005em;
}

.hero .lead {
  margin-top: 24px;
  font-size: 1.125rem;
}

.hero .btn-row {
  margin-top: 32px;
}

.hero-note {
  margin-top: 20px;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

@media (max-width: 959px) {
  .hero {
    padding-block: 56px 64px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }
}

/* Page hero (pricing, security, privacy, 404) */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: 72px 56px;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 60% 90% at 80% 0%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 90% at 80% 0%, #000 10%, transparent 70%);
  pointer-events: none;
}

.page-hero > .container {
  position: relative;
}

.page-hero h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  max-width: 22ch;
}

.page-hero .lead {
  margin-top: 20px;
}

@media (max-width: 639px) {
  .page-hero {
    padding-block: 48px 40px;
  }
}

/* ------------------------------------------------------------------------------------------ plates (cut cards) */
/*
 * A plate is a card with two corners cut at 45 degrees (top-left, bottom-right). ::before paints the 1 px
 * border colour in the cut shape, ::after the surface 1 px inside it; both sit behind the content, so
 * links and buttons inside are never clipped.
 */
.plate {
  --plate-edge: var(--border);
  --plate-fill: var(--card);
  position: relative;
  isolation: isolate;
  padding: 28px;
}

.plate::before,
.plate::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.plate::before {
  inset: 0;
  background: var(--plate-edge);
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
}

.plate::after {
  inset: 1px;
  background: var(--plate-fill);
  clip-path: polygon(
    calc(var(--cut) - 0.6px) 0,
    100% 0,
    100% calc(100% - var(--cut) + 0.6px),
    calc(100% - var(--cut) + 0.6px) 100%,
    0 100%,
    0 calc(var(--cut) - 0.6px)
  );
}

.plate-edge {
  --plate-edge: var(--edge);
}

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

.plate h3 {
  font-size: 1.1875rem;
}

.plate p {
  color: var(--muted-foreground);
}

@media (max-width: 639px) {
  .plate {
    padding: 24px 20px;
  }
}

/* ------------------------------------------------------------------------------------------ lists */
.ticks {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 22px;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Small cut square, like a blade tip. */
.ticks li::before {
  content: '';
  position: absolute;
  top: 0.55em;
  left: 2px;
  width: 7px;
  height: 7px;
  background: var(--link);
  clip-path: polygon(2px 0, 100% 0, 100% calc(100% - 2px), calc(100% - 2px) 100%, 0 100%, 0 2px);
}

.ticks-plain li::before {
  background: var(--border-strong);
}

.ticks li strong {
  color: var(--foreground);
}

/* ------------------------------------------------------------------------------------------ hero code plate */
.code-plate {
  --plate-edge: var(--code-border);
  --plate-fill: var(--code-bg);
  --cut: 18px;
  padding: 0;
  color: var(--code-fg);
}

.code-plate::before {
  background: linear-gradient(135deg, var(--primary) 0%, var(--code-border) 30%, var(--code-border) 70%, var(--accent) 100%);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 14px 28px;
  border-bottom: 1px solid var(--code-border);
  color: var(--code-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.code-head .file {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge svg {
  width: 12px;
  height: 12px;
}

.badge-ok {
  color: #3fcf8e;
}

.badge-accent {
  color: var(--link);
}

.code-plate pre {
  padding: 20px 24px;
  overflow-x: auto;
  color: var(--code-fg);
  font-size: 0.8125rem;
  line-height: 1.7;
  tab-size: 2;
}

.code-plate pre code {
  font-size: inherit;
}

.tok-k {
  color: var(--code-key);
}

.tok-s {
  color: var(--code-str);
}

.tok-c {
  color: var(--code-muted);
}

.readout {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 20px;
  padding: 18px 24px 24px;
  border-top: 1px dashed var(--code-border);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.readout dt {
  color: var(--code-muted);
}

.readout dd {
  margin: 0;
  color: var(--code-fg);
  overflow-wrap: anywhere;
}

.readout .ok {
  color: #3fcf8e;
}

.readout .hl {
  color: var(--code-key);
}

@media (max-width: 479px) {
  .code-head {
    padding: 12px 14px 12px 22px;
  }

  .code-plate pre {
    padding: 16px;
    font-size: 0.75rem;
  }

  .readout {
    gap: 6px 14px;
    padding: 16px 16px 20px;
    font-size: 0.75rem;
  }
}

/* ------------------------------------------------------------------------------------------ why */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.split .plate h3 {
  margin-bottom: 18px;
}

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

/* ------------------------------------------------------------------------------------------ feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature-grid .plate {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--link);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-grid .ticks {
  margin-top: 4px;
}

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

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

/* ------------------------------------------------------------------------------------------ steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid var(--border-strong);
}

/* The first 48 px of each step's rule in the brand gradient. */
.step::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 48px;
  height: 1px;
  background: var(--rule);
}

.step-num {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 32px;
  margin-bottom: 18px;
  padding-inline: 8px;
  background: var(--muted);
  color: var(--link);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.step h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}

.step p {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

@media (max-width: 1023px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }
}

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

/* ------------------------------------------------------------------------------------------ deployment */
.deploy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.deploy-grid .plate {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.deploy-grid .plate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.deploy-grid .tag {
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.fineprint {
  margin-top: 24px;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

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

/* ------------------------------------------------------------------------------------------ SDKs */
.sdk-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
}

.sdk {
  padding: 24px;
  border-left: 1px solid var(--border);
}

.sdk:first-child {
  border-left: 0;
}

.sdk h3 {
  font-size: 1.375rem;
}

.sdk .pkg {
  display: inline-block;
  margin-top: 12px;
  padding: 2px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--link);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.sdk p {
  margin-top: 12px;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

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

  .sdk:nth-child(3) {
    border-left: 0;
  }

  .sdk:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
}

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

  .sdk {
    border-left: 0;
  }

  .sdk:nth-child(n + 2) {
    border-top: 1px solid var(--border);
  }
}

/* ------------------------------------------------------------------------------------------ security highlights */
.sec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.sec-item {
  padding: 24px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sec-item h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  margin-bottom: 8px;
}

.sec-item h3 svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--link);
}

.sec-item p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

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

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

/* Same inner padding as the plates on phones, so the left edges of headings line up. */
@media (max-width: 639px) {
  .sdk,
  .sec-item {
    padding: 24px 20px;
  }
}

/* ------------------------------------------------------------------------------------------ pricing */
.price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.price-grid .plate {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
}

.plan-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan-name h2,
.plan-name h3 {
  font-size: 1.5rem;
}

.plan-scope {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.price .amount {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  line-height: 1;
  color: var(--foreground);
}

.price .per {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.price-alt {
  margin-top: -8px;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.price-alt strong {
  color: var(--foreground);
}

.price-grid .ticks {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.price-grid .btn {
  margin-top: auto;
  align-self: flex-start;
}

.price-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.price-note svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--link);
}

/* Compact plan cards on the home page */
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.teaser-grid .plate {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.teaser-grid .price .amount {
  font-size: 2.25rem;
}

.offer .btn {
  margin-top: auto;
  align-self: flex-start;
}

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

  .teaser-grid .offer {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .price-grid,
  .teaser-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .price-grid .plate {
    padding: 28px 22px;
  }
}

/* Definition blocks (pricing details, policy pages) */
.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
}

.detail {
  padding-block: 24px;
  border-top: 1px solid var(--border);
}

.detail h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}

.detail p,
.detail li {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.detail p + p,
.detail p + .ticks {
  margin-top: 10px;
}

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

/* ------------------------------------------------------------------------------------------ FAQ */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 56px;
  align-items: start;
}

.faq-layout .section-head {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  margin-bottom: 0;
}

@media (max-width: 959px) {
  .faq-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .faq-layout .section-head {
    position: static;
    margin-bottom: 32px;
  }
}

.faq {
  border-top: 1px solid var(--border);
}

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

.faq summary {
  position: relative;
  display: block;
  padding: 20px 48px 20px 0;
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

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

/* Plus / minus drawn with two 1 px bars. */
.faq summary::before,
.faq summary::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 8px;
  width: 14px;
  height: 1.5px;
  background: var(--link);
  transition: transform 0.15s ease;
}

.faq summary::after {
  transform: rotate(90deg);
}

.faq details[open] summary::after {
  transform: rotate(0deg);
}

.faq summary:hover {
  color: var(--link);
}

.faq .answer {
  padding: 0 48px 24px 0;
  color: var(--muted-foreground);
}

.faq .answer p + p {
  margin-top: 10px;
}

@media (max-width: 639px) {
  .faq summary {
    padding-right: 36px;
    font-size: 1rem;
  }

  .faq .answer {
    padding-right: 0;
  }
}

/* ------------------------------------------------------------------------------------------ CTA */
.cta {
  --cut: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 40px;
  padding: 48px;
}

.cta h2 {
  font-size: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem);
}

.cta .lead {
  margin-top: 14px;
}

.cta .ticks {
  margin-top: 20px;
}

.cta-terms {
  margin-top: 20px;
  max-width: 68ch;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.cta-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.cta-action p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

@media (max-width: 859px) {
  .cta {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 32px 24px;
  }
}

/* ------------------------------------------------------------------------------------------ prose (policy pages) */
.prose {
  max-width: 760px;
}

.prose h2 {
  margin-top: 48px;
  margin-bottom: 14px;
  font-size: 1.5rem;
}

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

.prose h3 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 1.125rem;
}

.prose p,
.prose li {
  color: var(--muted-foreground);
}

.prose p + p,
.prose p + ul,
.prose ul + p {
  margin-top: 14px;
}

.prose .ticks {
  margin-top: 14px;
}

.prose .ticks li {
  font-size: 1rem;
}

/*
 * The aside (contact box, summary) comes first in the source, so reading and focus order match the phone
 * layout, where it sits above the text. On wide screens the grid places it in the right-hand column.
 */
.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 64px;
  align-items: start;
}

.doc-layout > .prose {
  grid-column: 1;
  grid-row: 1;
}

.doc-aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  grid-column: 2;
  grid-row: 1;
}

.doc-aside .plate {
  padding: 24px;
}

.doc-aside h2 {
  margin-bottom: 12px;
  color: var(--muted-foreground);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.doc-aside p {
  font-size: 0.875rem;
}

.doc-aside p + p {
  margin-top: 10px;
}

.contact-line {
  font-size: 1rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

@media (max-width: 959px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .doc-layout > .prose,
  .doc-aside {
    position: static;
    grid-column: auto;
    grid-row: auto;
  }
}

.updated {
  margin-top: 16px;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* ------------------------------------------------------------------------------------------ 404 */
.notfound {
  padding-block: 120px 140px;
}

.notfound h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
}

.notfound .btn-row {
  margin-top: 32px;
}

/* ------------------------------------------------------------------------------------------ footer */
.site-footer {
  position: relative;
  padding-block: 48px;
  border-top: 1px solid var(--border);
  background-color: var(--plate);
  font-size: 0.875rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 40px;
  align-items: start;
}

.footer-brand svg {
  width: auto;
  height: 22px;
}

.footer-brand p {
  margin-top: 14px;
  max-width: 40ch;
  color: var(--muted-foreground);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding-block: 8px;
  color: var(--foreground);
  text-decoration: none;
}

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

.footer-links a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 2px;
}

.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
}

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

.footer-meta a:hover {
  color: var(--foreground);
}

@media (max-width: 639px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

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

/* ------------------------------------------------------------------------------------------ print */
@media print {
  .site-header,
  .skip-link,
  .hero::before,
  .hero::after,
  .page-hero::before {
    display: none;
  }

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