:root {
  color-scheme: light;
  --ink: #10131a;
  --ink-soft: #2c3240;
  --slate: #545e70;
  --mist: #e6e6ea;
  --surface: #ffffff;
  --surface-alt: #f5f1f0;
  --accent: #c62828;
  --accent-deep: #8e1e1e;
  --teal: #ff8f00;
  --amber: #f4b740;
  --green: #2e7d32;
  --shadow: 0 20px 60px rgba(14, 16, 22, 0.14);
  --radius: 18px;
  --font-display: "Space Grotesk", "Satoshi", "Avenir Next", sans-serif;
  --font-body: "IBM Plex Sans", "Manrope", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at top left, #fff0ea 0%, #f7f5f2 40%, #ffffff 100%);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
}

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

main {
  padding: 0 48px 80px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(198, 40, 40, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(198, 40, 40, 0.05) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: radial-gradient(circle at 20% 10%, rgba(0, 0, 0, 0.8), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

header,
main,
footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  gap: 24px;
  flex-wrap: wrap;
}

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

.brand-mark {
  height: 48px;
  width: 48px;
  background: linear-gradient(135deg, var(--accent), #ff6f00);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: var(--font-display);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(198, 40, 40, 0.35);
}

.brand-title {
  font-size: 20px;
  font-family: var(--font-display);
  font-weight: 700;
}

.brand-subtitle {
  color: var(--slate);
  font-size: 14px;
}

.top-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-item {
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
  border-color: var(--ink);
  color: var(--ink);
}

.top-actions {
  display: flex;
  gap: 12px;
}

button {
  font-family: var(--font-body);
}

.primary,
.ghost {
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary {
  border: none;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(198, 40, 40, 0.35);
}

.primary:hover {
  background: var(--accent-deep);
}

.ghost {
  border: 1px solid var(--mist);
  background: var(--surface);
  color: var(--ink);
}

.ghost:hover {
  border-color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  padding-top: 16px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 12px;
  color: var(--slate);
  margin-bottom: 12px;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
  margin-bottom: 18px;
}

.hero-copy {
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 24px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.hero-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-display);
}

.stat-label {
  font-size: 13px;
  color: var(--slate);
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card.large {
  min-height: 320px;
}

.card.stack {
  margin-top: 20px;
}

.card-header,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-footer {
  margin-top: auto;
}

.card-title {
  font-weight: 700;
  font-size: 18px;
}

.card-subtitle {
  color: var(--slate);
  font-size: 14px;
}

.card-body {
  color: var(--ink-soft);
  line-height: 1.5;
}

.card-footnote {
  color: var(--slate);
  font-size: 13px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 8px;
}

.section-actions {
  display: flex;
  gap: 12px;
}

.grid-3,
.grid-4,
.grid-2 {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.list li {
  background: var(--surface-alt);
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}

.pill {
  background: var(--mist);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pill.amber {
  background: rgba(244, 183, 64, 0.2);
  color: #9f6b00;
}

.pill.green {
  background: rgba(53, 181, 106, 0.2);
  color: #1f7b44;
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--mist);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-soft);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--mist);
  color: var(--ink);
}

.status.green {
  background: rgba(46, 125, 50, 0.15);
  color: #1f5a2b;
}

.status.amber {
  background: rgba(255, 143, 0, 0.18);
  color: #9a5a00;
}

.status.red {
  background: rgba(198, 40, 40, 0.15);
  color: #7f1c1c;
}

.status.neutral {
  background: rgba(84, 94, 112, 0.12);
  color: #3c4250;
}

.chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  align-items: end;
  height: 160px;
  margin-top: 12px;
}

.chart-bar {
  background: linear-gradient(180deg, var(--accent), #ff8f00);
  border-radius: 12px;
  height: var(--h);
  animation: rise 1s ease;
}

@keyframes rise {
  from {
    height: 0;
  }
  to {
    height: var(--h);
  }
}

.table-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search,
.input,
.select {
  border: 1px solid var(--mist);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 220px;
  font-size: 14px;
  background: #fff;
}

th,
td {
  text-align: left;
  padding: 10px 6px;
  font-size: 14px;
  border-bottom: 1px solid var(--mist);
}

tr:last-child td {
  border-bottom: none;
}

.progress {
  background: var(--mist);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--accent), #ffa66d);
  height: 100%;
}

.timeline {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 14px;
}

.metric {
  font-family: var(--font-display);
  font-size: 32px;
}

.pipeline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: center;
}

.form-grid {
  display: grid;
  gap: 12px;
  width: 100%;
}

.form-grid > * {
  width: 100%;
  max-width: 100%;
}

input,
select,
textarea,
button {
  max-width: 100%;
}


.map-embed {
  border: 1px solid var(--mist);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  height: 220px;
}

.map-embed img {
  display: block;
  width: 100%;
  height: auto;
}

.footer {
  padding: 24px 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--slate);
}

.footer-links {
  display: flex;
  gap: 12px;
}

.footer a {
  color: var(--ink);
  text-decoration: none;
}

@media (max-width: 900px) {
  .topbar {
    padding: 20px 24px;
  }

  main {
    padding: 0 24px 60px;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero-right {
    order: 2;
  }
}

@media (max-width: 720px) {
  .top-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .section-actions {
    width: 100%;
  }

  .top-actions {
    justify-content: flex-start;
  }

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

  table {
    min-width: 560px;
  }

  .hero-stats {
    gap: 12px;
  }
}
