/* ─── Brand tokens (matches src/index.css) ──────────────────────────────── */
:root {
  --gold:       #c69a59;
  --gold-h:     #d4aa6a;
  --on-gold:    #1f2325;
  --cream:      #f3efe6;
  --page-bg:    #111827;
  --surface:    #1a2230;
  --surface-h:  #212d40;
  --border:     #2a3547;
  --text:       #c9d1d9;
  --text-dim:   #6b7680;
  --text-bright:#f0f6fc;
  --red:        #f87171;
}

/* ─── Reset & base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ─── Logo ───────────────────────────────────────────────────────────────── */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  opacity: 1;
  transition: opacity 0.15s;
}
.logo:hover { opacity: 0.75; }
.logo-icon {
  font-size: 1.25rem;
  font-family: 'Noto Color Emoji', sans-serif;
  line-height: 1;
}
.logo-text { font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.logo-brand { color: var(--cream); }
.logo-accent { color: var(--gold); }

/* ─── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(3, 7, 18, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* ─── Button ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.45rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background 0.15s, opacity 0.15s;
  text-decoration: none;
}
.btn-gold {
  background: var(--gold);
  color: var(--on-gold);
}
.btn-gold:hover { background: var(--gold-h); }

/* ─── Breadcrumb ─────────────────────────────────────────────────────────── */
.breadcrumb {
  padding: 1.25rem 0 0;
}
.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.breadcrumb a { transition: color 0.15s; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { user-select: none; }

/* ─── Article layout ─────────────────────────────────────────────────────── */
.article-main { padding-top: 2rem; padding-bottom: 3rem; }

.article-header { margin-bottom: 2.5rem; }
.article-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}
.article-header .lead {
  font-size: 1.0625rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ─── Article body ───────────────────────────────────────────────────────── */
.article-body { display: flex; flex-direction: column; gap: 2.25rem; }

.article-body section h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.75rem;
}
.article-body p { margin-top: 0.75rem; }
.article-body p:first-child { margin-top: 0; }
.article-body strong { color: #e2e8f0; font-weight: 600; }
.article-body em { font-style: italic; }

/* ─── Bullet lists ───────────────────────────────────────────────────────── */
.check-list, .cross-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.check-list li, .cross-list li {
  display: flex;
  gap: 0.625rem;
}
.check-list li::before {
  content: '›';
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 0.1em;
}
.cross-list li::before {
  content: '×';
  color: var(--red);
  flex-shrink: 0;
  margin-top: 0.1em;
}

/* ─── Table ──────────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  display: block;
}
.data-table thead th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  padding-bottom: 0.5rem;
  padding-right: 1.25rem;
  white-space: nowrap;
}
.data-table tbody tr { border-top: 1px solid var(--border); }
.data-table tbody td {
  padding: 0.625rem 1.25rem 0.625rem 0;
  color: var(--text-dim);
  white-space: nowrap;
}
.data-table tbody td:first-child { color: #e2e8f0; font-weight: 500; }
.table-note {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

/* ─── CTA block ──────────────────────────────────────────────────────────── */
.cta-block {
  margin-top: 3rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 0.875rem;
  padding: 1.75rem;
  text-align: center;
}
.cta-block h3 {
  color: var(--text-bright);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}
.cta-block p {
  color: var(--text-dim);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

/* ─── Related guides ─────────────────────────────────────────────────────── */
.related-guides {
  border-top: 1px solid var(--border);
  background: rgba(26, 34, 48, 0.5);
  padding: 2.5rem 0;
}
.related-guides h2 {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}
.guide-card {
  display: block;
  padding: 1rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.guide-card:hover {
  border-color: #4a5568;
  background: rgba(255,255,255,0.03);
}
.guide-card:hover .guide-card-title { color: var(--gold); }
.guide-card-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-bright);
  margin-bottom: 0.25rem;
  transition: color 0.15s;
}
.guide-card-desc {
  font-size: 0.8125rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ─── Index page ─────────────────────────────────────────────────────────── */
.index-main { padding-top: 3rem; padding-bottom: 4rem; }
.index-header { margin-bottom: 2.5rem; }
.index-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.025em;
  margin-bottom: 0.625rem;
}
.index-header .lead { font-size: 1.0625rem; color: var(--text-dim); line-height: 1.65; }
.index-list { display: flex; flex-direction: column; gap: 0.625rem; }
.index-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.index-card:hover { border-color: #4a5568; background: rgba(255,255,255,0.03); }
.index-card:hover .index-card-title { color: var(--gold); }
.index-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.25rem;
  transition: color 0.15s;
}
.index-card-desc { font-size: 0.8125rem; color: var(--text-dim); line-height: 1.5; }
.index-card-arrow { color: var(--text-dim); flex-shrink: 0; transition: color 0.15s; }
.index-card:hover .index-card-arrow { color: var(--gold); }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.site-footer a { transition: color 0.15s; }
.site-footer a:hover { color: var(--text); }
.site-footer .btn-coffee {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(234, 179, 8, 0.1);
  color: #facc15;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.site-footer .btn-coffee:hover {
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
}

/* ─── Keyboard shortcuts table ───────────────────────────────────────────── */
.shortcuts-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
}
.shortcuts-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text);
  vertical-align: middle;
}
.shortcuts-table tr:last-child td { border-bottom: none; }
.shortcuts-table td:first-child { white-space: nowrap; width: 1%; }

kbd {
  display: inline-block;
  padding: 0.15em 0.45em;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.8em;
  line-height: 1.4;
  color: var(--text-bright);
  background: var(--surface-h);
  border: 1px solid var(--border);
  border-radius: 0.3em;
  margin: 0 0.1em;
}
