/* ==========================================================================
   Diagfy — shared theme
   One dark shell for both tools. Each tool gets its own accent color
   (--brand for PLAN/SCOPE, --accent-dfgen for DF Gen) for wayfinding;
   everything else — surface, type, spacing, borders — is shared.
   ========================================================================== */

:root{
  --bg: #0A0C10;
  --panel: #12151C;
  --panel-2: #171B24;
  --panel-3: #1B2029;
  --border: #232838;
  --border-soft: #1A1E29;
  --text: #C9CFDC;
  --text-bright: #EEF1F7;
  --text-dim: #6B7386;
  --text-dimmer: #454C5E;

  --brand: #8C7CFF;          /* PLAN/SCOPE accent, also the site accent */
  --brand-dim: #4A3F99;

  --accent-dfgen: #5FA8FF;   /* DF Gen accent */
  --accent-dfgen-dim: #1D3A63;

  --critical: #FF4D5E;
  --critical-dim: #4A1F27;
  --warning: #FFB454;
  --warning-dim: #4A3A1A;
  --good: #43D9A3;
  --good-dim: #163D30;
  --info: #5FA8FF;
  --info-dim: #182B45;

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --radius: 10px;
}

*{ box-sizing: border-box; }
html{ color-scheme: dark; }
body{
  margin:0;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(140,124,255,0.10), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(255,77,94,0.06), transparent 55%),
    var(--bg);
  color: var(--text); font-family: var(--display); line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a{ color: var(--brand); }
::selection{ background: var(--brand-dim); color: var(--text-bright); }
:focus-visible{ outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
code{ font-family: var(--mono); }

/* ---------- Shared buttons ---------- */
button{ font-family: var(--display); cursor:pointer; border:none; }
.btn-primary, .btn-ghost, .btn-mini{ font-size: 13px; font-weight: 600; border-radius: 7px; padding: 8px 14px; transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.btn-primary{ background: var(--brand); color: #0A0C10; }
.btn-primary:hover{ background:#A196FF; }
.btn-primary:active{ transform: translateY(1px); }
.btn-primary[disabled]{ background: var(--panel-3); color: var(--text-dimmer); cursor: not-allowed; }
.btn-ghost{ background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover{ color: var(--text-bright); border-color: var(--brand-dim); }
.btn-mini{ background: var(--panel-3); color: var(--text-dim); border: 1px solid var(--border); font-size: 12px; padding: 6px 11px; }
.btn-mini:hover{ color: var(--text-bright); }

/* ---------- Site nav ---------- */
.site-nav{
  max-width: 1320px; margin: 0 auto; padding: 22px 28px 0;
  display:flex; align-items:center; justify-content:space-between; gap: 20px; flex-wrap: wrap;
}
.site-logo{ display:flex; align-items:center; gap:10px; text-decoration:none; }
.site-logo:focus-visible{ outline-offset: 4px; }
.site-logo-mark{
  display:inline-flex; align-items:center; justify-content:center; width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(155deg, var(--brand), #5A48D6); color: #0A0C10; font-weight: 700;
  font-family: var(--mono); font-size: 13px;
  box-shadow: 0 0 0 1px rgba(140,124,255,0.35), 0 8px 24px -8px rgba(140,124,255,0.6);
}
.site-logo-text{ font-family: var(--display); font-size: 16px; font-weight: 700; color: var(--text-bright); letter-spacing: 0.01em; }
.site-nav-links{ display:flex; align-items:center; gap: 6px; font-size: 13.5px; }
.site-nav-links a{
  color: var(--text-dim); text-decoration:none; padding: 7px 12px; border-radius: 7px; font-weight: 500;
  transition: color 0.15s ease, background 0.15s ease;
}
.site-nav-links a:hover{ color: var(--text-bright); background: var(--panel-2); }
.site-nav-links a.current{ color: var(--text-bright); background: var(--panel-2); }
.site-nav-links a.current .dot{ background: var(--tool-accent, var(--brand)); }
.site-nav-links a .dot{ display:inline-block; width:6px; height:6px; border-radius:50%; margin-right:7px; background: var(--text-dimmer); vertical-align: 1px; }

/* ---------- Site footer ---------- */
.site-footer{
  max-width: 1320px; margin: 0 auto; padding: 20px 28px 40px;
  display:flex; align-items:center; justify-content:space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--border-soft); margin-top: 56px;
  color: var(--text-dimmer); font-size: 11.5px; font-family: var(--mono);
}
.site-footer a{ color: var(--text-dim); }
.site-footer a:hover{ color: var(--text-bright); }

@media (prefers-reduced-motion: reduce){ *{ transition: none !important; animation: none !important; } }
