@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;600;700&display=swap');

:root {
  --bg: #FDF8E1;
  --bg-soft: #F0ECC8;
  --ink: #1A1A1A;
  --ink-soft: #4A4A4A;
  --ink-mute: #999999;
  --accent: #22C55E;
  --divider: #E5DFC0;
  --white: #FFFFFF;
  --max-width: 720px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.header {
  border-bottom: 1px solid var(--divider);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(253, 248, 225, 0.92);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--ink);
  text-decoration: none;
}

.lang-switcher {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.lang-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.15s, background 0.15s;
}

.lang-btn:hover { color: var(--ink); }
.lang-btn.active {
  color: var(--white);
  background: var(--ink);
}

.tabs {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  gap: 8px;
}

.tab {
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg-soft);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.tab.active {
  background: var(--ink);
  color: var(--white);
}

.tab:hover:not(.active) { background: var(--divider); }

.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 96px;
}

.content h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
  line-height: 1.2;
}

.content h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

.content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}

.content p {
  margin-bottom: 14px;
  color: var(--ink-soft);
}

.content strong { color: var(--ink); font-weight: 600; }

.content ul, .content ol {
  margin-left: 20px;
  margin-bottom: 18px;
  color: var(--ink-soft);
}

.content li { margin-bottom: 6px; }

.content a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.content a:hover { color: var(--accent); }

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

.content code {
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 0.9em;
}

.content blockquote {
  border-left: 3px solid var(--divider);
  padding-left: 16px;
  margin: 18px 0;
  color: var(--ink-mute);
  font-style: italic;
}

.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-mute);
  font-size: 14px;
}

.footer {
  border-top: 1px solid var(--divider);
  padding: 32px 24px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 13px;
}

.footer a {
  color: var(--ink-soft);
  text-decoration: none;
  margin: 0 8px;
}

.footer a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .header-inner {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .brand { font-size: 16px; letter-spacing: 1.5px; }
  .lang-btn { font-size: 11px; padding: 5px 8px; }
  .tabs { padding: 20px 16px 0; }
  .content { padding: 24px 16px 64px; }
  .content h1 { font-size: 26px; }
  .content h2 { font-size: 18px; margin-top: 32px; }
}