/* base.css — layout only, no theme colors */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: .3px;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* ── header ── */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.logo { width: 100%; overflow: hidden; text-align: center; }
.logo-pre { display: inline-block; text-align: left; }

.theme-switcher {
  display: flex;
  gap: 8px;
}

.theme-btn {
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  padding: 4px 12px;
  letter-spacing: 1px;
  border: none;
  background: none;
}

/* ── content ── */
.content {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 48px;
  padding: 0 4px;
}
.content ul { padding-left: 20px; margin: 8px 0; }
.content li { margin: 4px 0; }

/* ── grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ── panel ── */
.panel { padding: 20px; }

/* panel header */
.ph {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 6px;
}
.ph-name  { font-size: 15px; font-weight: bold; }
.ph-clock { font-size: 13px; }

/* sparkline */
.spark-wrap {
  display: grid;
  grid-template-columns: 9ch 1fr;
  gap: 8px;
  align-items: start;
  margin-bottom: 14px;
}
.spark-lbl { font-size: 12px; padding-top: 1px; }
.spark {
  font-family: inherit;
  font-size: 11px;
  line-height: 1.15;
  white-space: pre;
  overflow: hidden;
  padding: 4px 6px;
}

/* meters */
.meters      { margin-bottom: 14px; }
.mrow {
  display: grid;
  grid-template-columns: 6ch 1fr 6ch;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.ml { font-size: 12px; }
.mv { font-size: 12px; text-align: right; }

.mbar {
  position: relative;
  height: 18px;
  overflow: hidden;
}
.mbar-ascii {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 4px;
  font-size: 11px;
  white-space: pre;
  overflow: hidden;
  line-height: 1;
}
.mbar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  display: none; /* shown by modern theme */
  transition: width 0.4s ease;
}

/* stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-bottom: 14px;
}
.stat { }
.sl { font-size: 11px; display: block; margin-bottom: 2px; }
.sv { font-size: 13px; font-weight: bold; display: block; }

/* panel footer */
.pf { display: flex; justify-content: space-between; font-size: 11px; }

/* ── site footer ── */
.site-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-top: 40px;
  padding-top: 12px;
}

/* ── overlays ── */
.matrix-overlay {
  position: fixed; inset: 0;
  z-index: 1000;
  cursor: pointer;
}
.matrix-overlay.hidden { display: none; }

.toast {
  position: fixed;
  bottom: 40px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 24px;
  font-family: inherit;
  font-size: 13px;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  z-index: 900;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.help-overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 950;
}
.help-box { padding: 32px; max-width: 480px; width: 90%; }
.help-txt { font-family: inherit; font-size: 13px; line-height: 1.7; white-space: pre; }
.help-close {
  display: block; margin-top: 20px;
  cursor: pointer; font-family: inherit; font-size: 13px;
  background: none; border: none; padding: 0;
}

/* ── glitch ── */
@keyframes glitch-shift {
  0%   { transform: translate(0); filter: hue-rotate(0deg); }
  20%  { transform: translate(-3px, 2px); filter: hue-rotate(90deg); }
  40%  { transform: translate(3px, -2px); filter: hue-rotate(180deg); }
  60%  { transform: translate(-2px, 1px); filter: hue-rotate(270deg); }
  80%  { transform: translate(2px, -1px); filter: hue-rotate(360deg); }
  100% { transform: translate(0); filter: hue-rotate(0deg); }
}
.glitch-active { animation: glitch-shift 0.15s steps(1) infinite; }

/* modern logo */
.logo-modern {
  display: flex; align-items: baseline; gap: 0;
  justify-content: center;
  padding: 16px 0;
}
.logo-slash  { font-size: 32px; font-weight: 300; }
.logo-host   { font-size: 36px; font-weight: 700; }
.logo-tld    { font-size: 24px; font-weight: 300; }
.logo-sub    { font-size: 13px; margin-left: 16px; letter-spacing: 2px; text-transform: uppercase; }

/* ── responsive ── */
@media (max-width: 520px) {
  body { font-size: 14px; }
  .wrap { padding: 16px 12px 60px; }
  .grid { grid-template-columns: 1fr; }
  .mbar-ascii { font-size: 10px; }
  .spark { font-size: 10px; }
}
