/* WriteBase Web — extracted from extra.css */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --purple-500: #7c3aed;
  --purple-100: #ede9fe;
}

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--stone-50);
  color: var(--stone-800);
  line-height: 1.7;
}

/* Header */
header {
  background: rgba(250, 250, 249, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--stone-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo img {
  height: 32px;
  width: auto;
}

.site-title {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--stone-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Layout */
.layout {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  min-height: calc(100vh - 64px - 60px);
}

/* Sidebar */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--stone-100);
}

.nav-list {
  list-style: none;
}

.nav-list li {
  margin-bottom: 0.25rem;
}

.nav-list a {
  display: block;
  padding: 0.4rem 0.75rem;
  color: var(--stone-600);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.nav-list a:hover {
  background: var(--stone-100);
  color: var(--stone-900);
}

.nav-list a.active {
  color: var(--purple-500);
  font-weight: 600;
  background: var(--purple-100);
}

/* Content */
.content {
  flex: 1;
  padding: 2rem 3rem;
  max-width: 800px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  color: var(--stone-900);
}

h1 {
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

h2 {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--stone-200);
  padding-bottom: 0.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-weight: 600;
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

p {
  color: var(--stone-600);
  margin-bottom: 1rem;
}

a {
  color: var(--purple-500);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--stone-900);
}

/* Lists */
ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--stone-600);
}

li {
  margin-bottom: 0.35rem;
}

/* Code */
code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--stone-100);
  color: var(--stone-800);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.875em;
}

pre {
  background: var(--stone-900);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

pre code {
  background: none;
  color: var(--stone-100);
  padding: 0;
}

/* Blockquotes */
blockquote {
  border-left: 3px solid var(--purple-500);
  background: var(--purple-100);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  color: var(--stone-700);
  margin-bottom: 1rem;
}

/* Tables */
table {
  border-collapse: collapse;
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  margin-bottom: 1.5rem;
}

th {
  background: var(--stone-100);
  font-weight: 600;
  color: var(--stone-700);
  text-align: left;
}

th, td {
  padding: 0.6rem 1rem;
  border: 1px solid var(--stone-200);
}

/* Images */
img {
  max-width: 100%;
  border-radius: 8px;
}

/* Footer */
footer {
  border-top: 1px solid var(--stone-200);
  padding: 1.25rem 2rem;
  text-align: center;
  color: var(--stone-400);
  font-size: 0.85rem;
}

/* Mobile */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .content {
    padding: 1.5rem 1rem;
  }
}

::selection {
  background: var(--purple-100);
}
