/* Margin Notes — Field Notes body, Prompt margin. */
:root {
  color-scheme: light dark;
  --bg: #f4efe6;
  --ink: #1c1a16;
  --muted: #6a645c;
  --dim: #8a8378;
  --rule: #d8d0c4;
  --accent: #6b3c2e;
  --ok: #2c5a3c;
  --margin-bg: #ece5d8;
  --mascot-track-height: 56px;
  --measure: 38rem;
  --side: 16rem;
  --outer: calc(var(--measure) + var(--side) + 4rem);
  --pad: 1.5rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161410;
    --ink: #ece6db;
    --muted: #a39b90;
    --dim: #7d766c;
    --rule: #2f2b26;
    --accent: #d4b496;
    --ok: #9fbf8a;
    --margin-bg: #1d1a15;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body { font-family: Geist, "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 1.5; min-height: 100vh; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: var(--pad); top: 0.5rem; z-index: 10; background: var(--bg); padding: 0.25rem 0.5rem; }

.wrap, .mascot-track, .bar, .mascot-controls, .site-footer {
  width: min(var(--outer), calc(100% - 2 * var(--pad)));
  margin-inline: auto;
}
.site-header { border-bottom: 1px solid var(--rule); padding-bottom: 1rem; margin-bottom: 2.75rem; }
.mascot-stage { border-bottom: 1px solid var(--rule); }
.mascot { --mascot-size: 48px; }
.mascot-controls { margin-bottom: 0.65rem; margin-top: 0.4rem; color: var(--muted); }
.mascot-arm { border-color: var(--rule); color: var(--muted); }
.bar { margin-top: 0.85rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; flex-direction: row; align-items: center; gap: 0.7rem; text-decoration: none; color: inherit; }
.brand .logo { width: 40px; height: 40px; flex: 0 0 40px; display: block; color: inherit; }
.brand-text { display: flex; flex-direction: column; gap: 0.15rem; }
.mark { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; font-weight: 500; }
.handle { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 0.7rem; letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--muted); }
nav { display: flex; gap: 1rem; font-size: 0.85rem; }
nav a { text-decoration: none; }
nav a[aria-current="page"] { text-decoration: underline; }

.spread { display: grid; grid-template-columns: minmax(0, var(--measure)) var(--side); gap: 4rem; justify-content: space-between; align-items: start; }
.page:not(.page-home) .wrap > * { max-width: var(--measure); }

.kicker { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.75rem; }
h1, h2, h3 { font-family: Newsreader, Georgia, serif; font-weight: 450; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 3.4rem); margin: 0 0 1.1rem; font-weight: 400; }
h2 { font-size: 1.35rem; margin: 0 0 1rem; padding-top: 0.4rem; border-top: 1px solid var(--rule); }
.lede { font-family: Newsreader, Georgia, serif; font-size: 1.25rem; line-height: 1.45; margin: 0 0 1rem; }
.placeholder-note { font-size: 0.8rem; color: var(--muted); font-style: italic; margin: 0 0 3rem; }
section { margin-bottom: 3rem; }

.work-list, .writing-list { list-style: none; margin: 0; padding: 0; }
.work-list li { display: grid; grid-template-columns: 10rem 1fr; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--rule); align-items: baseline; }
.work-list li:last-child, .writing-list li:last-child { border-bottom: 1px solid var(--rule); }
.work-list a, .writing-list a { font-family: Newsreader, Georgia, serif; font-size: 1.2rem; text-decoration: none; }
.summary, .dek { color: var(--muted); font-size: 0.95rem; }
.writing-list li { padding: 0.85rem 0; border-top: 1px solid var(--rule); }
.writing-list time { display: block; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.72rem; color: var(--muted); margin-bottom: 0.15rem; }
.writing-list .dek { margin: 0.25rem 0 0; }

/* The margin: Prompt's voice, quietly */
.margin {
  position: sticky;
  top: 1.5rem;
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  border-left: 1px solid var(--rule);
  padding: 0.2rem 0 0.2rem 1.25rem;
}
.margin a { color: var(--accent); text-decoration: none; }
.margin-title { margin: 0 0 1rem; color: var(--ok); font-weight: 600; }
.margin-title span { color: var(--dim); font-weight: 400; display: block; }
.margin-list { margin: 0; }
.margin-list div { margin: 0 0 0.85rem; }
.margin-list dt { color: var(--dim); text-transform: lowercase; }
.margin-list dt::before { content: "# "; }
.margin-list dd { margin: 0; color: var(--ink); }
.margin-foot { margin: 1.25rem 0 0; }

.crumb, .meta { font-size: 0.8rem; color: var(--muted); margin: 0 0 0.6rem; }
.prose { font-family: Newsreader, Georgia, serif; font-size: 1.15rem; line-height: 1.55; }
.prose p { margin: 0 0 1rem; }
.prose em { color: var(--muted); }
.prose code { font-family: "IBM Plex Mono", monospace; font-size: 0.85em; }

.now-list { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13.5px; margin: 1.5rem 0 2rem; border-top: 1px solid var(--rule); }
.now-list div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.now-list dt { color: var(--dim); text-transform: lowercase; }
.now-list dd { margin: 0; }

.site-footer { margin-top: 4rem; margin-bottom: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.8rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

@media (max-width: 900px) {
  .spread { grid-template-columns: 1fr; gap: 0; }
  .margin { position: static; order: -1; border-left: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1rem 0; margin-bottom: 2.5rem; }
  .margin-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
  .spread { display: flex; flex-direction: column; }
  .column { display: contents; }
  .column .intro { order: -2; }
}
@media (max-width: 640px) {
  .work-list li, .now-list div { grid-template-columns: 1fr; gap: 0.2rem; }
  nav { gap: 0.7rem; font-size: 0.8rem; flex-wrap: wrap; }
  .bar { flex-direction: column; gap: 0.4rem; }
  .margin-list { grid-template-columns: 1fr; }
}

/* Now page: quote in the margin, listening under the copy. */
.page-now .wrap > .spread { max-width: none; }
.page-now .now-page { order: -2; }

.daily-quote-text {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--ink);
}
.daily-quote-source {
  margin: 0.85rem 0 0;
  color: var(--muted);
}

.listening-now { margin: 2.5rem 0 0; }
.listening-now h3 {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
  border: 0;
  padding: 0;
  margin: 1.5rem 0 0.6rem;
}
.listening-now h3:first-of-type { margin-top: 0; }
.listening-list { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.listening-list li {
  padding: 0.45rem 0;
  border-top: 1px solid var(--rule);
}
.listening-list li:last-child { border-bottom: 1px solid var(--rule); }
.listening-list a { text-decoration: none; }
.listening-list .artist { color: var(--muted); font-size: 0.9rem; }

.daily-quote { margin: 1.5rem 0; padding: 0 0 0 1rem; border-left: 2px solid var(--dim); }
.on-repeat { margin: 1rem 0 0; color: var(--dim); }
