/* ════════════════════════════════════════════════════════════════════
   TNAADO retention components — newsletter signup + "Most read" rail +
   author pages. Shared across dispatch.html, index.html, show.html and
   author.html. Dark surface, TNAADO red (#c8102e), Fraunces/IBM Plex type
   to match the existing newsroom chrome.
   ════════════════════════════════════════════════════════════════════ */

:root {
  --tn-red: #c8102e;
  --tn-red-bright: #ff4468;
  /* --tn-red is 3.3-3.4:1 on this file's dark surfaces, which fails the 4.5:1
     small text needs (eyebrows, trend rank, byline). Same lifted hue as
     base/variables.css's --red-text and chrome.css's --tnc-red-text so every
     small red label site-wide matches. */
  --tn-red-text: #e8455a;
}

/* ── Newsletter signup ───────────────────────────────────────────── */
.tn-nl {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px 48px;
  align-items: center;
  max-width: 1040px;
  margin: 0 auto;
  padding: 38px clamp(20px, 5vw, 48px);
  background: linear-gradient(135deg, #121212 0%, #0c0c0c 100%);
  border: 1px solid rgba(200, 16, 46, 0.28);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.tn-nl::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--tn-red), var(--tn-red-bright));
}
.tn-nl-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tn-red-text);
}
.tn-nl-rule { display: inline-block; width: 28px; height: 1px; background: var(--tn-red); }
.tn-nl-heading {
  margin: 0 0 10px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  line-height: 1.15;
  color: #f5f5f5;
}
.tn-nl-sub {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #9a9a9a;
}
.tn-nl-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.tn-nl-srlabel {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.tn-nl-input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 13px 15px;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  color: #f5f5f5;
  background: #060606;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  transition: border-color 0.18s ease;
}
.tn-nl-input::placeholder { color: #666; }
.tn-nl-input:focus { outline: none; border-color: var(--tn-red); }
.tn-nl-btn {
  flex: 0 0 auto;
  padding: 13px 24px;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--tn-red);
  border: 1px solid var(--tn-red);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.1s ease;
}
.tn-nl-btn:hover { background: #a40d26; }
.tn-nl-btn:active { transform: translateY(1px); }
.tn-nl-btn:disabled { opacity: 0.6; cursor: default; }
.tn-nl-msg {
  flex: 1 0 100%;
  margin: 4px 0 0;
  min-height: 1.1em;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.85rem;
  color: #9a9a9a;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.tn-nl-msg.is-visible { opacity: 1; }
.tn-nl-msg.is-success { color: #7bd88f; }
.tn-nl-msg.is-error { color: var(--tn-red-bright); }

@media (max-width: 760px) {
  .tn-nl { grid-template-columns: 1fr; gap: 22px; }
}

/* ── "Most read" trending rail ───────────────────────────────────── */
.tn-trend {
  background: #0c0c0c;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 22px 24px;
}
.tn-trend-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tn-red-text);
}
.tn-trend-rule { display: inline-block; width: 28px; height: 1px; background: var(--tn-red); }
.tn-trend-list { list-style: none; margin: 0; padding: 0; }
.tn-trend-item { border-top: 1px solid #1a1a1a; }
.tn-trend-item:first-child { border-top: 0; }
.tn-trend-link {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.tn-trend-link:hover { opacity: 0.78; }
.tn-trend-rank {
  flex: 0 0 auto;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
  color: var(--tn-red-text);
  min-width: 1.1ch;
}
.tn-trend-body { display: flex; flex-direction: column; gap: 4px; }
.tn-trend-cat {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7a7a7a;
}
.tn-trend-title {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #ededed;
}

/* ── Author page ─────────────────────────────────────────────────── */
.tn-author-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) clamp(18px, 5vw, 40px);
}
.tn-author-head {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  border-bottom: 1px solid #1f1f1f;
  padding-bottom: 28px;
  margin-bottom: 32px;
}
.tn-author-head-text { flex: 1; min-width: 0; }
/* Circular, no corners — same convention as team.html/tnaado.com's cards.
   Most contributors have no avatar (authors.json avatar: null); the <img>
   is simply absent then, so .tn-author-head-text alone fills the row. */
.tn-author-avatar {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: #141414;
  border: 1px solid #262626;
}
@media (max-width: 480px) {
  .tn-author-avatar { width: 60px; height: 60px; }
}
.tn-author-eyebrow {
  margin: 0 0 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tn-red-text);
}
.tn-author-name {
  margin: 0 0 12px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.05;
  color: #f5f5f5;
}
.tn-author-bio {
  margin: 0;
  max-width: 64ch;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #a8a8a8;
}
.tn-author-count {
  margin: 16px 0 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: #6f6f6f;
}
/* "Covers: Downtown Core · Also covers: Liberty Village" — additive, sits
   between the bio and the story count; same mono/muted treatment as
   .tn-author-count so it reads as a secondary metadata line, not a heading.
   Renders nothing (coverageHTML returns '') when the journalist has no area. */
.tn-author-covers {
  margin: 10px 0 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: #8a8a8a;
}
.tn-author-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tn-author-row { border-top: 1px solid #1a1a1a; }
.tn-author-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 18px 0;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.tn-author-link:hover { opacity: 0.8; }
.tn-author-date {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  color: #6f6f6f;
  white-space: nowrap;
}
.tn-author-row-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.3;
  color: #ededed;
}
.tn-author-row-cat {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tn-red-text);
  white-space: nowrap;
}
.tn-author-empty {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 1rem;
  color: #8a8a8a;
  padding: 24px 0;
}
.tn-author-back {
  display: inline-block;
  margin-top: 36px;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--tn-red-text);
  text-decoration: none;
}
.tn-author-back:hover { text-decoration: underline; }

@media (max-width: 620px) {
  .tn-author-link { grid-template-columns: 1fr; gap: 6px; }
  .tn-author-row-cat { justify-self: start; }
}

/* Byline author links inside articles inherit the editorial look. */
.dx-byline-row .is-author a,
a.tn-author-byline {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 16, 46, 0.5);
}
.dx-byline-row .is-author a:hover,
a.tn-author-byline:hover { color: var(--tn-red-text); }
