/* ═══════════════════════════════════════════════════════════════════════════
   Dropforge design docs — the look the tool pages share

   Colours, type and sizes, and the pieces every tool page has: the top bar,
   buttons, tabs, section headings, inputs and checkboxes. A page links this
   before its own <style>, which then only lays the page out. Pages link it
   with ?v=, bumped whenever it changes, so browsers pick the change up.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #111111; --surface: #1a1a1a; --surface2: #232323; --surface3: #2b2b2b;
  --border: #2e2e2e; --border2: #3b3b3b;
  --orange: #f26419; --orange-dim: rgba(242,100,25,.12);
  --text: #f0f0f0; --muted: #a0a0a0;   /* the one grey, for all secondary text */
  --ok: #22c55e; --warn: #f0a90a; --bad: #ef4444; --info: #38bdf8; --violet: #a78bfa;
  --font: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Cascadia Code', 'Fira Code', Consolas, monospace;
  --text-size: 13.5px;
  --topbar-h: 51px;     /* the bar across the top */
  --side-w: 268px;      /* the column on the left */
  --panel-w: 345px;     /* the column on the right */
  --tab-h: 44px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* hidden wins over any display a class gives */
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: var(--text-size)/1.5 var(--font); overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .9em; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

/* ── The top bar: the Dropforge mark back to the index, and the page's name ── */
.topbar {
  height: var(--topbar-h); flex: none; display: flex; align-items: center; gap: 15px; padding: 0 16px;
  background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 30;
}
.logo { display: flex; align-items: center; gap: 9.5px; text-decoration: none; color: inherit; }
.logo:hover { opacity: .8; }
.logo-mark {
  width: 25px; height: 25px; background: var(--orange); border-radius: 5px; display: flex; align-items: center;
  justify-content: center; font-size: 12.5px; font-weight: 900; color: #111; letter-spacing: -.02em;
}
.logo-text { font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2; }
.logo-sub { font-size: 9.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.doc-title { font-size: 14px; font-weight: 700; padding-left: 13px; border-left: 1px solid var(--border2); line-height: 1.25; white-space: nowrap; }
.sp { flex: 1; }

/* ── Buttons ── */
.btn {
  background: var(--surface2); border: 1px solid var(--border2); color: var(--text); border-radius: 6px;
  padding: 5px 10.5px; font-size: 12.25px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--surface3); border-color: #505050; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #111; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.sm { padding: 3px 7.5px; font-size: 11.5px; }
.btn.on { border-color: var(--orange); color: var(--orange); background: var(--orange-dim); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--surface2); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }

/* ── Tabs: the one showing has an orange underline ── */
.tab {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: var(--tab-h); padding: 0 14px;
  background: none; border: 0; box-shadow: inset 0 -2px transparent; color: var(--muted);
  font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.tab:hover { color: var(--text); background: var(--surface2); }
.tab.active { color: var(--orange); box-shadow: inset 0 -2px var(--orange); }

/* ── Section headings: small capitals, each page lays them out ── */
.sect-label, .sec-h { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }

/* ── Inputs, and checkboxes large enough to hit ── */
select, input[type=text], input[type=number], input[type=search], textarea {
  background: var(--bg); border: 1px solid var(--border2); border-radius: 6px; padding: 4.5px 7.5px; outline: none;
}
select:focus, input[type=text]:focus, input[type=number]:focus, input[type=search]:focus, textarea:focus { border-color: var(--orange); }
input[type=checkbox] { width: 16px; height: 16px; margin: 0; flex-shrink: 0; accent-color: var(--orange); cursor: pointer; }
