:root {
  --bg: #f6f7f4;
  --bg-accent: #e5ece8;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-strong: rgba(255, 255, 255, 0.88);
  --border: rgba(44, 52, 52, 0.11);
  --text: #17201f;
  --muted: #5a6768;
  --accent: #0f5b57;
  --accent-alt: #2b5f8a;
  --accent-warm: #a46135;
  --accent-soft: #dcebe6;
  --shadow: 0 24px 60px rgba(24, 32, 29, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.86), transparent 30%),
    linear-gradient(160deg, var(--bg) 0%, #f8faf9 42%, var(--bg-accent) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(24, 79, 69, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 79, 69, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent 70%);
}

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

.topbar,
.hero-copy,
.panel,
.summary-card,
.feature-card,
.primary-button,
.primary-link,
.secondary-link {
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.brand-tagline {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ghost-link,
.secondary-link {
  color: var(--text);
  text-decoration: none;
}

.hero {
  padding-top: 10px;
}

.hero-copy {
  margin-top: 24px;
  padding: 44px;
  border-radius: calc(var(--radius-lg) + 8px);
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.56)),
    linear-gradient(135deg, rgba(15, 91, 87, 0.12), transparent 58%),
    linear-gradient(45deg, rgba(43, 95, 138, 0.09), transparent 65%);
  box-shadow: var(--shadow);
}

.eyebrow,
.section-label,
.card-label {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
}

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

h1 {
  max-width: 12ch;
  margin-bottom: 16px;
  font-size: 5.35rem;
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 2.65rem;
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.hero-text,
.panel p,
#tableCaption {
  color: var(--muted);
  line-height: 1.6;
}

.hero-text {
  max-width: 60ch;
  font-size: 1.05rem;
}

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

.primary-link,
.secondary-link,
.primary-button,
.secondary-button,
.section-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.primary-link,
.primary-button {
  background: var(--accent);
  color: white;
  box-shadow: 0 18px 28px rgba(24, 79, 69, 0.25);
}

.secondary-link {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.55);
}

.secondary-button {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.primary-link:hover,
.secondary-link:hover,
.primary-button:hover,
.secondary-button:hover,
.section-tab:hover {
  transform: translateY(-1px);
}

.section-grid,
.calculator-section,
.tool-suite,
.profile-strip,
.repo-section,
.professional-depth {
  margin-top: 28px;
}

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow);
}

.section-tab {
  min-height: 44px;
  border-color: transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.section-tab.is-active {
  background: var(--accent);
  color: white;
  box-shadow: 0 14px 24px rgba(15, 91, 87, 0.2);
}

.page-tab-panel[hidden] {
  display: none;
}

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

.metric {
  min-height: 132px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
}

.metric span {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}

.metric p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.repo-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.repo-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 91, 87, 0.3);
  background: rgba(255, 255, 255, 0.9);
}

.repo-card span {
  margin-bottom: 18px;
  color: var(--accent-alt);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.repo-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.depth-card {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.depth-card h3 {
  color: var(--accent);
}

.depth-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.58;
}

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.tool-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.tool-tab:hover {
  transform: translateY(-1px);
}

.tool-tab.is-active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.tool-panel[hidden] {
  display: none;
}

.section-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.intro-panel,
.summary-panel,
.insights-panel,
.table-panel {
  padding: 28px;
}

.feature-panel {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.feature-card {
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  border: 1px solid rgba(24, 79, 69, 0.1);
}

.muted-card {
  background: rgba(43, 95, 138, 0.08);
}

.section-header {
  margin-bottom: 18px;
}

.calculator-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.form-panel {
  padding: 24px;
}

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

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

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

.field input {
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(24, 79, 69, 0.13);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  font: inherit;
}

.field select {
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(24, 79, 69, 0.13);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  font: inherit;
}

.field input:focus {
  outline: 2px solid rgba(24, 79, 69, 0.2);
  border-color: var(--accent);
}

.field select:focus {
  outline: 2px solid rgba(24, 79, 69, 0.2);
  border-color: var(--accent);
}

.results-column {
  display: grid;
  gap: 20px;
}

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

.summary-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  border: 1px solid rgba(24, 79, 69, 0.1);
}

.summary-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.summary-card strong,
.insight-row strong {
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.insights-panel {
  display: grid;
  gap: 18px;
}

.insight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(24, 79, 69, 0.1);
}

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

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

.table-wrap {
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(24, 79, 69, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
  background: rgba(255, 255, 255, 0.72);
}

thead {
  background: rgba(24, 79, 69, 0.08);
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(24, 79, 69, 0.08);
  font-size: 0.95rem;
}

tbody tr:hover {
  background: rgba(24, 79, 69, 0.04);
}

.chart-panel {
  padding: 28px;
}

.chart-shell {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(24, 79, 69, 0.1);
  background: rgba(255, 255, 255, 0.62);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-swatch {
  display: inline-block;
  width: 24px;
  height: 3px;
  border-radius: 999px;
}

.swatch-low {
  background: #8aa99d;
}

.swatch-base {
  background: #0f5b57;
}

.swatch-high {
  background: #b86d3b;
}

#growthChart {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 920px) {
  .section-grid,
  .calculator-layout,
  .profile-strip,
  .repo-grid,
  .depth-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 30px 24px;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
  }

  .topbar {
    padding: 14px 16px;
  }

  .topbar,
  .table-header,
  .hero-actions,
  .topbar-links,
  .section-tabs {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-tabs {
    border-radius: var(--radius-md);
  }

  .field-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: none;
    font-size: 3rem;
  }

  h2 {
    font-size: 2rem;
  }

  .intro-panel,
  .summary-panel,
  .insights-panel,
  .table-panel,
  .form-panel {
    padding: 20px;
  }

  .brand-name {
    font-size: 0.88rem;
  }
}
