/* Determyn website: shared styles.
   Look: control-room calm, after ISA-101 high-performance HMI practice. Grey grounds; colour only
   where it carries meaning: blue is the model (and actions), amber is a finding or a missed target,
   grey and ink are the plant's own record. One centred column, max 1200px.
   No inline styles and no data: URIs anywhere, so a strict Content-Security-Policy works. */

:root {
  --ground: #E4E7EA;
  --panel: #F2F4F5;
  --paper: #FFFFFF;
  --ink: #17202A;
  --ink-2: #47525E;
  --ink-3: #6E7782;
  --rule: #C3C9CF;
  --field-border: #838D97;
  --model: #1F4FBF;
  --model-hover: #163A8F;
  --model-wash: rgba(31, 79, 191, 0.07);
  --on-model: #FFFFFF;
  --finding: #B4690E;
  --finding-ink: #7A4605;
  --night: #141B23;
  --night-rule: #3A4552;
  --night-ink: #E6EAEE;
  --night-ink-2: #A7B1BC;
  --night-link: #9DB7F5;
  --night-finding: #F0B566;
  --shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(23, 32, 42, 0.35);

  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --wordmark: "Urbanist", "Century Gothic", "Avenir Next", system-ui, sans-serif;

  --step-0: 1.0625rem;   /* 17px body */
  --step-1: 1.1875rem;   /* 19px lede */
  --h3: 1.1875rem;
  --h2: clamp(2.25rem, 4.4vw, 3.5rem);
  --h1: clamp(2.75rem, 6.4vw, 5.25rem);
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(64px, 8vw, 104px);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #11171E;
    --panel: #18202A;
    --paper: #1D2632;
    --ink: #E3E8ED;
    --ink-2: #A3AEBA;
    --ink-3: #6F7B88;
    --rule: #2E3946;
    --field-border: #7A8796;
    --model: #8AAAF5;
    --model-hover: #B3C8FA;
    --model-wash: rgba(138, 170, 245, 0.09);
    --on-model: #0E1520;
    --finding: #E09A3E;
    --finding-ink: #F0B566;
    --night: #0A0F14;
    --night-rule: #2E3946;
    --shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { text-wrap: balance; margin: 0; }
p, ul, ol, dl, dd, figure { margin: 0; }
img, svg { max-width: 100%; }

a { color: var(--model); text-underline-offset: 0.18em; }
a:hover { color: var(--model-hover); }
:focus-visible { outline: 3px solid var(--model); outline-offset: 3px; }

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--panel);
  font-weight: 600;
  border-radius: 3px;
}
.skip:focus { top: 8px; color: var(--panel); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header { background: var(--panel); border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.mark { flex: none; display: block; }
/* The wordmark: Urbanist is the closest open font to the logo's lettering (brand/). */
.brand-name {
  font-family: var(--wordmark);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.17em;
  line-height: 1;
}
/* The mark, traced from brand/determyn-logo.webp; one colour, so it follows the theme. */
.mark-fill { fill: var(--ink); }
.mark-line { fill: none; stroke: var(--ink); stroke-width: 12.5; }

.site-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
  font-size: 0.9375rem;
}
.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.site-nav a:not(.btn):hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

/* Status line, styled like an HMI status bar */
.status-line { background: var(--night); color: var(--night-ink-2); font-family: var(--mono); font-size: 0.8125rem; }
.status-line .wrap { display: flex; flex-wrap: wrap; gap: 4px 28px; padding-block: 9px; }
.status-line strong { color: var(--night-ink); font-weight: 500; }
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #8A949E;
  vertical-align: 1px;
}

/* Type */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow-finding { color: var(--finding-ink); }
.eyebrow-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.display-1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--h1);
  line-height: 0.98;
  letter-spacing: -0.005em;
}
.display-2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--h2);
  line-height: 1.02;
}
.display-3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  line-height: 1.04;
}
.lede { font-size: var(--step-1); line-height: 1.6; color: var(--ink-2); max-width: 36em; }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.hint { font-size: 0.8125rem; font-weight: 400; color: var(--ink-2); }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.measure { max-width: 46em; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: 3px;
  font: 600 1rem/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--model); color: var(--on-model); }
.btn-primary:hover { background: var(--model-hover); color: var(--on-model); }
.btn-ink { background: var(--ink); color: var(--panel); min-height: 44px; }
.btn-ink:hover { background: var(--ink-2); color: var(--panel); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--panel); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; }
.btn:disabled { cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
.section { padding-block: var(--section); }
.band { background: var(--panel); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band-night { background: var(--night); color: var(--night-ink); }
.band-night .eyebrow, .band-night .muted { color: var(--night-ink-2); }
.band-night a { color: var(--night-link); }
.band-night a:hover { color: var(--night-ink); }
.band-night :focus-visible { outline-color: var(--night-link); }
.section-head { display: flex; flex-direction: column; gap: 18px; max-width: 46em; margin-bottom: 48px; }
.section-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 16px 32px;
  margin-bottom: 40px;
}
.section-head-row .section-head { margin-bottom: 0; }

/* Grids */
.cols-2, .cols-3, .cols-5 { display: grid; gap: 32px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.wide-gap { gap: 56px 64px; }
.align-start { align-items: start; }
.align-center { align-items: center; }
ol.cols-3, ol.cols-5, ul.plain { list-style: none; padding: 0; }

/* Hero */
.hero { padding-block: clamp(56px, 8vw, 96px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 28px; min-width: 0; }

/* Trend card. Chart text is sized in SVG user units, so it is set by the card's width. */
.trend {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 20px 20px 16px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.trend-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-family: var(--mono); font-size: 0.8125rem; }
.trend-head span:first-child { font-weight: 500; }
.trend svg { display: block; width: 100%; height: auto; }
.ch-hold { fill: var(--model-wash); }
.ch-grid { stroke: var(--rule); stroke-width: 1; }
.ch-axis { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.ch-label { fill: var(--ink-2); font-family: var(--mono); font-size: 12px; }
.ch-note { fill: var(--ink); font-family: var(--mono); font-size: 12px; }
.ch-hist { fill: var(--ink-2); }
.ch-untuned { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-dasharray: 6 5; }
.ch-tuned { fill: none; stroke: var(--model); stroke-width: 2.6; }
.ch-pane { fill: var(--ink); font-weight: 500; }
/* The tuned traces draw in once over the historian samples. Each path has pathLength="1". */
@media (prefers-reduced-motion: no-preference) {
  .ch-tuned { stroke-dasharray: 1; stroke-dashoffset: 0; animation: ch-draw 2.2s cubic-bezier(0.3, 0, 0.2, 1) 0.4s backwards; }
}
@keyframes ch-draw { from { stroke-dashoffset: 1; } }
@container (max-width: 700px) {
  .ch-label, .ch-note { font-size: 14px; }
}
@container (max-width: 560px) {
  .ch-label, .ch-note { font-size: 18px; }
}
@container (max-width: 400px) {
  .ch-label, .ch-note { font-size: 26px; }
  .ch-odd { display: none; }
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.875rem; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 8px; }
.key-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); }
.key-dash { width: 18px; border-top: 2px dashed var(--ink-3); }
.key-line { width: 18px; border-top: 3px solid var(--model); }

/* Tables */
.table-scroll { overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data caption { text-align: left; padding-bottom: 6px; }
.data th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 6px 10px;
}
.data td, .data tbody th { padding: 8px 10px; border-top: 1px solid var(--rule); }
.data tbody th {
  font-family: var(--body);
  font-size: inherit;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.data th:first-child, .data td:first-child { padding-left: 0; }
.data th:last-child, .data td:last-child { padding-right: 0; }
.data tr.em th, .data tr.em td { color: var(--model); font-weight: 600; }
.trend .data { font-size: 0.875rem; }
.trend .data td { white-space: nowrap; }
.trend .table-scroll { border-top: 1px solid var(--rule); padding-top: 10px; }

/* Problem columns */
.ruled-top { border-top: 2px solid var(--ink); padding-top: 18px; }
.label { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.12em; color: var(--ink-2); }

/* Steps */
.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 22px 20px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.step-num { font-family: var(--display); font-weight: 600; font-size: 2.5rem; line-height: 1; color: var(--model); }
.step h3 { font-size: var(--h3); font-weight: 600; }
.step p { font-size: 0.9375rem; color: var(--ink-2); }
.step .chip { margin-top: auto; }
.steps-plain .step { background: none; border: 0; border-top: 2px solid var(--ink); border-radius: 0; padding: 16px 0 0; }
.steps-plain .step-num { font-size: 2.125rem; }

/* Status chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  justify-self: start;
  padding: 3px 9px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.5;
  color: var(--ink-2);
  white-space: nowrap;
}
.chip-done { background: var(--ink); border-color: var(--ink); color: var(--panel); }
.chip-active { border-color: var(--model); color: var(--model); }
.chip-below { border-color: var(--finding); color: var(--finding-ink); }
.diamond { flex: none; width: 8px; height: 8px; background: var(--finding); transform: rotate(45deg); }
.band-night .chip { border-color: var(--night-ink-2); color: var(--night-ink-2); }
.band-night .chip-active { border-color: var(--night-link); color: var(--night-link); }
.band-night .chip-below { border-color: var(--night-finding); color: var(--night-finding); }
.band-night .diamond { background: var(--night-finding); }

/* Fidelity */
.levels { border-top: 1px solid var(--rule); }
.levels > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding-block: 16px;
  border-bottom: 1px solid var(--rule);
}
.levels dt { font-family: var(--display); font-weight: 600; font-size: 1.625rem; line-height: 1.1; }
.levels dt.em { color: var(--model); }
.levels dd { font-size: 1rem; }
.report { min-width: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; box-shadow: var(--shadow); }
.report-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--rule);
}
.report-head span:first-child { font-weight: 600; }
.report .table-scroll { padding: 4px 22px 0; }
.report .data { font-size: 0.9375rem; }
.report .data td, .report .data tbody th { padding-block: 12px; }
.report-foot { display: flex; flex-direction: column; gap: 8px; padding: 16px 22px 20px; border-top: 1px solid var(--rule); font-size: 0.875rem; color: var(--ink-2); }
.report-sections { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.below { display: inline-flex; align-items: center; gap: 7px; color: var(--finding-ink); }
.tag { font-family: var(--mono); white-space: nowrap; }

/* Findings */
.findings-groups { display: flex; flex-direction: column; gap: 28px; }
.findings { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.findings li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.findings-planned li { background: transparent; border-style: dashed; color: var(--ink-2); }
.findings-planned .diamond { background: transparent; border: 1.5px solid var(--finding); }

/* Ruled tile grid (site fit, partner terms) */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.tile { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 26px 28px; background: var(--ground); }
.tiles-panel .tile { background: var(--panel); padding: 32px; }
.tile h3 { font-size: 1.125rem; font-weight: 600; }
.tile p { font-size: 1rem; color: var(--ink-2); }
.tile .chip { margin-top: auto; }
.bullets { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }

/* Test stages on the night band */
.night-item { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--night-rule); padding-top: 22px; }
.night-item h3 { font-size: 1.25rem; font-weight: 600; }
.night-item p { font-size: 1rem; color: var(--night-ink-2); }
.night-item .label { color: var(--night-ink-2); font-size: 0.8125rem; }
.night-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.link-strong { font-weight: 600; font-size: 1.0625rem; }

/* Call to action box */
.cta-box { display: flex; flex-direction: column; gap: 16px; padding: 28px; background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; min-width: 0; }

/* Footer */
.site-footer { background: var(--panel); border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 0.875rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding-block: 28px; }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 24px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); }

/* Form */
.form-card { container-type: inline-size; min-width: 0; padding: 28px; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; }
.form { display: flex; flex-direction: column; gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
@container (max-width: 440px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .legend-label { font-size: 0.875rem; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--field-border);
  border-radius: 3px;
}
.field textarea { min-height: 132px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 1px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 10px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--field-border);
  border-radius: 3px;
  background: var(--paper);
  font-size: 0.9375rem;
  cursor: pointer;
  user-select: none;
}
.choice label::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--field-border);
  border-radius: 2px;
  background: var(--paper);
}
/* The tick: a mask over a token colour, so it follows the theme. */
.choice label::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background: transparent;
  -webkit-mask: url("tick.svg") center / 12px no-repeat;
  mask: url("tick.svg") center / 12px no-repeat;
}
.choice input:checked + label { border-color: var(--model); background: var(--model-wash); font-weight: 600; }
.choice input:checked + label::before { border-color: var(--model); background: var(--model); }
.choice input:checked + label::after { background: var(--on-model); }
.choice input:focus-visible + label { outline: 3px solid var(--model); outline-offset: 2px; }
@media (forced-colors: active) {
  .choice label::before { forced-color-adjust: none; background: Canvas; border-color: CanvasText; }
  .choice input:checked + label::before { background: Highlight; border-color: Highlight; }
  .choice input:checked + label::after { forced-color-adjust: none; background: HighlightText; }
  .choice input:checked + label { border-width: 3px; }
}
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* The live region stays in the accessibility tree; only the message inside it is hidden. */
.form-live { margin-top: -20px; }
.form-live > .form-status { margin-top: 20px; }
.form-live > .form-status:empty { display: none; }
.form-status { padding: 14px 16px; border-radius: 3px; border: 1px solid var(--rule); background: var(--panel); }
.form-status[data-kind="error"] { border-color: var(--finding); }

/* Engineering log */
.phases {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.phases li { display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 24px; background: var(--panel); min-width: 0; }
.phases li.current { background: var(--paper); }
.phases h2 { font-size: 1.1875rem; font-weight: 600; }
.phases p { font-size: 0.9375rem; color: var(--ink-2); }
.phases .phase-tag { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--ink-2); }
.phase-tag span { white-space: nowrap; }
.phases .phase-count { margin-top: auto; font-family: var(--mono); font-size: 0.8125rem; }
.phases .current .phase-tag, .phases .current .phase-count { color: var(--model); }
.log { border-bottom: 1px solid var(--rule); }
.log-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 160px minmax(0, 1.6fr);
  gap: 12px 28px;
  align-items: start;
  padding-block: 22px;
  border-top: 1px solid var(--rule);
}
.log-row h3 { font-size: 1.125rem; font-weight: 600; }
.log-row p { font-size: 1rem; color: var(--ink-2); }

/* Why Determyn: the governing relation, set like a faceplate */
.prose { display: flex; flex-direction: column; gap: 56px; max-width: 46em; }
.prose section { display: flex; flex-direction: column; gap: 14px; }
.prose h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.75rem, 2.6vw, 2.25rem); line-height: 1.05; }
.prose p { color: var(--ink-2); }
.equation {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 28px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.equation-line { font-family: var(--mono); font-size: clamp(1.25rem, 5.4vw, 2.25rem); line-height: 1.2; color: var(--ink); white-space: nowrap; }
.equation-key { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 0.9375rem; }
.equation-key dt { font-family: var(--mono); font-weight: 500; color: var(--model); }
.equation-key dd { margin: 0; color: var(--ink-2); }

/* Typeset equations (MathML Core, no script): a card per equation, its symbol key below.
   A wide equation scrolls inside its card on a phone; the page itself never scrolls sideways. */
math { font-family: "STIX Two Math", "Cambria Math", "Latin Modern Math", math; }
.eq {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 6px 0;
  padding: 20px 22px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  min-width: 0;
}
.eq-math { overflow-x: auto; overflow-y: hidden; padding-block: 4px; color: var(--ink); }
/* Aligned equations: an HTML table of inline MathML cells, the left side right-aligned against
   "=" (Chrome's MathML tables ignore cell alignment). math-style: normal keeps fractions and sum
   limits at display size inside the cells. */
.eq-table { border-collapse: collapse; }
.eq-table td { padding: 0.35em 0; vertical-align: middle; white-space: nowrap; }
.eq-table .eq-lhs { text-align: right; padding-right: 0.25em; }
.eq-table .eq-rhs { text-align: left; }
.eq-math math { font-size: 1.2rem; math-style: normal; }
.eq .equation-key { font-size: 0.875rem; }
.eq .equation-key dt { font-family: inherit; font-style: italic; font-weight: 400; }
.phone-only { display: none; }
@media (max-width: 720px) {
  .eq { padding: 16px; }
  .eq-math math { font-size: 1.05rem; }
  .eq .equation-key { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .eq .equation-key dd { margin-bottom: 10px; }
  .phone-only { display: block; }
}

/* Spacing utilities (in place of inline styles) */
.mt-48 { margin-top: 48px; }
.pb-72 { padding-bottom: 72px; }
.gap-16 { gap: 16px; }
.gap-22 { gap: 22px; }
.gap-24 { gap: 24px; }
.measure-sm { max-width: 26em; }
.subhead { margin: 64px 0 24px; }

/* Narrow screens */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .cols-5, .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1001px) and (max-width: 1180px) {
  .cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 721px) and (max-width: 900px) {
  .cols-2.align-start { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .log-row { grid-template-columns: minmax(0, 1fr) auto; }
  .log-row p { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .cols-2, .cols-3, .cols-5, .tiles, .phases { grid-template-columns: minmax(0, 1fr); }
  .levels > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .tile, .tiles-panel .tile { padding: 22px 20px; }
  .form-card, .cta-box { padding: 22px 18px; }
  .equation { padding: 20px 18px; }
}
@media (max-width: 480px) {
  .log-row { grid-template-columns: minmax(0, 1fr); }
  .site-nav ul { gap: 0 18px; }
  .trend { padding-inline: 12px; }
  .report .table-scroll { padding-inline: 12px; }
  .report .data { font-size: 0.875rem; }
  .trend .data th, .trend .data td, .report .data th, .report .data td { padding-inline: 4px; }
  .trend .data :is(th, td):first-child, .report .data :is(th, td):first-child { padding-left: 0; }
  .trend .data :is(th, td):last-child, .report .data :is(th, td):last-child { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  :root {
    --ground: #FFFFFF; --panel: #FFFFFF; --paper: #FFFFFF; --ink: #000000; --ink-2: #333333; --ink-3: #555555;
    --rule: #999999; --field-border: #999999; --model: #1F4FBF; --model-hover: #163A8F; --model-wash: transparent;
    --on-model: #FFFFFF; --finding: #B4690E; --finding-ink: #7A4605; --night: #FFFFFF; --night-ink: #000000;
    --night-ink-2: #333333; --night-link: #1F4FBF; --night-finding: #7A4605; --night-rule: #999999; --shadow: none;
    color-scheme: light;
  }
  .site-header, .status-line, .site-footer, .skip, .form-card { display: none; }
  body { background: #FFFFFF; color: #000000; }
  .tiles, .phases { gap: 0; }
  .tile, .phases li { border: 1px solid #999999; }
}
