/* Page styles: /newsroom-plus/ (newsroom-plus). Owned by this page's agent. Shared styles live in /assets/css/site.css. */

/* Animations run only inside a container that carries .newsroom-plus-live (set by the page
   script while the container is on screen). The base styles are the complete still state. */

.newsroom-plus-tagline { font-family: var(--font-display); font-size: clamp(1.25rem, 2.3vw, 1.875rem); line-height: 1.1; letter-spacing: 0.01em; color: var(--text); }
.newsroom-plus-after { margin-top: clamp(28px, 4vw, 48px); max-width: 52em; }
.newsroom-plus-also { margin-top: clamp(36px, 5vw, 56px); text-align: center; }

/* 1. Hero widget: source item -> script -> audio -> on air ------------------ */

.newsroom-plus-hero { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.newsroom-plus-hero figcaption { color: var(--subtle); }
.newsroom-plus-stage { position: relative; height: clamp(360px, 30vw, 430px); overflow: hidden; }
.newsroom-plus-stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.newsroom-plus-item { position: absolute; top: 7%; left: 0; right: 0; width: min(84%, 420px); margin-inline: auto; padding: 14px 16px; background: var(--panel-raised); border: 1px solid var(--panel-line-strong); border-radius: var(--radius); }
.newsroom-plus-item__inner { display: flex; flex-direction: column; gap: 8px; clip-path: inset(0 0 0 var(--wipe, 0%)); }
.newsroom-plus-item__head { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.newsroom-plus-item__head .label { color: var(--accent); }
.newsroom-plus-item__icon { width: 20px; height: 20px; flex: none; color: var(--text); }
.newsroom-plus-item__text { min-height: 4.5em; font-size: 1rem; line-height: 1.5; color: var(--text); }
.newsroom-plus-item__rest { color: transparent; }
.newsroom-plus-item__src { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--subtle); }
.newsroom-plus-item__src i { width: 6px; height: 6px; flex: none; background: var(--subtle); }
.newsroom-plus-hero .chip b { font-size: 0.6875rem; }
@media (min-width: 560px) {
  .newsroom-plus-item__text { min-height: 3em; }
}

/* 2. Intake diagram: sources -> cloud ---------------------------------------- */

.newsroom-plus-sync { padding: clamp(16px, 2.4vw, 28px); }
.newsroom-plus-sync__head { display: flex; align-items: center; margin-bottom: 18px; }
.newsroom-plus-sync__grid { display: grid; grid-template-columns: minmax(0, auto) minmax(28px, 1fr) minmax(92px, 130px); gap: 10px 0; align-items: center; }
.newsroom-plus-sync__src { grid-column: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px 12px; font-size: 0.8125rem; white-space: nowrap; color: var(--text); background: var(--panel-raised); border: 1px solid var(--panel-line-strong); border-radius: var(--radius); }
.newsroom-plus-sync__src .ico { width: 18px; height: 18px; color: var(--accent); }
.newsroom-plus-sync__grid > .newsroom-plus-sync__line { grid-column: 2; }
.newsroom-plus-sync__line { position: relative; display: block; height: 2px; background: repeating-linear-gradient(90deg, var(--panel-line-strong) 0 4px, transparent 4px 8px); }
.newsroom-plus-sync__line i { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; background: var(--text); opacity: 0; }
.newsroom-plus-live .newsroom-plus-sync__line i { animation: newsroom-plus-move 2.8s steps(14) infinite, newsroom-plus-tone 2.8s steps(1) infinite; animation-delay: calc(var(--i, 0) * 0.7s); }
@keyframes newsroom-plus-move { from { left: 0; } to { left: calc(100% - 8px); } }
@keyframes newsroom-plus-tone {
  0% { opacity: 0; background: var(--text); }
  8% { opacity: 1; background: var(--text); }
  64% { opacity: 1; background: var(--accent); }
  93%, 100% { opacity: 0; background: var(--accent); }
}
.newsroom-plus-sync__cloud { grid-column: 3; grid-row: 1 / span 3; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px 8px; text-align: center; background: var(--panel-black); border: 1px solid var(--accent-dim); border-radius: var(--radius); }
.newsroom-plus-sync__cloud .label { color: var(--text); }
.newsroom-plus-sync__leds { display: flex; gap: 4px; }
.newsroom-plus-sync__leds i { width: 6px; height: 6px; background: var(--ok); }
.newsroom-plus-live .newsroom-plus-sync__leds i { animation: newsroom-plus-led 2.8s steps(1) infinite; animation-delay: calc(var(--i, 0) * 0.7s); }
/* the shared "live" lamp pulses forever; hold it while the diagram is off screen */
.newsroom-plus-sync:not(.newsroom-plus-live) .live i::before, .newsroom-plus-sync:not(.newsroom-plus-live) .live i::after { animation-play-state: paused; }
@keyframes newsroom-plus-led { 0% { opacity: 1; } 18% { opacity: 0.25; } 90%, 100% { opacity: 1; } }

.newsroom-plus-features { width: 100%; margin: 0; padding: 0; list-style: none; }
.newsroom-plus-features > li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.newsroom-plus-features > li:first-child { padding-top: 0; border-top: 0; }
.newsroom-plus-features > li > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

/* Drawn figures inside cards -------------------------------------------------- */

.newsroom-plus-figcards .card { gap: 12px; }
.newsroom-plus-fig { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; height: clamp(184px, 20vw, 224px); min-width: 0; margin-bottom: 8px; padding: 16px; overflow: hidden; background: var(--panel-black); border: 1px solid var(--panel-line); border-radius: var(--radius); }
.newsroom-plus-fig .label { white-space: nowrap; }
@keyframes newsroom-plus-turn3 { 0% { opacity: 1; } 34%, 100% { opacity: 0.3; } }
@keyframes newsroom-plus-turn4 { 0% { opacity: 1; } 25%, 100% { opacity: 0.3; } }

.newsroom-plus-fig__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.6875rem; color: var(--subtle); }
.newsroom-plus-fig__legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.newsroom-plus-fig__legend i { width: 8px; height: 8px; background: var(--panel-line-strong); }
.newsroom-plus-fig__legend i.is-slot { background: var(--accent); }
.newsroom-plus-fig__legend--col { flex-direction: column; }

/* a slot per kind of item */
.newsroom-plus-fig--slots { flex-direction: column; align-items: stretch; justify-content: center; gap: 0; }
.newsroom-plus-fig__slot { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 4px; color: var(--text); border-bottom: 1px solid var(--panel-line); }
.newsroom-plus-fig__slot:last-child { border-bottom: 0; }
.newsroom-plus-fig__slot .ico { width: 18px; height: 18px; }
.newsroom-plus-fig__slot .label { color: var(--text); }
.newsroom-plus-fig__parts { display: flex; gap: 3px; }
.newsroom-plus-fig__parts i { width: 8px; height: 8px; background: var(--panel-line-strong); }
.newsroom-plus-fig__parts i:nth-child(2) { width: 30px; background: var(--accent); }
.newsroom-plus-live .newsroom-plus-fig__slot { animation: newsroom-plus-turn4 3.4s steps(1) infinite; animation-delay: calc(var(--i, 0) * 0.85s - 3.4s); }

/* rules */
.newsroom-plus-fig--rules { flex-direction: column; align-items: stretch; gap: 8px; }
.newsroom-plus-fig__rule { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 10px; background: var(--panel-raised); border: 1px solid var(--panel-line-strong); border-radius: var(--radius); }
.newsroom-plus-fig__cond { flex: 1 1 auto; min-width: 0; font-size: 0.75rem; line-height: 1.25; color: var(--muted); }
.newsroom-plus-fig__then { position: relative; flex: none; width: 14px; height: 2px; background: var(--subtle); }
.newsroom-plus-fig__then::after { content: ''; position: absolute; right: 0; top: -2px; width: 6px; height: 6px; background: var(--subtle); }
.newsroom-plus-live .newsroom-plus-fig__rule .tag--accent { animation: newsroom-plus-turn3 3.3s steps(1) infinite; animation-delay: calc(var(--i, 0) * 1.1s - 3.3s); }

/* hour clock with slots */
.newsroom-plus-fig--clock { gap: clamp(14px, 3vw, 28px); }
.newsroom-plus-clock { flex: none; width: auto; height: 100%; max-height: 168px; aspect-ratio: 1; fill: var(--panel-line-strong); shape-rendering: crispEdges; }
.newsroom-plus-clock .is-slot { fill: var(--accent); }
.newsroom-plus-clock__hand, .newsroom-plus-clock__hub { fill: var(--text); }
.newsroom-plus-clock__hand { transform-origin: 60px 60px; }
.newsroom-plus-live .newsroom-plus-clock__hand { animation: newsroom-plus-spin 12s steps(24) infinite; }
.newsroom-plus-live .newsroom-plus-clock .is-slot { animation: newsroom-plus-pass 12s steps(1) infinite; animation-delay: calc(var(--i, 0) * 0.5s - 12s); }
@keyframes newsroom-plus-spin { to { transform: rotate(360deg); } }
@keyframes newsroom-plus-pass { 0% { fill: var(--text); } 9%, 100% { fill: var(--accent); } }

/* Chain: product tags that link to their pages */
a.chain__tag { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a.chain__tag:hover { color: var(--text); }

/* Below 900px the shared chain drops its thread and pulses. Here the chain becomes one
   column with a connector between steps and a block that is handed down step by step. */
@media (max-width: 900px) {
  .newsroom-plus-fig { height: 200px; }
  .newsroom-plus-chain { grid-template-columns: minmax(0, 1fr); row-gap: 0; max-width: 34rem; margin-inline: auto; }
  .newsroom-plus-chain .chain__step { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 18px; row-gap: 6px; align-items: start; justify-items: start; padding-bottom: 40px; text-align: left; }
  .newsroom-plus-chain .chain__step:nth-child(4) { padding-bottom: 0; }
  .newsroom-plus-chain .chain__n { grid-row: 1 / span 3; }
  .newsroom-plus-chain .chain__body { max-width: none; }
  .newsroom-plus-chain .chain__step:nth-child(-n+3)::before { content: ''; position: absolute; left: 23px; top: 52px; bottom: 4px; width: 2px; background: var(--panel-line-strong); }
  .newsroom-plus-chain .chain__step:nth-child(-n+3)::after { content: ''; position: absolute; left: 20px; bottom: 4px; width: 8px; height: 8px; background: var(--accent); }
}
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .newsroom-plus-chain.is-on .chain__step:nth-child(-n+3)::after { animation: newsroom-plus-hand 3.6s steps(10) infinite; animation-delay: -3.6s; }
  .newsroom-plus-chain.is-on .chain__step:nth-child(2)::after { animation-delay: -2.4s; }
  .newsroom-plus-chain.is-on .chain__step:nth-child(3)::after { animation-delay: -1.2s; }
}
@keyframes newsroom-plus-hand {
  0% { bottom: calc(100% - 62px); opacity: 1; }
  33% { bottom: 4px; opacity: 1; }
  34%, 100% { bottom: 4px; opacity: 0.25; }
}
@media (max-width: 520px) {
  .newsroom-plus-sync__src { padding-inline: 10px; }
  .newsroom-plus-fig { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .newsroom-plus-sync__line i { display: none; }
}
