/* Tracebrand website. Tokens follow DESIGN.md: Geist, brand #1447E6 used
   sparingly, neutral shell, 1px borders instead of shadows. */
:root {
  --brand: #1447e6;
  --brand-hover: #1035b8;
  --brand-tint: #eef2fd;
  --fg: #111827;
  --fg-secondary: #374151;
  --muted: #6b7280;
  --page: #f7f8fa;
  --card: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --r-card: 12px;
  --r-lg: 8px;
  --r-sm: 6px;
  --max: 1120px;
  --gutter: 24px;
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI',
    sans-serif;
  color: var(--fg);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  font-size: 16px;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

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

a:hover {
  color: var(--brand-hover);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  background: var(--card);
  padding: 8px 12px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo:hover {
  color: var(--fg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
}

.site-nav a {
  color: var(--fg-secondary);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--fg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

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

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

.btn-secondary {
  background: var(--card);
  color: var(--fg);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  color: var(--fg);
  border-color: var(--fg-secondary);
}

.site-nav .btn-secondary {
  height: 36px;
  color: var(--fg);
}

/* Sections */
section {
  padding: 80px 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 40px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 700;
}

h2 {
  font-size: clamp(28px, 3.4vw, 36px);
  line-height: 1.15;
  font-weight: 700;
}

h3 {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lead {
  margin: 20px 0 0;
  color: var(--fg-secondary);
  font-size: 19px;
  line-height: 1.55;
}

.section-head p:not(.eyebrow) {
  margin: 16px 0 0;
  color: var(--fg-secondary);
  font-size: 17px;
  line-height: 1.55;
}

/* Hero */
.hero {
  padding: 96px 0 72px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

/* Illustrative panel in the hero: a static rendering of the product's
   visibility view, not a live figure. */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 20px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
}

.panel-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
}

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

.bar-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  line-height: 1.35;
}

.bar-label {
  font-weight: 500;
  color: var(--fg-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 8px;
  background: #f1f3f6;
  border-radius: 9999px;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 9999px;
  background: var(--border-strong);
}

.bar-row.is-you .bar-fill {
  background: var(--brand);
}

.bar-row.is-you .bar-label {
  color: var(--fg);
  font-weight: 600;
}

.bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.panel-engines {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 3px;
}

/* Engines strip */
.engines {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

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

.engines-label {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
}

.engine-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.engine-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--fg-secondary);
}

.engine-list img {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

/* Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px;
}

.card p {
  margin: 8px 0 0;
  color: var(--fg-secondary);
  font-size: 15px;
  line-height: 1.55;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 16px;
  border-radius: 9999px;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
}

/* Pricing */
.pricing {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.period-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--page);
}

.period-toggle button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--fg-secondary);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
}

.period-toggle button[aria-pressed='true'] {
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 0 0 1px var(--border);
}

.period-toggle .save {
  color: var(--brand);
  font-weight: 600;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.plan {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 28px 24px 24px;
}

.plan.is-featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.plan-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
}

.plan-copy {
  margin: 8px 0 0;
  min-height: 48px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 20px;
}

.price-amount {
  font-size: 40px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.price-period {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 500;
}

.price-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.features {
  list-style: none;
  margin: 24px 0 28px;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 12px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--fg-secondary);
}

.features li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
}

.features li::before {
  content: '';
  width: 18px;
  height: 18px;
  margin-top: 1px;
  background: no-repeat center / 18px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%231447E6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.features strong {
  color: var(--fg);
  font-weight: 600;
}

.plan .btn {
  margin-top: auto;
  width: 100%;
}

.pricing-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
  color: var(--fg-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.pricing-foot p {
  margin: 0;
}

/* FAQ */
.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 0 24px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 0;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
}

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

.faq summary::after {
  content: '+';
  float: right;
  color: var(--muted);
  font-weight: 500;
}

.faq details[open] summary::after {
  content: '\2212';
}

.faq details p {
  margin: 0;
  padding: 0 0 20px;
  color: var(--fg-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* Contact */
.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 40px;
}

.contact-card p {
  margin: 12px 0 0;
  color: var(--fg-secondary);
  font-size: 17px;
  line-height: 1.55;
  max-width: 560px;
}

/* Footer */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 48px 0 40px;
  color: var(--fg-secondary);
  font-size: 14px;
  line-height: 1.6;
}

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

.footer-title {
  margin: 0 0 8px;
  color: var(--fg);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
}

.site-footer address {
  font-style: normal;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer a {
  color: var(--fg-secondary);
}

.footer-legal {
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Document pages */
.doc {
  padding: 64px 0 88px;
}

.doc .wrap {
  max-width: 760px;
}

.doc h1 {
  font-size: clamp(32px, 4vw, 42px);
}

.doc .updated {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.doc h2 {
  margin-top: 48px;
  font-size: 22px;
  line-height: 1.3;
}

.doc p,
.doc li {
  color: var(--fg-secondary);
  font-size: 16px;
  line-height: 1.65;
}

.doc ul {
  padding-left: 20px;
}

.doc li + li {
  margin-top: 6px;
}

.doc dl {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 10px 24px;
  margin: 20px 0 0;
  font-size: 16px;
  line-height: 1.5;
}

.doc dt {
  color: var(--muted);
  font-weight: 500;
}

.doc dd {
  margin: 0;
  color: var(--fg);
  font-weight: 500;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .plans,
  .grid-3,
  .pricing-foot {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid {
    gap: 40px;
  }

  .plan-copy {
    min-height: 0;
  }

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

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 16px;
  }

  section {
    padding: 56px 0;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .site-nav .nav-link {
    display: none;
  }

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

  .contact-card {
    padding: 28px 24px;
  }

  .doc dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .doc dd {
    margin-bottom: 12px;
  }
}
