/* Podos documentation. System fonts, one accent colour, light and dark. */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f6f7;
  --bg-code: #f3f4f5;
  --fg: #1b1f23;
  --fg-soft: #57606a;
  --line: #d8dde2;
  --accent: #0b6e5f;
  --accent-soft: #e3f2ef;
  --planned: #8a5a00;
  --planned-bg: #fdf3dc;
  --available: #0b6e3a;
  --available-bg: #e2f4e8;
  --next: #1f4fa3;
  --next-bg: #e5edfb;
  --warn-bg: #fff7e0;
  --warn-line: #e3b341;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --bg-soft: #1b1f23;
    --bg-code: #1e2328;
    --fg: #e6e8ea;
    --fg-soft: #9aa4ae;
    --line: #2f363d;
    --accent: #4fc2ac;
    --accent-soft: #15302b;
    --planned: #f0c060;
    --planned-bg: #3a2e12;
    --available: #6fd49a;
    --available-bg: #163323;
    --next: #8db4f5;
    --next-bg: #17253d;
    --warn-bg: #2e2712;
    --warn-line: #8a6d1f;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--sans);
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 0.5rem; background: var(--bg); padding: 0.25rem 0.5rem; z-index: 10; }

.top {
  display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 1.25rem; color: var(--fg); text-decoration: none; letter-spacing: 0.01em; }
.tagline { color: var(--fg-soft); font-size: 0.9rem; }
.status {
  margin-left: auto; font-size: 0.8rem; color: var(--planned);
  background: var(--planned-bg); padding: 0.1rem 0.5rem; border-radius: 3px;
}

.layout { display: flex; max-width: 76rem; margin: 0 auto; }
.side {
  flex: 0 0 15.5rem;
  padding: 1.25rem 1rem 2rem 1.25rem;
  border-right: 1px solid var(--line);
  font-size: 0.92rem;
  position: sticky; top: 0; align-self: flex-start;
  max-height: 100vh; overflow-y: auto;
}
.side summary { display: none; }
.nav-section h2 {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--fg-soft); margin: 1.1rem 0 0.3rem;
  border-top: none; padding-top: 0;
}
.nav-section:first-of-type h2 { margin-top: 0; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li { margin: 0.1rem 0; }
.side a { color: var(--fg); text-decoration: none; }
.side a:hover { color: var(--accent); }
.side a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav-planned {
  font-size: 0.7rem; color: var(--planned); background: var(--planned-bg);
  padding: 0 0.3rem; border-radius: 3px; white-space: nowrap;
}

main { flex: 1; min-width: 0; padding: 1.5rem 2.5rem 3rem; max-width: 50rem; }
.crumb { margin: 0; color: var(--fg-soft); font-size: 0.85rem; }
h1 { font-size: 2rem; line-height: 1.25; margin: 0.2rem 0 1rem; }
h2 { font-size: 1.4rem; margin: 2.2rem 0 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
h3 { font-size: 1.12rem; margin: 1.8rem 0 0.4rem; }
h4 { font-size: 1rem; margin: 1.4rem 0 0.3rem; }
h2 code, h3 code, h4 code { font-size: 0.95em; }
p, ul, ol, table, pre { margin: 0 0 1rem; }
li { margin: 0.2rem 0; }

code { font-family: var(--mono); font-size: 0.88em; background: var(--bg-code); padding: 0.1em 0.3em; border-radius: 3px; }
pre {
  background: var(--bg-code); border: 1px solid var(--line); border-radius: 4px;
  padding: 0.8rem 1rem; overflow-x: auto; line-height: 1.45;
}
pre code { background: none; padding: 0; font-size: 0.85rem; }

table { border-collapse: collapse; width: 100%; font-size: 0.93rem; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }
th { background: var(--bg-soft); }

blockquote {
  margin: 0 0 1rem; padding: 0.6rem 1rem;
  background: var(--warn-bg); border-left: 4px solid var(--warn-line); border-radius: 0 4px 4px 0;
}
blockquote p:last-child { margin-bottom: 0; }

.badge {
  display: inline-block; font-size: 0.75rem; font-weight: 600; line-height: 1.5;
  padding: 0 0.45rem; border-radius: 3px; vertical-align: 0.1em; white-space: nowrap;
}
.badge.planned { color: var(--planned); background: var(--planned-bg); }
.badge.available { color: var(--available); background: var(--available-bg); }
.badge.next { color: var(--next); background: var(--next-bg); }

/* TOML / YAML examples */
.formats { margin: 0 0 1rem; }
.format-label { font-size: 0.75rem; color: var(--fg-soft); margin-bottom: 0.2rem; }
.formats.js .format-label { display: none; }
.formats.js pre { border-top-left-radius: 0; }
.format-bar { display: flex; gap: 0; }
.format-bar button {
  font: 0.8rem var(--mono); color: var(--fg-soft); cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-bottom: none;
  padding: 0.25rem 0.75rem; margin-right: -1px;
}
.format-bar button:first-child { border-top-left-radius: 4px; }
.format-bar button:last-child { border-top-right-radius: 4px; }
.format-bar button[aria-selected="true"] { color: var(--fg); background: var(--bg-code); font-weight: 600; }
.format-bar button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; display: flex; flex-direction: column; max-width: 48%; }
.pager span { font-size: 0.75rem; color: var(--fg-soft); }
.pager .next { margin-left: auto; text-align: right; }

.foot { text-align: center; color: var(--fg-soft); font-size: 0.8rem; padding: 1.5rem; border-top: 1px solid var(--line); }

@media (max-width: 52rem) {
  .layout { display: block; }
  .side {
    position: static; max-height: none; border-right: none;
    border-bottom: 1px solid var(--line); padding: 0.5rem 1rem;
  }
  .side summary { display: list-item; cursor: pointer; font-weight: 600; padding: 0.3rem 0; }
  main { padding: 1rem 1rem 2rem; }
  .status { margin-left: 0; }
  h1 { font-size: 1.6rem; }
}
