@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --paper:    #eaedf0;
  --surface:  #fbfcfd;
  --sunken:   #e1e6ea;
  --ink:      #12171c;
  --soft:     #5c6773;
  --faint:    #8b959f;
  --rule:     #ced5db;
  --accent:   #186b6b;
  --accent-w: #d5e6e3;
  --over:     #a8641f;
  --over-w:   #f0e0cb;
  --shadow:   0 1px 2px rgba(18,23,28,.06), 0 8px 24px -12px rgba(18,23,28,.18);
  --measure:  66ch;
  --wide:     940px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:    #0f1317;
    --surface:  #171d23;
    --sunken:   #1e252c;
    --ink:      #e6eaee;
    --soft:     #98a4b0;
    --faint:    #6c7883;
    --rule:     #2b343d;
    --accent:   #59b8b2;
    --accent-w: #17332f;
    --over:     #dd9c46;
    --over-w:   #3a2c17;
    --shadow:   0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper:    #0f1317;
  --surface:  #171d23;
  --sunken:   #1e252c;
  --ink:      #e6eaee;
  --soft:     #98a4b0;
  --faint:    #6c7883;
  --rule:     #2b343d;
  --accent:   #59b8b2;
  --accent-w: #17332f;
  --over:     #dd9c46;
  --over-w:   #3a2c17;
  --shadow:   0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Newsreader, Georgia, 'Times New Roman', serif;
  font-size: 19px;
  line-height: 1.65;
  font-optical-sizing: auto;
}
img { max-width: 100%; }
::selection { background: var(--accent-w); color: var(--ink); }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px;
}

/* The `chat` inside `kamchatka`, in the accent the logo is drawn in - the same variable, so it
   follows the theme rather than pinning the logo's dark-mode teal into a light page. Nothing but
   the name is marked up this way; a path or a cargo invocation that happens to contain the word
   is left alone, and so is anything inside a quoted transcript. */
code .chat { color: var(--accent); }

/* ---------------------------------------------------------------- layout */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.col  { max-width: var(--measure); }
.stack > * + * { margin-top: 1.15em; }

header.hero { padding: 68px 0 8px; }
.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--soft); margin: 0 0 22px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.eyebrow .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

h1 {
  font-family: Archivo, system-ui, sans-serif;
  font-weight: 700; letter-spacing: -.028em; line-height: 1.06;
  font-size: clamp(34px, 6.2vw, 62px);
  margin: 0; text-wrap: balance; max-width: 17ch;
}
h1 .quiet { color: var(--soft); font-weight: 600; }

.deck {
  font-size: clamp(19px, 2.2vw, 22px); color: var(--soft);
  max-width: 56ch; margin: 22px 0 0; text-wrap: pretty;
}

h2 {
  font-family: Archivo, system-ui, sans-serif;
  font-weight: 650; letter-spacing: -.02em; line-height: 1.14;
  font-size: clamp(25px, 3.4vw, 33px);
  margin: 0 0 4px; text-wrap: balance;
}
h3 {
  font-family: Archivo, system-ui, sans-serif;
  font-weight: 600; letter-spacing: -.012em; font-size: 20px;
  margin: 0 0 2px;
}
section { padding: 54px 0; border-top: 1px solid var(--rule); }
section:first-of-type { border-top: 0; }
.sec-no {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--faint); display: block; margin-bottom: 12px;
}
p { margin: 0; text-wrap: pretty; }
strong { font-weight: 600; }

/* ------------------------------------------------------------- transcript */
code, pre { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
code {
  font-size: .85em; background: var(--sunken); padding: .12em .34em;
  border-radius: 3px; color: var(--ink);
}
figure { margin: 30px 0 0; }
figcaption {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px; line-height: 1.55; color: var(--soft); margin-top: 12px;
  max-width: 74ch;
}
.term {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 4px;
  box-shadow: var(--shadow); overflow: hidden;
}
.term-bar {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint);
  padding: 9px 14px; border-bottom: 1px solid var(--rule); background: var(--sunken);
  display: flex; justify-content: space-between; gap: 12px;
}
.term pre {
  margin: 0; padding: 15px 16px; overflow-x: auto;
  font-size: 12.5px; line-height: 1.72; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.term pre .c  { color: var(--faint); }
.term pre .a  { color: var(--accent); font-weight: 500; }
.term pre .o  { color: var(--over); font-weight: 500; }

blockquote.think {
  margin: 26px 0 0; padding: 2px 0 2px 20px;
  border-left: 2px solid var(--accent); color: var(--ink);
  font-size: 19.5px;
}
blockquote.think .who {
  display: block; margin-top: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
  font-style: normal;
}

.note-card {
  background: var(--accent-w); border: 1px solid var(--accent); border-radius: 4px;
  padding: 12px 14px; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px; line-height: 1.6; color: var(--ink); white-space: pre-wrap;
}
/* the same card holding something that is not true; colour carries state on this page */
.note-card.false { background: var(--over-w); border-color: var(--over); }

ul.plain { margin: 0; padding-left: 1.15em; }
ul.plain li + li { margin-top: .5em; }
ul.plain li::marker { color: var(--faint); }


footer {
  border-top: 1px solid var(--rule); padding: 40px 0 72px; margin-top: 12px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; color: var(--soft);
  line-height: 1.9;
}
footer a { color: var(--accent); }

@media (max-width: 640px) {
  body { font-size: 17.5px; }
  header.hero { padding-top: 44px; }
  section { padding: 40px 0; }
  .term pre { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------------------------------------------------------------- the index */

.pieces { list-style: none; margin: 0; padding: 0; }

.pieces li { border-top: 1px solid var(--rule); padding: 30px 0; }
.pieces li:last-child { border-bottom: 1px solid var(--rule); }

.pieces h2 {
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: clamp(21px, 3.2vw, 27px); line-height: 1.2; letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.pieces h2 a { color: var(--ink); text-decoration: none; }
.pieces h2 a:hover { color: var(--accent); }

.pieces p { margin: 0; color: var(--soft); font-size: 17px; line-height: 1.55; }

/* the reading order, which is not the order they were written in: the first is the introduction
   and the later ones lean on it */
.pieces .no {
  font-size: 15px; font-weight: 700; letter-spacing: .06em;
  color: var(--accent); margin-right: 9px;
}

.pieces .meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: .04em; text-transform: lowercase;
  color: var(--faint); margin-bottom: 12px;
}
