/* NeuroSavor Weekly Dispatch, browser edition.
   Same vocabulary as the landing page: graphite chrome, Syne display type,
   JetBrains Mono labels, and the warm "Practice" paper as the reading surface.
   ENERGY 2 / RHYTHM 2 / MOTION 1: a reading page, so motion is hover feedback only. */
:root {
  --graphite: #0E1117;
  --surface: #161B22;
  --line-dark: rgba(226, 232, 240, 0.08);
  --text: #E2E8F0;
  --muted: #94A3B8;
  --accent: #38BDF8;
  --accent-soft: #7DD3FC;
  --paper: #E9E7DF;
  --ink: #202926;
  --ink-body: #2E3734;
  --sage: #476459;
  --rule: #A8B5AF;
  --gutter: clamp(20px, 4vw, 48px);
  --column: 700px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--graphite); }
body {
  margin: 0;
  background: var(--graphite);
  color: var(--text);
  font: 400 1rem/1.6 "Plus Jakarta Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--graphite); }
img { display: block; max-width: 100%; height: auto; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Header: the landing page's bar, with "Weekly Dispatch" set under the wordmark. */
.site-header { border-bottom: 1px solid var(--line-dark); padding: 14px var(--gutter); }
.site-header .bar { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: #fff; text-decoration: none; }
.brand img { width: 34px; height: 34px; flex-shrink: 0; }
.brand-name { display: block; font: 800 1.25rem/1 "Syne", sans-serif; letter-spacing: -0.02em; }
.brand-sub { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: 0.16em; }
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 20px;
  background: var(--accent); color: var(--graphite);
  font: 700 0.8rem/1 "Syne", sans-serif; letter-spacing: 0.04em; white-space: nowrap;
  border-radius: 6px; text-decoration: none;
  /* The one lifted element on the page: it is the only action. */
  box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: background-color 0.25s ease, transform 0.25s ease;
}
.cta:hover { background: var(--accent-soft); transform: translateY(-1px); }

/* Masthead on graphite */
.masthead { padding: clamp(56px, 9vw, 120px) var(--gutter) clamp(44px, 6vw, 72px); }
.masthead-inner { max-width: var(--column); margin: 0 auto; }
.kicker { margin: 0 0 22px; color: var(--accent); }
.masthead h1 {
  margin: 0;
  color: #fff;
  font: 800 clamp(1.9rem, 10vw, 4.6rem)/0.98 "Syne", sans-serif;
  overflow-wrap: break-word;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.dek {
  margin: 22px 0 0;
  max-width: 34ch;
  color: var(--text);
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.45;
  text-wrap: pretty;
}
.byline {
  display: flex; align-items: center; gap: 14px;
  margin: 36px 0 0; padding-top: 20px;
  border-top: 1px solid var(--line-dark);
}
/* Same treatment as the landing page portrait: soft square, thin accent edge. */
.avatar { width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; border: 1px solid rgba(56, 189, 248, 0.4); object-fit: cover; }
.author-name { margin: 0 0 4px; color: #fff; font-weight: 600; font-size: 1rem; line-height: 1.2; }
.byline .mono { margin: 0; color: var(--muted); font-size: 11px; }

/* Reading surface: the landing page's warm paper */
.paper { background: var(--paper); color: var(--ink-body); padding: clamp(56px, 8vw, 104px) var(--gutter) clamp(64px, 9vw, 120px); }
.prose { max-width: var(--column); margin: 0 auto; font-size: clamp(1.05rem, 1.6vw, 1.15rem); line-height: 1.75; }
.prose > p { margin: 0 0 1.25em; text-wrap: pretty; }
.prose > p.lede { color: var(--ink); font-size: 1.2em; line-height: 1.6; }
.prose h2 {
  margin: 2.2em 0 0.7em;
  color: var(--ink);
  font: 800 clamp(1.7rem, 3.6vw, 2.35rem)/1.05 "Syne", sans-serif;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

/* Wider than the column on large screens so the photograph breaks the text block. */
.plate { margin: clamp(40px, 6vw, 72px) auto; max-width: 960px; }
.plate img { width: 100%; border-radius: 4px; }
@media (min-width: 1000px) { .prose .plate { margin-left: -130px; margin-right: -130px; } }

/* Numbered steps: the landing page's Notice / Connect / Retrieve list, kept open for reading. */
.steps { list-style: none; margin: 0 0 1.5em; padding: 0; border-top: 1px solid var(--rule); }
.steps li { padding: 26px 0 24px; border-bottom: 1px solid var(--rule); }
.steps h3 {
  display: flex; align-items: baseline; gap: 20px;
  margin: 0 0 10px;
  color: var(--ink);
  font: 700 clamp(1.2rem, 2.2vw, 1.5rem)/1.25 "Syne", sans-serif;
  letter-spacing: -0.02em;
}
.steps h3 .mono { flex-shrink: 0; width: 22px; color: var(--sage); font-size: 12px; letter-spacing: 0.08em; }
.steps p { margin: 0; padding-left: 42px; }

/* The issue's single instruction, inverted to graphite so it is the one thing you remember. */
.action {
  margin: clamp(48px, 7vw, 80px) 0 0;
  padding: clamp(28px, 5vw, 48px);
  background: var(--graphite);
  color: var(--text);
  border-radius: 12px;
  box-shadow: 0 24px 48px -24px rgba(14, 17, 23, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.action .mono { margin: 0 0 14px; color: var(--accent); }
.action h2 { margin: 0 0 16px; color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); }
.action p:last-child { margin: 0; font-size: 1.08em; line-height: 1.7; }

/* Author sign-off closing the letter */
.signoff {
  display: flex; align-items: flex-start; gap: 20px;
  margin: clamp(40px, 6vw, 64px) 0 0; padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.signoff img { width: 72px; height: 72px; flex-shrink: 0; border-radius: 12px; object-fit: cover; }
.signoff .mono { margin: 0 0 6px; color: var(--sage); }
.prose .signoff h2 { margin: 0 0 10px; font-size: 1.5rem; letter-spacing: -0.03em; }
.signoff p:last-child { margin: 0; font-size: 0.98rem; line-height: 1.65; }
@media (max-width: 479px) { .signoff { flex-direction: column; gap: 16px; } }

/* Archive list */
.issues { list-style: none; margin: 0 auto; padding: 0; max-width: 1040px; border-top: 1px solid var(--rule); }
.issues a {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: clamp(20px, 4vw, 56px); align-items: center;
  padding: clamp(28px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink); text-decoration: none;
}
.issues .mono { margin: 0 0 14px; color: var(--sage); }
.issues h2 { margin: 0 0 14px; font: 800 clamp(1.6rem, 3.2vw, 2.4rem)/1.04 "Syne", sans-serif; letter-spacing: -0.045em; text-wrap: balance; }
.issues .sub { margin: 0 0 18px; color: var(--ink-body); font-size: 1.05rem; line-height: 1.55; max-width: 40ch; }
.issues .read { display: inline-flex; align-items: center; min-height: 44px; border-bottom: 1px solid var(--ink); font-weight: 700; }
.issues .thumb { overflow: hidden; border-radius: 4px; aspect-ratio: 16 / 10; }
.issues .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.issues a:hover .thumb img { transform: scale(1.03); }
.issues a:hover h2 { color: var(--sage); }
@media (max-width: 720px) {
  .issues a { grid-template-columns: 1fr; }
  .issues .thumb { order: -1; }
}

/* Footer: graphite, with the dispatch's legal notice */
.site-footer { padding: clamp(48px, 7vw, 72px) var(--gutter); border-top: 1px solid var(--line-dark); }
.site-footer .inner { max-width: 1240px; margin: 0 auto; display: grid; gap: 28px; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.foot-brand { margin: 0; color: #fff; font: 800 1.6rem/1 "Syne", sans-serif; letter-spacing: -0.03em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 28px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: #CBD5E1; text-decoration: none; font-size: 11px; transition: color 0.2s ease; }
.foot-links a:hover { color: var(--accent); }
.legal { padding-top: 24px; border-top: 1px solid var(--line-dark); color: var(--muted); font-size: 13px; line-height: 1.7; }
.legal p { margin: 0; }
.legal strong { color: var(--text); font-weight: 600; }

@media (max-width: 479px) {
  .brand-name { font-size: 1.05rem; }
  .brand img { width: 30px; height: 30px; }
  .cta { padding: 10px 14px; font-size: 0.72rem; }
  .steps h3 { gap: 14px; }
  .steps p { padding-left: 36px; }
}

@media (max-width: 389px) {
  .site-header { padding-left: 14px; padding-right: 14px; }
  .site-header .bar { gap: 10px; }
  .brand { gap: 9px; }
  .brand img { width: 26px; height: 26px; }
  .brand-name { font-size: 0.92rem; }
  .brand-sub { font-size: 9px; letter-spacing: 0.12em; }
  .cta { padding: 10px 11px; font-size: 0.66rem; letter-spacing: 0.02em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
