/* AutistAudit.com — dark, hyper-minimal, terminal aesthetic.
   No external fonts, no scripts, no trackers, no cookies.
   System monospace only. Every byte earned its place. */

:root {
  --bg: #0a0a0a;
  --panel: #101010;
  --panel-2: #141414;
  --text: #d6d6d6;
  --bright: #f0f0f0;
  --muted: #8a8a8a;
  --dim: #5c5c5c;
  --green: #33ff66;
  --green-bright: #7dff9e;
  --green-dim: #1f9e40;
  --red: #ff5f56;
  --amber: #ffb000;
  --border: #262626;
  --border-strong: #3a3a3a;
  --link: #7dff9e;
  --max: 780px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 16px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

::selection { background: var(--green); color: #000; }

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

a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--green); background: rgba(51, 255, 102, .07); }
a:visited { color: var(--link); }

strong { color: var(--bright); }

p { margin: 0 0 16px; }

ul { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 14px; }
li::marker { color: var(--green-dim); }

/* ---------- sticky header: the nav follows you, like a good auditor ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 10, .97);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px 0;
}

.domain {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.domain a { color: var(--green); text-decoration: none; }
.domain a:hover { background: none; color: var(--green-bright); }

.cursor {
  display: inline-block;
  width: .55em;
  height: 1.05em;
  margin-left: .3em;
  background: var(--green);
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.crumb {
  margin: 4px 0 0;
  color: var(--dim);
  font-size: .82rem;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  padding: 10px 0 12px;
  font-size: .92rem;
}

.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--green); background: none; }
.site-nav a[aria-current="page"] { color: var(--green); }
.site-nav a[aria-current="page"]::before { content: "> "; color: var(--green-dim); }

/* ---------- layout ---------- */

main,
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

main { padding-top: 36px; }

section { margin-bottom: 56px; }

h1 {
  margin: 0 0 24px;
  font-size: 1.35rem;
  line-height: 1.4;
  font-weight: 700;
  color: var(--text);
}

h1 .tagline { color: var(--muted); font-weight: 400; }

h2 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  color: var(--green);
  font-weight: 700;
}

h2::before { content: "## "; color: var(--green-dim); }

.lede {
  color: var(--muted);
  font-size: .95rem;
}

.lede a { color: var(--muted); }

/* ---------- contents tree (igwiki discipline) ---------- */

.contents {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 16px 18px;
  margin: 0 0 40px;
}

.contents p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .85rem;
}

.contents ol { margin: 0; padding-left: 22px; }
.contents li { margin-bottom: 4px; }
.contents li::marker { color: var(--green-dim); }
.contents a { text-decoration: none; }

/* ---------- greentext: the ">" is purely visual (CSS), the text stays verbatim ---------- */

.greentext {
  color: var(--green);
  border-left: 2px solid var(--green-dim);
  background: rgba(51, 255, 102, .03);
  padding: 14px 16px;
  margin-bottom: 56px;
}
.greentext p { margin: 0 0 4px; }
.greentext p:last-child { margin-bottom: 0; }
.greentext p::before { content: "> "; color: var(--green-dim); }

.standard {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 16px;
  font-weight: 700;
  color: var(--bright);
}

/* ---------- the second voice: muse, the homework ---------- */

.aside {
  color: var(--muted);
  font-size: .88rem;
  border-left: 2px solid var(--border-strong);
  padding-left: 12px;
}

/* ---------- the dump ---------- */

.dump-head {
  margin: 0 0 6px;
  color: var(--dim);
  font-size: .85rem;
}

.dump {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 16px;
  overflow-x: auto;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--red);
  margin: 0 0 16px;
}
.dump code { font-family: inherit; }

/* ---------- faq ---------- */

dl { margin: 0; }
dt {
  margin: 24px 0 6px;
  font-weight: 700;
  color: var(--bright);
}
dt:first-child { margin-top: 0; }
dd { margin: 0; }

/* ---------- fact tables (igwiki infobox discipline) ---------- */

table { border-collapse: collapse; width: 100%; margin: 0 0 24px; font-size: .92rem; }

caption {
  text-align: left;
  color: var(--dim);
  font-size: .82rem;
  padding-bottom: 6px;
}

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

th { color: var(--muted); font-weight: 400; width: 28%; background: var(--panel); }
td { color: var(--text); }

tbody tr:hover td { background: var(--panel-2); }

.catalog td:first-child { white-space: nowrap; }

/* ---------- sibling nav: the "see also" that never leaves you stranded ---------- */

.sibling-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin: 48px 0 0;
  font-size: .92rem;
}

.sibling-nav a { text-decoration: none; }

/* ---------- footer ---------- */

.site-footer {
  padding-top: 24px;
  padding-bottom: 32px;
  color: var(--muted);
  font-size: .9rem;
  border-top: 1px solid var(--border);
  margin-top: 64px;
}

.site-footer p { margin: 0 0 12px; }
.site-footer p:last-child { margin-bottom: 0; }

.statusbar {
  color: var(--dim);
  font-size: .82rem;
}

/* ---------- the 404 ---------- */

.error-code {
  color: var(--red);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  main { padding-top: 28px; }
  .domain { font-size: 1.3rem; }
  h1 { font-size: 1.15rem; }
  section { margin-bottom: 44px; }
  th { width: 34%; }
  .catalog td:first-child { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
  * { transition: none !important; }
}
