:root {
  --ink-50: #f6f7f9;
  --ink-100: #eceef2;
  --ink-200: #d5dae3;
  --ink-300: #b0bacb;
  --ink-400: #8594ae;
  --ink-500: #667795;
  --ink-600: #51607b;
  --ink-700: #424e64;
  --ink-800: #394354;
  --ink-900: #333b49;
  --ink-950: #1f2531;
  --brand-50: #eefbf4;
  --brand-100: #d6f5e3;
  --brand-200: #b0eacc;
  --brand-300: #7cd9ae;
  --brand-500: #21a671;
  --brand-600: #14855b;
  --brand-700: #116a4b;
  --brand-800: #11543d;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-200: #fecdd3;
  --rose-700: #be123c;
  --emerald-100: #d1fae5;
  --emerald-700: #047857;
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-700: #0369a1;
  --orange-100: #ffedd5;
  --orange-700: #c2410c;
  --blue-100: #dbeafe;
  --blue-700: #1d4ed8;
  --yellow-100: #fef9c3;
  --yellow-800: #854d0e;
  --lime-100: #ecfccb;
  --lime-700: #4d7c0f;
  --fuchsia-100: #fae8ff;
  --fuchsia-700: #a21caf;
  --slate-200: #e2e8f0;
  --slate-700: #334155;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(31, 37, 49, 0.06);
  --shadow-md: 0 6px 18px rgba(31, 37, 49, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--ink-50);
  color: var(--ink-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink-200);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--brand-600);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.logo em {
  font-style: normal;
  color: var(--brand-600);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-600);
  transition: background 0.15s, color 0.15s;
}

.nav a:hover {
  background: var(--ink-100);
  color: var(--ink-900);
}

.nav a.active {
  background: var(--brand-50);
  color: var(--brand-700);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--ink-200);
  background: #fff;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding: 24px 0;
  font-size: 12px;
  color: var(--ink-500);
}

/* ---------- Layout ---------- */
.page {
  padding: 32px 0;
}

.stack {
  display: flex;
  flex-direction: column;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.gap-5 {
  gap: 20px;
}

.gap-6 {
  gap: 24px;
}

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

.cols-2 {
  grid-template-columns: 1fr 1fr;
}

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

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

.split {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.right {
  text-align: right;
}

.muted {
  color: var(--ink-500);
}

.small {
  font-size: 13px;
}

.xs {
  font-size: 12px;
}

.strong {
  font-weight: 700;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--brand-600);
}

/* ---------- Card ---------- */
.card {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-pad {
  padding: 20px;
}

.card-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-200);
  font-weight: 600;
}

.card-foot {
  padding: 12px 16px;
  background: var(--ink-50);
  border-top: 1px solid var(--ink-200);
}

.card-hover {
  transition: border-color 0.15s, box-shadow 0.15s;
  display: block;
}

.card-hover:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
}

/* ---------- Typography helpers ---------- */
h1.page-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-500);
}

.stat {
  font-size: 24px;
  font-weight: 800;
}

.stat-brand {
  color: var(--brand-700);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--brand-600);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-700);
}

.btn-secondary {
  background: #fff;
  border-color: var(--ink-300);
  color: var(--ink-800);
}

.btn-secondary:hover {
  background: var(--ink-100);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-700);
}

.btn-ghost:hover {
  background: var(--ink-100);
}

.btn-lg {
  padding: 10px 20px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

/* ---------- Forms ---------- */
.label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-700);
}

.input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--ink-300);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink-900);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-100);
}

textarea.input {
  min-height: 130px;
  resize: vertical;
}

.field {
  display: flex;
  flex-direction: column;
}

.hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-500);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-brand {
  background: var(--brand-100);
  color: var(--brand-700);
}

.badge-brand-solid {
  background: var(--brand-600);
  color: #fff;
}

.badge-amber {
  background: var(--amber-100);
  color: var(--amber-700);
}

.badge-ink {
  background: var(--ink-200);
  color: var(--ink-700);
}

.badge-ink-solid {
  background: var(--ink-900);
  color: #fff;
}

.badge-sky {
  background: var(--sky-100);
  color: var(--sky-700);
}

.badge-emerald {
  background: var(--emerald-100);
  color: var(--emerald-700);
}

.badge-orange {
  background: var(--orange-100);
  color: var(--orange-700);
}

.badge-blue {
  background: var(--blue-100);
  color: var(--blue-700);
}

.badge-yellow {
  background: var(--yellow-100);
  color: var(--yellow-800);
}

.badge-lime {
  background: var(--lime-100);
  color: var(--lime-700);
}

.badge-fuchsia {
  background: var(--fuchsia-100);
  color: var(--fuchsia-700);
}

.badge-slate {
  background: var(--slate-200);
  color: var(--slate-700);
}

.badge-rose {
  background: var(--rose-100);
  color: var(--rose-700);
}

/* ---------- Tables ---------- */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data thead th {
  background: var(--ink-100);
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  padding: 8px 16px;
}

table.data td {
  padding: 8px 16px;
  border-top: 1px solid var(--ink-100);
  vertical-align: top;
}

table.data tbody tr:hover {
  background: var(--ink-50);
}

table.data td.num,
table.data th.num {
  text-align: right;
}

table.data tr.best {
  background: var(--brand-50);
}

table.data tr.best td {
  border-top-color: var(--brand-100);
}

/* ---------- Stat cards ---------- */
.stat-card {
  padding: 16px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  background: #fff;
}

/* ---------- Notes / alerts ---------- */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
}

.alert-amber {
  background: var(--amber-50);
  border: 1px solid var(--amber-200);
  color: var(--amber-700);
}

.alert-rose {
  background: var(--rose-50);
  color: var(--rose-700);
}

.alert-sky {
  background: var(--sky-50);
  color: var(--sky-700);
}

.alert-brand {
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  color: var(--brand-800);
}

.alert-ink {
  background: var(--ink-900);
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 24px 0 8px;
}

.hero h1 {
  margin-top: 16px;
  font-size: 40px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero p.lead {
  margin-top: 16px;
  max-width: 560px;
  font-size: 18px;
  color: var(--ink-600);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 440px;
  margin-top: 32px;
  gap: 16px;
}

.hero-stats .stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-500);
}

.example-head {
  background: var(--ink-900);
  color: #fff;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
}

.example-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--ink-100);
}

.example-total {
  background: var(--brand-50);
  padding: 12px 20px;
  border-top: 1px solid var(--brand-100);
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--brand-600);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.section-gap {
  margin-top: 64px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ---------- Quote / line items ---------- */
.line-item {
  padding: 12px 16px;
  border-top: 1px solid var(--ink-100);
}

td .item-name {
  font-weight: 500;
  color: var(--ink-900);
}

.quote-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
}

.quote-total {
  font-size: 20px;
  font-weight: 800;
}

.quote-total-lg {
  font-size: 26px;
  font-weight: 800;
  color: var(--brand-700);
}

.disclaimer {
  padding: 12px 20px;
  border-top: 1px solid var(--ink-200);
  background: #fff;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-500);
}

details.section > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

details.section > summary::-webkit-details-marker {
  display: none;
}

details.section > summary::after {
  content: "Show";
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-600);
}

details.section[open] > summary::after {
  content: "Hide";
}

.bom {
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 20px;
}

.bom-head {
  padding: 8px 16px;
  background: var(--ink-50);
  border-bottom: 1px solid var(--ink-200);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Misc ---------- */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--ink-900);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex: none;
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 18px;
}

.stars {
  color: var(--amber-600);
  font-size: 12px;
  font-weight: 600;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.divider {
  height: 1px;
  background: var(--ink-200);
}

.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 14px;
}

.kv.total {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--ink-300);
  font-weight: 700;
}

.sticky {
  position: sticky;
  top: 88px;
}

.demo-banner {
  background: var(--ink-900);
  color: #fff;
  font-size: 12px;
  padding: 8px 0;
  text-align: center;
}

.demo-banner a {
  color: var(--brand-300);
  text-decoration: underline;
}

@media (max-width: 900px) {
  .hero,
  .split,
  .cols-2,
  .cols-3,
  .cols-4 {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 32px;
  }
}
