/* The stylesheet of the static /docs/ pages. The two :root blocks are generated from the design
   tokens (Simple theme); edit only the rules below the marker. */
:root {
  --bg: #f5f7fb;
  --text-primary: #17181c;
  --font-ui:
    'IBM Plex Sans', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --surface-1: #ffffff;
  --border-subtle: #e5e8ee;
  --text-link: #4f4cda;
  --focus-ring: #4f4cda;
  --radius-chip: 6px;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --surface-sunken: #eef0f4;
  --radius-card: 10px;
  --border-default: #d7d9df;
  --text-secondary: #616369;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1015;
    --text-primary: #f0f3fd;
    --surface-1: #15171c;
    --border-subtle: #24262d;
    --text-link: #8893fa;
    --focus-ring: #8893fa;
    --surface-sunken: #0c0d12;
    --border-default: #30333a;
    --text-secondary: #adb1bc;
  }
}

/* == docs rules: hand-written; colours, fonts and radii only through the design tokens == */
:root {
  color-scheme: light dark;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font: 400 1rem/1.6 var(--font-ui);
  overflow-wrap: break-word;
}

.guide-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
  padding-inline: 1.5rem;
  background: var(--surface-1);
  border-block-end: 1px solid var(--border-subtle);
}

.guide-bar__home {
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.guide-bar__home:hover {
  text-decoration: underline;
}

main {
  max-inline-size: 46rem;
  margin-inline: auto;
  padding-block: 2rem 4rem;
  padding-inline: 1.5rem;
}

h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin-block: 0 1rem;
}

h2 {
  font-size: 1.375rem;
  margin-block: 2.5rem 0.75rem;
  padding-block-end: 0.25rem;
  border-block-end: 1px solid var(--border-subtle);
}

h3 {
  font-size: 1.125rem;
  margin-block: 1.75rem 0.5rem;
}

h4 {
  font-size: 1rem;
  margin-block: 1.25rem 0.5rem;
}

a {
  color: var(--text-link);
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-chip);
}

.guide-skip {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: -3rem;
}

.guide-skip:focus {
  inset-block-start: 1rem;
  background: var(--surface-1);
  padding: 0.5rem 0.75rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-sunken);
  padding-inline: 0.3em;
  border-radius: var(--radius-chip);
  direction: ltr;
  unicode-bidi: isolate;
}

pre {
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 0.75rem 1rem;
  overflow-x: auto;
  direction: ltr;
  text-align: start;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
}

table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin-block: 1rem;
  font-size: 0.9375rem;
}

th,
td {
  border: 1px solid var(--border-default);
  padding: 0.375rem 0.625rem;
  text-align: start;
  vertical-align: top;
}

th {
  background: var(--surface-sunken);
}

hr {
  border: 0;
  border-block-start: 1px solid var(--border-subtle);
  margin-block: 2rem;
}

ul,
ol {
  padding-inline-start: 1.5rem;
}

.guide-lede {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.guide-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.guide-list li {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 1rem 1.25rem;
}

.guide-list a {
  font-weight: 600;
  font-size: 1.125rem;
}

.guide-list p {
  margin-block: 0.25rem 0;
  color: var(--text-secondary);
}

.guide-note {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

@media (max-width: 600px) {
  .guide-bar {
    padding-inline: 1rem;
  }
  main {
    padding-inline: 1rem;
    padding-block-start: 1.25rem;
  }
  h1 {
    font-size: 1.625rem;
  }
}
