:root {
  color-scheme: light;
  --lime: #a8cf46;
  --lime-soft: #eaf3d3;
  --lime-ink: #40570a;
  --lime-dark: #5f7f12;
  --graphite: #333333;
  --ink: #202522;
  --muted: #626a65;
  --line: #dfe3df;
  --line-strong: #c9ceca;
  --surface: #ffffff;
  --surface-alt: #f5f5f5;
  --canvas: #fbfdf9;
  --review: #9a6400;
  --review-bg: #fff3d4;
  --concern: #a12c24;
  --concern-bg: #fae7e5;
  --info: #275d71;
  --info-bg: #e4f1f5;
  --shadow: 0 12px 28px rgba(35, 41, 37, 0.07);
  --radius: 10px;
  --font-body: Roboto, Inter, "Segoe UI", Arial, sans-serif;
  --font-display: Play, "Arial Narrow", "Segoe UI", Arial, sans-serif;
  --font-mono: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--lime-dark);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(95, 127, 18, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 8px;
  z-index: 100;
  padding: 9px 12px;
  transform: translateY(-100%);
  color: var(--graphite);
  background: var(--lime);
  border-radius: 4px;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 22px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.brand-mark {
  --brand-width: 292px;
  display: inline-block;
  width: min(100%, var(--brand-width));
  max-width: 100%;
  line-height: 0;
}

.brand-mark__image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-mark--large {
  --brand-width: 520px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--lime-dark);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.text-small {
  font-size: 13px;
}

.text-link {
  border: 0;
  padding: 0;
  color: var(--lime-dark);
  background: none;
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.025em;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.btn--primary {
  color: var(--graphite);
  background: var(--lime);
  border-color: #94b83a;
}

.btn--primary:hover:not(:disabled) {
  background: #b7d864;
}

.btn--secondary {
  color: var(--graphite);
  background: var(--surface);
  border-color: var(--line-strong);
}

.btn--secondary:hover:not(:disabled) {
  background: var(--surface-alt);
  border-color: #aeb5af;
}

.btn--dark {
  color: #fff;
  background: var(--graphite);
  border-color: var(--graphite);
}

.btn--dark:hover:not(:disabled) {
  background: #202220;
}

.btn--quiet {
  min-height: 36px;
  padding: 7px 12px;
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}

.btn--block {
  width: 100%;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 0.88fr) minmax(560px, 1.12fr);
  background: var(--surface);
}

.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 76px);
  overflow: hidden;
  color: #fff;
  background-color: var(--graphite);
  isolation: isolate;
}

.login-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 42px 42px;
}

.login-intro::after {
  content: "";
  position: absolute;
  right: -18%;
  bottom: 7%;
  z-index: -1;
  width: 72%;
  aspect-ratio: 1;
  border: 1px solid rgba(168, 207, 70, 0.45);
  transform: rotate(45deg);
}

.login-copy {
  max-width: 610px;
  margin: clamp(54px, 9vh, 130px) 0;
}

.login-copy h1 {
  max-width: 680px;
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 66px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.login-copy p {
  max-width: 580px;
  margin: 0;
  color: #dfe4df;
  font-size: clamp(16px, 1.5vw, 19px);
}

.intro-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 620px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.intro-proof > div {
  min-height: 96px;
  padding: 18px;
  background: rgba(51, 51, 51, 0.9);
}

.intro-proof strong {
  display: block;
  margin-bottom: 4px;
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 18px;
}

.intro-proof span {
  color: #d6dad7;
  font-size: 12px;
}

.login-panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 76px);
  background: var(--canvas);
}

.login-panel__inner {
  width: min(100%, 720px);
}

.login-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
}

.login-panel__lede {
  max-width: 620px;
  margin: 12px 0 24px;
  color: var(--muted);
}

.intro-proof--access {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.access-panel__inner {
  max-width: 520px;
  padding: clamp(24px, 4vw, 42px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.access-form {
  display: grid;
  gap: 9px;
}

.access-form label {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
}

.access-form input {
  width: 100%;
  min-height: 48px;
  margin-bottom: 9px;
  padding: 11px 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font: inherit;
}

.access-form input:focus {
  border-color: var(--lime-dark);
  outline: 3px solid rgba(95, 127, 18, 0.18);
  outline-offset: 1px;
}

.access-form__error {
  margin: 0 0 5px;
  padding: 10px 12px;
  color: #7d211b;
  background: #fae7e5;
  border-left: 4px solid var(--concern);
  font-size: 12px;
}

.access-form__notice {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.boundary-note {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 15px 16px;
  color: #464d48;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-left: 4px solid var(--lime);
  border-radius: 4px;
  font-size: 13px;
}

.boundary-note__icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--graphite);
  background: var(--lime);
  border-radius: 50%;
  font-weight: 800;
}

.role-list {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.role-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 3px 10px rgba(34, 40, 36, 0.03);
}

.role-card:hover {
  border-color: #bacb8b;
}

.role-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--graphite);
  background: var(--lime-soft);
  border: 1px solid #d8e8af;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 800;
}

.role-card strong,
.role-card small {
  display: block;
}

.role-card strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
}

.role-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.login-utilities {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.login-utilities p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 3.2vw, 52px);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}

.portal-header__meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.environment-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  color: #4f594f;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.environment-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--lime);
  border: 1px solid #79952d;
  border-radius: 50%;
}

.session-summary {
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.session-summary strong,
.session-summary span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-summary strong {
  font-family: var(--font-display);
  font-size: 13px;
}

.session-summary span {
  color: var(--muted);
  font-size: 11px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  color: var(--graphite);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  cursor: pointer;
}

.portal-layout {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  min-width: 0;
}

.portal-nav {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  padding: 26px 18px;
  color: #fff;
  background: var(--graphite);
  overflow-y: auto;
}

.portal-nav__label {
  margin: 0 10px 14px;
  color: #aeb5af;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.portal-nav ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-nav a,
.portal-nav button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #e9ecea;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
}

.portal-nav a:hover,
.portal-nav button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.portal-nav a[aria-current="page"] {
  color: var(--graphite);
  background: var(--lime);
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 14px;
}

.portal-nav__bottom {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding-top: 24px;
}

.portal-nav__boundary {
  padding: 12px;
  color: #bec4bf;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 10px;
  line-height: 1.45;
}

.portal-content {
  width: 100%;
  min-width: 0;
  padding: clamp(22px, 3vw, 48px);
  background: var(--canvas);
}

.view-frame {
  width: min(100%, 1480px);
  margin: 0 auto;
}

.view-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.view-header h1,
.view-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: -0.02em;
}

.view-header p:not(.eyebrow) {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.hero-panel {
  position: relative;
  min-height: 226px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.5fr);
  gap: 38px;
  align-items: end;
  margin-bottom: 20px;
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
  color: #fff;
  background: var(--graphite);
  border-radius: var(--radius);
}

.hero-panel::after {
  content: "";
  position: absolute;
  top: -70%;
  right: -6%;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(168, 207, 70, 0.45);
  transform: rotate(45deg);
}

.hero-panel h1 {
  max-width: 720px;
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.hero-panel p {
  max-width: 680px;
  margin: 0;
  color: #d9ddda;
}

.hero-panel .eyebrow {
  color: var(--lime);
}

.hierarchy-path {
  position: relative;
  z-index: 1;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-left: 3px solid var(--lime);
  font-size: 12px;
}

.hierarchy-path strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.metric-card {
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--lime);
  border-radius: 6px;
}

.metric-card__label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-card__value {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(25px, 2.5vw, 34px);
  font-weight: 750;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric-card__detail {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(35, 41, 37, 0.03);
}

.panel__header {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.panel__header h2,
.panel__header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
}

.panel__body {
  padding: 20px;
}

.panel__body > :first-child {
  margin-top: 0;
}

.panel__body > :last-child {
  margin-bottom: 0;
}

.workflow-list,
.report-list,
.support-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-row,
.report-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.workflow-row:last-child,
.report-row:last-child {
  border-bottom: 0;
}

.workflow-row strong,
.workflow-row span,
.report-row strong,
.report-row span {
  display: block;
}

.workflow-row strong,
.report-row strong {
  margin-bottom: 3px;
  font-family: var(--font-display);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.workflow-row__meta,
.report-row__meta {
  color: var(--muted);
  font-size: 11px;
}

.status {
  width: max-content;
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status--received,
.status--validating,
.status--processing {
  color: var(--info);
  background: var(--info-bg);
  border-color: #bed9e3;
}

.status--report_ready,
.status--ready {
  color: var(--lime-ink);
  background: var(--lime-soft);
  border-color: #cee09f;
}

.status--failed,
.status--engineering_concern {
  color: var(--concern);
  background: var(--concern-bg);
  border-color: #ecc4c0;
}

.status--review,
.status--engineering_review_required {
  color: var(--review);
  background: var(--review-bg);
  border-color: #ecd18f;
}

.delivery-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.delivery-step {
  min-height: 178px;
  padding: 22px;
  background: var(--surface);
}

.delivery-step__number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 30px;
  color: var(--graphite);
  background: var(--lime);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 800;
}

.delivery-step h3 {
  margin: 0 0 7px;
  font-family: var(--font-display);
  font-size: 15px;
}

.delivery-step p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th,
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: #555e58;
  background: var(--surface-alt);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table td strong {
  display: block;
  font-family: var(--font-display);
}

.data-table td small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.65fr);
  gap: 20px;
}

.upload-dropzone {
  position: relative;
  min-height: 260px;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 34px;
  text-align: center;
  background: var(--canvas);
  border: 1px dashed #aeb6af;
  border-radius: 8px;
}

.upload-dropzone:hover,
.upload-dropzone:focus-within {
  border-color: var(--lime-dark);
  background: #f8fbf1;
}

.upload-dropzone__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  color: var(--graphite);
  background: var(--lime-soft);
  border: 1px solid #d0e1a3;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

.upload-dropzone input[type="file"] {
  width: 100%;
  max-width: 410px;
  margin: 2px auto 0;
  color: var(--muted);
  font-size: 12px;
}

.upload-dropzone input::file-selector-button {
  margin-right: 10px;
  padding: 8px 12px;
  color: var(--graphite);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
}

.file-selection {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.form-row {
  display: grid;
  gap: 7px;
  margin: 16px 0;
}

.form-row label {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-row select {
  min-height: 44px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.state-trail {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.state-trail li {
  position: relative;
  min-height: 51px;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 11px;
  align-items: start;
  padding-bottom: 13px;
  color: var(--muted);
  font-size: 12px;
}

.state-trail li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 23px;
  left: 11px;
  bottom: 0;
  width: 1px;
  background: var(--line-strong);
}

.state-trail__marker {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--graphite);
  background: var(--lime);
  border: 2px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 1px #91ae48;
  font-size: 10px;
  font-weight: 800;
}

.state-trail strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
}

.upload-error {
  padding: 18px;
  color: #6d231e;
  background: var(--concern-bg);
  border: 1px solid #e7bbb7;
  border-left: 4px solid var(--concern);
  border-radius: 5px;
}

.upload-error h2,
.upload-error h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 18px;
}

.upload-error p {
  margin: 4px 0;
}

.report-document {
  width: min(100%, 1220px);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.report-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.report-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: start;
  padding: clamp(28px, 4vw, 48px);
  color: #fff;
  background: var(--graphite);
  border-bottom: 5px solid var(--lime);
}

.report-masthead .brand-mark {
  margin-bottom: 36px;
  color: #fff;
}

.report-masthead h1 {
  max-width: 730px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 47px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.report-masthead__id {
  min-width: 220px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.report-masthead__id span,
.report-masthead__id strong {
  display: block;
}

.report-masthead__id span {
  margin-bottom: 4px;
  color: #bdc4bf;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.report-masthead__id strong {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.report-section {
  padding: clamp(24px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
}

.report-section:last-child {
  border-bottom: 0;
}

.report-section--alt {
  background: var(--surface-alt);
}

.report-section__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
}

.report-section__heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
}

.report-section__heading p {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.report-lineage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.report-lineage > div {
  min-width: 0;
  padding: 14px;
  background: var(--surface);
}

.report-lineage dt {
  margin: 0 0 5px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.report-lineage dd {
  margin: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.report-section--drawing {
  background: #eef1ee;
}

.source-drawing__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.source-drawing__header .eyebrow {
  margin-bottom: 7px;
  color: var(--lime-dark);
}

.source-drawing__header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -0.02em;
}

.source-drawing__identity {
  min-width: min(100%, 340px);
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
}

.source-drawing__identity > div {
  padding: 11px 13px;
}

.source-drawing__identity > div + div {
  border-top: 1px solid var(--line);
}

.source-drawing__identity dt,
.source-drawing__identity dd {
  margin: 0;
}

.source-drawing__identity dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.source-drawing__identity dd {
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.source-drawing {
  margin: 0;
}

.measured-compartment {
  position: relative;
  margin: 14px 0;
  padding: 14px 16px 14px 20px;
  background: #eef6d9;
  border: 1px solid #b9d770;
  border-left: 6px solid var(--lime-dark);
}

.measured-compartment::before {
  position: absolute;
  top: 16px;
  left: 7px;
  width: 5px;
  height: 5px;
  content: "";
  background: var(--lime-dark);
  border-radius: 50%;
}

.measured-compartment span,
.measured-compartment strong,
.measured-compartment small {
  display: block;
}

.measured-compartment span {
  color: var(--lime-dark);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.measured-compartment strong {
  margin: 4px 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
}

.measured-compartment small {
  color: var(--muted);
  font-size: 10px;
}

.source-drawing__canvas {
  width: 100%;
  padding: clamp(8px, 1.5vw, 16px);
  overflow: hidden;
  background: #d9deda;
  border: 1px solid var(--line-strong);
}

.source-drawing__image {
  position: relative;
}

.source-drawing__canvas img {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
  box-shadow: 0 8px 24px rgba(32, 37, 34, 0.14);
}

.source-drawing__measurement-target {
  position: absolute;
  top: 50.1%;
  left: 28.5%;
  width: 25.2%;
  height: 9.4%;
  background: rgba(168, 207, 70, 0.2);
  border: clamp(2px, 0.35vw, 5px) solid #5f7f12;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92), 0 0 14px rgba(32, 37, 34, 0.45);
  pointer-events: none;
}

.source-drawing__measurement-target span {
  position: absolute;
  bottom: calc(100% + 5px);
  left: -3px;
  min-width: max-content;
  padding: 4px 7px;
  color: #fff;
  background: var(--graphite);
  border-left: 5px solid var(--lime);
  font-family: var(--font-display);
  font-size: clamp(6px, 0.7vw, 10px);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.source-drawing__measurement-target span::after {
  position: absolute;
  top: 100%;
  left: 14px;
  width: 2px;
  height: 7px;
  content: "";
  background: var(--lime-dark);
}

.source-drawing figcaption {
  padding: 11px 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-top: 0;
  font-size: 10px;
  line-height: 1.5;
}

.report-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 28px;
  align-items: start;
}

.report-summary__notice {
  padding: 22px;
  color: #5e3c00;
  background: var(--review-bg);
  border: 1px solid #ecd18f;
  border-left: 5px solid var(--review);
}

.report-summary__notice h2 {
  margin: 0 0 7px;
  font-family: var(--font-display);
  font-size: 24px;
}

.report-summary__notice p {
  margin: 0;
}

.report-summary__metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
}

.report-summary__metric {
  min-width: 0;
  padding: 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.report-summary__metric:nth-child(even) { border-right: 0; }
.report-summary__metric:nth-last-child(-n+2) { border-bottom: 0; }

.report-summary__metric span,
.report-summary__metric strong {
  display: block;
}

.report-summary__metric span {
  margin-bottom: 5px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.report-summary__metric strong {
  font-family: var(--font-mono);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.evidence-card {
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.evidence-card h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 14px;
}

.evidence-card > p,
.evidence-card__heading p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
}

.evidence-card--profile {
  grid-column: 1 / -1;
}

.evidence-card__heading,
.profile-status-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.evidence-card__heading > div:first-child {
  min-width: 0;
}

.profile-tools,
.profile-zone-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.profile-tools button,
.profile-zone-nav button {
  min-height: 31px;
  padding: 6px 9px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #aeb5af;
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.15;
}

.profile-tools button:hover,
.profile-zone-nav button:hover {
  background: #eff3e9;
  border-color: var(--lime-dark);
}

.profile-tools button:focus-visible,
.profile-zone-nav button:focus-visible {
  outline: 3px solid rgba(95, 127, 18, 0.35);
  outline-offset: 2px;
}

.profile-status-row {
  align-items: center;
  min-height: 34px;
  margin: 3px 0 8px;
}

.profile-status-row > p {
  min-width: 0;
  margin: 0;
  color: var(--lime-dark);
  font-size: 10px;
  font-weight: 750;
}

.profile-overview {
  width: 100%;
  margin-bottom: 8px;
  overflow: hidden;
  background: #f8faf7;
  border: 1px solid var(--line);
}

.profile-overview svg {
  width: 100%;
  height: auto;
  display: block;
}

.profile-chart {
  width: 100%;
  min-height: 320px;
  display: block;
  background: #fcfdfb;
  border: 1px solid var(--line);
}

.profile-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.shaft-plan__visual {
  width: 100%;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid #49524c;
}

.shaft-plan__visual svg {
  width: 100%;
  height: auto;
  display: block;
}

.shaft-plan__selection {
  padding: 11px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-top: 0;
}

.shaft-plan__selection span,
.shaft-plan__selection strong,
.shaft-plan__selection small {
  display: block;
}

.shaft-plan__selection span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.shaft-plan__selection strong {
  margin: 3px 0 5px;
  color: var(--ink);
  font-size: 12px;
}

.shaft-plan__selection small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.shaft-visual {
  width: 100%;
  height: clamp(340px, 34vw, 430px);
  display: block;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid #49524c;
}

.shaft-visual svg {
  width: 100%;
  height: 100%;
  display: block;
}

.evidence-control {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
}

.evidence-control__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.evidence-control__heading label {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.evidence-control output {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  text-align: right;
}

.evidence-control output strong {
  color: var(--ink);
  font-size: 14px;
}

.evidence-control output span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.evidence-control input[type="range"] {
  width: 100%;
  min-height: 28px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.evidence-control input[type="range"]::-webkit-slider-runnable-track {
  height: 7px;
  background: linear-gradient(90deg, var(--lime-dark) 0 var(--depth-progress), #d8ddd9 var(--depth-progress) 100%);
  border: 1px solid #c5cbc6;
  border-radius: 999px;
}

.evidence-control input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -7px;
  appearance: none;
  background: var(--surface);
  border: 5px solid var(--lime-dark);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(32, 37, 34, 0.25);
}

.evidence-control input[type="range"]::-moz-range-track {
  height: 7px;
  background: #d8ddd9;
  border: 1px solid #c5cbc6;
  border-radius: 999px;
}

.evidence-control input[type="range"]::-moz-range-progress {
  height: 7px;
  background: var(--lime-dark);
  border-radius: 999px;
}

.evidence-control input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--surface);
  border: 5px solid var(--lime-dark);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(32, 37, 34, 0.25);
}

.evidence-control input[type="range"]:focus-visible {
  outline: 3px solid rgba(95, 127, 18, 0.35);
  outline-offset: 4px;
}

.evidence-control__scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.coverage-boundary,
.bunton-summary,
.station-summary {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.coverage-boundary strong {
  color: var(--ink);
}

.bunton-summary {
  margin-top: 10px;
  padding: 9px 10px;
  background: #f1f3f0;
  border-left: 3px solid var(--lime-dark);
}

.station-summary {
  margin-top: 7px;
  padding: 9px 10px;
  color: #5c4a1f;
  background: #fff5dd;
  border-left: 3px solid #c18408;
}

.station-summary strong {
  color: #3d3219;
}

.shaft-readout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
}

.shaft-readout > div {
  min-width: 0;
  padding: 10px 12px;
}

.shaft-readout > div:first-child {
  border-right: 1px solid var(--line);
}

.shaft-readout span,
.shaft-readout strong {
  display: block;
}

.shaft-readout small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.shaft-readout span {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.shaft-readout strong {
  color: var(--ink);
  font-size: 12px;
}

.shaft-readout__state {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  border-left: 4px solid var(--lime);
}

.shaft-readout__state--review {
  border-left-color: #d39b27;
}

.shaft-readout__state--engineering_concern {
  border-left-color: #d65349;
}

.shaft-readout__state--no_data {
  border-left-color: #8a938c;
}

.zone-action {
  padding: 0;
  color: var(--lime-dark);
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.threshold-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
}

.legend-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-key::before {
  content: "";
  width: 18px;
  height: 3px;
  background: var(--graphite);
}

.legend-key--review::before { background: #c18408; }
.legend-key--concern::before { background: #b83b31; }
.legend-key--measured::before { background: var(--lime-dark); }
.legend-key--bunton::before {
  height: 2px;
  background: #5f7f12;
  box-shadow: 6px -3px 0 -0.5px #5f7f12, 12px 3px 0 -0.5px #5f7f12;
}

.report-disclaimer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px;
  color: #4f5651;
  background: #f2f4f2;
  border: 1px solid var(--line-strong);
  font-size: 12px;
}

.report-disclaimer strong {
  color: var(--ink);
  font-family: var(--font-display);
  white-space: nowrap;
}

.support-card {
  min-height: 190px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--lime);
}

.support-card h2,
.support-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
}

.support-card p {
  margin: 7px 0;
  color: var(--muted);
}

.architecture-stage {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.architecture-diagram {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(9, minmax(74px, 1fr));
  gap: 8px;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 6px;
}

.architecture-production {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 18px;
  padding: 16px;
  background: #f4f6f3;
  border: 1px dashed #929b94;
}

.architecture-production strong {
  flex: 0 0 150px;
  align-self: center;
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
}

.architecture-production span {
  flex: 1 1 0;
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 8px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 10px;
  text-align: center;
}

.architecture-production b {
  align-self: center;
  color: var(--lime-dark);
}

.architecture-node {
  min-width: 98px;
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--line-strong);
}

.architecture-node--implemented {
  background: var(--lime-soft);
  border-color: #bed48a;
}

.architecture-node--future {
  border-style: dashed;
}

.architecture-node strong {
  font-family: var(--font-display);
  font-size: 12px;
}

.architecture-node span {
  color: var(--muted);
  font-size: 9px;
}

.architecture-arrow {
  min-width: 20px;
  display: grid;
  place-items: center;
  color: var(--lime-dark);
  font-size: 22px;
  font-weight: 800;
}

.architecture-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.architecture-notes > div {
  padding: 16px;
  background: var(--surface-alt);
  border-left: 3px solid var(--lime);
  font-size: 12px;
}

.portal-footer {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px clamp(18px, 3.2vw, 52px);
  color: #c8ceca;
  background: #282a28;
  border-top: 1px solid #3d413e;
  font-size: 10px;
}

.portal-footer strong {
  color: #fff;
}

.powered-by {
  color: #aeb5af;
  white-space: nowrap;
}

.powered-by strong {
  color: var(--lime);
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

.empty-state {
  padding: 50px 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-family: var(--font-display);
}

@media (max-width: 1150px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .span-8,
  .span-7,
  .span-6,
  .span-5,
  .span-4 {
    grid-column: span 12;
  }

  .report-summary,
  .evidence-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body.menu-open {
    overflow: hidden;
  }

  .login-page {
    grid-template-columns: 1fr;
  }

  .login-intro {
    min-height: auto;
    padding: 34px 24px 40px;
  }

  .login-copy {
    margin: 58px 0 44px;
  }

  .login-panel {
    min-height: auto;
    padding: 46px 24px;
  }

  .portal-header {
    min-height: 64px;
  }

  .environment-chip,
  .session-summary span {
    display: none;
  }

  .session-summary {
    max-width: 145px;
    padding-left: 0;
    border-left: 0;
  }

  .menu-toggle {
    display: grid;
  }

  .portal-layout {
    grid-template-columns: 1fr;
  }

  .portal-nav {
    position: fixed;
    top: 64px;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 50;
    width: min(310px, 88vw);
    height: auto;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 180ms ease, visibility 180ms ease;
    box-shadow: -16px 0 32px rgba(0, 0, 0, 0.18);
  }

  .portal-nav.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  .portal-content {
    padding: 24px 18px 36px;
  }

  .hero-panel,
  .upload-layout {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    align-items: start;
  }

  .delivery-steps {
    grid-template-columns: 1fr;
  }

  .delivery-step {
    min-height: auto;
  }

  .delivery-step__number {
    margin-bottom: 14px;
  }

  .report-lineage {
    grid-template-columns: repeat(2, 1fr);
  }

  .architecture-notes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  .brand-mark {
    --brand-width: 254px;
  }

  .brand-mark--large {
    --brand-width: 380px;
  }

  .intro-proof {
    grid-template-columns: 1fr;
  }

  .intro-proof > div {
    min-height: auto;
  }

  .role-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .role-card .btn {
    grid-column: 1 / -1;
  }

  .login-utilities,
  .view-header,
  .report-toolbar,
  .report-section__heading,
  .portal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-header {
    gap: 10px;
    padding: 10px 12px;
  }

  .session-summary {
    display: none;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .metric-card {
    padding: 15px;
  }

  .metric-card__value {
    font-size: 24px;
  }

  .hero-panel {
    padding: 26px 20px;
  }

  .workflow-row,
  .report-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .panel__header,
  .panel__body {
    padding-left: 15px;
    padding-right: 15px;
  }

  .mobile-card-table {
    overflow: visible;
  }

  .mobile-card-table .data-table,
  .mobile-card-table .data-table tbody,
  .mobile-card-table .data-table tr,
  .mobile-card-table .data-table td {
    display: block;
    width: 100%;
  }

  .mobile-card-table .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .mobile-card-table .data-table tbody {
    padding: 10px;
  }

  .mobile-card-table .data-table tr {
    margin-bottom: 12px;
    padding: 6px 0;
    background: var(--surface);
    border: 1px solid var(--line);
  }

  .mobile-card-table .data-table tr:last-child {
    margin-bottom: 0;
  }

  .mobile-card-table .data-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 9px;
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
  }

  .mobile-card-table .data-table td:last-child {
    border-bottom: 0;
  }

  .mobile-card-table .data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .mobile-card-table .btn,
  .mobile-card-table .status {
    max-width: 100%;
    white-space: normal;
  }

  .upload-dropzone {
    min-height: 235px;
    padding: 26px 15px;
  }

  .report-toolbar__actions {
    justify-content: stretch;
  }

  .report-toolbar__actions .btn {
    width: 100%;
  }

  .report-masthead {
    grid-template-columns: 1fr;
  }

  .report-masthead .brand-mark {
    margin-bottom: 26px;
  }

  .report-masthead__id {
    min-width: 0;
  }

  .report-lineage {
    grid-template-columns: 1fr;
  }

  .source-drawing__header {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .source-drawing__identity {
    width: 100%;
    min-width: 0;
  }

  .report-summary__metrics {
    grid-template-columns: 1fr;
  }

  .report-summary__metric,
  .report-summary__metric:nth-child(even),
  .report-summary__metric:nth-last-child(-n+2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .report-summary__metric:last-child {
    border-bottom: 0;
  }

  .report-section__heading p {
    text-align: left;
  }

  .evidence-card {
    padding: 12px;
  }

  .evidence-card__heading,
  .profile-status-row {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .profile-tools,
  .profile-zone-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .profile-tools button,
  .profile-zone-nav button {
    width: 100%;
    min-width: 0;
  }

  .profile-overview {
    margin-top: 10px;
  }

  .profile-chart {
    min-height: 0;
  }

  .shaft-visual {
    height: 300px;
    min-height: 0;
  }

  .evidence-control__heading {
    align-items: flex-start;
  }

  .evidence-control output {
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
  }

  .report-disclaimer {
    grid-template-columns: 1fr;
  }

  [data-testid="zones-table"] {
    overflow: visible;
  }

  [data-testid="zones-table"] .data-table,
  [data-testid="zones-table"] .data-table tbody,
  [data-testid="zones-table"] .data-table tr,
  [data-testid="zones-table"] .data-table td {
    display: block;
    width: 100%;
  }

  [data-testid="zones-table"] .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  [data-testid="zones-table"] .data-table tr {
    margin-bottom: 12px;
    padding: 7px 0;
    background: var(--surface);
    border: 1px solid var(--line);
  }

  [data-testid="zones-table"] .data-table td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 11px;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
  }

  [data-testid="zones-table"] .data-table td:last-child {
    border-bottom: 0;
  }

  [data-testid="zones-table"] .status {
    width: auto;
    max-width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  .architecture-diagram {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .architecture-node {
    min-width: 0;
    min-height: 104px;
  }

  .architecture-arrow {
    min-width: 0;
    min-height: 24px;
    transform: rotate(90deg);
  }

  .architecture-production {
    flex-direction: column;
  }

  .architecture-production strong {
    flex-basis: auto;
    align-self: stretch;
    text-align: center;
  }

  .architecture-production span {
    flex-basis: auto;
  }

  .architecture-production b {
    transform: rotate(90deg);
  }

  [data-testid="zones-table"] .data-table td::before {
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  [data-testid="zones-table"] .data-table td:nth-child(1)::before { content: "Zone"; }
  [data-testid="zones-table"] .data-table td:nth-child(2)::before { content: "Depth range"; }
  [data-testid="zones-table"] .data-table td:nth-child(3)::before { content: "Worst gap"; }
  [data-testid="zones-table"] .data-table td:nth-child(4)::before { content: "Variance"; }
  [data-testid="zones-table"] .data-table td:nth-child(5)::before { content: "Classification"; }
  [data-testid="zones-table"] .data-table td:nth-child(6)::before { content: "Review note"; }

  .portal-footer {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  :root {
    --shadow: none;
  }

  html,
  body,
  .portal-shell,
  .portal-layout,
  .portal-content {
    width: 100%;
    min-width: 0;
    min-height: auto;
    display: block;
    padding: 0;
    margin: 0;
    color: #111;
    background: #fff;
  }

  .portal-header,
  .portal-nav,
  .portal-footer,
  .report-toolbar,
  .skip-link,
  .no-print {
    display: none !important;
  }

  .view-frame {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .report-document {
    width: 100%;
    max-width: none;
    border: 0;
    box-shadow: none;
  }

  .report-masthead {
    padding: 12mm 10mm;
    color: #111;
    background: #f1f2f1;
    border-bottom: 3px solid #6d8d1a;
    break-inside: avoid;
  }

  .report-masthead__id strong {
    color: #111;
  }

  .report-masthead__id {
    background: #fff;
    border-color: #999;
  }

  .report-masthead__id span {
    color: #444;
  }

  .report-section {
    padding: 8mm 7mm;
  }

  .report-section,
  .evidence-card,
  .source-drawing__header,
  .report-disclaimer,
  .data-table tr {
    break-inside: avoid;
  }

  .source-drawing__canvas {
    padding: 3mm;
  }

  .source-drawing__canvas img {
    box-shadow: none;
  }

  .report-section--alt {
    background: #f6f6f6;
  }

  .evidence-grid {
    grid-template-columns: 1.18fr 0.82fr;
  }

  .profile-chart,
  .profile-overview,
  .shaft-plan__visual,
  .shaft-visual {
    min-height: 0;
  }

  .shaft-visual {
    height: 72mm;
  }

  .profile-chart svg,
  .profile-overview svg,
  .shaft-plan__visual svg,
  .shaft-visual svg {
    max-height: 78mm;
  }

  .zone-action {
    color: #111;
    text-decoration: none;
  }

  .status {
    color: #111 !important;
    background: #fff !important;
    border-color: #777 !important;
  }
}
