:root {
  --ink: #17201c;
  --muted: #5c6d65;
  --paper: #fffdf7;
  --line: #d9dfd6;
  --sage: #6b8374;
  --sage-dark: #395647;
  --clay: #b96d4f;
  --gold: #c99a3a;
  --blue: #376a8c;
  --navy: #243f53;
  --mist: #edf3ef;
  --cream: #f8efe2;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(23, 32, 28, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

main,
section,
header,
footer {
  max-width: 100%;
}

main {
  overflow-x: clip;
}

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

button,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid rgba(57, 86, 71, 0.14);
  background: rgba(255, 253, 247, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo-img,
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  flex: 0 0 auto;
}

.logo-img {
  object-fit: cover;
}

.brand-mark {
  display: grid;
  place-items: center;
  background: var(--sage-dark);
  color: var(--white);
  font-weight: 800;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  color: var(--muted);
  font-size: 0.94rem;
}

nav a {
  font-weight: 750;
}

.language-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
}

.language-toggle button {
  min-width: 42px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.language-toggle button.active {
  background: var(--sage-dark);
  color: var(--white);
}

.workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 76px);
  width: min(100%, 1240px);
  margin-inline: auto;
  overflow: hidden;
  padding: clamp(42px, 7vw, 78px) clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 82% 16%, rgba(201, 154, 58, 0.22), transparent 28%),
    linear-gradient(90deg, rgba(237, 243, 239, 0.96), rgba(255, 253, 247, 0.8)),
    repeating-linear-gradient(135deg, rgba(57, 86, 71, 0.08) 0 1px, transparent 1px 18px);
}

.page-hero {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: clamp(48px, 8vw, 92px) clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(237, 243, 239, 0.96), rgba(248, 239, 226, 0.72)),
    var(--paper);
}

.page-hero p {
  max-width: 740px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.45rem, 5.5vw, 4.8rem);
  font-weight: 700;
  line-height: 0.96;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.05;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.02rem;
}

.hero-copy p {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(57, 86, 71, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--sage-dark);
  font-size: 0.88rem;
  font-weight: 900;
}

.hero-actions,
.bot-actions,
.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button {
  padding: 0 17px;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--sage-dark);
  color: var(--white);
}

.button.primary:hover {
  background: #263f34;
}

.button.secondary,
.icon-button {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink);
}

.icon-button {
  width: 44px;
  padding-bottom: 4px;
  font-size: 1.7rem;
  line-height: 1;
}

.document-visual {
  position: relative;
  min-height: 500px;
  overflow: hidden;
}

.paper {
  position: absolute;
  inset: 8% 4% auto auto;
  width: min(420px, 92%);
  min-height: 520px;
  border: 1px solid rgba(57, 86, 71, 0.18);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.paper-back {
  transform: rotate(-7deg) translate(-26px, 18px);
  background: #eef2e9;
}

.paper-front {
  padding: 36px;
  transform: rotate(2deg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0), rgba(237, 243, 239, 0.62)),
    var(--white);
}

.paper-kicker {
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paper-front h2 {
  margin: 18px 0 28px;
}

.paper-row {
  height: 13px;
  margin-bottom: 12px;
  border-radius: 99px;
  background: #dfe7e1;
}

.paper-row.wide {
  width: 94%;
}

.paper-row:not(.wide):not(.short) {
  width: 74%;
}

.paper-row.short {
  width: 48%;
}

.paper-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 34px;
}

.paper-grid span {
  min-height: 82px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0)),
    var(--mist);
}

.audience-section,
.firm-section,
.payment-section,
.conversion-band {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: clamp(44px, 6vw, 78px) clamp(16px, 4vw, 44px);
}

.audience-section {
  background: var(--white);
}

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

.audience-card {
  min-height: 250px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--white);
}

.audience-card h3 {
  max-width: 520px;
  margin: 18px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.05;
}

.audience-card p {
  max-width: 560px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.02rem;
  line-height: 1.6;
}

.public-card {
  background:
    linear-gradient(135deg, rgba(55, 106, 140, 0.92), rgba(36, 63, 83, 0.98)),
    var(--navy);
}

.firm-card {
  background:
    linear-gradient(135deg, rgba(57, 86, 71, 0.94), rgba(23, 32, 28, 0.98)),
    var(--sage-dark);
}

.card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  color: var(--white);
  font-weight: 900;
}

.trust-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.5fr);
  gap: 28px;
  align-items: center;
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: 38px clamp(16px, 4vw, 44px);
  background: var(--sage-dark);
  color: var(--white);
}

.trust-band h2 {
  margin-bottom: 8px;
}

.trust-band p,
.trust-band ul {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.trust-band ul {
  padding-left: 18px;
}

.packet-types,
.builder-shell {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: clamp(44px, 6vw, 78px) clamp(16px, 4vw, 44px);
}

.packet-types {
  background:
    linear-gradient(180deg, rgba(248, 239, 226, 0.76), rgba(255, 253, 247, 0.9)),
    var(--paper);
}

.section-heading {
  max-width: 680px;
  margin-bottom: 28px;
}

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

.type-card {
  min-height: 204px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 10px 28px rgba(23, 32, 28, 0.06);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.type-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(23, 32, 28, 0.1);
}

.type-card.active {
  border-color: var(--sage-dark);
  box-shadow: 0 0 0 3px rgba(107, 131, 116, 0.18);
}

.type-card p {
  color: var(--muted);
  line-height: 1.5;
}

.type-card span {
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 900;
}

.card-cta {
  display: inline-flex;
  margin-top: 12px;
  color: var(--sage-dark);
  font-size: 0.9rem;
}

.selected-package {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 850;
}

.firm-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.72fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(36, 63, 83, 0.94), rgba(57, 86, 71, 0.94)),
    var(--navy);
  color: var(--white);
}

.page-firm {
  border-top: 0;
}

.firm-copy p {
  max-width: 700px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.06rem;
  line-height: 1.65;
}

.firm-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.firm-list li {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.payment-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(18px, 4vw, 44px);
  align-items: center;
  background: var(--white);
}

.payment-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.65;
}

.payment-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(248, 239, 226, 0.72), rgba(255, 255, 255, 0.96)),
    var(--white);
  box-shadow: var(--shadow);
}

.payment-card span {
  color: var(--muted);
  font-weight: 850;
}

.payment-card strong {
  color: var(--sage-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  line-height: 1;
}

.payment-card small {
  color: var(--muted);
  line-height: 1.45;
}

.payment-landing {
  min-height: calc(100vh - 76px);
}

.merchant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.merchant-grid article {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.merchant-grid strong {
  color: var(--sage-dark);
}

.merchant-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.conversion-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.conversion-band p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.6;
}

.builder-shell {
  background:
    linear-gradient(180deg, rgba(237, 243, 239, 0.94), rgba(255, 253, 247, 0.82)),
    var(--mist);
}

.builder-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.status-pill {
  min-width: 128px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--sage-dark);
  font-weight: 900;
  text-align: center;
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.45fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.bot-card,
.guardrail,
.preview-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(23, 32, 28, 0.08);
}

.bot-card {
  padding: 20px;
}

.bot-message {
  min-height: 104px;
  margin-bottom: 18px;
  padding: 17px;
  border-radius: 8px;
  background: #f6f2e8;
  color: #29362f;
  font-weight: 750;
  line-height: 1.5;
}

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

textarea {
  width: 100%;
  min-height: 132px;
  margin-bottom: 12px;
  padding: 13px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}

textarea:focus {
  outline: 3px solid rgba(55, 106, 140, 0.18);
  border-color: var(--blue);
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.choice-row:empty {
  display: none;
}

.choice {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--sage-dark);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
}

.choice.active {
  border-color: var(--sage-dark);
  background: var(--sage-dark);
  color: var(--white);
}

.guardrail {
  margin-top: 14px;
  padding: 16px;
}

.guardrail p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.preview-panel {
  overflow: hidden;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.checkout-note {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f6f2e8;
  color: var(--muted);
  font-size: 0.9rem;
}

.checkout-note code {
  color: var(--ink);
  font-weight: 800;
}

.preview-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.packet-preview {
  min-height: 640px;
  padding: clamp(20px, 4vw, 44px);
  background: var(--white);
}

.packet-preview h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.packet-preview h2 {
  margin: 28px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.15rem;
}

.packet-preview p,
.packet-preview li {
  color: #33413a;
  line-height: 1.6;
}

.packet-preview table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
}

.packet-preview th,
.packet-preview td {
  padding: 11px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.packet-preview th {
  width: 32%;
  background: var(--mist);
}

.empty-value {
  color: #8b6a36;
  font-style: italic;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: 24px clamp(16px, 4vw, 44px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 960px) {
  .workspace-hero,
  .trust-band,
  .audience-grid,
  .firm-section,
  .payment-section,
  .merchant-grid,
  .builder-layout {
    grid-template-columns: 1fr;
  }

  .conversion-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-visual {
    min-height: 430px;
  }

  .paper {
    inset: 0 auto auto 50%;
    transform-origin: center;
  }

  .paper-back {
    transform: translateX(-50%) rotate(-5deg) translate(-18px, 16px);
  }

  .paper-front {
    transform: translateX(-50%) rotate(1deg);
  }

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

@media (max-width: 680px) {
  .topbar,
  .builder-header,
  .preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .brand {
    align-items: flex-start;
  }

  .workspace-hero {
    min-height: auto;
  }

  h1 {
    font-size: clamp(2rem, 12vw, 3.25rem);
    line-height: 1.02;
  }

  h2 {
    font-size: clamp(1.55rem, 9vw, 2.25rem);
  }

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

  .document-visual {
    display: none;
  }

  .toolbar-actions,
  .toolbar-actions .button,
  .hero-actions .button,
  .bot-actions .button,
  .payment-card .button {
    width: 100%;
  }

  .icon-button {
    flex: 0 0 44px;
  }
}
