/* ==================================================
   LOW SIGNAL — FULL WIRED + MAX CRT + FLAT CURSOR
   ================================================== */

:root{
  --bg:#0b0c0e;
  --bg2:#101114;
  --text:#e6e6e6;
  --muted:#9aa0a6;

  --line:rgba(230,230,230,.12);
  --line2:rgba(230,230,230,.08);

  --accent:#7aa2f7;
  --on:#6fbf8f;

  --max:1120px;
  --pad:44px;

  --mono:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 18% 10%, rgba(255,255,255,.05), transparent 60%),
    radial-gradient(900px 500px at 82% 20%, rgba(255,255,255,.035), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  font-family:var(--sans);
  letter-spacing:.01em;

  text-shadow:
    0 0 10px rgba(122,162,247,0.10),
    0 0 22px rgba(230,230,230,0.04);
}

.mono{ font-family:var(--mono); }
.muted{ color:var(--muted); }

/* ==================================================
   FLAT 2D SIGNAL CURSOR — BIGGER + THICKER
   ================================================== */

/* default cursor */
*{
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='16' cy='16' r='9' fill='rgba(230,230,230,0.28)' stroke='rgba(230,230,230,0.5)' stroke-width='3'/%3E%3C/svg%3E") 16 16, auto;
}

/* clickable elements */
a, button, .linkBtn, .playBtn{
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='16' cy='16' r='10' fill='rgba(122,162,247,0.35)' stroke='rgba(122,162,247,0.6)' stroke-width='3'/%3E%3C/svg%3E") 16 16, pointer;
}

/* text input */
textarea{
  cursor:text;
}

/* mobile safety */
@media (max-width:920px){
  *{ cursor:auto; }
}

/* ==================================================
   GRAIN / SCANLINES (GLOBAL)
   ================================================== */
.grain{
  pointer-events:none;
  position:fixed;
  inset:0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,.02) 0px,
      rgba(255,255,255,.02) 1px,
      rgba(0,0,0,0) 3px,
      rgba(0,0,0,0) 6px
    );
  mix-blend-mode:overlay;
  opacity:.14;
}
.grain::after{
  content:"";
  position:absolute;
  inset:-20%;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
  background-size:220px 220px;
  opacity:.12;
  transform:rotate(2deg);
}

/* ==================================================
   CRT WRAPPER (MAX)
   ================================================== */
.crt{
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:22px 0 40px;
}

.crt__screen{
  position:relative;
  width:100%;
  max-width:calc(var(--max) + (var(--pad) * 2));
  border-radius:22px;
  overflow:hidden;

  transform: perspective(900px) translateZ(0) scale(1.02) rotateX(0.55deg);
  transform-origin:center top;

  box-shadow:
    0 0 0 1px rgba(230,230,230,0.10),
    0 0 0 8px rgba(0,0,0,0.45) inset,
    0 30px 140px rgba(0,0,0,0.85);

  animation: screenJitterMax 8.5s infinite;
}

@keyframes screenJitterMax{
  0%, 88%, 100% { transform: perspective(900px) translateZ(0) scale(1.02) rotateX(0.55deg); }
  89% { transform: perspective(900px) translateZ(0) scale(1.02) rotateX(0.55deg) translateX(0.6px); }
  90% { transform: perspective(900px) translateZ(0) scale(1.02) rotateX(0.55deg) translateX(-0.8px); }
  91% { transform: perspective(900px) translateZ(0) scale(1.02) rotateX(0.55deg) translateY(0.4px); }
  92% { transform: perspective(900px) translateZ(0) scale(1.02) rotateX(0.55deg) translateY(-0.6px); }
}

/* vignette + bloom + edge tint */
.crt__screen::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(115% 90% at 50% 10%,
      rgba(255,255,255,0.075),
      rgba(0,0,0,0) 44%),
    radial-gradient(140% 130% at 50% 50%,
      rgba(0,0,0,0) 46%,
      rgba(0,0,0,0.88) 100%),
    radial-gradient(120% 120% at 0% 50%,
      rgba(122,162,247,0.08),
      rgba(0,0,0,0) 55%),
    radial-gradient(120% 120% at 100% 50%,
      rgba(111,191,143,0.05),
      rgba(0,0,0,0) 55%);
  opacity:1;
}

/* scanlines + flicker */
.crt__screen::after{
  content:"";
  position:absolute;
  inset:-2px;
  pointer-events:none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.055) 0px,
      rgba(255,255,255,0.055) 1px,
      rgba(0,0,0,0) 3px,
      rgba(0,0,0,0) 7px
    );
  opacity:0.22;
  animation: crtFlickerMax 4.8s infinite;
}

@keyframes crtFlickerMax{
  0%,100%{ opacity:0.18; }
  40%{ opacity:0.26; }
  45%{ opacity:0.14; }
  50%{ opacity:0.28; }
  55%{ opacity:0.16; }
  60%{ opacity:0.24; }
}

/* ==================================================
   LAYOUT WRAPPERS
   ================================================== */
.wrap{
  max-width:var(--max);
  margin:0 auto;
  padding:0 var(--pad) 34px;
  position:relative; /* IMPORTANT for overlays */
}

/* wired grid overlay */
.wrap::before{
  content:"";
  position:absolute;
  inset:-28px -8px -28px -8px;
  pointer-events:none;
  background:
    linear-gradient(rgba(230,230,230,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230,230,230,.030) 1px, transparent 1px);
  background-size:52px 52px;
  opacity:0.28;
  mask-image: radial-gradient(75% 65% at 50% 40%, rgba(0,0,0,1), rgba(0,0,0,0.35));
}

/* rolling scan bar */
.wrap::after{
  content:"";
  position:absolute;
  left:-10%;
  right:-10%;
  top:-20%;
  height:180px;
  pointer-events:none;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0) 0%,
    rgba(122,162,247,0.06) 35%,
    rgba(255,255,255,0.10) 50%,
    rgba(111,191,143,0.04) 62%,
    rgba(255,255,255,0) 100%
  );
  mix-blend-mode: screen;
  opacity: 0.22;
  filter: blur(1px);
  animation: rollScan 7.5s linear infinite;
}

@keyframes rollScan{
  0% { transform: translateY(-220px); }
  100% { transform: translateY(1100px); }
}

/* ==================================================
   HEADER / NAV
   ================================================== */
.top{
  max-width:var(--max);
  margin:0 auto;
  padding:38px var(--pad) 14px;
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:start;
  gap:18px;
}

.brand__name{
  font-family:var(--mono);
  letter-spacing:.14em;
  font-size:18px;
}
.brand__sub{
  margin-top:8px;
  font-size:12px;
  color:var(--muted);
}

.nav{
  display:flex;
  gap:24px;
  justify-content:center;
  padding-top:4px;
  font-size:12px;
}
.nav__link{
  color:var(--muted);
  text-decoration:none;
  letter-spacing:.08em;
}
.nav__link:hover{ color:var(--accent); }
.nav__link.is-active{
  color:var(--text);
  border-bottom:1px solid var(--line);
  padding-bottom:6px;
}

/* ON/OFF AIR */
.air{
  justify-self:end;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.10);
  color:var(--muted);
  font-size:12px;
  letter-spacing:.10em;
  cursor:default;
}
.air__dot{
  width:8px;height:8px;border-radius:999px;
  background:var(--muted);
  opacity:.7;
}
.air.is-on{
  cursor:pointer;
  border-color:rgba(111,191,143,.45);
  box-shadow: 0 0 0 1px rgba(111,191,143,.10) inset;
}
.air.is-on .air__dot{
  background:var(--on);
  opacity:1;
  box-shadow:
    0 0 18px rgba(111,191,143,.40),
    -1.2px 0 rgba(122,162,247,0.18),
     1.2px 0 rgba(230,230,230,0.08);
}
.air.is-on .air__text{ color:var(--on); }

/* ==================================================
   RULES / DIVIDERS
   ================================================== */
.rule{
  height:1px;
  background:var(--line);
  margin:8px 0 0;
}
.rule--bottom{
  margin:30px 0 18px;
}

/* ==================================================
   GRID / COLUMNS
   ================================================== */
.grid{
  display:grid;
  grid-template-columns: 3fr 1px 2fr;
  gap:44px;
  padding-top:28px;
}
.vline{
  width:1px;
  background:var(--line2);
  position:relative;
}
.vline::before,
.vline::after{
  content:"";
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  width:5px; height:5px;
  border-radius:999px;
  background:rgba(230,230,230,.22);
  box-shadow: 0 0 10px rgba(122,162,247,.12);
}
.vline::before{ top:18px; }
.vline::after{ bottom:18px; }

.col{ min-width:0; }
.left{ padding-top:6px; }
.right{ padding-top:18px; }

.sectionTitle{
  font-size:12px;
  color:var(--muted);
  letter-spacing:.12em;
  margin:10px 0 16px;
  display:flex;
  align-items:baseline;
  gap:10px;
}
.sectionTitle .tag{
  color:rgba(122,162,247,.65);
}
.sectionTitle .stamp{
  margin-left:auto;
  font-size:11px;
  letter-spacing:.10em;
  opacity:.75;
}

/* ==================================================
   CONTENT STYLES
   ================================================== */
.meta{
  display:flex;
  gap:10px;
  font-size:13px;
  margin-top:6px;
}
.meta__sep{ margin:0 6px; }

.headline{
  font-family:var(--mono);
  font-weight:400;
  font-size:24px;
  margin:18px 0 18px;
  letter-spacing:.02em;
  text-shadow:
    0 0 12px rgba(255,255,255,0.06),
    -1.0px 0 rgba(122,162,247,0.22),
     1.0px 0 rgba(111,191,143,0.14);
}

.actions{
  display:flex;
  align-items:center;
  gap:22px;
  margin-bottom:14px;
}

/* play button (panel feel) */
.playBtn{
  font-family:var(--mono);
  letter-spacing:.10em;
  font-size:12px;
  color:var(--text);
  background:rgba(0,0,0,.10);
  border:1px solid var(--line);
  padding:12px 14px;
  cursor:pointer;
  box-shadow: 0 0 26px rgba(0,0,0,.28) inset;
  position:relative;
}
.playBtn:hover{
  border-color:rgba(122,162,247,.55);
  box-shadow:
    0 0 0 1px rgba(122,162,247,.18) inset,
    0 0 22px rgba(122,162,247,.12);
}
.playBtn::before,
.playBtn::after{
  content:"";
  position:absolute;
  width:10px; height:10px;
  border:1px solid rgba(230,230,230,.18);
  opacity:.55;
  pointer-events:none;
}
.playBtn::before{ top:-1px; left:-1px; border-right:none; border-bottom:none; }
.playBtn::after{ bottom:-1px; right:-1px; border-left:none; border-top:none; }

.inlineLink{
  color:var(--muted);
  text-decoration:none;
  letter-spacing:.10em;
  font-size:12px;
}
.inlineLink:hover{
  color:var(--accent);
  text-shadow:0 0 14px rgba(122,162,247,.18);
}

.subline{
  margin:14px 0 22px;
  font-size:14px;
  max-width:56ch;
}

.dotted{
  height:1px;
  background:repeating-linear-gradient(
    to right,
    rgba(230,230,230,.18) 0,
    rgba(230,230,230,.18) 8px,
    rgba(230,230,230,0) 8px,
    rgba(230,230,230,0) 14px
  );
  opacity:.55;
  margin:16px 0 18px;
}

/* ==================================================
   ROWS (RECENT)
   ================================================== */
.rows{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:10px;
}
.row{
  display:grid;
  grid-template-columns: 70px 72px 1fr auto;
  gap:14px;
  align-items:center;
  font-size:14px;
  position:relative;
}
.row::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-8px;
  height:1px;
  background:linear-gradient(to right, rgba(230,230,230,.10), rgba(230,230,230,0));
  opacity:.55;
}

.linkBtn{
  font-family:var(--mono);
  font-size:12px;
  letter-spacing:.10em;
  color:var(--muted);
  background:transparent;
  border:none;
  padding:0;
  cursor:pointer;
}
.linkBtn:hover{
  color:var(--accent);
  text-shadow: 0 0 12px rgba(122,162,247,.14);
}

/* ==================================================
   LOGS
   ================================================== */
.logRows{
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-bottom:16px;
}
.logRow{
  display:grid;
  grid-template-columns: 70px 1fr;
  gap:14px;
  font-size:14px;
  position:relative;
}
.logRow::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-8px;
  height:1px;
  background:linear-gradient(to right, rgba(230,230,230,.10), rgba(230,230,230,0));
  opacity:.55;
}

/* ==================================================
   TRANSMIT BACK
   ================================================== */
.spacer{ height:30px; }

.tx__box{
  position:relative;
  border:1px solid var(--line);
  padding:18px 18px 26px;
  background:rgba(0,0,0,.10);
  box-shadow: 0 0 26px rgba(0,0,0,.28) inset;
}
.tx__input{
  width:100%;
  border:none;
  outline:none;
  resize:none;
  background:transparent;
  color:var(--text);
  font-family:var(--mono);
  font-size:14px;
  line-height:1.55;
}
.tx__input::placeholder{ color:rgba(154,160,166,.55); }

.tx__hint{
  margin-top:12px;
  font-size:12px;
}

.tx__cursor{
  position:absolute;
  left:18px;
  bottom:18px;
  width:12px;
  height:2px;
  background:rgba(230,230,230,.24);
  animation:blink 1.05s steps(2,end) infinite;
  opacity:.9;
}
@keyframes blink { 50%{ opacity:0; } }

.tx__label{
  position:absolute;
  right:12px;
  bottom:10px;
  font-size:11px;
  letter-spacing:.10em;
  opacity:.75;
}

/* ==================================================
   FOOTER
   ================================================== */
.footer{
  display:flex;
  justify-content:space-between;
  gap:16px;
  font-size:12px;
  padding-bottom:26px;
}
.tick{
  color:var(--on);
  margin-right:6px;
  text-shadow: 0 0 14px rgba(111,191,143,.25);
}
.footer__dots{
  margin-left:10px;
  opacity:.55;
}

/* ==================================================
   GLITCH HOOK (for JS)
   ================================================== */
.crt__screen.is-glitch{
  animation: glitchKick 220ms steps(2,end) 1;
}
@keyframes glitchKick{
  0%{ filter:none; }
  30%{ filter: saturate(1.1) contrast(1.05); }
  60%{ filter: hue-rotate(6deg) saturate(1.25); }
  100%{ filter:none; }
}
.crt__screen.is-glitch .wrap{
  transform: translateX(0.8px);
}
.crt__screen.is-glitch .nav,
.crt__screen.is-glitch .headline,
.crt__screen.is-glitch .air{
  text-shadow:
    -1.6px 0 rgba(122,162,247,0.30),
     1.6px 0 rgba(111,191,143,0.22),
     0 0 16px rgba(230,230,230,0.08);
}
.crt__screen.is-glitch::after{
  opacity:0.30;
}

/* ==================================================
   RESPONSIVE
   ================================================== */
@media (max-width: 920px){
  :root{ --pad:22px; }

  .crt{ padding:0; }
  .crt__screen{
    border-radius:0;
    transform:none;
    animation:none;
    box-shadow:none;
  }

  .top{
    grid-template-columns:1fr;
    gap:14px;
  }
  .nav{ justify-content:flex-start; flex-wrap:wrap; }
  .air{ justify-self:start; }

  .grid{
    grid-template-columns: 1fr;
    gap:26px;
  }
  .vline{ display:none; }

  .row{ grid-template-columns: 70px 72px 1fr; }
  .footer{ flex-direction:column; }

  /* rolling scan off on mobile */
  .wrap::after{ display:none; }
}