/* Monochrome design system: black, white, and the grays between.
   One accent: pure white on black (inverted for light surfaces). */

:root {
  --bg: #050505;
  --panel: #0c0c0c;
  --panel-2: #111111;
  --line: #1e1e1e;
  --line-strong: #2c2c2c;
  --txt: #f2f2f2;
  --mut: #8a8a8a;
  --dim: #555555;
  --up: #e8e8e8;   /* candles: up = light */
  --down: #4a4a4a; /* candles: down = dark gray */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--font);
  background: var(--bg);
  color: var(--txt);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: #fff; color: #000; }

/* ── Top navigation ── */
.nav {
  display: flex; align-items: center; gap: 28px;
  padding: 0 28px; height: 58px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(5,5,5,.86);
  backdrop-filter: blur(12px); z-index: 40;
}
.nav .brand {
  font-weight: 800; letter-spacing: -.02em; font-size: 16px;
  display: flex; align-items: center; gap: 9px;
}
.nav .brand .mark {
  width: 22px; height: 22px; background: #fff; color: #000;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; font-weight: 800; border-radius: 4px;
}
.nav .links { display: flex; gap: 4px; margin-left: 8px; }
.nav .links a {
  padding: 7px 12px; border-radius: 7px; color: var(--mut);
  font-size: 13.5px; font-weight: 600; transition: color .15s, background .15s;
}
.nav .links a:hover { color: var(--txt); background: var(--panel-2); }
.nav .links a[aria-current="page"] { color: var(--txt); }
.nav .spacer { flex: 1; }
.nav .who { font-size: 13px; color: var(--mut); font-family: var(--mono); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--txt); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: #4a4a4a; background: var(--panel-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.btn.primary { background: #fff; color: #000; border-color: #fff; }
.btn.primary:hover { background: #d9d9d9; border-color: #d9d9d9; }
.btn.small { padding: 6px 12px; font-size: 12.5px; border-radius: 7px; }
.btn.danger:hover { border-color: #777; }

input[type="text"], input[type="password"], select, textarea {
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px;
  color: var(--txt); padding: 9px 12px; font-size: 14px; font-family: inherit; width: 100%;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #fff; outline-offset: 1px; border-color: #555;
}
label { font-size: 12px; color: var(--mut); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px;
}
.mono { font-family: var(--mono); }
.mut { color: var(--mut); }
.dim { color: var(--dim); }

/* ── Toast ── */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #fff; color: #000; padding: 10px 18px; border-radius: 9px;
  font-size: 13.5px; font-weight: 700; z-index: 100; opacity: 0;
  transition: transform .25s cubic-bezier(.2,.9,.3,1.2), opacity .25s;
  pointer-events: none; max-width: min(480px, 90vw);
}
#toast.on { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── Scrollbars ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #333; }
