:root {
  --navy: #0b2441;
  --navy-2: #123354;
  --slate: #526174;
  --muted: #748195;
  --line: #dce5ec;
  --line-strong: #c7d4dd;
  --white: #ffffff;
  --surface: #f7faf9;
  --surface-2: #eef5f1;
  --green: #2f8065;
  --green-dark: #1f654f;
  --green-soft: #dceee7;
  --amber: #b97819;
  --amber-soft: #fff1d9;
  --shadow: 0 18px 50px rgba(11, 36, 65, 0.12);
  --shadow-soft: 0 10px 30px rgba(11, 36, 65, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  text-rendering: geometricPrecision;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

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

.container {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
}

.section-pad {
  padding: 104px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(220, 229, 236, 0.82);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(100% - 32px, 1240px);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  letter-spacing: 0;
  color: var(--navy);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--green);
  background: linear-gradient(145deg, #ebf6f1, #ffffff);
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(47, 128, 101, 0.12);
}

.brand-mark svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--slate);
}

.nav-links a {
  transition: color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--navy);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy);
  padding: 10px;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
  border-radius: 999px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: 0;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  color: #ffffff;
  background: var(--green);
  box-shadow: 0 12px 26px rgba(47, 128, 101, 0.25);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--green-dark);
}

.btn-secondary {
  color: var(--navy);
  background: #ffffff;
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(11, 36, 65, 0.08);
}

.btn-danger {
  color: #8f1f1f;
  background: #ffffff;
  border-color: rgba(143, 31, 31, 0.28);
}

.btn-danger:hover,
.btn-danger:focus-visible {
  color: #ffffff;
  background: #8f1f1f;
}

.btn-small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.86rem;
}

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 96px;
  background:
    radial-gradient(circle at 84% 22%, rgba(47, 128, 101, 0.14), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.grid-field {
  position: absolute;
  inset: 0;
  opacity: 0.72;
  background-image:
    linear-gradient(rgba(18, 51, 84, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 51, 84, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, black 0%, transparent 75%);
  pointer-events: none;
}

.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  align-items: center;
  gap: 72px;
}

.hero-copy h1,
.section-copy h2,
.section-heading h2,
.solution-panel h2,
.trust-main h2,
.cta-panel h2 {
  margin: 0;
  color: var(--navy);
  letter-spacing: 0;
  line-height: 1.02;
}

.hero-copy h1 {
  max-width: 770px;
  font-size: clamp(3.2rem, 6.1vw, 6.35rem);
  font-weight: 800;
}

.hero-copy p {
  max-width: 680px;
  margin: 26px 0 0;
  color: var(--slate);
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-panel,
.dashboard-mock,
.solution-panel,
.pricing-card,
.feature-card,
.trust-card,
.cta-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-panel {
  border-radius: 26px;
  padding: 24px;
  transform: rotate(1.2deg);
}

.panel-topline,
.chart-head,
.progress-block > div:first-child,
.dash-header,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.mini-label,
.chart-head,
small,
.section-number {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.panel-topline strong {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
}

.status-chip {
  white-space: nowrap;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.74rem;
  font-weight: 800;
}

.score-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.score-card {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.score-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 720;
}

.score-card strong {
  display: block;
  margin-top: 12px;
  font-size: 1.55rem;
  line-height: 1;
}

.score-card small {
  display: block;
  margin-top: 10px;
}

.score-card.moderate strong {
  color: var(--amber);
  font-size: 1.16rem;
}

.chart-card,
.issue-card {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.chart-card {
  padding: 18px;
}

.bar-chart {
  height: 180px;
  display: flex;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
  padding: 18px 14px 0;
  border-radius: 14px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(180deg, #fbfdfc, #f3f8f6);
}

.bar-chart span {
  flex: 1;
  min-width: 22px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #4c9b82, #d4e8df);
}

.issue-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
}

.issue-card p {
  margin: 0;
  color: var(--navy);
  font-weight: 700;
}

.issue-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 6px var(--amber-soft);
}

.split-section,
.dashboard-layout,
.solution-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: start;
}

.section-copy h2,
.section-heading h2,
.solution-panel h2,
.trust-main h2,
.cta-panel h2 {
  margin-top: 14px;
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  font-weight: 790;
}

.section-copy p,
.solution-panel p,
.trust-main p {
  margin: 22px 0 0;
  color: var(--slate);
  font-size: 1.08rem;
}

.problem {
  background: #ffffff;
}

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

.problem-grid article {
  min-height: 78px;
  display: flex;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--navy);
  font-weight: 760;
  box-shadow: var(--shadow-soft);
}

.solution {
  background:
    linear-gradient(180deg, #f8fbfa, #ffffff);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.solution-panel {
  position: sticky;
  top: 100px;
  min-height: 500px;
  overflow: hidden;
  border-radius: 28px;
  padding: 38px;
}

.node-map {
  position: relative;
  height: 210px;
  margin-bottom: 24px;
  border-radius: 22px;
  background:
    linear-gradient(120deg, transparent 0 49%, rgba(47, 128, 101, 0.2) 50%, transparent 51%),
    linear-gradient(45deg, transparent 0 49%, rgba(18, 51, 84, 0.13) 50%, transparent 51%),
    var(--surface);
  border: 1px solid var(--line);
}

.node-map span {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 5px solid var(--green);
  box-shadow: 0 10px 22px rgba(47, 128, 101, 0.18);
  animation: pulse 3.8s ease-in-out infinite;
}

.node-map span:nth-child(1) { left: 18%; top: 24%; }
.node-map span:nth-child(2) { left: 47%; top: 16%; animation-delay: 0.4s; }
.node-map span:nth-child(3) { left: 72%; top: 42%; animation-delay: 0.8s; }
.node-map span:nth-child(4) { left: 32%; top: 68%; animation-delay: 1.2s; }
.node-map span:nth-child(5) { left: 58%; top: 74%; animation-delay: 1.6s; }

.solution-list {
  display: grid;
  gap: 16px;
}

.solution-list article {
  padding: 24px 0 24px 28px;
  border-left: 2px solid var(--green-soft);
}

.solution-list strong {
  font-size: 1.18rem;
}

.solution-list p {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--slate);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 42px;
}

.section-heading.narrow {
  max-width: 680px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.steps article {
  position: relative;
  min-height: 300px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.steps article::after {
  content: "";
  position: absolute;
  right: -22px;
  top: 48px;
  width: 26px;
  height: 2px;
  background: var(--line-strong);
}

.steps article:last-child::after {
  display: none;
}

.steps span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--navy);
  font-weight: 800;
}

.steps h3,
.feature-card h3,
.pricing-card h3 {
  margin: 24px 0 10px;
  font-size: 1.16rem;
  line-height: 1.25;
}

.steps p,
.feature-card p,
.pricing-card p {
  margin: 0;
  color: var(--slate);
}

.features {
  background: var(--surface);
}

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

.feature-card {
  min-height: 244px;
  padding: 24px;
  border-radius: var(--radius);
}

.feature-card span {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-dark);
}

.feature-card span::before,
.feature-card span::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: currentColor;
}

.icon-checklist::before { width: 18px; height: 3px; top: 14px; left: 16px; box-shadow: 0 7px 0 currentColor, 0 14px 0 currentColor; }
.icon-checklist::after { width: 5px; height: 5px; top: 13px; left: 9px; box-shadow: 0 7px 0 currentColor, 0 14px 0 currentColor; }
.icon-extract::before { width: 19px; height: 24px; border: 2px solid currentColor; background: transparent; border-radius: 4px; }
.icon-extract::after { width: 14px; height: 3px; top: 21px; left: 14px; box-shadow: 0 6px 0 currentColor; }
.icon-chart::before { width: 5px; height: 18px; left: 12px; bottom: 11px; box-shadow: 8px -6px 0 currentColor, 16px -12px 0 currentColor; }
.icon-chart::after { width: 25px; height: 2px; left: 9px; bottom: 10px; }
.icon-ratio::before { width: 24px; height: 24px; border: 2px solid currentColor; background: transparent; border-radius: 50%; }
.icon-ratio::after { width: 18px; height: 3px; transform: rotate(-42deg); }
.icon-score::before { width: 23px; height: 15px; border: 2px solid currentColor; background: transparent; border-radius: 5px; }
.icon-score::after { width: 14px; height: 3px; bottom: 11px; }
.icon-risk::before { width: 22px; height: 20px; clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 2px; }
.icon-risk::after { width: 3px; height: 11px; top: 15px; box-shadow: 0 12px 0 currentColor; }
.icon-memo::before { width: 22px; height: 26px; border: 2px solid currentColor; background: transparent; border-radius: 5px; }
.icon-memo::after { width: 14px; height: 3px; left: 14px; top: 16px; box-shadow: 0 7px 0 currentColor, 0 14px 0 currentColor; }
.icon-human::before { width: 11px; height: 11px; top: 10px; }
.icon-human::after { width: 25px; height: 13px; bottom: 9px; border-radius: 13px 13px 5px 5px; }

.dashboard-section {
  background: #ffffff;
}

.dashboard-mock {
  border-radius: 28px;
  padding: 28px;
}

.dash-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.dash-header h3 {
  margin: 4px 0 0;
  font-size: 1.45rem;
}

.dash-header span {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--navy);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 800;
}

.dash-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.dash-metrics article {
  min-height: 92px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.dash-metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 1.18rem;
  line-height: 1.1;
}

.progress-block {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.progress-block span {
  color: var(--slate);
  font-weight: 740;
}

.progress-track {
  height: 11px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ecef;
}

.progress-track span {
  display: block;
  width: 76%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), #8fb9a8);
}

.dash-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.dash-body article {
  min-height: 138px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.dash-body p {
  margin: 10px 0 0;
  font-weight: 760;
}

.flagged {
  background: var(--amber-soft);
}

.strength {
  background: var(--green-soft);
}

.mini-table {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.mini-table div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--slate);
}

.mini-table div:last-child {
  border-bottom: 0;
}

.mini-table strong {
  color: var(--navy);
}

.trust {
  background: var(--navy);
  color: #ffffff;
}

.trust-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 18px;
}

.trust-main {
  grid-row: span 2;
  padding: 34px;
}

.trust-main h2,
.trust-main p,
.trust-main .section-number {
  color: #ffffff;
}

.trust-main p {
  opacity: 0.78;
}

.trust-card,
.trust-main {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.trust-card {
  min-height: 170px;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  font-size: 1.2rem;
  font-weight: 780;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pricing-card {
  min-height: 336px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px;
  border-radius: 22px;
}

.pricing-card h3 {
  margin-top: 0;
  font-size: 1.35rem;
}

.pricing-card strong {
  display: block;
  margin: auto 0 24px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.pricing-card.featured {
  border-color: rgba(47, 128, 101, 0.4);
  background: linear-gradient(180deg, #ffffff, #f1f8f5);
  transform: translateY(-10px);
}

.final-cta {
  padding-top: 30px;
}

.cta-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 46px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(47, 128, 101, 0.1), transparent 55%),
    #ffffff;
}

.cta-panel::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(47, 128, 101, 0.18);
  border-radius: 50%;
}

.cta-panel h2 {
  max-width: 780px;
  margin-top: 0;
  font-size: clamp(2.1rem, 4vw, 4rem);
}

.footer {
  padding: 34px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer p {
  max-width: 720px;
  margin: 0;
  color: var(--slate);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

.footer-links a {
  color: var(--slate);
  font-size: 0.88rem;
  font-weight: 760;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--green-dark);
}

.legal-page {
  padding: 150px 0 72px;
  background: var(--paper);
}

.legal-document {
  max-width: 880px;
  display: grid;
  gap: 22px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(11, 36, 65, 0.08);
}

.legal-document h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3rem);
}

.legal-document h2 {
  margin: 12px 0 0;
  color: var(--navy);
  font-size: 1.25rem;
}

.legal-document p,
.legal-document li {
  color: var(--slate);
  line-height: 1.62;
}

.legal-document ul {
  margin: 0;
  padding-left: 22px;
}

form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--slate);
  font-size: 0.88rem;
  font-weight: 720;
}

label.full,
.btn.full {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--navy);
  background: #ffffff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 128, 101, 0.14);
}

textarea {
  resize: vertical;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 10px 22px rgba(47, 128, 101, 0.18);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 10px 34px rgba(47, 128, 101, 0.32);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1080px) {
  .hero-layout,
  .split-section,
  .dashboard-layout,
  .solution-layout {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .solution-panel {
    position: relative;
    top: auto;
    min-height: auto;
  }

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

  .steps article::after {
    display: none;
  }

  .trust-grid {
    grid-template-columns: 1fr 1fr;
  }

  .trust-main {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a,
  .nav-links .btn {
    justify-content: flex-start;
    width: 100%;
    padding: 14px 12px;
    border-radius: 12px;
    box-shadow: none;
  }

  .section-pad {
    padding: 76px 0;
  }

  .hero {
    padding-top: 70px;
  }

  .hero-panel {
    transform: none;
  }

  .score-row,
  .dash-metrics,
  .dash-body,
  .pricing-grid,
  .trust-grid,
  form,
  .cta-panel {
    grid-template-columns: 1fr;
  }

  .cta-panel {
    padding: 34px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 28px, var(--max));
  }

  .nav-shell {
    width: min(100% - 24px, 1240px);
  }

  .hero-copy h1 {
    font-size: clamp(2.65rem, 14vw, 4.1rem);
  }

  .hero-actions,
  .hero-actions .btn {
    width: 100%;
  }

  .problem-grid,
  .steps,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .panel-topline,
  .dash-header,
  .mini-table div {
    align-items: flex-start;
    flex-direction: column;
  }

}

.public-hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 72px);
  padding: 92px 0 84px;
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(11, 36, 65, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(11, 36, 65, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, #f6f9fb 100%);
  background-size: 48px 48px, 48px 48px, auto;
}

.public-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 118px;
  background: linear-gradient(180deg, transparent, #eef4f5);
  pointer-events: none;
}

.public-hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.93fr) minmax(460px, 1.07fr);
  gap: 62px;
  align-items: center;
}

.public-hero .hero-copy h1 {
  max-width: 760px;
  font-size: clamp(3rem, 5.1vw, 5.15rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.public-hero .hero-copy p {
  max-width: 670px;
  font-size: clamp(1.08rem, 1.55vw, 1.24rem);
  line-height: 1.55;
}

.product-preview {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid #d8e2e8;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(11, 36, 65, 0.14);
}

.preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: #0b2441;
  color: #ffffff;
}

.preview-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
}

.preview-dot {
  width: 22px;
  height: 22px;
  border: 2px solid #86c7ad;
  border-radius: 7px;
  position: relative;
}

.preview-dot::before,
.preview-dot::after {
  content: "";
  position: absolute;
  background: #86c7ad;
  border-radius: 999px;
}

.preview-dot::before {
  width: 10px;
  height: 2px;
  left: 4px;
  top: 8px;
}

.preview-dot::after {
  width: 2px;
  height: 10px;
  left: 8px;
  top: 4px;
}

.preview-positioning {
  margin: 6px 0 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  line-height: 1.45;
}

.preview-sidebar button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 740;
  text-align: left;
}

.preview-sidebar button.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.preview-main {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px;
  background: #f7faf9;
}

.preview-topbar,
.tool-panel-head,
.workbook-title,
.output-row,
.document-list-preview article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preview-topbar {
  min-height: 58px;
  padding: 0 0 18px;
  border-bottom: 1px solid #dce5ec;
}

.preview-topbar strong {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
}

.preview-topbar span,
.tool-panel-head span,
.workbook-title span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #dceee7;
  color: #1f654f;
  font-size: 0.74rem;
  font-weight: 820;
}

.preview-question,
.tool-panel,
.workbook-panel,
.document-list-preview {
  border: 1px solid #dce5ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(11, 36, 65, 0.06);
}

.preview-question {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.preview-question label {
  color: #0b2441;
  font-size: 1.05rem;
  font-weight: 780;
}

.preview-question textarea {
  min-height: 150px;
  resize: none;
  background: #fbfdfc;
}

.preview-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 14px;
}

.preview-split article {
  min-height: 166px;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 18px;
  border: 1px solid #dce5ec;
  border-radius: 8px;
  background: #ffffff;
}

.preview-split span:not(.preview-topbar span) {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f2f6f7;
  color: #526174;
  font-size: 0.84rem;
  font-weight: 720;
}

.preview-split strong {
  font-size: 1.25rem;
  line-height: 1.15;
}

.workflow-band {
  background: #eef4f5;
  border-top: 1px solid #dce5ec;
  border-bottom: 1px solid #dce5ec;
}

.section-heading p {
  max-width: 690px;
  margin: 14px 0 0;
  color: #526174;
  font-size: 1.08rem;
}

.workflow-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid #d8e2e8;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(11, 36, 65, 0.08);
}

.workflow-rail article {
  min-height: 270px;
  padding: 26px;
  border-right: 1px solid #d8e2e8;
}

.workflow-rail article:last-child {
  border-right: 0;
}

.workflow-rail span,
.document-list-preview span {
  display: block;
  color: #2f8065;
  font-size: 0.74rem;
  font-weight: 840;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow-rail h3 {
  margin: 42px 0 10px;
  font-size: 1.65rem;
  line-height: 1.1;
}

.workflow-rail p {
  margin: 0;
  color: #526174;
}

.expertise-section {
  background: #0b2441;
  color: #ffffff;
}

.expertise-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(520px, 1.15fr);
  gap: 64px;
  align-items: center;
}

.expertise-section .section-number,
.expertise-section .section-copy h2,
.expertise-section .section-copy p {
  color: #ffffff;
}

.expertise-section .section-copy p {
  color: rgba(255, 255, 255, 0.76);
}

.expertise-panel {
  display: grid;
  gap: 14px;
}

.expertise-panel article {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.expertise-panel strong {
  display: block;
  color: #ffffff;
  font-size: 1.22rem;
  line-height: 1.15;
}

.expertise-panel p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.75);
}

.tool-section {
  background: #ffffff;
}

.projection-section,
.documents-section-public {
  background: #f7faf9;
}

.tool-layout,
.documents-layout,
.guarantee-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(480px, 1.1fr);
  gap: 64px;
  align-items: center;
}

.tool-layout.reverse .section-copy {
  order: 2;
}

.tool-layout.reverse .workbook-panel {
  order: 1;
}

.section-number {
  color: #2f8065;
}

.tool-panel,
.workbook-panel {
  padding: 24px;
}

.tool-panel-head,
.workbook-title {
  padding-bottom: 18px;
  border-bottom: 1px solid #dce5ec;
}

.tool-panel-head strong,
.workbook-title strong {
  font-size: 1.24rem;
}

.field-stack {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.field-stack label {
  display: grid;
  gap: 8px;
  color: #526174;
  font-size: 0.82rem;
  font-weight: 780;
}

.field-stack input {
  color: #0b2441;
  background: #f7faf9;
}

.output-row {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #dce5ec;
  border-radius: 8px;
  background: #f7faf9;
}

.output-row span {
  max-width: 390px;
  color: #526174;
  font-size: 0.92rem;
}

.workbook-grid {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: 22px;
  border: 1px solid #dce5ec;
  border-radius: 8px;
  background: #dce5ec;
}

.workbook-grid span,
.workbook-grid i {
  min-height: 46px;
  background: #ffffff;
}

.workbook-grid span {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: #526174;
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 760;
}

.workbook-grid i {
  position: relative;
}

.workbook-grid i::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 9px;
  border-radius: 999px;
  background: #dceee7;
  transform: translateY(-50%);
}

.assumption-note {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #dce5ec;
  border-radius: 8px;
  background: #eef4f5;
}

.assumption-note p {
  margin: 8px 0 0;
  color: #526174;
}

.document-list-preview {
  overflow: hidden;
}

.document-list-preview article {
  min-height: 92px;
  padding: 18px 20px;
  border-bottom: 1px solid #dce5ec;
}

.document-list-preview article:last-child {
  border-bottom: 0;
}

.document-list-preview strong {
  flex: 1;
  color: #0b2441;
  font-size: 1.02rem;
}

.guarantee-section {
  background:
    linear-gradient(135deg, rgba(220, 238, 231, 0.78), rgba(255, 255, 255, 0) 58%),
    #ffffff;
}

.guarantee-card {
  display: grid;
  gap: 18px;
  padding: 32px;
  border: 1px solid rgba(47, 128, 101, 0.24);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(11, 36, 65, 0.08);
}

.guarantee-card span {
  color: #2f8065;
  font-size: 0.74rem;
  font-weight: 840;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guarantee-card strong {
  color: #0b2441;
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  line-height: 1.06;
}

.guarantee-card p {
  margin: 0;
  color: #526174;
  font-size: 1.05rem;
}

.guarantee-card ul {
  display: grid;
  gap: 12px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.guarantee-card li {
  position: relative;
  padding-left: 28px;
  color: #324257;
  font-weight: 690;
}

.guarantee-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 12px;
  height: 12px;
  border: 3px solid #2f8065;
  border-radius: 50%;
}

.public-cta {
  padding-top: 44px;
  background: #ffffff;
}

.public-cta .cta-panel {
  border-radius: 12px;
  background: #0b2441;
  color: #ffffff;
}

.public-cta .cta-panel h2 {
  color: #ffffff;
}

.public-cta .cta-panel p {
  max-width: 670px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.public-cta .cta-panel::after {
  display: none;
}

@media (max-width: 1080px) {
  .public-hero-layout,
  .expertise-layout,
  .tool-layout,
  .documents-layout,
  .guarantee-layout {
    grid-template-columns: 1fr;
  }

  .product-preview {
    min-height: 500px;
  }

  .tool-layout.reverse .section-copy,
  .tool-layout.reverse .workbook-panel {
    order: initial;
  }
}

@media (max-width: 820px) {
  .public-hero {
    min-height: auto;
    padding: 68px 0 74px;
  }

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

  .preview-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
  }

  .preview-brand,
  .preview-positioning {
    grid-column: 1 / -1;
  }

  .workflow-rail,
  .preview-split {
    grid-template-columns: 1fr;
  }

  .workflow-rail article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #d8e2e8;
  }

  .workflow-rail article:last-child {
    border-bottom: 0;
  }

  .output-row,
  .document-list-preview article {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .public-hero .hero-copy h1 {
    font-size: clamp(2.45rem, 13vw, 3.65rem);
  }

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

  .preview-main,
  .tool-panel,
  .workbook-panel {
    padding: 16px;
  }

  .workbook-grid {
    grid-template-columns: 1.35fr repeat(3, minmax(44px, 1fr));
  }
}

body.app-mode > .site-header,
body.app-mode > main,
body.app-mode > .footer {
  display: none;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  background: #f4f8f7;
  color: var(--navy);
}

.app-shell.auth-mode {
  grid-template-columns: 1fr;
}

.app-shell[hidden] {
  display: none;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
  background: #ffffff;
  border-right: 1px solid var(--line);
  box-shadow: 10px 0 32px rgba(11, 36, 65, 0.05);
  z-index: 20;
}

.app-brand {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.app-positioning {
  padding: 14px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--slate);
  font-size: 0.84rem;
  font-weight: 680;
}

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

.app-nav-label {
  margin: 10px 0 2px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 860;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-nav button,
.app-mobile-close,
.text-button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.app-nav button {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--slate);
  text-align: left;
  font-size: 0.94rem;
  font-weight: 760;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.app-nav button:hover,
.app-nav button.active {
  color: var(--navy);
  background: var(--green-soft);
  transform: translateX(2px);
}

.app-topbar small,
.app-section-head p,
.muted-text {
  color: var(--muted);
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 28px;
  background: rgba(244, 248, 247, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.app-topbar h1 {
  margin: 2px 0 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.08;
}

.app-topbar small,
.app-section-head p {
  display: block;
  margin: 0;
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.app-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.notification-button {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, var(--green) 0 4px, transparent 5px),
    radial-gradient(circle at 50% 72%, var(--green) 0 10px, transparent 11px),
    #ffffff;
  cursor: pointer;
}

.notification-button span {
  position: absolute;
  right: -4px;
  top: -4px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--amber);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
}

.user-menu {
  position: relative;
}

.user-menu > button {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px 4px 5px;
  background: #ffffff;
  color: var(--navy);
  cursor: pointer;
  font-weight: 760;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #ffffff;
  font-size: 0.78rem;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: 52px;
  min-width: 170px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.user-dropdown button {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--slate);
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-weight: 720;
}

.user-dropdown button:hover {
  color: var(--navy);
  background: var(--surface);
}

.role-switcher {
  display: grid;
  gap: 6px;
  padding: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.role-switcher select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--navy);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: none;
}

.app-menu,
.app-mobile-close {
  display: none;
}

.app-content {
  flex: 1;
  width: min(100% - 40px, 1240px);
  margin: 0 auto;
  padding: 30px 0 42px;
}

.app-section {
  display: grid;
  gap: 22px;
}

.app-section-head,
.card-head,
.workspace-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.app-section-head h2,
.workspace-title h2 {
  margin: 4px 0 0;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.02;
}

.app-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.app-card h3,
.app-card h4 {
  margin: 0;
}

.app-card p {
  color: var(--slate);
}

.active-project-display {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.active-project-display span,
.save-status {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.active-project-display strong {
  max-width: 280px;
  overflow: hidden;
  color: var(--navy);
  font-size: 0.94rem;
  font-weight: 820;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.save-status {
  align-self: center;
  min-width: 110px;
  color: var(--green);
}

.persistence-card {
  max-width: 760px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 24px;
  padding: 32px 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.82), rgba(244, 248, 247, 0.94)),
    linear-gradient(90deg, rgba(11, 36, 65, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(11, 36, 65, 0.06) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
}

.auth-brand {
  position: fixed;
  top: 24px;
  left: 24px;
}

.auth-card {
  width: min(100%, 460px);
  display: grid;
  gap: 18px;
}

.auth-card > p {
  margin: 0;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 860;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-links button {
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font: inherit;
  font-weight: 820;
}

.auth-message,
.reset-link-box {
  padding: 14px;
  border: 1px solid rgba(47, 128, 101, 0.24);
  border-radius: 14px;
  background: var(--surface);
  color: var(--slate);
  overflow-wrap: anywhere;
}

.reset-link-box {
  display: grid;
  gap: 8px;
}

.reset-link-box span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  min-height: 142px;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 18px;
  font-size: 2rem;
  line-height: 1;
}

.metric-card small {
  display: block;
  margin-top: 12px;
}

.tone-green strong {
  color: var(--green);
}

.tone-amber strong {
  color: var(--amber);
}

.dashboard-grid,
.workspace-grid,
.settings-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 18px;
}

.wide-card {
  grid-column: span 1;
}

.file-list,
.alert-list,
.activity-feed,
.doc-list,
.findings-list,
.task-list,
.summary-list,
.role-list {
  display: grid;
  gap: 12px;
}

.file-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 150px;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--navy);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.file-row:hover,
.loan-table tbody tr:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 128, 101, 0.38);
  box-shadow: 0 10px 24px rgba(11, 36, 65, 0.08);
}

.file-row small,
.loan-table small,
.doc-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--slate);
  font-size: 0.72rem;
  font-weight: 820;
  white-space: nowrap;
}

.status-human-review,
.status-approved-for-submission,
.status-submitted-to-lender,
.risk-low,
.risk-positive {
  color: var(--green-dark);
  background: var(--green-soft);
  border-color: rgba(47, 128, 101, 0.18);
}

.status-ai-processing,
.status-documents-needed,
.risk-moderate,
.risk-medium,
.tone-amber .app-badge {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(185, 120, 25, 0.2);
}

.risk-elevated,
.risk-high {
  color: #9c2f24;
  background: #ffe4df;
  border-color: rgba(156, 47, 36, 0.2);
}

.status-intake-started,
.risk-pending {
  color: var(--slate);
  background: #eef2f5;
}

.mini-progress {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ecef;
}

.mini-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), #92b9a9);
}

.alert-list div,
.activity-feed div,
.summary-list span {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.alert-list span,
.activity-feed small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.activity-feed div {
  position: relative;
  padding-left: 34px;
}

.activity-feed div > span {
  position: absolute;
  left: 13px;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.activity-feed p {
  margin: 0;
  color: var(--navy);
  font-weight: 720;
}

.pipeline-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.pipeline-strip article {
  min-height: 98px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.pipeline-strip span {
  display: block;
  color: var(--green);
  font-size: 1.7rem;
  font-weight: 840;
  line-height: 1;
}

.pipeline-strip strong {
  display: block;
  margin-top: 10px;
  font-size: 0.84rem;
  line-height: 1.18;
}

.table-wrap {
  overflow: auto;
}

.loan-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.loan-table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-align: left;
  text-transform: uppercase;
}

.loan-table td {
  padding: 14px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--slate);
  font-weight: 650;
}

.loan-table td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 14px 0 0 14px;
  color: var(--navy);
}

.loan-table td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 14px 14px 0;
}

.workspace-hero {
  display: grid;
  gap: 18px;
}

.workspace-title p {
  margin: 8px 0 0;
}

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

.workspace-metrics .metric-card {
  min-height: 118px;
  padding: 16px;
  box-shadow: none;
  background: var(--surface);
}

.workspace-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.workspace-tabs button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--slate);
  cursor: pointer;
  font: inherit;
  font-weight: 760;
  white-space: nowrap;
}

.workspace-tabs button.active {
  color: #ffffff;
  background: var(--navy);
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-weight: 760;
}

.detail-list dd {
  margin: 0;
  color: var(--navy);
  font-weight: 780;
  text-align: right;
}

.drop-zone {
  min-height: 210px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  margin: 18px 0;
  padding: 26px;
  border: 1px dashed rgba(47, 128, 101, 0.55);
  border-radius: 18px;
  background:
    linear-gradient(rgba(47, 128, 101, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 128, 101, 0.08) 1px, transparent 1px),
    var(--surface);
  background-size: 28px 28px;
  color: var(--navy);
  cursor: pointer;
  text-align: center;
}

.drop-zone span {
  color: var(--slate);
}

.doc-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.doc-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--amber-soft);
}

.doc-icon.received {
  background: var(--green-soft);
}

.doc-icon.received::after {
  content: "";
  display: block;
  width: 13px;
  height: 7px;
  margin: 8px auto;
  border-left: 3px solid var(--green);
  border-bottom: 3px solid var(--green);
  transform: rotate(-45deg);
}

.doc-item em {
  color: var(--green);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.financial-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.app-chart {
  height: 260px;
  display: flex;
  align-items: end;
  gap: 16px;
  margin-top: 22px;
  padding: 18px;
  border-radius: 16px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 25%,
    var(--surface);
}

.app-chart span {
  flex: 1;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #4c9b82, #cae4da);
}

.gauge {
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  margin: 24px auto 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 56%, transparent 57%),
    conic-gradient(var(--green) var(--score), #e4ece9 0);
}

.gauge strong {
  font-size: 2rem;
}

.warnings span {
  border-color: rgba(185, 120, 25, 0.22);
  background: var(--amber-soft);
}

.review-notes,
.review-card textarea {
  width: 100%;
  margin-top: 14px;
}

.plan-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.plan-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.plan-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.score-pill {
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 820;
}

.plan-card .mini-progress {
  margin: 14px 0;
}

.findings-list {
  margin-top: 18px;
}

.finding-item {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.finding-item p,
.finding-item strong {
  margin: 0;
}

.finding-item strong {
  color: var(--navy);
}

.finding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--navy);
}

.task-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--navy);
  cursor: pointer;
  min-width: 0;
}

.task-item input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
}

.task-item span {
  min-width: 0;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.task-item small {
  justify-self: end;
  color: var(--muted);
  white-space: nowrap;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.wizard-progress button {
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--slate);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 760;
  text-align: left;
}

.wizard-progress span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--slate);
}

.wizard-progress .active {
  border-color: rgba(47, 128, 101, 0.4);
  background: var(--green-soft);
  color: var(--navy);
}

.wizard-progress .done span {
  background: var(--green);
  color: #ffffff;
}

.intake-card {
  display: grid;
  gap: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.form-grid .full-span {
  grid-column: 1 / -1;
}

.form-grid label,
.user-admin-row label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.form-grid input,
.form-grid select,
.user-admin-row input,
.user-admin-row select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--navy);
  font: inherit;
  text-transform: none;
}

.billing-summary {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.billing-summary > div {
  display: grid;
  gap: 5px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.billing-summary > div:last-child {
  border-bottom: 0;
}

.billing-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.billing-summary strong {
  color: var(--navy);
}

.billing-summary small {
  color: var(--muted);
  line-height: 1.45;
}

.billing-history-card {
  grid-column: 1 / -1;
}

.billing-history-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.billing-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.billing-history-row:last-child {
  border-bottom: 0;
}

.billing-history-row strong {
  color: var(--navy);
}

.billing-history-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.billing-status {
  white-space: nowrap;
}

.user-admin-list {
  display: grid;
  gap: 12px;
}

.user-admin-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) repeat(4, minmax(120px, 0.8fr)) minmax(140px, 0.8fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.user-admin-row > div:first-child {
  align-self: center;
}

.user-admin-row strong {
  display: block;
}

.user-admin-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-row-actions,
.overview-project-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.user-list-card {
  margin-top: 18px;
}

.role-badge {
  text-transform: none;
}

.wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.analysis-progress {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.analysis-progress div {
  flex: 1;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2eae7;
}

.analysis-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), #a6c9ba);
  transition: width 280ms ease;
}

.engine-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.engine-grid article {
  min-height: 130px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.engine-grid article.active {
  border-color: rgba(47, 128, 101, 0.48);
  box-shadow: 0 0 0 4px rgba(47, 128, 101, 0.12);
}

.engine-grid article.done {
  background: var(--green-soft);
}

.engine-grid span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--navy);
  color: #ffffff;
  font-weight: 820;
}

.engine-grid small {
  display: block;
  margin-top: 8px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.packet-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}

.packet-controls {
  align-self: start;
  display: grid;
  gap: 12px;
}

.packet-preview {
  background: #edf3f1;
}

.packet-page {
  max-width: 760px;
  min-height: 820px;
  margin: 0 auto;
  padding: 46px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.packet-page h3 {
  font-size: 2rem;
}

.packet-page section {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.packet-page h4 {
  margin: 0 0 8px;
}

.admin-grid .app-card,
.settings-grid .app-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

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

.role-list span {
  padding: 12px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 780;
  text-align: center;
}

.overview-empty {
  max-width: 720px;
}

.overview-create-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.overview-create-card h3 {
  margin: 10px 0 8px;
}

.overview-guarantee-panel {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(47, 128, 101, 0.28);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, var(--surface));
}

.overview-guarantee-panel span {
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 840;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.overview-guarantee-panel strong {
  color: var(--navy);
  font-size: 1.02rem;
  line-height: 1.2;
}

.overview-guarantee-panel small {
  color: var(--slate);
  line-height: 1.35;
}

.overview-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.overview-stat {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--navy);
  cursor: pointer;
  text-align: left;
}

.overview-stat span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 840;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.overview-stat strong {
  font-size: 2rem;
  line-height: 1;
}

.overview-stat.range-low {
  border-color: rgba(198, 77, 77, 0.38);
  background: rgba(198, 77, 77, 0.08);
}

.overview-stat.range-low strong,
.overview-stat.range-low .overview-range {
  color: #a73737;
}

.overview-range {
  color: var(--green);
  font-size: 0.88rem;
  font-style: normal;
  font-weight: 840;
  line-height: 1.2;
}

.overview-stat small {
  color: var(--slate);
  font-weight: 720;
}

.overview-project-list {
  display: grid;
  gap: 14px;
}

.overview-project-card {
  display: grid;
  gap: 18px;
}

.overview-project-card.active {
  border-color: rgba(47, 128, 101, 0.42);
}

.overview-project-card h3 {
  margin: 10px 0 4px;
}

.overview-project-card p {
  margin: 0;
}

.review-queue-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.4fr);
  gap: 18px;
  align-items: start;
}

.review-queue-list,
.review-detail-card,
.review-history {
  display: grid;
  gap: 14px;
}

.review-queue-item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--navy);
  cursor: pointer;
  text-align: left;
}

.review-queue-item:hover,
.review-queue-item.active {
  border-color: rgba(47, 128, 101, 0.38);
  background: var(--green-soft);
}

.review-queue-item span,
.review-queue-item small {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.review-document-button {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--navy);
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.review-document-download {
  display: grid;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.review-document-button span,
.review-document-download span {
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 840;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.review-document-button small {
  color: var(--muted);
}

.review-document-history,
.document-history-card {
  display: grid;
  gap: 12px;
}

.review-document-history h4 {
  margin: 0;
}

.review-packet-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.review-packet-preview section,
.review-history article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.review-packet-preview p {
  margin: 12px 0 0;
}

.review-packet-preview p strong,
.review-history p strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}

.review-summary-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.review-summary-values span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 12px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
}

.review-summary-values strong {
  color: var(--navy);
  font-size: 1rem;
  text-transform: none;
}

.review-decision-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 0;
}

.review-decision-form .full-span {
  grid-column: 1 / -1;
}

.review-history article {
  display: grid;
  gap: 10px;
}

.review-history article > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.review-history span {
  color: var(--muted);
  font-size: 0.8rem;
}

.review-history p {
  margin: 0;
}

.app-footer {
  width: min(100% - 40px, 1240px);
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.build-number {
  white-space: nowrap;
  color: rgba(82, 97, 116, 0.78);
  font-variant-numeric: tabular-nums;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: grid;
  gap: 10px;
}

.toast {
  max-width: 360px;
  padding: 14px 16px;
  border: 1px solid rgba(47, 128, 101, 0.24);
  border-radius: 14px;
  background: #ffffff;
  color: var(--navy);
  box-shadow: var(--shadow);
  font-weight: 740;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
}

.app-modal[hidden] {
  display: none;
}

.app-modal-card {
  width: min(100%, 620px);
}

.payment-popover {
  background: rgba(11, 36, 65, 0.46);
  backdrop-filter: blur(10px);
}

.payment-popover-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.payment-popover-card {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  max-height: min(92vh, 820px);
  overflow: auto;
}

.payment-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.payment-popover-head h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.payment-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 8px;
}

.test-mode-badge {
  border-color: rgba(185, 120, 25, 0.28);
  background: var(--amber-soft);
  color: #8a5b14;
}

.payment-popover-head p {
  margin: 0;
}

.payment-popover-close {
  color: var(--slate);
  font-weight: 780;
}

.payment-offer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  margin-top: 20px;
}

.payment-price-box,
.payment-terms-box,
.payment-guarantee-box,
.payment-disclosure {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.payment-price-box {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 22px;
  background: var(--green-soft);
}

.payment-price-box span {
  color: var(--green-dark);
  font-size: 0.74rem;
  font-weight: 860;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.payment-price-box strong {
  color: var(--navy);
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 1;
}

.payment-price-box small {
  color: var(--slate);
  font-weight: 720;
}

.payment-terms-box,
.payment-guarantee-box,
.payment-disclosure {
  padding: 20px;
}

.payment-terms-box h4,
.payment-guarantee-box h4 {
  margin: 0 0 12px;
}

.payment-terms-box ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
  color: var(--slate);
  font-weight: 680;
}

.payment-guarantee-box {
  margin-top: 14px;
  background: #ffffff;
}

.payment-guarantee-box p {
  margin: 0;
  color: var(--slate);
}

.payment-disclosure {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  border-color: rgba(185, 120, 25, 0.28);
  background: var(--amber-soft);
}

.payment-disclosure strong {
  color: var(--navy);
}

.payment-disclosure span {
  color: var(--slate);
}

.payment-disclosure.is-sandbox strong {
  color: #8a5b14;
}

.payment-popover-card .modal-actions {
  position: sticky;
  bottom: -1px;
  margin: 18px -4px -4px;
  padding: 14px 4px 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 32%);
}

.app-doc-form {
  margin-top: 20px;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.mvp-workflow .app-section-head h2 {
  max-width: 760px;
}

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

.mode-toggle {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(94px, 1fr));
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.mode-toggle button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--slate);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 820;
}

.mode-toggle button.active {
  background: var(--green);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(47, 128, 101, 0.22);
}

.mvp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.interactive-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.interactive-card {
  display: grid;
  gap: 22px;
}

.interactive-progress {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(47, 128, 101, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 20%, rgba(47, 128, 101, 0.12), transparent 28%),
    linear-gradient(135deg, #f8fbfa, #eef6f2);
}

.progress-meta,
.progress-stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.progress-meta span,
.progress-stats span,
.question-kicker {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 860;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-meta strong {
  color: var(--navy);
}

.fancy-progress {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8e5;
  box-shadow: inset 0 1px 3px rgba(11, 36, 65, 0.12);
}

.fancy-progress span {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.26) 0 12px, transparent 12px 24px),
    linear-gradient(90deg, var(--green), #7db49e);
  background-size: 24px 100%, auto;
  box-shadow: 0 8px 18px rgba(47, 128, 101, 0.24);
  transition: width 220ms ease;
}

.interactive-question {
  display: grid;
  gap: 14px;
  scroll-margin-top: 150px;
}

.interactive-question h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.05;
}

.interactive-question textarea {
  min-height: 240px;
  font-size: 1rem;
}

.ai-guided-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.72fr);
  gap: 18px;
  align-items: start;
}

.ai-guided-grid-focused {
  grid-template-columns: minmax(0, 980px);
}

.ai-interview-card {
  display: grid;
  gap: 18px;
}

.ai-orbital-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(47, 128, 101, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 20%, rgba(47, 128, 101, 0.16), transparent 28%),
    linear-gradient(120deg, #ffffff, #edf5f1);
  scroll-margin-top: 150px;
}

.ai-orbital-panel h3 {
  max-width: 700px;
  margin: 6px 0 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.02;
}

.ai-progress-ring {
  width: 118px;
  height: 118px;
  flex: 0 0 118px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #ffffff 72%, transparent 73%),
    conic-gradient(var(--green) var(--progress), #dbe7e2 0);
  box-shadow: inset 0 0 0 1px var(--line), 0 14px 28px rgba(47, 128, 101, 0.14);
}

.ai-progress-ring strong {
  font-size: 1.55rem;
  line-height: 1;
}

.ai-progress-ring span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 840;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ai-question-score {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(11, 36, 65, 0.05);
}

.ai-question-score.red {
  border-left-color: #c64d4d;
}

.ai-question-score.orange {
  border-left-color: var(--amber);
}

.ai-question-score.green {
  border-left-color: var(--green);
}

.ai-question-score strong {
  color: var(--navy);
  font-size: 1.9rem;
  line-height: 1;
}

.ai-question-score p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--slate);
}

.logo-upload-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(11, 36, 65, 0.05);
}

.logo-upload-card.compact {
  grid-column: 1 / -1;
  margin: 0 0 14px;
  box-shadow: none;
}

.logo-preview-box {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfa;
}

.logo-preview-box img {
  max-width: 68px;
  max-height: 68px;
  object-fit: contain;
}

.logo-upload-copy {
  display: grid;
  gap: 8px;
}

.logo-upload-copy span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 840;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.logo-upload-copy strong {
  color: var(--navy);
  font-size: 1.05rem;
}

.logo-upload-copy p {
  margin: 0;
  color: var(--slate);
}

.logo-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ai-draft-box span,
.ai-helper-row,
.ai-question-score span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 840;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ai-draft-box {
  display: grid;
  gap: 10px;
}

.ai-draft-shell {
  position: relative;
  display: grid;
}

.ai-draft-box textarea {
  min-height: 260px;
  font-size: 1rem;
}

.ai-draft-box.is-processing textarea {
  color: rgba(11, 36, 65, 0.72);
  filter: saturate(0.86);
}

.ai-smartfill-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px solid rgba(47, 128, 101, 0.24);
  border-radius: 14px;
  background: rgba(247, 250, 249, 0.88);
  color: var(--navy);
  text-align: center;
  backdrop-filter: blur(5px);
  pointer-events: all;
}

.ai-smartfill-overlay span {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(47, 128, 101, 0.18);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: smartfillSpin 820ms linear infinite;
}

.ai-smartfill-overlay strong {
  font-size: 1.05rem;
}

.ai-smartfill-overlay small {
  max-width: 320px;
  color: var(--slate);
  font-weight: 680;
}

.ai-helper-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ai-related-updates {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(185, 120, 25, 0.28);
  border-radius: 16px;
  background: var(--amber-soft);
}

.ai-related-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-weight: 820;
  text-align: left;
}

.ai-related-summary strong {
  color: var(--amber);
  white-space: nowrap;
}

.ai-related-list {
  display: grid;
  gap: 10px;
}

.ai-related-list article {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(185, 120, 25, 0.24);
  border-radius: 14px;
  background: #ffffff;
}

.ai-related-list article > div:first-child span,
.ai-related-values strong {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 840;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ai-related-list h4,
.ai-related-values p {
  margin: 0;
}

.ai-related-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ai-related-values p {
  padding: 10px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--slate);
  font-size: 0.85rem;
}

.ai-related-list .text-button {
  justify-self: start;
  color: var(--amber);
  font-weight: 820;
}

.ai-bottom-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
}

.ai-next-button {
  min-height: 58px;
  justify-content: space-between;
  gap: 16px;
  border-radius: 16px;
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.ai-next-button:hover,
.ai-next-button:focus-visible {
  transform: translateY(-2px);
}

.ai-next-button.red {
  background: #b84444;
}

.ai-next-button.orange {
  background: var(--amber);
}

.ai-next-button.green {
  background: var(--green);
}

.ai-next-button strong {
  min-width: 58px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  text-align: center;
}

.question-jump-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}

.question-jump-menu > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 840;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.question-jump-menu > strong {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--green);
  font-size: 0.78rem;
  white-space: nowrap;
}

.question-jump-grid {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.question-jump-grid button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #ffffff;
  color: var(--slate);
  cursor: pointer;
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, background 160ms ease;
}

.question-jump-grid button.score-red {
  border-color: rgba(198, 77, 77, 0.34);
  background: rgba(198, 77, 77, 0.1);
}

.question-jump-grid button.score-orange {
  border-color: rgba(203, 139, 55, 0.4);
  background: rgba(203, 139, 55, 0.12);
}

.question-jump-grid button.score-green {
  border-color: rgba(47, 128, 101, 0.38);
  background: rgba(47, 128, 101, 0.1);
}

.question-jump-grid button.review-jump {
  padding: 0 12px;
  border-color: rgba(11, 36, 65, 0.16);
  background: var(--navy);
  color: #ffffff;
}

.question-jump-grid button:hover,
.question-jump-grid button:focus-visible {
  border-color: rgba(47, 128, 101, 0.42);
  box-shadow: 0 8px 14px rgba(11, 36, 65, 0.08);
  outline: none;
}

.question-jump-grid button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.question-jump-grid button.active {
  border-color: rgba(47, 128, 101, 0.54);
  background: rgba(47, 128, 101, 0.1);
  box-shadow: inset 0 0 0 1px rgba(47, 128, 101, 0.18);
}

.question-jump-grid button.active.score-red {
  border-color: rgba(198, 77, 77, 0.6);
  box-shadow: inset 0 0 0 1px rgba(198, 77, 77, 0.22);
}

.question-jump-grid button.active.score-orange {
  border-color: rgba(203, 139, 55, 0.62);
  box-shadow: inset 0 0 0 1px rgba(203, 139, 55, 0.22);
}

.question-jump-grid span {
  color: inherit;
  font-size: 0.82rem;
  font-weight: 860;
}

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

.review-summary-bar article {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(11, 36, 65, 0.04);
}

.review-summary-bar span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 840;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.review-summary-bar strong {
  color: var(--navy);
  font-size: 1.4rem;
}

.review-summary-bar .needs-attention {
  border-color: rgba(185, 120, 25, 0.28);
  background: var(--amber-soft);
}

.review-card {
  gap: 18px;
}

.review-answer-list {
  display: grid;
  gap: 18px;
  max-height: 760px;
  overflow: auto;
  padding-right: 6px;
}

.review-answer-list section {
  display: grid;
  gap: 12px;
}

.review-answer-list h4 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 8px 0;
  background: #ffffff;
}

.review-answer {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.review-answer.is-missing {
  border-color: rgba(198, 77, 77, 0.22);
  background: rgba(198, 77, 77, 0.05);
}

.review-answer span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 840;
  letter-spacing: 0.04em;
}

.review-answer textarea {
  min-height: 84px;
  border-radius: 12px;
  background: #ffffff;
}

.document-list {
  display: grid;
  gap: 14px;
}

.document-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

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

.document-card h3 {
  margin: 10px 0 6px;
}

.document-card p {
  margin: 0;
}

.latest-doc-badge {
  margin-left: 6px;
  background: var(--green-soft);
  color: var(--green-dark);
}

.document-history-card {
  grid-column: 1 / -1;
}

.document-history-list {
  display: grid;
  gap: 10px;
}

.document-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.document-history-row:last-child {
  border-bottom: 0;
}

.document-history-row strong {
  color: var(--navy);
}

.document-history-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.empty-documents {
  min-height: 320px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
}

.naics-assist {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(47, 128, 101, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(47, 128, 101, 0.08), rgba(255, 255, 255, 0.92)),
    #ffffff;
  box-shadow: 0 10px 24px rgba(11, 36, 65, 0.05);
}

.naics-assist h4,
.naics-assist p {
  margin: 0;
}

.naics-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.naics-search-row input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 14px;
  background: #ffffff;
  color: var(--navy);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(11, 36, 65, 0.03);
}

.naics-search-row input:focus {
  border-color: rgba(47, 128, 101, 0.55);
  outline: 3px solid rgba(47, 128, 101, 0.14);
}

.naics-selected,
.naics-error {
  padding: 12px 14px;
  border-radius: 14px;
}

.naics-selected {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(47, 128, 101, 0.22);
  background: rgba(47, 128, 101, 0.08);
}

.naics-selected span,
.naics-results em {
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 840;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.naics-selected strong {
  color: var(--navy);
}

.naics-error {
  margin: 0;
  border: 1px solid rgba(198, 77, 77, 0.22);
  background: rgba(198, 77, 77, 0.08);
  color: #8f3434;
  font-weight: 760;
}

.naics-results {
  display: grid;
  gap: 10px;
}

.naics-results button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--slate);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.naics-results button:hover,
.naics-results button:focus-visible {
  border-color: rgba(47, 128, 101, 0.42);
  box-shadow: 0 12px 22px rgba(11, 36, 65, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.naics-results strong {
  color: var(--green);
  font-size: 0.94rem;
}

.naics-results span {
  color: var(--navy);
  font-weight: 760;
}

@keyframes aiPulse {
  0%, 100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

@keyframes smartfillSpin {
  to {
    transform: rotate(360deg);
  }
}

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

.mvp-form textarea {
  min-height: 92px;
}

.mvp-steps {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.empty-state {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 22px;
  border: 1px dashed rgba(47, 128, 101, 0.42);
  border-radius: 16px;
  background: var(--surface);
  color: var(--slate);
}

.empty-state strong {
  color: var(--navy);
}

.generation-gate {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid rgba(185, 120, 25, 0.28);
  border-radius: 14px;
  background: var(--amber-soft);
  color: var(--slate);
}

.generation-gate strong {
  color: var(--navy);
}

.generated-preview {
  display: grid;
  gap: 14px;
  max-height: 620px;
  overflow: auto;
  margin: 18px 0;
  padding-right: 6px;
}

.generated-preview section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.generated-preview h4 {
  margin: 0 0 8px;
}

.generated-preview p {
  margin: 0;
  white-space: pre-wrap;
}

.items-to-confirm {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid rgba(185, 120, 25, 0.28);
  border-radius: 14px;
  background: var(--amber-soft);
  color: var(--slate);
}

.items-to-confirm strong {
  color: var(--navy);
}

.items-to-confirm ul {
  margin: 0;
  padding-left: 18px;
}

.items-to-confirm li + li {
  margin-top: 4px;
}

.mvp-loading {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 22px;
  border-radius: 16px;
  background: var(--surface);
}

.mvp-metrics {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
}

.mvp-metrics .metric-card {
  min-height: 120px;
  padding: 16px;
  box-shadow: none;
}

.mvp-metrics .metric-card strong {
  font-size: 1.5rem;
}

.coming-soon-card {
  min-height: 360px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pipeline-strip,
  .wizard-progress {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .mvp-grid {
    grid-template-columns: 1fr;
  }

  .interactive-layout,
  .ai-guided-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(84vw, 310px);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  .app-shell.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .app-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 18;
    display: none;
    background: rgba(11, 36, 65, 0.42);
  }

  .app-shell.sidebar-open .app-drawer-backdrop {
    display: block;
  }

  .app-menu,
  .app-mobile-close {
    display: inline-grid;
  }

  .app-menu {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    color: var(--navy);
    cursor: pointer;
  }

  .app-menu span {
    width: 18px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  }

  .app-mobile-close {
    min-height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--slate);
    font-weight: 760;
  }

  .dashboard-grid,
  .workspace-grid,
  .financial-grid,
  .packet-layout,
  .overview-project-list,
  .overview-project-card,
  .review-queue-layout,
  .review-packet-preview,
  .settings-grid,
  .billing-history-row,
  .user-admin-row {
    grid-template-columns: 1fr;
  }

  .billing-history-row {
    align-items: start;
    gap: 8px;
  }

  .workspace-metrics,
  .review-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .auth-brand {
    position: static;
    justify-self: start;
  }

  .auth-shell {
    place-items: start stretch;
    align-content: start;
  }

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

  .app-content,
  .app-footer {
    width: min(100% - 28px, 1240px);
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .app-topbar {
    align-items: flex-start;
    padding: 14px;
  }

  .app-top-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .user-menu > button span:not(.avatar) {
    display: none;
  }

  .active-project-display {
    flex: 1 1 100%;
    min-width: min(220px, 100%);
  }

  .active-project-display strong {
    max-width: 100%;
  }

  .save-status {
    min-width: 0;
  }

  .app-section-head,
  .card-head,
  .workspace-title,
  .ai-orbital-panel,
  .analysis-progress {
    flex-direction: column;
  }

  .ai-progress-ring {
    width: 96px;
    height: 96px;
    flex-basis: 96px;
  }

  .workflow-actions,
  .mode-toggle {
    width: 100%;
  }

  .ai-bottom-action,
  .ai-related-values,
  .naics-search-row,
  .naics-results button {
    grid-template-columns: 1fr;
  }

  .metric-grid,
	  .pipeline-strip,
	  .payment-offer-grid,
	  .wizard-progress,
  .workspace-metrics,
  .overview-stat-grid,
  .overview-create-card,
  .logo-upload-card,
  .review-grid,
  .review-metrics,
  .review-document-row,
  .review-summary-values,
  .review-decision-form,
  .document-card,
  .document-history-row,
  .plan-grid,
  .admin-grid,
  .engine-grid,
  .form-grid,
  .user-admin-row,
	  .role-list {
	    grid-template-columns: 1fr;
	  }

  .app-modal {
    padding: 12px;
  }

  .payment-popover-card .modal-actions {
    position: static;
    margin: 18px 0 0;
    padding: 0;
    background: transparent;
  }

  .mvp-steps,
  .mvp-metrics,
  .review-summary-bar {
    grid-template-columns: 1fr;
  }

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

  .doc-item {
    grid-template-columns: 28px 1fr;
  }

  .doc-item em,
  .doc-item .text-button {
    grid-column: 2;
  }

  .packet-page {
    min-height: auto;
    padding: 26px;
  }

  .wizard-actions,
  .finding-actions {
    flex-direction: column;
  }

  .wizard-actions .btn,
  .finding-actions .btn {
    width: 100%;
  }
}
