@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --guide-navy-950: #0a0f1e;
  --guide-navy-900: #0f172a;
  --guide-navy-800: #1e293b;
  --guide-indigo: #4f46e5;
  --guide-indigo-light: #818cf8;
  --guide-gold: #f59e0b;
  --guide-gold-light: #fbbf24;
  --guide-surface: #f1f5f9;
  --guide-card: #ffffff;
  --guide-border: #e2e8f0;
  --guide-muted: #64748b;
  --guide-text: #0f172a;
  --guide-font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
}

/* User guide — premium layout aligned with landing page */
.guide-page {
  font-family: var(--guide-font);
  background: linear-gradient(180deg, #eef2ff 0%, var(--guide-surface) 220px, #f8fafc 100%);
  -webkit-font-smoothing: antialiased;
}

.guide-page .site-header nav a {
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.guide-page .site-header nav a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.guide-page .site-header nav a.active {
  background: linear-gradient(135deg, var(--guide-gold-light), var(--guide-gold));
  color: var(--guide-navy-950) !important;
  font-weight: 700;
}

.guide-page-wrap {
  display: flex;
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3.5rem;
  gap: 2rem;
  align-items: flex-start;
}

.guide-sidebar {
  width: 268px;
  flex-shrink: 0;
  position: sticky;
  top: 88px;
  background: var(--guide-card);
  border: 1px solid var(--guide-border);
  border-radius: 18px;
  padding: 1.35rem 0;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
}

.guide-nav-title {
  margin: 0 1.35rem 0.85rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--guide-indigo);
}

.guide-chapter-nav {
  display: flex;
  flex-direction: column;
}

.guide-chapter-nav a {
  display: block;
  padding: 0.5rem 1.35rem;
  color: var(--guide-text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.guide-chapter-nav a:hover {
  background: #f8fafc;
  color: var(--guide-indigo);
  text-decoration: none;
}

.guide-chapter-nav a.active {
  background: linear-gradient(90deg, #eef2ff, transparent);
  color: var(--guide-indigo);
  border-left-color: var(--guide-indigo);
  font-weight: 700;
}

.guide-article {
  flex: 1;
  min-width: 0;
  background: var(--guide-card);
  border: 1px solid var(--guide-border);
  border-radius: 20px;
  padding: 2rem 2.5rem 2.75rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.07);
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--guide-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  color: var(--guide-indigo);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.guide-article h1 {
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
  line-height: 1.15;
  color: var(--guide-navy-900);
}

.guide-lead {
  color: var(--guide-muted);
  font-size: 1.06rem;
  margin: 0 0 2rem;
  line-height: 1.65;
  padding-left: 1rem;
  border-left: 3px solid var(--guide-gold);
}

.guide-article h2 {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 0.85rem;
  padding: 0.85rem 0 0.5rem;
  border-top: 1px solid var(--guide-border);
  color: var(--guide-navy-900);
  position: relative;
}

.guide-article h2::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--guide-indigo), var(--guide-gold));
}

.guide-article h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.guide-article h2:first-of-type::before {
  display: none;
}

.guide-article h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 1.75rem 0 0.55rem;
  color: var(--guide-navy-800);
}

.guide-article p,
.guide-article li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: #334155;
}

.guide-article strong {
  color: var(--guide-navy-900);
  font-weight: 700;
}

.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
  margin: 1.35rem 0;
}

.guide-card,
a.guide-card {
  display: block;
  background: linear-gradient(180deg, #fafbff, #f8fafc);
  border: 1px solid var(--guide-border);
  border-radius: 14px;
  padding: 1.2rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.guide-card:hover,
a.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.12);
  border-color: #c7d2fe;
  text-decoration: none;
}

.guide-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--guide-navy-900);
}

.guide-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--guide-muted);
  line-height: 1.5;
}

.guide-callout {
  border-radius: 14px;
  padding: 1rem 1.3rem;
  margin: 1.35rem 0;
  font-size: 0.92rem;
  border-left: 4px solid;
  line-height: 1.65;
}

.guide-callout a {
  font-weight: 700;
}

.guide-callout-tip {
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
  border-color: #3b82f6;
  color: #1e3a5f;
}

.guide-callout-note {
  background: linear-gradient(135deg, #fffbeb, #fefce8);
  border-color: var(--guide-gold);
  color: #78350f;
}

.guide-callout-success {
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border-color: #059669;
  color: #064e3b;
}

.guide-steps {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0;
  counter-reset: step;
}

.guide-steps li {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.7rem;
  padding: 0.9rem 1.1rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid var(--guide-border);
  counter-increment: step;
}

.guide-steps li::before {
  content: counter(step);
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: var(--guide-indigo);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-table-wrap {
  overflow-x: auto;
  margin: 1.1rem 0;
  border: 1px solid var(--guide-border);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.guide-table th,
.guide-table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--guide-border);
}

.guide-table th {
  background: linear-gradient(180deg, #eef2ff, #e8eeff);
  font-weight: 700;
  color: var(--guide-indigo);
}

.guide-table tr:last-child td {
  border-bottom: none;
}

.guide-kbd {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
}

.guide-checklist {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.guide-checklist li {
  padding: 0.35rem 0 0.35rem 1.6rem;
  position: relative;
}

.guide-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #059669;
  font-weight: 800;
}

.guide-next-prev {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--guide-border);
}

.guide-next-prev a {
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.65rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--guide-border);
  background: #f8fafc;
  color: var(--guide-indigo);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.guide-next-prev a:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  text-decoration: none;
  transform: translateY(-1px);
}

.guide-figure {
  margin: 1.35rem 0 1.85rem;
  border: 1px solid var(--guide-border);
  border-radius: 16px;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}

.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.guide-figure figcaption {
  padding: 0.75rem 1.1rem;
  font-size: 0.82rem;
  color: var(--guide-muted);
  border-top: 1px solid var(--guide-border);
  background: white;
  line-height: 1.55;
}

.guide-figure-group {
  display: grid;
  gap: 1.25rem;
  margin: 1.25rem 0 1.75rem;
}

@media (min-width: 720px) {
  .guide-figure-group--pair {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .guide-page-wrap {
    flex-direction: column;
    padding: 1rem 1rem 2.5rem;
  }

  .guide-sidebar {
    width: 100%;
    position: static;
  }

  .guide-chapter-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }

  .guide-article {
    padding: 1.5rem 1.25rem 2rem;
  }
}

@media print {
  .site-header,
  .guide-sidebar,
  .site-footer {
    display: none !important;
  }

  .guide-page-wrap {
    display: block;
    padding: 0;
  }

  .guide-article {
    border: none;
    box-shadow: none;
  }
}
