/* Original PhysicsBase paper-and-ink design, shared by public pages and consoles. */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap");

:root {
  --sans: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
}
:root:not(.pb-console) {
  --paper: #f1ede4; --paper-2: #e7e1d5; --paper2: #e7e1d5;
  --ink: #141310; --ink-2: #3a372f; --mute: #6f695e; --muted: #6f695e;
  --faint: #827b6f; --line: rgba(20,19,16,.20); --line-2: rgba(20,19,16,.10);
  --accent: #ff3b00; --accent-2: #c42a00; --dark: #141310;
}
html { color-scheme: light; }
body { -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 3px solid #ff3b00; outline-offset: 3px; }
::selection { background: #ff3b00; color: #fff; }

/* Keep technical content readable without widening narrow screens. */
@media (max-width: 760px) {
  body { overflow-wrap: anywhere; }
  main, section, article, .shell > *, .exgrid > * { min-width: 0; }
  pre, .code, .tbl { max-width: 100%; overflow-x: auto; }
  table { display: block; max-width: 100%; overflow-x: auto; }
  .hwrap { flex-wrap: wrap; }
  .hwrap .right { flex-wrap: wrap; max-width: 100%; }
  html.pb-motion body [data-reveal],
  html.pb-motion body [data-reveal].pb-left,
  html.pb-motion body [data-reveal].pb-right { transform: none; }
}

/* Operational screens retain their data layout with the same paper palette. */
:root.pb-console {
  --void: #f1ede4; --paper: #141310; --ink: #141310;
  --panel: #f1ede4; --panel2: #e7e1d5; --muted: #6f695e; --faint: #827b6f;
  --line: rgba(20,19,16,.20); --line2: rgba(20,19,16,.35);
  --orange: #ff3b00; --lime: #1f7a3d; --cyan: #216b85; --red: #aa2c1c; --amber: #966000;
}
.pb-console body { background: var(--void); color: var(--ink); }
.pb-console body::before { display: none; }
.pb-console header, .pb-console .topbar, .pb-console .rail {
  background: rgba(241,237,228,.97); border-color: var(--line); backdrop-filter: none;
}
.pb-console .panel, .pb-console .card, .pb-console .kpi,
.pb-console .metrics article, .pb-console .signal, .pb-console .scope,
.pb-console .vital, .pb-console .key-edit, .pb-console .gate-box,
.pb-console .secret-card { background: var(--panel); border-color: var(--line); box-shadow: none; border-radius: 0; }
.pb-console .card::before, .pb-console .kpi::after, .pb-console .gate-box::before { display: none; }
.pb-console .hero h1 { font-weight: 600; letter-spacing: -.045em; line-height: .98; }
.pb-console .hero h1 em { color: var(--orange); }
.pb-console .links, .pb-console .rail-nav a, .pb-console .rail-label,
.pb-console .rail-foot, .pb-console .breadcrumb, .pb-console .identity,
.pb-console .hero-side, .pb-console .stamp, .pb-console .metrics span,
.pb-console .metrics small, .pb-console .panel-head span, .pb-console .panel-head > small,
.pb-console .chart-foot, .pb-console .empty, .pb-console .chart-empty,
.pb-console .hint, .pb-console .key-meta, .pb-console .key-name code,
.pb-console .scope small, .pb-console .security, .pb-console footer,
.pb-console .kpi .label, .pb-console .kpi .meta, .pb-console .card-head span,
.pb-console .signal span, .pb-console .signal small, .pb-console .legend,
.pb-console .funnel-row label, .pb-console .funnel-row small,
.pb-console .metric-bar label, .pb-console .mix-copy small,
.pb-console .health-title, .pb-console .status-legend, .pb-console .vital span,
.pb-console .vital small, .pb-console .privacy, .pb-console .gate-kicker,
.pb-console .gate p, .pb-console .gate label, .pb-console .gate small,
.pb-console .secret-card p, .pb-console .create-panel label[for],
.pb-console legend, .pb-console .key-edit label, .pb-console .edit-scope { color: #6f695e; }
.pb-console .breadcrumb b, .pb-console .rail-foot b, .pb-console .live,
.pb-console .privacy b, .pb-console .status-legend b, .pb-console td:first-child { color: #141310; }
.pb-console .console-tag, .pb-console .owner-tag, .pb-console .eyebrow,
.pb-console .gate-top, .pb-console .metrics article:first-child strong,
.pb-console .kpi.accent strong, .pb-console td.num { color: #c42a00; }
.pb-console .console-tag, .pb-console .owner-tag { border-color: #ff3b00; }
.pb-console .links a:hover, .pb-console .links button:hover, .pb-console .rail-nav a:hover { color: #c42a00; }
.pb-console .rail-nav a:hover, .pb-console tbody tr:hover { background: #e7e1d5; }
.pb-console input:not([type=checkbox]), .pb-console select,
.pb-console .create-panel input[type=text], .pb-console .key-edit input[type=text],
.pb-console .gate input, .pb-console .show-key {
  background: #e7e1d5; border-color: var(--line2); color: #141310;
}
.pb-console input:focus { border-color: #ff3b00; }
.pb-console .primary, .pb-console .unlock { background: #141310; border-color: #141310; color: #f1ede4; border-radius: 0; }
.pb-console .primary:hover, .pb-console .unlock:hover { background: #ff3b00; border-color: #ff3b00; color: #fff; }
.pb-console .secondary, .pb-console .mini, .pb-console .action, .pb-console .range { color: #3a372f; border-radius: 0; }
.pb-console .secondary:hover, .pb-console .mini:hover, .pb-console .action:hover, .pb-console .range:hover { color: #c42a00; border-color: #141310; }
.pb-console .range.on { background: #141310; color: #f1ede4; }
.pb-console th { background: #e7e1d5; color: #6f695e; }
.pb-console td, .pb-console th { border-color: var(--line); }
.pb-console .gate, .pb-console .secret-overlay { background: rgba(241,237,228,.95); backdrop-filter: blur(8px); }
.pb-console .gate-box, .pb-console .secret-card { box-shadow: 8px 8px 0 rgba(20,19,16,.12); }
.pb-console .secret-value { background: #e7e1d5; color: #c42a00; border-color: #ff3b00; }
.pb-console .gate-msg { color: #aa2c1c !important; }
.pb-console .notice, .pb-console .toast.error { color: #aa2c1c; background: #f4e5df; }
.pb-console .toast { background: #141310; color: #f1ede4; box-shadow: 4px 4px 0 rgba(20,19,16,.14); }
.pb-console .funnel-track, .pb-console .metric-bar div, .pb-console .status-stack { background: #d7d0c2; }
.pb-console .delta { color: #6f695e; background: #e7e1d5; }
.pb-console .delta.up { color: #1f7a3d; background: #e4ecdf; }
.pb-console .delta.down { color: #aa2c1c; background: #f4e5df; }
.pb-console .identity i, .pb-console .live i, .pb-console .owner-tag::before { box-shadow: none; }
@media(max-width:600px) {
  .pb-console .metrics strong, .pb-console .kpi strong { overflow-wrap: anywhere; }
}
