:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #000; }
body {
  color: #fff;
  font-family: Courier, monospace;
  font-size: 16px;
  line-height: 1.55;
  background:
    radial-gradient(circle at 15% 0%, rgba(64,232,255,.10), transparent 32%),
    radial-gradient(circle at 90% 10%, rgba(189,101,255,.10), transparent 30%),
    #000;
}
a { color: #40e8ff; text-decoration: none; }
a:hover { text-decoration: underline; }
button {
  border: 1px solid #07545b;
  padding: 10px 13px;
  background: #020909;
  color: #40e8ff;
  border-radius: 4px;
  font-family: Courier, monospace;
  font-weight: bold;
  cursor: pointer;
}
button:hover { border-color: #40e8ff; color: #fff; }
button.primary { border-color: #40e8ff; box-shadow: 0 0 18px rgba(64,232,255,.15); }
.shell { width: min(1500px, 100%); margin: 0 auto; padding: 28px; }
.hero { display: grid; grid-template-columns: 1fr 390px; gap: 18px; align-items: stretch; min-height: 38vh; }
.hero-copy, .status-panel, .panel, .spider-panel, .search-panel, .card, .footer, .flagship, .explore {
  border: 1px solid #07545b;
  background: rgba(2,9,9,.92);
  border-radius: 4px;
}
.hero-copy { padding: 26px; display: flex; flex-direction: column; justify-content: center; }
.eyebrow { color: #53ff4c; margin: 0 0 10px; }
h1 { margin: 0; font-size: clamp(38px, 7vw, 92px); line-height: .95; letter-spacing: -3px; }
h2 { color: #40e8ff; margin: 0 0 10px; font-size: 20px; letter-spacing: .4px; }
h3 { margin: 0 0 8px; }
.subtitle { color: #40e8ff; font-size: clamp(18px, 2.5vw, 30px); margin: 12px 0 14px; }
.lede { max-width: 900px; color: #ddd; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.status-panel { padding: 20px; }
.status-panel table { width: 100%; border-collapse: collapse; }
.status-panel td { padding: 5px 8px 5px 0; white-space: nowrap; }
.green { color: #53ff4c; }
.red { color: #ff3333; }
.cyan { color: #40e8ff; }
.orange { color: #ff9400; }
.purple { color: #bd65ff; }
.muted { color: #b8b8b8; }
.dev-status { color: #ff3333; font-weight: bold; font-size: 13px; }
.flagship { margin-top: 18px; padding: 14px 18px; display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.flagship a { color: #00ffff; font-size: 24px; font-weight: bold; }
.dashboard-grid { margin-top: 18px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.panel { padding: 18px; }
.panel-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.badge { display: inline-block; padding: 5px 9px; border: 1px solid #07545b; color: #53ff4c; border-radius: 999px; font-size: 13px; }
.output-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.output-grid div { border: 1px solid #06383d; padding: 14px; background: #010606; min-height: 90px; }
.output-grid strong { display: block; color: #40e8ff; font-size: 20px; }
.output-grid span { display: block; color: #bbb; margin-top: 6px; }
pre { overflow: auto; max-height: 430px; background: #010606; padding: 14px; border: 1px solid #06383d; color: #d8faff; }
.spider-panel { margin-top: 18px; padding: 16px; }
.spider-wrap { overflow: auto; border-top: 1px solid #06383d; padding-top: 10px; }
svg { width: 100%; min-width: 900px; height: auto; display: block; }
.wire { stroke: #777; stroke-width: 1.4; fill: none; opacity: .85; }
.wire-cyan { stroke: #40e8ff; stroke-width: 1.8; fill: none; opacity: .95; }
.node { cursor: pointer; }
.node circle { fill: #020909; stroke-width: 2; filter: drop-shadow(0 0 4px rgba(64,232,255,.35)); }
.node text { font-family: Courier, monospace; pointer-events: none; }
.node .label { fill: #fff; font-size: 14px; font-weight: bold; }
.node .sub { fill: #b8b8b8; font-size: 11px; text-decoration: underline; }
.node.bios circle, .bios circle { stroke: #2fa7ff; }
.node.app circle, .app circle { stroke: #63d92f; }
.node.data circle, .data circle { stroke: #ff9400; }
.node.ext circle, .ext circle { stroke: #aaa; }
.legend { display: grid; grid-template-columns: repeat(4, auto); gap: 10px 18px; font-size: 14px; color: #ddd; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.dot.bios { background: #2fa7ff; }
.dot.app { background: #63d92f; }
.dot.data { background: #ff9400; }
.dot.ext { background: #aaa; }
.explore { margin-top: 18px; padding: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.explore ul { list-style: none; padding: 0; margin: 0; color: #ddd; }
.explore li { margin: 7px 0; }
.search-panel { margin-top: 18px; padding: 16px; }
.search-panel label { color: #40e8ff; font-weight: bold; display: block; margin-bottom: 8px; }
#gridSearch {
  width: 100%;
  padding: 12px;
  background: #111;
  color: white;
  border: 1px solid #444;
  font-family: Courier, monospace;
  font-size: 17px;
  margin-bottom: 14px;
}
#gridSearch:focus { outline: none; border-color: #66ccff; }
details.area { border-bottom: 1px solid #333; }
details.area > summary { list-style: none; cursor: pointer; padding: 12px 0; color: #00ffff; font-weight: bold; }
details.area > summary::-webkit-details-marker { display: none; }
details.area > summary::before { content: "[+] "; color: #00ffff; }
details.area[open] > summary::before { content: "[\2212] "; }
ul.drawer { list-style: none; margin: 0 0 10px; padding: 0; }
ul.drawer li { padding: 9px 0 9px 28px; border-top: 1px solid #1c1c1c; color: #ddd; }
.noresult { color: #888; padding: 20px 0; }
.cards { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { padding: 16px; min-height: 130px; }
.card h3 { color: #40e8ff; }
.footer { margin-top: 18px; padding: 14px; display: flex; justify-content: space-between; gap: 20px; color: #bbb; }
@media (max-width: 980px) {
  .shell { padding: 18px; }
  .hero, .dashboard-grid { grid-template-columns: 1fr; }
  .explore, .cards { grid-template-columns: 1fr 1fr; }
  h1 { letter-spacing: -1px; }
}
@media (max-width: 620px) {
  body { font-size: 15px; }
  .shell { padding: 12px; }
  .hero-copy, .status-panel, .panel, .spider-panel, .search-panel { padding: 14px; }
  .output-grid, .explore, .cards { grid-template-columns: 1fr; }
  .legend { grid-template-columns: 1fr 1fr; }
  button { width: 100%; }
  .footer { display: block; }
}
@media print {
  body { background: #fff; color: #000; }
  .hero-actions, .search-panel, .flagship, button { display: none !important; }
  .hero, .dashboard-grid, .explore, .cards { display: block; }
  .hero-copy, .status-panel, .panel, .spider-panel, .card, .footer { border-color: #999; background: #fff; color: #000; margin-bottom: 12px; }
  h1, h2, h3, .subtitle, a { color: #000; }
}
