/* ─────────────────────────────────────────────────────────────────────────────
   GemID inner-page styles — shared by guide, methodology, tools, compare,
   how-to, and other inner content pages.
   Loaded AFTER shared.css. Page-specific overrides stay in inline <style>.
   ───────────────────────────────────────────────────────────────────────────── */

/* ─── MAIN LAYOUT ────────────────────────────────────────────────────────── */
main {
  flex: 1;
  padding: 2rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ─── PAGE HEADER ────────────────────────────────────────────────────────── */
.page-header { margin-bottom: 2rem; }
.page-header h1 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.page-header p {
  color: var(--muted);
  font-size: var(--text-md);
  max-width: 720px;
}

/* ─── BREADCRUMB ─────────────────────────────────────────────────────────── */
.breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { opacity: 0.4; }

/* ─── SECTION ────────────────────────────────────────────────────────────── */
.section { margin-bottom: 2.5rem; }
.section h2 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.section h3 {
  font-size: var(--text-md);
  font-weight: 600;
  margin-bottom: 0.5rem;
  margin-top: 1.25rem;
  color: var(--text);
}
.section p {
  color: var(--muted);
  font-size: var(--text-base);
  margin-bottom: 0.875rem;
  line-height: 1.7;
}
.section ul, .section ol {
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--muted);
  font-size: var(--text-base);
}
.section li { line-height: 1.6; }

/* ─── NOTE / CALLOUT ─────────────────────────────────────────────────────── */
.note {
  background: var(--surface);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.875rem 1.125rem;
  margin: 1rem 0;
}
.note p { color: var(--muted); font-size: var(--text-base); margin: 0; }
.note strong { color: var(--text); }

/* ─── WARNING CALLOUT ────────────────────────────────────────────────────── */
.warning {
  background: rgba(185,28,28,0.1);
  border-left: 3px solid #b91c1c;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.875rem 1.125rem;
  margin: 1rem 0;
}
.warning p { color: #fca5a5; font-size: var(--text-base); margin: 0; }

/* ─── CTA BOX ────────────────────────────────────────────────────────────── */
.cta-box {
  background: var(--brand-dim);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}
.cta-box p { flex: 1; color: var(--text); font-size: var(--text-base); margin: 0; }

/* ─── STEP LIST ──────────────────────────────────────────────────────────── */
.step-list { display: flex; flex-direction: column; gap: 1.25rem; }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-base);
  margin-top: 0.1rem;
}
.step-body h3 { font-size: var(--text-md); font-weight: 600; margin-bottom: 0.375rem; }
.step-body p { color: var(--muted); font-size: var(--text-base); margin: 0; }

/* ─── CARD GRID ──────────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--brand); }
.card h3 { font-size: var(--text-md); font-weight: 600; margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: var(--text-base); line-height: 1.55; margin: 0 0 0.75rem; }
.card a { display: block; color: inherit; text-decoration: none; }
.card a:hover { text-decoration: none; }
.card-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-light);
  background: var(--brand-dim);
  border: 1px solid rgba(0,137,154,0.25);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.6rem;
}
.card-arrow {
  color: var(--brand-light);
  font-size: var(--text-base);
  display: inline-block;
  transition: transform 0.15s;
}
.card:hover .card-arrow { transform: translateX(4px); }

/* ─── TABLE (inline article tables) ──────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1rem 0;
}
table { width: 100%; border-collapse: collapse; font-size: var(--text-base); }
th {
  background: var(--surface2);
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }
td a { color: var(--brand-light); font-weight: 500; }

/* ─── SIDEBAR + TOC (methodology, how-to) ────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
.sidebar { position: sticky; top: 76px; align-self: start; }
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  margin-bottom: 1.25rem;
}
.toc h4 {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--subtle);
  margin-bottom: 0.875rem;
}
.toc ol {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.toc li { border-bottom: 1px solid var(--border); line-height: 1; }
.toc li:last-child { border-bottom: none; }
.toc a {
  display: block;
  padding: 0.5rem 0;
  font-size: var(--text-sm);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.12s;
}
.toc a:hover { color: var(--text); text-decoration: none; }

.sidebar-cta {
  background: var(--brand-dim);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
}
.sidebar-cta p {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: 0.875rem;
  line-height: 1.6;
}
.sidebar-cta .btn-primary { width: 100%; justify-content: center; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  main { padding: 1.25rem 1rem; }
}
