/* Product Documentation hub — shared styles */
:root {
  --bg: #0a0a1a;
  --surface: hsl(240 18% 7%);
  --surface-2: hsl(240 15% 10%);
  --border: hsl(240 15% 18%);
  --text: hsl(0 0% 96%);
  --muted: hsl(215 20% 65%);
  --muted-2: hsl(215 15% 50%);
  --primary: hsl(239 84% 67%);
  --primary-soft: hsl(239 84% 67% / 0.15);
  --code-bg: hsl(240 20% 5%);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  color: var(--text);
  line-height: 1.25;
  margin: 2rem 0 0.75rem;
}

h1 { font-size: 2.25rem; font-weight: 700; margin-top: 0.5rem; }
h2 { font-size: 1.5rem; font-weight: 600; margin-top: 2.5rem; border-top: 1px solid var(--border); padding-top: 2rem; }
h3 { font-size: 1.15rem; font-weight: 600; margin-top: 1.5rem; }
h4 { font-size: 1rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

p { margin: 0.75rem 0; color: hsl(0 0% 88%); }

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

ul, ol { padding-left: 1.5rem; color: hsl(0 0% 88%); }
li { margin: 0.35rem 0; }

code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
  line-height: 1.55;
  color: hsl(0 0% 92%);
}
pre code { background: none; border: none; padding: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}
th, td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  background: var(--surface-2);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  color: var(--text);
}
td { color: hsl(0 0% 88%); }

details {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  background: var(--surface);
}
details[open] { background: var(--surface-2); }
summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
  outline: none;
}
summary::marker { color: var(--primary); }
details > *:not(summary) { margin-top: 0.5rem; color: hsl(0 0% 85%); }

blockquote {
  border-left: 3px solid var(--primary);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  color: var(--muted);
  background: var(--primary-soft);
  border-radius: 0 6px 6px 0;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* Layout */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 1rem 0;
}
.site-header .wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-header a.brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.site-header nav a {
  margin-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.site-header nav a:hover { color: var(--text); text-decoration: none; }

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted-2);
  margin-bottom: 1rem;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current="page"] { color: var(--text); }

.last-updated {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--muted-2);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin: 0 0 1.5rem;
}

.lead {
  font-size: 1.1rem;
  color: hsl(0 0% 90%);
  margin: 1rem 0 1.5rem;
}

.related {
  margin-top: 4rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.related h4 { margin-top: 0; }
.related ul { list-style: none; padding-left: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.5rem 1.25rem; }
.related li { margin: 0; }
.related a { font-size: 0.9rem; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--surface);
  font-size: 0.85rem;
  color: var(--muted-2);
}
.site-footer .wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer a { color: var(--muted); }

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  background: var(--surface);
  padding: 1rem 1.25rem;
  border-radius: 6px;
  margin: 1.5rem 0;
}
.callout strong { color: var(--text); }

.not-list li strong { color: var(--text); }

.term { padding: 1.25rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); margin: 0.75rem 0; }
.term h3 { margin-top: 0; }
.term .related-terms { font-size: 0.85rem; color: var(--muted-2); margin-top: 0.5rem; }

/* Language switcher (bilingual docs) */
.lang-switcher {
  font-size: 0.85rem;
  color: var(--muted-2);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.lang-switcher a {
  color: var(--muted);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}
.lang-switcher a:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.lang-switcher a[aria-current="true"] {
  color: var(--text);
  background: var(--primary-soft);
  cursor: default;
}
