:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #737373;
  --border: #e7e7e7;
  --soft: #f7f7f7;
  --soft-strong: #eeeeee;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(0, 0, 0, 0.04);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #e8e7e1;
    --border: #d7d5ce;
    --soft: #deddd6;
    --soft-strong: #d4d2ca;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.06);
  }

  .card,
  .preview-window,
  .login-link,
  .domain-field,
  .field input,
  .field select,
  .field textarea,
  .tab.active {
    background: #f1f0ea;
  }

  .pricing-card,
  .auth-card,
  .preview-window {
    box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.04), var(--shadow);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

/* Checkboxes and radios sit inside clickable labels that show a pointer;
   without this the cursor flips between pointer and arrow while moving
   across the row. Selects are clickable controls too. */
input[type="checkbox"],
input[type="radio"],
select {
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}

.shell {
  display: grid;
  grid-template-columns: 252px 1fr;
  width: 100%;
  max-width: 1364px;
  min-height: 100vh;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Mobile-only chrome: hamburger topbar + drawer backdrop (see mobile media query) */
.mobile-topbar,
.sidebar-backdrop {
  display: none;
}

.sidebar-account {
  position: relative;
  display: grid;
  margin-top: auto;
}

.account-trigger {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #111;
  cursor: pointer;
  font-weight: 400;
  padding: 8px;
  text-align: left;
}

.account-trigger:hover {
  background: var(--soft);
}

.account-trigger img,
.account-menu img,
.profile-avatar {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--soft);
}

.account-trigger span,
.account-trigger strong,
.account-trigger small {
  display: block;
  min-width: 0;
}

.account-trigger strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-trigger small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 12px);
  z-index: 20;
  display: grid;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.14);
  padding: 12px;
}

.account-menu::after {
  position: absolute;
  left: 34px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
  content: "";
  transform: rotate(45deg);
}

.account-menu-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 4px 4px 10px;
}

.account-menu-header strong,
.account-menu-header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-header small {
  color: var(--muted);
  font-size: 12px;
}

.account-menu a,
.account-menu button {
  justify-content: flex-start;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #111;
  font-size: 14px;
  font-weight: 650;
  padding: 10px;
  text-align: left;
}

.account-menu a.active,
.account-menu a:hover,
.account-menu button:hover {
  background: var(--soft);
}

/* The workspace the user is currently in, shown in the switcher. */
.account-menu-current {
  display: block;
  border-radius: 10px;
  background: var(--soft);
  color: #111;
  font-size: 14px;
  font-weight: 650;
  padding: 10px;
}

.account-menu-workspaces {
  display: grid;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 2px;
}

/* Website-scope picker on the team page (invite form + per-member editor). */
.access-picker {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.access-picker label {
  display: flex;
  gap: 8px;
  align-items: baseline;
  cursor: pointer;
}

.access-picker-sites {
  display: grid;
  gap: 6px;
  border-left: 2px solid var(--border);
  padding-left: 14px;
  margin-left: 5px;
}

[x-cloak] {
  display: none !important;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 22px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.nav-section {
  display: grid;
  gap: 4px;
}

.nav-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.nav-link {
  color: var(--muted);
  padding: 9px 0;
  font-size: 15px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.main {
  padding: 24px 36px 64px;
}

.marketing-main {
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

.marketing-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 4px 0 56px;
  font-size: 14px;
}

.marketing-brand,
.marketing-nav nav,
.login-link {
  display: flex;
  align-items: center;
}

.marketing-brand {
  gap: 9px;
  justify-self: start;
}

.marketing-brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  font-size: 9px;
}

.marketing-nav nav {
  gap: 34px;
  justify-self: center;
  color: #222;
}

.login-link {
  justify-self: end;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 13px;
  background: #fff;
  box-shadow: var(--shadow);
}

.page {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

.hero {
  max-width: 820px;
  padding: 88px 0 56px;
}

.marketing-hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 46px;
  text-align: center;
}

.auth-main {
  min-height: 100vh;
}

.auth-nav {
  padding-bottom: 72px;
}

.auth-panel {
  display: grid;
  justify-items: center;
  text-align: center;
  max-width: 620px;
  margin: 0 auto 22px;
}

.auth-panel h1 {
  font-size: clamp(38px, 5vw, 58px);
}

.auth-panel .lead {
  margin-left: auto;
  margin-right: auto;
}

.auth-card {
  max-width: 480px;
  margin: 0 auto;
  padding: 28px;
  border-radius: 18px;
  box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.035), var(--shadow);
}

.not-found-card {
  text-align: center;
}

.not-found-actions {
  justify-content: center;
  margin-top: 18px;
}

.marketing-hero h1 {
  font-size: clamp(42px, 6vw, 68px);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.marketing-hero .lead {
  max-width: 540px;
  margin: 0 auto 24px;
  font-size: 18px;
}

.domain-cta {
  display: grid;
  grid-template-columns: minmax(0, 230px) auto;
  gap: 0;
  justify-content: center;
  margin: 0 auto 8px;
}

.domain-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: #fff;
  overflow: hidden;
  min-height: 48px;
}

.domain-field:focus-within {
  border-color: #111;
}

.domain-field span {
  display: grid;
  place-items: center;
  align-self: stretch;
  padding: 0 13px;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.domain-field input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0 14px;
  color: #111;
  background: transparent;
}

.domain-cta button {
  border-radius: 0 12px 12px 0;
  min-height: 48px;
  padding: 0 22px;
}

.trial-note {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 24px;
}

.social-proof {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.avatar-row {
  display: flex;
  justify-content: center;
}

.avatar-row span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  margin-left: -7px;
}

.avatar-row span:first-child {
  margin-left: 0;
}

.social-proof p {
  margin: 0;
  color: #333;
  font-size: 14px;
}

.hero-preview {
  position: relative;
  margin: 0 auto 44px;
}

.preview-window {
  max-width: 960px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.035), 0 28px 70px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.preview-bar {
  display: grid;
  grid-template-columns: repeat(3, auto) minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.preview-bar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid #d6d6d6;
  background: var(--soft);
}

.preview-bar strong {
  justify-self: center;
  font-weight: 500;
}

.preview-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 300px;
}

.preview-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
  border-right: 1px solid var(--border);
  background: var(--soft);
  padding: 24px;
}

.preview-sidebar strong {
  margin-bottom: 8px;
}

.preview-sidebar span {
  color: #333;
  font-size: 14px;
}

.preview-table {
  display: grid;
  align-content: start;
  padding: 20px 26px;
}

.preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 170px;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  font-size: 14px;
}

.preview-heading {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.eyebrow,
.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #333;
  background: var(--soft);
}

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

h1 {
  font-size: clamp(36px, 5.5vw, 58px);
  line-height: 1;
  letter-spacing: -0.06em;
  margin: 16px 0 18px;
}

.page-title {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin: 14px 0 12px;
}

/* Sidebar website switcher: looks like a nav link, lists all sites + Add website */
.site-switcher {
  appearance: none;
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 9px 22px 9px 0;
  background: transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right center / 14px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

h2 {
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}

h3 {
  font-size: 17px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.lead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 680px;
}

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

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

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

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

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

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
}

.tab {
  border: 0;
  background: none;
  border-radius: 9px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
}

.tab-panel {
  display: grid;
  gap: 20px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.card.flat {
  box-shadow: none;
}

.feature-card {
  display: grid;
  gap: 12px;
}

.feature-card h3,
.feature-card p {
  margin: 0;
}

.feature-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.feature-stats span {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: var(--soft);
}

.feature-stats strong,
.feature-stats small {
  display: block;
}

.feature-stats strong {
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.feature-stats small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.metric-card {
  display: grid;
  gap: 10px;
}

.metric-card strong {
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.metric-card p {
  margin: 0;
  font-size: 13px;
}

a.metric-card:hover {
  border-color: #111;
}

.chart-card {
  display: grid;
  gap: 18px;
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.chart-card-header h3 {
  margin: 0;
}

.chart-card-header small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.chart-card-value {
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.chart-frame {
  position: relative;
  width: 100%;
  min-width: 0;
}

/* Chart.js writes explicit pixel sizes on the canvas; keep it out of layout
   flow so it can't lock the card's min-content width and break shrinking. */
.chart-frame canvas {
  position: absolute;
  inset: 0;
  max-width: 100%;
}

.pricing-intro {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
}

.pricing-intro h2,
.pricing-intro p {
  margin-bottom: 0;
}

.billing-heading,
.billing-current-plan {
  justify-content: center;
  text-align: center;
}

.billing-heading {
  max-width: 720px;
  margin: 0 auto;
}

.billing-heading .lead {
  margin-left: auto;
  margin-right: auto;
}

.billing-current-plan {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.billing-current-plan h2 {
  padding-top: 12px;
  padding-bottom: 12px;
}

.pricing-calculator {
  display: grid;
  gap: 26px;
  padding-top: 36px;
}

.home-pricing {
  margin-top: 92px;
  scroll-margin-top: 32px;
}

.pricing-heading {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.pricing-heading h1,
.pricing-heading h2 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  margin: 14px 0 12px;
}

.pricing-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.pricing-slider-wrap {
  display: grid;
  gap: 8px;
}

.slider-top-label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.slider-top-label strong {
  justify-self: center;
  border: 1px solid #111;
  border-radius: 8px;
  background: #111;
  color: #fff;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}

.yearly-note {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.free-strip {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.free-plan-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.free-plan-card > div {
  display: grid;
  gap: 6px;
}

.free-plan-card strong {
  font-size: 28px;
  letter-spacing: -0.04em;
}

.free-plan-card p {
  margin: 0;
}

.billing-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
  white-space: nowrap;
}

.billing-toggle span,
.billing-toggle button {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 13px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 500;
}

.billing-toggle span.active,
.billing-toggle button.active {
  background: #111;
  color: #fff;
}

.billing-toggle small {
  color: var(--muted);
  padding-right: 8px;
}

.pricing-grid {
  align-items: stretch;
}

.allowance-picker {
  display: grid;
  gap: 14px;
}

.growth-card {
  margin-top: 18px;
}

.growth-card-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
}

.allowance-summary {
  min-width: 220px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--soft);
}

.allowance-summary strong {
  display: block;
  margin-top: 10px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.price-slider {
  width: 100%;
  accent-color: #111;
  height: 18px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.pricing-card {
  display: grid;
  gap: 14px;
}

.pricing-card .button,
.pricing-card form,
.pricing-card > button,
.pricing-card > .secondary {
  align-self: end;
}

.pricing-card .badge {
  justify-self: start;
}

.paid-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 28px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.plan-card {
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.035), var(--shadow);
  min-height: 420px;
  grid-template-rows: auto auto minmax(58px, auto) 1fr auto auto;
  align-content: stretch;
}

.pricing-card.current-plan {
  outline: 2px solid #111;
  outline-offset: -2px;
}

.pricing-card h2 {
  font-size: 38px;
  line-height: 1;
  margin: 0;
}

.pricing-card h2 small {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
}

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

.feature-list li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  color: #333;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.feature-list li::before {
  content: "✓";
  color: #111;
  font-weight: 700;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.fine-print {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

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

.catalog-item {
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.catalog-item h3,
.catalog-item p {
  margin: 0;
}

.catalog-item button {
  justify-self: start;
}

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

.button,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #111;
  border-radius: 10px;
  background: #111;
  color: #fff;
  padding: 10px 14px;
  font-weight: 650;
  cursor: pointer;
}

.button.secondary,
button.secondary {
  background: #fff;
  color: #111;
}

.button.ghost,
button.ghost {
  background: transparent;
  color: #111;
  border-color: var(--border);
}

button:disabled,
button:disabled:hover {
  cursor: default;
  color: var(--muted);
  border-color: var(--border);
  background: var(--soft);
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
  font-size: 13px;
  color: #333;
}

.field input,
.field select,
.field textarea {
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #111;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

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

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

.table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.code {
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--soft);
  padding: 14px;
  color: #222;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
}

.feature-preview {
  margin-top: 14px;
}

.snippet-copy {
  display: grid;
  gap: 12px;
  justify-items: start;
  margin-top: 14px;
}

.snippet-copy .code {
  justify-self: stretch;
}

.notice {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--soft);
  padding: 12px 14px;
  color: #333;
  font-size: 14px;
}

.profile-summary {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.profile-summary h2,
.profile-summary p {
  margin: 0;
}

.profile-summary p {
  margin-top: 6px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}

.docs-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  max-width: 1020px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: 72px;
}

.docs-nav {
  position: sticky;
  top: 24px;
  align-self: start;
}

.docs-nav nav {
  display: grid;
  gap: 2px;
  margin-top: 10px;
}

.docs-content {
  min-width: 0;
  max-width: 680px;
}

.docs-content h1 {
  font-size: clamp(30px, 4vw, 40px);
  margin: 12px 0 14px;
}

.docs-content h2 {
  margin-top: 36px;
}

.docs-content p,
.docs-content li {
  font-size: 15px;
  line-height: 1.65;
  color: #222;
}

.docs-content .lead {
  font-size: 17px;
  color: var(--muted);
}

.docs-content ul,
.docs-content ol {
  padding-left: 22px;
  display: grid;
  gap: 8px;
}

.docs-content a {
  border-bottom: 1px solid #bbb;
}

.docs-content a:hover {
  border-bottom-color: #111;
}

.docs-content .nav-link,
.docs-content .eyebrow {
  border-bottom: 0;
}

.docs-screenshot {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin: 18px 0;
}

.docs-content pre.code {
  margin: 14px 0;
}

.docs-next {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-weight: 500;
}

.theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.theme-swatch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px 5px 6px;
  font-size: 12px;
  color: #333;
}

.theme-swatch i {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
}

.theme-swatch-wide {
  padding: 5px 11px;
}

.theme-swatch-editable {
  position: relative;
}

.theme-swatch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.theme-swatch-editor {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.theme-swatch-editor input[type="color"] {
  width: 36px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.theme-swatch-editor input[type="text"] {
  width: 92px;
  font: inherit;
  font-size: 12px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.theme-swatch-editor button {
  padding: 7px 12px;
  font-size: 12px;
}

.theme-preview-stage {
  display: flex;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 18px;
  background: var(--soft);
  pointer-events: none;
}

.theme-preview-stage .sb-widget {
  width: 100%;
  max-width: 520px;
}

.theme-preview-stage-dark {
  background: #18181b;
  border-color: #3f3f46;
}

.tabs-mini {
  margin-bottom: 0;
  padding: 3px;
  gap: 3px;
}

.tabs-mini .tab {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 7px;
}

.theme-actions form {
  display: inline-flex;
  align-items: center;
}

.htmx-indicator {
  opacity: 0;
  transition: opacity 120ms ease;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

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

  .marketing-main {
    padding-left: 20px;
    padding-right: 20px;
  }

  .marketing-nav {
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding-bottom: 42px;
  }

  .marketing-nav nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    gap: 18px;
  }

  .domain-cta,
  .preview-grid,
  .preview-row {
    grid-template-columns: 1fr;
  }

  .domain-field {
    border-right: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
  }

  .domain-cta button {
    border-radius: 0 0 12px 12px;
  }

  .preview-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    padding: 12px 20px;
  }

  .mobile-topbar .brand {
    font-size: 18px;
  }

  .mobile-topbar .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 11px;
  }

  .hamburger {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    padding: 11px 9px;
    cursor: pointer;
  }

  .hamburger span {
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: #111;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.35);
  }

  /* The sidebar becomes an off-canvas drawer, opened from the hamburger */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    width: min(300px, 85vw);
    height: 100dvh;
    max-height: none;
    background: var(--bg);
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .pricing-intro,
  .split {
    grid-template-columns: 1fr;
  }

  .pricing-intro {
    display: grid;
  }

  .pricing-controls,
  .free-plan-card,
  .paid-pricing-grid {
    grid-template-columns: 1fr;
  }

  .docs-shell {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .docs-nav {
    position: static;
  }

  .free-plan-card {
    align-items: start;
  }

  .growth-card-header,
  .growth-feature-list {
    display: grid;
    grid-template-columns: 1fr;
  }

  .allowance-summary {
    min-width: 0;
  }
}
