:root {
  color-scheme: dark;
  --bg: #030711;
  --panel: #0b1220;
  --panel-strong: #101a2d;
  --line: rgba(148, 163, 184, 0.24);
  --text: #f8fafc;
  --muted: #9fb0c8;
  --blue: #38bdf8;
  --green: #34d399;
  --pink: #fb7185;
  --amber: #fbbf24;
  --violet: #a78bfa;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at 18% 8%, rgba(56, 189, 248, 0.13), transparent 24rem),
    radial-gradient(circle at 84% 18%, rgba(52, 211, 153, 0.1), transparent 22rem),
    linear-gradient(180deg, #050915 0%, var(--bg) 42%, #050813 100%);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
}

.topbar {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(3, 7, 17, 0.74);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 0.8rem;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--blue), var(--green));
  border-radius: 8px;
  color: #00111f;
  display: inline-flex;
  font-weight: 900;
  height: 2.4rem;
  justify-content: center;
  letter-spacing: 0;
  width: 2.4rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.1rem;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.topbar nav a {
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
  padding: 0.58rem 0.78rem;
  text-decoration: none;
}

.topbar nav a.active,
.topbar nav a:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.28);
  color: var(--text);
}

main {
  margin-inline: auto;
  max-width: 1180px;
  padding: clamp(1rem, 3vw, 2rem);
}

.hero {
  align-items: stretch;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 0.85fr) minmax(20rem, 1.15fr);
  min-height: 29rem;
}

.hero-copy,
.control-wall,
.card,
.metrics div,
.source-panel,
.draft-row {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(8, 13, 25, 0.94));
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.draft-row > :last-child {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.source-picker {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.85rem;
}

.source-picker label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.source-picker select {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  min-height: 2.6rem;
  padding: 0.45rem 0.6rem;
}

.manage-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.25rem, 4vw, 2.25rem);
}

.hero-brand {
  display: flex;
  margin-bottom: auto;
  padding-bottom: 3rem;
}

.hero-brand-image {
  display: block;
  height: auto;
  max-width: min(100%, 32rem);
  width: 100%;
}

.hero-brand-mark {
  align-items: center;
  border: 1px solid rgba(56, 189, 248, 0.55);
  border-radius: 50%;
  display: inline-flex;
  gap: 0.22rem;
  height: 4.3rem;
  justify-content: center;
  position: relative;
  transform: rotate(-28deg);
  width: 4.3rem;
}

.hero-brand-mark::before {
  border: 1px solid rgba(52, 211, 153, 0.75);
  border-radius: 50%;
  content: "";
  height: 2.65rem;
  position: absolute;
  width: 2.65rem;
}

.hero-brand-mark i {
  background: var(--blue);
  border-radius: 999px;
  display: block;
  height: 0.38rem;
  position: relative;
  width: 0.38rem;
}

.hero-brand-mark i:nth-child(2) { background: var(--green); height: 0.7rem; width: 0.7rem; }
.hero-brand-mark i:nth-child(3) { background: var(--amber); }

.hero-brand-wordmark {
  display: flex;
  flex-direction: column;
  letter-spacing: 0;
  line-height: 0.95;
}

.hero-brand-wordmark strong,
.hero-brand-wordmark b {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
}

.hero-brand-wordmark strong { color: var(--text); }
.hero-brand-wordmark b { color: var(--blue); }

.eyebrow {
  color: var(--green);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 800;
  margin: 0 0 0.7rem;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(3.2rem, 10vw, 7rem);
  line-height: 0.9;
  margin-bottom: 1rem;
  max-width: 7ch;
}

.article-shell h1 {
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  line-height: 0.98;
  max-width: 34ch;
}

.hero-copy p:not(.eyebrow),
.deck {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.button,
.admin-actions button,
.draft-row button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
}

.button.primary,
.admin-actions button,
.draft-row button {
  background: var(--blue);
  color: #02101c;
}

.button.ghost {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
}

.control-wall {
  min-height: 100%;
  overflow: hidden;
  padding: 1rem;
  position: relative;
}

.control-wall::before {
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.15) 1px, transparent 1px);
  background-size: 38px 38px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(180deg, black, transparent 92%);
  position: absolute;
}

.ticker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.ticker button {
  background: rgba(3, 7, 17, 0.64);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
  font: inherit;
  padding: 0.55rem 0.75rem;
}

.ticker button:hover,
.ticker button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #02101c;
}

pre {
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 8px;
  bottom: 1rem;
  color: #dbeafe;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  left: 1rem;
  line-height: 1.6;
  margin: 0;
  overflow: hidden;
  padding: 1rem;
  position: absolute;
  right: 1rem;
  top: 5rem;
  white-space: pre-wrap;
  z-index: 1;
}

.metrics {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  margin: 1rem 0;
}

.metrics div {
  padding: 1rem;
}

.metrics strong {
  display: block;
  font-size: 2rem;
}

.metrics span {
  color: var(--muted);
}

.news-grid,
.desk-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 0.8fr);
}

.lead-stack h2,
.side-rail h2,
.source-panel h2,
.page-head h1 {
  margin-bottom: 1rem;
}

.side-rail,
.article-list {
  display: grid;
  gap: 1rem;
}

.card {
  overflow: hidden;
}

.card[hidden] {
  display: none !important;
}

.card.featured {
  display: grid;
  grid-template-columns: minmax(18rem, 0.9fr) minmax(0, 1fr);
  min-height: 26rem;
}

.card:not(.featured) {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
}

.card-body {
  padding: 1rem;
}

.card h2 {
  font-size: clamp(1.2rem, 2.5vw, 2.2rem);
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.card:not(.featured) h2 {
  font-size: 1rem;
}

.card h2 a,
.read-link,
.draft-row a,
.article-body a {
  color: var(--text);
  text-decoration-color: rgba(56, 189, 248, 0.58);
  text-underline-offset: 0.2em;
}

.card p,
.draft-row p,
.source-panel p,
.empty {
  color: var(--muted);
  line-height: 1.55;
}

.meta,
.article-meta {
  color: var(--green);
  display: flex;
  flex-wrap: wrap;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.78rem;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
}

.visual {
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(52, 211, 153, 0.12)),
    #081120;
  min-height: 9rem;
  overflow: hidden;
  position: relative;
}

.visual::after {
  animation: scan 5s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  top: 22%;
  width: 100%;
}

.visual span {
  background: rgba(3, 7, 17, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  bottom: 0.8rem;
  color: var(--text);
  font-weight: 900;
  left: 0.8rem;
  padding: 0.45rem 0.65rem;
  position: absolute;
  z-index: 2;
}

.grid-lines {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 24px 24px;
  inset: 0;
  position: absolute;
}

.pulse,
.rail {
  position: absolute;
}

.pulse {
  animation: drift 8s linear infinite;
  background: var(--blue);
  border: 2px solid currentColor;
  border-radius: 3px;
  box-shadow: 0 0 38px currentColor;
  height: 0.7rem;
  width: 0.7rem;
}

.pulse::after {
  animation: ping 2.4s ease-out infinite;
  border: 1px solid currentColor;
  border-radius: inherit;
  content: "";
  inset: -0.45rem;
  position: absolute;
}

.pulse.a {
  color: var(--blue);
  left: 22%;
  top: 35%;
}

.pulse.b {
  animation-delay: -3s;
  color: var(--green);
  right: 20%;
  top: 56%;
}

.rail {
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  color: var(--blue);
  height: 2px;
  left: 12%;
  right: 12%;
  top: 45%;
  transform: rotate(-9deg);
}

.rail.two {
  color: var(--amber);
  top: 62%;
  transform: rotate(8deg);
}

.visual-security {
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.25), rgba(56, 189, 248, 0.12)), #0d1020;
}

.visual-maker {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(56, 189, 248, 0.13)), #10111b;
}

.visual-azure {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.34), rgba(30, 64, 175, 0.18)), #071426;
}

.visual-dev {
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.27), rgba(167, 139, 250, 0.17)), #0b1620;
}

.visual-cloud .rail.one { top: 35%; transform: rotate(12deg); }
.visual-azure .rail.one { top: 52%; transform: rotate(-18deg); }
.visual-maker .rail.two { top: 38%; transform: rotate(-12deg); }
.visual-security .rail.one { top: 60%; transform: rotate(15deg); }
.visual-work .rail.two { top: 30%; transform: rotate(18deg); }
.visual-dev .rail.one { top: 40%; transform: rotate(-4deg); }

.visual-azure .pulse.a { animation-duration: 5s; border-radius: 50%; }
.visual-security .pulse.b { animation-direction: reverse; border-radius: 50%; }
.visual-maker .pulse.a { animation-duration: 10s; transform: rotate(45deg); }
.visual-work .pulse.b { animation-duration: 6s; }
.visual-dev .pulse.a { animation-duration: 4s; border-radius: 50%; }

.radar {
  border: 1px solid rgba(251, 113, 133, 0.65);
  border-radius: 50%;
  height: 7rem;
  left: 50%;
  position: absolute;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 7rem;
}
.radar::before { border: 1px solid rgba(251, 113, 133, 0.4); border-radius: 50%; content: ""; inset: 1.2rem; position: absolute; }
.radar i { background: var(--pink); border-radius: 50%; height: 0.4rem; position: absolute; width: 0.4rem; }
.radar i:nth-child(1) { left: 20%; top: 25%; }
.radar i:nth-child(2) { right: 18%; top: 38%; }
.radar i:nth-child(3) { bottom: 18%; left: 48%; }

.bulletin { align-items: center; display: flex; gap: 0.55rem; left: 1rem; position: absolute; top: 1rem; z-index: 1; }
.bulletin b { background: var(--violet); border-radius: 3px; color: #090b18; font-size: 0.65rem; padding: 0.25rem 0.35rem; }
.bulletin span, .bulletin strong { font-family: ui-monospace, Consolas, monospace; font-size: 0.65rem; }
.bulletin strong { color: var(--green); }

.workflow { display: flex; gap: 1.1rem; left: 18%; position: absolute; top: 42%; z-index: 1; }
.workflow i { align-items: center; background: rgba(251, 191, 36, 0.22); border: 1px solid var(--amber); border-radius: 4px; color: var(--amber); display: flex; font: 800 0.7rem ui-monospace, Consolas, monospace; height: 2.4rem; justify-content: center; width: 2.4rem; }
.workflow i:not(:last-child)::after { color: var(--amber); content: ">"; font-size: 1rem; margin-left: 3.25rem; position: absolute; }

.terminal-lines { color: var(--green); display: grid; font: 900 1.8rem ui-monospace, Consolas, monospace; gap: 0.1rem; left: 24%; position: absolute; top: 24%; z-index: 1; }
.terminal-lines i:nth-child(2) { color: var(--blue); margin-left: 1.1rem; }
.terminal-lines i:nth-child(3) { color: var(--violet); margin-left: 2.2rem; }

.network { height: 6rem; left: 34%; position: absolute; top: 25%; width: 9rem; z-index: 1; }
.network::before { border-bottom: 1px solid var(--blue); border-top: 1px solid var(--blue); content: ""; inset: 1rem 0; position: absolute; transform: skewY(-18deg); }
.network i { background: var(--blue); border: 2px solid #061322; border-radius: 50%; height: 0.7rem; position: absolute; width: 0.7rem; }
.network i:nth-child(1) { left: 0; top: 40%; }.network i:nth-child(2) { left: 32%; top: 10%; }.network i:nth-child(3) { right: 30%; bottom: 8%; }.network i:nth-child(4) { right: 0; top: 38%; }

.broadcast { color: var(--blue); display: flex; flex-direction: column; left: 39%; position: absolute; top: 25%; z-index: 1; }
.broadcast b { font-size: 3rem; line-height: 1; }.broadcast span { color: var(--green); font: 800 0.65rem ui-monospace, Consolas, monospace; margin-top: 0.35rem; }

@keyframes scan {
  0%, 100% { opacity: 0; transform: translateY(-1rem); }
  20%, 80% { opacity: 1; }
  50% { transform: translateY(8rem); }
}

@keyframes ping {
  0% { opacity: 0.8; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(1.8); }
}

.visual-work {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.26), rgba(52, 211, 153, 0.12)), #0b1022;
}

.page,
.article-page {
  padding-top: 2rem;
}

.page-head {
  margin-bottom: 1rem;
}

.page-head h1,
.article-shell h1 {
  max-width: 12ch;
}

.admin-page .page-head h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 0.98;
  margin-bottom: 0.65rem;
  max-width: none;
}

.admin-page .page-head {
  margin-bottom: 1.25rem;
}

.login-page .page-head h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  max-width: 18ch;
}

.article-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-shell {
  margin-inline: auto;
  max-width: 840px;
}

.article-shell .visual {
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 20rem;
  margin-bottom: 1.4rem;
}

.article-body {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #dbe7f7;
  font-size: 1.05rem;
  line-height: 1.75;
  padding: clamp(1rem, 3vw, 2rem);
}

.article-body h2 {
  margin-top: 1.5rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.draft-row {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 0.75rem;
  padding: 1rem;
}

.draft-row span {
  color: var(--green);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.8rem;
}

.source-panel {
  align-self: start;
  padding: 1rem;
}

.source-panel ul {
  display: grid;
  gap: 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.source-panel li {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding-top: 0.65rem;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 2rem;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
}

@keyframes drift {
  0% {
    transform: translate3d(-14px, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(20px, 10px, 0) scale(1.4);
  }
  100% {
    transform: translate3d(-14px, 0, 0) scale(1);
  }
}

@media (max-width: 880px) {
  .topbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .news-grid,
  .desk-grid,
  .card.featured,
  .article-list {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .card:not(.featured) {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 5rem);
  }

  .admin-page .page-head h1 {
    font-size: clamp(2.35rem, 11vw, 3.5rem);
  }

  .control-wall {
    min-height: 28rem;
  }
}
