/* base.css — reset, page shell, typography, scrollbars. Depends on theme.css
 * tokens only (imported separately by index.html, order matters: theme.css
 * first). */

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

/* Thin, accent-toned scrollbars everywhere content overflows — matches the
   ostnoctua "glass" feel instead of the default chunky OS scrollbar. */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); background-clip: padding-box; }

h1, h2, h3, h4 { margin: 0 0 var(--space-2); font-weight: 600; letter-spacing: 0.2px; }
h2 { font-size: 17px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
p { margin: 0 0 var(--space-2); }
a { color: var(--accent); }

@font-face {
  font-family: "Material Icons";
  src: url("../assets/fonts/MaterialIcons-Regular.ttf") format("truetype");
  font-weight: normal; font-style: normal; font-display: swap;
}
.material-icons {
  font-family: "Material Icons";
  font-weight: normal; font-style: normal;
  font-size: 20px; display: inline-block; line-height: 1;
  vertical-align: middle; -webkit-font-smoothing: antialiased;
  letter-spacing: normal; text-transform: none; white-space: nowrap;
}
.icon-sm { font-size: 15px; }
.icon-lg { font-size: 26px; }

/* ---------------------------------------------------------------- shell
 * One flat, edge-to-edge surface: #canvas fills #app completely, #modbar
 * and #top-right (theme toggle + connection widget) float on top of it
 * (position:fixed, see panels.css) — there is no separate header
 * strip/band behind them. Gilles, 2026-09-25, rejecting an earlier version
 * that grouped them into a bordered header: "tout au meme niveau, un seul
 * conteneur commun." Matches ostnoctua's own #on-layer + .on-modbar +
 * .on-conn-cluster, all floating "glass" chips over one canvas (see
 * ostnoctua/web/ostnoctua.css and panels.css's .glass) — panels.js's
 * header explains the one real behavioral difference (drag/resize math
 * relative to the canvas, not the window). */
#app { height: 100%; position: relative; overflow: hidden; }

.brand { display: flex; align-items: center; gap: 6px; font-weight: 700; letter-spacing: 0.3px; color: var(--text); }
.brand .material-icons { color: var(--accent); }

/* #canvas, #panel-layer, #docked-view, #modbar, #top-right, #conn-widget:
   see panels.css. */

.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.small { font-size: 11px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }

@media (max-width: 760px) {
  #modbar { max-width: calc(100vw - 24px); }
  #docked-view { padding: var(--space-3); }
}
