/* falcon.com docs pages. Loaded after home.css, whose tokens, header, footer, buttons and type
   they reuse; this file only adds the guide layout, the status badges and the API list.
   Badge pairings meet WCAG AA in both themes. */

:root {
  --live-bg: #dcfce7;
  --live-text: #166534;
  --live-line: #86efac;
  --pilot-bg: #e0f2fe;
  --pilot-text: #075985;
  --pilot-line: #7dd3fc;
}
@media (prefers-color-scheme: dark) {
  :root {
    --live-bg: #0f2a1a;
    --live-text: #86efac;
    --live-line: #1f5133;
    --pilot-bg: #0c2433;
    --pilot-text: #7dd3fc;
    --pilot-line: #1c4a66;
  }
}

/* The docs header nav is always shown; it has three short links. */
.docs-nav {
  display: flex;
  gap: 1.25rem;
}
.docs-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}
.top-row .logo {
  white-space: nowrap;
}
@media (max-width: 559px) {
  .top-row .btn-small {
    display: none;
  }
  .docs-nav {
    gap: 1rem;
  }
}

.docs {
  padding: 2.5rem 0 5rem;
}
.docs section {
  padding: 0;
}
.docs h1 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
}
.docs h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  line-height: 1.2;
}
.docs h3 {
  margin: 0 0 0.375rem;
  font-size: 1.0625rem;
}
.docs .lede {
  max-width: 44rem;
  margin-bottom: 1.5rem;
}
.docs-head {
  margin-bottom: 1.5rem;
}
.prose {
  max-width: 44rem;
}
.prose p {
  margin: 0 0 1rem;
}
.docs-section {
  margin-top: 3.5rem;
}

/* Breadcrumbs */
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.crumbs li + li::before {
  content: "›";
  margin-right: 0.5rem;
}
.crumbs a {
  color: var(--text-muted);
}

/* Getting started */
.steps {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (min-width: 720px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1040px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 3.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.25rem;
  top: 1.25rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-size: 0.875rem;
  font-weight: 600;
}
.steps p,
.guide-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9875rem;
}

/* Guide cards */
.guide-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .guide-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1040px) {
  .guide-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.guide-card {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.guide-card h3 a,
.steps h3 a {
  text-decoration: none;
}
.guide-card h3 a:hover,
.steps h3 a:hover {
  text-decoration: underline;
}
.guide-card .guide-meta {
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

/* Guide layout: a list of guides beside the page on wide screens */
.docs-layout {
  display: grid;
  gap: 2rem;
}
@media (min-width: 960px) {
  .docs-layout {
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 3rem;
  }
  .docs-side {
    position: sticky;
    top: 1.5rem;
    align-self: start;
  }
}
.docs-main {
  min-width: 0;
  max-width: 48rem;
}
.docs-side-title {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.docs-side ul,
.contents ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.docs-side li {
  margin: 0;
}
.docs-side a {
  display: block;
  padding: 0.3125rem 0.75rem;
  border-left: 2px solid var(--line);
  color: var(--text-muted);
  font-size: 0.9375rem;
  text-decoration: none;
}
.docs-side a:hover {
  color: var(--text);
}
.docs-side a[aria-current="page"] {
  border-left-color: var(--primary);
  color: var(--text);
  font-weight: 600;
}
@media (max-width: 959px) {
  .docs-side {
    order: 2;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
  }
}

.docs-shot {
  margin: 2rem 0;
}
.docs-shot img {
  width: 100%;
}
.docs-shot figcaption {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.contents {
  margin: 2rem 0 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-band);
}
.contents li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.9375rem;
}
.contents .count {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* One feature in a guide */
.docs .feature {
  padding-top: 2.5rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 1rem;
}
.feature-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}
.feature-head h2,
.feature-head h3 {
  margin: 0;
}
.feature > p {
  margin: 0 0 1rem;
}
.feature h3 {
  margin-top: 1.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.feature ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.feature li {
  margin-bottom: 0.25rem;
}
.feature-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.feature-meta code {
  font-size: 0.8125rem;
}
.next {
  margin-top: 3rem;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 0.0625rem 0.625rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-live {
  border-color: var(--live-line);
  background: var(--live-bg);
  color: var(--live-text);
}
.badge-pilot {
  border-color: var(--pilot-line);
  background: var(--pilot-bg);
  color: var(--pilot-text);
}
.badge-coming {
  border-color: var(--next-line);
  background: var(--next-bg);
  color: var(--next-text);
}

/* The feature list */
.summary {
  margin: 0 0 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-band);
}
.legend {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}
.legend .badge {
  min-width: 6.5rem;
  margin-right: 0.5rem;
  text-align: center;
}
.feature-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 800px) {
  .feature-list {
    grid-template-columns: 1fr 1fr;
  }
}
.feature-list li {
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.feature-list h3 {
  font-size: 1rem;
}
.feature-list h3 a {
  color: var(--text);
  text-decoration: none;
}
.feature-list h3 a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.feature-list p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.docs-section h2 a {
  color: var(--text);
  text-decoration: none;
}
.docs-section h2 a:hover {
  color: var(--primary);
}

/* The API overview: one line per operation */
.api-area > p {
  max-width: 44rem;
  color: var(--text-muted);
}
.ops {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.ops li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.125rem 0.625rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  scroll-margin-top: 1rem;
}
.ops li:target {
  background: var(--primary-container);
}
.op-title {
  font-weight: 500;
}
.ops code {
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.op-mcp,
.op-api {
  padding: 0 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.6;
}
.op-mcp {
  background: var(--primary-container);
  color: var(--on-primary-container);
}
.op-api {
  background: var(--surface-high);
  color: var(--text-muted);
}
.op-detail {
  flex-basis: 100%;
  color: var(--text-muted);
  font-size: 0.875rem;
}
