/* Iron Rain Documentation — Shared Styles */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --gold: #c49b21;
  --gold-bright: #d4b820;
  --gold-dark: #9a7a18;
  --gold-light: #d4c066;
  --gold-soft: #e8d48b;
  --slot-main: #c49b21;
  --slot-explore: #d4c066;
  --slot-execute: #e8a317;
  --bg: #000000;
  --bg-card: #1a1a1a;
  --bg-elevated: #2d2d2d;
  --bg-code: #0d0d0d;
  --text: #e0e0e0;
  --text-muted: #737373;
  --text-bright: #ffffff;
  --border: #3d3d3d;
  --sidebar-width: 260px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

code, pre, .mono {
  font-family: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

/* Top Nav */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0,0,0,0.9);
}
.topnav .logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
}
.topnav .logo:hover { text-decoration: none; color: var(--gold-bright); }
.topnav .logo img { width: 36px; height: 36px; }
.topnav .links { display: flex; gap: 1.25rem; align-items: center; }
.topnav .links a {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
}
.topnav .links a:hover { color: var(--gold); text-decoration: none; }
.topnav .links a.active { color: var(--gold); }

/* Layout: sidebar + content */
.docs-layout {
  display: flex;
  min-height: calc(100vh - 49px);
}

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 49px;
  height: calc(100vh - 49px);
  overflow-y: auto;
  background: var(--bg);
}
.sidebar .section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.5rem 1.25rem 0.25rem;
  margin-top: 0.75rem;
}
.sidebar .section-title:first-child { margin-top: 0; }
.sidebar a {
  display: block;
  padding: 0.35rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: all 0.15s;
}
.sidebar a:hover {
  color: var(--text);
  background: rgba(196,155,33,0.05);
  text-decoration: none;
}
.sidebar a.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(196,155,33,0.08);
}
.sidebar a.sub {
  padding-left: 2rem;
  font-size: 0.8rem;
}

/* Main content area */
.content {
  flex: 1;
  max-width: 800px;
  padding: 2.5rem 3rem 4rem;
  min-width: 0;
}

.content h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.content .subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 2.5rem 0 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.content h2:first-of-type { border-top: none; padding-top: 0; }
.content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold-light);
  margin: 1.75rem 0 0.5rem;
}
.content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.25rem 0 0.4rem;
}
.content p { margin-bottom: 1rem; }
.content ul, .content ol {
  margin: 0.5rem 0 1rem 1.5rem;
}
.content li { margin-bottom: 0.35rem; }
.content strong { color: var(--text-bright); }

/* Inline code */
.content code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  font-size: 0.82em;
  color: var(--gold-light);
}

/* Code blocks */
.content pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.82rem;
  line-height: 1.65;
}
.content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: var(--text);
}
.content pre .comment { color: var(--text-muted); }
.content pre .key { color: var(--gold-light); }
.content pre .str { color: var(--gold); }
.content pre .kw { color: #d4c066; }
.content pre .fn { color: #e8d48b; }
.content pre .type { color: #e8a317; }

/* Tables */
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.88rem;
}
.content th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--gold-light);
  font-weight: 600;
  font-size: 0.82rem;
}
.content td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  vertical-align: top;
}

/* Callout boxes */
.callout {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0 1.25rem;
  font-size: 0.9rem;
}
.callout-title {
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.callout.tip {
  background: rgba(196,155,33,0.08);
  border: 1px solid rgba(196,155,33,0.25);
}
.callout.tip .callout-title { color: var(--gold); }
.callout.warning {
  background: rgba(232,163,23,0.08);
  border: 1px solid rgba(232,163,23,0.25);
}
.callout.warning .callout-title { color: var(--slot-execute); }
.callout.info {
  background: rgba(212,192,102,0.06);
  border: 1px solid rgba(212,192,102,0.2);
}
.callout.info .callout-title { color: var(--gold-light); }

/* Step-by-step */
.steps { counter-reset: step; }
.step {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1.5rem;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  background: rgba(196,155,33,0.15);
  color: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 600;
}
.step h3 { margin-top: 0; }

/* Slot badges */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-family: 'Fira Code', monospace;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}
.badge.main { background: rgba(196,155,33,0.15); color: var(--slot-main); }
.badge.explore { background: rgba(212,192,102,0.15); color: var(--slot-explore); }
.badge.execute { background: rgba(232,163,23,0.15); color: var(--slot-execute); }

/* Next/prev navigation */
.page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}
.page-nav a {
  display: block;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s;
  max-width: 50%;
}
.page-nav a:hover { border-color: var(--gold-dark); text-decoration: none; }
.page-nav .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.page-nav .title {
  color: var(--gold);
  font-weight: 500;
  font-size: 0.9rem;
}
.page-nav .next { text-align: right; margin-left: auto; }

/* Footer */
.docs-footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Mobile */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .content { padding: 1.5rem 1.25rem 3rem; }
  .content h1 { font-size: 1.6rem; }
}
