:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --paper: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.64);
  --panel-strong: rgba(255, 255, 255, 0.82);
  --line: rgba(255, 255, 255, 0.58);
  --line-dark: rgba(100, 116, 139, 0.2);
  --pine: #0f766e;
  --pine-2: #115e59;
  --teal: #14b8a6;
  --sky: rgba(224, 242, 254, 0.66);
  --gold: #d99a1e;
  --red: #c2413c;
  --shadow: 0 26px 80px rgba(15, 23, 42, 0.16);
  --glass-blur: blur(22px) saturate(1.38);
  --radius-panel: 8px;
  --space-panel: 22px;
  --space-card: 14px;
  --space-stack: 16px;
  --surface-card: rgba(255, 255, 255, 0.64);
  --surface-card-strong: rgba(255, 255, 255, 0.72);
  --surface-card-soft: rgba(255, 255, 255, 0.58);
  --surface-line: rgba(100, 116, 139, 0.17);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    linear-gradient(135deg, rgba(240, 249, 255, 0.96), rgba(250, 252, 255, 0.92) 38%, rgba(236, 253, 245, 0.86)),
    linear-gradient(180deg, #ffffff, var(--paper));
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(240, 249, 255, 0.96), rgba(250, 252, 255, 0.92) 38%, rgba(236, 253, 245, 0.86)),
    linear-gradient(180deg, #ffffff, var(--paper));
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  min-height: 100svh;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  width: calc(100% - 32px);
  min-height: 70px;
  margin: calc(12px + env(safe-area-inset-top, 0px)) 16px 0;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.12);
  backdrop-filter: var(--glass-blur);
}

.topbar.glass {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 16px;
  right: 16px;
  width: auto;
  background: rgba(255, 255, 255, 0.58);
}

.topbar-main {
  display: contents;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.brand-mark img {
  width: 42px;
  height: 42px;
  display: block;
}

.brand strong,
.brand small {
  display: block;
}

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

.topnav {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.mobile-menu {
  display: none;
}

.mobile-app-bar {
  display: none;
}

.nav-link,
.side-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.nav-link.active,
.side-link.active {
  color: var(--pine-2);
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 8px 22px rgba(15, 23, 42, 0.08);
}

.nav-link.locked {
  color: #8b958f;
}

.nav-link.locked span:first-child {
  opacity: 0.55;
}

.primary-action,
.hero-button,
.full-button {
  min-height: 42px;
  min-width: 118px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #0891b2);
  border: 1px solid rgba(15, 118, 110, 0.35);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(8, 145, 178, 0.22);
  font-weight: 700;
}

.secondary-button,
.sso-button,
.text-button {
  min-height: 42px;
  padding: 0 16px;
  color: var(--pine);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 8px;
  backdrop-filter: var(--glass-blur);
  font-weight: 700;
}

.text-button {
  min-height: 32px;
  padding: 0 10px;
  background: transparent;
}

.ghost-action {
  min-height: 38px;
  min-width: 112px;
  padding: 0 13px;
  color: var(--pine);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 8px;
  font-weight: 800;
}

.ghost-action:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.72;
}

.ghost-action.danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.24);
}

.compact-button {
  min-width: auto;
  min-height: 38px;
  padding: 0 12px;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
  min-height: 42px;
  padding: 5px 5px 5px 14px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 8px;
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.session-pill span {
  max-width: 170px;
  color: var(--pine);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beta-gate {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));
  background:
    linear-gradient(90deg, rgba(8, 20, 25, 0.64), rgba(8, 35, 42, 0.28)),
    url("https://images.unsplash.com/photo-1466611653911-95081537e5b7?auto=format&fit=crop&fm=jpg&q=80&w=2400") center / cover;
}

.beta-card {
  width: min(460px, 100%);
  padding: 30px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 26px 90px rgba(15, 23, 42, 0.22);
  backdrop-filter: var(--glass-blur);
}

.beta-card h1 {
  margin-bottom: 12px;
  font-size: 42px;
  line-height: 1.05;
}

.beta-card p {
  color: var(--muted);
  line-height: 1.55;
}

.beta-card label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 86vh;
  padding: calc(130px + env(safe-area-inset-top, 0px)) 32px calc(52px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 20, 25, 0.58), rgba(8, 35, 42, 0.24) 55%, rgba(255, 255, 255, 0.14)),
    url("https://images.unsplash.com/photo-1466611653911-95081537e5b7?auto=format&fit=crop&fm=jpg&q=80&w=2400") center / cover;
}

.hero-content {
  position: relative;
  width: min(780px, 100%);
  padding: 0;
  color: #fff;
  text-shadow: 0 3px 18px rgba(8, 20, 25, 0.42);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #c8f7f0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: 64px;
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 21px;
}

.hero-copy {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 18px 32px;
  background: transparent;
}

.signal-strip div {
  padding: 22px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}

.signal-strip strong,
.signal-strip span {
  display: block;
}

.signal-strip span {
  margin-top: 4px;
  color: var(--muted);
}

.feature-grid,
.plan-grid,
.buyer-grid,
.admin-grid,
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-grid {
  padding: 32px;
}

.feature-card,
.plan-card,
.buyer-card,
.project-card,
.input-panel,
.table-card,
.memo-preview,
.control-card,
.auth-panel,
.auth-context,
.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}

.feature-card,
.plan-card,
.buyer-card,
.project-card,
.control-card,
.auth-panel,
.auth-context {
  padding: 24px;
}

.feature-card p,
.plan-card p,
.buyer-card p,
.auth-context p,
.procurement-band p {
  color: var(--muted);
  line-height: 1.55;
}

.buyer-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.buyer-card {
  padding: 24px;
  min-height: 178px;
}

.procurement-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
  margin-top: 18px;
  padding: 24px 26px;
  background: rgba(255, 255, 255, 0.58);
  border-top: 1px solid rgba(100, 116, 139, 0.18);
  border-bottom: 1px solid rgba(100, 116, 139, 0.18);
  box-shadow: 0 18px 52px rgba(15, 23, 42, 0.08);
  backdrop-filter: var(--glass-blur);
}

.procurement-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.procurement-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.12;
}

.procurement-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.procurement-checklist {
  display: grid;
  gap: 0;
  min-width: 0;
  margin: 0;
}

.procurement-checklist div {
  display: grid;
  grid-template-columns: minmax(130px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
  padding: 13px 0;
  border-bottom: 1px solid rgba(100, 116, 139, 0.16);
}

.procurement-checklist div:first-child {
  padding-top: 0;
}

.procurement-checklist div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.procurement-checklist dt,
.procurement-checklist dd {
  min-width: 0;
  margin: 0;
  line-height: 1.35;
}

.procurement-checklist dt {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.procurement-checklist dd {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.project-create-panel {
  margin-bottom: 18px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}

.project-create-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.7fr auto;
  gap: 12px;
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}

.project-library-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  backdrop-filter: var(--glass-blur);
}

.portfolio-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.portfolio-stat {
  min-width: 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 8px;
}

.portfolio-stat span,
.project-library-controls span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.portfolio-stat strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-library-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) auto;
  gap: 10px;
  align-items: end;
}

.project-library-controls label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.project-library-controls input,
.project-library-controls select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(100, 116, 139, 0.28);
  border-radius: 8px;
  font: inherit;
  font-weight: 750;
}

.project-result-count {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.project-empty-state {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  border: 1px dashed rgba(100, 116, 139, 0.3);
  border-radius: 8px;
  font-weight: 750;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 258px;
  padding: 20px;
}

.project-card h2 {
  margin: 14px 0 8px;
}

.project-card p,
.muted-copy {
  color: var(--muted);
  line-height: 1.55;
}

.project-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.project-card-metrics span {
  display: block;
  padding: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.2;
}

.project-card-metrics strong {
  display: block;
  color: var(--pine);
  font-size: 17px;
  line-height: 1.15;
  white-space: nowrap;
}

.project-workspace {
  display: block;
}

.project-files {
  position: sticky;
  top: 112px;
  align-self: start;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}

.project-files h2 {
  margin: 16px 0 6px;
}

.project-files p {
  color: var(--muted);
}

.file-tree {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.file-item {
  min-height: 38px;
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}

.file-item::before {
  content: "File";
  display: inline-block;
  margin-right: 8px;
  color: var(--pine);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.pipeline-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.pipeline-tabs button {
  min-height: 46px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.pipeline-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #0891b2);
  border-color: rgba(15, 118, 110, 0.35);
}

.project-status-summary {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.project-status-header,
.diligence-summary-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.project-status-header span,
.workflow-step-card span,
.diligence-summary-header span,
.diligence-item span,
.selected-run-memo-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-status-header strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.project-status-header small,
.workflow-step-card small,
.diligence-item small,
.selected-run-memo-panel small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.35;
}

.project-status-actions,
.workflow-step-card-actions,
.diligence-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.project-status-actions .secondary-button.active {
  color: #fff;
  background: #0f766e;
  border-color: #0f766e;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.18);
}

.workflow-step-grid,
.diligence-item-grid,
.selected-run-memo-facts {
  display: grid;
  gap: 10px;
}

.workflow-step-grid,
.selected-run-memo-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.diligence-item-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.workflow-step-grid {
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-step-card,
.diligence-item {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(100, 116, 139, 0.17);
  border-radius: 8px;
}

.workflow-step-card {
  grid-template-rows: minmax(70px, auto) auto;
  min-height: 136px;
}

.workflow-step-card > * {
  min-width: 0;
}

.workflow-step-card strong,
.diligence-item strong,
.selected-run-memo-panel strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.18;
}

.workflow-step-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.workflow-step-card small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.diligence-item strong,
.selected-run-memo-panel strong {
  overflow-wrap: anywhere;
}

.workflow-step-card-actions {
  align-items: center;
  justify-content: space-between;
}

.workflow-step-card-actions .ghost-action {
  min-width: auto;
}

.flow-next {
  justify-self: end;
}

.module-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  overflow: hidden;
}

.module-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 20px 22px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.module-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-summary-progress {
  display: block;
  width: min(180px, 24vw);
  height: 8px;
  flex: 0 1 180px;
  margin-left: 12px;
  overflow: hidden;
  background: rgba(100, 116, 139, 0.14);
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 999px;
}

.module-summary-progress span,
.module-progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #14b8a6, #0ea5e9);
  border-radius: inherit;
  transition: width 220ms ease;
}

.module-panel summary::-webkit-details-marker {
  display: none;
}

.module-panel summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--pine);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 20px;
}

.module-panel[open] summary {
  border-bottom: 1px solid var(--line-dark);
}

.module-panel[open] summary::after {
  content: "-";
}

.module-panel > :not(summary) {
  margin: var(--space-panel);
}

.module-progress {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.module-progress-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.module-progress-topline strong {
  color: var(--pine);
  font-size: 12px;
}

.module-progress-track {
  height: 10px;
  overflow: hidden;
  background: rgba(100, 116, 139, 0.14);
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 999px;
}

.recalculation-notice {
  grid-column: 1 / -1;
  padding: 13px 14px;
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
}

.recalculation-notice.is-hidden {
  display: none;
}

.calculation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.calculation-toolbar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.calculation-summary {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(14, 165, 233, 0.24);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.calculation-summary-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.calculation-summary h2 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 17px;
}

.calculation-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.calculation-summary-header > strong {
  color: var(--pine);
  font-size: 13px;
  white-space: nowrap;
}

.calculation-summary-track {
  height: 10px;
  overflow: hidden;
  background: rgba(100, 116, 139, 0.14);
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 999px;
}

.calculation-summary-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #14b8a6, #0ea5e9);
  border-radius: inherit;
  transition: width 220ms ease;
}

.calculation-summary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.calculation-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.calculation-summary-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calculation-summary-item strong {
  color: var(--muted);
  white-space: nowrap;
}

.calculation-summary-item.active {
  color: var(--ink);
  background: rgba(20, 184, 166, 0.11);
  border-color: rgba(13, 148, 136, 0.28);
}

.calculation-summary-item.complete strong {
  color: var(--pine);
}

.calculation-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  flex: 0 0 auto;
  gap: 8px;
  justify-content: flex-end;
}

@media (min-width: 721px) {
  .calculation-toolbar {
    position: sticky;
    top: 14px;
    z-index: 24;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: var(--glass-blur);
  }
}

.scenario-validation-panel {
  border-color: rgba(20, 184, 166, 0.22);
}

.validation-error,
.validation-stale {
  margin: 0 0 12px;
  padding: 12px 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
}

.validation-error {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.26);
}

.validation-stale {
  color: #92400e;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.scenario-manager {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 8px;
}

.scenario-manager-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.scenario-manager-heading h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.scenario-manager-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.scenario-manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.model-migration-review {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  color: #14532d;
  background: rgba(220, 252, 231, 0.56);
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 8px;
}

.model-migration-review.needs-review {
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.32);
}

.model-migration-review strong,
.model-migration-review span,
.model-migration-review p {
  display: block;
}

.model-migration-review strong {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.model-migration-review span,
.model-migration-review p,
.model-migration-review li {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.model-migration-review dl {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 8px;
}

.model-migration-review dl div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.model-migration-review dt,
.model-migration-review dd {
  min-width: 0;
  margin: 0;
  font-size: 11px;
  line-height: 1.25;
}

.model-migration-review dt {
  color: var(--muted);
  font-weight: 850;
}

.model-migration-review dd {
  color: var(--ink);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.model-migration-value {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-migration-dropped-paths {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}

.model-migration-dropped-paths ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.model-migration-dropped-paths code {
  display: inline-block;
  padding: 4px 6px;
  color: #7c2d12;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 6px;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.scenario-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 12px;
}

.scenario-card {
  display: grid;
  gap: 11px;
  min-width: 0;
  align-content: start;
  padding: 12px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 8px;
}

.scenario-card.active {
  border-color: rgba(20, 184, 166, 0.44);
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.16);
}

.scenario-card-header span,
.scenario-card-header small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.scenario-card-header strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.scenario-card dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.scenario-name-row {
  display: grid;
  gap: 6px;
}

.scenario-name-row > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.scenario-name-row > div {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.scenario-name-row input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 7px 9px;
  font-size: 13px;
  font-weight: 800;
}

.scenario-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scenario-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.scenario-card dt,
.scenario-card dd {
  min-width: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
}

.scenario-card dt {
  color: var(--muted);
  font-weight: 800;
}

.scenario-card dd {
  color: var(--ink);
  font-weight: 850;
  overflow-wrap: anywhere;
  text-align: right;
}

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

@media (max-width: 1120px) {
  .module-io-grid {
    grid-template-columns: 1fr;
  }
}

.module-output-sections {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.module-output-sections h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
}

.module-data-panel {
  min-width: 0;
  padding: var(--space-card);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.56));
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: var(--radius-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.module-data-panel h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
}

.module-data-panel dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.module-data-panel dl div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.14);
}

.module-data-panel dl div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.module-data-panel dt {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
  white-space: normal;
}

.module-data-panel dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: right;
  white-space: normal;
}

.module-data-panel input,
.module-data-panel select {
  min-width: 0;
  min-height: 34px;
  padding: 6px 9px;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
  width: 100%;
}

.advanced-assumptions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(100, 116, 139, 0.14);
}

.advanced-assumptions summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  color: var(--muted);
  background: rgba(241, 245, 249, 0.62);
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  list-style: none;
}

.advanced-assumptions summary::-webkit-details-marker {
  display: none;
}

.advanced-assumptions summary::after {
  content: "+";
  color: var(--pine);
  font-size: 16px;
  font-weight: 900;
}

.advanced-assumptions[open] summary::after {
  content: "-";
}

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

.advanced-assumptions dl,
.global-advanced-assumptions .global-variable-rows {
  margin-top: 8px;
}

.module-calculate.needs-recalculation {
  color: #fff;
  background: linear-gradient(135deg, #d97706, #0f766e);
  border-color: rgba(217, 119, 6, 0.42);
}

.module-content {
  box-shadow: none;
}

.pricing-module .module-content {
  display: grid;
  gap: 16px;
}

.module-status {
  margin-right: 12px;
  margin-left: 12px;
  padding: 6px 10px;
  color: var(--pine);
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.module-status.needs-data {
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.32);
}

.module-status.ready {
  color: var(--pine);
  background: rgba(20, 184, 166, 0.12);
  border-color: rgba(20, 184, 166, 0.28);
}

.module-status.calculated {
  color: #075985;
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.3);
}

.module-status.not-purchased {
  color: var(--muted);
  background: rgba(100, 116, 139, 0.12);
  border-color: rgba(100, 116, 139, 0.24);
}

.module-status.needs-recalc,
.module-status.unsaved {
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.32);
}

.module-calculate {
  justify-self: end;
}

.walkthrough-banner {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  pointer-events: none;
}

.walkthrough-panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.28);
  backdrop-filter: var(--glass-blur);
  pointer-events: auto;
}

.walkthrough-topline {
  display: grid;
  gap: 8px;
  color: var(--pine);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.icon-close {
  min-height: 32px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.walkthrough-copy {
  min-width: 0;
}

.walkthrough-panel h2 {
  margin-bottom: 4px;
  font-size: 18px;
  line-height: 1.2;
}

.walkthrough-panel p {
  margin-bottom: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.walkthrough-note {
  color: var(--pine-2);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.arrow-button {
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  color: var(--pine-2);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.primary-arrow {
  min-width: 52px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #0891b2);
  border-color: rgba(15, 118, 110, 0.35);
}

.walkthrough-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.walkthrough-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.contact-band {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 26px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.9), rgba(2, 132, 199, 0.72)),
    rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}

.contact-band-copy {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.contact-band h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.15;
}

.contact-band p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.55;
}

.access-pricing {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.access-pricing span {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.access-pricing strong {
  color: #fff;
  font-size: 18px;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  min-height: 44px;
  padding: 0 18px;
  color: var(--pine-2);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  min-height: 36px;
  padding: 0;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(12px);
}

.modal-card {
  width: min(620px, 100%);
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 34px 100px rgba(15, 23, 42, 0.26);
  backdrop-filter: var(--glass-blur);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin-bottom: 0;
}

.modal-form-grid {
  grid-template-columns: 1fr;
}

.modal-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.modal-form-grid input,
.auth-panel input {
  min-height: 52px;
  font-weight: 700;
}

.page,
.workspace,
.auth-layout {
  width: min(1420px, 100%);
  margin: 0 auto;
  padding: calc(112px + env(safe-area-inset-top, 0px)) 28px calc(36px + env(safe-area-inset-bottom, 0px));
}

.workspace {
  display: grid;
  grid-template-columns: 236px 1fr;
  gap: 18px;
  padding-top: 94px;
}

.product-app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.05), rgba(20, 184, 166, 0.06)),
    #f6f8fb;
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100vh;
  height: 100dvh;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px calc(18px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(255, 255, 255, 0.72);
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 18px 0 60px rgba(15, 23, 42, 0.08);
  backdrop-filter: var(--glass-blur);
}

.app-sidebar .side-link {
  color: #1f3f3b;
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(100, 116, 139, 0.2);
  font-weight: 850;
}

.app-sidebar .side-link:hover,
.app-sidebar .side-link:focus-visible {
  color: #0f3b35;
  background: #fff;
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
  outline: none;
}

.app-sidebar .side-link.active {
  color: #fff;
  background: #0f766e;
  border-color: #0f766e;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.28);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0 0 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  text-align: left;
}

.app-brand strong,
.app-brand small {
  display: block;
}

.app-brand small {
  color: var(--muted);
  font-size: 12px;
}

.app-nav {
  display: grid;
  gap: 4px;
}

.sidebar-project-list {
  display: grid;
  gap: 6px;
  margin: 4px 0 10px 26px;
}

.project-mini-link {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 9px 10px;
  color: #334155;
  background: rgba(248, 250, 252, 0.72);
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 8px;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.project-mini-link strong {
  color: #172a2a;
  font-size: 13px;
  line-height: 1.2;
}

.project-mini-link span {
  color: #475569;
  font-size: 12px;
  line-height: 1.25;
}

.project-mini-link:hover {
  background: #fff;
  border-color: rgba(15, 118, 110, 0.32);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.project-mini-link:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.42);
  outline-offset: 2px;
}

.project-mini-link.active {
  background: #e6f7f4;
  border-color: rgba(15, 118, 110, 0.5);
  box-shadow: inset 3px 0 0 #0f766e, 0 8px 18px rgba(15, 23, 42, 0.08);
}

.project-mini-link.active strong {
  color: #0f3b35;
}

.project-mini-link.active span {
  color: #1f5e57;
}

.sidebar-footer {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-dark);
}

.side-link.quiet {
  color: #334155;
  background: rgba(248, 250, 252, 0.64);
  border-color: rgba(100, 116, 139, 0.18);
}

.sidebar-tree {
  display: grid;
  gap: 6px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line-dark);
}

.sidebar-tree strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.tree-item,
.tree-file {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: left;
}

.tree-file {
  padding-left: 22px;
}

.tree-item span,
.tree-file span {
  color: var(--pine);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.tree-file.active {
  color: var(--pine-2);
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.app-main {
  min-width: 0;
  padding: 18px 24px 32px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  backdrop-filter: var(--glass-blur);
}

.app-header .eyebrow {
  margin-bottom: 4px;
}

.app-header strong {
  font-size: 18px;
}

.app-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.page-heading,
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.page-heading {
  display: block;
  max-width: 760px;
}

.page-heading h1,
.section-heading h1,
.auth-panel h1 {
  font-size: 42px;
  line-height: 1.05;
}

.page-heading p {
  color: var(--muted);
  line-height: 1.55;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 430px;
}

.plan-card ul,
.control-card ul,
.validation-panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.75;
}

.plan-price {
  font-size: 32px;
  color: var(--pine);
}

.full-button {
  width: 100%;
  margin-top: auto;
}

.procurement-band {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-top: 18px;
  padding: 26px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.9), rgba(2, 132, 199, 0.72)),
    rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}

.procurement-band p {
  color: rgba(255, 255, 255, 0.78);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(320px, 480px) 1fr;
  gap: 20px;
  align-items: stretch;
  min-height: 100vh;
  min-height: 100svh;
}

.auth-panel {
  align-self: center;
}

.auth-panel label,
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(100, 116, 139, 0.28);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 1px 2px rgba(15, 23, 42, 0.05);
  outline: 0;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder {
  color: #8a94a6;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.admin-select {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(100, 116, 139, 0.28);
  border-radius: 8px;
  font-weight: 700;
}

.admin-select:disabled {
  color: var(--muted);
  background: rgba(241, 245, 249, 0.84);
}

.admin-summary-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-summary-stat {
  min-width: 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}

.admin-summary-stat span,
.admin-summary-stat small {
  display: block;
  color: var(--muted);
}

.admin-summary-stat span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-summary-stat strong {
  display: block;
  margin: 6px 0 2px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.admin-summary-stat small {
  font-size: 13px;
}

.admin-table-card {
  margin-bottom: 16px;
}

.admin-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 12px;
}

.admin-section-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.admin-section-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.admin-table-scroll table {
  min-width: 820px;
}

.admin-table-scroll .audit-table {
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  padding: 14px 18px;
}

.admin-table th {
  font-size: 11px;
}

.admin-table td {
  vertical-align: middle;
}

.admin-table td:first-child,
.audit-table td:nth-child(3) {
  white-space: normal;
}

.admin-mobile-row-list {
  display: none;
}

.admin-mobile-row {
  min-width: 0;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.admin-mobile-row-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.admin-mobile-row-header strong,
.admin-audit-row strong {
  display: block;
  min-width: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.admin-mobile-row-header span,
.admin-audit-row span,
.admin-audit-row small {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-mobile-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.admin-mobile-controls label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-mobile-controls label > span,
.admin-mobile-meta dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-mobile-controls .admin-select {
  width: 100%;
  min-width: 0;
}

.admin-mobile-meta {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}

.admin-mobile-meta div {
  min-width: 0;
}

.admin-mobile-meta dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.admin-mobile-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 14px;
}

.admin-mobile-actions .compact-button {
  width: 100%;
}

.admin-audit-row {
  display: grid;
  gap: 5px;
}

.admin-audit-row time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 1120px) {
  .admin-table-card .admin-table-scroll {
    display: none;
  }

  .admin-mobile-row-list {
    display: grid;
  }
}

@media (min-width: 721px) and (max-width: 1120px) {
  .admin-mobile-actions {
    justify-content: flex-end;
  }

  .admin-mobile-actions .compact-button {
    width: auto;
    min-width: 160px;
  }
}

.muted-table-text {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

input:hover {
  background: #fff;
  border-color: rgba(15, 118, 110, 0.38);
}

input:focus {
  background: #fff;
  border-color: rgba(8, 145, 178, 0.72);
  box-shadow:
    0 0 0 4px rgba(8, 145, 178, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 22px rgba(15, 23, 42, 0.08);
}

.sso-button {
  width: 100%;
  margin-top: 10px;
}

.form-error {
  min-height: 22px;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.credential-card {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.credential-card strong {
  display: block;
  color: var(--pine);
}

.credential-list {
  display: grid;
  gap: 8px;
}

.credential-list div {
  display: grid;
  grid-template-columns: minmax(56px, auto) minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 2px;
  align-items: start;
  min-width: 0;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 8px;
}

.credential-list span,
.credential-list small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.credential-list code {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credential-list small {
  grid-column: 2;
  text-align: left;
}

.return-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-context {
  display: flex;
  flex-direction: column;
  justify-content: end;
  min-height: 420px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.74), rgba(20, 184, 166, 0.46)),
    url("https://images.unsplash.com/photo-1466611653911-95081537e5b7?auto=format&fit=crop&w=1600&q=80") center / cover;
}

.auth-context p {
  color: rgba(255, 255, 255, 0.82);
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.mini-metrics span {
  padding: 12px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  backdrop-filter: blur(16px);
}

.mini-metrics strong {
  display: block;
  font-size: 24px;
}

.sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}

.side-link {
  width: 100%;
  justify-content: flex-start;
  margin-top: 6px;
}

.user-card {
  display: grid;
  gap: 3px;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.user-card strong {
  color: var(--pine);
}

.user-card span,
.user-card small {
  color: var(--muted);
}

.work-surface {
  min-width: 0;
}

.kpi-row {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 18px;
}

.metric {
  padding: 18px;
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--pine);
  font-size: 28px;
}

.table-card {
  overflow: hidden;
}

.data-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 6px;
  scrollbar-color: rgba(15, 118, 110, 0.38) rgba(255, 255, 255, 0.5);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.data-table-scroll::-webkit-scrollbar {
  height: 8px;
}

.data-table-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.5);
}

.data-table-scroll::-webkit-scrollbar-thumb {
  background: rgba(15, 118, 110, 0.38);
  border-radius: 999px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.38);
}

th,
td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-dark);
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.data-table-scroll th,
.data-table-scroll td {
  vertical-align: top;
}

.data-table-scroll th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  backdrop-filter: blur(12px);
}

.run-history-table table {
  min-width: 720px;
}

.run-history-model {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-comparison-table table {
  min-width: 1120px;
  table-layout: auto;
}

.scenario-comparison-table th,
.scenario-comparison-table td {
  padding: 12px;
  overflow-wrap: normal;
}

.scenario-comparison-table th {
  font-size: 11px;
}

.scenario-comparison-table th:first-child,
.scenario-comparison-table td:first-child {
  width: 190px;
}

.scenario-comparison-table th:first-child,
.scenario-comparison-table td:first-child,
.scenario-assumption-table th:first-child,
.scenario-assumption-table td:first-child,
.report-model-audit th:first-child,
.report-model-audit td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #f8fafc;
  box-shadow: 1px 0 0 var(--line-dark), 12px 0 18px rgba(15, 23, 42, 0.06);
}

.scenario-comparison-table th:first-child,
.scenario-assumption-table th:first-child,
.report-model-audit th:first-child {
  z-index: 4;
}

.scenario-comparison-table th:nth-child(2),
.scenario-comparison-table td:nth-child(2) {
  width: 160px;
}

.scenario-comparison-table th:nth-child(3),
.scenario-comparison-table td:nth-child(3),
.scenario-comparison-table th:nth-child(4),
.scenario-comparison-table td:nth-child(4),
.scenario-comparison-table th:nth-child(6),
.scenario-comparison-table td:nth-child(6) {
  white-space: nowrap;
}

.scenario-comparison-table .status {
  white-space: nowrap;
}

.scenario-comparison-card-grid,
.scenario-assumption-card-grid {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.scenario-comparison-card,
.scenario-assumption-card {
  min-width: 0;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.54));
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.scenario-comparison-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.13);
}

.scenario-comparison-card header > div,
.scenario-assumption-card header {
  min-width: 0;
}

.scenario-comparison-card header > div:first-child > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.scenario-comparison-card header > div:first-child > strong,
.scenario-assumption-card header strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.18;
}

.scenario-comparison-card header > div:first-child > small,
.scenario-assumption-card header .muted-table-text {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.scenario-comparison-card-status {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 0;
  text-align: right;
}

.scenario-comparison-card-status .muted-table-text {
  max-width: 136px;
  margin-top: 0;
  line-height: 1.25;
}

.scenario-comparison-card .muted-table-text,
.scenario-assumption-card .muted-table-text {
  display: block;
  margin-top: 3px;
}

.scenario-comparison-card dl,
.scenario-assumption-card dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.scenario-comparison-card dl div,
.scenario-assumption-card dl div {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 9px 0;
  border-bottom: 1px solid rgba(100, 116, 139, 0.11);
}

.scenario-comparison-card dl div:last-child,
.scenario-assumption-card dl div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.scenario-comparison-card dt,
.scenario-comparison-card dd,
.scenario-assumption-card dt,
.scenario-assumption-card dd {
  min-width: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
}

.scenario-comparison-card dt,
.scenario-assumption-card dt {
  color: var(--muted);
  font-weight: 850;
  text-transform: uppercase;
}

.scenario-comparison-card dd,
.scenario-assumption-card dd {
  color: var(--ink);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.scenario-assumption-table table {
  min-width: 980px;
}

.scenario-assumption-table th,
.scenario-assumption-table td {
  padding: 12px;
}

.memo-export-history-table table,
.project-memo-archive-table table {
  min-width: 860px;
  table-layout: auto;
}

.report-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
  min-width: 0;
  margin-top: 12px;
}

.report-file-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: start;
  min-width: 0;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.54));
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.report-file-card div {
  min-width: 0;
}

.report-file-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.report-file-card strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.18;
}

.report-file-card small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.table-subheading {
  margin: 18px 0 10px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
}

.status {
  display: inline-block;
  padding: 5px 9px;
  color: var(--pine);
  background: rgba(204, 251, 241, 0.64);
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.status.status-review {
  color: #92400e;
  background: rgba(254, 243, 199, 0.82);
  border-color: rgba(217, 119, 6, 0.28);
}

.status.status-pending {
  color: #475569;
  background: rgba(241, 245, 249, 0.86);
  border-color: rgba(100, 116, 139, 0.2);
}

.form-grid,
.report-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.input-panel {
  padding: 22px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.global-variables-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62));
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}

.global-variables-card .module-content {
  display: grid;
  gap: 16px;
  margin: 0;
  box-shadow: none;
}

.global-variables-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  cursor: pointer;
  list-style: none;
}

.global-variables-header::-webkit-details-marker {
  display: none;
}

.global-variables-header::after {
  content: "-";
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  color: var(--pine);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 20px;
  font-weight: 800;
}

.global-variables-card:not([open]) .global-variables-header::after {
  content: "+";
}

.global-variables-header .status {
  align-self: center;
}

.global-variables-header h2 {
  margin: 0 0 4px;
  font-size: 21px;
  line-height: 1.2;
}

.global-variables-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.global-variable-list {
  display: grid;
  gap: 12px;
}

.global-variable-group {
  display: grid;
  gap: 8px;
}

.global-variable-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
}

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

.global-variable-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 168px);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(100, 116, 139, 0.17);
  border-radius: 8px;
}

.global-variable-row > .variable-tooltip {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.global-variable-row strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.global-variable-row input,
.global-variable-row select {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 13px;
  font-weight: 850;
  text-align: right;
  width: 100%;
}

.global-variable-row.static-variable > strong {
  text-align: right;
}

.variable-tooltip {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  width: fit-content;
}

.variable-tooltip:focus {
  outline: none;
}

.variable-tooltip:focus-visible .variable-tooltip-label {
  outline: 2px solid rgba(14, 116, 144, 0.42);
  outline-offset: 3px;
  border-radius: 4px;
}

.variable-tooltip-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.variable-tooltip small {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 20;
  width: min(260px, calc(100vw - 48px));
  padding: 8px 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
  pointer-events: none;
  white-space: normal;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
  transform: translateY(-2px);
  transition: transform 140ms ease;
  visibility: hidden;
}

.variable-tooltip small::before {
  position: absolute;
  top: -5px;
  left: 12px;
  width: 8px;
  height: 8px;
  content: "";
  background: rgba(15, 23, 42, 0.94);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transform: rotate(45deg);
}

.variable-tooltip:hover small,
.variable-tooltip:focus small,
.variable-tooltip:focus-within small {
  transform: translateY(0);
  visibility: visible;
}

.scenario-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.scenario-actions .muted-copy {
  margin-right: auto;
}

.success-text {
  color: var(--teal);
  font-weight: 800;
}

.report-layout {
  grid-template-columns: minmax(360px, 0.85fr) 1fr;
}

.memo-preview {
  display: grid;
  gap: 18px;
  padding: var(--space-panel);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(240, 249, 255, 0.72)),
    linear-gradient(180deg, rgba(20, 184, 166, 0.08), rgba(14, 165, 233, 0.08));
}

.report-preview-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(168px, auto);
  gap: 18px;
  align-items: start;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(14, 165, 233, 0.1)),
    rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: var(--radius-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.report-preview-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.36) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.32), transparent 78%);
}

.report-preview-hero span,
.report-decision span,
.report-kpi span,
.report-signal span,
.report-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.report-preview-hero > * {
  position: relative;
}

.report-preview-hero strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.report-preview-hero p {
  max-width: 860px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.report-decision {
  min-width: 0;
  padding: 14px;
  text-align: right;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: var(--radius-panel);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.report-decision-stack {
  display: grid;
  min-width: 220px;
  gap: 8px;
}

.report-decision strong {
  margin-top: 5px;
  color: var(--pine);
  font-size: 17px;
  line-height: 1.2;
}

.report-decision.watch strong {
  color: #b45309;
}

.report-decision.negative strong {
  color: #b91c1c;
}

.report-decision.pending strong {
  color: var(--muted);
}

.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 184px), 1fr));
  gap: 10px;
}

.report-kpi {
  min-width: 0;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.52));
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-panel);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.report-kpi strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.report-kpi small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.report-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  min-width: 0;
}

.report-executive-grid,
.report-visual-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.report-executive-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.report-visual-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.report-preview-section {
  min-width: 0;
  overflow: hidden;
  padding: var(--space-card);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.48));
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-panel);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.report-signal {
  --signal-color: var(--muted);
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.48));
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-panel);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.report-signal.positive {
  --signal-color: var(--pine);
}

.report-signal.watch {
  --signal-color: var(--gold);
}

.report-signal.negative {
  --signal-color: var(--red);
}

.report-signal-ring {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.94) 0 56%, transparent 58%),
    conic-gradient(var(--signal-color) calc(var(--score) * 1%), rgba(148, 163, 184, 0.2) 0);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.report-signal-ring span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: none;
}

.report-signal strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.report-signal small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
}

.report-chart-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 236px;
}

.report-visual-section {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 300px;
}

.report-section-title {
  display: grid;
  gap: 3px;
}

.report-section-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.16;
  text-transform: none;
}

.report-preview-section h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
}

.report-visual-section h3 {
  margin: 0;
  font-size: 18px;
  text-transform: none;
}

.report-preview-section dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.report-preview-section dl div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(48%);
  gap: 12px;
  align-items: baseline;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.13);
}

.report-preview-section dl div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.report-preview-section dt {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-preview-section dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  overflow-wrap: break-word;
  text-align: right;
  word-break: normal;
}

.diligence-summary-panel,
.report-run-required-panel,
.selected-run-memo-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: var(--space-card);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.54));
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: var(--radius-panel);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.report-run-required-panel {
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  align-items: center;
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.88), rgba(255, 255, 255, 0.72));
}

.report-run-required-panel span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.report-run-required-panel strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.16;
}

.report-run-required-panel p {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.report-run-required-panel .primary-action {
  justify-self: end;
  min-width: 170px;
  white-space: normal;
}

.diligence-summary-header strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
}

.diligence-item {
  position: relative;
  padding-bottom: 36px;
}

.diligence-item em {
  position: absolute;
  right: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 4px 7px;
  border-radius: 8px;
  overflow: hidden;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diligence-item em.status-ready {
  color: var(--pine);
  background: rgba(204, 251, 241, 0.64);
}

.diligence-item em.status-review {
  color: #92400e;
  background: rgba(254, 243, 199, 0.82);
}

.diligence-item em.status-pending {
  color: #475569;
  background: rgba(241, 245, 249, 0.86);
}

.tax-bridge {
  display: grid;
  gap: 11px;
}

.tax-bridge div {
  display: grid;
  gap: 5px;
}

.tax-bridge span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.tax-bridge strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.tax-bridge i {
  display: block;
  height: 9px;
  border-radius: 999px;
}

.tax-bridge .base i {
  background: #64748b;
}

.tax-bridge .credit i {
  background: #d99a1e;
}

.tax-bridge .post i {
  background: #0f766e;
}

.selected-run-memo-panel {
  grid-template-columns: minmax(150px, 0.55fr) minmax(420px, 1.1fr) minmax(220px, 0.7fr);
  align-items: center;
}

.selected-run-memo-panel .flow-next {
  width: 100%;
  white-space: normal;
}

.selected-run-memo-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.selected-run-memo-facts div {
  min-width: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(100, 116, 139, 0.15);
  border-radius: 8px;
}

@media (max-width: 1120px) {
  .selected-run-memo-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .selected-run-memo-facts {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  }

  .scenario-comparison-table,
  .scenario-assumption-table {
    display: none;
  }

  .scenario-comparison-card-grid,
  .scenario-assumption-card-grid {
    display: grid;
    gap: 10px;
  }
}

.price-rail-list {
  display: grid;
  gap: 10px;
}

.price-rail-row {
  display: grid;
  grid-template-columns: minmax(78px, 0.68fr) minmax(82px, 1fr) minmax(86px, auto);
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.price-rail-row > span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.price-rail-row strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.price-rail-track {
  height: 14px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
}

.price-rail-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--pine), #0ea5e9);
  border-radius: inherit;
}

.price-rail-row.target .price-rail-track i {
  background: linear-gradient(90deg, #38bdf8, #2563eb);
}

.price-rail-row.cost .price-rail-track i {
  background: linear-gradient(90deg, #fde68a, var(--gold));
}

.price-lane {
  position: relative;
  min-height: 122px;
  margin-top: 6px;
  padding-top: 44px;
  border-bottom: 10px solid rgba(14, 165, 233, 0.16);
}

.price-lane::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 10px;
  background: linear-gradient(90deg, var(--pine), #0ea5e9, var(--gold));
  border-radius: 999px;
}

.price-marker {
  position: absolute;
  top: 0;
  display: grid;
  gap: 4px;
  min-width: 118px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
  transform: translateX(-50%);
}

.price-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  width: 2px;
  height: 34px;
  background: currentColor;
  transform: translateX(-50%);
}

.price-marker span,
.price-spread-callout span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.price-marker strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.1;
}

.price-marker.target {
  color: #0ea5e9;
}

.price-marker.blended {
  color: var(--pine);
}

.price-marker.cost {
  color: var(--gold);
}

.price-spread-callout {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(100, 116, 139, 0.14);
  border-radius: var(--radius-panel);
}

.price-spread-callout strong {
  color: var(--pine);
  font-size: 26px;
  line-height: 1;
}

.price-spread-callout.watch strong {
  color: var(--gold);
}

.price-spread-callout.negative strong {
  color: var(--red);
}

.price-spread-callout small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.waterfall-list {
  display: grid;
  gap: 9px;
}

.waterfall-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.76fr) minmax(110px, 1fr) minmax(68px, auto);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.waterfall-row > span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.waterfall-row strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.waterfall-track {
  height: 12px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
}

.waterfall-track i {
  display: block;
  height: 100%;
  background: var(--pine);
  border-radius: inherit;
}

.waterfall-row.negative .waterfall-track i {
  background: var(--red);
}

.waterfall-row.result .waterfall-track i {
  background: linear-gradient(90deg, var(--pine), #0ea5e9);
}

.waterfall-row.strong {
  padding-top: 8px;
  border-top: 1px solid rgba(100, 116, 139, 0.14);
}

.waterfall-row.strong strong {
  color: var(--pine);
  font-size: 15px;
}

.resource-band-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 150px;
  padding: 10px 8px 0;
  border-bottom: 1px solid rgba(100, 116, 139, 0.14);
}

.resource-band {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 7px;
  min-width: 0;
  height: 150px;
}

.resource-band span,
.resource-band strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.resource-band strong {
  color: var(--ink);
}

.resource-band i {
  align-self: end;
  min-height: 10px;
  background: linear-gradient(180deg, #67e8f9, var(--pine));
  border-radius: 8px 8px 0 0;
}

.resource-band.watch i {
  background: linear-gradient(180deg, #fde68a, var(--gold));
}

.resource-band.downside i {
  background: linear-gradient(180deg, #c7d2fe, #475569);
}

.resource-callouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.resource-callouts span {
  min-width: 0;
  padding: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(100, 116, 139, 0.13);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.resource-callouts strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.report-resource-confidence .loss-stack {
  padding-top: 4px;
}

.revenue-mix-bar {
  display: flex;
  height: 30px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 999px;
}

.revenue-mix-bar span {
  display: block;
  min-width: 2px;
}

.revenue-mix-bar .contracted,
.revenue-mix-legend .contracted {
  background: linear-gradient(90deg, var(--pine), var(--teal));
}

.revenue-mix-bar .merchant,
.revenue-mix-legend .merchant {
  background: linear-gradient(90deg, #38bdf8, #2563eb);
}

.revenue-mix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.revenue-mix-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.revenue-mix-legend i {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.report-mini-dl {
  gap: 7px;
}

.report-mini-dl div {
  padding-bottom: 7px;
}

.loss-stack {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin: 0;
}

.loss-stack div {
  display: grid;
  grid-template-columns: minmax(86px, 0.7fr) minmax(64px, auto) minmax(80px, 1fr);
  gap: 8px;
  align-items: center;
}

.loss-stack span,
.loss-stack strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}

.loss-stack strong {
  color: var(--ink);
  text-align: right;
}

.loss-stack i {
  display: block;
  height: 8px;
  background: linear-gradient(90deg, #14b8a6, #0ea5e9);
  border-radius: 999px;
}

.generation-profile {
  display: flex;
  align-items: end;
  gap: 8px;
  min-width: 0;
  height: 168px;
  margin: 0;
  padding: 8px 6px 0;
  overflow: hidden;
  border-top: 1px solid rgba(100, 116, 139, 0.1);
}

.generation-profile div {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 7px;
  flex: 1;
  align-self: stretch;
  min-width: 0;
}

.generation-profile span {
  align-self: end;
  min-height: 8px;
  background: linear-gradient(180deg, #67e8f9, var(--pine));
  border-radius: 6px 6px 0 0;
}

.generation-profile small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.report-watchlist ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.report-watchlist li {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.report-model-audit {
  display: grid;
  gap: 12px;
}

.report-audit-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.report-audit-meta div {
  min-width: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 8px;
}

.report-audit-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.report-audit-meta strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.report-model-audit table {
  min-width: 760px;
  font-size: 12px;
  table-layout: fixed;
}

.report-model-audit th,
.report-model-audit td {
  padding: 10px;
  overflow-wrap: anywhere;
  word-break: normal;
}

.report-model-audit th {
  white-space: nowrap;
}

.memo-export-text {
  max-height: 340px;
  margin-top: 16px;
  padding: 16px;
  overflow: auto;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.admin-grid {
  grid-template-columns: repeat(3, 1fr);
}

.control-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.control-card strong {
  display: block;
  margin: 8px 0 14px;
  color: var(--pine);
  font-size: 20px;
}

@media (max-width: 1020px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .topnav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .primary-action {
    justify-self: end;
  }

  .signal-strip,
  .feature-grid,
  .plan-grid,
  .buyer-grid,
  .admin-grid,
  .kpi-row,
  .auth-layout,
  .project-create-grid,
  .project-workspace,
  .report-executive-grid,
  .report-kpi-grid,
  .report-preview-grid,
  .report-visual-grid,
  .report-audit-meta,
  .selected-run-memo-panel,
  .selected-run-memo-facts,
  .model-migration-review,
  .scenario-card-grid,
  .report-layout {
    grid-template-columns: 1fr;
  }

  .workflow-step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar {
    position: static;
  }

  .project-files {
    position: static;
  }

  .product-app .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .procurement-panel {
    grid-template-columns: 1fr;
  }

  .admin-summary-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-library-controls {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  }

  .project-result-count {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  :root {
    --mobile-gutter: 12px;
    --mobile-panel-padding: 16px;
    --mobile-control: 44px;
    --mobile-row: 46px;
  }

  .topbar {
    width: calc(100% - (var(--mobile-gutter) * 2));
    min-height: 64px;
    margin: calc(8px + env(safe-area-inset-top, 0px)) var(--mobile-gutter) 0;
    padding: 9px 12px;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .topbar-main {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    justify-items: start;
  }

  .topbar.glass {
    left: var(--mobile-gutter);
    right: var(--mobile-gutter);
  }

  .brand {
    min-width: 0;
    min-height: var(--mobile-control);
    align-items: center;
    gap: 10px;
  }

  .topbar-main > .brand {
    justify-self: start;
  }

  .brand-mark,
  .brand-mark img {
    width: 36px;
    height: 36px;
  }

  .topnav,
  .topbar-actions {
    display: none;
  }

  .mobile-menu {
    position: relative;
    display: block;
    flex: 0 0 auto;
  }

  .mobile-menu summary {
    position: relative;
    z-index: 95;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: var(--mobile-control);
    height: var(--mobile-control);
    padding: 0;
    list-style: none;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu summary span {
    display: block;
    width: 18px;
    height: 2px;
    flex: 0 0 auto;
    background: var(--pine-2);
    border-radius: 999px;
  }

  .mobile-menu[open] summary {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-menu-panel {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: min(336px, 88vw);
    height: 100vh;
    height: 100dvh;
    padding: calc(var(--mobile-panel-padding) + env(safe-area-inset-top, 0px)) var(--mobile-panel-padding) calc(var(--mobile-panel-padding) + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    background: #fff;
    border-right: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 26px 0 78px rgba(15, 23, 42, 0.24);
    backdrop-filter: var(--glass-blur);
    transform: translateX(-104%);
    transition: transform 220ms ease, box-shadow 220ms ease;
    overscroll-behavior: contain;
  }

  .mobile-menu[open] .mobile-menu-panel {
    transform: translateX(0);
  }

  .mobile-menu[open]::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.26);
    backdrop-filter: blur(2px);
  }

  .mobile-menu-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--mobile-control);
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-dark);
  }

  .mobile-menu-brand {
    min-width: 0;
    width: 100%;
    padding: 0;
  }

  .mobile-menu-close {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: var(--mobile-control);
    height: var(--mobile-control);
    padding: 0;
    color: var(--pine-2);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line-dark);
    border-radius: 8px;
    font-size: 28px;
    line-height: 0;
  }

  .mobile-menu-content {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    gap: 14px;
  }

  .mobile-menu-nav {
    display: grid;
    gap: 8px;
  }

  .mobile-menu-actions {
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line-dark);
  }

  .mobile-menu-panel .nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: var(--mobile-row);
    padding: 0 12px;
    text-align: left;
  }

  .mobile-menu-panel .secondary-button,
  .mobile-menu-panel .primary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: var(--mobile-row);
    padding: 0 12px;
    text-align: center;
  }

  .mobile-menu-panel .app-brand {
    min-height: var(--mobile-control);
    padding-right: calc(var(--mobile-control) + 8px);
    padding-bottom: 14px;
  }

  .app-drawer-panel {
    position: fixed;
    gap: 14px;
    padding: calc(18px + env(safe-area-inset-top, 0px)) var(--mobile-panel-padding) calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .app-drawer-panel .mobile-menu-close {
    position: absolute;
    top: 18px;
    right: var(--mobile-panel-padding);
  }

  .mobile-app-bar .app-drawer-panel .app-brand {
    flex: 0 0 auto;
    min-width: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-dark);
  }

  .walkthrough-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }

  .walkthrough-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .walkthrough-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .walkthrough-panel h2 {
    font-size: 16px;
  }

  .walkthrough-panel p {
    display: none;
  }

  .walkthrough-note {
    font-size: 12px;
  }

  .walkthrough-controls {
    justify-content: space-between;
  }

  .page,
  .auth-layout {
    padding: calc(118px + env(safe-area-inset-top, 0px)) 14px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .workspace {
    padding: 24px 14px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .app-main {
    padding: 0 12px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .product-app {
    grid-template-columns: 1fr;
    display: block;
  }

  .mobile-app-bar {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 35;
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 64px;
    margin: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    backdrop-filter: var(--glass-blur);
  }

  .mobile-app-bar .app-brand {
    flex: 1;
    min-width: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .app-sidebar {
    display: none;
  }

  .app-brand {
    padding-bottom: 10px;
  }

  .user-card {
    display: none;
  }

  .app-drawer-panel .user-card {
    display: grid;
    gap: 4px;
    padding: 13px 12px;
    background: rgba(240, 249, 255, 0.72);
    border: 1px solid var(--line-dark);
    border-radius: 8px;
  }

  .app-nav,
  .sidebar-footer {
    grid-template-columns: 1fr;
  }

  .pipeline-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }

  .pipeline-tabs button {
    min-height: 42px;
    padding: 8px 6px;
    font-size: 13px;
    line-height: 1.15;
  }

  .project-flow .section-heading {
    gap: 8px;
    margin-bottom: 14px;
  }

  .project-flow .section-heading > .status {
    align-self: flex-start;
    width: auto;
    max-width: 100%;
  }

  .product-app .kpi-row {
    grid-template-columns: 1fr;
  }

  .app-header,
  .app-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .app-nav {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .sidebar-project-list {
    display: grid;
    gap: 8px;
    margin: 0 0 10px 14px;
    padding-bottom: 0;
    overflow-x: visible;
  }

  .project-mini-link {
    min-width: 0;
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.36);
    border-color: rgba(255, 255, 255, 0.44);
  }

  .sidebar-footer {
    display: grid;
    gap: 8px;
    margin-top: 0;
    padding-top: 14px;
    overflow-x: visible;
  }

  .sidebar-footer .side-link {
    width: 100%;
  }

  .side-link {
    align-items: center;
    min-height: var(--mobile-row);
    padding: 0 12px;
    margin-top: 0;
  }

  .hero {
    min-height: 82vh;
    min-height: 82svh;
    padding: calc(136px + env(safe-area-inset-top, 0px)) 14px calc(32px + env(safe-area-inset-bottom, 0px));
  }

  .hero-content {
    padding: 0;
  }

  .hero-content h1 {
    font-size: 44px;
  }

  .hero-copy {
    font-size: 17px;
  }

  .feature-grid {
    padding: 14px;
  }

  .section-heading,
  .project-status-header,
  .diligence-summary-header,
  .procurement-panel,
  .procurement-band,
  .contact-band {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .page-heading h1,
  .section-heading h1,
  .auth-panel h1 {
    font-size: 34px;
  }

  .section-heading .primary-action {
    width: 100%;
  }

  .project-status-actions,
  .workflow-step-card-actions,
  .diligence-summary-meta {
    justify-content: flex-start;
  }

  .workflow-step-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-right: 0;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .workflow-step-card {
    min-height: 0;
    padding: 10px;
    scroll-snap-align: none;
  }

  .workflow-step-card strong {
    display: -webkit-box;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .workflow-step-card-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .workflow-step-card-actions .status {
    align-self: flex-start;
  }

  .workflow-step-card-actions .ghost-action {
    width: 100%;
    min-height: 36px;
  }

  .selected-run-memo-panel {
    align-items: stretch;
  }

  .report-run-required-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .report-run-required-panel strong {
    font-size: 18px;
  }

  .report-run-required-panel .primary-action {
    justify-self: stretch;
    width: 100%;
  }

  .two-col,
  .global-variable-rows,
  .mini-metrics {
    grid-template-columns: 1fr;
  }

  .project-library-controls {
    grid-template-columns: 1fr;
  }

  .procurement-panel {
    padding: 18px 16px;
  }

  .procurement-checklist div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .admin-summary-panel {
    grid-template-columns: 1fr;
  }

  .admin-section-header {
    padding: 16px 16px 10px;
  }

  .admin-table-card .admin-table-scroll {
    display: none;
  }

  .admin-mobile-row-list {
    display: grid;
  }

  .admin-mobile-row {
    padding: 16px;
  }

  .admin-mobile-controls {
    grid-template-columns: 1fr;
  }

  .scenario-name-row > div {
    grid-template-columns: 1fr;
  }

  .scenario-name-row .ghost-action {
    width: 100%;
  }

  .model-migration-review dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .project-result-count {
    align-self: start;
  }

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

  .report-decision {
    text-align: left;
  }

  .report-signal {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .report-signal-ring {
    width: 54px;
    height: 54px;
  }

  .price-marker {
    min-width: 94px;
    padding: 7px 8px;
  }

  .price-marker strong {
    font-size: 11px;
  }

  .waterfall-row {
    grid-template-columns: minmax(76px, 0.7fr) minmax(72px, 1fr) minmax(58px, auto);
  }

  .resource-callouts {
    grid-template-columns: 1fr;
  }

  .loss-stack div {
    grid-template-columns: minmax(0, 0.9fr) minmax(52px, auto) minmax(56px, 1fr);
  }

  .generation-profile {
    gap: 5px;
  }

  .generation-profile small {
    font-size: 9px;
  }

  .global-variable-row {
    grid-template-columns: 1fr;
  }

  .global-variable-row input,
  .global-variable-row select,
  .global-variable-row.static-variable > strong {
    text-align: left;
  }

  .scenario-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .calculation-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .calculation-toolbar span {
    white-space: normal;
  }

  .calculation-summary-header {
    display: grid;
  }

  .calculation-summary-header > strong {
    white-space: normal;
  }

  .scenario-actions .muted-copy {
    margin-right: 0;
  }

  .module-panel summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 58px;
    padding: 16px;
    font-size: 17px;
  }

  .module-status {
    grid-column: 1;
    margin-left: 0;
    margin-right: auto;
  }

  .module-summary-progress {
    grid-column: 1;
    width: 100%;
    margin-left: 0;
  }

  .module-io-grid {
    grid-template-columns: 1fr;
  }

  .module-data-panel dl div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .module-data-panel dd {
    text-align: left;
  }

  .scenario-comparison-table,
  .scenario-assumption-table {
    display: none;
  }

  .scenario-comparison-card-grid,
  .scenario-assumption-card-grid {
    display: grid;
    gap: 10px;
  }

  .module-panel summary::after {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
  }

  .module-panel .advanced-assumptions summary {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 10px;
    font-size: 13px;
  }

  .module-panel .advanced-assumptions summary span {
    margin-left: auto;
    padding: 2px 7px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(100, 116, 139, 0.16);
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.1;
  }

  .module-panel .advanced-assumptions summary::after {
    grid-column: auto;
    grid-row: auto;
    margin-left: 8px;
  }

  .module-panel > :not(summary) {
    margin: 16px;
  }

  .field,
  .auth-panel label {
    font-size: 12px;
  }

  input {
    min-height: 44px;
    font-size: 16px;
  }

  .module-data-panel input,
  .module-data-panel select,
  .global-variable-row input,
  .global-variable-row select {
    min-height: 40px;
    padding: 7px 10px;
  }

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

  .project-card {
    min-height: auto;
    padding: 18px;
  }

  .auth-context {
    min-height: 300px;
  }

  .credential-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .credential-list small {
    grid-column: auto;
    text-align: left;
  }

  .credential-list code {
    grid-column: auto;
  }

  th,
  td {
    padding: 12px;
    white-space: nowrap;
  }

  .report-model-audit td {
    white-space: normal;
  }

  .table-card {
    overflow-x: auto;
  }
}
