:root {
  --bg: #080f17;
  --panel: #101d28b3;
  --accent: #59e1e8;
  --muted: #8195a7;
  --border: #233341;
  --transition: 650ms;
  color-scheme: dark
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--bg);
  color: #eff6fc;
  font-family: Inter, "Segoe UI", Arial, sans-serif
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 75% 25%, #14364444, transparent 55%), linear-gradient(120deg, transparent 20%, #13223430);
  z-index: -1
}

.screen {
  max-width: 2400px;
  margin: auto;
  padding: 2.5vh 3.2vw 1.6vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 2.1vh
}

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 2.2vh;
  border-bottom: 1px solid var(--border)
}

a {
  color: inherit;
  text-decoration: none
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 750;
  letter-spacing: 2px;
  font-size: clamp(17px, 1.3vw, 30px)
}

.brand-icon {
  font-size: 40px;
  color: var(--accent);
  border: 1px solid #385a65;
  border-radius: 10px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: #19333d66
}

.brand-light {
  font-weight: 350;
  color: #adbcca
}

.brand small {
  display: block;
  font-size: .44em;
  letter-spacing: 3px;
  margin-top: 6px;
  color: var(--muted)
}

.top-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(10px, .7vw, 17px);
  letter-spacing: 1.5px;
  color: #a5b8c7
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: var(--accent);
  box-shadow: 0 0 9px #59e1e855;
  flex-shrink: 0
}

.divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 12px
}

.admin-link {
  font-size: 24px;
  color: var(--muted)
}

.overview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2vh 0 .8vh
}

.eyebrow {
  font-size: clamp(9px, .65vw, 16px);
  letter-spacing: 2.8px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px
}

.tiny-line {
  width: 20px;
  height: 2px;
  background: var(--accent)
}

h1 {
  font-size: clamp(26px, 2.45vw, 59px);
  font-weight: 450;
  letter-spacing: -1.5px;
  margin: 1vh 0
}

h1 span {
  color: var(--accent)
}

.overview-meta {
  text-align: right
}

.overview-meta>span {
  font-size: clamp(25px, 2vw, 48px);
  font-weight: 300
}

.overview-meta small {
  display: block;
  color: var(--muted);
  font-size: clamp(8px, .58vw, 14px);
  letter-spacing: 2px;
  margin-top: 4px
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 25%;
  gap: 1.6vw;
  flex: 1;
  min-height: 0
}

.news-panel,
.side-panel>section,
.queue-card {
  background: linear-gradient(130deg, #162531a6, #0e1a25b0);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(12px)
}

.news-panel {
  padding: 2.3vh 2vw 1.7vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative
}

.panel-label {
  display: flex;
  justify-content: space-between;
  font-size: clamp(9px, .65vw, 16px);
  color: #8ea7b9;
  letter-spacing: 2px;
  align-items: center
}

.panel-label .live-dot {
  width: 5px;
  height: 5px;
  margin-right: 7px
}

.hero {
  position: relative;
  padding: 3.7vh 0 2vh;
  flex: 1;
  min-height: 36vh;
  transition: opacity var(--transition), transform var(--transition)
}

.hero.changing {
  opacity: 0
}

.hero.slide.changing {
  transform: translateX(-22px)
}

.story-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
  z-index: 1
}

.category {
  color: var(--accent);
  font-size: clamp(10px, .75vw, 18px);
  letter-spacing: 1.4px;
  font-weight: 600;
  text-transform: uppercase
}

.priority {
  font-size: clamp(9px, .6vw, 15px);
  color: #f0bb7b;
  border: 1px solid #aa773750;
  border-radius: 4px;
  padding: 4px 7px;
  letter-spacing: 1px
}

.priority:empty {
  display: none
}

h2 {
  font-size: clamp(30px, 3.15vw, 76px);
  font-weight: 560;
  line-height: 1.16;
  letter-spacing: -1.4px;
  max-width: 85%;
  margin: 2.2vh 0;
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden
}

#excerpt {
  font-size: clamp(15px, 1.22vw, 29px);
  line-height: 1.6;
  color: #a6b8c8;
  max-width: 78%;
  margin: 0 0 3vh;
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.story-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
  margin-top: auto
}

.publisher-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #25414e;
  border-radius: 7px;
  color: var(--accent);
  font-weight: 700
}

.story-bottom strong {
  display: block;
  font-size: clamp(12px, .85vw, 20px);
  font-weight: 550
}

.story-bottom span {
  display: block;
  color: var(--muted);
  font-size: clamp(10px, .67vw, 16px);
  margin-top: 5px
}

.read-story {
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  text-align: center;
  line-height: 34px;
  color: var(--accent)
}

.hero-art {
  position: absolute;
  right: -11%;
  top: 8%;
  width: 44%;
  aspect-ratio: 1;
  opacity: .22;
  pointer-events: none
}

.radar-ring {
  position: absolute;
  inset: 0;
  border: 1px solid #4fa7ba;
  border-radius: 50%
}

.r2 {
  inset: 16%
}

.r3 {
  inset: 32%;
  border-style: dashed
}

.radar-center {
  position: absolute;
  inset: 40%;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 60px
}

.hero-art:before,
.hero-art:after {
  content: "";
  position: absolute;
  background: #4fa7ba;
  opacity: .5
}

.hero-art:before {
  width: 1px;
  height: 100%;
  left: 50%
}

.hero-art:after {
  height: 1px;
  width: 100%;
  top: 50%
}

.radar-node {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent)
}

.n1 {
  left: 25%;
  top: 22%
}

.n2 {
  left: 63%;
  top: 66%
}

.n3 {
  left: 8%;
  top: 60%
}

.art-coordinate {
  position: absolute;
  bottom: -40px;
  left: 30px;
  font-size: 8px;
  letter-spacing: 2px;
  line-height: 2
}

.rotation {
  position: relative;
  z-index: 1
}

.progress-track {
  height: 2px;
  background: #253746;
  overflow: hidden
}

#progress {
  height: 100%;
  width: 0;
  background: var(--accent)
}

.rotation-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: clamp(8px, .6vw, 14px);
  letter-spacing: 1.4px;
  color: var(--muted)
}

button {
  font: inherit;
  cursor: pointer;
  background: none;
  color: inherit;
  border: none
}

.rotation-controls button {
  font-size: 18px;
  padding: 4px 12px
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5vw
}

.world-panel {
  padding: 2.3vh 1.6vw;
  flex: 1
}

.clock {
  padding: 1.7vh 0;
  border-bottom: 1px solid var(--border);
  position: relative
}

.clock:last-child {
  border: 0;
  padding-bottom: 0
}

.clock>div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px
}

.city {
  font-size: clamp(12px, .9vw, 22px)
}

.zone-label {
  color: #6d879b;
  font-size: clamp(7px, .47vw, 12px);
  letter-spacing: 1px
}

.clock time {
  font-variant-numeric: tabular-nums;
  font-size: clamp(27px, 2.6vw, 62px);
  font-weight: 320;
  letter-spacing: 1px;
  display: inline-block;
  margin-top: 5px
}

.clock time small {
  font-size: .45em;
  color: #688699
}

.clock-date {
  font-size: clamp(8px, .6vw, 14px);
  color: var(--muted);
  float: right;
  margin-top: 22px
}

.weather-panel {
  padding: 2vh 1.6vw
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 1.4vh 0
}

.weather-main>span {
  font-size: clamp(30px, 3vw, 72px);
  font-weight: 300;
  white-space: nowrap
}

.weather-main small {
  font-size: .4em;
  color: var(--muted)
}

.weather-main strong {
  display: block;
  font-size: clamp(11px, .85vw, 20px);
  font-weight: 450
}

.weather-main div>span {
  display: block;
  font-size: clamp(9px, .62vw, 15px);
  color: var(--muted);
  margin-top: 7px
}

.weather-footer {
  display: flex;
  justify-content: space-between;
  color: #718b9c;
  font-size: clamp(8px, .5vw, 12px);
  letter-spacing: .5px
}

.queue {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6vw;
  min-height: 11vh
}

.queue:empty {
  display: none
}

.queue-card {
  padding: 1.7vh 1.3vw;
  display: flex;
  gap: 1vw;
  align-items: start;
  text-align: left
}

.queue-index {
  font-size: clamp(22px, 1.6vw, 38px);
  color: #3a596c;
  font-weight: 300
}

.queue-card small {
  font-size: clamp(8px, .57vw, 14px);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px
}

.queue-card h3 {
  font-size: clamp(13px, .95vw, 23px);
  font-weight: 450;
  line-height: 1.45;
  margin: 6px 0 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.queue-card p {
  font-size: clamp(9px, .6vw, 15px);
  color: var(--muted);
  margin: 0
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #6f8799;
  font-size: clamp(8px, .6vw, 14px);
  letter-spacing: .4px;
  padding-top: .5vh
}

footer>div {
  display: flex;
  align-items: center;
  gap: 10px
}

.footer-divider {
  margin: 0 10px;
  color: #334f62
}

footer button {
  letter-spacing: 1px;
  font-size: clamp(9px, .57vw, 14px)
}

button:hover,
a:hover {
  color: var(--accent)
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px
}

[hidden] {
  display: none !important
}

@media(min-width:1400px) and (min-height:800px) {
  .screen {
    height: 100vh;
    overflow: hidden
  }

  .hero {
    min-height: 0
  }
}

@media(max-width:850px) {
  .screen {
    padding: 20px;
    gap: 20px
  }

  .content-grid {
    grid-template-columns: 1fr
  }

  .side-panel {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 15px
  }

  .world-panel,
  .weather-panel {
    padding: 20px
  }

  .clock {
    padding: 10px 0
  }

  .clock time {
    font-size: 30px
  }

  .hero {
    padding-top: 25px;
    min-height: 350px
  }

  h2 {
    max-width: 95%;
    font-size: 36px
  }

  #excerpt {
    max-width: 90%;
    font-size: 17px
  }

  .news-panel {
    padding: 20px
  }

  .queue {
    gap: 12px
  }

  .queue-card {
    padding: 15px
  }

  .queue-index {
    display: none
  }

  .top-status #header-date,
  .top-status .divider {
    display: none
  }

  .overview-meta {
    display: none
  }

  h1 {
    font-size: 30px
  }

  .hero-art {
    opacity: .13
  }

  .zone-label {
    font-size: 8px
  }

  footer>div>span:last-child,
  .footer-divider {
    display: none
  }
}

@media(max-width:540px) {
  .side-panel {
    grid-template-columns: 1fr
  }

  .world-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px
  }

  .world-panel .panel-label {
    width: 100%
  }

  .clock {
    flex: 1;
    border: 0
  }

  .clock>div {
    display: block
  }

  .zone-label {
    display: block;
    margin-top: 5px
  }

  .clock-date {
    float: none;
    display: block;
    margin: 0
  }

  .clock time {
    font-size: 26px
  }

  .queue {
    grid-template-columns: 1fr
  }

  .queue-card h3 {
    font-size: 16px
  }

  .queue-card small,
  .queue-card p {
    font-size: 10px
  }

  .top-status {
    font-size: 8px;
    letter-spacing: .5px
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 30px
  }

  .brand {
    font-size: 16px;
    gap: 8px
  }

  .admin-link {
    font-size: 20px
  }

  .topbar {
    gap: 12px
  }

  h2 {
    font-size: 31px
  }

  .weather-main {
    justify-content: space-between
  }

  .weather-main>span {
    font-size: 45px
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    transition: none !important;
    animation: none !important
  }
}

/* Keep physical text proportions consistent on native 4K television output. */
@media(min-width:2500px) {
  .screen {
    max-width: none
  }

  .brand {
    font-size: 1.3vw
  }

  .brand-icon {
    width: 2.5vw;
    height: 2.5vw;
    font-size: 2.1vw;
    border-radius: .5vw
  }

  .top-status {
    font-size: .7vw
  }

  .admin-link {
    font-size: 1.25vw
  }

  .eyebrow {
    font-size: .65vw
  }

  h1 {
    font-size: 2.45vw
  }

  .overview-meta>span {
    font-size: 2vw
  }

  .overview-meta small {
    font-size: .58vw
  }

  .panel-label {
    font-size: .65vw
  }

  .category {
    font-size: .75vw
  }

  .priority {
    font-size: .6vw
  }

  h2 {
    font-size: 3.15vw
  }

  #excerpt {
    font-size: 1.22vw
  }

  .story-bottom strong {
    font-size: .85vw
  }

  .story-bottom span {
    font-size: .67vw
  }

  .publisher-mark {
    width: 1.9vw;
    height: 1.9vw;
    font-size: 1vw
  }

  .city {
    font-size: .9vw
  }

  .zone-label {
    font-size: .47vw
  }

  .clock time {
    font-size: 2.6vw
  }

  .clock-date {
    font-size: .6vw;
    margin-top: 2.2vh
  }

  .weather-main>span {
    font-size: 3vw
  }

  .weather-main strong {
    font-size: .85vw
  }

  .weather-main div>span {
    font-size: .62vw
  }

  .weather-footer {
    font-size: .5vw
  }

  .queue-index {
    font-size: 1.6vw
  }

  .queue-card small {
    font-size: .57vw
  }

  .queue-card h3 {
    font-size: .95vw
  }

  .queue-card p {
    font-size: .6vw
  }

  .rotation-controls {
    font-size: .6vw
  }

  .rotation-controls button {
    font-size: 1vw
  }

  footer {
    font-size: .6vw
  }

  footer button {
    font-size: .57vw
  }

  .hero-art {
    opacity: .18
  }
}

@media(min-width:1400px) and (min-height:800px) {
  .hero {
    display: flex;
    flex-direction: column;
    padding-top: 2.8vh
  }

  .hero h2 {
    font-size: 2.8vw;
    max-width: 90%;
    -webkit-line-clamp: 3;
    flex-shrink: 0
  }

  .hero #excerpt {
    -webkit-line-clamp: 2;
    margin-bottom: 2vh;
    flex-shrink: 0
  }

  .story-meta,
  .story-bottom {
    flex-shrink: 0
  }

  .story-bottom {
    margin-bottom: .6vh
  }
}

.queue {
  grid-template-columns: repeat(var(--queue-cols, 3), minmax(0, 1fr))
}

.content-grid.without-sidebar {
  grid-template-columns: 1fr
}

.without-sidebar .side-panel {
  display: none
}

h2,
.queue-card h3 {
  overflow-wrap: anywhere
}

@media(max-width:540px) {
  .queue {
    grid-template-columns: 1fr
  }

  .clock {
    min-width: 0
  }

  .clock time {
    font-size: 22px;
    letter-spacing: 0
  }

  .clock .zone-label {
    font-size: 7px
  }

  .hero h2 {
    max-width: 100%;
    -webkit-line-clamp: unset
  }

  .hero #excerpt {
    -webkit-line-clamp: unset
  }

  .hero-art .art-coordinate {
    display: none
  }
}

/* Bound desktop rows independently of article length and browser chrome. */
@media (min-width: 851px) and (min-height: 600px) {
  .screen {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    height: 100dvh;
    min-height: 0;
    gap: 1.5vh;
    overflow: hidden;
  }

  .content-grid,
  .news-panel,
  .side-panel,
  .world-panel {
    min-height: 0;
    min-width: 0;
  }

  .news-panel,
  .side-panel > section {
    overflow: hidden;
  }

  .hero {
    display: flex;
    flex-direction: column;
    container-type: size;
    min-height: 0;
    padding: 2vh 0 1vh;
    overflow: hidden;
  }

  .hero h2 {
    font-size: clamp(24px, min(2.8vw, 10cqh), 110px);
    max-width: 90%;
    margin: 1.4vh 0;
    -webkit-line-clamp: 3;
    flex-shrink: 0;
  }

  .hero #excerpt {
    font-size: clamp(12px, min(1.22vw, 5cqh), 48px);
    line-height: 1.5;
    -webkit-line-clamp: 2;
    margin-bottom: 1.4vh;
    flex-shrink: 0;
  }

  .story-meta,
  .story-bottom,
  .rotation {
    flex-shrink: 0;
  }

  .story-bottom {
    margin-top: auto;
    margin-bottom: 0;
  }

  .side-panel {
    gap: 1.5vh;
  }

  .world-panel {
    padding: 1.6vh 1.6vw;
  }

  .clock {
    padding: 1vh 0;
  }

  .clock time {
    font-size: clamp(24px, min(2.6vw, 4.6vh), 100px);
  }

  .queue {
    height: clamp(80px, 12vh, 260px);
    min-height: 0;
  }

  .queue-card {
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    padding: 1.2vh 1.3vw;
  }

  .queue-card > div {
    min-width: 0;
  }

  .queue-card small,
  .queue-card p {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  footer {
    min-width: 0;
  }

  footer > div {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
  }

  #fullscreen {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

.story-visual {
  position: absolute;
  inset: 2vh 0 2vh auto;
  width: 33%;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0a1823;
  overflow: hidden;
}
.story-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.story-visual figcaption {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  padding: 22px 12px 10px;
  background: linear-gradient(transparent, #06101de6);
  color: #d0e3ed;
  font-size: clamp(9px, .6vw, 22px);
  letter-spacing: .5px;
}
.hero.with-image h2,
.hero.with-image #excerpt {
  max-width: 62%;
}
.hero.with-image .story-bottom {
  width: 62%;
}
.story-bottom > div:nth-child(2) {
  min-width: 0;
}
.story-bottom strong,
.story-bottom span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.publisher-mark,
.read-story {
  flex-shrink: 0;
}
@media (max-width: 850px) {
  .story-visual {
    position: relative;
    inset: auto;
    width: 100%;
    height: 220px;
    margin-bottom: 24px;
  }
  .hero.with-image h2,
  .hero.with-image #excerpt {
    max-width: 100%;
  }
  .hero.with-image .story-bottom {
    width: 100%;
  }
  .story-visual figcaption {
    font-size: 11px;
  }
}

/* Let descriptions fill the space left by the headline and attribution. */
@media (min-width: 851px) and (min-height: 600px) {
  .hero #excerpt {
    flex: 1 1 0;
    min-height: 0;
    display: block;
    -webkit-line-clamp: unset;
  }
  #excerpt-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--excerpt-lines, 12);
    overflow: hidden;
  }
}

/* Header utilities leave the full middle column available for news. */
.content-grid {
  grid-template-columns: minmax(0, 1fr);
}
.topbar {
  gap: 1.5vw;
}
.brand,
.admin-link {
  flex-shrink: 0;
}
.header-widgets {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2vw;
  margin-left: auto;
  min-width: 0;
}
.topbar .world-panel {
  display: flex;
  align-items: center;
  gap: 1.6vw;
  padding: 0;
  flex: none;
}
.topbar .world-panel > .panel-label,
.topbar .zone-label,
.topbar .clock-date {
  display: none;
}
.topbar .clock {
  padding: 0;
  border: 0;
  flex: none;
}
.topbar .clock > div {
  display: block;
}
.topbar .city {
  font-size: clamp(10px, .8vw, 30px);
  color: #a5b8c7;
}
.topbar .clock time {
  font-size: clamp(22px, 1.9vw, 74px);
  line-height: 1.15;
  margin-top: 4px;
}
.topbar .weather-panel {
  padding: 0 0 0 1.6vw;
  border-left: 1px solid var(--border);
}
.topbar .weather-panel .panel-label {
  font-size: clamp(8px, .55vw, 22px);
  letter-spacing: 1px;
  gap: 8px;
}
.topbar .weather-main {
  margin: 3px 0;
  gap: 12px;
}
.topbar .weather-main > span {
  font-size: clamp(24px, 1.9vw, 74px);
  line-height: 1.1;
}
.topbar .weather-main strong {
  font-size: clamp(10px, .75vw, 28px);
}
.topbar .weather-main div > span {
  font-size: clamp(9px, .6vw, 24px);
  margin-top: 3px;
}
.topbar .weather-footer {
  font-size: clamp(7px, .45vw, 18px);
  gap: 12px;
  letter-spacing: 0;
}
.topbar .top-status {
  margin-left: 0;
  white-space: nowrap;
}
@media (max-width: 1600px) {
  .topbar #header-date,
  .topbar .top-status .divider {
    display: none;
  }
  .topbar .top-status {
    font-size: 9px;
    letter-spacing: .6px;
    gap: 6px;
  }
}
@media (max-width: 1100px) and (min-width: 851px) {
  .topbar .brand {
    font-size: 15px;
    gap: 8px;
  }
  .topbar .brand-icon {
    width: 34px;
    height: 34px;
    font-size: 28px;
  }
  .topbar .brand small {
    letter-spacing: 1.5px;
  }
  .topbar .top-status {
    display: none;
  }
}
@media (max-width: 850px) {
  .topbar {
    flex-wrap: wrap;
    gap: 16px;
  }
  .topbar .brand {
    order: 0;
  }
  .topbar .top-status {
    order: 1;
    margin-left: auto;
  }
  .topbar .admin-link {
    order: 2;
  }
  .header-widgets {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 20px;
    padding-top: 8px;
  }
  .topbar .world-panel {
    gap: 20px;
  }
  .topbar .weather-panel {
    padding-left: 16px;
  }
  .topbar .weather-footer {
    flex-wrap: wrap;
    gap: 4px;
  }
}
@media (max-width: 540px) {
  .header-widgets {
    flex-wrap: wrap;
    gap: 16px;
  }
  .topbar .world-panel {
    justify-content: space-between;
    width: 100%;
  }
  .topbar .clock time {
    font-size: 26px;
  }
  .topbar .weather-panel {
    width: 100%;
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .topbar .weather-main {
    justify-content: flex-start;
  }
  .topbar .weather-footer {
    justify-content: space-between;
  }
}

/* West-to-east clocks, with Stockholm as the primary time reference. */
.topbar .world-panel {
  gap: 1.1vw;
}
.topbar .clock time {
  font-size: clamp(22px, 1.65vw, 64px);
}
.topbar .clock-primary {
  padding: .6vh .7vw;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.topbar .clock-primary .city {
  color: var(--accent);
  font-weight: 650;
}
.topbar .clock-primary time {
  font-size: clamp(28px, 2.15vw, 84px);
  font-weight: 500;
}
@media (max-width: 700px) {
  .header-widgets {
    flex-wrap: wrap;
  }
  .topbar .world-panel {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .topbar .weather-panel {
    width: 100%;
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .topbar .weather-main {
    justify-content: flex-start;
  }
}
@media (max-width: 540px) {
  .topbar .world-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .topbar .clock {
    padding: 8px 10px;
  }
  .topbar .clock-primary {
    padding: 8px 10px;
  }
}

/* Quiet console motion: compositor-friendly sweeps, pulses and image drift. */
.ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#59e1e809 1px, transparent 1px), linear-gradient(90deg, #59e1e809 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(transparent, #0009 35%, transparent);
}
.ambient::after {
  content: "";
  position: absolute;
  width: 48vmin;
  aspect-ratio: 1;
  right: -12vmin;
  top: 12vh;
  border-radius: 50%;
  opacity: .45;
  background: conic-gradient(from 0deg, transparent 0deg 305deg, #59e1e80d 335deg, #59e1e842 359deg, transparent 360deg), repeating-radial-gradient(circle, transparent 0 15%, #59e1e814 15.2% 15.5%, transparent 15.8% 23%);
  animation: radar-sweep 32s linear infinite;
}
.news-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .7;
  pointer-events: none;
  animation: perimeter-sweep 11s linear infinite;
}
.news-panel::after {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  opacity: .4;
  background: linear-gradient(var(--accent), var(--accent)) top left / 20px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top left / 1px 20px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 20px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 1px 20px no-repeat;
}
.live-dot {
  animation: signal-pulse 3.8s ease-in-out infinite;
}
.topbar .clock-primary {
  position: relative;
}
.clock-primary::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  pointer-events: none;
  opacity: .1;
  animation: signal-pulse 5s ease-in-out infinite;
}
.hero.changing {
  transform: translateY(8px);
}
.story-visual img {
  animation: image-drift 28s ease-in-out infinite alternate;
}
.story-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(transparent 42%, #59e1e80c 49.5%, #b9ffff24 50%, #59e1e80c 50.5%, transparent 58%);
  animation: image-scan 16s ease-in-out infinite;
}
.story-visual figcaption {
  z-index: 1;
}
.queue-card {
  transition: transform 220ms ease, border-color 220ms ease, background-color 220ms ease;
  animation: queue-arrive 550ms ease-out backwards;
}
.queue-card:nth-child(2) { animation-delay: 80ms; }
.queue-card:nth-child(3) { animation-delay: 160ms; }
.queue-card:hover,
.queue-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent);
  background-color: #173441;
}
#progress {
  box-shadow: 0 0 10px #59e1e860;
  transition: width 100ms linear;
}
@keyframes radar-sweep { to { transform: rotate(360deg); } }
@keyframes perimeter-sweep {
  0%, 15% { transform: translateX(0); opacity: 0; }
  25% { opacity: .7; }
  80% { opacity: .7; }
  100% { transform: translateX(360%); opacity: 0; }
}
@keyframes signal-pulse {
  0%, 100% { opacity: .4; }
  50% { opacity: 1; }
}
@keyframes image-drift {
  from { transform: scale(1); }
  to { transform: scale(1.035); }
}
@keyframes image-scan {
  0%, 15% { transform: translateY(-100%); opacity: 0; }
  25% { opacity: .7; }
  70% { opacity: .7; }
  90%, 100% { transform: translateY(100%); opacity: 0; }
}
@keyframes queue-arrive {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
:root.motion-paused *,
:root.motion-paused *::before,
:root.motion-paused *::after {
  animation-play-state: paused !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .hero.changing,
  .queue-card:hover,
  .queue-card:focus-visible {
    transform: none;
  }
}

/* A fictional threat readout complements the ambient radar. */
.tracking-console {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1vw;
  margin-left: auto;
  margin-right: 2.5vw;
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  min-width: 0;
}
.tracking-map {
  width: clamp(74px, 5vw, 190px);
  height: clamp(54px, 3.8vw, 145px);
  position: relative;
  overflow: hidden;
  border: 1px solid #59e1e82b;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent 49.5%, #59e1e835 50%, transparent 50.5%), linear-gradient(transparent 49.5%, #59e1e835 50%, transparent 50.5%), repeating-linear-gradient(0deg, #59e1e809 0 1px, transparent 1px 12px), #0c202c66;
}
.tracking-target {
  position: absolute;
  left: calc(50% - 9px);
  top: calc(50% - 9px);
  width: 18px;
  height: 18px;
  border: 1px solid var(--accent);
  box-shadow: 0 0 12px #59e1e845;
  transform: translate(var(--track-x, 0px), var(--track-y, 0px));
  transition: transform 1s linear;
}
.tracking-target::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.tracking-label {
  font-size: clamp(8px, .58vw, 22px);
  letter-spacing: 1.4px;
}
.tracking-disclaimer {
  display: block;
  font-size: clamp(8px, .48vw, 18px);
  letter-spacing: .7px;
  color: #718d9e;
}
.story-visual,
.queue-visual {
  border-radius: 14px 3px 14px 3px;
  border-color: #59e1e84d;
  box-shadow: inset 0 0 22px #59e1e814, 0 0 20px #12557219;
  isolation: isolate;
}
.story-visual::before,
.queue-visual::after {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(var(--accent),var(--accent)) top left / 20px 2px no-repeat,
    linear-gradient(var(--accent),var(--accent)) top left / 2px 20px no-repeat,
    linear-gradient(#9c8bff,#9c8bff) bottom right / 20px 2px no-repeat,
    linear-gradient(#9c8bff,#9c8bff) bottom right / 2px 20px no-repeat;
  opacity: .8;
}
.story-visual figcaption {
  font-family: "SFMono-Regular", Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: linear-gradient(transparent, #06101df2);
}
.queue-card.has-thumbnail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) clamp(65px, 7vw, 260px);
  align-items: center;
  gap: 1vw;
}
.queue-visual {
  display: block;
  position: relative;
  height: 100%;
  min-height: 48px;
  min-width: 0;
  border: 1px solid #59e1e84d;
  overflow: hidden;
  background: #0b1d2b;
}
.queue-visual img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}
.queue-card:hover .queue-visual img { transform: scale(1.07); }
@media (max-width: 1100px) {
  .tracking-console { margin-right: 1vw; gap: 10px; }
  }
@media (max-width: 850px) {
  .overview { flex-wrap: wrap; gap: 16px; }
  .tracking-console { margin: 0; }
  .queue-card.has-thumbnail { grid-template-columns: minmax(0, 1fr) 80px; }
  .queue-card.has-thumbnail .queue-index { display: none; }
}
@media (max-width: 540px) {
  .tracking-console { width: 100%; }
    .queue-card.has-thumbnail { grid-template-columns: minmax(0, 1fr) 90px; }
  .queue-visual { min-height: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  .tracking-target { transition: none; }
  .queue-card:hover .queue-visual img { transform: none; }
}

/* Stylized world-map threat simulation. */
.tracking-map {
  width: clamp(120px, 12vw, 440px);
  height: clamp(62px, 5.6vw, 205px);
}
.threat-world-map {
  width: 100%;
  height: 100%;
  display: block;
}
.world-land { fill: #164051; stroke: #65d6dc; stroke-width: 2; stroke-opacity: .55; }
.world-links { fill: none; stroke: #68e5ed; stroke-width: 2; stroke-dasharray: 5 8; opacity: .5; animation: world-traffic 9s linear infinite; }
.world-nodes { fill: #8ff8eb; }
.world-scan {
  position: absolute;
  inset: 0 auto 0 -25%;
  width: 25%;
  background: linear-gradient(90deg, transparent, #59e1e822, #b6ffff55);
  animation: world-search 7s ease-in-out infinite alternate;
}
.tracking-target {
  left: 22%;
  top: 32%;
  transform: translate(-50%, -50%);
  transition: left 1s ease-in-out, top 1s ease-in-out;
}
.threat-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: clamp(10px, .8vw, 30px);
  margin: 6px 0;
}
#threat-signal { color: #859eae; font-size: .75em; letter-spacing: 1.5px; }
.tracking-console[data-phase="located"] .tracking-target { border-color: #ffc278; box-shadow: 0 0 16px #ffc27866; }
.tracking-console[data-phase="located"] .tracking-target::after { background: #ffc278; }
.tracking-console[data-phase="located"] #tracking-phase { color: #ffc278; }
@keyframes world-traffic { to { stroke-dashoffset: -104; } }
@keyframes world-search { to { transform: translateX(500%); } }
@media (prefers-reduced-motion: reduce) {
  .tracking-target { transition: none; }
  .world-links, .world-scan { animation: none !important; }
}

/* One compact header; news starts immediately beneath it. */
.topbar .header-widgets { gap: 1.2vw; }
.topbar .tracking-console {
  margin: 0;
  gap: .65vw;
  padding-left: 1.2vw;
  border-left: 1px solid var(--border);
}
.topbar .tracking-map {
  width: clamp(75px, 6vw, 230px);
  height: clamp(40px, 3vw, 115px);
}
.topbar .tracking-label { font-size: clamp(7px, .45vw, 18px); letter-spacing: .7px; }
/* Reserve the longest status and region so animation text cannot resize the header. */
.topbar #tracking-phase {
  display: inline-block;
  width: calc(8ch + 5.6px);
}
.topbar .tracking-label { white-space: nowrap; }
.topbar #threat-region { min-width: 13ch; white-space: nowrap; }
.topbar .threat-summary { font-size: clamp(10px, .65vw, 25px); margin: 4px 0; gap: 2px; }
.topbar .tracking-disclaimer {
  max-width: 14em;
  font-size: clamp(6px, .34vw, 14px);
  letter-spacing: .4px;
}
@media (min-width: 851px) and (min-height: 600px) {
  .screen:has(.queue:empty) { grid-template-rows: auto minmax(0, 1fr) auto; }
}
@media (max-width: 1900px) {
  .topbar #header-date,
  .topbar .top-status .divider { display: none; }
}
@media (max-width: 1600px) and (min-width: 851px) {
  .topbar { gap: 1vw; }
  .topbar .top-status { display: none; }
  .topbar .world-panel { gap: .8vw; }
  .topbar .tracking-disclaimer { max-width: 15em; }
}
@media (max-width: 1150px) and (min-width: 851px) {
  .topbar .header-widgets { flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; }
  .topbar .world-panel { justify-content: space-between; width: 100%; }
  .topbar .weather-panel { border-left: 0; padding-left: 0; }
  .topbar .tracking-console { width: auto; }
}
@media (max-width: 850px) {
  .topbar .header-widgets { flex-wrap: wrap; gap: 16px; }
  .topbar .tracking-console { width: auto; flex: 1; min-width: 180px; padding-left: 12px; }
  .topbar .tracking-map { width: 100px; height: 48px; }
  .topbar .tracking-disclaimer { max-width: 20em; }
}
@media (max-width: 540px) {
  .topbar .tracking-console { width: 100%; flex: none; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .topbar .tracking-map { width: 120px; height: 56px; }
}

/* Instrument-style world clocks, with a brighter home time reference. */
.topbar .clock {
  isolation: isolate;
  border-radius: 3px;
  background: linear-gradient(135deg, #15334280, #09192330);
  box-shadow: inset 0 1px #79cbd929, inset 0 -1px #79cbd91a;
}
.topbar .clock::before {
  content: "";
  position: absolute;
  inset: -5px -6px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(var(--accent), var(--accent)) top left / 9px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top left / 1px 9px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 9px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 1px 9px no-repeat;
  opacity: .35;
}
.topbar .clock .city {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(9px, .64vw, 25px);
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #91adbf;
}
.topbar .clock time {
  color: #d3edf3;
  font-weight: 500;
  text-shadow: 0 0 12px #70d9eb30;
  white-space: nowrap;
}
.topbar .clock time small {
  display: inline-block;
  min-width: 3ch;
  color: #71a6b9;
  font-weight: 400;
  vertical-align: baseline;
}
.topbar .clock-primary {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  border-radius: 4px;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #59e1e805 3px 4px),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 15%, #0a1b29), #0a1b29);
  box-shadow: inset 0 1px #befff033, 0 0 20px #59e1e812;
}
.topbar .clock-primary::before { opacity: .8; }
.topbar .clock-primary::after { border-radius: 6px; }
.topbar .clock-primary .city,
.topbar .clock-primary time small { color: var(--accent); }
.topbar .clock-primary time {
  color: #e1fffa;
  text-shadow: 0 0 16px color-mix(in srgb, var(--accent) 35%, transparent);
}
@media (min-width: 701px) and (max-width: 850px) {
  .topbar .world-panel { gap: .7vw; }
}

/* Local vector flags stay visible independently of emoji font support. */
.topbar .clock[data-zone="America/New_York"] { --clock-flag: url("images/flags/us.svg"); }
.topbar .clock[data-zone="Europe/Stockholm"] { --clock-flag: url("images/flags/se.svg"); }
.topbar .clock[data-zone="Europe/Moscow"] { --clock-flag: url("images/flags/ru.svg"); }
.topbar .clock[data-zone="Asia/Tokyo"] { --clock-flag: url("images/flags/jp.svg"); }
.topbar .clock {
  background-color: #0a1b29;
  background-image: linear-gradient(180deg, #081724a6, #081724eb),
    repeating-linear-gradient(0deg, #08172433 0 1px, transparent 1px 4px), var(--clock-flag);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}
.topbar .clock .city {
  color: #c1d5df;
  text-shadow: 0 1px 4px #020b13;
}
.topbar .clock time { text-shadow: 0 1px 5px #020b13, 0 0 12px #70d9eb30; }
.topbar .clock-primary .city { color: var(--accent); }
