/* Tokens mirror apps/ui/src/styles/base.css so oktapod.ai reads as the same
   product as the web, desktop, and phone apps: the system sans at regular and
   medium weight, true greys, fills instead of strokes, and the signal teal kept
   for the mark, primary emphasis, and small status marks. */
:root {
  /* `only` stops a browser in dark mode (Chrome's auto-dark, Samsung Internet)
     from force-darkening the light design. */
  color-scheme: only light;
  --bg: #ffffff;
  --fill: #f4f4f5;
  --fill-strong: #ebebed;
  --ink: #18181b;
  --ink-hover: #3f3f46;
  --muted: #52525b;
  --faint: #62626c;
  --line: #e2e2e5;
  --signal: #0f766e;
  --signal-dark: #075f58;
  --signal-text: #0e6c65;
  --signal-subtle: #f0fdfa;
  --white: #ffffff;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* DM Mono stays on what is literally machine output: commands and codes. */
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.07);
  --shadow-xl: 0 26px 64px rgba(15, 23, 42, 0.13);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  /* Narrow on purpose: one reading column, like the apps. */
  --page: min(1040px, calc(100vw - 48px));
  --measure: 680px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

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

h1,
h2,
h3 {
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.08;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(42px, 6vw, 72px);
  letter-spacing: -0.035em;
  line-height: 1.02;
}

h1 em {
  color: var(--faint);
  font-style: normal;
}

h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  letter-spacing: -0.025em;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--white);
  background-color: var(--ink);
  border-radius: var(--radius-md);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.section-pad {
  width: var(--page);
  margin: 0 auto;
  padding: 112px 0;
}

.section-intro {
  display: grid;
  gap: 10px;
  max-width: var(--measure);
  margin-bottom: 40px;
}

.section-intro h2 {
  margin-bottom: 0;
}

.section-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.button {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 150ms ease-out,
    transform 150ms ease-out;
}

.button:active {
  transform: scale(0.98);
}

.button-primary,
.button-dark {
  color: var(--white);
  background-color: var(--ink);
}

.button-primary:hover,
.button-dark:hover {
  background-color: var(--ink-hover);
}

.button-soft {
  color: var(--ink);
  background-color: var(--fill);
}

.button-soft:hover {
  background-color: var(--fill-strong);
}

.text-link {
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}

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

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  :root {
    --page: calc(100vw - 32px);
  }

  .section-pad {
    padding: 64px 0;
  }
}

/* docs.oktapod.ai. Appended to apps/landing/site/src/styles/base.css at build
   time, so the docs share every token with oktapod.ai and the apps. */

.docs-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 24px;
  background-color: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}

.docs-header .wordmark {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
}

.docs-header .wordmark b {
  padding: 2px 9px;
  color: var(--signal-text);
  background-color: var(--signal-subtle);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.docs-header-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.docs-header-links a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

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

.docs-header-links .header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  color: var(--white);
  background-color: var(--ink);
  border-radius: 999px;
  font-weight: 500;
}

.docs-header-links .header-cta:hover {
  color: var(--white);
  background-color: var(--ink-hover);
}

.docs-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 208px;
  gap: 48px;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

.docs-nav {
  position: sticky;
  top: 64px;
  align-self: start;
  max-height: calc(100vh - 64px);
  padding: 28px 0 40px;
  overflow-y: auto;
}

.docs-nav-mobile {
  display: none;
}

.nav-tab + .nav-tab {
  margin-top: 24px;
}

.nav-tab-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.nav-group-title {
  margin: 14px 0 4px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 500;
}

.docs-nav ul {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-nav li a {
  display: block;
  padding: 6px 10px;
  color: var(--muted);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}

.docs-nav li a:hover {
  color: var(--ink);
  background-color: var(--fill);
}

.docs-nav li a[aria-current="page"] {
  color: var(--ink);
  background-color: var(--fill);
  font-weight: 500;
}

.docs-main {
  min-width: 0;
  padding: 40px 0 72px;
}

.docs-article {
  max-width: 720px;
}

.docs-article h1 {
  margin-bottom: 12px;
  font-size: clamp(32px, 4vw, 44px);
}

.docs-lede {
  margin: 0 0 32px;
  padding-bottom: 28px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 18px;
}

.docs-article h2,
.docs-article h3 {
  position: relative;
  scroll-margin-top: 84px;
}

.docs-article h2 {
  margin: 44px 0 14px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.docs-article h3 {
  margin: 32px 0 10px;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.anchor {
  position: absolute;
  left: -22px;
  color: var(--faint);
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
}

h2:hover .anchor,
h3:hover .anchor {
  opacity: 1;
}

.docs-article p,
.docs-article li {
  color: #3f3f46;
  font-size: 16px;
  line-height: 1.7;
}

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

.docs-article ul,
.docs-article ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.docs-article li + li {
  margin-top: 4px;
}

.docs-article a {
  color: var(--signal-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.docs-article strong {
  color: var(--ink);
  font-weight: 600;
}

.docs-article :not(pre) > code {
  padding: 2px 6px;
  color: var(--ink);
  background-color: var(--fill);
  border-radius: 6px;
  font: 400 0.88em/1.4 var(--mono);
  overflow-wrap: anywhere;
}

.docs-article pre {
  margin: 0 0 20px;
  padding: 16px 18px;
  overflow-x: auto;
  color: #24292f;
  background-color: #f6f6f7;
  border-radius: var(--radius-md);
  font: 400 13.5px/1.6 var(--mono);
}

.table-wrap {
  margin: 0 0 22px;
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 1px var(--line);
}

.docs-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.docs-article th,
.docs-article td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.docs-article th {
  color: var(--ink);
  background-color: var(--fill);
  font-weight: 500;
}

.docs-article tr:last-child td {
  border-bottom: 0;
}

.docs-article td {
  color: #3f3f46;
}

.note {
  margin: 0 0 20px;
  padding: 14px 18px;
  background-color: var(--signal-subtle);
  border-radius: var(--radius-md);
}

.note p:last-child {
  margin-bottom: 0;
}

.steps {
  display: grid;
  gap: 4px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: docs-step;
}

.docs-article .step {
  position: relative;
  margin: 0;
  padding: 0 0 12px 44px;
  counter-increment: docs-step;
}

.step::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--signal-text);
  background-color: var(--signal-subtle);
  border-radius: 50%;
  content: counter(docs-step);
  font-size: 13px;
  font-weight: 600;
}

.docs-article .step-title {
  margin: 2px 0 6px;
  color: var(--ink);
  font-weight: 500;
}

.card-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 24px;
}

.docs-article .card {
  display: block;
  padding: 18px 20px;
  color: inherit;
  background-color: var(--fill);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: background-color 150ms ease-out;
}

.docs-article a.card:hover {
  background-color: var(--fill-strong);
}

.docs-article .card p {
  margin: 0;
  font-size: 15px;
}

.docs-article .card .card-title {
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 500;
}

.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 720px;
  margin-top: 48px;
}

.docs-pager a {
  display: grid;
  gap: 2px;
  padding: 14px 18px;
  color: var(--ink);
  background-color: var(--fill);
  border-radius: var(--radius-lg);
  font-weight: 500;
  text-decoration: none;
}

.docs-pager a:hover {
  background-color: var(--fill-strong);
}

.docs-pager small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.pager-next {
  text-align: right;
}

.docs-toc {
  position: sticky;
  top: 64px;
  align-self: start;
  padding: 40px 0;
}

.docs-toc p {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.docs-toc ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-toc a {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
}

.docs-toc a:hover {
  color: var(--ink);
}

.docs-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 28px 24px 40px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.docs-footer p {
  margin: 0;
}

.docs-footer nav {
  display: flex;
  gap: 18px;
}

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

/* highlight.js, light: GitHub-like token colours on the code fill. */
.hljs-comment,
.hljs-quote {
  color: #6e7781;
}

.hljs-keyword,
.hljs-built_in,
.hljs-selector-tag {
  color: #cf222e;
}

.hljs-string,
.hljs-attr,
.hljs-template-variable {
  color: #0a3069;
}

.hljs-number,
.hljs-literal,
.hljs-variable {
  color: #0550ae;
}

.hljs-meta,
.hljs-title {
  color: #8250df;
}

@media (max-width: 1180px) {
  .docs-shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .docs-toc {
    display: none;
  }
}

@media (max-width: 820px) {
  .docs-header {
    padding: 0 16px;
  }

  .docs-header-links a:not(.header-cta) {
    display: none;
  }

  .docs-header-links .header-cta {
    min-height: 44px;
  }

  .docs-shell {
    display: block;
    padding: 0 16px;
  }

  .docs-nav {
    position: static;
    max-height: none;
    padding: 16px 0 0;
    overflow: visible;
  }

  .docs-nav-desktop {
    display: none;
  }

  .docs-nav-mobile {
    display: block;
    padding: 0 16px;
    background-color: var(--fill);
    border-radius: var(--radius-lg);
  }

  .docs-nav-mobile summary {
    min-height: 48px;
    padding: 13px 0;
    color: var(--ink);
    cursor: pointer;
    font-weight: 500;
  }

  .docs-nav-mobile[open] {
    padding-bottom: 16px;
  }

  .docs-main {
    padding-top: 28px;
  }

  .anchor {
    display: none;
  }

  .card-group,
  .docs-pager {
    grid-template-columns: 1fr;
  }

  .docs-footer {
    padding: 24px 16px 32px;
  }
}

.docs-article blockquote {
  margin: 0 0 18px;
  padding: 12px 16px;
  background-color: var(--fill);
  border-radius: var(--radius-md);
}

.docs-article blockquote p:last-child {
  margin-bottom: 0;
}

/* Search: one box in the header, results drop below it. */
.docs-search {
  position: relative;
  flex: 1;
  max-width: 380px;
  margin: 0 24px;
}

.docs-search input {
  width: 100%;
  height: 38px;
  padding: 0 14px;
  color: var(--ink);
  background-color: var(--fill);
  border: 0;
  border-radius: 999px;
  font: 400 14px/1 var(--sans);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.docs-search input:focus {
  background-color: var(--bg);
  box-shadow: 0 0 0 2px var(--signal);
}

.docs-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 30;
  display: grid;
  gap: 2px;
  max-height: min(480px, 70vh);
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  background-color: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow:
    0 0 0 1px var(--line),
    var(--shadow-xl);
}

.docs-search-results[hidden] {
  display: none;
}

.docs-search-results a {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  color: var(--ink);
  border-radius: var(--radius-md);
  text-decoration: none;
}

.docs-search-results a:hover,
.docs-search-results [aria-selected="true"] a {
  background-color: var(--fill);
}

.docs-search-results strong {
  font-size: 14px;
  font-weight: 500;
}

.docs-search-results span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.docs-search-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 820px) {
  .docs-search {
    margin: 0 10px;
  }

  .docs-search {
    position: static;
  }

  .docs-search input {
    height: 44px;
  }

  .docs-search-results {
    position: fixed;
    top: 72px;
    right: 12px;
    left: 12px;
  }

  .docs-header .wordmark span {
    display: none;
  }
}
