/* TREVL Docs — Clean, flat, modern. GitHub meets IKEA. */

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

:root {
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --bg: #ffffff;
  --bg-secondary: #f9fafb;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --code-bg: #f4f4f5;
  --radius: 8px;
  --sidebar-width: 240px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

/* Layout */
.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 0 20px 20px;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo:hover {
  text-decoration: none;
}

.logo-icon {
  width: 24px;
  height: 24px;
}

.logo-wordmark {
  height: 40px;
  width: auto;
}

.version {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.nav-list {
  list-style: none;
  flex: 1;
  padding: 0 8px;
}

.nav-list li a {
  display: block;
  padding: 6px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.1s, color 0.1s;
}

.nav-list li a:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

.nav-list li a.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px 20px 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
}

.github-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
}

.github-link:hover {
  color: var(--text);
}

.trendence-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.made-by {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.trendence-link {
  display: block;
}

.trendence-logo {
  height: 14px;
  width: auto;
  opacity: 0.4;
  transition: opacity 0.15s;
}

.trendence-logo:hover {
  opacity: 0.8;
}

/* Content */
.content {
  margin-left: var(--sidebar-width);
  flex: 1;
  max-width: 780px;
  padding: 40px 48px 80px;
}

/* Typography */
h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 28px 0 8px;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 20px 0 8px;
}

p {
  margin: 0 0 16px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  font-weight: 600;
}

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

/* Lists */
ul, ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

li {
  margin-bottom: 4px;
}

li > ul, li > ol {
  margin-top: 4px;
  margin-bottom: 4px;
}

/* Code */
code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  margin: 0 0 16px;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 0.85rem;
}

/* Rouge syntax highlighting wrapper */
div.highlighter-rouge {
  margin: 0 0 16px;
}

div.highlighter-rouge pre.highlight {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0;
}

/* Language label */
div.highlighter-rouge::before {
  content: attr(data-lang);
  display: block;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
}

div.highlighter-rouge pre.highlight {
  border-radius: 0 0 var(--radius) var(--radius);
}

/* Override Rouge background */
.highlight {
  background: var(--code-bg) !important;
}

/* Blockquotes — clean callout */
blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
}

blockquote p {
  margin: 0;
}

blockquote p + p {
  margin-top: 8px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: 0.9rem;
}

th, td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr:last-child td {
  border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .content {
    margin-left: 0;
    padding: 24px 20px 60px;
  }
}
