/* Matches marketing/landing.html. Light only: the dark selector also covers
   visitors whose browser saved docmd's old dark setting. */
@font-face {
  font-family: "Host Grotesk Variable";
  font-weight: 300 800;
  font-display: swap;
  src: url("host-grotesk-latin-wght-normal.woff2") format("woff2");
}

:root,
:root[data-theme="dark"] {
  color-scheme: light;
  --coral: #ff6b6b;
  --display: "Host Grotesk Variable", "Host Grotesk", "Helvetica Neue", Helvetica, sans-serif;

  --bg-color: #faf9f6;
  --text-color: #3d3d3d;
  --text-muted: #6a6660;
  --text-heading: #1a1a1a;
  --link-color: #1a1a1a;
  --link-color-hover: #1a1a1a;
  --border-color: rgba(0, 0, 0, .08);
  --border-color-codeblock: rgba(0, 0, 0, .08);
  --border-color-hover: rgba(0, 0, 0, .14);
  --header-bg: rgba(250, 249, 246, .88);
  --header-border: rgba(0, 0, 0, .08);
  --sidebar-bg: #faf9f6;
  --sidebar-text: #6a6660;
  --sidebar-link-active-bg: #f0ede7;
  --sidebar-link-active-text: #1a1a1a;
  --sidebar-group-bg: #f0ede7;
  --code-bg: #f0ede7;
  --code-text: #1a1a1a;
  --accent-color: #1a1a1a;
  --font-family-sans: "Helvetica Neue", Helvetica, Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-family-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --line-height-relaxed: 1.6;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --scrollbar-thumb: rgba(0, 0, 0, .14);
  --scrollbar-thumb-hover: #6a6660;
  --glow-color: rgba(255, 107, 107, .12);
  --glow-color-strong: rgba(255, 107, 107, .22);
  --halo-soft: 0 0 0 4px rgba(255, 107, 107, .14);
  --docmd-tooltip-bg: #1a1a1a;
  --docmd-tooltip-color: #faf9f6;
  --docmd-tooltip-border: #1a1a1a;
  --image-border-color: rgba(0, 0, 0, .08);
}

html,
html[data-theme="dark"] { color-scheme: light; }
:root[data-theme="dark"] .content-area::before { content: none; }
:root[data-theme="dark"] .docmd-code-block-header { background-color: rgba(0, 0, 0, .03); }
:root[data-theme="dark"] :is(.next-page, .prev-page):hover { background-color: #f0ede7; }
.search-result-preview mark,
:root[data-theme="dark"] .search-result-preview mark { background-color: rgba(255, 107, 107, .28); color: #1a1a1a; }

::selection { background: rgba(255, 107, 107, .28); color: #1a1a1a; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }

h1, h2, h3, h4, h5, h6 { font-family: var(--display); letter-spacing: -.02em; text-wrap: balance; }
h1 { font-weight: 600; letter-spacing: -.04em; line-height: 1.08; }
h2 { font-size: 1.625rem; border-bottom: 0; padding-bottom: 0; margin-top: 3rem; }
h3 { font-size: 1.25rem; }

/* Logo: the mark is the image, the wordmark is text in the display font. */
.logo-link,
.logo-link:any-link { display: inline-flex; align-items: center; gap: 10px; color: #1a1a1a; text-decoration: none; }
.logo-link::after {
  content: "coordinate" / "";
  font: 600 19px/1 var(--display);
  letter-spacing: -.02em;
}

/* Links stay dark. Coral has too little contrast for text on off-white. */
.main-content :is(p, li, td, blockquote) a:any-link {
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, .28);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.main-content :is(p, li, td, blockquote) a:hover { text-decoration-color: var(--coral); }

.sidebar nav li > a.active { color: #1a1a1a; }
.sidebar nav li > a.active::before { background-color: var(--coral); }
.toc-link.active { color: #1a1a1a; border-color: var(--coral); }

.sidebar-header { text-align: left; padding-left: 16px; }
.sidebar nav li > a.active::before { left: 0; }

.main-content .docmd-heading:is(h2, h3) { margin-bottom: .75rem; }
.main-content h2 + :is(p, ol, ul), .main-content h3 + :is(p, ol, ul) { margin-top: 0; }
blockquote { margin: 1rem 0; padding: .25rem 0 .25rem 1rem; border-left: 2px solid var(--coral); }
td { vertical-align: top; }
th { background-color: #f0ede7; }

/* Long commands wrap so their descriptions stay on screen. */
td:first-child { width: 34%; }
td code { white-space: normal; overflow-wrap: anywhere; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
@media (max-width: 640px) {
  th, td { padding-inline: 12px; }
  td:first-child { min-width: 120px; }
  td:last-child { min-width: 170px; }
}

pre code.hljs, code.hljs { background: transparent; color: #1a1a1a; }
:is(.hljs-comment, .hljs-quote) { color: #6a6660; font-style: normal; }
:is(.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute) { color: #a33434; }
:is(.hljs-keyword, .hljs-literal, .hljs-number, .hljs-attr, .hljs-variable, .hljs-built_in, .hljs-title,
  .hljs-section, .hljs-meta, .hljs-symbol, .hljs-bullet, .hljs-name, .hljs-type, .hljs-operator,
  .hljs-punctuation, .hljs-subst, .hljs-template-variable, .hljs-selector-tag, .hljs-deletion) { color: #1a1a1a; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
