/* Pickle app theme — shared by the Lab Simulator (tokens copied from the Hub Dashboard) */
:root {
  color-scheme: light;
  --bg: #f4f3ef;            /* page */
  --surface-1: #fcfcfb;     /* cards / chart surface */
  --surface-2: #efeeea;     /* inset panels */
  --line: #d9d7d0;          /* hairlines, title-block rules */
  --grid: #e7e5df;          /* chart gridlines, one step off the surface */
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #8a8880;
  --accent: #4f8a1f;        /* pickle green */
  --accent-ink: #ffffff;
  --accent-soft: rgba(79,138,31,.12);
  --good: #1f8a3b; --warn: #b26a00; --bad: #c62828;
  --live: #4f8a1f;          /* the un-recorded live trace */
  --s1:#2a78d6; --s2:#eb6834; --s3:#1baf7a; --s4:#eda100; --s5:#e87ba4; --s6:#008300; --s7:#4a3aa7; --s8:#e34948;
  --select: rgba(42,120,214,.10);
  --shadow: 0 1px 2px rgba(0,0,0,.06);
  --radius: 6px;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121211; --surface-1: #1a1a19; --surface-2: #232321; --line: #34332f; --grid: #2a2a27;
    --text-primary: #ffffff; --text-secondary: #c3c2b7; --text-muted: #8b8a82;
    --accent: #7fb24a; --accent-ink: #0b0b0b; --accent-soft: rgba(127,178,74,.16);
    --good: #4fbf6a; --warn: #e0a23a; --bad: #ef6e6e; --live: #7fb24a;
    --s1:#3987e5; --s2:#d95926; --s3:#199e70; --s4:#c98500; --s5:#d55181; --s6:#008300; --s7:#9085e9; --s8:#e66767;
    --select: rgba(57,135,229,.16); --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211; --surface-1: #1a1a19; --surface-2: #232321; --line: #34332f; --grid: #2a2a27;
  --text-primary: #ffffff; --text-secondary: #c3c2b7; --text-muted: #8b8a82;
  --accent: #7fb24a; --accent-ink: #0b0b0b; --accent-soft: rgba(127,178,74,.16);
  --good: #4fbf6a; --warn: #e0a23a; --bad: #ef6e6e; --live: #7fb24a;
  --s1:#3987e5; --s2:#d95926; --s3:#199e70; --s4:#c98500; --s5:#d55181; --s6:#008300; --s7:#9085e9; --s8:#e66767;
  --select: rgba(57,135,229,.16); --shadow: none;
}
:root { --accent-press:#3f6f18; --accent-bd:rgba(79,138,31,.35); --warn-soft:#fbf3e4; --chip-bg:rgba(11,11,11,.82); --chip-ink:#f4f3ef; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --accent-press:#9cc86b; --accent-bd:rgba(127,178,74,.4); --warn-soft:#2b2416; --chip-bg:rgba(244,243,239,.88); --chip-ink:#121211; } }
:root[data-theme="dark"] { --accent-press:#9cc86b; --accent-bd:rgba(127,178,74,.4); --warn-soft:#2b2416; --chip-bg:rgba(244,243,239,.88); --chip-ink:#121211; }
html { background: var(--bg); color: var(--text-primary); }
select, input { background: var(--surface-1); color: var(--text-primary); }
.sheet { max-width: 1400px; margin: 0 auto; }
.titleblock { display: grid; grid-template-columns: 1fr auto; border: 1.5px solid var(--text-primary); background: var(--surface-1); box-shadow: var(--shadow); }
.titleblock .brand { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-right: 1.5px solid var(--text-primary); }
.titleblock .brand .mark { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); font-weight: 700; font-family: var(--mono); }
.titleblock .brand h1 { margin: 0; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.titleblock .brand .sub { color: var(--text-secondary); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.titleblock .cells { display: grid; grid-template-columns: repeat(6, auto); }
.titleblock .cell { padding: 6px 12px; border-left: 1px solid var(--line); min-width: 96px; }
.titleblock .cell:first-child { border-left: 0; }
.titleblock .cell .k { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.titleblock .cell .v { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); vertical-align: middle; margin-right: 6px; }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
@media (max-width: 1000px) { .titleblock { grid-template-columns: 1fr; } .titleblock .brand { border-right: 0; border-bottom: 1.5px solid var(--text-primary); } .titleblock .cells { grid-template-columns: repeat(3, 1fr); } .titleblock .cell { border-top: 1px solid var(--line); } }
/* ───────── app nav (shared by the dashboard and the simulator) ───────── */
.appnav { max-width: 1400px; margin: 0 auto 10px; display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; }
.appnav .back { color: var(--text-secondary); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.appnav .back:hover { color: var(--text-primary); }
.appnav .back img { width: 22px; height: 22px; border-radius: 50%; }
.appnav .tabs { display: inline-flex; border: 1.5px solid var(--text-primary); background: var(--surface-1); }
.appnav .tabs a { padding: 5px 14px; text-decoration: none; color: var(--text-secondary); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; border-left: 1px solid var(--line); }
.appnav .tabs a:first-child { border-left: 0; }
.appnav .tabs a.on { background: var(--text-primary); color: var(--bg); }
.appnav .tabs a:not(.on):hover { color: var(--text-primary); background: var(--surface-2); }
.appnav .grow { flex: 1; }
.appnav .lnk { color: var(--text-secondary); text-decoration: none; }
.appnav .lnk:hover { color: var(--accent); }
@media (max-width: 640px) { .appnav .tabs a { padding: 5px 9px; letter-spacing: .06em; } .appnav .hide-sm { display: none; } }
.titleblock{max-width:1400px;margin:0 auto}
/* simulator: stack the stage / setup and guide / data columns on narrow screens */
@media (max-width: 900px) {
  div:has(> div > #lb-canvas), div:has(> #lb-guide) { grid-template-columns: minmax(0,1fr) !important; }
  div:has(> #lb-guide) > section { min-width: 0; }
  aside:has(#lb-controls) { max-height: none !important; }
  #lb-modes, #lb-view { flex-wrap: wrap; }
}
@media (max-width: 640px) { .titleblock .cells { grid-template-columns: repeat(2, 1fr); } .titleblock .brand h1 { font-size: 13px; } }
