/* skynet-tech.net — site stylesheet
   Palette: cool sky paper + slate ink; cobalt for links;
   amber is reserved for one meaning only: "written in a machine voice". */

:root {
  --paper: #EEF2F5;
  --paper-raised: #F7F9FB;
  --ink: #18212E;
  --muted: #5A6677;
  --rule: #C8D2DC;
  --link: #2747C8;
  --machine: #B8740F;
  --machine-wash: #F6E9D3;
  --star: #2747C8;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;

  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.375rem;
  --step-2: 1.75rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.25rem, 5vw, 3.25rem);

  --measure: 66ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1520;
    --paper-raised: #141D2A;
    --ink: #DDE5EF;
    --muted: #93A0B2;
    --rule: #26324A;
    --link: #93AAFF;
    --machine: #E6A84E;
    --machine-wash: #2A2216;
    --star: #93AAFF;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-0);
  line-height: 1.6;
  font-optical-sizing: auto;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--ink); color: var(--paper); padding: 0.5rem 0.75rem;
}
.skip:focus { left: 0.5rem; }

/* ---------- Site bar (inner pages) ---------- */
.sitebar {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1.25rem var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.sitebar .mark {
  font-family: var(--display);
  font-weight: 800; font-stretch: 125%;
  font-size: var(--step-1); letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.sitebar nav a { font-family: var(--display); font-size: var(--step--1); color: var(--muted); text-decoration: none; margin-left: 1.25rem; }
.sitebar nav a:hover, .sitebar nav a[aria-current] { color: var(--ink); }

/* ---------- Masthead (home) ---------- */
.masthead {
  position: relative;
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.masthead .sky {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.sky line { stroke: var(--rule); stroke-width: 1; }
.sky circle { fill: var(--muted); }
.sky .lit { fill: var(--star); }
.sky .lit-edge { stroke: var(--star); stroke-width: 1.25; }

.wordmark {
  position: relative;
  margin: 0;
  font-family: var(--display);
  font-weight: 800; font-stretch: 125%;
  font-size: clamp(3.5rem, 13vw, 10rem);
  line-height: 0.85; letter-spacing: -0.045em;
}
.masthead .tagline {
  position: relative;
  max-width: 34ch;
  margin: 1.25rem 0 0;
  font-size: var(--step-1); line-height: 1.4;
  color: var(--muted);
}
.masthead nav { position: relative; margin-top: 1.75rem; font-family: var(--display); font-size: var(--step--1); }
.masthead nav a { color: var(--ink); text-decoration: none; margin-right: 1.5rem; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.masthead nav a:hover { border-color: var(--ink); }

/* One orchestrated moment: the network draws itself once. */
@media (prefers-reduced-motion: no-preference) {
  .sky line { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.8s ease-out forwards; }
  .sky line:nth-child(odd) { animation-delay: 0.25s; }
  .sky circle { opacity: 0; animation: appear 0.6s ease-out 0.9s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* ---------- Home: lead + index ---------- */
.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) 4rem;
  max-width: 78rem; margin: 0 auto;
}
@media (min-width: 60rem) {
  .home { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 4rem; }
}

.lead h2 {
  margin: 0.5rem 0 1rem;
  text-wrap: balance;
  font-family: var(--display); font-weight: 700; font-stretch: 100%;
  font-size: var(--step-4); line-height: 1.05; letter-spacing: -0.025em;
}
.lead h2 a { color: var(--ink); text-decoration: none; }
.lead h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.lead .dek { font-size: var(--step-1); line-height: 1.45; max-width: 40ch; margin: 0 0 1.25rem; }
.lead .byline { color: var(--muted); font-size: var(--step--1); font-family: var(--display); margin: 0; }

.index h2 {
  margin: 0 0 0.5rem;
  font-family: var(--display); font-size: var(--step-0); font-weight: 600;
}
.index ol { list-style: none; margin: 0; padding: 0; }
.index li { padding: 1rem 0; border-top: 1px solid var(--rule); }
.index li a { color: var(--ink); text-decoration: none; font-size: var(--step-1); line-height: 1.3; }
.index li a:hover { text-decoration: underline; }
.index li p { margin: 0.35rem 0 0; color: var(--muted); font-size: var(--step--1); font-family: var(--display); }
.index li.sample a, .index li.sample { color: var(--muted); }

.about { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: 1.5rem; max-width: var(--measure); color: var(--muted); }
.about h2 { font-family: var(--display); font-size: var(--step-0); font-weight: 600; color: var(--ink); margin: 0 0 0.5rem; }

/* ---------- Voice marker: amber means "machine voice" ---------- */
.voice {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--display); font-size: var(--step--1); font-weight: 600;
  color: var(--machine);
}
.voice::before {
  content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: var(--machine);
  box-shadow: 0 0 0 3px var(--machine-wash);
}

/* ---------- Article ---------- */
.article {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  max-width: 72rem; margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) var(--gutter) 5rem;
}
@media (min-width: 62rem) {
  .article { grid-template-columns: 13rem minmax(0, var(--measure)); gap: 3.5rem; }
  .article > header { grid-column: 2; }
  .article .rail { grid-column: 1; grid-row: 2; position: sticky; top: 2rem; align-self: start; }
  .article .body { grid-column: 2; grid-row: 2; }
}

.article h1 {
  margin: 0.75rem 0 1rem;
  font-family: var(--display); font-weight: 700;
  font-size: var(--step-4); line-height: 1.05; letter-spacing: -0.025em;
  text-wrap: balance;
}
.article .dek { font-size: var(--step-1); line-height: 1.45; color: var(--muted); margin: 0; max-width: 46ch; }

.rail { font-family: var(--display); font-size: var(--step--1); color: var(--muted); line-height: 1.5; }
.rail dl { margin: 0; }
.rail dt { color: var(--ink); font-weight: 600; margin-top: 1rem; }
.rail dt:first-child { margin-top: 0; }
.rail dd { margin: 0; }

.disclosure {
  margin: 0 0 2.25rem;
  padding: 1rem 1.25rem;
  background: var(--machine-wash);
  border-left: 3px solid var(--machine);
  font-family: var(--display); font-size: var(--step--1); line-height: 1.55;
}
.body .disclosure p { margin: 0; font-size: inherit; line-height: inherit; }

.body p { margin: 0 0 1.15em; text-wrap: pretty; hyphens: auto; }
.body > p:first-of-type { font-size: var(--step-1); line-height: 1.5; }
.body h2 {
  margin: 2.5em 0 0.6em;
  font-family: var(--display); font-weight: 700;
  font-size: var(--step-2); line-height: 1.15; letter-spacing: -0.015em;
}
.body blockquote {
  margin: 1.5em 0; padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--ink);
  font-style: italic;
}
.body .sources { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.body .sources h2 { font-size: var(--step-0); margin: 0 0 0.75rem; }
.body .sources ol { padding-left: 1.25rem; margin: 0; font-size: var(--step--1); font-family: var(--display); line-height: 1.5; }
.body .sources li { margin-bottom: 0.5rem; }

/* ---------- Footer ---------- */
.sitefoot {
  border-top: 1px solid var(--rule);
  padding: 1.5rem var(--gutter) 2.5rem;
  font-family: var(--display); font-size: var(--step--1); color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between;
}
.sitefoot a { color: var(--muted); }

@media print {
  .sitebar nav, .sitefoot, .masthead .sky { display: none; }
  body { background: #fff; color: #000; }
  .article { display: block; }
}

/* On narrow screens the network sits behind the text; quiet it. */
@media (max-width: 40rem) {
  .masthead .sky { opacity: 0.3; }
}
