/* DATACENTER GHOST — shared styles */
:root {
  --bg: #07090c;
  --bg-2: #0b0f14;
  --panel: #0e131a;
  --panel-2: #121922;
  --line: #1d2631;
  --line-2: #2a3542;
  --text: #cdd6df;
  --text-dim: #7c8896;
  --text-faint: #52606e;
  --accent: #3dffa0;
  --accent-dim: rgba(61, 255, 160, 0.12);
  --red: #ff5a5f;
  --red-dim: rgba(255, 90, 95, 0.12);
  --amber: #ffb547;
  --amber-dim: rgba(255, 181, 71, 0.12);
  --cyan: #56d4f5;
  --cyan-dim: rgba(86, 212, 245, 0.10);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at top, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at top, #000 30%, transparent 75%);
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd, pre, .mono { font-family: var(--mono); }
code {
  font-size: 0.88em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  color: #e6edf3;
}
kbd {
  font-family: var(--mono);
  font-size: 0.8em;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 0.35em;
  background: var(--panel-2);
}
::selection { background: rgba(61,255,160,0.25); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px; height: 56px;
  background: rgba(7, 9, 12, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--mono); font-weight: 800; letter-spacing: 0.08em;
  color: #fff; white-space: nowrap; font-size: 15px;
}
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em;
  color: var(--text-dim); padding: 7px 12px; border-radius: 7px; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.nav a.active { color: var(--accent); background: var(--accent-dim); }
.clock { font-family: var(--mono); font-size: 12px; color: var(--text-faint); white-space: nowrap; }

/* ---------- layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 40px 24px 80px; }
.wrap.narrow { max-width: 820px; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
h1, h2, h3 { color: #fff; line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(30px, 5vw, 48px); letter-spacing: -0.02em; font-weight: 800; }
h2 { font-size: 22px; margin-top: 44px; letter-spacing: -0.01em; }
h3 { font-size: 16px; }
p { margin: 0 0 14px; }
.lead { font-size: 17px; color: var(--text); max-width: 680px; }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

.card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; color: var(--text); transition: border-color .15s, transform .15s, background .15s;
}
.card:hover { border-color: var(--accent); background: var(--panel-2); text-decoration: none; transform: translateY(-2px); }
.card .num { font-family: var(--mono); font-size: 12px; color: var(--text-faint); }
.card h3 { margin: 0; font-size: 18px; }
.card p { margin: 0; color: var(--text-dim); font-size: 14px; }
.card .go { margin-top: auto; padding-top: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--accent); }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-dim);
}
.tag.red { color: var(--red); border-color: rgba(255,90,95,.35); background: var(--red-dim); }
.tag.green { color: var(--accent); border-color: rgba(61,255,160,.35); background: var(--accent-dim); }
.tag.amber { color: var(--amber); border-color: rgba(255,181,71,.35); background: var(--amber-dim); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: 0.03em;
  padding: 10px 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: #04130b;
  transition: filter .15s, background .15s, color .15s, border-color .15s;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: progress; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.btn.sm { padding: 6px 10px; font-size: 12px; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.callout {
  border: 1px solid var(--line-2); border-left: 3px solid var(--amber);
  background: var(--amber-dim); border-radius: 8px; padding: 14px 16px; margin: 16px 0;
}
.callout.red { border-left-color: var(--red); background: var(--red-dim); }
.callout.green { border-left-color: var(--accent); background: var(--accent-dim); }
.callout.cyan { border-left-color: var(--cyan); background: var(--cyan-dim); }
.callout p:last-child { margin-bottom: 0; }

table.simple { width: 100%; border-collapse: collapse; font-size: 14px; }
table.simple th, table.simple td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.simple th { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }
table.simple td code { white-space: nowrap; }
.table-scroll { overflow-x: auto; }

ol.objectives { counter-reset: q; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
ol.objectives li {
  counter-increment: q; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px;
}
ol.objectives li::before {
  content: counter(q, decimal-leading-zero);
  font-family: var(--mono); font-weight: 800; color: var(--accent); font-size: 18px; line-height: 1.4;
}
ol.objectives b { color: #fff; }

details.hint { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); margin-bottom: 8px; }
details.hint summary { cursor: pointer; padding: 12px 16px; font-family: var(--mono); font-size: 13px; color: var(--text-dim); list-style: none; }
details.hint summary::-webkit-details-marker { display: none; }
details.hint summary::before { content: "+ "; color: var(--accent); }
details.hint[open] summary::before { content: "\2212  "; }
details.hint[open] summary { color: var(--text); border-bottom: 1px solid var(--line); }
details.hint > div { padding: 12px 16px; color: var(--text); font-size: 14px; }

.flagbox {
  font-family: var(--mono); font-size: 14px; word-break: break-all;
  background: #000; border: 1px dashed var(--line-2); border-radius: 8px; padding: 14px 16px; color: var(--accent);
}

footer.site {
  border-top: 1px solid var(--line); padding: 24px; text-align: center;
  font-family: var(--mono); font-size: 12px; color: var(--text-faint);
}

/* ---------- forms ---------- */
input[type=text], textarea, select {
  width: 100%;
  font-family: var(--mono); font-size: 14px; color: var(--text);
  background: #05070a; border: 1px solid var(--line-2); border-radius: 8px;
  padding: 11px 13px;
}
input[type=text]:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }

@media (max-width: 640px) {
  .topbar { padding: 0 16px; gap: 12px; }
  .clock { display: none; }
  .wrap { padding: 28px 16px 64px; }
}
