/* PNN document pages.
   Built from broadcast-graphics grammar rather than editorial furniture: content
   sits in lower-third slabs, anchored to the frame edge the way a chyron is, and
   the palette is sampled from the studio LED wall so the site and the broadcast
   are recognisably the same object. */

:root {
  --ground:   #040a16;   /* the LED wall, unlit */
  --slab:     #0a1830;   /* lower-third body */
  --slab-lo:  #061020;
  --rule:     #16233c;
  --spine:    #c22e26;   /* the red bar that opens every chyron */
  --cream:    #ece7db;
  --cream-lo: #8fa0bb;
  --tungsten: #f0c98a;   /* studio key light */

  --display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --read: ui-serif, Georgia, "Times New Roman", serif;
  --data: ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; padding-bottom: 46px;   /* room for the fixed ticker */
  background: var(--ground);
  color: var(--cream);
  font-family: var(--display);
  line-height: 1.6;
}
a { color: var(--tungsten); }
::selection { background: var(--spine); color: #fff; }
:focus-visible { outline: 2px solid var(--tungsten); outline-offset: 2px; }

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

.masthead {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 26px;
  padding: 13px 28px;
  background: linear-gradient(180deg, #071227, #040a16);
  border-bottom: 2px solid var(--spine);
}
.masthead-mark { display: block; line-height: 0; }
.masthead-mark img { display: block; width: 34px; height: 34px; }
.masthead-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.masthead-nav a {
  color: var(--cream-lo); text-decoration: none;
  font-size: 15px; font-weight: 600; letter-spacing: .01em;
}
.masthead-nav a:hover { color: var(--cream); }

/* ---------- page frame ---------- */

.wrap, .story { max-width: 780px; margin: 0; padding: 52px 28px 80px; }
@media (min-width: 1040px) { .wrap, .story { margin-left: 84px; } }

.page-title {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 800; line-height: .98; letter-spacing: -.035em;
}
.page-sub { margin: 0 0 44px; max-width: 46ch; color: var(--cream-lo); font-size: 17px; }

/* ---------- the lower third: the page's one strong device ---------- */

.chyron { display: flex; align-items: stretch; margin: 0 0 22px; }
.chyron-spine { width: 14px; flex: none; background: var(--spine); }
.chyron-body {
  flex: 1; padding: 24px 30px 26px;
  background: linear-gradient(180deg, var(--slab), var(--slab-lo));
  border-top: 1px solid rgba(255,255,255,.14);
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.chyron-body h1 {
  margin: 0;
  font-size: clamp(27px, 4.4vw, 42px);
  font-weight: 800; line-height: 1.06; letter-spacing: -.025em;
}

/* Broadcast slug line — a timecode and a reporter, which is information a
   playout log actually carries, not a decorative eyebrow. */
.slug {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  margin: 0 0 30px; padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px; color: var(--cream-lo);
}
.slug time { font-family: var(--data); font-size: 13px; color: var(--tungsten); }

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

.story-dek {
  margin: 0 0 26px; max-width: 52ch;
  font-family: var(--read); font-size: clamp(18px, 2.3vw, 21px);
  line-height: 1.5; color: var(--cream-lo);
}
.story p {
  max-width: 65ch;
  font-family: var(--read); font-size: 18px; line-height: 1.72;
  margin: 0 0 22px;
}
.story-quote {
  max-width: 60ch; margin: 32px 0; padding: 4px 0 4px 26px;
  border-left: 4px solid var(--spine);
}
.story-quote p { font-size: 22px; line-height: 1.42; margin: 0 0 10px; }
.story-quote cite { font-family: var(--display); font-style: normal; font-size: 14px; color: var(--cream-lo); }

.story-lower { max-width: 65ch; font-family: var(--display) !important; font-size: 15px !important; color: var(--cream-lo); }
.story-lower span {
  display: inline-block; padding: 4px 11px; margin-left: 4px;
  background: var(--slab); border-left: 3px solid var(--spine);
  color: var(--cream); font-weight: 700;
}
.story-back { max-width: 65ch; font-family: var(--display) !important; font-size: 15px !important; padding-top: 24px; border-top: 1px solid var(--rule); }

.story-video { margin: 0 0 30px; }
.story-video video { display: block; width: 100%; height: auto; background: #000; }
.story-video figcaption { margin-top: 10px; font-size: 14px; color: var(--cream-lo); }

/* ---------- transmission log (stories index) ---------- */

.log { border-top: 1px solid var(--rule); }
.log-row {
  display: grid; grid-template-columns: 78px 14px 148px 1fr; align-items: stretch;
  position: relative;
  gap: 0 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none; color: inherit;
}
.log-row:hover { background: rgba(255,255,255,.028); }
.log-row:hover .log-head { color: var(--tungsten); }
.log-time { font-family: var(--data); font-size: 13px; color: var(--tungsten); padding-top: 3px; }
.log-spine { background: var(--rule); }
.log-row:hover .log-spine { background: var(--spine); }
.log-thumb { align-self: start; width: 148px; height: 83px; object-fit: cover; background: #000; }
.log-head, .log-dek, .log-meta { display: block; }
.log-head { margin: 0 0 6px; font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -.015em; }
.log-dek { margin: 0 0 8px; max-width: 54ch; font-family: var(--read); font-size: 16px; color: var(--cream-lo); }
.log-meta { font-size: 13px; color: var(--cream-lo); }

@media (max-width: 720px) {
  .log-row { grid-template-columns: 62px 6px 1fr; gap: 0 14px; }
  .log-thumb { display: none; }
  .log-head { font-size: 18px; }
}

/* ---------- forms: a network submission slip ---------- */

.slip {
  max-width: 560px;
  background: linear-gradient(180deg, var(--slab), var(--slab-lo));
  border: 1px solid var(--rule); border-left: 14px solid var(--spine);
  padding: 34px 32px 30px;
}
.field { margin-bottom: 22px; }
.field label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: 13px 14px;
  background: #030812; border: 1px solid var(--rule);
  color: var(--cream); font-family: var(--display); font-size: 16px;
}
.field textarea { font-family: var(--read); line-height: 1.5; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--tungsten); }
.field-hint { margin-top: 7px; font-size: 14px; color: var(--cream-lo); }

.btn {
  padding: 14px 30px;
  background: var(--spine); color: #fff;
  border: 0; font-family: var(--display); font-size: 16px; font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: #a8251e; }
.btn:disabled { opacity: .5; cursor: default; }

.notice { padding: 15px 18px; margin-bottom: 24px; border-left: 4px solid; font-size: 16px; }
.notice[hidden] { display: none; }
.notice.ok  { background: rgba(53,196,105,.1); border-color: #35c469; }
.notice.bad { background: rgba(194,46,38,.12); border-color: var(--spine); }

.code-input input {
  font-family: var(--data); font-size: 26px;
  letter-spacing: .18em; text-align: center; text-transform: uppercase;
}

/* ---------- share ---------- */

.share {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  max-width: 65ch; margin: 36px 0 28px; padding: 20px 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.share-title { margin-right: 4px; font-size: 15px; color: var(--cream-lo); }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  background: var(--slab); border: 1px solid var(--rule);
  color: var(--cream-lo);
  font-family: var(--display); font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: color 120ms, border-color 120ms;
}
.share-btn:hover { color: var(--cream); border-color: var(--tungsten); }
.share-btn svg { width: 15px; height: 15px; fill: currentColor; flex: none; }
.share-btn.is-done { color: #35c469; border-color: #35c469; }
.share-btn[hidden] { display: none; }
@media (max-width: 620px) { .share-btn .share-label { display: none; }
  .share-btn[data-share-to="copy"] .share-label, .share-btn[data-share-to="native"] .share-label { display: inline; } }

/* ---------- site ticker: the network runs underneath every page ---------- */

.site-ticker {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: 46px; display: flex; align-items: stretch;
  background: linear-gradient(180deg, #071227, #030710);
  border-top: 2px solid var(--spine);
}
.site-ticker-live {
  display: flex; align-items: center; gap: 9px;
  padding: 0 18px; background: var(--spine); color: #fff;
  text-decoration: none; font-size: 14px; font-weight: 700; white-space: nowrap;
}
.site-ticker-live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff;
  animation: pnn-pulse 2s steps(1) infinite;
}
@keyframes pnn-pulse { 0%,60% { opacity: 1 } 61%,100% { opacity: .25 } }
.site-ticker-view { position: relative; flex: 1; overflow: hidden; }
.site-ticker-track { position: absolute; top: 0; height: 100%; display: flex; align-items: center; white-space: nowrap; will-change: transform; }
.site-ticker-item { padding: 0 30px; font-size: 14px; color: var(--cream-lo); }
.site-ticker-item + .site-ticker-item { border-left: 1px solid var(--rule); }

@media (prefers-reduced-motion: reduce) {
  .site-ticker-live::before { animation: none; }
}

/* ---------- footer ---------- */

.foot {
  max-width: 780px; margin: 0; padding: 28px;
  border-top: 1px solid var(--rule);
  font-size: 14px; color: var(--cream-lo);
}
@media (min-width: 1040px) { .foot { margin-left: 84px; } }
.foot strong { color: var(--cream); }
.foot-fine { font-size: 13px; opacity: .72; max-width: 60ch; }


/* ---------------------------------------------------------------------------
   Tone: about a tenth anthology-television (the early-sixties science-fiction
   half-hours), about a twentieth Lynch. Applied as atmosphere, not costume —
   a starfield too faint to notice at first, a vignette that closes the frame
   like a CRT, and one pool of crimson bleeding out of the chyron spine the way
   a stage curtain holds light. Nothing here is quoted; the register is borrowed,
   the wording is ours.
   --------------------------------------------------------------------------- */

body {
  background-image:
    /* sparse starfield — the void behind the transmission */
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.30), transparent 100%),
    radial-gradient(1px 1px at 68% 9%,  rgba(255,255,255,.22), transparent 100%),
    radial-gradient(1px 1px at 34% 62%, rgba(255,255,255,.16), transparent 100%),
    radial-gradient(1px 1px at 84% 48%, rgba(255,255,255,.26), transparent 100%),
    radial-gradient(1px 1px at 22% 88%, rgba(255,255,255,.14), transparent 100%),
    radial-gradient(1px 1px at 55% 34%, rgba(255,255,255,.18), transparent 100%),
    radial-gradient(1px 1px at 91% 77%, rgba(255,255,255,.12), transparent 100%),
    /* the picture tube: light pools centre, falls away at the corners */
    radial-gradient(120% 90% at 50% 32%, #06122a 0%, #040a16 58%, #01040a 100%);
  background-attachment: fixed;
}

/* Scanline haze over everything, at the threshold of visibility. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.16) 0 1px, transparent 1px 3px);
  opacity: .5;
}
.masthead, .wrap, .story, .foot, .site-ticker { position: relative; z-index: 2; }

/* The spine holds a little crimson light, the way a curtain does. */
.chyron { position: relative; }
.chyron::before {
  content: ""; position: absolute; left: -26px; top: 0; bottom: 0; width: 120px;
  background: radial-gradient(closest-side, rgba(194,46,38,.30), transparent 100%);
  pointer-events: none;
}
.chyron-spine { box-shadow: 0 0 26px rgba(194,46,38,.55); }

/* Rows warm as you pass over them, then cool again. */
.log-row { transition: background 220ms ease; }
.log-row:hover { background: rgba(194,46,38,.055); }
.log-row:hover .log-spine { box-shadow: 0 0 16px rgba(194,46,38,.6); }

/* The control voice. Sits in the footer, states the thing that is not true. */
.control-voice {
  max-width: 46ch; margin: 0 0 14px;
  font-size: 15px; line-height: 1.5; color: var(--cream);
  border-left: 2px solid rgba(194,46,38,.5); padding-left: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .log-row { transition: none; }
}

/* ---------- Video.js, skinned to the network ---------- */

.story-video .video-js { width: 100%; background: #000; font-family: var(--display); }
.story-video .vjs-control-bar { background: rgba(4,10,22,.92); height: 40px; }
.story-video .video-js .vjs-big-play-button {
  width: 74px; height: 74px; line-height: 70px;
  margin: -37px 0 0 -37px;
  border: 2px solid var(--cream); border-radius: 50%;
  background: rgba(194,46,38,.86);
  transition: background 140ms, border-color 140ms;
}
.story-video .video-js:hover .vjs-big-play-button, .story-video .video-js .vjs-big-play-button:focus { background: var(--spine); border-color: var(--tungsten); }
.story-video .vjs-play-progress { background: var(--spine); }
.story-video .vjs-load-progress, .story-video .vjs-load-progress div { background: rgba(255,255,255,.18); }
.story-video .vjs-slider { background: rgba(255,255,255,.16); }
.story-video .vjs-volume-level { background: var(--tungsten); }
.story-video .vjs-poster { background-size: cover; }
