/* Cyberdelia publication polish
   Shared editorial/link treatment loaded by site-shell.js.
   Keep controls/cards visually distinct; improve prose, citations, and source trails. */

:root{
  --link:#86f7ff;
  --link-hover:#ffffff;
  --link-line:rgba(80,244,255,.42);
  --link-wash:rgba(80,244,255,.055);
}

/* Never let inherited browser visited-purple leak into the publication. */
a:visited{color:inherit}

/* Prose links: visible enough to find, restrained enough to read through. */
.article-body a:not(.button),
.article-shell a:not(.button):not(.media-card),
.reading-note a:not(.button),
.prose-card a:not(.button),
.channel-article a:not(.button),
.source-box a:not(.button),
.reference-copy a:not(.button),
.reference-entry a:not(.button),
.lab-grid a:not(.button),
.origin-copy a:not(.button),
.question a:not(.button){
  color:var(--link);
  text-decoration-line:underline;
  text-decoration-color:var(--link-line);
  text-decoration-thickness:.075em;
  text-underline-offset:.19em;
  text-decoration-skip-ink:auto;
  overflow-wrap:anywhere;
  word-break:normal;
  transition:color .15s ease,text-decoration-color .15s ease,background-color .15s ease;
}

.article-body a:not(.button):visited,
.article-shell a:not(.button):not(.media-card):visited,
.reading-note a:not(.button):visited,
.prose-card a:not(.button):visited,
.channel-article a:not(.button):visited,
.source-box a:not(.button):visited,
.reference-copy a:not(.button):visited,
.reference-entry a:not(.button):visited,
.lab-grid a:not(.button):visited,
.origin-copy a:not(.button):visited,
.question a:not(.button):visited{color:var(--link)}

.article-body a:not(.button):hover,
.article-shell a:not(.button):not(.media-card):hover,
.reading-note a:not(.button):hover,
.prose-card a:not(.button):hover,
.channel-article a:not(.button):hover,
.source-box a:not(.button):hover,
.reference-copy a:not(.button):hover,
.reference-entry a:not(.button):hover,
.lab-grid a:not(.button):hover,
.origin-copy a:not(.button):hover,
.question a:not(.button):hover{
  color:var(--link-hover);
  text-decoration-color:var(--cyan);
  background:var(--link-wash);
}

/* A small external-link mark adds affordance without printing raw URLs all over the room. */
.article-body a[href^="http"]:not(.button)::after,
.article-shell a[href^="http"]:not(.button):not(.media-card)::after,
.reading-note a[href^="http"]:not(.button)::after,
.reference-copy a[href^="http"]:not(.button)::after,
.reference-entry a[href^="http"]:not(.button)::after{
  content:" ↗";
  color:var(--dim);
  font-size:.72em;
  vertical-align:.12em;
  text-decoration:none;
}

/* Source boxes are reference interfaces, not default unordered lists. */
.source-box ul{
  list-style:none;
  padding:0;
  margin:.35rem 0 0;
  display:grid;
  gap:.5rem;
}

.source-box ul li{
  margin:0;
  padding:.62rem .72rem .62rem .9rem;
  border-left:2px solid rgba(80,244,255,.30);
  background:rgba(80,244,255,.022);
  color:var(--muted);
  line-height:1.5;
  overflow-wrap:anywhere;
}

.source-box ul li a{
  display:block;
  position:relative;
  margin-bottom:.18rem;
  color:#dce8f3;
  text-decoration:none;
  font-weight:750;
  line-height:1.42;
  overflow-wrap:anywhere;
}

.source-box ul li a[href^="http"]::after{
  content:" ↗";
  color:var(--cyan);
  font-size:.72em;
  text-decoration:none;
}

.source-box ul li:hover{
  border-left-color:var(--cyan);
  background:rgba(80,244,255,.055);
}
.source-box ul li a:hover{color:#fff;background:none;text-decoration:underline;text-underline-offset:.16em}

/* Source-trail pages currently place several citations in one paragraph.
   Give each link a quiet inline chip treatment without destroying sentence flow. */
.reading-note p:not(.question) a:not(.button){
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
  padding:.04em .16em;
  border-radius:3px;
}

/* General long-link insurance for receipts, archives, and technical pages. */
main a[href^="http"],
main a[href^="mailto:"],
main code,
main pre{
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* Editorial rhythm. */
.article-body > p,
.article-shell > p,
.reading-note > p,
.prose-card > p,
.channel-article > p{
  text-wrap:pretty;
}

.article-body li,
.article-shell li,
.reading-note li,
.prose-card li,
.channel-article li{
  margin-block:.45rem;
}

.article-body ul,
.article-body ol,
.article-shell ul,
.article-shell ol,
.prose-card ul,
.prose-card ol,
.channel-article ul,
.channel-article ol{
  padding-left:1.35rem;
}

/* Cards, buttons, nav, and tile links must remain interface elements. */
.button,
.nav a,
.visual-card,
.dispatch-card,
.feature-card,
.media-card,
.news-card h2 a,
.crew-tile,
.node-card,
.program-node,
.footer-links a,
.masthead-logo-static{
  text-decoration:none;
}

.news-card h2 a{
  color:inherit;
  text-decoration:none;
  background:linear-gradient(currentColor,currentColor) 0 100% / 0 1px no-repeat;
  transition:background-size .18s ease,color .18s ease;
}

.news-card h2 a:hover{
  color:var(--cyan);
  background-size:100% 1px;
}

/* Authorship should be obvious, not hidden in metadata soup. */
.article-byline{padding:.9rem 1rem;border-left:2px solid rgba(80,244,255,.34);background:rgba(80,244,255,.025)}
.article-byline>div::before{
  content:"WRITTEN BY";
  display:block;
  margin-bottom:.28rem;
  color:var(--dim);
  font:800 .58rem/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  letter-spacing:.16em;
}
.article-byline>div>a{
  display:inline-block;
  width:max-content;
  max-width:100%;
  color:#fff!important;
  font-size:1.08rem;
  line-height:1.2;
  text-decoration:none!important;
}
.article-byline>div>a:hover{color:var(--cyan)!important}
.article-byline>div>span{margin-top:.08rem}

/* News Desk story ownership. Each current card names its responsible correspondent. */
.news-card:has(h2 a[href="/features/ai-optimization-physical-science.html"]){--story-byline:"WRITTEN BY · NADIA CALDER · Senior Technology Correspondent"}
.news-card:has(h2 a[href="/features/deimos-rubble-pile-impact.html"]){--story-byline:"WRITTEN BY · NINA KARPOVA · Aerospace, Propulsion & Robotics Correspondent"}
.news-card:has(h2 a[href="/features/cold-orb-problem.html"]){--story-byline:"WRITTEN BY · NINA KARPOVA · Aerospace, Propulsion & Robotics Correspondent"}
.news-card:has(h2 a[href="/features/ai-electricity-map.html"]){--story-byline:"WRITTEN BY · ERIN WALSH · Field Science & Infrastructure Correspondent"}
.news-card:has(h2 a[href="/features/hormuz-engineering-system.html"]){--story-byline:"WRITTEN BY · ERIN WALSH · Field Science & Infrastructure Correspondent"}
.news-card:has(h2 a[href="/features/meta-product-design-liability.html"]){--story-byline:"WRITTEN BY · RILEY HART · Legal Affairs & Courts Correspondent"}
.news-card:has(h2 a[href="/features/taiwan-drone-industrial-system.html"]){--story-byline:"WRITTEN BY · NINA KARPOVA · Aerospace, Propulsion & Robotics Correspondent"}
.news-card:has(h2 a[href="/features/court-ai-provenance.html"]){--story-byline:"WRITTEN BY · RILEY HART · Legal Affairs & Courts Correspondent"}
.news-card:has(h2 a[href="/features/roman-data-bottleneck.html"]){--story-byline:"WRITTEN BY · NINA KARPOVA · Aerospace, Propulsion & Robotics Correspondent"}
.news-card:has(h2 a[href="/features/medical-logistics-cyberattack.html"]){--story-byline:"WRITTEN BY · ANDRE SUTTON · Cybersecurity & Network Systems Correspondent"}
.news-card:has(h2 a[href="/features/water-vendor-cyber-supply-chain.html"]){--story-byline:"WRITTEN BY · ANDRE SUTTON · Cybersecurity & Network Systems Correspondent"}
.news-card:has(h2 a[href="/beijing-world-humanoid-robot-games-2026.html"]){--story-byline:"WRITTEN BY · NADIA CALDER · Senior Technology Correspondent"}
.news-card:has(h2 a[href="/features/uap-sensor-chain.html"]){--story-byline:"WRITTEN BY · LEAH REED · Investigative Correspondent"}
.news-card:has(h2 a[href="/features/oswald-shot.html"]){--story-byline:"WRITTEN BY · LEAH REED · Investigative Correspondent"}
.news-card:has(h2 a[href="/features/uap-base-rate.html"]){--story-byline:"WRITTEN BY · LEAH REED · Investigative Correspondent"}
.news-card:has(h2 a[href="/features/jfk-conspiracy-question.html"]){--story-byline:"WRITTEN BY · LEAH REED · Investigative Correspondent"}
.news-card:has(h2 a[href="/features/jfk-acoustics.html"]){--story-byline:"WRITTEN BY · LEAH REED · Investigative Correspondent"}
.news-card:has(h2 a[href="/features/human-in-kill-chain.html"]){--story-byline:"WRITTEN BY · MAYA CHEN · Cybernetics & Human-Machine Systems Correspondent"}

.news-card::after{
  content:var(--story-byline,normal);
  order:1;
  margin-top:auto;
  padding-top:.72rem;
  border-top:1px solid rgba(80,244,255,.14);
  color:#dffbff;
  font:800 .63rem/1.45 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  letter-spacing:.065em;
  text-transform:none;
}
.news-card .news-meta{order:2}
.news-card[style*="--story-byline"] .news-meta,
.news-card:has(h2 a[href="/features/ai-optimization-physical-science.html"]) .news-meta,
.news-card:has(h2 a[href="/features/deimos-rubble-pile-impact.html"]) .news-meta,
.news-card:has(h2 a[href="/features/cold-orb-problem.html"]) .news-meta,
.news-card:has(h2 a[href="/features/ai-electricity-map.html"]) .news-meta,
.news-card:has(h2 a[href="/features/hormuz-engineering-system.html"]) .news-meta,
.news-card:has(h2 a[href="/features/meta-product-design-liability.html"]) .news-meta,
.news-card:has(h2 a[href="/features/taiwan-drone-industrial-system.html"]) .news-meta,
.news-card:has(h2 a[href="/features/court-ai-provenance.html"]) .news-meta,
.news-card:has(h2 a[href="/features/roman-data-bottleneck.html"]) .news-meta,
.news-card:has(h2 a[href="/features/medical-logistics-cyberattack.html"]) .news-meta,
.news-card:has(h2 a[href="/features/water-vendor-cyber-supply-chain.html"]) .news-meta,
.news-card:has(h2 a[href="/beijing-world-humanoid-robot-games-2026.html"]) .news-meta,
.news-card:has(h2 a[href="/features/uap-sensor-chain.html"]) .news-meta,
.news-card:has(h2 a[href="/features/oswald-shot.html"]) .news-meta{
  margin-top:.38rem!important;
  padding-top:0;
  border-top:0;
}

/* Two legacy cards already embedded the author inside status metadata. Remove the duplicate visually. */
.news-card:has(h2 a[href="/features/court-ai-provenance.html"]) .news-meta,
.news-card:has(h2 a[href="/beijing-world-humanoid-robot-games-2026.html"]) .news-meta{font-size:0}
.news-card:has(h2 a[href="/features/court-ai-provenance.html"]) .news-meta::before{content:"PROVENANCE AUDIT";font-size:.82rem}
.news-card:has(h2 a[href="/beijing-world-humanoid-robot-games-2026.html"]) .news-meta::before{content:"REPORTED ANALYSIS / ROLLING EVENT RECORD";font-size:.82rem}

@media(max-width:640px){
  .source-box ul li{padding:.7rem .8rem}
  .article-body a:not(.button),
  .article-shell a:not(.button):not(.media-card),
  .reading-note a:not(.button),
  .prose-card a:not(.button),
  .channel-article a:not(.button){
    text-underline-offset:.16em;
  }
  .article-byline{padding:.8rem}
  .news-card::after{font-size:.6rem;line-height:1.5}
}
