/* Waymark Documentation */

:root {
  --font-sans:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:
    ui-monospace, "SFMono-Regular", "Cascadia Code", "Courier New", monospace;
  --color-text: #1a1a1a;
  --color-muted: #555;
  --color-link: #1d6dbf;
  --color-border: #dde1e7;
  --color-bg-code: #f4f5f7;
  --color-bg-note: #eff6ff;
  --max-width: 860px;
}

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  margin: 0;
  padding: 0;
}

/* ── Typography ── */

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  margin: 1.75em 0 0.4em;
  font-weight: 700;
}

h1 {
  font-size: 2rem;
  margin-top: 0;
}
h2 {
  font-size: 1.4rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.3em;
}
h3 {
  font-size: 1.1rem;
}
h4 {
  font-size: 1rem;
}

p {
  margin: 0 0 1em;
}
p.lead {
  font-size: 1.1rem;
  color: var(--color-muted);
}

a {
  color: var(--color-link);
}
a:hover {
  text-decoration: none;
}

strong {
  font-weight: 600;
}

/* ── Lists ── */

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.75em;
}
li {
  margin-bottom: 0.3em;
}

/* ── Figures & Images ── */

figure {
  margin: 1.75em 0;
}
figure img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
figcaption {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 0.5em;
}

/* ── Video embeds ── */

figure iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: none;
  border-radius: 4px;
}

/* ── Code ── */

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-bg-code);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--color-bg-code);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1em 1.25em;
  overflow-x: auto;
  margin: 1.5em 0;
}
pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* Shiki syntax-highlighted blocks */
pre.shiki {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  border-radius: 6px;
  padding: 1em 1.25em;
  overflow-x: auto;
  margin: 1.5em 0;
}
pre.shiki code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* ── Tables ── */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1.5em 0;
}
th,
td {
  text-align: left;
  padding: 0.55em 0.8em;
  border: 1px solid var(--color-border);
  vertical-align: top;
}
th {
  background: var(--color-bg-code);
  font-weight: 600;
}
tr:nth-child(even) td {
  background: #fafbfc;
}

/* ── HR ── */

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2em 0;
}

/* ── Table of contents (index page) ── */

article ul {
  list-style: none;
  padding-left: 0;
}
/*article ul li::before {
  content: "→ ";
  color: var(--color-link);
}*/

/* ── Video grid ── */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 1.5em 0 2em;
}
.video-grid figure {
  margin: 0;
}
.video-grid figcaption {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 0.5em;
}

/* ── Waymark maps ── */

.waymark-shortcode {
  margin: 1.5em 0;
}

/* ── Site header ── */

#docs-header {
  background: #b42714;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  width: 100%;
  box-sizing: border-box;
}
#docs-header__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-align: center;
}
#docs-header__logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* ── Site footer ── */

#docs-footer {
  background: #1a1a1a;
  color: rgba(255, 255, 255, 0.6);
  padding: 1.25rem 1.5rem;
  margin-top: 4rem;
  font-size: 0.85rem;
  width: 100%;
  box-sizing: border-box;
}
#docs-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  justify-content: center;
}
#docs-footer__nav a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.15s;
}
#docs-footer__nav a:hover {
  color: #fff;
}
#docs-footer__nav #docs-header__author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: block;
}

/* Content padding */
body > h1,
body > article {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
body > h1 {
  padding-top: 2rem;
}
body > article {
  padding-bottom: 2rem;
}
