:root {
  /* Color tokens per v3 spec */
  --paper:           #EEF0E7;   /* Page background */
  --paper-dim:       #E5E7DB;   /* Alt section background */
  --white:           #FDFDFB;   /* Card surfaces */
  --ink:             #1C2620;   /* Body text */
  --ink-soft:        #4B5750;   /* Secondary text */
  --navy:            #212F45;   /* Dark problem band */
  --amber:           #C57A2E;   /* Decorative accent only */
  --amber-strong:    #8E4D14;   /* Buttons & text on light surfaces */
  --amber-hover:     #733C0E;   /* CTA hover */
  --amber-on-dark:   #E4AE70;   /* Small accent text on navy */
  --moss:            #3E7C4C;   /* "Healthy" status */
  --slate:           #687169;   /* Tertiary text */
  --line:            #C5C9BA;   /* Borders, dividers */

  /* System typography stack */
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body:    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;

  /* Layout */
  --max-w: 1120px;
  --gutter: clamp(18px, 4vw, 32px);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  background-color: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Accessible focus indicator */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--amber-strong);
  outline-offset: 3px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Typography elements */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  line-height: 1.12;
}

h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  line-height: 1.2;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.25;
}

p {
  max-width: 70ch;
  line-height: 1.6;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--amber-strong);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 4px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.btn-primary:hover {
  background-color: var(--amber-hover);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  background: var(--white);
  color: var(--ink);
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  z-index: 1000;
  font-size: 0.875rem;
  text-decoration: none;
  transition: top 150ms ease;
}

.skip-link:focus {
  top: 16px;
}

/* Offset for sticky header navigation */
section[id] {
  scroll-margin-top: 110px;
}

/* 1. Sticky Navigation (#site-nav) - Two-tier */
#site-nav {
  position: sticky;
  top: 0;
  background-color: rgba(238, 240, 231, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}

/* Top corporate tier */
.nav-corporate-tier {
  border-bottom: 1px solid rgba(197, 201, 186, 0.5);
  padding: 6px 0;
  font-size: 0.82rem;
}

.nav-corporate-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-corporate-brand {
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-corporate-brand:hover {
  color: var(--ink);
}

.nav-corporate-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-corporate-links a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 150ms ease;
}

.nav-corporate-links a:hover {
  color: var(--ink);
}

/* Product subnav tier */
.nav-product-tier {
  height: 64px;
  display: flex;
  align-items: center;
}

.nav-product-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}

.nav-product-title {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.nav-brand-parent {
  font-size: 0.82rem;
  color: var(--slate);
  font-weight: 500;
}

.nav-product-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-product-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 150ms ease;
}

.nav-product-links a:hover {
  color: var(--ink);
}

.nav-cta-wrap {
  display: flex;
  align-items: center;
}

@media (max-width: 860px) {
  .nav-corporate-links {
    display: none;
  }
  .nav-product-links {
    display: none;
  }
}

/* 2. Hero (#hero) */
#hero {
  padding-top: clamp(40px, 5vw, 68px);
  padding-bottom: clamp(48px, 6vw, 80px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-subhead {
  font-size: clamp(1.05rem, 1.3vw, 1.18rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
}

.micro-text {
  font-size: 0.85rem;
  color: var(--slate);
}

/* Hero Shift Manifest Card */
.manifest-card {
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px;
}

.manifest-label-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.manifest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.manifest-agent {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

.manifest-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.manifest-checkpoints {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checkpoint-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px dashed var(--line);
  align-items: flex-start;
}

.checkpoint-row:first-child {
  border-top: none;
}

.dot-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 5px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.status-dot.moss { background-color: var(--moss); }
.status-dot.navy { background-color: var(--navy); }
.status-dot.amber { background-color: var(--amber); }

.checkpoint-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.checkpoint-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.checkpoint-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.checkpoint-time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.checkpoint-details {
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tag-stock {
  display: inline-block;
  background-color: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
}

/* 3. Problem band (#problem) */
#problem {
  background-color: var(--navy);
  color: var(--paper);
  padding-top: clamp(56px, 7vw, 88px);
  padding-bottom: clamp(56px, 7vw, 88px);
}

.problem-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
}

@media (max-width: 860px) {
  .problem-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

#problem h2 {
  color: var(--white);
  line-height: 1.22;
}

.problem-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  list-style: none;
}

.problem-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.problem-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber-on-dark);
}

.problem-item h3 {
  color: #FFFFFF;
  font-size: 1.12rem;
  font-weight: 600;
}

.problem-item p {
  color: #C4CAD6;
  font-size: 0.95rem;
}

/* 4. Features (#features) - 2x2 Grid */
#features {
  padding-top: clamp(60px, 7vw, 92px);
  padding-bottom: clamp(60px, 7vw, 92px);
}

.features-header {
  margin-bottom: 44px;
}

.features-header h2 {
  margin-bottom: 16px;
}

.features-header p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 72ch;
}

.features-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

@media (max-width: 860px) {
  .features-grid-2x2 {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.feature-card {
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-eyebrow {
  color: var(--amber-strong);
  font-weight: 600;
}

.feature-card h3 {
  color: var(--ink);
  font-size: 1.25rem;
}

.feature-body {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.feature-bullets {
  list-style: none;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-bullets li {
  position: relative;
  padding-left: 18px;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.5;
}

.feature-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--amber);
}

/* 5. How it works (#how-it-works) */
#how-it-works {
  background-color: var(--paper-dim);
  padding-top: clamp(60px, 7vw, 92px);
  padding-bottom: clamp(60px, 7vw, 92px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

#how-it-works h2 {
  margin-bottom: 44px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.step-card {
  padding: 0 24px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-card:first-child {
  border-left: none;
  padding-left: 0;
}

.step-card:last-child {
  padding-right: 0;
}

.step-label {
  color: var(--amber-strong);
  font-weight: 600;
}

.step-card h3 {
  font-size: 1.15rem;
}

.step-card p {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .step-card {
    border-left: none;
    border-top: 1px solid var(--line);
    padding: 24px 0 0 0;
  }
  .step-card:first-child {
    border-top: none;
    padding-top: 0;
  }
}

/* 6. Industries (#industries) */
#industries {
  padding-top: clamp(48px, 6vw, 72px);
  padding-bottom: clamp(48px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}

.industries-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.industries-lead {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

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

.industry-chip {
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

/* 7. Privacy (#privacy) */
#privacy {
  padding-top: clamp(60px, 7vw, 92px);
  padding-bottom: clamp(60px, 7vw, 92px);
}

#privacy h2 {
  margin-bottom: 36px;
}

.privacy-card {
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

@media (max-width: 860px) {
  .privacy-card {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px;
  }
}

.privacy-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.privacy-col h3, .privacy-col h4 {
  font-size: 1.15rem;
  color: var(--ink);
}

.privacy-col p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.privacy-links-row {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.privacy-link {
  color: var(--amber-strong);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.privacy-link:hover {
  color: var(--amber-hover);
}

/* 8. FAQ (#faq) */
#faq {
  background-color: var(--paper-dim);
  padding-top: clamp(60px, 7vw, 92px);
  padding-bottom: clamp(60px, 7vw, 92px);
  border-top: 1px solid var(--line);
}

#faq h2 {
  margin-bottom: 36px;
}

.faq-list {
  max-width: 820px;
  border-bottom: 1px solid var(--line);
}

.faq-item {
  border-top: 1px solid var(--line);
}

.faq-item summary {
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 650;
  color: var(--ink);
}

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

.faq-item .toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--amber-strong);
  margin-left: 16px;
  flex-shrink: 0;
  user-select: none;
}

.faq-item .toggle::before {
  content: "+";
}

.faq-item[open] .toggle::before {
  content: "−";
}

.faq-answer {
  padding-bottom: 20px;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* 9. Final CTA (#cta) */
#cta {
  background-color: var(--amber-strong);
  color: #FFFFFF;
  padding-top: clamp(56px, 7vw, 84px);
  padding-bottom: clamp(56px, 7vw, 84px);
}

.cta-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 36px;
}

@media (max-width: 860px) {
  .cta-grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }
}

.cta-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
}

#cta h2 {
  color: #FFFFFF;
}

.cta-content p {
  font-size: 1.05rem;
  color: #FFFFFF;
  line-height: 1.55;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.btn-white:hover {
  background-color: var(--paper);
  color: var(--ink);
}

/* 10. Site Footer (#site-footer) */
#site-footer {
  border-top: 1px solid var(--line);
  padding-top: 44px;
  padding-bottom: 44px;
  background-color: var(--paper);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.footer-relationship {
  font-size: 0.82rem;
  color: var(--slate);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 150ms ease;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-contact {
  color: var(--ink-soft);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  transition: color 150ms ease;
}

.footer-contact:hover {
  color: var(--ink);
}

.footer-copy {
  font-size: 0.84rem;
  color: var(--slate);
}

/* ── Inline Operations Chat Assistant ────────────────── */
.track-inline-chat-container {
  margin-top: 56px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(33, 47, 69, 0.05);
}

.track-chat-header {
  margin-bottom: 20px;
}

.track-chat-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--amber-strong);
  background: rgba(197, 122, 46, 0.1);
  padding: 4px 12px;
  border-radius: 9999px;
  letter-spacing: 0.06em;
}

.track-chat-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 6px var(--moss);
}

.track-chat-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  margin-top: 10px;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.track-chat-subtitle {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 0;
}

.track-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.track-chip-link,
.track-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: all 150ms ease;
  min-height: 38px;
}

.track-chip-link:hover,
.track-chip-btn:hover:not(:disabled) {
  border-color: var(--amber-strong);
  background: #ffffff;
  color: var(--amber-strong);
  transform: translateY(-1px);
}

.track-chat-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.track-chat-trial-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--amber-strong);
  text-decoration: none;
  transition: color 150ms ease;
}

.track-chat-trial-link:hover {
  text-decoration: underline;
  color: var(--amber-hover);
}

@media (max-width: 640px) {
  .track-inline-chat-container {
    padding: 20px 16px;
    margin-top: 40px;
    border-radius: 12px;
  }
  .track-chat-title {
    font-size: 1.15rem;
  }
  .track-chat-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
