/* NODN homepage layout. */
:root {
  color-scheme: dark;
  --bg: #030810;
  --panel: #081522;
  --edge: #2583a8;
  --cyan: #35d9ff;
  --text: #ecf6ff;
  --muted: #9ab0c5;
  font: 15px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(ellipse 75% 85% at 50% 12%, #0d2942 0%, #081523 48%, transparent 85%), var(--bg);
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.cyan { color: var(--cyan); }
.shell { width: min(1510px, calc(100% - 48px)); margin: auto; }

/* Header and compact welcome area. */
.site-header { background: #03080f; border-bottom: 1px solid #157caa; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); line-height: 1; }
.brand:hover { text-decoration: none; }
.brand img { width: 54px; height: 45px; object-fit: contain; }
.brand b { display: block; font-size: 24px; font-weight: 950; font-style: italic; letter-spacing: -.07em; }
.brand small { display: block; font-size: 9px; letter-spacing: .32em; margin-top: 5px; font-weight: 700; }
nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
nav a { color: #d5e5f1; font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
nav a:hover { color: var(--cyan); text-decoration: none; }
.welcome {
  padding: 14px 0;
  text-align: center;
}
.welcome h1 {
  margin: 0;
  color: #d4e4ef;
  font-size: clamp(16px, 2.5vw, 21px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .12em;
}
.welcome .hang-out { word-spacing: -.1em; }

/* Network information ticker — directly above the camera and chat. */
.info-ticker {
  display: flex;
  align-items: stretch;
  min-height: 26px;
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: 5px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  line-height: 24px;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}
.info-ticker-label {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 10px;
  border-right: 1px solid #2b6d89;
  background: #102a3e;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  white-space: nowrap;
}
.info-ticker-window { display: flex; align-items: center; flex: 1; min-width: 0; overflow: hidden; }
.info-ticker-window:focus-visible { outline: 1px solid var(--cyan); outline-offset: -1px; }
.info-ticker-track {
  display: flex;
  flex: 0 0 auto;
  width: max-content;
  animation: info-ticker-scroll 45s linear infinite;
}
.info-ticker-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-width: min(1510px, 100vw);
  gap: 20px;
  padding: 0 20px 0 12px;
  white-space: nowrap;
}
.info-ticker-group > span {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 24px;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}
.info-ticker-group span::after {
  content: "•";
  margin-left: 20px;
  color: var(--cyan);
}
.info-ticker:hover .info-ticker-track,
.info-ticker:focus-within .info-ticker-track { animation-play-state: paused; }
@keyframes info-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .info-ticker-window { overflow-x: auto; }
  .info-ticker-track { animation: none; }
  .info-ticker-group[aria-hidden="true"] { display: none; }
  .info-ticker-group { min-width: 0; }
}

/* Camera on the left, chat on the right. */
.network {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 14px;
  align-items: stretch;
}
.camera-column { display: grid; align-content: start; gap: 14px; min-width: 0; }
.panel {
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 8px;
  box-shadow: 0 0 18px #00a5e119;
}
.frame-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 9px 12px;
  background: linear-gradient(90deg, #102a3e, #081522);
  border-bottom: 1px solid #2b6d89;
}
.frame-top h2 { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .07em; }
.frame-top h2 span { margin-right: 4px; }
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ff8282;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}
.live-indicator[hidden] { display: none; }
.live-indicator::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff6262;
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse { 50% { box-shadow: 0 0 0 4px #ff626233; opacity: .65; } }
@media (prefers-reduced-motion: reduce) { .live-indicator::before { animation: none; } }
iframe { display: block; width: 100%; border: 0; }
.camera-player { aspect-ratio: 16 / 9; background: #000; }
.camera-caption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 12px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--muted);
}
.chat { display: flex; flex-direction: column; min-height: 520px; }
.chat iframe { flex: 1; min-height: 0; background: #060e19; }

/* Equal-width IRC and network status panels. */
.camera-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.camera-details dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin: 0 0 12px; }
.camera-details dt { color: var(--muted); font-size: 11px; }
.camera-details dd { margin: 0; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.status-link { font-size: 11px; }
#cam-status[data-state="up"], #irc-status[data-state="up"] { color: #61dc91; }
#cam-status[data-state="down"], #irc-status[data-state="down"] { color: #ff8282; }
#cam-status[data-state="pending"], #cam-status[data-state="unknown"],
#irc-status[data-state="pending"], #irc-status[data-state="unknown"] { color: var(--muted); }
.network-status dd[data-state="stale"] { color: #d4b47b; }
@media (max-width: 480px) { .camera-details { grid-template-columns: 1fr; } }

/* IRC connection details. */
.connection-body { padding: 12px; }
button {
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  color: var(--text);
  background: #0b1b2a;
  border: 1px solid #3781a1;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
}
button:hover { background: #123b51; }
#copy-status { color: var(--muted); font-size: 11px; margin: 6px 0 0; }
#copy-status:empty { display: none; }
.footer { padding: 16px 0 24px; color: #7893aa; font-size: 11px; }
.footer-slogan { margin: 0 0 12px; text-align: center; color: var(--muted); font-size: 13px; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
@media (max-width: 800px) { .footer-meta { justify-content: center; text-align: center; } }

/* Smaller screens: camera first, chat immediately underneath. */
@media (max-width: 1000px) {
  .header-inner { flex-direction: column; justify-content: center; padding: 14px 0; gap: 12px; }
  nav { gap: 8px 16px; }
}
@media (max-width: 800px) {
  .shell { width: calc(100% - 24px); }
  .network { grid-template-columns: 1fr; }
  .camera-column { display: contents; }
  .camera-column > .panel:first-child { grid-row: 1; }
  .chat { grid-row: 2; height: 550px; min-height: 0; }
  .camera-details { grid-row: 3; }
}

/* Original four-column network feature strip. */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
  padding: 15px 0;
  border-block: 1px solid #1d5876;
  background: #08111d80;
}
.feature-strip > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 0 12px;
  border-right: 1px solid #18364b;
}
.feature-strip > div:last-child { border: 0; }
.feature-strip > div > span { font-size: 29px; color: #63d9f8; line-height: 1; }
.feature-strip p { margin: 0; }
.feature-strip b, .feature-strip small { display: block; }
.feature-strip b { font-size: 11px; letter-spacing: .05em; }
.feature-strip small { color: var(--muted); font-size: 11px; }

@media (max-width: 800px) {
  .feature-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .feature-strip > div:nth-child(2) { border: 0; }
}
@media (max-width: 480px) {
  .feature-strip > div { justify-content: flex-start; padding: 0 8px; }
  .feature-strip small { font-size: 10px; }
}
