/* Zen Vision Player docs — themed to match the docs.zenglobal.au landing
   page (dark indigo tokens, DM Sans / Instrument Serif / Geist Mono). Fonts
   are loaded via templates/base.html; this file assumes they're available
   and falls back gracefully if they aren't. */

:root {
  --bg-deep: #0c0e1a;
  --bg-card: #181c35;
  --bg-card-hover: #1e2340;
  --bg-surface: #12152a;
  --border: rgba(139, 148, 255, 0.08);
  --border-hover: rgba(139, 148, 255, 0.22);
  --accent: #818cf8;
  --accent-dim: #6366f1;
  --accent-glow: rgba(129, 140, 248, 0.15);
  --text: #c8cee0;
  --text-muted: #6b7394;
  --text-bright: #eef0ff;
  --amber: #fbbf24;
  --code-bg: rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  width: 600px;
  height: 600px;
  top: 0;
  left: 50%;
  transform: translate(-50%, -40%);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.shell {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

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

a:hover {
  color: var(--text-bright);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.site-header .brand {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-bright);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-header .brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.875rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-main {
  min-height: 40vh;
}

h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  color: var(--text-bright);
  font-size: 2.75rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 1rem;
}

h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  color: var(--text-bright);
  font-size: 1.75rem;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 1rem;
}

h3 {
  color: var(--text-bright);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
}

p {
  color: var(--text);
}

code {
  font-family: "Geist Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: var(--code-bg);
  color: var(--text-bright);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.9em;
}

pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
}

pre code {
  background: none;
  color: var(--text);
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

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

th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

td {
  color: var(--text);
}

.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

.callout.warn {
  background: var(--accent-glow);
  border-left-color: var(--accent);
}

.page-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.page-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.page-list a {
  color: var(--text-bright);
}

.page-list a:hover {
  color: var(--accent);
}

.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.site-footer a {
  color: var(--accent);
}

/* Downloads page */

.downloads-loading {
  color: var(--text-muted);
}

.channel-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
}

.channel-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.6rem 0.25rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.channel-tab:hover {
  color: var(--text-bright);
}

.channel-tab[aria-selected="true"] {
  color: var(--text-bright);
  border-bottom-color: var(--accent);
}

.channel-tab .unstable-flag {
  color: var(--amber);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-left: 0.35rem;
}

.channel-history {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.release-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  transition: border-color 0.2s, background 0.2s;
}

.release-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.release-card .release-heading {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.release-card .release-version {
  font-weight: 500;
  color: var(--text-bright);
  font-size: 1.05rem;
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
}

.release-card .release-date {
  color: var(--text-muted);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.8rem;
}

.prerelease-badge {
  background: rgba(251, 191, 36, 0.15);
  color: var(--amber);
  font-family: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  border-radius: 100px;
  font-size: 0.7rem;
  padding: 0.15rem 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.artifact-table {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  display: block;
  overflow-x: auto;
}

.artifact-table code {
  font-size: 0.78rem;
  word-break: break-all;
}

.downloads-error {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: var(--amber);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  h1 {
    font-size: 2.1rem;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    gap: 0.85rem;
  }
}
