/*
  Typography and measure follow the New York Times article page.
  Palette and accents follow boston.com (--c-red #bb2525 is their brand red).
*/
:root {
  /* NYT falls back to Georgia for both Cheltenham and Imperial. */
  --f-display: "nyt-cheltenham", Georgia, "Times New Roman", Times, serif;
  --f-serif: "nyt-imperial", Georgia, "Times New Roman", Times, serif;
  --f-sans: "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --c-red: #bb2525;
  --c-red-light: #ffe6e6;
  --c-black: #121212;
  --c-body: #333333;
  --c-dark-gray: #68686d;
  --c-darker-gray: #767676;
  --c-line-gray: #e1e1e1;
  --c-light-gray: #f1f1f1;
  --c-off-white: #fbf1e7;
  --c-white: #ffffff;

  --measure: 600px;
  --page: 945px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--f-serif);
  background: var(--c-white);
  color: var(--c-black);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--c-line-gray);
  padding: 18px 20px 0;
}
.masthead-inner {
  max-width: var(--page);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.brand-row {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  width: 100%;
}
.brand-logo-link {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  line-height: 0;
}
.brand-logo {
  width: 52px;
  height: 52px;
  display: block;
  object-fit: contain;
}
.brand-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--c-black);
  white-space: nowrap;
}
.brand-title .dot { color: var(--c-red); }

.site-search {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
}
.site-search input {
  width: 0;
  min-width: 0;
  padding: 0;
  border: 1px solid transparent;
  background: var(--c-white);
  font-family: var(--f-sans);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: width 0.2s ease, opacity 0.15s ease, padding 0.2s ease, border-color 0.15s ease;
}
.site-search.is-open input,
.site-search:focus-within input {
  width: min(280px, 42vw);
  padding: 8px 12px;
  border-color: var(--c-line-gray);
  opacity: 1;
  pointer-events: auto;
}
.site-search input:focus {
  outline: 2px solid var(--c-red);
  outline-offset: 1px;
  border-color: var(--c-line-gray);
}
.site-search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--c-black);
  cursor: pointer;
  transition: color 0.15s ease;
}
.site-search.is-open .site-search-toggle,
.site-search:focus-within .site-search-toggle {
  color: var(--c-red);
}
.site-search-icon {
  display: block;
}

.sections-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  border-top: 1px solid var(--c-line-gray);
  width: 100%;
  justify-content: center;
  padding: 9px 0 12px;
}
.sections-nav a {
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-black);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.sections-nav a:hover,
.sections-nav a.active {
  color: var(--c-red);
  border-bottom-color: var(--c-red);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

main { max-width: var(--page); margin: 0 auto; padding: 34px 20px 72px; }

footer {
  border-top: 1px solid var(--c-line-gray);
  font-family: var(--f-sans);
  font-size: 12px;
  color: var(--c-darker-gray);
  padding: 20px;
  text-align: center;
}

/* ---------- shared labels ---------- */

.kicker {
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-red);
  margin: 0 0 12px;
}

.meta {
  font-family: var(--f-sans);
  font-size: 12px;
  color: var(--c-darker-gray);
}

.empty { color: var(--c-dark-gray); font-family: var(--f-sans); font-size: 15px; }
.muted { color: var(--c-dark-gray); font-family: var(--f-sans); font-size: 14px; }

/* ---------- article ---------- */

.story { max-width: var(--measure); margin: 0 auto; }

.story h1 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: var(--c-black);
}

.story .dek {
  font-family: var(--f-serif);
  font-size: 20px;
  line-height: 1.4;
  color: #363636;
  margin: 0 0 20px;
}

.byline {
  font-family: var(--f-sans);
  border-top: 1px solid var(--c-line-gray);
  border-bottom: 1px solid var(--c-line-gray);
  padding: 12px 0;
  margin: 0 0 24px;
}
.byline .author {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-black);
}
.byline .stamp {
  display: block;
  font-size: 12px;
  color: var(--c-darker-gray);
  margin-top: 3px;
}

.lead { margin: 0 0 22px; }
.lead img { width: 100%; height: auto; display: block; background: var(--c-light-gray); }
.lead figcaption {
  font-family: var(--f-sans);
  font-size: 12px;
  color: var(--c-darker-gray);
  margin: 8px 0 0;
}

/* Body copy is the unclassed paragraphs the drafter emits. Scoping by
   :not([class]) keeps .kicker, .dek, and .source from being overridden. */
.story > p:not([class]), .preview > p:not([class]) {
  font-family: var(--f-serif);
  font-size: 20px;
  line-height: 1.55;
  color: var(--c-body);
  margin: 0 0 22px;
}

.story > p:not([class]) a, .preview > p:not([class]) a {
  color: var(--c-red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.story > p:not([class]) a:hover,
.preview > p:not([class]) a:hover { background: var(--c-red-light); }

.story blockquote {
  margin: 28px 0;
  padding-left: 18px;
  border-left: 3px solid var(--c-red);
  font-family: var(--f-display);
  font-size: 22px;
  line-height: 1.35;
}

.embed { position: relative; padding-top: 56.25%; margin: 8px 0 16px; background: var(--c-light-gray); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.source {
  font-family: var(--f-sans);
  font-size: 13px;
  color: var(--c-dark-gray);
  border-top: 1px solid var(--c-line-gray);
  margin-top: 34px;
  padding-top: 16px;
}
.source a { color: var(--c-red); text-decoration: underline; text-underline-offset: 3px; }

.sources-hed {
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-black);
  margin: 32px 0 10px;
}
.sources { margin: 0; padding-left: 18px; font-family: var(--f-sans); font-size: 14px; line-height: 1.5; }
.sources li { margin: 0 0 7px; }
.sources a { color: var(--c-red); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- section front ---------- */

.hero { max-width: var(--measure); margin: 0 auto 8px; }
.hero h1 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 10px;
}
.hero .lede {
  font-family: var(--f-serif);
  font-size: 18px;
  line-height: 1.45;
  color: #363636;
  margin: 0;
}

.front-section { max-width: var(--measure); margin: 28px auto 0; }
.front-section h2 {
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-red);
  margin: 0;
}
.front-section h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }

.story-list, .queue { list-style: none; padding: 0; margin: 0 auto; max-width: var(--measure); }
.story-list li, .queue li { border-top: 1px solid var(--c-line-gray); padding: 20px 0; }
.story-list li:last-child, .queue li:last-child { border-bottom: 1px solid var(--c-line-gray); }
.story-list a { display: grid; gap: 8px; }
.story-list .thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--c-light-gray);
  margin: 0 0 4px;
}
.story-list .meta {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-red);
}
.story-list strong {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.22;
  color: var(--c-black);
}
.story-list a:hover strong { color: var(--c-red); }
.story-list .dek {
  font-family: var(--f-serif);
  font-size: 16px;
  line-height: 1.45;
  color: var(--c-dark-gray);
}

/* ---------- desk ---------- */

.preview { max-width: var(--measure); margin: 0 auto; }
.preview h2 { font-size: 32px; line-height: 1.18; margin: 0 0 12px; }
.preview .dek { font-family: var(--f-serif); font-size: 19px; line-height: 1.4; color: #363636; margin: 0 0 14px; }
.toolbar { display: flex; gap: 8px; margin: 14px auto; max-width: var(--measure); }
input, button { font-family: var(--f-sans); font-size: 14px; padding: 9px 14px; border: 1px solid var(--c-line-gray); background: var(--c-white); }
button { cursor: pointer; background: var(--c-black); color: var(--c-white); border-color: var(--c-black); font-weight: 600; }
button:hover { background: var(--c-red); border-color: var(--c-red); }
button.danger { background: var(--c-white); color: var(--c-red); border-color: var(--c-red); }
button.danger:hover { background: var(--c-red); color: var(--c-white); }

.site-search-toggle,
.site-search-toggle:hover {
  background: transparent;
  border: none;
  padding: 0;
  font-weight: 400;
  color: var(--c-black);
}
.site-search-toggle:hover,
.site-search.is-open .site-search-toggle,
.site-search:focus-within .site-search-toggle {
  color: var(--c-red);
}

h2 { font-family: var(--f-display); font-size: 22px; margin: 30px 0 12px; }
/* Desk headings and status lines sit outside .story, so centre them on the
   same measure as the queue lists below them. */
main > h2, main > p { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.transcript { white-space: pre-wrap; font-family: var(--f-sans); font-size: 13px; color: var(--c-dark-gray); }
details { max-width: var(--measure); margin: 0 auto; }
summary { font-family: var(--f-sans); font-size: 13px; cursor: pointer; }

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  .brand a { font-size: 22px; }
  .story h1 { font-size: 30px; }
  .story p { font-size: 18px; }
  .story .dek { font-size: 18px; }
  main { padding: 24px 18px 56px; }
}
