@font-face { font-family: "Space Grotesk"; font-weight: 300 700; font-display: swap; src: url("/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2-variations"); }
/* Theme layer for the supplied Industrial Utilities Simulator (public/simulator.html).
   The simulator's own colourful tabs, buttons and fonts are kept; this file only
   swaps its surfaces to match the site's dark or light mode. */
html[data-theme="dark"] {
  --ink: oklch(0.97 0.01 250);
  --mut: oklch(0.78 0.03 245);
  --bg: oklch(0.145 0.03 250);
  --card: oklch(0.19 0.035 250);
  --line: oklch(0.4 0.04 245 / 70%);
  color-scheme: dark;
}
html[data-theme="dark"] .card {
  border-color: oklch(0.42 0.05 240 / 75%);
  box-shadow: 0 1px 0 oklch(1 0 0 / 6%) inset, 0 8px 22px oklch(0 0 0 / 45%);
}
html[data-theme="dark"] .k { background: oklch(0.24 0.04 248); }
html[data-theme="dark"] .bg { background: oklch(0.28 0.035 248); }
html[data-theme="dark"] .tip { background: oklch(0.3 0.06 85 / 45%); color: var(--ink); }
html[data-theme="dark"] .ex { background: oklch(0.3 0.07 240 / 50%); color: var(--ink); }
html[data-theme="dark"] .tab:not(.on) { opacity: 0.72; }
/* Surfaces in newer simulator versions that use fixed light colours */
html[data-theme] .card { background: var(--card); }
html[data-theme="dark"] .link { background: oklch(0.3 0.07 160 / 45%); color: var(--ink); }
html[data-theme="dark"] .st { background: oklch(0.22 0.03 250); color: var(--ink); }
html[data-theme="dark"] .rg { background: linear-gradient(90deg, var(--a), var(--b)) left / var(--p) 100% no-repeat, oklch(0.32 0.035 248); }

html[data-theme="light"] {
  --ink: oklch(0.14 0.03 255);
  --mut: oklch(0.36 0.04 255);
  --bg: oklch(0.96 0.015 230);
  --card: oklch(0.995 0.003 230);
  --line: oklch(0.8 0.04 230);
}
html[data-theme="light"] .card { box-shadow: 0 6px 18px oklch(0.4 0.05 240 / 12%); }

/* Theme switch added to the simulator's top bar */
.sim-theme {
  margin-left: auto; border: 1px solid rgba(255,255,255,.45); border-radius: 9px;
  background: rgba(255,255,255,.12); color: #fff; font: inherit; font-weight: 600;
  padding: 7px 12px; cursor: pointer;
}
.sim-theme:hover { background: rgba(255,255,255,.22); }

@media print {
  html[data-theme="dark"] { --ink: #0f1b2d; --mut: #5b6b80; --bg: #fff; --card: #fff; --line: #d9e1ec; }
  html[data-theme="dark"] .k { background: #f5f8fc; }
  html[data-theme="dark"] .bg { background: #e8eef6; }
  html[data-theme="dark"] .tip { background: #fff8e6; }
  html[data-theme="dark"] .ex { background: #eaf6ff; }
  html[data-theme="dark"] .link { background: #ecfdf5; }
  html[data-theme="dark"] .st { background: #f8fafc; }
  .sim-theme { display: none; }
}

/* Lift the deeper utility name colours so they stay readable on dark cards */
@media screen { html[data-theme="dark"] #all [style*="color:"] { filter: brightness(1.45) saturate(1.1); } }

/* ---- Website formatting: header panel, headings and sky-blue toggles ---- */
html[data-theme] header {
  background: linear-gradient(135deg, oklch(0.19 0.035 250) 0%, oklch(0.24 0.06 230) 55%, oklch(0.32 0.08 200) 100%);
  border-bottom: 2px solid oklch(0.72 0.16 210 / 70%);
}
html[data-theme="light"] header {
  background: linear-gradient(135deg, oklch(0.93 0.035 225) 0%, oklch(0.9 0.05 215) 100%);
  border-bottom-color: oklch(0.55 0.12 230);
  color: oklch(0.14 0.03 255);
}
html[data-theme="light"] header p { opacity: 1; color: oklch(0.32 0.04 255); }
html[data-theme] header h1,
html[data-theme] .card h2 { font-family: "Space Grotesk", "IBM Plex Sans", system-ui, sans-serif; letter-spacing: 0; }
html[data-theme] header h1 { color: oklch(0.82 0.13 215); font-weight: 700; }
html[data-theme="light"] header h1 { color: oklch(0.4 0.17 250); }
html[data-theme] .seg { border: 1px solid oklch(0.5 0.13 231); gap: 4px; padding: 3px; background: oklch(0.12 0.012 250 / 35%); }
html[data-theme] .seg button {
  border-radius: 7px; color: #04070c; font-weight: 800;
  background: linear-gradient(180deg, oklch(0.87 0.09 222) 0%, oklch(0.77 0.14 224) 52%, oklch(0.66 0.15 227) 100%);
  text-shadow: 0 1px 0 rgba(255,255,255,.6); opacity: .7;
}
html[data-theme] .seg button.on {
  opacity: 1; color: #04070c;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 2px 6px rgba(0,0,0,.4), 0 0 12px oklch(0.77 0.14 224 / 45%);
  outline: 2px solid oklch(0.95 0.05 220);
}
html[data-theme="light"] .sim-theme { color: oklch(0.14 0.03 255); border-color: oklch(0.55 0.12 230); background: rgba(255,255,255,.6); }

/* Inside the site page: no outer page colour or centring gaps, page header is the site's */
html.sim-embedded, html.sim-embedded body { background: transparent; overflow: hidden; }
html.sim-embedded header { border-radius: 12px 12px 0 0; }
html.sim-embedded main { padding: 14px 0; max-width: none; }
html.sim-embedded footer { padding-bottom: 10px; }
