/* ══════════════════════════════════════════════════════════════════
   Site Design System — Observatory
   Unified typography, color, and spacing for the entire doc site.
   ══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ── Design Tokens ───────────────────────────────────────────── */
:root {
  /* palette */
  --site-accent:       #0d9373;
  --site-accent-light: #2dc48d;
  --site-accent-faint: rgba(13, 147, 115, 0.08);
  --site-warm:         #d4623b;
  --site-warm-faint:   rgba(212, 98, 59, 0.08);

  /* typography */
  --font-display: "DM Serif Display", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --font-body:    "IBM Plex Sans", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", "JetBrains Mono", "Fira Code", ui-monospace, monospace;

  /* Material overrides */
  --md-text-font: "IBM Plex Sans", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --md-code-font: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
  --md-primary-fg-color: #0d9373;
  --md-primary-fg-color--light: #2dc48d;
  --md-primary-fg-color--dark: #0a7a60;
  --md-accent-fg-color: #0d9373;
  --md-primary-bg-color: #ffffff;
  --md-primary-bg-color--light: #f8faf9;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #2dc48d;
  --md-primary-fg-color--light: #3dd9a0;
  --md-primary-fg-color--dark: #1a936f;
  --md-accent-fg-color: #2dc48d;
}

/* ── Header bar ──────────────────────────────────────────────── */
.md-header {
  background: linear-gradient(135deg, #0b3d35 0%, #114b5f 50%, #1a2940 100%);
}

[data-md-color-scheme="slate"] .md-header {
  background: linear-gradient(135deg, #0a2520 0%, #0d3040 50%, #111827 100%);
}

.md-tabs {
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.md-tabs__link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.md-tabs__link:hover {
  opacity: 1;
}

.md-tabs__link--active,
.md-tabs__item--active .md-tabs__link {
  opacity: 1;
  font-weight: 600;
  border-bottom: 2px solid var(--site-accent-light);
}

/* ── Typography ──────────────────────────────────────────────── */

/* headings: serif display */
.md-content h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  letter-spacing: 0.01em;
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 0.8em;
  padding-bottom: 0.3em;
  border-bottom: 2px solid var(--site-accent-faint);
}

.md-content h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  line-height: 1.35;
  margin-top: 2em;
  margin-bottom: 0.6em;
  color: var(--md-default-fg-color);
}

.md-content h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  line-height: 1.4;
  margin-top: 1.6em;
}

.md-content h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
  margin-top: 1.4em;
}

/* body text */
.md-content {
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.8;
  letter-spacing: 0.01em;
}

.md-content p {
  margin-bottom: 1.1em;
}

/* ── Links ───────────────────────────────────────────────────── */
.md-content a:not(.md-button):not(.md-nav__link):not(.wg-card) {
  color: var(--site-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.md-content a:not(.md-button):not(.md-nav__link):not(.wg-card):hover {
  border-bottom-color: var(--site-accent);
}

/* ── Images ──────────────────────────────────────────────────── */
.md-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ── Blockquotes ─────────────────────────────────────────────── */
.md-content blockquote {
  border-left: 3px solid var(--site-accent);
  margin: 1.5em 0;
  padding: 0.6em 1.2em;
  background: var(--site-accent-faint);
  border-radius: 0 6px 6px 0;
  font-style: italic;
}

.md-content blockquote p {
  margin-bottom: 0.4em;
}

[data-md-color-scheme="slate"] .md-content blockquote {
  background: rgba(45, 196, 141, 0.06);
}

/* ── Code blocks ─────────────────────────────────────────────── */
.md-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background: var(--md-code-bg-color, rgba(0,0,0,0.04));
}

.md-content pre {
  border-radius: 8px;
  margin: 1.2em 0;
}

.md-content pre code {
  font-size: 0.82rem;
  line-height: 1.65;
  padding: 0;
}

/* ── Tables ──────────────────────────────────────────────────── */
.md-content table:not([class]) {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--md-default-fg-color--lightest);
  margin: 1.5em 0;
}

.md-content table:not([class]) th {
  background: var(--site-accent-faint);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.md-content table:not([class]) td {
  font-size: 0.88rem;
}

/* ── Admonitions ─────────────────────────────────────────────── */
.md-typeset .admonition,
.md-typeset details {
  border-radius: 8px;
  border-width: 0;
  border-left: 3px solid;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.md-typeset .admonition-title,
.md-typeset summary {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
}

/* question admonition — accent color */
.md-typeset .admonition.question,
.md-typeset details.question {
  border-left-color: var(--site-accent);
}

/* ── Lists ───────────────────────────────────────────────────── */
.md-content ul,
.md-content ol {
  margin-bottom: 1em;
}

.md-content li {
  margin-bottom: 0.3em;
}

.md-content li > p {
  margin-bottom: 0.5em;
}

/* ── Horizontal rules ────────────────────────────────────────── */
.md-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--md-default-fg-color--lightest) 20%,
    var(--md-default-fg-color--lightest) 80%,
    transparent 100%);
  margin: 2.5em 0;
}

/* ── Sidebar nav refinement ──────────────────────────────────── */
.md-nav__link {
  font-family: var(--font-body);
  font-size: 0.82rem;
}

.md-nav__item--active > .md-nav__link {
  font-weight: 600;
  color: var(--site-accent);
}

/* ── Content tabs (for image/text toggle) ────────────────────── */
.md-typeset .tabbed-labels > label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
}

/* ── Footer ──────────────────────────────────────────────────── */
.md-footer {
  background: linear-gradient(135deg, #0b3d35 0%, #114b5f 50%, #1a2940 100%);
}

[data-md-color-scheme="slate"] .md-footer {
  background: linear-gradient(135deg, #0a2520 0%, #0d3040 50%, #111827 100%);
}

/* ── Search highlight ────────────────────────────────────────── */
.md-search-result mark {
  background: rgba(13, 147, 115, 0.2);
  color: inherit;
}

/* ── Smooth scrolling ────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

/* ── Print: strip custom styles ──────────────────────────────── */
@media print {
  .md-header, .md-footer, .md-sidebar { display: none; }
  .md-content { font-size: 11pt; }
}
