/* The docs site skeleton. The full site — built the way Freally MIDI Master's
 * and Freally Oscillate's are — is roadmap TASK-155A; this carries the product
 * colours from src/styles/tokens.css so the two never look like strangers. */

:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: #141418;
  --border: #2a2a33;
  --primary: #9af524;
  --text: #ececf1;
  --text-2: #a0a3b1;
  --warning: #fbbf24;
}

/* ⛔ Dark only, like every Freally site (owner, 2026-10-01: *"i do not want light
 * and dark to be available"*). There is no light palette and no media query. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', sans-serif;
}

a {
  color: var(--primary);
}

.hero,
main,
.footer {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px;
}

.hero {
  padding-top: 64px;
  text-align: center;
}

.hero__mark {
  border-radius: 20px;
}

.hero__name {
  margin: 12px 0 0;
  font-size: 2.6rem;
  letter-spacing: 0.02em;
}

.hero__line {
  margin: 4px 0 20px;
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 600;
}

.hero__lede {
  max-width: 64ch;
  margin: 0 auto;
  color: var(--text-2);
}

.hero__formats {
  color: var(--text-2);
  font-size: 0.9rem;
}

.notice {
  display: inline-block;
  margin: 16px 0 0;
  padding: 10px 16px;
  border: 1px solid var(--warning);
  border-radius: 10px;
  background: var(--surface);
}

section {
  margin-top: 48px;
}

h2 {
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.steps li,
.charter li {
  margin: 8px 0;
}

.ladder-wrap {
  overflow-x: auto;
}

.ladder {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.ladder th,
.ladder td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
}

.ladder td:first-child {
  white-space: nowrap;
  font-family: ui-monospace, 'Cascadia Code', monospace;
}

.ladder .is-current td {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

.footer {
  margin-top: 64px;
  padding-bottom: 48px;
  color: var(--text-2);
  font-size: 0.85rem;
  text-align: center;
}

/* The keyboard-shortcut sheet (TASK-088): written from the app's own table. */
.keys {
  inline-size: 100%;
  margin-block-end: 1.5rem;
  border-collapse: collapse;
}

.keys td {
  padding-block: 0.25rem;
  vertical-align: top;
}

.keys td + td {
  text-align: end;
  white-space: nowrap;
}

kbd {
  display: inline-block;
  padding: 0 0.3rem;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
}

/* The eighteen languages, as plain links: the site runs no script, so each
 * language is a page of its own (scripts/docs-i18n.mjs). */
/* ── The header bar: like Freally Flipcopy's (owner, 2026-10-01) ───────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-block-end: 1px solid var(--border);
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.wordmark img {
  width: 28px;
  height: 28px;
}

/* The language menu, drawn like Flipcopy's language select. */
.locale {
  position: relative;
  margin-inline-start: auto;
  font-size: 0.875rem;
}

.locale summary {
  list-style: none;
  position: relative;
  min-width: 10rem;
  padding: 4px 30px 4px 10px;
  cursor: pointer;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.locale summary::-webkit-details-marker {
  display: none;
}

.locale summary::after {
  content: '';
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border: solid var(--text-2);
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-70%) rotate(45deg);
}

.locale[open] summary,
.locale summary:focus-visible {
  border-color: var(--primary);
}

.locale ul {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 4px);
  z-index: 20;
  min-width: 100%;
  max-height: 70vh;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.5);
}

.locale a {
  display: block;
  padding: 4px 12px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.locale a:hover,
.locale a:focus-visible {
  color: var(--primary);
  background: var(--bg);
}

.locale a[aria-current='page'] {
  color: var(--primary);
  font-weight: 600;
}
