/* Otter Hours docs: one shared stylesheet for every page. */

:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #1d2125;
  --muted: #505862;
  --border: #d5d9de;
  --accent: #0b5cad;
  --accent-text: #ffffff;
  --note-bg: #eef5fd;
  --note-border: #0b5cad;
  --warn-bg: #fff6e5;
  --warn-border: #a35a00;
  --code-bg: #eef0f3;
  --measure: 46rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16191d;
    --surface: #1f2328;
    --text: #e6e8eb;
    --muted: #a9b0b8;
    --border: #3a4048;
    --accent: #7ab8f5;
    --accent-text: #0d1117;
    --note-bg: #182433;
    --note-border: #7ab8f5;
    --warn-bg: #2c2214;
    --warn-border: #e0a54a;
    --code-bg: #262b31;
  }
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  z-index: 10;
}

.skip-link:focus {
  top: 0.5rem;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header and navigation */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .wrap {
  padding-top: 1rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: inline-block;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.brand span {
  color: var(--muted);
  font-weight: 400;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.site-nav a {
  display: inline-block;
  padding: 0.25rem 0;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Content */

main {
  padding: 2rem 0 3rem;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.25rem;
}

p,
ul,
ol,
dl,
table {
  margin: 0 0 1rem;
}

li + li {
  margin-top: 0.25rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.updated {
  color: var(--muted);
  font-size: 0.95rem;
}

code,
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

.note,
.warn {
  border-left: 4px solid var(--note-border);
  background: var(--note-bg);
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  border-radius: 0 4px 4px 0;
}

.warn {
  border-left-color: var(--warn-border);
  background: var(--warn-bg);
}

.note > :last-child,
.warn > :last-child {
  margin-bottom: 0;
}

dt {
  font-weight: 600;
  margin-top: 0.75rem;
}

dd {
  margin: 0 0 0 1.25rem;
}

/* Tables scroll inside their own box on narrow screens, never the page. */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.97rem;
}

caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: 0.4rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
}

thead th {
  border-bottom-width: 2px;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.toc h2 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
  padding: 0;
  border: 0;
}

.toc ul {
  margin: 0;
  padding-left: 1.25rem;
}

.cards {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
}

.cards li {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  background: var(--surface);
}

.cards a {
  font-weight: 600;
}

.cards p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
}

.site-footer p {
  margin: 0 0 0.5rem;
}

@media print {
  .site-nav,
  .skip-link {
    display: none;
  }
  a {
    color: inherit;
  }
}
