/* xterminalpro.com
 *
 * One stylesheet, no framework, no build step, no web font. The type is the
 * visitor's own system stack: it renders instantly, costs no request, and
 * needs no third-party origin — which matters here, because this site's CSP
 * deliberately names none. See conf.d/xterminalpro-security.conf.
 */

:root {
  color-scheme: dark;

  /* Brand, sampled from the mark. Green is "up", red is "down"; that is why
     there are two accents and why they are never used interchangeably. */
  --up:       #3ccd8c;
  --down:     #e85151;

  --bg:       #0b1018;
  --bg-2:     #0e1420;
  --panel:    #131b29;
  --line:     #1f2a3c;
  --line-2:   #2a3850;

  --fg:       #e8edf5;
  --fg-muted: #93a1b8;
  --fg-dim:   #6b7a93;

  --radius:   12px;
  --wrap:     1120px;
  --gutter:   16px;

  --step--1: clamp(.82rem, .8rem + .1vw, .88rem);
  --step-0:  clamp(1rem, .96rem + .2vw, 1.06rem);
  --step-1:  clamp(1.2rem, 1.1rem + .5vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3:  clamp(1.9rem, 1.5rem + 2vw, 3rem);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg:       #ffffff;
    --bg-2:     #f6f8fb;
    --panel:    #ffffff;
    --line:     #e2e8f2;
    --line-2:   #cbd5e5;
    --fg:       #0e1726;
    --fg-muted: #4a5769;
    --fg-dim:   #6b7a93;
    --up:       #12905d;
    --down:     #c93636;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: var(--step-0)/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; font-weight: 640; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); font-weight: 600; }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--fg); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--up); }
:focus-visible { outline: 2px solid var(--up); outline-offset: 3px; border-radius: 4px; }

.muted { color: var(--fg-muted); }
.small { font-size: var(--step--1); }
.lede  { font-size: var(--step-1); color: var(--fg-muted); max-width: 62ch; }

/* An unfilled fact, visible on purpose: it must be impossible to publish
   these by accident. */
.todo {
  background: var(--down); color: #fff; padding: 0 .35em;
  border-radius: 4px; font-weight: 600; font-size: .9em;
}

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--panel);
  padding: 12px 16px; border-radius: 0 0 var(--radius) 0; z-index: 10;
}
.skip:focus { left: 0; }

/* ── header ─────────────────────────────────────────────────────────────── */

.site-head {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 5;
}
.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 640; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-mark path { stroke: var(--down); stroke-width: 9; stroke-linecap: round; fill: none; }
.brand-mark path.up { stroke: var(--up); }
.brand-name { letter-spacing: -0.02em; }

.site-head nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-head nav a {
  padding: 6px 12px; border-radius: 999px; text-decoration: none;
  color: var(--fg-muted); font-size: var(--step--1);
}
.site-head nav a:hover { color: var(--fg); background: var(--panel); }
.site-head nav a[aria-current="page"] { color: var(--fg); background: var(--panel); }

/* ── sections ───────────────────────────────────────────────────────────── */

section { padding-block: clamp(48px, 7vw, 88px); }
section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 40px; }
.eyebrow {
  font-size: var(--step--1); letter-spacing: .12em; text-transform: uppercase;
  color: var(--up); font-weight: 600; margin-bottom: .6em;
}

.hero { padding-block: clamp(56px, 9vw, 112px); }
.hero h1 { max-width: 20ch; }
.hero .lede { margin-top: 20px; }

.trust {
  margin-top: 32px; padding: 18px 20px; border: 1px solid var(--line);
  border-left: 3px solid var(--up); border-radius: var(--radius);
  background: var(--bg-2); max-width: 70ch; color: var(--fg-muted);
  font-size: var(--step--1);
}

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 12px 22px; border-radius: 999px; font-weight: 600;
  border: 1px solid transparent; font-size: var(--step-0);
}
.btn-primary { background: var(--up); color: #06120c; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line-2); color: var(--fg); }
.btn-ghost:hover { background: var(--panel); }

/* ── cards ──────────────────────────────────────────────────────────────── */

.grid { display: grid; gap: 20px; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 24px;
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.list li { padding-left: 26px; position: relative; color: var(--fg-muted); }
.list li::before {
  content: ""; position: absolute; left: 6px; top: .65em;
  width: 7px; height: 7px; border-radius: 2px; background: var(--up);
}
.list li strong { color: var(--fg); font-weight: 600; }

/* ── the architecture diagram ───────────────────────────────────────────── */
/*
 * Built from real elements rather than one SVG, so it reflows on a narrow
 * screen, the text can be selected and translated, and a screen reader reads
 * it in order. An SVG wide enough to hold five labelled stages is unreadable
 * at 360px, and scaling it down does not fix that.
 */
.flow { display: grid; gap: 0; max-width: 760px; margin-inline: auto; }
.flow-row {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 16px 20px; text-align: center;
}
.flow-row .t { font-weight: 600; }
.flow-row .d { color: var(--fg-muted); font-size: var(--step--1); }
.flow-arrow {
  justify-self: center; width: 2px; height: 26px; background: var(--line-2);
  position: relative;
}
.flow-arrow::after {
  content: ""; position: absolute; left: 50%; bottom: -1px; width: 8px; height: 8px;
  border-right: 2px solid var(--line-2); border-bottom: 2px solid var(--line-2);
  transform: translateX(-50%) rotate(45deg);
}
.flow-split { display: grid; gap: 16px; }
@media (min-width: 620px) { .flow-split { grid-template-columns: 1fr 1fr; } }

.aside-note {
  margin-top: 28px; border: 1px dashed var(--line-2); border-radius: var(--radius);
  padding: 20px; background: var(--bg-2);
}

/* ── spec table ─────────────────────────────────────────────────────────── */

.spec { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.spec th, .spec td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { color: var(--fg-muted); font-weight: 500; width: 40%; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }

/* ── prose (legal pages) ────────────────────────────────────────────────── */

.prose { max-width: 70ch; }
.prose h2 { margin-top: 2em; font-size: var(--step-1); }
.prose h3 { margin-top: 1.6em; font-size: var(--step-0); font-weight: 640; }
.prose ul { padding-left: 1.2em; color: var(--fg-muted); }
.prose li { margin-bottom: .5em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: var(--step--1); }
.prose th, .prose td { text-align: left; padding: 12px; border: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--bg-2); font-weight: 600; }
.prose .updated { color: var(--fg-dim); font-size: var(--step--1); }

/* ── footer ─────────────────────────────────────────────────────────────── */

.site-foot { border-top: 1px solid var(--line); padding-block: 48px; background: var(--bg-2); }
.foot-grid { display: grid; gap: 28px; margin-bottom: 32px; }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot-brand { font-weight: 640; margin-bottom: .5em; }
.foot-head { font-weight: 600; font-size: var(--step--1); margin-bottom: .6em; }
.site-foot a { color: var(--fg-muted); }
.site-foot a:hover { color: var(--fg); }
.foot-note {
  border-top: 1px solid var(--line); padding-top: 24px; margin-bottom: 1em; max-width: 80ch;
}
