:root {
  --bg: #ffffff; --surface: #f5f5f7; --text: #1d1d1f; --muted: #6e6e73;
  --line: #d2d2d7; --accent: #0a5cff; --accent-hover: #0048d7; --danger: #b42318;
  --success: #177245; --warning: #8a5200; --display: 56px/1.05 Inter, sans-serif; --h1: 40px/1.1 Inter, sans-serif;
  --h2: 28px/1.2 Inter, sans-serif; --h3: 21px/1.3 Inter, sans-serif; --body: 17px/1.6 Inter, sans-serif; --caption: 13px/1.4 Inter, sans-serif;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 40px; --s6: 48px; --s7: 56px; --s8: 64px;
  --s9: 72px; --s10: 80px; --s11: 88px; --s12: 96px;
  --container: 1760px; --radius: 18px; --control-radius: 12px; --shadow: 0 16px 48px rgb(29 29 31 / 9%);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth; scroll-padding-top: 72px;
}
body {
  margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text);
  font: var(--body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body,
button,
input,
select,
textarea {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
img,
svg {
  display: block; max-width: 100%;
}
iframe {
  border: 0;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin-top: 0;
}
h1 {
  margin-bottom: var(--s3); font: var(--h1); font-weight: 600; letter-spacing: -0.02em;
}
h2 {
  margin-bottom: var(--s2); font: var(--h2); font-weight: 600;
}
h3 {
  margin-bottom: var(--s1); font: var(--h3); font-weight: 600;
}
h4 {
  margin-bottom: var(--s1); font-size: 17px; line-height: 1.4;
}
p,
li,
dd {
  max-width: 65ch;
}
p:last-child,
ul:last-child,
dl:last-child {
  margin-bottom: 0;
}
a {
  color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px;
}
a:hover {
  color: var(--accent-hover);
}
button,
summary {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid rgb(10 92 255 / 35%); outline-offset: 3px;
}
.skip-link {
  position: fixed; top: var(--s1); left: var(--s2); z-index: 200;
  transform: translateY(-80px); border-radius: var(--control-radius); background: var(--accent); color: #fff;
  padding: 10px var(--s2); font-weight: 600; text-decoration: none;
}
.skip-link:focus {
  transform: translateY(0);
}
.container {
  width: min(calc(100% - 48px), var(--container)); margin-inline: auto;
}
/* A narrow block keeps its measure but starts at the page's left edge, so it lines
   up with the header above it instead of floating in the middle of a wide screen. */
.container--narrow {
  max-width: none;
}
.container--narrow > * {
  max-width: 800px;
}
/* The logged-in area is a working tool: tables, forms and charts take the width. */
body[data-page="portal"],
body[data-page="bess"],
body[data-page="rtm_charts"] {
  --container: 2160px;
}
.nav {
  position: sticky; top: 0; z-index: 100; height: 56px;
  border-bottom: 1px solid rgb(210 210 215 / 70%); background: rgb(255 255 255 / 80%); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
}
.nav__inner {
  display: flex; width: min(calc(100% - 48px), var(--container)); height: 100%; margin-inline: auto;
  align-items: center; justify-content: space-between; gap: var(--s3);
}
.nav__brand {
  color: var(--text); font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  text-decoration: none;
}
.nav__links {
  display: flex; align-items: center; gap: var(--s3);
}
.nav__links a,
.nav__action {
  min-height: 44px; display: inline-flex; align-items: center; border: 0;
  background: transparent; color: var(--muted); font-size: 14px; text-decoration: none;
}
.nav__links a:hover,
.nav__action:hover,
.nav__links a[aria-current="page"] {
  color: var(--text);
}
.nav__form {
  margin: 0;
}
.nav__mobile {
  display: none; position: relative;
}
.nav__mobile summary {
  min-height: 44px; display: flex; align-items: center; color: var(--text);
  font-size: 14px; font-weight: 600; list-style: none;
}
.nav__mobile summary::-webkit-details-marker {
  display: none;
}
.nav__mobile-panel {
  position: absolute; top: 44px; right: 0; width: 210px;
  padding: var(--s1); border: 1px solid var(--line); border-radius: 14px; background: var(--bg);
  box-shadow: var(--shadow);
}
.nav__mobile-panel a,
.nav__mobile-panel button {
  width: 100%; min-height: 44px; display: flex; align-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--text);
  padding: 0 12px; font: inherit; text-align: left; text-decoration: none;
}
.nav__mobile-panel a:hover,
.nav__mobile-panel button:hover {
  background: var(--surface);
}
.site-main {
  min-height: calc(100vh - 56px);
}
.hero {
  padding-block: var(--s10); text-align: center;
}
.hero__content {
  max-width: 880px; margin-inline: auto;
}
.hero h1 {
  max-width: 18ch; margin-inline: auto; font: var(--display); font-weight: 600;
  letter-spacing: -0.03em;
}
.hero__sub {
  max-width: 58ch; margin: 0 auto var(--s4); color: var(--muted); font-size: 19px;
  line-height: 1.55;
}
.hero__actions,
.actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2);
}
.hero__actions {
  justify-content: center;
}
.hero__figure {
  margin: var(--s8) auto 0;
}
.section {
  padding-block: var(--s9);
}
.section--surface {
  background: var(--surface);
}
.section__head {
  max-width: 720px; margin-bottom: var(--s6);
}
.section__head p:not(.eyebrow) {
  color: var(--muted);
}
/* Tool pages (portal, bess, rtm): a compact page header in place of a hero. */
.section--tool {
  padding-block: var(--s8) var(--s2);
}
.section--tool + .section {
  padding-top: var(--s6);
}
.section__head--tool {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--s3); max-width: none; margin-bottom: 0;
}
.section__head--tool > div:first-child {
  max-width: 720px;
}
.section__head--tool h1 {
  margin-bottom: var(--s1);
}
.section__head--tool p:not(.eyebrow) {
  margin: 0;
}
.section__cta {
  margin-top: var(--s5);
}
.grid-2,
.grid-3 {
  display: grid; gap: var(--s3);
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-2--wide {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
}
.eyebrow {
  margin-bottom: var(--s1); color: var(--muted); font: var(--caption); font-weight: 600;
}
.muted,
.helper,
.caption {
  color: var(--muted);
}
.caption,
.helper {
  font: var(--caption);
}
.card {
  min-width: 0; padding: var(--s4); border-radius: var(--radius); background: var(--surface);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.section--surface .card {
  background: var(--bg);
}
.card p,
.card li {
  color: var(--muted);
}
.card__footer {
  margin-top: var(--s3);
}
.card__meta {
  margin-bottom: var(--s2); color: var(--muted); font: var(--caption); font-weight: 600;
}
.card--feature {
  display: flex; min-height: 260px; flex-direction: column; justify-content: space-between;
}
.card--plain {
  background: transparent; padding: 0;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow);
  }
}
.btn {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s1); border: 1px solid transparent; border-radius: var(--control-radius); padding: 9px 18px;
  background: var(--surface); color: var(--text); font-size: 15px; font-weight: 600;
  line-height: 24px; text-decoration: none;
}
.btn:hover {
  background: #e8e8ed; color: var(--text);
}
.btn--primary {
  background: var(--accent); color: #fff;
}
.btn--primary:hover {
  background: var(--accent-hover); color: #fff;
}
.btn--ghost {
  border-color: var(--line); background: transparent;
}
.btn--block {
  width: 100%;
}
.text-link {
  display: inline-flex; min-height: 44px; align-items: center; font-size: 15px;
  font-weight: 600; text-decoration: none;
}
.kpi-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3);
}
.kpi {
  min-width: 0; padding: var(--s3) 0; border-top: 1px solid var(--line);
}
.kpi__value {
  margin: 0 0 4px; font-size: 40px; font-weight: 600; letter-spacing: -0.03em;
  line-height: 1.1;
}
.kpi__label,
.kpi__note {
  margin: 0; color: var(--muted); font: var(--caption);
}
.kpi__label {
  margin-bottom: var(--s1); color: var(--text); font-weight: 600;
}
.table-wrap {
  width: 100%; max-width: 100%; overflow-x: auto;
}
.table {
  width: 100%; border-collapse: collapse; text-align: left;
}
.table th,
.table td {
  padding: 16px 12px; border-bottom: 1px solid var(--line); vertical-align: middle;
}
.table th {
  color: var(--muted); font: var(--caption); font-weight: 600;
}
.table td {
  font-size: 15px;
}
.table td:first-child,
.table th:first-child {
  padding-left: 0;
}
.table td:last-child,
.table th:last-child {
  padding-right: 0; text-align: right;
}
.table__primary {
  display: block; overflow-wrap: anywhere; color: var(--text); font-weight: 600;
}
.table__secondary {
  display: block; max-width: 56ch; overflow-wrap: anywhere; color: var(--muted);
  font: var(--caption);
}
.form {
  display: grid; gap: var(--s4);
}
.form__group {
  display: grid; gap: var(--s2);
}
.form__field {
  min-width: 0;
}
.form label,
.form__label {
  display: block; margin-bottom: var(--s1); font-size: 14px; font-weight: 600;
}
.form input:not([type="checkbox"]),
.form select,
.form textarea {
  width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: var(--control-radius);
  background: var(--bg); color: var(--text); padding: 9px 12px; font-size: 16px;
  line-height: 24px;
}
.form textarea {
  min-height: 120px; resize: vertical;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: var(--accent); outline: 3px solid rgb(10 92 255 / 16%);
}
.form input[type="checkbox"] {
  width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent);
}
.form__check label {
  display: flex; align-items: flex-start; gap: 12px;
}
.form__help {
  margin: 6px 0 0; color: var(--muted); font: var(--caption);
}
.errorlist,
.form__error {
  margin: 6px 0 0; padding: 0; color: var(--danger); font: var(--caption);
  list-style: none;
}
.form__notice,
.message {
  border-radius: var(--control-radius); background: var(--surface); padding: 14px var(--s2);
}
.form__notice--error {
  color: var(--danger);
}
.form__section {
  min-width: 0; margin: 0; border: 0; border-top: 1px solid var(--line);
  padding: var(--s4) 0 0;
}
.form__section legend {
  width: 100%; padding: 0;
}
.form__section-intro {
  margin-bottom: var(--s3); color: var(--muted);
}
.form__actions {
  display: flex; align-items: center; gap: var(--s2); border-top: 1px solid var(--line);
  background: rgb(255 255 255 / 92%); padding-top: var(--s3);
}
.chip {
  display: inline-flex; min-height: 26px; align-items: center; border-radius: 999px;
  background: var(--surface); color: var(--muted); padding: 4px 10px; font: var(--caption);
  font-weight: 600;
}
.chip--done {
  background: #eaf7ef; color: var(--success);
}
.chip--running,
.chip--queued {
  background: #fff5df; color: var(--warning);
}
.chip--failed {
  background: #fff0ee; color: var(--danger);
}
.figure {
  overflow: hidden; border-radius: var(--radius); background: var(--surface);
}
.figure + .figure {
  margin-top: var(--s4);
}
.figure__viewport {
  width: 100%;
}
.figure img {
  width: 100%; height: auto;
}
.figure__frame {
  display: block; width: 100%; min-height: 680px; background: #fff;
}
.figure__frame--tall {
  height: 85vh; min-height: 680px;
}
.drill-nav {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s2) var(--s3);
  padding: var(--s2) var(--s3) var(--s3); border-top: 1px solid var(--line);
}
.drill-nav__title {
  flex-basis: 100%; max-width: none; margin: 0; color: var(--muted); font: var(--caption); font-weight: 600;
}
.drill-nav__field {
  display: flex; flex-direction: column; gap: 6px; color: var(--muted); font: var(--caption);
}
.drill-nav__field select {
  min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text); font: var(--body); font-size: 15px;
}
.drill-nav__actions {
  display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2);
}
.drill-nav__status {
  flex-basis: 100%; max-width: none; margin: 0; color: var(--muted); font: var(--caption);
}
.drill-nav__status b {
  color: var(--text);
}
.breadcrumbs {
  display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: var(--s3);
  color: var(--muted); font: var(--caption);
}
.breadcrumbs a {
  color: var(--accent); text-decoration: none;
}
.breadcrumbs [aria-current="page"] {
  color: var(--text); font-weight: 600;
}
.asset-sims {
  margin: var(--s2) 0 0; padding: 0; list-style: none; display: grid; gap: 6px;
}
.figure__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  padding: var(--s2) var(--s3);
}
.figure__head h3 {
  margin: 0;
}
.figure__caption {
  margin: 0; padding: var(--s2) var(--s3); color: var(--muted); font: var(--caption);
}
.product-shot {
  border: 1px solid var(--line); box-shadow: 0 28px 80px rgb(29 29 31 / 12%);
}
.profile {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s3); align-items: start;
}
.profile__photo {
  width: 112px; aspect-ratio: 1; display: grid; place-items: center;
  border-radius: 50%; background: #e8e8ed; color: var(--muted); font-size: 24px;
  font-weight: 600;
}
.profile__role {
  margin-bottom: var(--s2); color: var(--muted); font: var(--caption); font-weight: 600;
}
.details {
  margin-top: var(--s3); border-top: 1px solid var(--line); padding-top: var(--s2);
}
.details summary {
  min-height: 44px; display: flex; align-items: center; color: var(--accent);
  font-size: 15px; font-weight: 600; list-style: none;
}
.details summary::-webkit-details-marker {
  display: none;
}
.details[open] summary {
  margin-bottom: var(--s2);
}
.list {
  margin: var(--s2) 0 0; padding-left: 20px;
}
.list li + li {
  margin-top: var(--s1);
}
.pills {
  display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s2);
}
.pill {
  margin: 0; border-radius: 999px; background: var(--bg); padding: 6px 10px;
  color: var(--muted); font: var(--caption);
}
.run-summary {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s4); margin: 0;
}
.run-summary div {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s2); border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.run-summary dt {
  overflow-wrap: anywhere; color: var(--muted); font: var(--caption);
}
.run-summary dd {
  margin: 0; font-size: 14px; font-weight: 600; text-align: right; overflow-wrap: anywhere;
}
.run-log {
  max-height: 440px; overflow: auto; border-radius: var(--radius); background: var(--surface);
  padding: var(--s3); color: var(--text); font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap;
}
.login {
  min-height: 100vh; background: var(--surface);
}
.login .site-main {
  width: 100%; min-height: 100vh; display: grid; place-items: center;
  padding: var(--s3);
}
.login__panel {
  width: min(100%, 440px);
}
.login__brand {
  display: block; margin-bottom: var(--s4); color: var(--text); font-size: 17px;
  font-weight: 600; text-align: center; text-decoration: none;
}
.error-page {
  min-height: calc(100vh - 56px); display: grid; place-items: center; padding: var(--s6) var(--s3);
  text-align: center;
}
.error-page h1 {
  font: var(--display); font-weight: 600; letter-spacing: -0.03em;
}
.footer {
  border-top: 1px solid var(--line); padding-block: var(--s5); color: var(--muted); font: var(--caption);
}
.footer__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
}
.footer__links {
  display: flex; gap: var(--s3);
}
.footer a {
  color: var(--muted); text-decoration: none;
}
.footer a:hover {
  color: var(--text);
}
.reveal {
  opacity: 0; transform: translateY(14px); transition: opacity 300ms ease, transform 300ms ease;
}
.reveal.is-visible {
  opacity: 1; transform: none;
}
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important;
  clip: rect(0 0 0 0) !important; white-space: nowrap !important;
}
@media (min-width: 769px) {
  .form__actions--sticky {
  position: sticky; bottom: var(--s2); z-index: 10; width: fit-content;
  margin-left: auto; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--bg);
  padding: 12px; box-shadow: var(--shadow);
  }
}
@media (max-width: 900px) {
  .kpi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .run-summary {
  grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  :root {
  --display: 40px/1.08 Inter, sans-serif; --h1: 34px/1.12 Inter, sans-serif; --h2: 26px/1.2 Inter, sans-serif;
  }
  .container,
  .nav__inner {
  width: min(calc(100% - 32px), var(--container));
  }
  .nav__links {
  display: none;
  }
  .nav__mobile {
  display: block;
  }
  .hero,
  .section {
  padding-block: var(--s6);
  }
  .section--tool {
  padding-block: var(--s6) var(--s2);
  }
  .section--tool + .section {
  padding-top: var(--s3);
  }
  .hero {
  text-align: left;
  }
  .hero h1,
  .hero__sub {
  margin-left: 0;
  }
  .hero__actions {
  justify-content: flex-start;
  }
  .hero__figure {
  margin-top: var(--s5);
  }
  .grid-2,
  .grid-3,
  .grid-2--wide {
  grid-template-columns: 1fr;
  }
  .section__head {
  margin-bottom: var(--s4);
  }
  .card {
  padding: var(--s3);
  }
  .profile {
  grid-template-columns: 80px minmax(0, 1fr);
  }
  .profile__photo {
  width: 80px;
  }
  .figure__frame {
  min-height: 520px;
  }
  .figure--chart {
  overflow: hidden;
  }
  .figure--chart .figure__viewport {
  height: calc((100vw - 32px) * 1.05); overflow: hidden;
  }
  .figure--chart .figure__frame {
  width: 1000px; height: 1050px; min-height: 0; transform: scale(calc((100vw - 32px) / 1000px));
  transform-origin: top left;
  }
  .footer__inner {
  align-items: flex-start; flex-direction: column;
  }
}
@media (max-width: 520px) {
  .profile {
  grid-template-columns: 1fr;
  }
  .profile__photo {
  width: 64px;
  }
  .kpi-grid {
  grid-template-columns: 1fr;
  }
  .actions,
  .hero__actions,
  .form__actions {
  align-items: stretch; flex-direction: column;
  }
  .actions .btn,
  .hero__actions .btn,
  .form__actions .btn {
  width: 100%;
  }
  .actions--links {
  align-items: center; flex-direction: row; gap: var(--s3);
  }
  .figure__head {
  align-items: flex-start; flex-direction: column;
  }
  .figure__frame {
  min-height: 440px;
  }
  .table--runs,
  .table--runs tbody,
  .table--runs tr,
  .table--runs td {
  display: block; width: 100%;
  }
  .table--runs thead {
  display: none;
  }
  .table--runs tr {
  border-top: 1px solid var(--line); padding-block: var(--s1);
  }
  .table--runs td,
  .table--runs td:first-child,
  .table--runs td:last-child {
  display: flex; min-height: 44px; align-items: center; justify-content: space-between;
  gap: var(--s2); border: 0; padding: 6px 0; text-align: right;
  }
  .table--runs td::before {
  content: attr(data-label); color: var(--muted); font: var(--caption); font-weight: 600;
  text-align: left;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
  scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important;
  }
  .reveal {
  opacity: 1; transform: none;
  }
}

/* Photo band: the one owner-supplied landscape, home hero only, under a white wash so text stays on white. */
.band--photo {
  --wash: linear-gradient(90deg, rgb(255 255 255 / 97%) 0%, rgb(255 255 255 / 84%) 48%, rgb(255 255 255 / 18%) 84%);
  background-image: var(--wash), var(--band);
  background-position: center var(--band-y, 50%); background-repeat: no-repeat; background-size: cover;
}
.band--moor {
  --band: image-set(url("../img/photos/moor-fog-1200.webp") 1x, url("../img/photos/moor-fog-2400.webp") 2x);
  --band-y: 48%;
}
.hero--photo {
  min-height: 68vh; display: flex; align-items: center; text-align: left;
}
.hero--photo .container > .hero__content {
  max-width: 680px; margin-left: 0;
}
.hero--photo .container.hero__content > * {
  max-width: 680px;
}
.hero--photo h1,
.hero--photo .hero__sub {
  margin-left: 0;
}
.hero--photo .hero__actions {
  justify-content: flex-start;
}
@media (max-width: 767px) {
  .band--photo {
  --wash: linear-gradient(0deg, rgb(255 255 255 / 94%) 0%, rgb(255 255 255 / 70%) 55%, rgb(255 255 255 / 30%) 100%);
  }
  .hero--photo {
  min-height: 56vh;
  }
}
