/* Palette and shared layout follow ../optics-design/static/style.css.
   Keep this local copy aligned when the main site's theme changes. */
:root {
  color-scheme: dark;
  --bg: #282828;
  --fg: #eeeeee;
  --accent: #79b8ff;
  --hover: #ffffff;
  --code-bg: #000000;
  --code-fg: #ffffff;
  --code-border: #00aa00;
  --nav-bg: #333333;
  --visited: #c8a2f5;
  --rule: #606060;
}

@media screen and (min-width: 768px) {
  html { font-size: 112.5%; }
}

body {
  margin: 0;
  font-family: sans-serif;
  line-height: 1.5;
  background: var(--bg);
  color: var(--fg);
}

a { color: var(--accent); }
main a:visited { color: var(--visited); }
a:hover, main a:visited:hover { color: var(--hover); }

:focus-visible {
  outline: 2px solid var(--hover);
  outline-offset: 2px;
}

h1, h2, h3 {
  color: var(--accent);
  line-height: 1.2;
}
h2 { margin: 2.5rem 0 0.75rem; }
h3 { margin: 1.75rem 0 0.5rem; }
header h1 {
  text-align: center;
  font-size: clamp(1.5rem, 1.1rem + 2.4vw, 2rem);
}
.tagline { text-align: center; }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}
#main-content:focus { outline: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--nav-bg);
  color: var(--fg);
  padding: 0.5rem 1rem;
  z-index: 2;
}
.skip-link:focus { left: 0; }

.upper-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.25rem;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--rule);
}
.upper-section a {
  display: inline-block;
  padding: 0.5rem 0.4rem;
  white-space: nowrap;
}
.upper-section a[aria-current] {
  color: var(--fg);
  text-decoration: none;
}

.version { margin-bottom: 0.5rem; }
.latest {
  font-size: 0.8em;
  margin-left: 0.5rem;
  color: var(--accent);
}
.schema-url {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 5px;
  padding: 0.75rem;
  margin: 0.5rem 0;
}
code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace, monospace;
  font-size: 0.875em;
}
.dialect {
  font-size: 0.85em;
  margin-top: 0.5rem;
}

footer {
  max-width: 720px;
  margin: 2.5rem auto 1.5rem;
  padding: 1rem 15px 0;
  border-top: 1px solid var(--rule);
  box-sizing: border-box;
  text-align: center;
  font-size: 0.875rem;
}

@media print {
  :root {
    color-scheme: light;
    --bg: #fff;
    --fg: #000;
    --accent: #000;
    --visited: #000;
    --code-bg: #fff;
    --code-border: #999;
  }
  .upper-section, .skip-link, footer { display: none; }
}
