/* THE DEV: plain CSS, light and dark themes, no external resources. */

:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --surface-2: #f1f3f2;
  --text: #111111;
  --muted: #4a5350;
  --border: #e1e5e3;
  --accent: #1f8a5a;
  --accent-text: #176b46;
  --btn-bg: #176b46;
  --btn-text: #ffffff;
  --shadow: 0 1px 2px rgb(17 17 17 / 0.04), 0 8px 24px rgb(17 17 17 / 0.06);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1110;
    --surface: #151a18;
    --surface-2: #1a201e;
    --text: #eef2f0;
    --muted: #a8b3af;
    --border: #28302d;
    --accent: #3dd68c;
    --accent-text: #3dd68c;
    --btn-bg: #3dd68c;
    --btn-text: #0b0f0d;
              --shadow: none;
  }

  .brand > img {
    border-radius: 8px;
    box-shadow: 0 0 0 1px var(--border);
  }
}

*,
*::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(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img {
  max-width: 100%;
}

a {
  color: var(--accent-text);
  text-underline-offset: 0.18em;
}

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

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

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

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 0.75rem;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 48rem) {
  .wrap {
    padding: 0 2rem;
  }
}

/* Terminal details: monospace labels and the green cursor of the logo. */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: var(--accent-text);
  margin: 0 0 0.75rem;
}

.cursor::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.9em;
  margin-left: 0.12em;
  vertical-align: -0.08em;
  background: var(--accent);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

.brand {
  display: inline-block;
  line-height: 0;
  border-radius: 8px;
}

.brand img {
  display: block;
  width: auto;
  height: 42px;
  image-rendering: pixelated;
}

.brand-full img {
  height: 56px;
}

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

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

/* Buttons */

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

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}

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

.btn-primary:hover {
  text-decoration: underline;
}

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

.btn-ghost:hover {
  border-color: var(--accent);
}

/* Home */

.hero {
  padding: 4.5rem 0 4.5rem;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(to bottom, transparent 40%, var(--bg)),
    repeating-linear-gradient(0deg, transparent 0 27px, var(--border) 27px 28px),
    repeating-linear-gradient(90deg, transparent 0 27px, var(--border) 27px 28px);
}

.hero-logo {
  display: block;
  width: auto;
  height: 56px;
  margin-bottom: 2.5rem;
  image-rendering: pixelated;
}

@media (min-width: 40rem) {
  .hero-logo {
    height: 112px;
  }
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0;
  max-width: 17ch;
}

.hero .lead {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 40rem;
  margin: 1.5rem 0 0;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

.section-head p {
  color: var(--muted);
  margin: 1rem 0 0;
}

.grid {
  display: grid;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.card .num {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent-text);
}

.card h3 {
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0.75rem 0 0.5rem;
}

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

.steps {
  counter-reset: step;
  gap: 2rem;
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.steps li {
  counter-increment: step;
  border-top: 3px solid var(--accent);
  padding-top: 1.25rem;
}

.steps li::before {
  content: "0" counter(step);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent-text);
}

.steps h3 {
  font-size: 1.15rem;
  margin: 0.5rem 0;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

/* Legal pages */

.doc-head {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}

.doc-head h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

.doc-head .lead {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 44rem;
  margin: 1rem 0 0;
}

.doc-meta {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin: 1.25rem 0 0;
}

.doc {
  display: grid;
  gap: 2rem;
  padding: 2.5rem 0 4.5rem;
}

@media (min-width: 64rem) {
  .doc {
    grid-template-columns: 16rem minmax(0, 44rem);
    gap: 4rem;
  }

  .toc {
    position: sticky;
    top: 1.5rem;
    align-self: start;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
  }
}

.toc {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1rem;
  font-size: 0.95rem;
}

.toc h2 {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.5rem;
}

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

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

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

.prose {
  max-width: 44rem;
  min-width: 0;
}

.prose h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 3rem 0 0.75rem;
  scroll-margin-top: 1.5rem;
}

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

.prose h2 .n {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--accent-text);
  margin-right: 0.5rem;
}

.prose h3 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
}

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

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

.callout {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 0.5rem;
}

.table-scroll {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
}

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

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

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

thead th {
  background: var(--surface-2);
}

.simple-page {
  padding: 5rem 0;
}

.simple-page h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.footer-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
}

.footer-line p {
  margin: 0;
}

.footer-line nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

