/*
 * Realistic third-party publisher styling for the demo pages. Deliberately NOT
 * nplusone-branded (the point is to show the ad in a believable page). Wide
 * page chrome, a breakout hero, a comfortable reading column, and enough
 * structure (subheads, pull quotes, related links, footer) that it scrolls like
 * a real article. Each page sets --accent for its publication identity.
 */
:root { --accent: #b1240e; --ink: #16181d; --muted: #6b7280; --line: #e6e6e2; --paper: #ffffff; --bg: #f3f2ee; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; line-height: 1.6;
}

/* ── Site header (full width, sticky) ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-inner { max-width: 1120px; margin: 0 auto; padding: 0 28px; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.site-logo { font-size: 23px; font-weight: 800; letter-spacing: -0.03em; color: var(--accent); text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a { font-size: 13.5px; font-weight: 600; color: #444; text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
.site-cta { font-size: 12.5px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 999px; padding: 7px 15px; text-decoration: none; }
@media (max-width: 640px) { .site-nav a:not(.site-cta) { display: none; } }

/* ── Article shell: wide container, comfortable reading column ── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.article { max-width: 720px; margin: 0 auto; }

.crumbs { font-size: 12px; color: var(--muted); margin: 26px 0 6px; display: flex; align-items: center; gap: 8px; }
.crumbs a { color: var(--accent); text-decoration: none; font-weight: 600; }
.kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 22px 0 12px; }
.headline { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; line-height: 1.12; letter-spacing: -0.025em; margin-bottom: 16px; }
.standfirst { font-size: 19px; line-height: 1.5; color: #3a3f49; margin-bottom: 26px; }

.byline { display: flex; align-items: center; gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.avatar { width: 40px; height: 40px; border-radius: 999px; flex: none; background: linear-gradient(135deg, var(--accent), #00000022); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 15px; }
.byline-meta { font-size: 13px; color: var(--muted); line-height: 1.4; }
.byline-meta strong { color: #2a2e36; font-weight: 700; }

/* ── Breakout hero (wider than the reading column) ── */
.hero-fig { max-width: 1000px; margin: 26px auto 8px; }
.hero-img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: 12px; display: block; background:
    radial-gradient(140% 140% at 12% -10%, #fbfcfe 0%, rgba(255,255,255,0) 45%),
    radial-gradient(120% 120% at 105% 110%, #c2cdda 0%, rgba(194,205,218,0) 55%),
    linear-gradient(140deg, #e7ecf2 0%, #d3dae4 55%, #c9d1dd 100%); }
.fig-cap { font-size: 12px; color: var(--muted); margin-top: 8px; padding: 0 2px; }

/* ── Body ── */
.article-body { font-size: 17px; line-height: 1.78; color: #24262c; margin: 22px 0; }
.article-body a { color: var(--accent); }
.subhead { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin: 38px 0 14px; }
.article-body + .subhead { margin-top: 40px; }

.pull {
  border-left: 4px solid var(--accent); margin: 34px 0; padding: 4px 0 4px 22px;
  font-size: 23px; font-weight: 700; line-height: 1.35; letter-spacing: -0.015em; color: #1a1d22;
}
.pull cite { display: block; margin-top: 12px; font-size: 14px; font-weight: 600; font-style: normal; color: var(--muted); }

.tick { list-style: none; margin: 22px 0; padding: 0; }
.tick li { position: relative; padding-left: 28px; margin-bottom: 12px; font-size: 17px; line-height: 1.6; color: #24262c; }
.tick li::before { content: ''; position: absolute; left: 4px; top: 9px; width: 7px; height: 7px; border-radius: 999px; background: var(--accent); }
.tick li strong { color: #14161a; }

.inline-fig { margin: 30px 0; }
.inline-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; display: block; background:
    radial-gradient(140% 140% at 12% -10%, #fbfcfe 0%, rgba(255,255,255,0) 45%),
    radial-gradient(120% 120% at 105% 110%, #c2cdda 0%, rgba(194,205,218,0) 55%),
    linear-gradient(140deg, #e7ecf2 0%, #d3dae4 55%, #c9d1dd 100%); }

/* ── Ad slot ── */
.ad-wrapper { margin: 40px auto; max-width: 720px; }

/* ── Right-rail (2-column) layout ── */
.layout { max-width: 1120px; margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 48px; align-items: start; }
.layout .main { min-width: 0; }
.layout .main .article-body, .layout .main .subhead, .layout .main .pull, .layout .main .tick, .layout .main .headline, .layout .main .standfirst { max-width: none; }
.rail { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 24px; }
.rail-slot { width: 300px; min-height: 250px; margin: 0 auto; }
.rail-widget { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 6px; }
.rail-widget h4 { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.rail-widget ol { list-style: none; counter-reset: rw; margin: 0; padding: 0; }
.rail-widget li { counter-increment: rw; display: flex; gap: 13px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.35; font-weight: 600; }
.rail-widget li::before { content: counter(rw); font-size: 17px; font-weight: 800; color: #c9cdd4; flex: none; min-width: 16px; }
.rail-widget a { color: inherit; text-decoration: none; }
.rail-widget a:hover { color: var(--accent); }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .rail { position: static; flex-direction: row; flex-wrap: wrap; gap: 24px; margin-top: 12px; }
  .rail > * { flex: 1; min-width: 280px; }
}

/* ── Related + footer (adds length + realism) ── */
.related { border-top: 1px solid var(--line); margin-top: 56px; padding-top: 30px; }
.related h3 { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.related-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .related-grid { grid-template-columns: 1fr 1fr 1fr; } }
.rel-card { text-decoration: none; color: inherit; }
.rel-thumb { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; background:
    radial-gradient(140% 140% at 12% -10%, #fbfcfe 0%, rgba(255,255,255,0) 45%),
    radial-gradient(120% 120% at 105% 110%, #c2cdda 0%, rgba(194,205,218,0) 55%),
    linear-gradient(140deg, #e7ecf2 0%, #d3dae4 55%, #c9d1dd 100%); margin-bottom: 10px; }
.rel-kicker { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.rel-title { font-size: 15px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; margin-top: 4px; }
.rel-card:hover .rel-title { color: var(--accent); }

.site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: 64px; }
.site-footer .container { padding-top: 36px; padding-bottom: 44px; }
.foot-logo { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; color: var(--accent); }
.foot-cols { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 18px; }
.foot-cols div { font-size: 13px; line-height: 2; color: var(--muted); }
.foot-cols strong { display: block; color: #2a2e36; font-weight: 700; margin-bottom: 4px; }
.foot-fine { font-size: 12px; color: #9a9a96; margin-top: 28px; }

/* ── Back link + demo tag (quiet markers; not part of the publisher illusion) ── */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #9a9a96; text-decoration: none; margin: 18px 0 0; }
.back-link:hover { color: var(--accent); }
.back-link svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.demo-tag { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #888; background: rgba(0,0,0,0.05); border-radius: 999px; padding: 2px 9px; margin-left: 4px; }
