/* ============================================================
   The Protocol — public site
   Newspaper-style stylesheet. No JS dependencies.
   ============================================================ */

:root {
  --bg: #fbf8f1;
  --ink: #121212;
  --ink-soft: #3a3a36;
  --ink-mute: #6b6660;
  --rule: #c8c2b3;
  --rule-soft: #e3decf;
  --accent: #a8202b;
  --max: 1200px;
  --read: 680px;
  --font-display: "Playfair Display", "Times New Roman", Georgia, serif;
  --font-body: "Lora", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--bg);
  z-index: 100;
}

/* ============================================================
   Masthead
   ============================================================ */
.masthead {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}

.masthead-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 0.6rem;
  margin-bottom: 1.2rem;
}

.masthead-nav a { margin-left: 1.2rem; }
.masthead-nav a:first-child { margin-left: 0; }

.masthead-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(2.75rem, 7vw, 5rem);
  line-height: 0.95;
  margin: 0.25rem 0 0.4rem;
  letter-spacing: -0.01em;
}
.masthead-title a { color: var(--ink); }
.masthead-title a:hover { text-decoration: none; }

.masthead-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 36rem;
  margin: 0 auto 1rem;
  line-height: 1.45;
}

.issue-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 0.55rem 0.5rem;
  margin-top: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.issue-sep { color: var(--ink-mute); }
.issue-archived { color: var(--accent); font-weight: 600; }

/* ============================================================
   Page container
   ============================================================ */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ============================================================
   Contents index — thin top-of-issue strip (NYT "Inside Today's Times")
   ============================================================ */
.contents-index {
  margin: 0 0 2.75rem;
  padding: 0.5rem 0 0.65rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.contents-title {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-mute);
  margin: 0 0 0.45rem;
}
.contents-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.1rem;
  padding: 0.35rem 0;
  border-top: 1px solid var(--rule-soft);
}
.contents-group:first-of-type { border-top: none; padding-top: 0; }
@media (min-width: 720px) {
  .contents-group {
    grid-template-columns: 5.5rem 1fr;
    align-items: baseline;
    gap: 0 1.25rem;
  }
}
.contents-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin: 0;
}
.contents-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contents-list li {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.3;
  padding: 0.14rem 0;
  border: none;
}
.contents-list a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
}
.contents-list a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* ============================================================
   Eyebrows / section headers
   ============================================================ */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.65rem;
  font-weight: 600;
}

.section {
  margin-top: 3.5rem;
  padding-top: 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  border-top: 2px solid var(--ink);
  padding-top: 0.6rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  margin: 0;
  text-transform: uppercase;
}

/* ============================================================
   Lead article (homepage) — full-width, matches featured/briefs layout
   ============================================================ */
.lead-article {
  margin: 0 0 1rem;
  text-align: left;
}

.lead-headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.005em;
  margin: 0 0 1rem;
  color: var(--ink);
}

.lead-deck {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.lead-deck p { margin: 0; }
.article-detail-deck p { margin: 0; }

.lead-body { font-size: 1.125rem; line-height: 1.75; }

/* Drop cap on first paragraph of the lead */
.has-dropcap > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 900;
  float: left;
  font-size: 4.6rem;
  line-height: 0.85;
  padding: 0.35rem 0.6rem 0 0;
  color: var(--ink);
}

/* ============================================================
   Article body (generic)
   ============================================================ */
.article-body p { margin: 0 0 1rem; }
.article-body p:last-child { margin-bottom: 0; }
.article-body a {
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.article-body a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}
.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 1.6rem 0 0.6rem;
}
.article-body h1 { font-size: 1.4rem; }
.article-body h2 { font-size: 1.25rem; }
.article-body h3 { font-size: 1.1rem; }
.article-body h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.article-body ul, .article-body ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.article-body li { margin-bottom: 0.35rem; }
.article-body blockquote {
  border-left: 3px solid var(--rule);
  margin: 1rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  color: var(--ink-soft);
  font-style: italic;
}
.article-body code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.92em;
  background: var(--rule-soft);
  padding: 0.05em 0.3em;
  border-radius: 2px;
}
.article-body em { font-style: italic; }
.article-body strong { font-weight: 600; }

/* ============================================================
   Featured grid
   ============================================================ */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 2.25rem;
}

@media (min-width: 720px) {
  .featured-grid { grid-template-columns: 1fr 1fr; }
}

.featured-article {
  border-top: 1px solid var(--rule);
  padding-top: 1.1rem;
}

.featured-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.18;
  margin: 0 0 0.8rem;
  letter-spacing: -0.005em;
}

.featured-article .article-body { font-size: 1rem; line-height: 1.6; }

/* ============================================================
   Briefs — full-bleed 2-column grid on desktop so eye-track is
   short while the section stays anchored wide.
   ============================================================ */
.briefs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 2.5rem;
}
@media (min-width: 720px) {
  .briefs-list { grid-template-columns: 1fr 1fr; }
}

.brief-item {
  border-top: 1px solid var(--ink);
  padding: 1.1rem 0 1rem;
}
/* Top row gets no border (the section-header rule above anchors it).
   On mobile that's just the first item; on desktop it's the first two. */
.brief-item:first-child { border-top: none; padding-top: 0; }
@media (min-width: 720px) {
  .brief-item:nth-child(2) { border-top: none; padding-top: 0; }
}

.brief-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.brief-body {
  font-size: 0.97rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.brief-body p { margin: 0 0 0.5rem; }
.brief-body p:last-child { margin-bottom: 0; }
.brief-body a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.brief-body a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* ============================================================
   Mentions
   ============================================================ */
.mentions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--ink-soft);
  columns: 1;
  column-gap: 2rem;
}
@media (min-width: 720px) { .mentions-list { columns: 2; } }
.mentions-list li {
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--rule);
  break-inside: avoid;
}

/* ============================================================
   Issue navigation (more issues / archive)
   ============================================================ */
.issue-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.issue-nav-list a {
  display: block;
  border: 1px solid var(--rule);
  padding: 0.9rem 1rem;
  background: #fff;
}
.issue-nav-list a:hover { border-color: var(--ink); text-decoration: none; }
.issue-nav-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.issue-nav-date {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 0.25rem;
}

.see-all {
  margin-top: 1rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
}

/* ============================================================
   Archive page
   ============================================================ */
.archive { max-width: var(--read); margin: 0 auto; }
.archive-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.5rem;
  margin: 0 0 1.5rem;
}
.archive-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.archive-item a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.archive-item a:hover { background: var(--rule-soft); text-decoration: none; }
.archive-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}
.archive-date {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ============================================================
   Tag chips (audience tags on articles)
   ============================================================ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  list-style: none;
  padding: 0;
}
.tag-chip {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  white-space: nowrap;
}
.tag-list-compact {
  margin-bottom: 0.7rem;
  gap: 0.3rem;
}
.tag-list-compact .tag-chip {
  font-size: 0.62rem;
  padding: 0.14rem 0.5rem;
  letter-spacing: 0.08em;
}

/* ============================================================
   Read-more links (issue page)
   ============================================================ */
.read-more {
  margin: 0.85rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.read-more a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}
.read-more a:hover { color: var(--ink); border-bottom-color: var(--ink); text-decoration: none; }

.lead-article .lead-headline a,
.featured-article .featured-headline a {
  color: inherit;
  border: none;
}
.lead-article .lead-headline a:hover,
.featured-article .featured-headline a:hover {
  color: var(--accent);
  text-decoration: none;
}

.lead-teaser { font-size: 1.15rem; line-height: 1.6; }
.featured-teaser { font-size: 1rem; line-height: 1.55; }

/* ============================================================
   Article detail page
   ============================================================ */
.article-detail {
  max-width: var(--read);
  margin: 0 auto;
}

.article-back {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 1.5rem;
}
.article-back a { border: none; }
.article-back a:hover { color: var(--accent); text-decoration: none; }
.article-back-bottom { margin: 3rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--rule); }

.article-detail-header { margin-bottom: 1.5rem; }

.article-detail-headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.85rem, 4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0 0 1rem;
}

.article-detail-deck {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.article-detail-body { font-size: 1.125rem; line-height: 1.75; }

.issue-section { color: var(--ink); font-weight: 600; }

/* ============================================================
   Sources section
   ============================================================ */
.sources {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--ink);
}
.sources-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.sources-list {
  list-style: none;
  counter-reset: src;
  padding: 0;
  margin: 0;
}
.source-item {
  counter-increment: src;
  padding: 0.65rem 0 0.65rem 1.6rem;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
  font-size: 0.96rem;
  line-height: 1.45;
}
.source-item::before {
  content: counter(src) ".";
  position: absolute;
  left: 0;
  top: 0.65rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink-mute);
  width: 1.4rem;
}
.source-name {
  display: inline;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 0.5rem;
}
.source-link {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.source-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}
.source-date {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink-mute);
  margin-left: 0.4rem;
  white-space: nowrap;
}

/* ============================================================
   About page
   ============================================================ */
.about-page { max-width: var(--read); margin: 0 auto; }
.about-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.5rem;
  margin: 0 0 1.5rem;
}
.about-body p { font-size: 1.075rem; line-height: 1.7; }

/* ============================================================
   Empty / error states
   ============================================================ */
.empty-state {
  max-width: 36rem;
  margin: 4rem auto;
  text-align: center;
}
.empty-state h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  margin: 0 0 1rem;
}
.empty-note { color: var(--ink-mute); font-style: italic; }

/* ============================================================
   Footer
   ============================================================ */
.page-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}
.page-footer p { margin: 0.3rem 0; }
.footer-note { font-style: italic; }

/* ============================================================
   Print-friendly tweaks
   ============================================================ */
@media print {
  body { background: #fff; }
  .masthead-top, .issue-nav-section, .page-footer { display: none; }
  a { color: #000; text-decoration: none; border: none; }
}
