/* Forge Language Spec — Custom Theme */

:root {
  --forge-orange: #ff6b35;
  --forge-teal: #64ffda;
  --forge-deep: #020c1b;
}

/* Navy theme overrides */
.navy {
  --bg: #0a192f;
  --fg: #ccd6f6;
  --sidebar-bg: #020c1b;
  --sidebar-fg: #8892b0;
  --sidebar-active: #ff6b35;
  --sidebar-spacer: #112240;
  --links: #ff6b35;
  --inline-code-color: #64ffda;
  --theme-popup-bg: #112240;
  --theme-popup-border: #1d3461;
  --quote-bg: rgba(255, 107, 53, 0.06);
  --quote-border: #ff6b35;
  --table-border-color: #1d3461;
  --table-header-bg: #112240;
  --table-alternate-bg: rgba(17, 34, 64, 0.5);
  --searchbar-bg: #112240;
  --searchbar-fg: #ccd6f6;
  --searchbar-border-color: #1d3461;
  --searchresults-border-color: #1d3461;
  --searchresults-li-bg: #112240;
}

/* Sidebar branding */
.sidebar .sidebar-scrollbox::before {
  content: "⚒️ Forge Language Spec";
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ff6b35;
  padding: 0.8rem 1.2rem 0.5rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #1d3461;
  margin-bottom: 0.5rem;
}

/* Active chapter highlight */
.sidebar .active {
  border-left: 3px solid #ff6b35;
  padding-left: calc(1.2rem - 3px);
}

/* Code block styling */
code {
  font-family: "JetBrains Mono", "Fira Code", "Source Code Pro", monospace;
}

pre {
  border-radius: 8px;
  border: 1px solid #1d3461;
}

pre > .buttons {
  border-radius: 0 8px 0 0;
}

/* Inline code */
:not(pre) > code {
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.88em;
}

/* Headings */
.content main h1 {
  color: #e6f1ff;
  border-bottom: 2px solid #ff6b35;
  padding-bottom: 0.3em;
}

.content main h2 {
  color: #ccd6f6;
  border-bottom: 1px solid #1d3461;
  padding-bottom: 0.2em;
  margin-top: 2em;
}

.content main h3 {
  color: #a8b2d1;
}

/* Tables */
table {
  border-radius: 8px;
  overflow: hidden;
}

table th {
  color: #ff6b35;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}

/* Blockquotes for notes/tips */
blockquote {
  border-left: 4px solid #ff6b35;
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.2rem;
  margin: 1.5em 0;
}

blockquote p:first-child {
  margin-top: 0;
}

/* Links */
a {
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #ff8c5a;
  text-decoration: underline;
}

/* Spec-specific: syntax definition blocks */
.syntax-def {
  background: #112240;
  border: 1px solid #1d3461;
  border-left: 4px solid #64ffda;
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.5rem;
  margin: 1.5em 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.8;
  color: #a8b2d1;
}

.syntax-def .keyword {
  color: #ff6b35;
  font-weight: 600;
}

.syntax-def .production {
  color: #64ffda;
  font-style: italic;
}

/* Dual syntax comparison */
.dual-syntax {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5em 0;
}

.dual-syntax > div {
  background: #112240;
  border: 1px solid #1d3461;
  border-radius: 8px;
  padding: 1rem;
}

.dual-syntax > div:first-child {
  border-top: 3px solid #64ffda;
}

.dual-syntax > div:last-child {
  border-top: 3px solid #ff6b35;
}

.dual-syntax h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.dual-syntax > div:first-child h4 {
  color: #64ffda;
}

.dual-syntax > div:last-child h4 {
  color: #ff6b35;
}

/* Version badge */
.version-badge {
  display: inline-block;
  padding: 0.2em 0.6em;
  background: rgba(255, 107, 53, 0.15);
  color: #ff6b35;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: monospace;
}

/* Responsive adjustments */
@media (max-width: 700px) {
  .dual-syntax {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.content main::after {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, #ff6b35, transparent);
  margin-top: 4rem;
}
