/* Morning Rounds — the whole stylesheet. No build step, no framework.
   The serif/navy typography matches the email so the site and the briefing
   read as one thing. Dark mode is honored because half of these page views
   happen at 5:50am. */

:root {
  --navy: #1d3d63;
  --navy-deep: #16304e;
  --gold: #b08a3e;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --rule: #e5e7eb;
  --bg: #f7f8fa;
  --card: #ffffff;
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy: #8ab4e8;
    --navy-deep: #0e1621;
    --gold: #d4ab5f;
    --ink: #e8eaed;
    --muted: #9aa3af;
    --rule: #2a3341;
    --bg: #11161d;
    --card: #171d26;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* --- chrome --------------------------------------------------------------- */

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: var(--navy-deep);
  color: #fff;
  flex-wrap: wrap;
}
header.site .brand {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
header.site nav { display: flex; gap: 18px; }
header.site nav a {
  color: rgba(255, 255, 255, .88);
  text-decoration: none;
  font-size: 14px;
}
header.site nav a:hover { color: #fff; text-decoration: underline; }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 34px 22px 60px;
}

footer.site {
  border-top: 1px solid var(--rule);
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* --- type ---------------------------------------------------------------- */

h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.16;
  color: var(--ink);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
h2 {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--navy);
  margin: 44px 0 16px;
}
h3 {
  font-family: var(--serif);
  font-size: 17px;
  margin: 0 0 6px;
  color: var(--ink);
}
p { line-height: 1.62; }

.kicker {
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 12px;
}
.lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 22px;
}
.fine { font-size: 13px; color: var(--muted); line-height: 1.6; }
.flash {
  background: #e8f5ee;
  border: 1px solid #bfe3ce;
  color: #17603c;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin: 0 0 18px;
}
@media (prefers-color-scheme: dark) {
  .flash { background: #14301f; border-color: #24523a; color: #8fd5aa; }
}

/* --- hero ---------------------------------------------------------------- */

.hero { padding: 10px 0 6px; }

/* --- section cards ------------------------------------------------------- */

.cards {
  list-style: none;
  counter-reset: card;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.cards li {
  counter-increment: card;
  position: relative;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px 18px 16px 54px;
}
.cards li::before {
  content: counter(card);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
@media (prefers-color-scheme: dark) {
  .cards li::before { color: var(--navy-deep); }
}
.cards p { margin: 0; font-size: 14.5px; color: var(--muted); }
.cards li.featured { border-color: var(--gold); border-left-width: 3px; }
.cards li.optional { border-style: dashed; }
.tag {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: 2px;
  font-weight: 700;
}

/* --- forms --------------------------------------------------------------- */

.signup, .prefs {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 20px;
  display: grid;
  gap: 14px;
}
.field { display: grid; gap: 6px; }
.field > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.field > span em {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}
.field input {
  font: inherit;
  font-size: 16px; /* 16px keeps iOS Safari from zooming on focus */
  padding: 11px 13px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  width: 100%;
}
.field input:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
  border-color: var(--navy);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14.5px;
  line-height: 1.5;
}
.check input { width: 18px; height: 18px; margin-top: 2px; }
.check em {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* Honeypot — off-screen rather than display:none, which some bots detect. */
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 12px 22px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
@media (prefers-color-scheme: dark) {
  .btn { color: var(--navy-deep); }
}
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--rule);
  font-weight: 600;
}
.btn.ghost:hover { color: #c0392b; border-color: #c0392b; filter: none; }

form.danger { margin-top: 24px; }

/* --- archive ------------------------------------------------------------- */

.archive-head { margin-bottom: 8px; }
.archive-head h1 { margin-bottom: 12px; }

/* Standfirst rule, the way a periodical would set it. */
.archive-head .stat {
  font-size: 13.5px;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 12px;
  margin: 18px 0 0;
}
.archive-head .stat b { color: var(--ink); font-size: 15px; }
.archive-head .stat a { color: var(--navy); }

.month { margin-top: 30px; }
.month-label {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.archive { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  /* The gold edge is the same accent the vignette box uses inside an issue, so
     a card reads as a smaller version of the thing it links to. */
  border-left: 3px solid transparent;
  transition: border-color .14s ease, transform .14s ease, box-shadow .14s ease;
}
.card:hover {
  border-left-color: var(--gold);
  transform: translateX(2px);
  box-shadow: 0 4px 16px rgba(16, 28, 48, .07);
}
@media (prefers-color-scheme: dark) {
  .card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .35); }
}
.card:focus-within {
  border-left-color: var(--gold);
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.card-link { display: block; padding: 15px 18px; text-decoration: none; }
.card-link:focus-visible { outline: none; } /* the card itself shows the ring */

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}
.no {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.when {
  font-size: 11.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.card-title {
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.32;
  color: var(--navy);
  margin: 0 0 9px;
}
.card:hover .card-title { text-decoration: underline; text-underline-offset: 2px; }

.card-row {
  display: flex;
  gap: 9px;
  align-items: baseline;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 4px;
}
.card-row:last-child { margin-bottom: 0; }
.lbl {
  flex: none;
  width: 40px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .75;
  padding-top: 2px;
}
.modality {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 5px;
  white-space: nowrap;
  vertical-align: 1px;
}

/* Narrow screens stack the label above its line. Deliberately `block` and not
   `grid`: as a grid item the modality chip becomes a stretched full-width pill
   instead of sitting inline after the pearl title. */
@media (max-width: 460px) {
  .card-row { display: block; }
  .lbl { display: block; width: auto; padding-top: 0; margin-bottom: 1px; }
  .card-title { font-size: 16.5px; }
}

/* --- a rendered issue ---------------------------------------------------- */

.issue h2 {
  font-size: 19px;
  margin: 30px 0 12px;
}
.issue p { font-family: var(--serif); font-size: 16.5px; }
.issue a { color: var(--navy); }
.backlink { margin-top: 40px; font-size: 14px; }
.backlink a { color: var(--navy); }

/* Inline styles inside a rendered issue carry hardcoded light-mode colors so
   the email and the archive page match. Neutralize them in dark mode so the
   text stays legible. */
@media (prefers-color-scheme: dark) {
  .issue [style*="color:#1a1a1a"] { color: var(--ink) !important; }
  .issue [style*="color:#1d3d63"] { color: var(--navy) !important; }
  .issue [style*="background:#f6f8fb"] { background: #1b2431 !important; }
  .issue [style*="background:#fbf8f2"] { background: #241f16 !important; }
}
