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

:root {
  --bg: #ffffff;
  --bg-card: #faf8f5;
  --bg-card-hover: #f3efe9;
  --border: #e5ddd2;
  --border-hover: #d4c8b8;
  --text: #2d1f14;
  --text-muted: #6b5a4a;
  --accent: #c8862a;
  --accent-bright: #a86d1e;
  --accent-dim: #fdf3e4;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-bright); }

/* ── Layout ── */
.page-wrapper {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px 120px;
  gap: 48px;
}

.sidebar {
  position: sticky;
  top: 32px;
  align-self: flex-start;
  width: 220px;
  flex-shrink: 0;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.sidebar-nav {
  list-style: none;
  font-size: 0.85rem;
}

.sidebar-nav li { margin-bottom: 6px; }

.sidebar-nav a {
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  padding: 4px 12px;
  border-left: 2px solid transparent;
  border-radius: 2px;
  transition: all 0.15s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-dim);
}

.content {
  flex: 1;
  min-width: 0;
  max-width: 780px;
}

.back-link {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.back-link:hover { color: var(--accent); }

/* ── Typography ── */
h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 48px;
}
.footer-nav { display: block; margin-top: 10px; }
.footer-nav a { color: var(--text-muted); margin: 0 10px; text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 56px;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  letter-spacing: -0.01em;
}

h2:first-of-type {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 10px;
}

p { margin-bottom: 16px; }

ul, ol {
  margin: 0 0 16px 24px;
}

li { margin-bottom: 6px; }

/* ── Callout boxes ── */
.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 16px 0 20px;
  font-size: 0.95rem;
}

.callout-label {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 6px;
}

/* ── Keyboard shortcuts ── */
kbd {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 7px;
  white-space: nowrap;
  font-weight: 500;
}

/* ── Shortcut table ── */
.shortcut-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 0.95rem;
}

.shortcut-table th,
.shortcut-table td {
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.shortcut-table th {
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-card);
}

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

/* ── Color swatches ── */
.color-list { list-style: none; margin-left: 0; }

.color-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}

.swatch-green { background: #34a853; }
.swatch-blue { background: #4285f4; }
.swatch-orange { background: #ea8600; }
.swatch-gray { background: #9aa0a6; }

/* ── Doc logo ── */
.doc-logo {
  display: block;
  margin: 0 auto 16px;
  width: 80px;
  height: 80px;
}

/* ── Doc images ── */
.doc-image {
  margin: 20px auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: table;
}

.doc-image img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .page-wrapper { flex-direction: column; padding-top: 40px; gap: 24px; }
  .sidebar { position: static; width: 100%; max-height: none; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.3rem; margin-top: 40px; }
}
