/* ===== Docs styles ===== */
/* Layered on top of /lib/landing.css. Keep additions minimal — reuse marketing
   patterns wherever possible. */

/* ----- Docs landing hero ----- */
.docs-hero {
  padding: 140px 32px 60px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-light) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.docs-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(253, 108, 29, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(253, 108, 29, 0.08) 0%, transparent 50%);
  z-index: 0;
}

.docs-hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}

.docs-hero-title {
  font-size: 48px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
  letter-spacing: -0.5px;
}

.docs-hero-subtitle {
  font-size: 18px;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

.docs-hero-subtitle strong {
  color: var(--text);
  font-weight: 600;
}

/* ----- Audience section ----- */
.docs-audience-section {
  padding: 60px 32px;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.docs-audience-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-left: 4px solid transparent;
}

.docs-audience-card:hover {
  border-left-color: var(--accent);
}

.docs-audience-cta {
  margin-top: 20px;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.2s ease;
}

.docs-audience-card:hover .docs-audience-cta {
  gap: 12px;
}

/* ----- Reference link strip ----- */
.docs-reference-link {
  margin-top: 48px;
  padding: 20px 24px;
  background: var(--bg-light);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.docs-reference-link i {
  color: var(--accent);
  margin-right: 4px;
}

.docs-reference-link a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.docs-reference-link a:hover {
  text-decoration: underline;
}

/* ----- Sign-up CTA section ----- */
.docs-cta-section {
  padding: 80px 32px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8c42 100%);
  color: white;
  text-align: center;
}

.docs-cta-content {
  max-width: 720px;
  margin: 0 auto;
}

.docs-cta-content h2 {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 16px;
}

.docs-cta-content p {
  font-size: 18px;
  opacity: 0.95;
  margin: 0 0 32px;
  line-height: 1.6;
}

.docs-cta-section .btn-primary {
  background: white;
  color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.docs-cta-section .btn-primary:hover {
  background: white;
  color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* ----- Footer ----- */
.docs-footer {
  background: var(--bg-light);
  padding: 32px;
  border-top: 1px solid var(--border-color);
}

.docs-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.docs-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.docs-footer a:hover {
  color: var(--accent);
}

/* ===== Docs article (concept / workflow / recipe pages) ===== */
.docs-article-page {
  padding: 120px 32px 60px;
  background: var(--bg);
  min-height: calc(100vh - 200px);
}

.docs-article {
  max-width: 760px;
  margin: 0 auto;
}

.docs-breadcrumb {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.docs-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.docs-breadcrumb a:hover {
  text-decoration: underline;
}

.docs-breadcrumb .sep {
  margin: 0 8px;
  color: var(--muted);
  opacity: 0.5;
}

.docs-article h1 {
  font-size: 40px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
  letter-spacing: -0.5px;
}

.docs-article-lede {
  font-size: 19px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 32px;
}

.docs-article-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.docs-article-meta i {
  margin-right: 6px;
  color: var(--accent);
}

.docs-article h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 48px 0 16px;
  color: var(--text);
  scroll-margin-top: 100px;
}

.docs-article h3 {
  font-size: 21px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--text);
}

.docs-article p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 16px;
}

.docs-article ul, .docs-article ol {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  padding-left: 24px;
  margin: 0 0 16px;
}

.docs-article li {
  margin-bottom: 8px;
}

.docs-article strong {
  font-weight: 600;
}

.docs-article code {
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text);
}

.docs-article pre {
  background: var(--code-bg-block);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
}

/* Copy button — auto-attached to every <pre> inside .docs-article by
   docs-copy.js. Grid-overlay approach: pre and button share one cell,
   button is justified to top-right. Works without depending on
   position: relative propagating through ancestors. */
.docs-code-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.docs-code-wrap > pre,
.docs-code-wrap > button {
  grid-column: 1;
  grid-row: 1;
}

.docs-code-wrap > pre {
  margin: 16px 0;
}

.docs-copy-btn {
  align-self: start;
  justify-self: end;
  margin: 24px 8px 0 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color-strong);
  color: var(--muted);
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.docs-copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.docs-copy-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.docs-copy-btn-success {
  color: var(--accent);
}

/* Tune-caching hero — embedded tuner on /docs/workflows/tune-caching/.
   Mobile: tuner stacks above the lede ("top of column"). Desktop:
   lede left, tuner right-aligned in the article column. */
.tc-hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}
.tc-hero > .docs-article-lede {
  order: 2;
  margin-bottom: 0;
}
.tc-hero > .tc-tuner {
  order: 1;
}

@media (min-width: 768px) {
  .tc-hero {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 28px;
    align-items: start;
  }
  .tc-hero > .docs-article-lede,
  .tc-hero > .tc-tuner {
    order: 0;
  }
}

.tc-tuner {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 4px 14px var(--shadow-soft);
}

.tc-tuner-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.tc-tuner-row:last-child { margin-bottom: 0; }

.tc-tuner-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.tc-tuner-track {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tc-tuner-mark {
  font-size: 10px;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

.tc-tuner-rail {
  flex: 1;
  min-width: 0;
  height: 4px;
  background: var(--border-color-strong);
  border-radius: 2px;
  position: relative;
}

.tc-tuner-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ff8c42);
  border-radius: 2px;
}

.tc-tuner-knob {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff8c42);
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 8px rgba(253, 108, 29, 0.4);
  border: 2px solid var(--card-bg);
}

.tc-tuner-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tc-tuner-toggle {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--border-color-strong);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
}

.tc-tuner-toggle-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--hover-bg);
}

.docs-article pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.docs-article blockquote {
  border-left: 4px solid var(--accent);
  padding: 8px 20px;
  margin: 24px 0;
  background: rgba(253, 108, 29, 0.04);
  color: var(--text);
}

.docs-article blockquote p {
  margin: 8px 0;
}

.docs-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.docs-article table th, .docs-article table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.docs-article table th {
  font-weight: 600;
  background: var(--bg-light);
  color: var(--text);
}

.docs-article table tbody tr:hover {
  background: rgba(253, 108, 29, 0.03);
}

/* Pillar callout — short anchor on every concept page */
.docs-pillar-callout {
  display: inline-block;
  padding: 6px 14px;
  background: var(--hover-bg);
  color: var(--accent);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.docs-pillar-callout i {
  margin-right: 6px;
}

/* Resource pill — used inline for App / API / Gateway names */
.docs-resource {
  font-weight: 600;
  color: var(--accent);
}

/* Mermaid diagram container — match the card visual language used elsewhere */
.docs-article .mermaid {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px 24px;
  margin: 28px 0;
  text-align: center;
  box-shadow: 0 2px 8px var(--shadow-soft);
  overflow-x: auto;
}

/* Edge labels (Yes / No on decision branches) */
.docs-article .mermaid .edgeLabel {
  font-weight: 500;
  color: var(--muted);
}

/* Docs nav search box styles live in /lib/landing.css — see AIR-1203.
   landing.css is loaded by every docs page (and by every marketing page),
   so a single source of truth there covers both surfaces. */

/* ===== Pillar tile grid (four-pillars page) ===== */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px 0 48px;
}

.pillar-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  border-left: 4px solid transparent;
}

.pillar-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow);
  border-left-color: var(--accent);
}

.pillar-tile-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8c42 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.pillar-tile-icon i {
  font-size: 20px;
  color: white;
}

.pillar-tile h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.pillar-tile p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .pillar-grid { grid-template-columns: 1fr; }
  .pillar-tile {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon title"
      "icon desc";
    column-gap: 14px;
    row-gap: 2px;
    padding: 14px 16px;
    align-items: center;
  }
  .pillar-tile .pillar-tile-icon {
    grid-area: icon;
    margin-bottom: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    align-self: center;
  }
  .pillar-tile .pillar-tile-icon i { font-size: 18px; }
  .pillar-tile h3 { grid-area: title; font-size: 15px; margin-bottom: 2px; }
  .pillar-tile p { grid-area: desc; font-size: 12px; line-height: 1.4; }
}

/* ===== Recipe pages ===== */

/* Tool header at the top of each recipe */
.recipe-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 16px 0 24px;
}

.recipe-tool-icon {
  width: 84px;
  height: 84px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8c42 100%);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(253, 108, 29, 0.25);
}

.recipe-tool-icon i {
  font-size: 38px;
  color: white;
}

.recipe-header-text h1 {
  margin: 0 0 6px;
}

.recipe-header-text .recipe-subtitle {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

/* Before / After connection comparison */
.recipe-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.recipe-comparison-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px 20px;
}

.recipe-comparison-card.before {
  background: var(--bg-light);
}

.recipe-comparison-card.after {
  background: var(--card-bg);
  border-left: 4px solid var(--accent);
  box-shadow: 0 4px 16px rgba(253, 108, 29, 0.06);
}

.recipe-comparison-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.recipe-comparison-card.after .recipe-comparison-label {
  color: var(--accent);
}

.recipe-comparison-card pre {
  margin: 0;
  background: var(--input-bg);
  border: none;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

.recipe-comparison-card.after pre {
  background: rgba(253, 108, 29, 0.06);
}

.recipe-comparison-card .recipe-comparison-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .recipe-comparison { grid-template-columns: 1fr; }
  .recipe-header { gap: 16px; }
  .recipe-tool-icon { width: 64px; height: 64px; border-radius: 14px; }
  .recipe-tool-icon i { font-size: 28px; }
}

/* Recipes landing tile grid */
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 32px 0 40px;
}

.recipe-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  border-left: 4px solid transparent;
}

.recipe-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow);
  border-left-color: var(--accent);
}

.recipe-tile-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8c42 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(253, 108, 29, 0.2);
}

.recipe-tile-icon i {
  font-size: 24px;
  color: white;
}

.recipe-tile h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.recipe-tile p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* Mobile — horizontal layout: icon left, title+description right.
   Avoids the wasted right-side whitespace of the desktop column stack
   when each tile is full-width on a phone. */
@media (max-width: 600px) {
  .recipe-tile {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon title"
      "icon desc";
    column-gap: 16px;
    row-gap: 4px;
    padding: 16px 18px;
    align-items: center;
  }
  .recipe-tile .recipe-tile-icon {
    grid-area: icon;
    margin-bottom: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    align-self: center;
  }
  .recipe-tile .recipe-tile-icon i {
    font-size: 18px;
  }
  .recipe-tile h3 {
    grid-area: title;
    font-size: 15px;
    margin-bottom: 2px;
  }
  .recipe-tile p {
    grid-area: desc;
    font-size: 12.5px;
    line-height: 1.4;
  }
}

/* Verification "trace" — styled as a terminal-ish output */
.recipe-trace {
  background: #1f1f1f;
  color: #e0e0e0;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 16px 0 8px;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
  font-size: 13px;
  line-height: 1.65;
  overflow-x: auto;
  border: 1px solid rgba(0,0,0,0.08);
}

.recipe-trace .rt-comment { color: #8a8a8a; }
.recipe-trace .rt-name { color: #fd9c5d; }
.recipe-trace .rt-value { color: #d8d8d8; }
.recipe-trace .rt-highlight { color: #ffb37a; font-weight: 600; }

/* Numbered step list with accent ticks */
.recipe-steps {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  counter-reset: rstep;
}

.recipe-steps li {
  position: relative;
  padding-left: 48px;
  margin-bottom: 18px;
  counter-increment: rstep;
}

.recipe-steps li::before {
  content: counter(rstep);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8c42 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(253, 108, 29, 0.2);
}

/* Inline "fact strip" — small icons + label/value rows */
.fact-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.fact-strip-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.fact-strip-item i {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--hover-bg);
  color: var(--accent);
  border-radius: 8px;
  font-size: 14px;
  flex-shrink: 0;
}

.fact-strip-item .fact-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 2px;
}

.fact-strip-item .fact-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* ===== Get-started step indicator =====

   Renders a horizontal numbered progression on every get-started page so
   the reader can see where they are in the 6-step flow. Use:

     <ol class="gs-steps" data-current="3">
       <li><a href="...">Sign up</a></li>
       <li><a href="...">Claim address</a></li>
       <li><a href="...">Connect warehouse</a></li>
       ...
     </ol>

   data-current is a 1-based index. Steps before are "done" (filled accent),
   the matching one is "current" (accent ring), later ones are upcoming (grey). */

.gs-steps {
  list-style: none;
  counter-reset: gs;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  margin: 28px 0 36px;
  flex-wrap: wrap;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 12px;
  box-shadow: 0 2px 8px var(--shadow-soft);
}

.gs-steps li {
  counter-increment: gs;
  flex: 1 1 0;
  min-width: 110px;
  position: relative;
  text-align: center;
  padding: 0 4px;
}

/* Connector line between tiles */
.gs-steps li::after {
  content: "";
  position: absolute;
  top: 18px;
  right: -4px;
  width: 8px;
  height: 2px;
  background: var(--border-color-strong);
  z-index: 0;
}

.gs-steps li:last-child::after { display: none; }

/* The whole tile is one anchor — number circle + text inside it */
.gs-steps li a {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.35;
  padding: 4px 4px 6px;
  border-radius: 10px;
  transition: background 0.18s ease, color 0.18s ease;
  position: relative;
  z-index: 1;
}

.gs-steps li a:hover {
  background: var(--hover-bg);
  color: var(--accent);
}

.gs-steps li a::before {
  content: counter(gs);
  display: block;
  margin: 0 auto 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--border-color-strong);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 26px;
  transition: all 0.2s ease;
}

/* Done tiles (steps 1..n-1 when data-current=n) */
.gs-steps[data-current="2"] li:nth-child(-n+1) a::before,
.gs-steps[data-current="3"] li:nth-child(-n+2) a::before,
.gs-steps[data-current="4"] li:nth-child(-n+3) a::before,
.gs-steps[data-current="5"] li:nth-child(-n+4) a::before,
.gs-steps[data-current="6"] li:nth-child(-n+5) a::before {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 4px 10px rgba(253, 108, 29, 0.25);
}

.gs-steps[data-current="2"] li:nth-child(-n+1) a,
.gs-steps[data-current="3"] li:nth-child(-n+2) a,
.gs-steps[data-current="4"] li:nth-child(-n+3) a,
.gs-steps[data-current="5"] li:nth-child(-n+4) a,
.gs-steps[data-current="6"] li:nth-child(-n+5) a {
  color: var(--text);
  font-weight: 600;
}

/* Current tile */
.gs-steps[data-current="1"] li:nth-child(1) a::before,
.gs-steps[data-current="2"] li:nth-child(2) a::before,
.gs-steps[data-current="3"] li:nth-child(3) a::before,
.gs-steps[data-current="4"] li:nth-child(4) a::before,
.gs-steps[data-current="5"] li:nth-child(5) a::before,
.gs-steps[data-current="6"] li:nth-child(6) a::before {
  background: var(--card-bg);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 4px rgba(253, 108, 29, 0.15);
}

.gs-steps[data-current="1"] li:nth-child(1) a,
.gs-steps[data-current="2"] li:nth-child(2) a,
.gs-steps[data-current="3"] li:nth-child(3) a,
.gs-steps[data-current="4"] li:nth-child(4) a,
.gs-steps[data-current="5"] li:nth-child(5) a,
.gs-steps[data-current="6"] li:nth-child(6) a {
  color: var(--accent);
  font-weight: 700;
}

/* Mobile — compact horizontal row of numbered circles with connectors.
   The current step's name is already in the H1 above the indicator, so
   per-tile labels are hidden to save vertical space. */
@media (max-width: 700px) {
  .gs-steps {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    padding: 14px 12px;
  }
  .gs-steps li {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 0;
  }
  .gs-steps li::after {
    /* Span between this circle and the next one */
    top: 13px;
    left: calc(50% + 16px);
    right: auto;
    width: calc(100% - 32px);
    height: 2px;
  }
  .gs-steps li a {
    display: block;
    padding: 0;
    font-size: 0;        /* hide labels */
    background: transparent;
  }
  .gs-steps li a:hover { background: transparent; }
  .gs-steps li a::before {
    margin: 0 auto;
    width: 28px;
    height: 28px;
    line-height: 24px;
    font-size: 12px;
  }
}

/* Floating prev/next arrows — fixed to the viewport edges so they don't
   move when the reader scrolls. Hidden on narrow screens; the in-flow
   .gs-next strip at the bottom of each page handles mobile. */
.gs-float-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8c42 100%);
  color: white;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(253, 108, 29, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 950;
}

.gs-float-nav i {
  font-size: 20px;
}

.gs-float-nav:hover {
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 12px 32px rgba(253, 108, 29, 0.45);
}

.gs-float-prev { left: 28px; }
.gs-float-next { right: 28px; }

.gs-float-nav .gs-float-label {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.gs-float-nav:hover .gs-float-label { opacity: 1; }

@media (max-width: 1180px) {
  .gs-float-prev { left: 16px; }
  .gs-float-next { right: 16px; }
}

@media (max-width: 980px) {
  .gs-float-nav { display: none; }
}

/* "What you'll do" hero block at the top of a step page */
.gs-step-hero {
  background: linear-gradient(135deg, rgba(253, 108, 29, 0.04) 0%, rgba(253, 108, 29, 0.0) 100%);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
}

.gs-step-hero .gs-step-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 6px;
}

.gs-step-hero h2 {
  margin: 0 0 8px;
  scroll-margin-top: 100px;
}

.gs-step-hero p {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
}

/* "Paste a URL" widget preview — illustrative only, mirrors the actual App
   configuration card. Inputs are not wired to anything; this is HTML so the
   widget reflows responsively but stays display-only. */
.cw-preview-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 28px 0 8px;
}

.cw-widget {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px 32px;
  margin: 0 0 28px;
  box-shadow: 0 4px 20px var(--shadow-soft);
}

.cw-widget-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.cw-widget-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8c42 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(253, 108, 29, 0.25);
}

.cw-widget-icon i {
  color: white;
  font-size: 22px;
}

.cw-widget-header h3 {
  margin: 4px 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.cw-widget-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.cw-widget-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.cw-widget-form input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--card-bg);
  border: 2px solid var(--accent);
  border-radius: 10px;
  outline: none;
  box-sizing: border-box;
}

.cw-widget-form input::placeholder {
  color: var(--muted);
}

.cw-widget-form .cw-hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--accent);
  opacity: 0.85;
}

@media (max-width: 600px) {
  .cw-widget { padding: 20px; }
  .cw-widget-header { gap: 14px; }
  .cw-widget-header h3 { font-size: 18px; }
}

/* Connection-topology flow — Clients → gateway address → Warehouse.
   Visual only; mirrors the App's "your tenant is live" status panel.
   Breaks out of the prose max-width on desktop so the three pills can
   sit on a single horizontal row without wrapping. */
.cw-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 24px -90px;
  box-shadow: 0 2px 8px var(--shadow-soft);
  overflow-x: auto;
}

.cw-flow-node {
  padding: 9px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border-color-strong);
  border-radius: 8px;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cw-flow-node i {
  color: var(--muted);
  font-size: 13px;
}

.cw-flow-node.cw-flow-gateway {
  background: linear-gradient(135deg, var(--accent) 0%, #ff8c42 100%);
  color: white;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(253, 108, 29, 0.3);
}

.cw-flow-node.cw-flow-clients {
  font-family: Inter, sans-serif;
}

.cw-flow-arrow {
  color: var(--muted);
  font-size: 14px;
  flex-shrink: 0;
}

/* Tablet — drop the breakout, allow wrap if absolutely needed */
@media (max-width: 1024px) {
  .cw-flow {
    margin: 24px 0;
    flex-wrap: wrap;
  }
}

/* Phone — column layout */
@media (max-width: 760px) {
  .cw-flow {
    flex-direction: column;
    align-items: stretch;
  }
  .cw-flow-node {
    justify-content: center;
    white-space: normal;
    word-break: break-all;
  }
  .cw-flow-arrow { transform: rotate(90deg); align-self: center; }
}

/* ===== Get-started gestalt — "here's the whole product in one glance".
   Topology row (BI tools → Gateway → warehouse) over a three-up legend of
   what the Gateway does per request. Breaks out wider than the prose column
   on desktop. Token-driven; stacks on mobile. ===== */
.gs-gestalt {
  margin: 8px -90px 36px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 4px 16px var(--shadow-soft);
  overflow: hidden;
}

.gs-gestalt-flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
  padding: 28px 28px 24px;
  background: linear-gradient(135deg, rgba(253, 108, 29, 0.04) 0%, transparent 70%);
}

.gs-gestalt-node {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 18px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-color-strong);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.gs-gestalt-node > i {
  font-size: 24px;
  color: var(--muted);
  margin-bottom: 4px;
}

.gs-gestalt-node-title { font-size: 16px; font-weight: 700; color: var(--text); }
.gs-gestalt-node-sub { font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* Middle node — the Gateway is the hero */
.gs-gestalt-node-gateway {
  background: linear-gradient(135deg, var(--accent) 0%, #ff8c42 100%);
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(253, 108, 29, 0.3);
  transform: scale(1.04);
}
.gs-gestalt-node-gateway > i,
.gs-gestalt-node-gateway .gs-gestalt-node-title { color: #fff; }
.gs-gestalt-node-gateway .gs-gestalt-node-sub { color: rgba(255, 255, 255, 0.9); }

.gs-gestalt-arrow {
  align-self: center;
  color: var(--accent);
  font-size: 18px;
  flex-shrink: 0;
}

.gs-gestalt-behaviors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-color);
  border-top: 1px solid var(--border-color);
}

.gs-gestalt-behavior {
  background: var(--card-bg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gs-gestalt-behavior > i {
  font-size: 18px;
  color: var(--accent);
}

.gs-gestalt-behavior p {
  margin: 0 !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  color: var(--muted) !important;
}
.gs-gestalt-behavior p strong { color: var(--text); font-weight: 700; }

/* The cache-hit behavior is the payoff — tint it */
.gs-gestalt-behavior-hit { background: rgba(253, 108, 29, 0.05); }

@media (max-width: 1024px) {
  .gs-gestalt { margin: 8px 0 32px; }
}

@media (max-width: 760px) {
  .gs-gestalt-flow { flex-direction: column; }
  .gs-gestalt-arrow { transform: rotate(90deg); }
  .gs-gestalt-node-gateway { transform: none; }
  .gs-gestalt-behaviors { grid-template-columns: 1fr; }
}


/* Field map for connect-your-warehouse — visual two-column */
.gs-fields {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 12px 20px;
  margin: 20px 0;
  padding: 20px 24px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.gs-fields dt {
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  align-self: start;
  padding-top: 2px;
}

.gs-fields dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

@media (max-width: 700px) {
  .gs-fields {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }
  .gs-fields dt { padding-top: 8px; }
  .gs-fields dd { padding-bottom: 8px; border-bottom: 1px solid var(--border-color-subtle); }
  .gs-fields dt:last-of-type + dd { border-bottom: none; }
}

/* Next-step strip at the bottom of each step page */
.gs-next {
  margin: 48px 0 16px;
  padding: 24px 28px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.gs-next:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(253, 108, 29, 0.08);
  transform: translateY(-2px);
}

.gs-next-text { flex: 1; }

.gs-next-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 4px;
}

.gs-next-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.gs-next-arrow {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8c42 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.gs-next:hover .gs-next-arrow { transform: translateX(4px); }

/* Gateway-address visual breakdown (claim-your-gateway-address) */
.gs-address {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px 32px;
  margin: 24px 0;
  text-align: center;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  position: relative;
}

.gs-address .gs-address-tenant {
  color: var(--accent);
  background: var(--hover-bg);
  padding: 2px 8px;
  border-radius: 6px;
}

.gs-address-legend {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 20px;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.gs-address-legend span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.gs-address-legend .gs-legend-tenant::before { background: var(--accent); }
.gs-address-legend .gs-legend-system::before { background: #999; }

@media (max-width: 600px) {
  .gs-address { font-size: 16px; padding: 20px 16px; word-break: break-all; }
  .gs-address-legend { flex-direction: column; gap: 8px; }
}

/* ===== Cost calculator (what-is-airbrx page) ===== */
.cost-calculator {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px;
  margin: 28px 0;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 32px;
  align-items: center;
  box-shadow: 0 2px 8px var(--shadow-soft);
}

.cost-calculator-text {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
}

.cost-calculator-text input {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(253, 108, 29, 0.06);
  border: 1px solid rgba(253, 108, 29, 0.3);
  border-radius: 6px;
  padding: 4px 10px;
  width: 84px;
  text-align: center;
  -moz-appearance: textfield;
}

.cost-calculator-text input::-webkit-outer-spin-button,
.cost-calculator-text input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cost-calculator-text input:focus {
  outline: none;
  background: rgba(253, 108, 29, 0.12);
  border-color: var(--accent);
}

.cost-calculator-result {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.cost-calculator-result .cc-savings {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.cost-calculator-result .cc-savings-label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

.cost-calculator-result .cc-yearly {
  font-size: 14px;
  color: var(--text);
  margin-top: 8px;
}

.cost-calculator-result .cc-yearly strong {
  color: var(--accent);
}

.cost-calculator-chart {
  position: relative;
  width: 100%;
  height: 200px;
}

.cost-calculator-caveat {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin: 12px 0 0;
}

@media (max-width: 700px) {
  .cost-calculator {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .cost-calculator-chart { height: 220px; }
}

/* End-of-article CTA */
.docs-article-cta {
  margin-top: 64px;
  padding: 32px;
  background: var(--bg-light);
  border-radius: 16px;
  text-align: center;
}

.docs-article-cta h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.docs-article-cta p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .docs-hero-title { font-size: 36px; }
  .docs-hero-subtitle { font-size: 16px; }
  .docs-cta-content h2 { font-size: 28px; }
  .docs-article h1 { font-size: 32px; }
  .docs-article h2 { font-size: 24px; }
  .docs-article-page { padding: 100px 20px 40px; }
}

/* ===== Get-started overview grid =====
   6-tile visual hero for docs/get-started/index.html. Tiles link to
   each step page; the final tile (See the cache work) shows hits-in-
   dashboard as the payoff. Fully token-driven — flips with theme. */

.gs-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0 36px;
}

.gs-overview-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 22px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 180px;
}

.gs-overview-tile:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px var(--shadow);
}

.gs-overview-num {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8c42 100%);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(253, 108, 29, 0.25);
}

.gs-overview-icon {
  font-size: 26px;
  color: var(--accent);
  margin-top: 2px;
}

.gs-overview-tile h3 {
  margin: 12px 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.gs-overview-outcome {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.gs-overview-outcome code {
  font-size: 12.5px;
}

.gs-overview-or {
  color: var(--accent);
  margin: 0 2px;
  font-weight: 600;
}

.gs-overview-tile-final {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(253, 108, 29, 0.05) 0%, var(--card-bg) 80%);
}

.gs-overview-tile-final h3 {
  color: var(--accent);
}

@media (max-width: 900px) {
  .gs-overview-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .gs-overview-grid { grid-template-columns: 1fr; }
  .gs-overview-tile { min-height: 0; }
}

/* docs.css has no DARK MODE block — every component above references
   tokens defined in /lib/landing.css :root + html.dark-mode, so the
   docs surface flips automatically. Add overrides here only for things
   that can't be expressed as a single token redefinition. */
