/* ---- Practice Admin Guide ---- */

/* Hero */
.guide-hero {
  background: var(--brand-50);
  padding: 160px 0 var(--space-2xl);
  text-align: center;
}
.guide-hero h1 {
  color: var(--color-secondary);
  font-weight: var(--weight-extrabold);
  margin-bottom: var(--space-2xs);
}
.guide-hero .lede {
  max-width: 38em;
  margin: 0 auto;
}
.guide-meta {
  display: flex;
  justify-content: center;
  gap: var(--space-m);
  margin-top: var(--space-s);
  font-size: var(--text-sm);
  color: var(--color-ink-soft);
}
.guide-meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
}
.guide-meta svg {
  width: 16px; height: 16px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 2;
}

/* Table of contents */
.guide-toc {
  max-width: 680px;
  margin: 0 auto var(--space-xl);
  background: var(--brand-25);
  border-radius: var(--radius-xl);
  padding: var(--space-m) var(--space-l);
  box-shadow: var(--shadow-xs);
}
.guide-toc h2 {
  font-size: var(--step-1);
  margin-bottom: var(--space-xs);
}
.guide-toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
}
.guide-toc li {
  counter-increment: toc;
  margin-bottom: var(--space-2xs);
}
.guide-toc li a {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-ink);
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-md);
  transition: background .15s var(--ease), color .15s;
}
.guide-toc li a:hover {
  background: var(--brand-50);
  color: var(--color-primary);
}
.guide-toc li a::before {
  content: counter(toc, decimal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--grad-chip);
  color: #fff;
  font-size: var(--step--2);
  font-weight: var(--weight-extrabold);
  flex: none;
}
/* Part 0 uses "0" */
.guide-toc li:first-child a::before {
  content: "0";
}

/* Guide body */
.guide-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--space-m) var(--space-2xl);
}

/* Part dividers */
.guide-part {
  margin-top: var(--space-2xl);
  scroll-margin-top: 100px;
}
.guide-part + .guide-part {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-2xl);
}

/* Part header */
.part-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--step--1);
  font-weight: var(--weight-bold);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}
.part-label .part-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--grad-chip);
  color: #fff;
  font-size: var(--step--2);
  font-weight: var(--weight-extrabold);
  letter-spacing: 0;
}

.guide-part h2 {
  font-weight: var(--weight-extrabold);
  margin-bottom: var(--space-s);
}
.guide-part h3 {
  margin-top: var(--space-l);
  margin-bottom: var(--space-xs);
}
.guide-part h4 {
  margin-top: var(--space-m);
  margin-bottom: var(--space-2xs);
}
.guide-part p {
  color: var(--color-ink-soft);
  line-height: var(--line-relaxed);
  margin-top: var(--space-2xs);
}
.guide-part p strong {
  color: var(--color-secondary);
}

/* Lists inside guide */
.guide-part ul,
.guide-part ol {
  padding-left: var(--space-m);
  margin: var(--space-xs) 0 0;
}
.guide-part li {
  color: var(--color-ink-soft);
  line-height: var(--line-relaxed);
  margin-bottom: var(--space-2xs);
}
.guide-part li strong {
  color: var(--color-secondary);
}

/* Callout inside guide */
.guide-part .callout {
  margin: var(--space-m) 0;
}

/* Numbered steps within guide */
.guide-steps {
  list-style: none;
  counter-reset: gstep;
  margin: var(--space-m) 0;
  padding: 0;
}
.guide-steps > li {
  counter-increment: gstep;
  position: relative;
  padding-left: var(--space-xl);
  margin-bottom: var(--space-m);
}
.guide-steps > li::before {
  content: counter(gstep);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--grad-chip);
  color: #fff;
  font-weight: var(--weight-extrabold);
  font-size: var(--step--1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.guide-steps > li h4 {
  margin-top: 0;
  margin-bottom: var(--space-3xs);
}

/* Menu table */
.guide-menu-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: var(--space-m) 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.guide-menu-table th,
.guide-menu-table td {
  padding: var(--space-xs) var(--space-s);
  text-align: left;
  font-size: var(--text-md);
}
.guide-menu-table th {
  background: var(--brand-50);
  color: var(--color-secondary);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.guide-menu-table td {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-soft);
  color: var(--color-ink-soft);
}
.guide-menu-table td:first-child {
  font-weight: var(--weight-semibold);
  color: var(--color-secondary);
}

/* RACI / responsibility table */
.guide-raci {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: var(--space-m) 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.guide-raci th,
.guide-raci td {
  padding: var(--space-xs) var(--space-s);
  text-align: left;
  font-size: var(--text-md);
  line-height: var(--line-normal);
}
.guide-raci th {
  background: var(--brand-50);
  color: var(--color-secondary);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.guide-raci td {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-soft);
  color: var(--color-ink-soft);
  vertical-align: top;
}
.guide-raci td:first-child {
  font-weight: var(--weight-semibold);
  color: var(--color-secondary);
  white-space: nowrap;
}

/* Badge reference */
.guide-badges {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  margin: var(--space-m) 0;
}
.guide-badge-row {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  padding: var(--space-xs) var(--space-s);
  background: var(--brand-25);
  border-radius: var(--radius-lg);
}
.guide-badge-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: var(--space-3xs) var(--space-xs);
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex: none;
  min-width: 160px;
}
.guide-badge-label.consent-ok {
  background: oklch(from var(--color-success) l c h / 15%);
  color: var(--color-success);
}
.guide-badge-label.consent-pending {
  background: oklch(from var(--color-warning) l c h / 15%);
  color: var(--color-warning);
}
.guide-badge-label.consent-escalated {
  background: oklch(from var(--color-error) l c h / 12%);
  color: var(--color-error);
}
.guide-badge-label.consent-declined {
  background: var(--neutral-100);
  color: var(--neutral-600);
}
.guide-badge-label.mc-complete {
  background: oklch(from var(--color-success) l c h / 15%);
  color: var(--color-success);
}
.guide-badge-label.mc-requested {
  background: oklch(from var(--color-info) l c h / 15%);
  color: var(--color-info);
}
.guide-badge-label.mc-missing {
  background: oklch(from var(--color-warning) l c h / 15%);
  color: var(--color-warning);
}
.guide-badge-desc {
  font-size: var(--text-md);
  color: var(--color-ink-soft);
  line-height: var(--line-normal);
}

/* Back link */
.guide-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
  color: var(--color-primary);
  margin-bottom: var(--space-m);
}
.guide-back svg {
  width: 18px;
  height: 18px;
  transform: rotate(180deg);
}
.guide-back:hover {
  text-decoration: underline;
}

/* Support footer */
.guide-support {
  margin-top: var(--space-2xl);
  padding: var(--space-l);
  background: var(--brand-50);
  border-radius: var(--radius-xl);
  text-align: center;
}
.guide-support h3 {
  margin-top: 0;
  margin-bottom: var(--space-xs);
}
.guide-support p {
  margin: var(--space-2xs) auto 0;
  max-width: 36em;
}
.guide-support a {
  color: var(--color-primary);
  font-weight: var(--weight-bold);
}

/* Responsive */
@media (max-width: 680px) {
  .guide-hero { padding: 140px 0 var(--space-xl); }
  .guide-toc { margin-left: var(--space-m); margin-right: var(--space-m); }
  .guide-menu-table { font-size: var(--step--1); }
  .guide-badge-row { flex-direction: column; align-items: flex-start; gap: var(--space-3xs); }
  .guide-badge-label { min-width: auto; }
  .guide-raci { display: block; }
  .guide-raci thead { display: none; }
  .guide-raci tr { display: block; margin-bottom: var(--space-xs); background: var(--brand-25); border-radius: var(--radius-lg); overflow: hidden; }
  .guide-raci td { display: block; border-top: none; padding: var(--space-2xs) var(--space-s); }
  .guide-raci td:first-child { background: var(--brand-50); padding: var(--space-xs) var(--space-s); }
  .guide-raci td::before { content: attr(data-label); display: block; font-weight: var(--weight-bold); font-size: var(--step--2); color: var(--color-accent); letter-spacing: .05em; text-transform: uppercase; margin-bottom: var(--space-3xs); }
  .guide-meta { flex-direction: column; gap: var(--space-2xs); }
}
@media (max-width: 480px) {
  .guide-steps > li { padding-left: var(--space-l); }
  .guide-steps > li::before { width: 26px; height: 26px; font-size: var(--step--2); }
}
