/* HOTELLIX documentation page (docs/index.html). Colours and type come from the design tokens,
   so the documentation follows the palette and the light / dark mode like every other page.
   Needs: ds/tokens.css before it and ds/theme.css after it. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: 400 16px/1.65 var(--ds-font); background: var(--ds-canvas); color: var(--ds-text); -webkit-font-smoothing: antialiased; }
a { color: var(--ds-link); text-underline-offset: .15em; }
a:hover { color: var(--ds-link-hover); }
:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 12px; inset-block-start: 12px; z-index: 10; padding: 8px 14px; border-radius: 8px; background: var(--ds-surface); }

/* ---- layout: contents on the side from 960 px, on top below */
.wrap { display: grid; grid-template-columns: minmax(0, 1fr); max-inline-size: 1280px; margin: 0 auto; }
nav.toc { padding: 20px 18px; border-block-end: 1px solid var(--ds-border); background: var(--ds-surface); }
nav.toc .brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 14px; }
nav.toc .brand a { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--ds-text-muted); text-decoration: none; }
nav.toc .brand img { block-size: 28px; inline-size: auto; display: block; }
nav.toc .brand .logo-dark, [data-theme="dark"] nav.toc .brand .logo-light { display: none; }
[data-theme="dark"] nav.toc .brand .logo-dark { display: block; }
nav.toc .tools { display: flex; gap: 8px; }
nav.toc .tools button { inline-size: 36px; block-size: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--ds-border); border-radius: 50%; background: var(--ds-surface); color: var(--ds-text-strong); font-size: 17px; cursor: pointer; }
nav.toc .tools button:hover { background: var(--ds-hover); }
nav.toc .tools .ph-sun, nav.toc .tools [aria-pressed="true"] .ph-moon { display: none; }
nav.toc .tools [aria-pressed="true"] .ph-sun { display: inline; }
nav.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
nav.toc li { margin: 0; }
nav.toc ol a { display: block; padding: 7px 12px; border-radius: 10px; text-decoration: none; font-size: 14.5px; color: var(--ds-text-2); }
nav.toc ol a:hover { background: var(--ds-hover); color: var(--ds-text-strong); }
nav.toc .back { display: inline-flex; align-items: center; gap: 6px; margin-block-start: 14px; font-size: 14px; font-weight: 600; text-decoration: none; }
main { padding: 8px 18px 64px; min-inline-size: 0; }
@media (min-width: 960px) {
  .wrap { grid-template-columns: 280px minmax(0, 1fr); }
  nav.toc { position: sticky; inset-block-start: 0; align-self: start; block-size: 100vh; overflow-y: auto; border-block-end: 0; border-inline-end: 1px solid var(--ds-border); padding: 24px 20px; }
  nav.toc ol { display: block; }
  main { padding: 20px 48px 96px; max-inline-size: 960px; }
}

/* ---- text */
h1 { font-family: var(--ds-font-display); font-size: clamp(28px, 4vw, 40px); line-height: 1.12; color: var(--ds-text-strong); margin: 28px 0 10px; letter-spacing: -.028em; font-weight: 700; }
h2 { font-family: var(--ds-font-display); font-size: clamp(22px, 3vw, 28px); line-height: 1.2; color: var(--ds-text-strong); margin: 56px 0 14px; padding-block-start: 28px; border-block-start: 1px solid var(--ds-border); letter-spacing: -.02em; font-weight: 700; }
h3 { font-size: 18px; line-height: 1.35; color: var(--ds-text-strong); margin: 30px 0 8px; font-weight: 600; letter-spacing: -.01em; }
p, ul, ol { margin: 0 0 14px; }
li { margin-block-end: 4px; }
.lead { font-size: 18px; color: var(--ds-text-muted); }
code { font: 13.5px/1.5 var(--ds-font-mono); background: var(--ds-sunken); color: var(--ds-text-strong); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
pre { background: var(--ds-sunken); border: 1px solid var(--ds-border); border-radius: 14px; padding: 14px 16px; overflow-x: auto; margin: 0 0 16px; }
pre code { background: none; padding: 0; white-space: pre; overflow-wrap: normal; }
.note { background: var(--ds-highlight-soft); color: var(--ds-text); border-inline-start: 4px solid var(--ds-highlight); border-radius: 10px; padding: 12px 16px; margin: 0 0 16px; }
.count { font-size: 13px; font-weight: 500; color: var(--ds-text-muted); }
footer { color: var(--ds-text-muted); font-size: 14px; margin-block-start: 48px; padding-block-start: 16px; border-block-start: 1px solid var(--ds-border); }

/* ---- tables: scroll sideways inside their own box on narrow screens */
.table { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--ds-border); border-radius: 14px; background: var(--ds-surface); }
table { border-collapse: collapse; inline-size: 100%; font-size: 14.5px; }
th, td { text-align: start; vertical-align: top; padding: 10px 14px; border-block-end: 1px solid var(--ds-border); }
tr:last-child td { border-block-end: 0; }
td:first-child code { white-space: nowrap; }
th { color: var(--ds-text-strong); font-weight: 600; white-space: nowrap; background: var(--ds-sunken); }
.sw { display: inline-block; inline-size: 12px; block-size: 12px; border-radius: 3px; vertical-align: -1px; border: 1px solid var(--ds-border); background: var(--c); }

/* ---- palette list in the theme section */
.pals { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin: 0 0 16px; padding: 0; list-style: none; }
.pals li { margin: 0; }
.pals button { inline-size: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--ds-border-card); border-radius: 14px; background: var(--ds-surface); color: var(--ds-text-strong); font: 600 14px/1.3 var(--ds-font); text-align: start; cursor: pointer; }
.pals button:hover { border-color: var(--ds-border-strong); }
.pals button[aria-pressed="true"] { border-color: var(--ds-accent); box-shadow: 0 0 0 1px var(--ds-accent); background: var(--ds-selected); }
.pals i { flex: none; inline-size: 22px; block-size: 22px; border-radius: 50%; background: var(--c); border: 2px solid var(--ds-surface); box-shadow: 0 0 0 1px var(--ds-border-card); }
.pals i + i { margin-inline-start: -16px; }
.pals small { display: block; font-weight: 400; font-size: 12px; color: var(--ds-text-muted); }
