:root {
  --brand-teal: #1b6875;
  --brand-teal-hover: #137f8b;
  --brand-teal-dark: #0f4a55;
  --brand-green: #a9c23f;
  --brand-green-dark: #8aa831;
  --home-bg: #f4f8f9;
  --home-text: #12343a;
  --home-muted: #53777f;
  --home-border: #cfe4e8;
  --card-radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--home-text);
  background: #f0f6f8;
}

/* ── Header ─────────────────────────────────────────── */

.home-header {
  background: var(--brand-teal);
  border-bottom: 3px solid var(--brand-teal-dark);
  padding: 0.75rem 1.5rem;
}

.home-header-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-logo {
  height: 36px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.demo-env-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.demo-env-badge i {
  font-size: 0.72rem;
  opacity: 0.9;
}

/* ── Main wrapper ────────────────────────────────────── */

.home-wrapper {
  min-height: calc(100vh - 120px);
  padding: 2.75rem 1.25rem 2.5rem;
}

.home-container {
  max-width: 1160px;
  margin: 0 auto;
}

/* ── Hero ────────────────────────────────────────────── */

.hero {
  margin-bottom: 1.5rem;
}

.hero-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-teal);
}

.hero-copy h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--brand-teal-dark, #0f4a55);
}

.hero-lead {
  margin: 0;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  color: var(--home-muted);
  max-width: 60ch;
  line-height: 1.65;
}

/* ── Demo notice ─────────────────────────────────────── */

.demo-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--home-border);
  border-left: 4px solid var(--brand-green);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 2.25rem;
  box-shadow: 0 2px 8px rgba(19, 59, 66, 0.06);
}

.demo-notice-icon {
  color: var(--brand-green-dark, #8aa831);
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.demo-notice-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.demo-notice-copy strong {
  color: #1a4a32;
  font-size: 0.88rem;
  font-weight: 700;
}

.demo-notice-copy span {
  color: #3d5a40;
  font-size: 0.84rem;
  line-height: 1.5;
}

/* ── Test mode panel ─────────────────────────────────── */

.test-mode-panel {
  display: grid;
  gap: 1.2rem;
  background: #f0f7f9;
  border: 2px solid #a8cdd5;
  border-radius: 18px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 28px rgba(19, 59, 66, 0.12);
}

.test-mode-copy {
  display: grid;
  gap: 0.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #c4dde3;
}

.test-mode-eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-teal);
}

.test-mode-copy h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--home-text);
}

.test-mode-lead {
  margin: 0;
  color: var(--home-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.test-mode-radio-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.test-mode-option {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border: 2px solid #c8dde3;
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 2px 8px rgba(19, 59, 66, 0.06);
}

.test-mode-option:has(input:checked) {
  border-color: var(--brand-teal);
  background: #e8f5f7;
  box-shadow: 0 4px 14px rgba(27, 104, 117, 0.14);
}

.test-mode-option input {
  margin-top: 0.22rem;
  accent-color: var(--brand-teal);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.test-mode-option span {
  display: grid;
  gap: 0.25rem;
}

.test-mode-option strong {
  color: #0d3d45;
  font-size: 0.96rem;
  font-weight: 700;
}

.test-mode-option small {
  color: var(--home-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.test-mode-rules {
  border: 2px solid #dde9ec;
  border-left: 4px solid var(--brand-teal);
  border-radius: 12px;
  background: #ffffff;
  padding: 1rem 1.15rem;
  box-shadow: 0 2px 8px rgba(19, 59, 66, 0.05);
}

.test-user-panel {
  border: 2px solid #dde9ec;
  border-left: 4px solid var(--brand-green);
  border-radius: 12px;
  background: #ffffff;
  padding: 1rem 1.15rem;
  box-shadow: 0 2px 8px rgba(19, 59, 66, 0.05);
}

.test-mode-rules h3,
.test-user-panel h3 {
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #0d3d45;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e6eef1;
}

.test-mode-rule-list {
  margin: 0;
  padding-left: 1.15rem;
  color: #3d5a62;
  font-size: 0.87rem;
  line-height: 1.7;
}

.test-mode-rule-list li + li {
  margin-top: 0.25rem;
}

.test-user-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.test-user-item {
  display: grid;
  gap: 0.3rem;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  background: #f4f9fb;
  border: 1px solid #c8dde3;
  box-shadow: 0 1px 4px rgba(19, 59, 66, 0.07);
}

.test-user-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-teal);
  font-weight: 700;
}

.test-user-item strong {
  color: #0d3d45;
  font-size: 0.95rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* ── Section intro ───────────────────────────────────── */

.section-intro {
  margin-bottom: 1.1rem;
}

.section-intro-heading {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--home-text);
}

.section-intro-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--home-muted);
  max-width: 72ch;
  line-height: 1.55;
}

/* ── Flow grid ───────────────────────────────────────── */

.flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

/* ── Flow card ───────────────────────────────────────── */

.flow-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border-radius: var(--card-radius);
  border: 1px solid var(--home-border);
  padding: 1.4rem 1.4rem 1.2rem;
  min-height: 260px;
  box-shadow: 0 4px 16px rgba(19, 59, 66, 0.07);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.flow-card:hover {
  box-shadow: 0 8px 28px rgba(19, 59, 66, 0.13);
  transform: translateY(-2px);
  border-color: #b0d4da;
}

.flow-card-top {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex: 1;
  margin-bottom: 1.1rem;
}

.flow-card-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #e6f2f4;
  border: 1px solid #c8e2e8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-teal);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.flow-card h3 {
  margin: 0.3rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0d3d45;
  line-height: 1.3;
}

.flow-card p {
  margin: 0;
  color: #55757d;
  font-size: 0.88rem;
  line-height: 1.6;
}

.flow-tag {
  width: fit-content;
  background: #eaf4f5;
  border: 1px solid #cfe1e5;
  color: #336973;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ── Flow link (CTA button) ──────────────────────────── */

.flow-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: fit-content;
  text-decoration: none;
  color: #ffffff;
  background: var(--brand-teal);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background-color 0.15s ease, transform 0.15s ease, gap 0.15s ease;
}

.flow-link i {
  font-size: 0.78rem;
  transition: transform 0.15s ease;
}

.flow-link:hover,
.flow-link:focus-visible {
  background: var(--brand-teal-hover);
  gap: 0.6rem;
}

.flow-link:hover i,
.flow-link:focus-visible i {
  transform: translateX(3px);
}

.flow-link:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
}

.flow-link-disabled {
  background: #7f9499;
  cursor: not-allowed;
}

/* ── Footer ──────────────────────────────────────────── */

.home-footer {
  border-top: 1px solid var(--home-border);
  background: #eaf2f4;
  padding: 1rem 1.5rem;
}

.home-footer-inner {
  max-width: 1160px;
  margin: 0 auto;
}

.home-footer-inner p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--home-muted);
}

/* ── Utility ─────────────────────────────────────────── */

.home-note {
  margin-top: 1.4rem;
  border-left: 4px solid var(--brand-green);
  background: #f8fbe9;
  color: #3d5622;
  padding: 0.85rem 1rem;
  border-radius: 8px;
}

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 980px) {
  .flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .home-header {
    padding: 0.65rem 1rem;
  }

  .home-logo {
    height: 28px;
  }

  .home-wrapper {
    padding: 1.75rem 1rem 2rem;
  }

  .flow-grid {
    grid-template-columns: 1fr;
  }

  .test-mode-radio-group,
  .test-user-grid {
    grid-template-columns: 1fr;
  }

  .flow-card {
    min-height: auto;
  }
}
