:root {
  --bg: #f4f6f5;
  --panel: #ffffff;
  --panel-soft: #f8fbfa;
  --ink: #111827;
  --muted: #667085;
  --line: #d9e1dd;
  --dark: #111827;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --warn: #b7791f;
  --danger: #b42318;
  --good: #168653;
  --shadow: 0 16px 44px rgba(17, 24, 39, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

a { color: inherit; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  background: var(--dark);
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 44px;
  height: 44px;
  display: block;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 10px 26px rgba(0, 0, 0, .28);
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup span {
  color: #b9c7bd;
  font-size: 13px;
}

nav {
  display: grid;
  gap: 6px;
}

nav a {
  color: #cbd5d1;
  text-decoration: none;
  padding: 10px 11px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
}

nav a.active,
nav a:hover {
  background: #23312d;
  color: white;
}

.sidebar-card {
  margin-top: auto;
  border: 1px solid #344054;
  border-radius: 8px;
  padding: 12px;
}

.sidebar-card span {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .08em;
  color: #90e0cf;
}

.sidebar-card p {
  margin: 6px 0 0;
  color: #cbd5d1;
  font-size: 13px;
}

.app {
  margin-left: 250px;
  padding: 22px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

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

.topbar h1 {
  font-size: 30px;
  margin-bottom: 0;
}

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

.top-actions span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.kicker,
.eyebrow {
  display: block;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 8px;
}

.page {
  display: none;
}

.page.active {
  display: grid;
  gap: 16px;
}

.panel,
.hero-panel,
.price-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: center;
  min-height: 260px;
}

.hero-panel h2 {
  font-size: 34px;
  line-height: 1.12;
  max-width: 800px;
  margin-bottom: 12px;
}

.hero-panel p {
  max-width: 760px;
}

p,
li {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.hero-actions a,
button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  padding: 11px 14px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.hero-actions a:hover {
  background: var(--accent-dark);
}

button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.secondary,
.secondary-link {
  background: #eef3f1;
  color: var(--ink);
}

.secondary:hover,
.secondary-link:hover {
  background: #dce7e3;
}

.metric-panel {
  display: grid;
  gap: 10px;
}

.metric-panel div,
.metric-strip div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 13px;
}

.metric-panel strong {
  display: block;
  font-size: 34px;
}

.metric-panel span,
.metric-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.grid-3,
.trust-strip,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.trust-card {
  box-shadow: none;
  border-left: 4px solid var(--accent);
}

.trust-card strong {
  display: block;
  margin-bottom: 6px;
}

.split {
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 16px;
  align-items: start;
}

.input-panel {
  position: sticky;
  top: 22px;
}

form,
.results-panel,
.problem-list,
.report-list {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
}

textarea {
  min-height: 330px;
  resize: vertical;
}

.note-label textarea {
  min-height: 84px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(15, 118, 110, .18);
  border-color: var(--accent);
}

.actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.actions.tight {
  grid-template-columns: auto auto;
}

.standard-box,
.notice.visible {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.standard-box p,
.notice p {
  margin-bottom: 0;
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.loading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 4px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.summary,
.section-head,
.problem-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.problem {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid #344054;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.problem.critical {
  border-top-color: var(--danger);
}

.problem.warning {
  border-top-color: var(--warn);
}

.problem.healthy {
  border-top-color: var(--good);
}

.problem-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.problem-head strong {
  background: #ecf3f1;
  border-radius: 8px;
  padding: 8px 10px;
  white-space: nowrap;
}

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

.grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.live-grid,
.trust-grid,
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.workspace-card-wide {
  grid-column: 1 / -1;
}

.live-report {
  display: grid;
  gap: 16px;
}

.level-wrap {
  display: grid;
  gap: 7px;
  min-width: 240px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.level {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #dfe5df;
  overflow: hidden;
}

.level div {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--warn));
  transition: width .12s linear;
}

.issue-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.issue-buttons button {
  min-height: 48px;
  background: #eef3f1;
  color: var(--ink);
  border: 1px solid var(--line);
}

.issue-buttons button:hover {
  background: var(--accent);
  color: white;
}

.alert-list,
.member-list {
  display: grid;
  gap: 10px;
}

.live-alert,
.member {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 10px;
}

.live-alert {
  border-left: 4px solid var(--warn);
}

.live-alert.critical {
  border-left-color: var(--danger);
}

.live-alert.healthy {
  border-left-color: var(--good);
}

.live-alert span,
.member span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.timeline {
  min-height: 260px;
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.timeline p {
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 8px 0;
}

.timeline p.critical {
  color: var(--danger);
  font-weight: 800;
}

.timeline p.warning {
  color: #82510f;
}

.timeline p.healthy {
  color: var(--good);
}

.session-copy {
  margin-top: 12px;
}

.report-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

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

.price-card.featured {
  border: 2px solid var(--accent);
}

.price-card strong {
  font-size: 32px;
}

.price-card ul {
  margin-top: 0;
  padding-left: 20px;
}

.integration-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.integration-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
}

.checkout-success {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.checkout-success .panel {
  max-width: 620px;
}

.success-link {
  display: inline-block;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  padding: 11px 14px;
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 1080px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .app {
    margin-left: 0;
  }

  nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-panel,
  .split,
  .grid-3,
  .trust-strip,
  .pricing-grid,
  .live-grid,
  .trust-grid,
  .workspace-grid,
  .grid,
  .issue-buttons {
    grid-template-columns: 1fr;
  }

  .input-panel {
    position: static;
  }
}
