/* ATLAS legal site — static, no JavaScript, no cookies, no external resources. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #0c0d10;
  --surface: #14161b;
  --text: #e8eaee;
  --muted: #9aa1ad;
  --border: #262a33;
  --accent: #8fb4ff;
  --max: 46rem;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

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

.brand {
  font-weight: 700;
  letter-spacing: 0.18em;
  text-decoration: none;
  color: var(--text);
}

.langs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
}

.langs a[aria-current="page"] {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

main {
  padding: 2rem 0 3rem;
}

h1 {
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 2rem 0 0.5rem;
}

h3 {
  font-size: 1rem;
  margin: 1.25rem 0 0.35rem;
}

p,
ul,
ol {
  margin: 0.5rem 0 1rem;
}

ul,
ol {
  padding-left: 1.35rem;
}

li {
  margin: 0.25rem 0;
}

.updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.lead {
  font-size: 1.05rem;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  margin: 1rem 0;
}

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

.doc-list a {
  display: block;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.doc-list span {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.9rem;
}

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

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.6rem;
}

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

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

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

@media (max-width: 420px) {
  body {
    font-size: 15px;
  }

  .wrap {
    padding: 0 1rem;
  }

  .site-header .wrap {
    gap: 0.5rem 0.75rem;
  }

  .langs {
    gap: 0.6rem;
  }

  /* Comfortable touch target on phones. */
  .theme-toggle {
    min-height: 2.25rem;
    padding: 0 0.55rem;
  }
}

/* Theme toggle — CSS-only (no JavaScript). Dark is the default; checking the
   box switches to light without any script or storage. */
.theme-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.4rem;
  border: 0;
  background: none;
  color: var(--accent);
  line-height: 1;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle-input:focus-visible + .theme-toggle {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Monochrome line icons (inline SVG) that follow the text color. */
.theme-icon {
  width: 0.95rem;
  height: 0.95rem;
  display: inline-block;
  vertical-align: -0.12em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-moon {
  display: none;
}

:root:has(.theme-toggle-input:checked) .theme-icon-sun {
  display: none;
}

:root:has(.theme-toggle-input:checked) .theme-icon-moon {
  display: inline-block;
}

/* Light palette, only while the toggle is on. */
:root:has(.theme-toggle-input:checked) {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f5f6f8;
  --text: #16181d;
  --muted: #5b616e;
  --border: #dfe3ea;
  --accent: #1f4fd8;
}

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

/* Keep the phone touch target after the base .theme-toggle rule. */
@media (max-width: 420px) {
  .theme-toggle {
    padding: 0.7rem 0.55rem;
  }
}

