:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #17212f;
  --muted: #637083;
  --line: #dde3ec;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --warn: #b45309;
  --danger: #b91c1c;
  --ok: #15803d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

.shell-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  padding: 14px clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: #17212f;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  width: 38px;
}

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

.top-nav,
.header-actions,
.footer nav,
.hero-actions,
.inline-form {
  align-items: center;
  display: flex;
  gap: 12px;
}

.top-nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.header-actions {
  justify-content: flex-end;
}

.button,
button {
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.button.ghost,
button.ghost {
  background: #fff;
  color: var(--ink);
}

select,
input,
textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  margin-top: 6px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.sr-only,
.hidden-field {
  height: 1px;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}

.flash-stack {
  margin: 18px auto 0;
  max-width: 960px;
  padding: 0 18px;
}

.flash-stack p {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  margin: 0 0 8px;
  padding: 12px 14px;
}

.hero {
  display: grid;
  gap: clamp(28px, 6vw, 72px);
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  min-height: 560px;
  padding: clamp(56px, 8vw, 108px) clamp(18px, 5vw, 72px) 48px;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 82px);
  letter-spacing: 0;
  line-height: 0.98;
  margin: 8px 0 22px;
  max-width: 860px;
}

.hero p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 760px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-panel,
.summary-panel,
.auth-card,
.event-log {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(23, 33, 47, 0.08);
}

.hero-panel {
  align-self: center;
  padding: 24px;
}

.metric {
  border-bottom: 1px solid var(--line);
  display: grid;
  padding-bottom: 24px;
}

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

.metric span,
.hint,
.muted {
  color: var(--muted);
}

.workflow-strip {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.workflow-strip span {
  background: #eef6f5;
  border: 1px solid #cde5e2;
  border-radius: 8px;
  padding: 14px;
}

.section-grid,
.contact-band,
.legal-page,
.auth-shell,
.workspace {
  padding: 48px clamp(18px, 5vw, 72px);
}

.section-grid {
  background: #fff;
  display: grid;
  gap: 24px;
  grid-template-columns: 0.8fr 1.2fr;
}

.steps {
  display: grid;
  gap: 12px;
  margin: 0;
}

.steps li {
  background: #f8fafc;
  border-left: 4px solid var(--accent);
  padding: 16px;
}

.contact-band {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: 0.8fr 1.2fr;
}

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

.stacked-form.wide {
  max-width: 900px;
}

.auth-shell {
  display: grid;
  min-height: 620px;
  place-items: center;
}

.auth-card {
  display: grid;
  gap: 16px;
  max-width: 440px;
  padding: 28px;
  width: 100%;
}

.workspace {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: 220px minmax(0, 1fr);
}

.sidebar {
  background: #17212f;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
  position: sticky;
  top: 86px;
}

.sidebar a {
  border-radius: 7px;
  color: #d9e2ef;
  padding: 12px;
  text-decoration: none;
}

.sidebar a.active,
.sidebar a:hover {
  background: #263447;
  color: #fff;
}

.workspace-main {
  min-width: 0;
}

.page-heading {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

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

th {
  color: var(--muted);
  font-size: 13px;
}

.risk {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.risk.low {
  background: #dcfce7;
  color: var(--ok);
}

.risk.medium {
  background: #fef3c7;
  color: var(--warn);
}

.risk.high,
.risk.critical {
  background: #fee2e2;
  color: var(--danger);
}

.report-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 0.8fr) minmax(280px, 1.2fr);
  margin-bottom: 28px;
}

.summary-panel {
  padding: 22px;
}

.score {
  display: block;
  font-size: 64px;
  font-weight: 900;
}

.event-log {
  margin-top: 28px;
  padding: 18px;
}

.event-log p {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 10px 0;
}

.empty-state {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.ad-slot {
  margin: 28px auto;
  max-width: 960px;
  padding: 12px 18px;
  text-align: center;
}

.footer {
  background: #17212f;
  color: #d9e2ef;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 24px clamp(18px, 5vw, 72px);
}

@media (max-width: 860px) {
  .shell-header,
  .hero,
  .section-grid,
  .contact-band,
  .workspace,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .shell-header {
    position: static;
  }

  .top-nav,
  .header-actions,
  .footer {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .sidebar {
    position: static;
  }

  .hero {
    min-height: auto;
  }
}
