:root {
  --bg: #f3f6f4;
  --panel: #ffffff;
  --panel-soft: #f8fbf9;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --green: #16a34a;
  --green-dark: #15803d;
  --green-soft: #ecfdf3;
  --red: #b42318;
  --red-soft: #fef3f2;
  --shadow: 0 20px 50px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, #f8fbf9 0%, #f3f6f4 100%);
}

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

.hidden {
  display: none !important;
}

.topbar,
.hero-panel,
.feature-card,
.step-card,
.auth-card,
.stat-card,
.data-card,
.panel,
.output,
.hero-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  border-radius: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin-bottom: 28px;
}

.topbar.compact {
  margin-bottom: 20px;
}

.brand,
.brand-link {
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #0a7a33;
}

.topbar-actions,
.hero-actions,
.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.button,
button,
.primary-link,
.ghost-link,
.copy-link {
  font: inherit;
}

.button,
button,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  padding: 12px 18px;
  font-weight: 600;
}

.button.solid,
button,
.primary-link {
  background: var(--green);
  color: #fff;
}

.button.light,
.ghost-link {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button.wide {
  width: 100%;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 12px 18px;
}

.marketing-shell,
.auth-shell,
.dashboard-shell,
.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.hero-block {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-copy h1,
.dashboard-header h1 {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 4vw, 4.8rem);
  line-height: 1;
}

.kicker,
.eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0a7a33;
  font-weight: 700;
}

.hero-text,
.lede,
.section-title p,
.helper-text,
.otp-target,
.auth-head p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-panel {
  padding: 20px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.metric-card,
.stat-card {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.metric-card span,
.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.metric-card strong,
.stat-card strong {
  font-size: 1.05rem;
}

.feature-grid,
.step-grid,
.dashboard-grid,
.data-grid,
.grid,
.output-grid {
  display: grid;
  gap: 18px;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 28px;
}

.feature-card,
.step-card {
  padding: 22px;
}

.feature-card h2,
.data-card h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.feature-card p,
.step-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.steps {
  padding: 24px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 0 0 8px;
}

.step-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-card span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  margin-bottom: 14px;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: min(420px, 100%);
  padding: 32px;
}

.auth-head {
  text-align: center;
  margin-bottom: 20px;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 6px;
  border-radius: 18px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  margin-bottom: 18px;
}

.mode-button {
  background: transparent;
  color: var(--muted);
  border: 0;
}

.mode-button.active {
  background: var(--green);
  color: #fff;
}

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

.input-group {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.input-group span {
  padding: 0 14px;
  color: var(--muted);
  border-right: 1px solid var(--line);
}

label {
  display: block;
  font-size: 0.94rem;
  color: var(--ink);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 13px 14px;
  margin-top: 8px;
  font: inherit;
}

.input-group input {
  border: 0;
  margin: 0;
}

textarea {
  resize: vertical;
}

.flash {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 16px;
  font-size: 0.94rem;
}

.flash.error {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid #fecdca;
}

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

.dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.data-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.data-card,
.panel,
.output {
  padding: 20px;
}

.card-head,
.panel-head,
.output-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.card-head h2,
.panel-head h2,
.output-head h3 {
  margin: 0;
}

.copy-link {
  background: none;
  border: 0;
  color: #0a7a33;
  cursor: pointer;
  padding: 0;
}

pre {
  margin: 0;
  padding: 16px;
  min-height: 220px;
  max-height: 520px;
  overflow: auto;
  border-radius: 18px;
  background: #111827;
  color: #f9fafb;
  font-size: 0.86rem;
  line-height: 1.55;
  font-family: Consolas, Menlo, monospace;
}

.grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.secondary,
.output-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.output.wide {
  grid-column: span 2;
}

.pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--green-soft);
  color: #0a7a33;
  font-size: 0.88rem;
  font-weight: 700;
}

@media (max-width: 920px) {
  .hero-block,
  .feature-grid,
  .step-grid,
  .dashboard-grid,
  .data-grid,
  .grid,
  .secondary,
  .output-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header,
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .output.wide {
    grid-column: span 1;
  }
}
