/* AethonLog — marketing-tier docs styles. */

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

:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-850: #16213a;
  --slate-800: #1e293b;
  --slate-750: #273548;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --cyan-400: #22d3ee;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --amber-400: #fbbf24;
  --red-400: #f87171;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--slate-900);
  color: var(--slate-200);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: var(--blue-400); text-decoration: none; transition: color 0.12s ease; }
a:hover { color: var(--blue-500); text-decoration: underline; }

h1, h2, h3, h4 {
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.018em;
  scroll-margin-top: 80px;
}
h1 { font-size: 38px; letter-spacing: -0.025em; }
h2 {
  font-size: 22px;
  margin: 44px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--slate-800);
}
h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
h3 { font-size: 17px; margin: 26px 0 10px; color: var(--slate-100); letter-spacing: -0.012em; }

p { margin: 0 0 14px; }
p.lede { color: var(--slate-400); font-size: 17px; line-height: 1.6; margin: 0 0 36px; }

ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin: 4px 0; }

strong { color: var(--slate-100); font-weight: 600; }

/* Inline code */
code {
  background: var(--slate-800);
  color: var(--cyan-400);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12.5px;
}

/* Code blocks — wrapped by docs.js at runtime with .code-block + copy button. */
.code-block { position: relative; margin: 16px 0 24px; }

pre {
  background: var(--slate-950);
  border: 1px solid var(--slate-800);
  border-radius: 8px;
  padding: 16px 20px;
  padding-right: 84px;
  overflow-x: auto;
  margin: 12px 0 20px;
  line-height: 1.6;
  box-shadow: 0 1px 0 rgba(255,255,255,0.02), 0 2px 8px rgba(0,0,0,0.25);
}
.code-block pre { margin: 0; }
pre code {
  background: transparent;
  padding: 0;
  color: var(--slate-200);
  font-size: 13px;
}

/* Variable spans — visually identical to surrounding text but slightly highlighted. */
[data-var] {
  color: var(--cyan-400);
  font-weight: 500;
}
pre [data-var] {
  /* Inside a code block, keep the code font + colour */
  color: var(--cyan-400);
  font-weight: 500;
}

/* Scrollbars for code blocks */
pre::-webkit-scrollbar { height: 8px; }
pre::-webkit-scrollbar-track { background: rgba(0,0,0,0.25); border-radius: 4px; }
pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
pre::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* Copy button */
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--slate-700);
  border-radius: 6px;
  color: var(--slate-300);
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s, opacity 0.12s;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.code-block:hover .copy-btn,
.copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover {
  background: var(--slate-750);
  color: #fff;
  border-color: var(--slate-600);
}
.copy-btn:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}
.copy-btn.copied {
  color: var(--emerald-400);
  border-color: var(--emerald-500);
  background: rgba(16, 185, 129, 0.1);
  opacity: 1;
}
.copy-btn.error { color: var(--red-400); border-color: var(--red-400); }
.copy-btn svg { flex-shrink: 0; }

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0 22px;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--slate-800);
}
th {
  color: var(--slate-300);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(0,0,0,0.15);
}
tbody tr { transition: background 0.1s ease; }
tbody tr:hover td { background: var(--slate-850); }

/* Sticky frosted site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-800);
  padding: 14px 24px;
  font-size: 14px;
}
.site-header a { color: var(--slate-300); font-weight: 600; }
.site-header a:hover { color: #fff; text-decoration: none; }
.site-header .brand { font-size: 17px; color: #fff; letter-spacing: -0.01em; }

/* Centered content block */
.docs-layout {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 24px 88px;
}

/* Fixed left sidebar */
.docs-sidebar {
  position: fixed;
  top: 76px;
  left: 24px;
  width: 268px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  font-size: 14.5px;
  z-index: 10;
}

.docs-sidebar nav {
  background: var(--slate-850);
  border: 1px solid var(--slate-800);
  border-radius: 10px;
  padding: 12px 8px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.02), 0 4px 16px rgba(0,0,0,0.2);
}

.sb-pages, .sb-sections {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sb-pages > li { margin: 2px 0; }
.sb-pages > li > a {
  display: block;
  padding: 9px 14px;
  border-radius: 6px;
  color: var(--slate-100);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  transition: background 0.1s, color 0.1s;
}
.sb-pages > li > a:hover { background: var(--slate-800); color: #fff; text-decoration: none; }
.sb-pages > li > a.active {
  background: var(--blue-500);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.sb-sections {
  padding: 4px 0 8px 0;
  margin: 2px 0 6px 16px;
  border-left: 1px solid var(--slate-700);
}
.sb-sections li { margin: 0; }
.sb-sections li a {
  display: block;
  padding: 5px 14px;
  color: var(--slate-400);
  font-size: 13.5px;
  line-height: 1.4;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.1s, border-color 0.1s;
}
.sb-sections li a:hover {
  color: var(--blue-400);
  border-left-color: var(--blue-400);
  text-decoration: none;
}

/* ============================================================
 * Customize panel — injected by docs.js into the sidebar nav.
 * ============================================================ */
.prefs-wrapper {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--slate-800);
}

.prefs-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: transparent;
  border: 1px dashed var(--slate-700);
  border-radius: 6px;
  color: var(--slate-300);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.prefs-trigger:hover {
  background: var(--slate-800);
  color: #fff;
  border-color: var(--slate-600);
}
.prefs-trigger.open {
  background: var(--slate-800);
  color: #fff;
  border-color: var(--blue-500);
  border-style: solid;
}
.prefs-trigger svg { flex-shrink: 0; opacity: 0.8; }

.prefs-panel {
  margin-top: 10px;
  background: var(--slate-900);
  border: 1px solid var(--slate-700);
  border-radius: 8px;
  padding: 14px;
  font-size: 13px;
}

.prefs-header {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--slate-800);
}
.prefs-header strong {
  display: block;
  color: #fff;
  font-size: 13.5px;
  margin-bottom: 4px;
}
.prefs-hint {
  display: block;
  font-size: 11.5px;
  color: var(--slate-500);
  line-height: 1.4;
}

.prefs-group { margin-bottom: 14px; }
.prefs-group:last-of-type { margin-bottom: 10px; }
.prefs-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--slate-400);
  font-weight: 700;
  margin-bottom: 6px;
}

.prefs-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.prefs-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: var(--slate-850);
  border: 1px solid var(--slate-800);
  border-radius: 5px;
  font-size: 12.5px;
  color: var(--slate-300);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
  user-select: none;
  -webkit-user-select: none;
}
.prefs-pill:hover { background: var(--slate-800); border-color: var(--slate-700); color: #fff; }
.prefs-pill input[type=radio] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.prefs-pill:has(input:checked) {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: #fff;
}

.prefs-input {
  display: block;
  width: 100%;
  padding: 6px 10px;
  background: var(--slate-850);
  border: 1px solid var(--slate-800);
  border-radius: 5px;
  color: var(--slate-100);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 12.5px;
}
.prefs-input:focus { outline: none; border-color: var(--blue-500); background: var(--slate-900); }

.prefs-reset {
  width: 100%;
  padding: 7px;
  background: transparent;
  border: 1px solid var(--slate-700);
  border-radius: 5px;
  color: var(--slate-400);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.prefs-reset:hover {
  background: var(--slate-800);
  color: var(--slate-200);
  border-color: var(--slate-600);
}

/* Cards (overview page) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 26px 0 36px;
}
.card {
  background: var(--slate-850);
  border: 1px solid var(--slate-800);
  border-radius: 10px;
  padding: 20px 22px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  display: block;
  color: inherit;
  box-shadow: 0 1px 0 rgba(255,255,255,0.02);
}
.card:hover {
  border-color: var(--blue-500);
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03), 0 8px 24px rgba(59, 130, 246, 0.1);
}
.card h3 { margin: 0 0 6px; font-size: 16px; color: #fff; }
.card p { margin: 0; color: var(--slate-400); font-size: 14px; line-height: 1.55; }

/* Feature list */
.feature-list { padding-left: 0; list-style: none; }
.feature-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--slate-800);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
  content: "→ ";
  color: var(--blue-400);
  font-weight: 700;
  margin-right: 2px;
}

/* Note callout */
.note {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.06), rgba(59, 130, 246, 0.02));
  border-left: 3px solid var(--blue-500);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 22px 0 28px;
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: #fff; }

/* Prev / next */
.footer-nav {
  margin-top: 68px;
  padding-top: 26px;
  border-top: 1px solid var(--slate-800);
  color: var(--slate-500);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.footer-nav a { color: var(--slate-400); padding: 4px 0; transition: color 0.12s ease; }
.footer-nav a:hover { color: var(--blue-400); text-decoration: none; }

/* Narrow viewport — sidebar stacks above content */
@media (max-width: 1280px) {
  .docs-sidebar {
    position: static;
    top: auto;
    left: auto;
    width: auto;
    max-width: 760px;
    margin: 16px auto 0;
    max-height: none;
    overflow-y: visible;
    padding: 0 24px;
  }
  .docs-layout { padding-top: 20px; }
  .copy-btn { opacity: 0.85; }  /* no hover state on touch */
}
