/* The Coin Daily — editorial styling
   Cream-on-white "newsprint" aesthetic that mirrors the newsletter
   email template. Brand red #CF2224 used as the single accent across
   nav CTA, headlines, links-on-hover, and section meta labels.

   Visual model:
     - Page background: newsprint cream (#FCF1E6).
     - Content sits in white cards on the cream page (article, page,
       author, homepage hero).
     - Section meta labels: small-caps red, letter-spacing 0.08em —
       same pattern as "ALSO IN TODAY'S DIGEST" in the email.
     - Headlines: serif (Georgia), with a 3px × 60px red rule below
       on hero / article-page H1s — same brand mark as the email.
     - Article page: two-column above 1024px (body + "Also in today's
       digest" sidebar). Stacks below.
*/

:root {
  /* Palette — kept in lockstep with the colour palette in
     email_template.html so the brand reads identically across
     surfaces. */
  --c-page:        #FCF1E6;   /* newsprint cream — body background */
  --c-card:        #FFFFFF;   /* content cards */
  --c-fg:          #15171A;
  --c-muted:       #5B6470;
  --c-rule:        #E6E9EF;   /* light dividers inside cards */
  --c-rule-strong: #1A1A1A;   /* near-black rule above "Also in..." */
  --c-accent:      #CF2224;   /* brand red */
  --c-accent-dark: #B71D1F;   /* hover */
  --c-banner-bg:     #FFF8F1; /* AI-disclosure banner */
  --c-banner-border: #FFD9B8;

  --f-serif: Georgia, "Times New Roman", "DejaVu Serif", serif;
  --f-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --w-content: 720px;   /* main column width inside cards */
  --w-side:    280px;   /* article-page sidebar */
  --w-wide:    1180px;  /* outer container */

  --shadow-card: 0 1px 2px rgba(20, 22, 30, 0.04), 0 4px 12px rgba(20, 22, 30, 0.04);
  --radius-card: 8px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--c-fg);
  background: var(--c-page);
}

a { color: var(--c-accent); text-decoration: none; }
a:hover { color: var(--c-accent-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--w-wide); margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--c-muted); }
.small { font-size: 0.875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

ul.bare { list-style: none; padding: 0; margin: 0; }
ul.bare li { margin: 0.25rem 0; }

/* Reusable: section meta label — red small-caps with wide tracking.
   Mirrors the "THE SHOW" / "ALSO IN TODAY'S DIGEST" / "INTERACTIVE"
   label pattern used throughout the email. Apply with the .eyebrow
   class on a <p> or <span>. */
.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--c-accent);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}
.eyebrow a { color: inherit; }
.eyebrow a:hover { color: var(--c-accent-dark); }

/* Reusable: 3px × 60px red rule under headlines (matches the email's
   hero card). Place a <div class="brand-rule"></div> directly under
   an H1 to apply. */
.brand-rule {
  height: 3px;
  width: 60px;
  background: var(--c-accent);
  margin: 0.75rem 0 1rem;
  border-radius: 2px;
}

/* Reusable: dateline — uppercase muted small-caps. Same treatment as
   "TUESDAY, 5 MAY 2026" in the hero card of the email. */
.dateline {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

/* ---------------- Markets price strip ---------------- */
/* Top-of-page strip with live BTC/ETH/SOL/XRP/ADA prices. Sits above
   the site header. Quiet visual treatment — meant to be noticed but
   not distract from editorial. Fed at build time from ClickHouse. */

.markets-strip {
  background: var(--c-card);
  border-bottom: 1px solid var(--c-rule);
  font-size: 0.78rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.markets-strip-inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  white-space: nowrap;
}
.market-tick {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}
.market-tick-symbol {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--c-fg);
}
.market-tick-price {
  font-variant-numeric: tabular-nums;
  color: var(--c-fg);
}
.market-tick-change {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.market-tick-change--up   { color: #0c8a3d; }     /* green */
.market-tick-change--down { color: var(--c-accent); }  /* brand red */

@media (max-width: 720px) {
  .markets-strip-inner { gap: 1rem; padding: 0.45rem 1rem; }
  .markets-strip { font-size: 0.72rem; }
}

/* ---------------- Header ---------------- */

.site-header {
  background: var(--c-page);
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--c-fg);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--c-fg); text-decoration: none; }
.brand-name {
  font-family: var(--f-serif);
  font-size: 1.375rem;
  letter-spacing: 0.04em;
}

.primary-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}
.primary-nav a {
  color: var(--c-fg);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.primary-nav a:hover { color: var(--c-accent); text-decoration: none; }

/* Header "Newsletter" CTA — pill, brand red. */
.primary-nav a.nav-cta {
  background: var(--c-accent);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-weight: 600;
}
.primary-nav a.nav-cta:hover {
  background: var(--c-accent-dark);
  color: #fff;
}

/* Header "MCP for AI Agents" CTA — pill, black, distinguishes the
   developer/agent surface from the reader-facing Newsletter CTA. Same
   pill geometry as .nav-cta so the two sit visually balanced. */
.primary-nav a.nav-cta.nav-cta-dark {
  background: var(--c-fg);
  color: #fff;
}
.primary-nav a.nav-cta.nav-cta-dark:hover {
  background: #000;
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(26, 26, 26, 0.15);
  padding: 0.375rem 0.625rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.125rem;
}

@media (max-width: 720px) {
  .primary-nav { display: none; }
  .nav-toggle { display: inline-block; }
  body.nav-open .primary-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--c-page);
    padding: 1rem 1.25rem;
    border: 1px solid var(--c-rule);
    border-top: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
}

/* ---------------- Red digest ribbon ---------------- */
/* Full-width brand-red strip used at the top of section pages and
   above the homepage hero — same shape as the "Daily News Digest —
   {date}" strip in the email. */

.digest-ribbon {
  background: var(--c-accent);
  color: #fff;
  padding: 14px 0;
  margin-bottom: 0;
}
.digest-ribbon-inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.digest-ribbon h2,
.digest-ribbon .ribbon-title {
  font-family: var(--f-serif);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}
.digest-ribbon .ribbon-meta {
  font-family: var(--f-serif);
  font-size: 0.95rem;
  color: #fff;
  opacity: 0.85;
}

/* ---------------- Masthead (homepage) ---------------- */
/* Newspaper-style identity strip above the hero. Renders only on
   the homepage. Keeps the publication's name and tagline visible
   at the top of every paid-traffic landing without taking the
   vertical space of the full brand card. */

.masthead {
  background: var(--c-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.75rem 2rem 1.5rem;
  margin: 1.5rem 0 1.5rem;
  text-align: center;
}
.masthead-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--c-accent);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
}
.masthead-title {
  font-family: var(--f-serif);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  color: var(--c-fg);
}
.masthead .brand-rule {
  margin: 0.6rem auto 0.75rem;
}
.masthead-tagline {
  font-size: 1rem;
  color: var(--c-muted);
  margin: 0;
}
.masthead-date {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 0.4em;
}

/* ---------------- Lead-story hero (homepage) ---------------- */
/* Two columns above 900px: text left, video + more-stories list
   right. Below 900px, the right column stacks on top of the text. */

.hero-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 0 0 2rem;
}
@media (min-width: 900px) {
  .hero-feature {
    grid-template-columns: 0.9fr 1.2fr;
    gap: 1.5rem;
    align-items: stretch;
  }
}

/* Text column */
.hero-feature-text {
  background: var(--c-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 2rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* On wide screens, text comes second in source order on mobile
     (because video stacks above) — fix the order for desktop so
     text reads as the left column. */
  order: 2;
}
@media (min-width: 900px) {
  .hero-feature-text { order: 0; }
}
.hero-feature-headline {
  font-family: var(--f-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0.25rem 0 0.5rem;
  font-weight: 700;
}
.hero-feature-headline a { color: var(--c-fg); text-decoration: none; }
.hero-feature-headline a:hover { color: var(--c-accent); }
.hero-feature-deck {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--c-muted);
  margin: 0.5rem 0 1rem;
}
.hero-feature-byline { margin: 0 0 1rem; }
.hero-feature-cta { margin: 0.5rem 0 0; }

/* Right column wrapper — stacks video + more-stories list */
.hero-feature-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Video — 16:9 responsive iframe */
.hero-feature-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.hero-feature-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Image fallback when no video_id */
.hero-feature-image {
  display: block;
  background: #1a1a1a;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.hero-feature-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* More-stories list below the video — fills the right column to
   approximately match the text column's height. Compact: each
   entry is a small clickable row with section/date eyebrow and a
   short serif headline. */
.hero-feature-more {
  background: var(--c-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.25rem 1.5rem;
  flex: 1;        /* take remaining vertical space */
  min-height: 0;  /* let the children control height */
}
.hero-feature-more .eyebrow {
  margin-bottom: 0.75rem;
}
.hero-feature-more-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.hero-feature-more-list li {
  padding: 0.7rem 0;
  border-top: 1px solid var(--c-rule);
}
.hero-feature-more-list li:first-child {
  padding-top: 0;
  border-top: 0;
}
.hero-feature-more-list li:last-child {
  padding-bottom: 0;
}
.hero-feature-more-list a {
  display: block;
  text-decoration: none;
  color: var(--c-fg);
}
.hero-feature-more-list a:hover h3 { color: var(--c-accent); }
.hero-feature-more-list h3 {
  font-family: var(--f-serif);
  font-size: 1rem;
  line-height: 1.3;
  margin: 0;
  font-weight: 700;
  color: var(--c-fg);
}
.hero-mini-meta {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin: 0 0 0.25rem;
}

/* ---------------- Hero (legacy class kept for any non-rotation use) -------- */

.hero {
  background: var(--c-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 2.5rem 2rem 2rem;
  margin: 1.5rem 0 2rem;
}
.hero h1 {
  font-family: var(--f-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}
.hero-tagline {
  font-size: 1.125rem;
  color: var(--c-muted);
  margin: 0 0 0.75rem;
}
.hero-disclosure {
  color: var(--c-muted);
  margin: 0;
}

/* ---------------- Section header ---------------- */

.section-header {
  background: var(--c-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 2rem;
  margin: 1.5rem 0 2rem;
}
.section-header h1 {
  font-family: var(--f-serif);
  font-size: 2.25rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}
.section-header p {
  margin: 0;
  color: var(--c-muted);
}

/* ---------------- Article grid (homepage + section pages) ---------------- */

.article-list { margin-bottom: 3rem; }

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.article-card {
  background: var(--c-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.article-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(20, 22, 30, 0.06), 0 8px 20px rgba(20, 22, 30, 0.06);
}
.article-card .card-meta {
  font-size: 0.7rem;
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin: 0 0 0.6rem;
}
.article-card .card-meta a {
  color: var(--c-accent);
  font-weight: 700;
}
.article-card .card-meta time {
  color: var(--c-muted);
  font-weight: 600;
}
.article-card h3 {
  font-family: var(--f-serif);
  font-size: 1.375rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  /* List-format digest titles can run 100+ chars (one chip per item
     in the show). Clamp the visual to 3 lines with an ellipsis so
     card heights stay uniform across the grid; the full title is
     still on the hub page itself. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.article-card h3 a { color: var(--c-fg); }
.article-card h3 a:hover { color: var(--c-accent); text-decoration: none; }
.article-card .card-deck {
  margin: 0 0 0.75rem;
  color: var(--c-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.article-card .card-byline { margin: 0; }

/* ---------------- Article page ---------------- */

/* Two-column layout above 1024px: body + "Also in today's digest" sidebar.
   Below, single column with sidebar dropping under. */
.article-layout {
  max-width: var(--w-wide);
  margin: 1.5rem auto 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 0 1.25rem;
}
@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) var(--w-side);
  }
}

.article {
  background: var(--c-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 2.5rem 2rem 2rem;
  min-width: 0;       /* allow grid child to shrink */
}
.article-header { margin-bottom: 1.5rem; }
.article-meta {
  font-size: 0.7rem;
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin: 0 0 0.75rem;
}
.article-meta a { color: var(--c-accent); font-weight: 700; }
.article-meta time { color: var(--c-muted); font-weight: 600; }
.article-meta .meta-dot { color: var(--c-muted); margin: 0 0.4em; opacity: 0.6; }
.article-header h1 {
  font-family: var(--f-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}
.article-deck {
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--c-muted);
  margin: 0 0 1rem;
}
.byline { margin: 0; font-size: 0.95rem; }

/* Compact one-line AI disclosure — sits just below the byline.
   The visible byline already discloses AI authorship (the [AI] badge
   + "AI Presenter & Author" descriptor) and the human editor; this
   line just adds the link to /ai-disclosure/ for the policy detail.
   Italic + muted to read like an editor's note, not an alert. */
.ai-disclosure-note {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--c-muted);
  margin: 0.4rem 0 1.5rem;
}
.ai-disclosure-note a { color: var(--c-accent); }

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 1.5rem 0 2rem;
  background: #000;
  border-radius: var(--radius-card);
  overflow: hidden;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.article-body {
  font-size: 1.075rem;
  line-height: 1.7;
}
.article-body h2 {
  font-family: var(--f-serif);
  font-size: 1.5rem;
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.01em;
}
.article-body h3 {
  font-family: var(--f-serif);
  font-size: 1.25rem;
  margin: 1.5rem 0 0.5rem;
}
.article-body p { margin: 0 0 1.1rem; }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body ul, .article-body ol { margin: 0 0 1.1rem 1.25rem; padding: 0; }
.article-body li { margin: 0.35rem 0; }
.article-body blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  border-left: 3px solid var(--c-accent);
  font-style: italic;
  color: var(--c-muted);
}

.sources {
  margin: 2.5rem 0 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--c-rule);
  border-bottom: 1px solid var(--c-rule);
}
.sources h2 {
  font-family: var(--f-serif);
  font-size: 1.125rem;
  margin: 0 0 0.75rem;
}
.sources ul { margin: 0; padding-left: 1.25rem; }
.sources li { margin: 0.4rem 0; font-size: 0.95rem; }

.article-footer { margin-top: 2rem; }
.disclaimer {
  background: rgba(207, 34, 36, 0.06);
  border-left: 3px solid var(--c-accent);
  padding: 0.75rem 1rem;
  border-radius: 0 6px 6px 0;
  margin: 0 0 1rem;
  color: var(--c-fg);
  line-height: 1.5;
}

/* ---------------- Digest hub layout ----------------
   The daily digest article URL is a hub: lede + axis paragraphs at the
   top, an ordered list of story-link cards, then the takeaway. Story
   bodies live on their own per-item URLs nested under the hub. */

.digest-lede {
  font-family: var(--f-serif);
  font-size: 1.2rem;
  line-height: 1.55;
  font-weight: 700;
  margin: 0 0 1.25rem;
  color: var(--c-fg);
}
.digest-lede p { margin: 0 0 1rem; }
.digest-lede p:last-child { margin-bottom: 0; }

.digest-axis {
  font-size: 1.075rem;
  line-height: 1.65;
  color: var(--c-muted);
  margin: 0 0 2rem;
  padding: 0 0 1.5rem;
  border-bottom: 1px solid var(--c-rule);
}
.digest-axis p { margin: 0 0 0.9rem; }
.digest-axis p:last-child { margin-bottom: 0; }

.digest-stories {
  margin: 0 0 2.5rem;
}
.digest-stories-title {
  font-family: var(--f-serif);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  margin: 0 0 1.25rem;
}
.digest-stories-list {
  list-style: none;
  counter-reset: digest-counter;
  margin: 0;
  padding: 0;
}
.digest-story {
  counter-increment: digest-counter;
  padding: 1.1rem 0 1.1rem 2.25rem;
  border-bottom: 1px solid var(--c-rule);
  position: relative;
}
.digest-story:first-child { padding-top: 0.4rem; }
.digest-story:last-child { border-bottom: 0; }
.digest-story::before {
  content: counter(digest-counter) ".";
  position: absolute;
  left: 0;
  top: 1.15rem;
  font-family: var(--f-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-accent);
}
.digest-story:first-child::before { top: 0.45rem; }
.digest-story-title {
  font-family: var(--f-serif);
  font-size: 1.25rem;
  line-height: 1.35;
  margin: 0 0 0.35rem;
}
.digest-story-title a {
  color: var(--c-fg);
  text-decoration: none;
}
.digest-story-title a:hover {
  color: var(--c-accent);
}
.digest-story-desc {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--c-muted);
  margin: 0 0 0.4rem;
}
.digest-story-read {
  margin: 0;
  font-size: 0.9rem;
}
.digest-story-link {
  color: var(--c-accent);
  font-weight: 600;
  text-decoration: none;
}
.digest-story-link:hover { text-decoration: underline; }

.digest-takeaway {
  margin: 2rem 0 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(207, 34, 36, 0.04);
  border-left: 3px solid var(--c-accent);
  border-radius: 0 6px 6px 0;
}
.digest-takeaway h2 {
  font-family: var(--f-serif);
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}
.digest-takeaway p { margin: 0 0 0.85rem; }
.digest-takeaway p:last-child { margin-bottom: 0; }

/* ---------------- Per-item page (story under a hub) ---------------- */

/* The link back to the daily digest, just under the byline */
.article-parent-link {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}
.article-parent-link a {
  color: var(--c-accent);
  text-decoration: none;
}
.article-parent-link a:hover { text-decoration: underline; }

/* The "More from today's digest" panel inside the article */
.related-items {
  margin: 2.5rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--c-rule);
  border-bottom: 1px solid var(--c-rule);
}
.related-items h2 {
  font-family: var(--f-serif);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-muted);
  margin: 0 0 1rem;
}
.related-items-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.related-items-list li { margin: 0.5rem 0; }
.related-item-link {
  font-family: var(--f-serif);
  font-size: 1.05rem;
  color: var(--c-fg);
  text-decoration: none;
}
.related-item-link:hover {
  color: var(--c-accent);
}
.related-items-hub {
  margin: 1rem 0 0;
  font-size: 0.9rem;
}
.related-items-hub a {
  color: var(--c-accent);
  text-decoration: none;
}
.related-items-hub a:hover { text-decoration: underline; }

/* ---------------- Article sidebar ---------------- */

.article-sidebar {
  /* On wide screens this is a persistent column; on narrow screens it
     drops under the main article. Don't sticky it — keeping it scrolling
     with the article reads more like a print sidebar. */
}

.sidebar-card {
  background: var(--c-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.5rem 1.5rem;
  margin: 0 0 1.5rem;
}

.sidebar-card .sidebar-rule {
  height: 1px;
  background: var(--c-rule-strong);
  margin: 0 0 1.25rem;
}

.sidebar-card h2 {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--c-accent);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--c-rule);
}
.sidebar-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.sidebar-list li:first-child { padding-top: 0; }
.sidebar-item-title {
  font-family: var(--f-serif);
  font-size: 1rem;
  line-height: 1.3;
  margin: 0 0 0.25rem;
  /* Clamp digest titles in sidebar to 2 lines. Same rationale as
     .article-card h3 — keeps sidebar entries compact. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-item-title a { color: var(--c-fg); text-decoration: none; }
.sidebar-item-title a:hover { color: var(--c-accent); }
.sidebar-item-meta {
  font-size: 0.7rem;
  color: var(--c-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0;
}

/* ---------------- Newsletter / YouTube CTAs ---------------- */
/* Sit at the end of every article. .newsletter-cta is the higher-
   priority owned-channel CTA; .subscribe-cta is the YouTube fallback. */

.newsletter-cta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.6rem 1.5rem;
  margin: 2.5rem 0 1.5rem;
  border: 1px solid var(--c-rule);
  border-radius: var(--radius-card);
  background: rgba(207, 34, 36, 0.04);
  text-align: center;
}
.newsletter-cta-text {
  margin: 0;
  font-family: var(--f-serif);
  font-size: 1.25rem;
  color: var(--c-fg);
  font-weight: 600;
}
.newsletter-cta-sub {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--c-muted);
}
.newsletter-cta-action { margin: 0.25rem 0 0; }

.newsletter-embed {
  display: flex;
  justify-content: center;
  width: 100%;
}
.newsletter-embed iframe,
.newsletter-embed form {
  max-width: 100%;
}

.newsletter-embed--paused {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid var(--c-rule);
  border-radius: var(--radius-card);
  background: var(--c-page);
  color: var(--c-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: left;
}
.newsletter-embed--paused p { margin: 0 0 0.6rem; }
.newsletter-embed--paused p:last-child { margin-bottom: 0; }

/* Active subscribe form — Listmonk double-opt-in target. Visually a
   card on the cream page background, vertically stacked fields with
   a single primary CTA. Matches the editorial card aesthetic used
   elsewhere on the site (article body card, "Also in..." sidebar). */
.newsletter-embed { margin: 1.5rem 0; }

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  max-width: 480px;
  padding: 1.4rem 1.5rem 1.5rem;
  border: 1px solid var(--c-rule);
  border-radius: var(--radius-card);
  background: var(--c-page);
  box-shadow: var(--shadow-card);
}
/* Checkbox row — checkbox sits to the LEFT of the wrapping text, top-aligned
   so multi-line copy stays anchored at the same baseline as the box.
   `.newsletter-form label.checkbox-row` wins on specificity over the generic
   `.newsletter-form label` flex-column rule below. */
.newsletter-form label.checkbox-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.45;
  text-transform: none;
  cursor: pointer;
}
.newsletter-form label.checkbox-row input[type="checkbox"] {
  /* Stop the checkbox shrinking when the text wraps. */
  flex: 0 0 auto;
  margin-top: 0.2rem;
  accent-color: var(--c-accent);
}

.newsletter-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c-fg);
}
.newsletter-form input[type="email"],
.newsletter-form input[type="text"] {
  font-family: var(--f-sans);
  font-size: 1rem;
  line-height: 1.4;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--c-rule);
  border-radius: 6px;
  background: var(--c-card);
  color: var(--c-fg);
  font-weight: 400;
  transition: border-color 150ms, box-shadow 150ms;
}
.newsletter-form input[type="email"]::placeholder,
.newsletter-form input[type="text"]::placeholder {
  color: var(--c-muted);
  font-weight: 400;
}
.newsletter-form input[type="email"]:focus,
.newsletter-form input[type="text"]:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(207, 34, 36, 0.15);
}
.newsletter-form button[type="submit"] {
  margin-top: 0.3rem;
  padding: 0.75rem 1.4rem;
  font-family: var(--f-sans);
  font-size: 1rem;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--c-accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 150ms;
}
.newsletter-form button[type="submit"]:hover,
.newsletter-form button[type="submit"]:focus-visible {
  background: var(--c-accent-dark);
}
.newsletter-form button[type="submit"]:focus-visible {
  outline: 3px solid #FDCF4C;
  outline-offset: 2px;
}
.newsletter-form-fineprint {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--c-muted);
}

.subscribe-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.6rem 1.5rem;
  margin: 2.5rem 0;
  border: 1px solid var(--c-rule);
  border-radius: var(--radius-card);
  background: var(--c-card);
  text-align: center;
}
.subscribe-cta-text {
  margin: 0;
  font-size: 1.05rem;
  color: var(--c-fg);
  font-weight: 600;
}
.subscribe-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--c-accent);
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 200ms;
}
.subscribe-btn:hover,
.subscribe-btn:focus-visible {
  background: var(--c-accent-dark);
  color: #fff;
  text-decoration: none;
}
.subscribe-btn:focus-visible {
  outline: 4px solid #FDCF4C;
}
.subscribe-btn-icon {
  display: inline-block;
  font-size: 0.85em;
  line-height: 1;
}

/* ---------------- Code blocks (markdown ```...``` and inline `code`) ----------------
 *
 * The site stylesheet historically had no <pre>/<code> rules because no
 * editorial pages used them. The /mcp/ developer page introduces a curl
 * example whose JSON payload is a long unbroken string — without overflow
 * handling on <pre>, the block stretches past the content column. Adding
 * a global rule so any future docs/code on the site behaves correctly.
 */

pre {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  padding: 0.9rem 1rem;
  margin: 1rem 0 1.5rem;
  /* Keep the block inside its column; long lines scroll horizontally
     instead of pushing the layout. */
  max-width: 100%;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

pre code {
  /* Reset so the <code> inside <pre> doesn't inherit the inline code
     background/padding rules below — the <pre> already provides them. */
  background: none;
  padding: 0;
  font-size: inherit;
  white-space: pre;
}

code {
  background: rgba(0, 0, 0, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.9em;
  /* Inline code: allow breaking long tokens (URLs, hashes) so they don't
     blow out the paragraph width on narrow viewports. */
  word-break: break-word;
}

/* ---------------- Contact form (Formspree) ---------------- */

.fs-form {
  display: grid;
  row-gap: 1.5rem;
  max-width: 600px;
  margin: 2rem 0 3rem;
}
.fs-field { display: flex; flex-direction: column; row-gap: 0.5rem; }
.fs-label { color: var(--c-fg); font-size: 1rem; font-weight: 600; line-height: 1.25rem; }
.fs-optional { font-weight: 400; color: var(--c-muted); font-size: 0.85rem; margin-left: 0.4rem; }
.fs-description { color: var(--c-muted); font-size: 0.9rem; line-height: 1.4; margin: 0; }
.fs-input,
.fs-select {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 9999px;
  border: 0;
  box-shadow: #d1d1d1 0 0 0 1px inset;
  color: var(--c-fg);
  font-size: 1rem;
  font-family: inherit;
  height: 3rem;
  line-height: 1.5rem;
  outline: none;
  padding: 0 1rem;
  background-color: #fff;
  transition: box-shadow 0.15s;
  width: 100%;
}
.fs-input:focus-visible,
.fs-select:focus-visible {
  box-shadow: var(--c-accent) 0 0 0 2px inset;
}
.fs-input::placeholder,
.fs-textarea::placeholder { color: var(--c-muted); }
.fs-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.625em 1.625em;
  padding-right: 2.875rem;
}
.fs-textarea {
  appearance: none;
  border-radius: 0.75rem;
  border: 0;
  box-shadow: #d1d1d1 0 0 0 1px inset;
  color: var(--c-fg);
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.5rem;
  outline: none;
  padding: 0.75rem 1rem;
  resize: vertical;
  min-height: 9rem;
  transition: box-shadow 0.15s;
  width: 100%;
  background-color: #fff;
}
.fs-textarea:focus-visible {
  box-shadow: var(--c-accent) 0 0 0 2px inset;
}
.fs-honeypot { position: absolute; left: -9999px; }
.fs-button-group { display: flex; flex-direction: row-reverse; column-gap: 1rem; margin-top: 0.25rem; }
.fs-button {
  background-color: var(--c-accent);
  border-radius: 9999px;
  border: 0;
  color: white;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.5rem;
  padding: 0.75rem 2rem;
  transition: background-color 200ms;
}
.fs-button:hover { background-color: var(--c-accent-dark); }
.fs-button:focus-visible { background-color: var(--c-accent-dark); outline: 4px solid #FDCF4C; }

/* ---------------- AI byline badge ---------------- */

.ai-badge {
  display: inline-block;
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.05em 0.4em;
  margin: 0 0.25em;
  border: 1px solid currentColor;
  border-radius: 3px;
  vertical-align: 0.1em;
  opacity: 0.75;
}

/* ---------------- Trust pages (about, privacy, etc.) ---------------- */

.page {
  max-width: var(--w-content);
  margin: 1.5rem auto 4rem;
  background: var(--c-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 2.5rem 2rem 2rem;
}
.page-header h1 {
  font-family: var(--f-serif);
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  line-height: 1.15;
}
.page-body {
  font-size: 1.05rem;
  line-height: 1.7;
}
.page-body h2 { font-family: var(--f-serif); font-size: 1.5rem; margin: 1.75rem 0 0.5rem; }
.page-body h3 { font-family: var(--f-serif); font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
.page-body p { margin: 0 0 1rem; }
.page-body a { text-decoration: underline; text-underline-offset: 2px; }
.page-body ul, .page-body ol { margin: 0 0 1rem 1.25rem; }

/* ---------------- Author page ---------------- */

.author-page {
  max-width: var(--w-wide);
  margin: 1.5rem auto 4rem;
  background: var(--c-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 2.5rem 2rem 2rem;
}
.author-header {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.author-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--c-rule);
}
.author-header h1 {
  font-family: var(--f-serif);
  font-size: 2rem;
  margin: 0 0 0.25rem;
}
.author-links {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}
.author-bio { max-width: var(--w-content); margin: 1.5rem 0 2rem; }
.author-articles h2 {
  font-family: var(--f-serif);
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
}

/* ---------------- Platforms row ---------------- */
/* Multi-channel promotion strip — same visual vocabulary as the
   "Follow The Coin Daily" tiles in the email. Used in two places:
   (a) the site footer (site-wide), (b) the /subscribe/ page hero.
   Each tile renders only if the corresponding social URL is set in
   config.yaml; empty values get skipped to avoid broken links. */

.platforms-row {
  background: var(--c-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.5rem 2rem;
  margin: 0 0 1.5rem;
}
.platforms-row-heading {
  font-family: var(--f-serif);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 1rem;
}
.platforms-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.platform-tile {
  text-align: center;
  padding: 0.75rem 0.25rem;
}
.platform-tile a {
  display: block;
  text-decoration: none;
  color: var(--c-fg);
}
.platform-tile a:hover .platform-tile-action { color: var(--c-accent-dark); }
.platform-tile-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--c-accent);
  text-transform: uppercase;
  display: block;
  margin: 0 0 0.25rem;
}
.platform-tile-action {
  font-size: 0.85rem;
  color: var(--c-muted);
  display: block;
  transition: color 120ms ease;
}

/* Compact variant for the footer — smaller, no card chrome, just
   the tiles centered in a strip. */
.platforms-row--compact {
  background: transparent;
  box-shadow: none;
  padding: 0 0 1.5rem;
  margin: 0 0 1.5rem;
  border-bottom: 1px solid var(--c-rule);
}
.platforms-row--compact .platforms-row-heading {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--c-accent);
  text-transform: uppercase;
}

/* ---------------- Subscribe landing page ---------------- */
/* Wider, hero-style layout for /subscribe/ — separate from .page
   (used by other trust pages like /privacy/, /about/) which stays
   narrow because those are reading surfaces, not conversion surfaces. */

.subscribe-page {
  max-width: var(--w-wide);
  margin: 1.5rem auto 4rem;
  padding: 0 1.25rem;
}
.subscribe-hero {
  background: var(--c-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 3rem 2rem 2.5rem;
  margin: 0 0 1.5rem;
  text-align: center;
}
.subscribe-hero h1 {
  font-family: var(--f-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0.75rem 0 0.5rem;
}
.subscribe-hero .brand-rule {
  margin-left: auto;
  margin-right: auto;
}
.subscribe-hero-deck {
  font-size: 1.15rem;
  color: var(--c-muted);
  margin: 0.5rem auto 1.5rem;
  max-width: 560px;
  line-height: 1.5;
}
.subscribe-hero-form {
  margin: 1.5rem auto 0;
  max-width: 480px;
}

/* Telegram bot callout — same vocabulary as the email's "INTERACTIVE"
   card. Stand-alone on /subscribe/, draws attention as a distinct
   value prop from passive social follows. */
.bot-callout {
  background: var(--c-card);
  border: 1px solid var(--c-rule);
  border-radius: var(--radius-card);
  padding: 1.75rem 2rem;
  margin: 0 0 1.5rem;
  text-align: center;
}
.bot-callout h2 {
  font-family: var(--f-serif);
  font-size: 1.4rem;
  margin: 0.5rem 0 0.5rem;
  line-height: 1.3;
}
.bot-callout p {
  color: var(--c-muted);
  margin: 0 auto 1rem;
  max-width: 520px;
}

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--c-card);
  border-top: 1px solid var(--c-rule);
  margin-top: 3rem;
  padding: 2.5rem 0 1rem;
}
.footer-grid {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-grid h3 {
  font-family: var(--f-serif);
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}
.footer-grid h4 {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-accent);
  font-weight: 700;
}
.footer-grid a { color: var(--c-fg); }
.footer-grid a:hover { color: var(--c-accent); }
.footer-base {
  max-width: var(--w-wide);
  margin: 2rem auto 0;
  padding: 1rem 1.25rem 0;
  border-top: 1px solid var(--c-rule);
}

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