:root {
  --bg: #f3f0ea;
  --ink: #111624;
  --text: #232938;
  --muted: #667085;
  --line: #d9d2c4;
  --surface: #ffffff;
  --soft: #eee8dd;
  --navy: #111827;
  --blue: #2457d6;
  --blue-dark: #193f9f;
  --green: #087f6e;
  --teal: #0f766e;
  --plum: #483248;
  --gold: #b8832f;
  --coral: #c45f4b;
  --shadow-sm: 0 10px 28px rgba(43, 36, 28, 0.09);
  --shadow: 0 30px 90px rgba(43, 36, 28, 0.17);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}

html,
body {
  width: 100%;
  max-width: 100%;
}

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

.site-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 24%, rgba(8, 127, 110, 0.16), transparent 31%),
    radial-gradient(circle at 8% 76%, rgba(184, 131, 47, 0.14), transparent 29%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.94), rgba(243, 240, 234, 0.98)),
    linear-gradient(90deg, #fff8ea 0%, #f8fbf9 50%, #e9f3ee 100%);
}

.topbar,
.hero,
.section {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
}

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

.brand-mark,
.module-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(145deg, #101827, #26314a);
  color: #fff;
  font-weight: 900;
}

.module-icon {
  background: #ede5d8;
  color: var(--plum);
}

.topbar-actions,
.hero-actions,
.panel-actions,
.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  color: #4d5567;
  font-size: 0.95rem;
  font-weight: 750;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 850;
  white-space: nowrap;
}

.btn.primary {
  border-color: #1d4ed8;
  background: linear-gradient(180deg, #2f68e8, #1947b8);
  color: #fff;
  box-shadow: 0 14px 30px rgba(31, 78, 216, 0.24);
}

.btn.primary:hover {
  background: var(--blue-dark);
}

.btn.ghost {
  background: rgba(255, 253, 248, 0.86);
  color: var(--navy);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(410px, 0.72fr);
  align-items: center;
  gap: clamp(32px, 6vw, 76px);
  min-height: calc(100vh - 80px);
  padding: 48px 0 72px;
}

.hero-copy,
.portal-preview,
.module-card,
.workspace,
.hero-panel,
.status-panel,
.module-table,
.module-row,
.preview-module {
  min-width: 0;
}

.eyebrow,
.small-label {
  display: block;
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.small-label {
  color: #7b6f61;
  letter-spacing: 0.06em;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(3rem, 6.4vw, 6.1rem);
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.lead {
  max-width: 680px;
  margin: 24px 0;
  color: #4f596b;
  font-size: 1.18rem;
  line-height: 1.65;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 650px;
  margin: 30px 0 0;
}

.hero-metrics div {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.76);
}

.hero-metrics dt {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 900;
}

.hero-metrics dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.portal-preview,
.hero-panel,
.status-panel,
.module-table,
.module-card,
.proof-strip article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow-sm);
}

.portal-preview {
  display: grid;
  gap: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.preview-header,
.preview-footer,
.card-top,
.table-head,
.status-row,
.module-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preview-header strong,
.preview-footer strong {
  color: var(--navy);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #ded5c5;
  border-radius: 999px;
  background: #f7f3ea;
  color: #625a4f;
  font-size: 0.78rem;
  font-weight: 850;
}

.status-pill.ok {
  border-color: #b7dfd4;
  background: #eaf7f3;
  color: #087060;
}

.preview-search {
  min-height: 48px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #faf7f1;
  color: var(--muted);
  font-weight: 750;
}

.preview-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbc08d;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff8eb, #fffaf3);
}

.preview-alert > span {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--gold);
}

.preview-alert strong {
  color: var(--navy);
}

.preview-alert p {
  margin: 3px 0 0;
  color: #746344;
  font-size: 0.92rem;
}

.preview-modules,
.module-list {
  display: grid;
  gap: 10px;
}

.preview-module,
.module-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdfa;
}

.preview-module.featured {
  border-color: #b8cbc5;
  background: linear-gradient(180deg, #ffffff, #f2faf7);
}

.preview-module p,
.module-card p,
.hero-panel p,
.module-row p,
.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.preview-footer {
  min-height: 48px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.95rem;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 72px;
}

.proof-strip article {
  padding: 22px;
}

.proof-strip span {
  color: var(--coral);
  font-weight: 900;
}

.proof-strip strong {
  display: block;
  margin: 12px 0 8px;
  color: var(--navy);
  font-size: 1.08rem;
}

.proof-strip p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.section {
  padding: 0 0 88px;
}

.section-head {
  max-width: 720px;
  margin-bottom: 24px;
}

.section h2,
.workspace h1,
.workspace h2 {
  margin: 0;
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.section h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.section-head p {
  margin-top: 14px;
  font-size: 1.04rem;
}

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

.module-card {
  min-height: 250px;
  padding: 22px;
}

.module-card.active {
  border-color: #b8cbc5;
  box-shadow: var(--shadow);
}

.module-card h3 {
  margin: 36px 0 10px;
  color: var(--navy);
  font-size: 1.35rem;
}

.compact-section {
  padding-bottom: 72px;
}

.audit-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(72, 50, 72, 0.62), transparent 45%),
    linear-gradient(180deg, #111827, #172033);
  color: #fff;
  box-shadow: var(--shadow);
}

.audit-panel .eyebrow {
  color: #8ee2d2;
}

.audit-panel h2 {
  color: #fff;
}

.audit-panel ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audit-panel li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: #d9e2f1;
  font-weight: 750;
}

.audit-panel li span {
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border-radius: 999px;
  background: #8ee2d2;
}

.app-shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 12%, rgba(8, 127, 110, 0.11), transparent 28%),
    linear-gradient(180deg, #f7f4ee, #edf1f2),
    #f4f0e8;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
}

.side-nav {
  display: grid;
  gap: 6px;
  margin-top: 34px;
}

.side-nav a {
  min-height: 42px;
  padding: 11px 12px;
  border-radius: var(--radius);
  color: #526078;
  font-weight: 800;
}

.side-nav a.active {
  background: #e7f3ef;
  color: var(--teal);
}

.hero-panel {
  background:
    linear-gradient(135deg, rgba(8, 127, 110, 0.08), transparent 44%),
    #fffdfa;
}

.workspace {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.workspace-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.workspace h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.55fr);
  gap: 16px;
  margin-top: 22px;
}

.hero-panel,
.status-panel,
.module-table {
  padding: 24px;
}

.hero-panel h2 {
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 3.7rem);
}

.hero-panel p {
  max-width: 720px;
  margin: 18px 0 22px;
  font-size: 1.04rem;
}

.status-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.panel-title h2 {
  margin-top: 0;
}

.status-panel h2,
.table-head h2 {
  font-size: 1.3rem;
}

.status-row {
  min-height: 56px;
  border-bottom: 1px solid #e8dfd2;
}

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

.status-row span {
  color: var(--muted);
}

.module-table {
  margin-top: 16px;
}

.insight-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.insight-strip article {
  min-height: 94px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdfa;
  box-shadow: var(--shadow-sm);
}

.insight-strip span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.insight-strip strong {
  color: var(--navy);
  font-size: 1.1rem;
}

.table-head {
  margin-bottom: 16px;
}

.module-row {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.module-row strong {
  color: var(--navy);
  font-size: 1.05rem;
}

@media (max-width: 920px) {
  .hero,
  .proof-strip,
  .module-grid,
  .dashboard-grid,
  .audit-panel,
  .insight-strip {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .side-nav {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .site-shell,
  .app-shell {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .topbar,
  .hero,
  .section,
  .proof-strip {
    width: calc(100vw - 40px);
    max-width: 350px;
    margin: 0 0 0 20px;
    padding-left: 0;
    padding-right: 0;
  }

  .topbar,
  .workspace-top,
  .table-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions,
  .hero-actions,
  .panel-actions,
  .user-menu {
    width: 100%;
  }

  .topbar-actions {
    display: flex;
    flex-direction: column;
  }

  .topbar-actions .nav-link {
    width: 100%;
    min-height: 32px;
  }

  .topbar-actions .btn,
  .hero-actions .btn,
  .panel-actions .btn,
  .user-menu .btn {
    flex: 1 1 100%;
  }

  .hero h1 {
    width: 100%;
    max-width: 350px;
    font-size: 2.35rem;
    line-height: 1.02;
  }

  .hero-copy,
  .lead,
  .section-head,
  .section-head p,
  .hero-panel p,
  .module-row p,
  .preview-module p,
  .audit-panel {
    width: 100%;
    max-width: 350px;
  }

  .hero {
    gap: 28px;
    padding-top: 30px;
  }

  .lead {
    font-size: 1.02rem;
  }

  .portal-preview,
  .hero-panel,
  .status-panel,
  .module-table,
  .audit-panel {
    width: 100%;
    max-width: 100%;
    padding: 16px;
  }

  .hero-panel h2 {
    width: 100%;
    max-width: 318px;
    font-size: 1.62rem;
    line-height: 1.08;
  }

  .preview-module,
  .module-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .preview-module > span:last-child,
  .module-row .status-pill,
  .module-row .btn {
    grid-column: 1 / -1;
  }

  .workspace {
    width: calc(100vw - 28px);
    max-width: 362px;
    margin: 0;
    padding: 20px 14px 42px;
  }

  .workspace-top {
    min-height: 0;
  }

  .side-nav a {
    flex: 1 1 auto;
  }

  .side-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow-x: hidden;
  }

  .module-grid,
  .proof-strip,
  .hero-metrics,
  .insight-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .preview-header,
  .preview-footer,
  .status-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
