/* ==========================================================================
   WSJT-X Build Toolkit — panel styling
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #1b2027;
  --bg-grid: #202733;
  --panel: #242b35;
  --panel-alt: #2a3240;
  --border: #3a4250;
  --border-soft: #313947;
  --text: #dbe1e8;
  --muted: #8891a0;
  --muted-dim: #6b7480;
  --accent: #e8a33d;
  --accent-dim: #9c6f2c;
  --accent2: #4fa8a0;
  --danger: #c0605a;
  --radius: 3px;
  --sidebar-w: 250px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(var(--bg-grid) 1px, transparent 1px) 0 0 / 100% 28px,
    var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
.nav-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

code, pre, .mono {
  font-family: 'IBM Plex Mono', monospace;
}

/* ---------- layout shell ---------- */

.shell {
  display: flex;
  min-height: 100vh;
}

/* ---------- sidebar / "control panel" ---------- */

.panel-rail {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 28px 0 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.rail-brand {
  padding: 0 24px 20px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 18px;
}

.rail-brand .eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}

.rail-brand h1 {
  font-family: 'Space Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  margin: 6px 0 0;
  color: var(--text);
  line-height: 1.3;
}

.rail-nav {
  list-style: none;
  margin: 0;
  padding: 0 12px;
}

.rail-nav li + li { margin-top: 6px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
  background: var(--panel-alt);
  color: var(--text);
  text-decoration: none;
}

.nav-item .led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-soft);
  box-shadow: none;
  flex-shrink: 0;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.nav-item .num {
  color: var(--muted-dim);
  font-size: 12px;
  width: 1.4em;
}

.nav-item.active {
  background: var(--panel-alt);
  border-color: var(--border-soft);
  color: var(--accent);
}

.nav-item.active .led {
  background: var(--accent);
  box-shadow: 0 0 6px 1px rgba(232, 163, 61, 0.65);
}

.nav-item.active .num { color: var(--accent-dim); }

.rail-foot {
  padding: 18px 24px 0;
  margin-top: 18px;
  border-top: 1px solid var(--border-soft);
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  color: var(--muted-dim);
  letter-spacing: 0.06em;
  line-height: 1.7;
}

/* ---------- main content ---------- */

.content {
  flex: 1;
  min-width: 0;
  padding: 48px 56px 100px;
  max-width: 880px;
}

.page-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent2);
  margin: 0 0 10px;
}

.content h1.page-title {
  font-family: 'Space Mono', monospace;
  font-size: 34px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.page-sub {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 36px;
  max-width: 60ch;
}

.content h2 {
  font-family: 'Space Mono', monospace;
  font-size: 20px;
  color: var(--accent);
  margin: 42px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.content h2 .tag {
  font-size: 11px;
  color: var(--muted-dim);
  letter-spacing: 0.1em;
  font-weight: 400;
}

.content h3 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 26px 0 10px;
}

.content p { margin: 0 0 16px; color: var(--text); }
.content ul, .content ol { margin: 0 0 16px; padding-left: 22px; color: var(--text); }
.content li { margin-bottom: 6px; }
.content li::marker { color: var(--accent2); }

.content strong { color: #f2c98a; font-weight: 600; }

hr.divider {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 34px 0;
}

pre {
  background: #14181e;
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent2);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #c9d6cf;
}

p code, li code {
  background: var(--panel-alt);
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 0.88em;
  color: var(--accent2);
}

.note {
  background: var(--panel-alt);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 20px;
  font-size: 14.5px;
  color: var(--muted);
}

.note strong { display: block; color: var(--accent); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; font-weight: 600; }

.step-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  counter-reset: step;
}

.step-list > li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  margin-bottom: 18px;
}

.step-list > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  background: var(--panel);
}

/* signature gauge (index page) */

.gauge-wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 8px 0 40px;
}

.gauge-readout {
  font-family: 'Space Mono', monospace;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.8;
}

.gauge-readout b { color: var(--accent2); font-weight: 400; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.15s ease;
}

.card:hover { border-color: var(--accent-dim); }

.card .card-num {
  font-family: 'Space Mono', monospace;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.card h3 { margin-top: 8px; margin-bottom: 6px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }

/* mobile */

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .panel-rail {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
  }
  .rail-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; }
  .rail-nav li { flex: 1 1 auto; }
  .rail-foot { display: none; }
  .content { padding: 32px 20px 70px; }
  .content h1.page-title { font-size: 27px; }
  .gauge-wrap { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
