/* LabLife
 * Layout: one column like an instrument panel. Sticky top bar, labelled input rows,
 * a glowing readout for the main result, then the secondary readings.
 * Colours: dark only, near-black with a violet glow and warm amber accents.
 */
:root {
  --bg: #0b0710;
  --bg-2: #160d17;                 /* the warm bottom of the page gradient */
  --surface: #140d1b;
  --surface-2: #1c1325;
  --raised: #1d1428;               /* a surface lifted above the others (sheets, curtain, notices) */
  --well: #0f0a15;                 /* inside input boxes */
  --ink: #f4eff8;
  --ink-2: #ab9eb8;
  --line: #2e2338;
  --line-2: rgb(255 255 255 / 20%); /* outlines of buttons and pills */
  --accent: #b069f7;               /* violet: text, symbols, the logo */
  --accent-strong: #8e45dc;        /* violet fills behind white text */
  --accent-ink: #ffffff;
  --accent-soft: #2a1840;
  --amber: #e9984f;                /* the warm second accent: separators, small highlights */
  --glow: rgb(176 105 247 / 28%);
  /* hairline edges of cards: violet at the top left, amber at the bottom right */
  --edge: linear-gradient(120deg, rgb(176 105 247 / 70%), rgb(176 105 247 / 12%) 38%, rgb(255 255 255 / 6%) 60%, rgb(233 152 79 / 55%));
  --edge-soft: linear-gradient(150deg, rgb(176 105 247 / 38%), rgb(255 255 255 / 7%) 30%, rgb(255 255 255 / 6%) 75%, rgb(233 152 79 / 26%));
  --readout: #1b1030;
  --readout-2: #2a1a45;
  --readout-ink: #ffffff;
  --readout-dim: #bcaed6;
  --readout-line: #44306a;
  --ok: #6fd6a2;
  --ok-soft: #12261d;
  --warn: #f1b35c;
  --warn-soft: #2b1f12;
  --info: #c3a3ff;
  --info-soft: #24183a;
  --danger: #ff8a80;
  --backdrop: rgb(4 2 8 / 70%);
  --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 10px 30px rgb(0 0 0 / 35%);

  --font-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Lexend", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-sym: "STIX Two Math", "STIX Two Text", "Cambria Math", "Times New Roman", serif;

  --radius: 16px;
  --radius-sm: 10px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));

  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
  background: var(--bg);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  isolation: isolate;
  overflow-x: clip;          /* the page slide-in (motion.css) never makes the page scroll sideways */
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
/* the page background: a still violet glow at the top and a warm one at the bottom (no motion) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% -8%, rgb(142 69 220 / 20%), transparent 70%),
    radial-gradient(45% 35% at 0% 100%, rgb(150 60 100 / 16%), transparent 70%),
    radial-gradient(40% 30% at 100% 80%, rgb(110 50 160 / 12%), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgb(176 105 247 / 40%); color: #fff; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-family: var(--font-display); font-weight: 600; }
p { margin: 0; }
sub, sup { line-height: 0; }

/* Physics symbols: serif italic, descriptive sub/superscripts upright */
.sym { font-family: var(--font-sym); font-style: italic; font-size: 1.12em; white-space: nowrap; letter-spacing: 0.01em; }
.sym sub, .sym sup { font-style: normal; font-size: 0.68em; }
.sym .up { font-style: normal; }
.sym .ol { text-decoration: overline; text-decoration-thickness: 0.06em; }
math { font-family: "STIX Two Math", "Latin Modern Math", "Cambria Math", math; }

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
/* section pages, Universal constants and Contact: one centred column, like the home page */
.page-narrow { max-width: 800px; }
