/* ========= docs.inoh.app =========
   Standalone stylesheet for the documentation host. It deliberately does not
   pull in styles.css: the docs share only the two font faces with the marketing
   site, and loading 2500 lines of landing-page CSS to get them would make every
   docs page pay for layout it never uses. The woff2 files themselves are shared,
   so the browser cache is not duplicated. */

/* ========= SELF-HOSTED FONTS =========
   Reason: served from our own origin so privacy blockers that reject
   fonts.googleapis.com cannot break the typography. Same files styles.css uses. */
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-serif-display-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin-var.woff2') format('woff2');
}

/* ========= TOKENS ========= */
:root {
  --paper: #f2ede2;
  --surface: #ffffff;
  --ink: #2b1d16;
  --muted: #6f625b;
  --rule: #ded6c8;
  --coral: #ee6a4c;
  --coral-deep: #c94e33;

  /* Terminal-dark family, used by code blocks and the media placeholder */
  --code-bg: #171513;
  --code-border: #3a342f;
  --code-fg: #f7f3eb;
  --code-icon: #c9c1b8;

  /* Terminal window chrome, used by the CLI sections */
  --terminal-bar: #24211e;
  --terminal-output: #afa79e;
  --terminal-red: #ee6a4c;
  --terminal-amber: #d9a441;
  --terminal-green: #72966a;

  /* The one warm tint, reserved for a caveat worth stopping on */
  --note-bg: #f7e7df;
  --note-fg: #7c3e2d;

  --nav-rule: #e4b6a6;

  --display: 'DM Serif Display', Georgia, serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --header-height: 80px;
  --sidebar-width: 260px;
  --content-width: 756px;
}

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

/* The header is sticky, so an anchor that scrolls its target to y=0 parks the
   heading underneath it. Every in-page target reserves the header's height plus
   a little air. --header-height shrinks on mobile, so this follows it. */
.docs-section,
.docs-command,
.docs-command-group {
  scroll-margin-top: calc(var(--header-height) + 20px);
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 22px;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}

a {
  color: var(--coral-deep);
}

/* ========= HEADER ========= */
.docs-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  height: var(--header-height);
  background: var(--paper);
  /* The rule is an inset shadow rather than a border so the content box keeps
     the header's full even height. With border-box sizing a 1px border leaves
     an odd 63px box, and anything centred in it lands on a half pixel and
     renders soft. Visually identical to border-bottom. */
  box-shadow: inset 0 -1px 0 var(--rule);
}

.docs-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  width: var(--sidebar-width);
  height: var(--header-height);
  padding-inline: 28px;
  border-right: 1px solid var(--rule);
}

.docs-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.docs-brand-name {
  font-family: var(--display);
  font-size: 25px;
  line-height: 28px;
  color: #000;
}

.docs-brand-badge {
  padding: 1px 7px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-size: 12px;
  line-height: 20px;
  color: var(--muted);
}

.docs-header-actions {
  display: flex;
  flex-grow: 1;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding-inline: 28px;
}

.docs-search-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 390px;
  height: 44px;
  padding-inline: 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-family: inherit;
  cursor: pointer;
}

.docs-search-trigger:hover {
  border-color: var(--nav-rule);
}

.docs-search-icon {
  flex-shrink: 0;
  color: var(--muted);
}

.docs-search-placeholder {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.docs-search-placeholder {
  margin-right: auto;
}

.docs-search-shortcut {
  padding: 2px 7px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  font-size: 12px;
  line-height: 20px;
  color: var(--muted);
}

.docs-open-app {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--coral-deep);
  text-decoration: none;
}

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

/* ========= SHELL ========= */
.docs-shell {
  display: flex;
  align-items: flex-start;
}

/* ========= SIDEBAR ========= */
.docs-nav {
  position: sticky;
  top: var(--header-height);
  flex-shrink: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 28px 20px;
  background: var(--paper);
  border-right: 1px solid var(--rule);
}

.docs-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 26px;
  padding-inline: 10px;
}

.docs-nav-label {
  margin: 0;
  font-size: 11px;
  line-height: 18px;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

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

.docs-nav-pages,
.docs-nav-nested {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-nav-page {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 44px;
  padding-inline: 10px;
  background: none;
  border: 0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.docs-nav-group:not(.is-open) > .docs-nav-nested {
  display: none;
}

.docs-nav-page:hover {
  background: rgb(43 29 22 / 4%);
}

.docs-nav-page.is-active {
  background: rgb(238 106 76 / 12%);
  color: var(--coral-deep);
  font-weight: 700;
}

.docs-nav-page.is-active:hover {
  background: rgb(238 106 76 / 16%);
}

.docs-nav-chevron {
  flex-shrink: 0;
  opacity: 0.7;
  transition: transform 0.15s ease-out;
}

.docs-nav-group.is-open > .docs-nav-page .docs-nav-chevron {
  transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
  .docs-nav-chevron {
    transition: none;
  }
}

.docs-nav-nested {
  margin-left: 10px;
  padding-left: 16px;
  border-left: 2px solid var(--nav-rule);
}

.docs-nav-category {
  display: flex;
  align-items: flex-end;
  height: 38px;
  padding: 0 10px 6px;
  font-size: 11px;
  line-height: 18px;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.docs-nav-item {
  display: block;
  padding: 11px 10px;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 6px;
}

.docs-nav-item:hover {
  background: rgb(43 29 22 / 4%);
}

.docs-nav-item.is-current {
  color: var(--coral-deep);
  font-weight: 700;
}

/* ========= ARTICLE ========= */
.docs-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
  min-width: 0;
  padding: 54px 28px 80px;
}

.docs-article {
  width: 100%;
  max-width: var(--content-width);
}

.docs-hero {
  padding-bottom: 36px;
}

.docs-eyebrow {
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--coral-deep);
}

.docs-hero h1 {
  margin: 14px 0 0;
  font-family: var(--display);
  font-size: 52px;
  line-height: 56px;
  letter-spacing: -0.025em;
  font-weight: 400;
  color: var(--ink);
}

.docs-lede {
  margin: 14px 0 0;
  max-width: 650px;
  font-size: 19px;
  line-height: 30px;
  color: var(--muted);
}

/* ========= CLIENT SECTION ========= */
.docs-section {
  padding: 34px 0;
  border-top: 1px solid var(--rule);
}

/* The first section carries the heavier rule, as the design has it, so the eye
   registers where the hero ends and the reference begins. */
.docs-section:first-of-type {
  padding-top: 42px;
  border-top-width: 2px;
  border-top-color: var(--ink);
}

.docs-section-head .docs-eyebrow {
  font-size: 11px;
  line-height: 16px;
}

.docs-section h2 {
  margin: 5px 0 0;
  font-family: var(--display);
  font-size: 30px;
  line-height: 36px;
  font-weight: 400;
  color: var(--ink);
}

.docs-media {
  margin: 22px 0 0;
  overflow: hidden;
  border: 1px solid var(--code-border);
  border-radius: 14px;
  background: var(--code-bg);
  line-height: 0;
}

.docs-media img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========= STEPS ========= */
.docs-steps {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.docs-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.docs-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 13px;
  line-height: 16px;
  font-weight: 700;
  color: var(--ink);
}

.docs-step-body {
  flex-grow: 1;
  min-width: 0;
  padding-top: 3px;
}

/* Direct child only. A terminal block nests its own paragraphs inside the step
   body, and these rules were overriding their colour and size. */
.docs-step-body > p {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--ink);
}

.docs-step-body > p code {
  font-family: var(--mono);
  font-size: 13.5px;
  background: rgb(43 29 22 / 6%);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ========= CODE BLOCK ========= */
.docs-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 0 14px 0 16px;
  min-height: 58px;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 10px;
}

.docs-code.is-block {
  align-items: flex-start;
  padding: 14px 14px 14px 16px;
}

.docs-code pre {
  margin: 0;
  overflow-x: auto;
  flex-grow: 1;
  min-width: 0;
}

.docs-code code {
  display: block;
  padding: 0;
  background: none;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 18px;
  color: var(--code-fg);
  white-space: pre;
}

.docs-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--code-icon);
  cursor: pointer;
}

.docs-copy:hover {
  background: rgb(255 255 255 / 8%);
  color: var(--code-fg);
}

.docs-copy.is-copied {
  color: var(--coral);
}

/* ========= NOTE ========= */
.docs-note {
  margin: 22px 0 0;
  padding: 14px 16px;
  background: var(--note-bg);
  border-radius: 10px;
  font-size: 13px;
  line-height: 20px;
  color: var(--note-fg);
}

.docs-note code {
  font-family: var(--mono);
  font-size: 12.5px;
}

/* ========= MOBILE ========= */
@media (max-width: 900px) {
  :root {
    --header-height: 64px;
  }

  .docs-header-brand {
    width: auto;
    gap: 12px;
    padding-inline: 16px;
    border-right: 0;
  }

  .docs-header-actions {
    justify-content: flex-end;
    gap: 14px;
    padding-inline: 16px;
  }

  /* The full field costs more width than it earns on a phone, so it collapses
     to the icon and the sheet does the rest. */
  .docs-search-trigger {
    width: 44px;
    justify-content: center;
    border-radius: 999px;
    padding-inline: 0;
  }

  .docs-search-placeholder,
  .docs-search-shortcut {
    display: none;
  }

  /* The design's mobile header is wordmark plus search, nothing else. Keeping
     the app link here pushed it onto a second line. */
  .docs-open-app {
    display: none;
  }

  .docs-nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
  }

  /* Whole-pixel height and gap, deliberately. At 1.5px with a 4px gap the bars
     step 5.5px apart, so each one lands on a different subpixel boundary and
     rasterizes at a different weight: same width, visibly different thickness.
     A 2px bar with a 5px gap steps a whole 7px, so all three render alike. */
  .docs-nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
  }

  .docs-nav {
    position: fixed;
    inset: var(--header-height) 0 0;
    z-index: 20;
    width: 100%;
    height: auto;
    padding: 20px 16px 40px;
    border-right: 0;
    transform: translateX(-100%);
    transition: transform 0.18s ease-out;
  }

  .docs-nav.is-open {
    transform: translateX(0);
  }

  .docs-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    background: none;
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-size: 18px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
  }

  .docs-main {
    padding: 32px 16px 56px;
  }

  .docs-hero h1 {
    font-size: 34px;
    line-height: 38px;
  }

  .docs-lede {
    font-size: 17px;
    line-height: 27px;
  }

  .docs-section h2 {
    font-size: 25px;
    line-height: 30px;
  }

  .docs-media {
    border-radius: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-nav {
    transition: none;
  }
}

/* ========= SEARCH SHEET ========= */
.docs-search {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  justify-content: center;
  padding: 12vh 16px 16px;
  background: rgb(43 29 22 / 32%);
}

.docs-search.is-open {
  display: flex;
}

.docs-search-panel {
  width: 100%;
  max-width: 520px;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgb(43 29 22 / 18%);
}

.docs-search-input {
  flex-shrink: 0;
  width: 100%;
  padding: 18px 20px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule);
  font-family: inherit;
  font-size: 17px;
  line-height: 24px;
  color: var(--ink);
}

.docs-search-input:focus {
  outline: none;
}

.docs-search-input::placeholder {
  color: var(--muted);
}

.docs-search-results {
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  list-style: none;
}

.docs-search-result {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 22px;
  color: var(--ink);
  text-decoration: none;
}

.docs-search-result.is-active,
.docs-search-result:hover {
  background: rgb(238 106 76 / 12%);
  color: var(--coral-deep);
  font-weight: 600;
}

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

/* ========= COMMANDS PAGE ========= */
.docs-command-group {
  padding: 54px 0 18px;
  border-top: 1px solid var(--rule);
}

.docs-command-group h2 {
  margin: 5px 0 20px;
  font-family: var(--display);
  font-size: 32px;
  line-height: 38px;
  font-weight: 400;
  color: var(--ink);
}

.docs-command {
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}

.docs-command-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.docs-command-head h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 22px;
  font-weight: 700;
  color: var(--ink);
}

/* Reserved for actions that cannot be undone, so it keeps its weight. */
.docs-command-warning {
  flex-shrink: 0;
  font-size: 10px;
  line-height: 15px;
  letter-spacing: 0.1em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--coral-deep);
}

.docs-command-summary {
  margin: 9px 0 0;
  max-width: 650px;
  font-size: 15px;
  line-height: 23px;
  color: var(--muted);
}

.docs-command-example {
  margin: 9px 0 0;
  max-width: 650px;
  padding: 12px 14px;
  background: var(--surface);
  border-left: 2px solid var(--coral);
  font-size: 14px;
  line-height: 21px;
  color: var(--ink);
}

@media (max-width: 900px) {
  .docs-command-group {
    padding-top: 36px;
  }

  .docs-command-group h2 {
    font-size: 26px;
    line-height: 32px;
  }

  .docs-command-head h3 {
    font-size: 14px;
  }
}

/* ========= TERMINAL BLOCK ========= */
.docs-terminal {
  margin-top: 10px;
  overflow: hidden;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 12px;
}

.docs-terminal-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding-inline: 12px;
  background: var(--terminal-bar);
}

.docs-terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--terminal-red);
}

.docs-terminal-dot:nth-child(2) {
  background: var(--terminal-amber);
}

.docs-terminal-dot:nth-child(3) {
  background: var(--terminal-green);
}

.docs-terminal .docs-copy {
  position: absolute;
  top: 6px;
  right: 12px;
  width: 18px;
  height: 18px;
}

.docs-terminal-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px 16px;
  overflow-x: auto;
}

.docs-terminal-line {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 18px;
  white-space: pre;
}

.docs-terminal-command {
  color: var(--code-fg);
}

.docs-terminal-output {
  color: var(--terminal-output);
}

/* Not selectable, so a hand-made selection of the command does not drag the
   prompt into the paste. */
.docs-terminal-prompt {
  user-select: none;
  margin-right: 6px;
}

@media (max-width: 900px) {
  .docs-terminal-line {
    font-size: 12px;
  }
}
