:root {
  --bg: #f5f1e8;
  --paper: #ffffff;
  --ink: #16131d;
  --muted: #625d69;
  --line: #ded6c8;
  --soft: #eee8dc;
  --accent: #5135d4;
  --accent-2: #0d735d;
  --accent-3: #9a5a00;
  --accent-soft: #eeeaff;
  --green-soft: #e8f6f0;
  --amber-soft: #fff2dc;
  --red-soft: #fff0f3;
  --max: 1180px;
  --radius: 8px;
  --shadow: 0 18px 44px rgba(38, 31, 22, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(81, 53, 212, 0.06), transparent 360px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(222, 214, 200, 0.92);
  background: rgba(245, 241, 232, 0.94);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  color: var(--ink);
  font-weight: 950;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.nav a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 850;
}

.nav a[aria-current="page"] {
  border-color: rgba(81, 53, 212, 0.24);
  background: var(--accent);
  color: #fff;
}

.hero {
  padding: 54px 0 24px;
}

.eyebrow {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #30206f;
  padding: 0 11px;
  margin-bottom: 16px;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 980px;
  margin-bottom: 14px;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 850px;
  margin-bottom: 18px;
  color: #383342;
  font-size: 1.08rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
  font-size: 0.88rem;
  font-weight: 850;
}

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 12px 0 46px;
}

.toc {
  position: sticky;
  top: 86px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  padding: 14px;
  box-shadow: var(--shadow);
}

.toc h2 {
  margin-bottom: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.toc ul {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc a {
  display: block;
  border-radius: 6px;
  color: var(--ink);
  padding: 7px 8px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 760;
}

.toc a:hover {
  background: var(--accent-soft);
}

.content {
  display: grid;
  gap: 16px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 22px;
  box-shadow: var(--shadow);
  scroll-margin-top: 90px;
}

.panel > h2 {
  margin-bottom: 14px;
  font-size: clamp(1.45rem, 2.4vw, 2.22rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.panel h3 {
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 1.1rem;
  line-height: 1.25;
}

.panel h4 {
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: 1rem;
}

.panel p,
.panel li {
  color: #383342;
}

.panel p:last-child,
.panel ul:last-child,
.panel ol:last-child,
.panel table:last-child,
.panel blockquote:last-child {
  margin-bottom: 0;
}

.panel ul,
.panel ol {
  padding-left: 1.35rem;
}

.panel li + li {
  margin-top: 4px;
}

.panel blockquote {
  margin: 16px 0;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-soft);
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 760;
}

.panel blockquote p {
  color: var(--ink);
}

.panel table {
  width: 100%;
  margin: 14px 0;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.panel th,
.panel td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.panel th {
  background: var(--soft);
  color: var(--ink);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.panel tr:last-child td {
  border-bottom: 0;
}

.panel code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #faf8f2;
  padding: 0.08rem 0.32rem;
  color: var(--ink);
  font-size: 0.9em;
}

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

.home-card {
  min-height: 156px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.home-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.home-card span {
  color: var(--muted);
}

.home-card b {
  color: var(--accent);
}

.sales-sheet {
  display: grid;
  gap: 14px;
}

.sales-sheet .panel {
  display: grid;
  gap: 14px;
}

.sales-visual {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 12px;
  box-shadow: var(--shadow);
  overflow: auto;
}

.sales-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.sales-intro {
  max-width: 860px;
  margin-bottom: 0;
  color: var(--muted);
}

.sales-metrics,
.sales-grid {
  display: grid;
  gap: 14px;
}

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

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

.sales-card,
.sales-metric,
.sales-callout {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
  box-shadow: var(--shadow);
}

.sales-card h3,
.sales-metric h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.sales-metric strong {
  display: block;
  color: var(--accent);
  font-size: 1.9rem;
  line-height: 1;
}

.sales-metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 750;
}

.sales-card.full,
.sales-callout {
  grid-column: 1 / -1;
}

.sales-card.accent {
  border-color: rgba(81, 53, 212, 0.22);
  background: var(--accent-soft);
}

.sales-card.green,
.sales-callout {
  border-color: rgba(13, 115, 93, 0.2);
  background: var(--green-soft);
}

.sales-card.amber {
  border-color: rgba(154, 90, 0, 0.2);
  background: var(--amber-soft);
}

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

.sales-flow {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sales-flow li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(81, 53, 212, 0.16);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  font-weight: 850;
}

.sales-flow span {
  color: var(--accent);
  white-space: nowrap;
}

.sales-callout {
  color: #123f34;
  font-size: 1.08rem;
  font-weight: 850;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 34px;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

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

  .sales-metrics,
  .sales-grid,
  .sales-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 34px;
  }

  .panel {
    padding: 18px;
  }

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