:root {
  --radius: 20px;
}

body.underwritekit-theme {
  --bg: #f4f5f1;
  --surface: #ffffff;
  --surface-alt: #eef2ec;
  --text: #0f1b14;
  --muted: #4a5a52;
  --accent: #1b5e3c;
  --accent-2: #243640;
  --accent-3: #8fd0b0;
  --border: rgba(15, 27, 20, 0.12);
  --shadow: 0 22px 55px rgba(15, 27, 20, 0.18);
  --font-display: "Playfair Display", serif;
  --font-body: "DM Sans", sans-serif;
  --banner-height: 72px;
  background: radial-gradient(circle at top right, rgba(143, 208, 176, 0.2), transparent 55%),
    linear-gradient(180deg, #f4f5f1 0%, #ffffff 45%, #eef2ec 100%);
}

.top-banner {
  height: auto;
  padding: 0.55rem 1rem;
  line-height: 1.4;
}

body.underwritekit-theme::before,
body.underwritekit-theme::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  z-index: 0;
  opacity: 0.45;
}

body.underwritekit-theme::before {
  width: 240px;
  height: 240px;
  background: rgba(27, 94, 60, 0.16);
  top: 130px;
  left: 6%;
}

body.underwritekit-theme::after {
  width: 180px;
  height: 180px;
  background: rgba(36, 54, 64, 0.18);
  bottom: 120px;
  right: 9%;
}

.brand-mark {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.3rem, 3vw, 3.4rem);
  margin-bottom: 1rem;
}

.lede {
  font-size: 1.05rem;
  color: var(--muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.hero-visual {
  position: relative;
  min-height: 280px;
}

.memo-card,
.checklist-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.memo-card {
  top: 20px;
  left: 10%;
  width: 240px;
}

.checklist-card {
  bottom: 20px;
  right: 10%;
  width: 240px;
}

.card-title {
  font-weight: 700;
  font-family: var(--font-display);
  margin-bottom: 0.9rem;
}

.card-line {
  height: 10px;
  border-radius: 999px;
  background: rgba(27, 94, 60, 0.18);
  margin-bottom: 0.6rem;
}

.card-line.short {
  width: 70%;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(36, 54, 64, 0.12);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-2);
}

.checklist-item {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  background: var(--surface-alt);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.narrative .callout,
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  box-shadow: var(--shadow);
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: start;
}

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

.tour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.tour-card {
  background: linear-gradient(135deg, rgba(27, 94, 60, 0.08), rgba(36, 54, 64, 0.12));
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid rgba(36, 54, 64, 0.2);
  min-height: 160px;
}

.tour-label {
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.bullet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  padding-left: 1.1rem;
}

.outcomes {
  background: rgba(27, 94, 60, 0.08);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

.stat-card .stat {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.fineprint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.explainer-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.explainer-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.explainer-tile h3 {
  margin: 0.65rem 0 0;
  font-size: 1rem;
}

.badge.good {
  background: rgba(27, 94, 60, 0.14);
  color: var(--accent);
}

.badge.warn {
  background: rgba(205, 122, 0, 0.14);
  color: #8a4d00;
}

.timeline-step.is-active {
  border: 1px solid rgba(27, 94, 60, 0.35);
  box-shadow: 0 18px 44px rgba(27, 94, 60, 0.18);
}

.timeline-step.is-complete {
  opacity: 0.7;
}

.cta.ghost.is-active {
  border-color: rgba(27, 94, 60, 0.4);
  background: rgba(27, 94, 60, 0.08);
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.comparison-header {
  padding: 0.85rem 1rem;
  background: var(--surface-alt);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.comparison-row {
  display: contents;
}

.comparison-row > div {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.feature-list {
  columns: 2;
  column-gap: 2rem;
  padding-left: 1.2rem;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  border-left: 2px solid var(--accent-3);
}

.timeline li {
  padding: 0.75rem 0 0.75rem 1.2rem;
  position: relative;
}

.timeline li::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  left: -6px;
  top: 18px;
}

.price-card .price {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.6rem 0 1rem;
}

.price-card .price span {
  font-size: 0.9rem;
  color: var(--muted);
  margin-left: 0.3rem;
}

.price-card ul {
  padding-left: 1.1rem;
}

.price-card.highlight {
  border: 2px solid var(--accent);
}

.link-card {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  margin-top: 1.2rem;
  background: var(--surface);
}

.link-list {
  padding-left: 1.1rem;
}

form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

form input,
form textarea,
form select {
  width: 100%;
  margin-top: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

pre {
  background: #0f1412;
  color: #e7efe9;
  border-radius: 12px;
  padding: 0.9rem;
  overflow-x: auto;
}

pre code {
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
}

.diagram {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.diagram-node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 600;
}

.diagram-arrow {
  font-size: 1.2rem;
  color: var(--muted);
}

.final-cta {
  background: linear-gradient(135deg, rgba(27, 94, 60, 0.12), rgba(36, 54, 64, 0.08));
}

@media (max-width: 900px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero-visual {
    min-height: 240px;
  }

  .memo-card,
  .checklist-card {
    position: static;
    width: 100%;
    margin-bottom: 1rem;
  }

  .feature-list {
    columns: 1;
  }

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

  .comparison-header {
    display: none;
  }

  .comparison-row > div {
    border-bottom: none;
    border-top: 1px solid var(--border);
  }
}

body.loaded .tour-card,
body.loaded .memo-card,
body.loaded .checklist-card {
  animation: floatUp 0.8s ease both;
}

@keyframes floatUp {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
