:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-strong: #f2f6f1;
  --surface-warm: #f8f1e7;
  --ink: #17211d;
  --muted: #53615b;
  --subtle: #6d7a74;
  --line: #d9e0db;
  --line-strong: #b9c5bd;
  --brand: #245c46;
  --brand-dark: #123f31;
  --accent: #b94e32;
  --accent-soft: #f7dfd5;
  --gold: #8b6914;
  --gold-soft: #fbefc8;
  --shadow: 0 18px 48px rgba(23, 33, 29, 0.1);
  --radius: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::selection {
  background: var(--accent-soft);
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

img,
svg {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid rgba(185, 78, 50, 0.42);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-150%);
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  min-height: 72px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(217, 224, 219, 0.9);
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(14px);
}

.site-header-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.site-header > .brand {
  margin-right: auto;
}

.site-header > .nav {
  margin-left: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: fit-content;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.brand-text {
  display: grid;
  gap: 0.05rem;
}

.brand-name {
  line-height: 1.05;
}

.brand-line {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.nav a {
  border-radius: var(--radius);
  color: var(--muted);
  padding: 0.55rem 0.65rem;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  background: var(--surface-strong);
}

.nav a.button {
  color: #fff;
}

.nav a.button:hover,
.nav a.button:focus-visible {
  color: #fff;
  background: var(--brand-dark);
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.72rem 0.95rem;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button {
  background: var(--brand);
  color: #fff;
}

.button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.button-secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}

.button-secondary:hover {
  background: var(--surface-strong);
  border-color: var(--brand);
}

.hero {
  padding: 4.25rem 0 3.5rem;
}

.hero-grid {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.08;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.25rem, 5vw, 4.65rem);
}

h2 {
  font-size: clamp(1.8rem, 3.3vw, 3rem);
}

h3 {
  font-size: 1.14rem;
}

.lede {
  max-width: 720px;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.7vw, 1.24rem);
  line-height: 1.55;
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.support-line {
  margin: 1rem 0 0;
  color: var(--subtle);
  font-weight: 750;
}

.product-visual {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.visual-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
}

.visual-title {
  font-weight: 850;
}

.visual-tabs {
  display: flex;
  gap: 0.35rem;
}

.visual-tabs span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0.22rem 0.48rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.visual-body {
  display: grid;
  grid-template-columns: 120px 1fr;
  min-height: 420px;
}

.visual-sidebar {
  border-right: 1px solid var(--line);
  background: #f7faf6;
  padding: 0.9rem;
}

.visual-sidebar strong {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  color: var(--subtle);
}

.visual-sidebar span {
  display: block;
  border-radius: var(--radius);
  padding: 0.45rem 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.visual-sidebar span:first-of-type {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: inset 3px 0 0 var(--brand);
}

.visual-main {
  padding: 1rem;
}

.module-row {
  display: grid;
  grid-template-columns: 4.6rem 1fr auto;
  gap: 0.8rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.78rem;
  margin-bottom: 0.65rem;
}

.module-row strong {
  color: var(--brand-dark);
  font-size: 0.92rem;
}

.module-row p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.section,
.section-alt {
  padding: 4rem 0;
}

.section-alt {
  background: var(--surface-strong);
}

.section-inner,
.section-header {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-header .lede {
  max-width: 780px;
}

.grid,
.grid-2,
.grid-3 {
  display: grid;
  gap: 1rem;
}

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

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

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

.panel,
.module-card,
.price-card,
.callout {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.15rem;
}

.panel h3,
.module-card h3,
.price-card h3,
.callout h2,
.callout h3 {
  margin-bottom: 0.55rem;
}

.panel p,
.module-card p,
.price-card p,
.callout p {
  margin: 0;
  color: var(--muted);
}

.module-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 0.85rem;
}

.module-card .module-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.52rem;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

.badge-free {
  border-color: rgba(36, 92, 70, 0.28);
  background: #e5f3ec;
  color: var(--brand-dark);
}

.badge-member {
  border-color: rgba(139, 105, 20, 0.25);
  background: var(--gold-soft);
  color: #61480a;
}

.price-card {
  display: grid;
  gap: 1rem;
}

.price {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
}

.price small {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 750;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem;
  text-align: left;
}

tr:last-child th,
tr:last-child td {
  border-bottom: 0;
}

.callout {
  display: grid;
  align-items: start;
  justify-content: stretch;
  gap: 1.25rem;
  background: var(--ink);
  color: #fff;
}

.callout p {
  color: rgba(255, 255, 255, 0.78);
}

.steps {
  counter-reset: steps;
  display: grid;
  gap: 0.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  counter-increment: steps;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem 1rem 1rem 3.2rem;
}

.steps li::before {
  content: counter(steps);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.45rem;
  height: 1.45rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.95rem 1rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 850;
}

.faq-list p {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 2rem 0;
}

.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.footer > p,
.footer > nav {
  width: min(var(--max), calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.footer > p {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.footer a {
  color: var(--muted);
  font-weight: 750;
  text-decoration: none;
}

.footer a:hover {
  color: var(--ink);
}

ul.clean-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.module-builder {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 1rem;
  align-items: start;
}

.builder-form,
.markdown-output {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.15rem;
}

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

.form-field {
  display: grid;
  gap: 0.38rem;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field label {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
  padding: 0.72rem 0.8rem;
}

.form-field textarea {
  min-height: 7.2rem;
  resize: vertical;
}

.markdown-output {
  display: grid;
  gap: 0.85rem;
}

.markdown-output h3 {
  margin: 0;
}

.markdown-preview {
  min-height: 420px;
  max-height: 620px;
  margin: 0;
  overflow: auto;
  border-radius: var(--radius);
  background: var(--ink);
  color: #f7faf6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  padding: 1rem;
  white-space: pre-wrap;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.builder-status {
  min-height: 1.45rem;
  margin: 0;
  color: var(--brand-dark);
  font-size: 0.9rem;
  font-weight: 850;
}

@media (max-width: 940px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    padding: 0.75rem 16px;
  }

  .site-header-inner {
    min-height: auto;
    padding: 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header > .brand,
  .site-header > .nav {
    margin-left: 0;
    margin-right: 0;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .hero {
    padding-top: 2.6rem;
  }

  .hero-grid,
  .grid,
  .grid-2,
  .grid-3,
  .module-builder {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 2rem;
  }

  .visual-body {
    grid-template-columns: 1fr;
  }

  .visual-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .visual-sidebar strong {
    width: 100%;
    margin: 0;
    padding: 0.2rem 0.1rem 0;
  }

  .visual-sidebar span {
    flex: 0 1 auto;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  .site-header-inner,
  .hero-grid,
  .section-inner,
  .section-header,
  .footer-inner {
    width: min(100% - 24px, var(--max));
  }

  .brand-line {
    display: none;
  }

  .nav a {
    padding: 0.45rem 0.38rem;
    white-space: nowrap;
  }

  .nav {
    gap: 0.05rem;
    font-size: 0.88rem;
  }

  .nav a.button {
    display: none;
  }

  .hero,
  .section,
  .section-alt {
    padding: 2.75rem 0;
  }

  .button,
  .button-secondary {
    width: 100%;
  }

  .hero-actions,
  .actions {
    width: 100%;
  }

  .visual-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .module-row {
    grid-template-columns: 1fr;
  }

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

  .markdown-preview {
    min-height: 320px;
  }

  .module-row .badge {
    justify-self: start;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
