/* ─── Reset & base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-3);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Animations ────────────────────────────────── */
@keyframes dgfade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes dgover {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── App shell ──────────────────────────────────── */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

#shell-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Sidebar ────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-brand {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-brand-mark {
  width: 32px;
  height: 32px;
  background: var(--teal);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-brand-top {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-5);
  letter-spacing: 0.04em;
}

.sidebar-brand-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.01em;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.sidebar-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-5);
  padding: 12px 22px 6px;
}

.sidebar-section-label.cc {
  color: var(--teal);
}

.sidebar-domain-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-4);
  padding: 8px 22px 2px;
  letter-spacing: -0.01em;
}

.sidebar-item {
  display: block;
  padding: 7px 12px 7px 22px;
  border-radius: 7px;
  margin: 1px 8px;
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s;
  position: relative;
}

.sidebar-item:hover {
  background: var(--border-2);
  text-decoration: none;
}

.sidebar-item.active {
  background: var(--teal-bg);
  color: var(--teal-dark);
  font-weight: 500;
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--teal);
  border-radius: 0 2px 2px 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-workspace {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-workspace-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.sidebar-workspace-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-5);
}

.sidebar-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ─── Topbar ────────────────────────────────────── */
#topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 16px;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.topbar-breadcrumb-section {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-5);
}

.topbar-breadcrumb-sep {
  color: var(--ink-6);
  font-size: 12px;
}

.topbar-breadcrumb-page {
  font-weight: 600;
  color: var(--ink-2);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── Main content ──────────────────────────────── */
#main {
  flex: 1;
  overflow-y: auto;
  background: var(--surface);
}

.page {
  animation: dgfade 0.2s ease-out;
}

.page-article {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}

.page-table {
  padding: 32px 32px 80px;
}

/* ─── Buttons ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 8px 14px;
  cursor: pointer;
  border: none;
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.btn-primary {
  background: var(--teal);
  color: #fff;
  padding: 10px 16px;
}
.btn-primary:hover { background: #0A5F57; text-decoration: none; color: #fff; }

.btn-secondary {
  background: var(--surface);
  color: var(--ink-3);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #F4F3EE; text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--ink-4);
  padding: 6px 10px;
}
.btn-ghost:hover { background: var(--border-2); text-decoration: none; }

.btn-danger {
  background: transparent;
  color: #DC2626;
  border: 1px solid #FECACA;
}
.btn-danger:hover { background: #FEF2F2; }

.btn-sm {
  font-size: 12px;
  padding: 5px 10px;
}

/* ─── Inputs ────────────────────────────────────── */
.input, .select, textarea.input {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  width: 100%;
  transition: border-color 0.12s, box-shadow 0.12s;
  line-height: 1.4;
}

.input:focus, .select:focus, textarea.input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: var(--focus-ring);
}

.input::placeholder { color: var(--ink-6); }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2378716C' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

.form-hint {
  font-size: 12px;
  color: var(--ink-5);
}

/* ─── Tables ────────────────────────────────────── */
.data-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  background: var(--bg);
}

.data-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-5);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.data-table th:hover { color: var(--ink-3); }
.data-table th.sort-asc::after  { content: ' ↑'; }
.data-table th.sort-desc::after { content: ' ↓'; }

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-2);
  color: var(--ink-3);
  vertical-align: top;
}

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

.data-table tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}

.data-table tbody tr:hover { background: var(--bg); }

/* ─── Status pills ──────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  padding: 3px 7px;
  white-space: nowrap;
}

.pill-green  { background: #D1FAE5; color: #065F46; }
.pill-amber  { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }
.pill-red    { background: #FEE2E2; color: #991B1B; }
.pill-blue   { background: #DBEAFE; color: #1E40AF; }
.pill-gray   { background: var(--bg); color: var(--ink-5); border: 1px solid var(--border); }
.pill-teal   { background: var(--teal-bg); color: var(--teal-dark); }

/* ─── Callouts ──────────────────────────────────── */
.callout {
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.callout-teal {
  background: var(--teal-bg);
  color: var(--teal-dark);
}

.callout-teal .callout-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}

.callout-amber {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
}

.callout-amber .callout-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}

/* ─── Stat strip ────────────────────────────────── */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 24px 0;
}

.stat-cell {
  background: var(--surface);
  padding: 18px 20px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat-label {
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 4px;
}

.stat-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-5);
  margin-top: 2px;
}

/* ─── Artifact page typography ──────────────────── */
.artifact-domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-5);
  margin-bottom: 12px;
}

.artifact-id {
  color: var(--teal);
}

.artifact-title {
  font-size: 40px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.artifact-meta {
  font-size: 13px;
  color: var(--ink-5);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-2);
}

.artifact-lead {
  font-size: 17px;
  color: var(--ink-3);
  max-width: 660px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.artifact-section {
  margin: 32px 0;
}

.artifact-section-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-2);
}

.artifact-section p {
  color: var(--ink-3);
  margin-bottom: 12px;
  max-width: 720px;
}

.artifact-section ul, .artifact-section ol {
  padding-left: 24px;
  color: var(--ink-3);
  max-width: 720px;
}

.artifact-section li { margin-bottom: 6px; }

.artifact-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 16px 0;
}

.artifact-section table th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-5);
  background: var(--bg);
  padding: 9px 14px;
  text-align: left;
  border: 1px solid var(--border);
}

.artifact-section table td {
  padding: 10px 14px;
  border: 1px solid var(--border-2);
  vertical-align: top;
}

.artifact-related {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.artifact-related-heading {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-5);
  margin-bottom: 12px;
}

.artifact-related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.artifact-related-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--teal);
  text-decoration: none;
  transition: background 0.12s;
}

.artifact-related-item:hover {
  background: var(--teal-bg);
  text-decoration: none;
}

.artifact-cc-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--teal-bg);
  border: 1px solid #C0E8E2;
  border-radius: var(--radius);
  margin: 24px 0;
  font-size: 13px;
  color: var(--teal-dark);
}

.artifact-p2-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  margin-left: 10px;
  vertical-align: middle;
}

/* ─── CC table page ─────────────────────────────── */
.cc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.cc-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.cc-meta {
  font-size: 13px;
  color: var(--ink-5);
  margin-top: 4px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.cc-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.cc-search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.cc-search .input {
  padding-left: 36px;
}

.cc-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-6);
  pointer-events: none;
  font-size: 14px;
}

.cc-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cc-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-4);
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}

.cc-chip.active {
  background: var(--teal-bg);
  border-color: #C0E8E2;
  color: var(--teal-dark);
}

.cc-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--ink-5);
  font-size: 14px;
}

.cc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
}

/* ─── Modal ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 9, 0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: dgover 0.18s ease-out;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-footer-right {
  display: flex;
  gap: 8px;
}

/* ─── Wizard ─────────────────────────────────────── */
#wizard-overlay {
  position: fixed;
  inset: 0;
  background: var(--surface);
  z-index: 200;
  display: flex;
  animation: dgover 0.18s ease-out;
}

.wizard-rail {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 32px 0;
  display: flex;
  flex-direction: column;
}

.wizard-rail-brand {
  padding: 0 24px 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.wizard-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 24px;
  cursor: pointer;
  transition: background 0.1s;
}

.wizard-step-item:hover { background: var(--border-2); }

.wizard-step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-5);
  flex-shrink: 0;
  transition: all 0.12s;
}

.wizard-step-item.active .wizard-step-dot {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.wizard-step-item.done .wizard-step-dot {
  border-color: var(--teal);
  background: var(--teal-bg);
  color: var(--teal);
}

.wizard-step-label {
  font-size: 13px;
  color: var(--ink-4);
}

.wizard-step-item.active .wizard-step-label {
  color: var(--ink-2);
  font-weight: 600;
}

.wizard-progress-bar {
  height: 3px;
  background: var(--border);
  margin: 16px 24px 0;
  border-radius: 2px;
  overflow: hidden;
}

.wizard-progress-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.wizard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wizard-content {
  flex: 1;
  overflow-y: auto;
  padding: 48px 56px;
  max-width: 680px;
}

.wizard-step-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.wizard-step-subtitle {
  font-size: 14px;
  color: var(--ink-5);
  margin-bottom: 32px;
}

.wizard-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wizard-footer {
  padding: 20px 56px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─── Settings panel ────────────────────────────── */
#settings-panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: 400px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 150;
  display: flex;
  flex-direction: column;
  animation: dgover 0.18s ease-out;
  box-shadow: var(--shadow-lg);
}

.settings-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.settings-section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-5);
  margin-bottom: 14px;
}

/* ─── Toggle switch ─────────────────────────────── */
.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider { background: var(--teal); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ─── Roadmap styles ────────────────────────────── */
.roadmap-phase-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.roadmap-tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-4);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.12s;
}

.roadmap-tab.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
  font-weight: 600;
}

.roadmap-task-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-2);
}

.roadmap-task-check {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--teal);
  cursor: pointer;
  flex-shrink: 0;
}

.roadmap-task-body { flex: 1; }

.roadmap-task-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 4px;
}

.roadmap-task-row.done .roadmap-task-title {
  text-decoration: line-through;
  color: var(--ink-5);
}

.roadmap-task-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.roadmap-progress {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0 20px;
}

.roadmap-progress-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ─── Playbook styles ───────────────────────────── */
.playbook-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
}

.playbook-chapter-nav {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.playbook-chapter-link {
  font-size: 13px;
  color: var(--ink-4);
  padding: 6px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}

.playbook-chapter-link:hover {
  background: var(--border-2);
  color: var(--ink-2);
  text-decoration: none;
}

.playbook-chapter-link.active {
  background: var(--teal-bg);
  color: var(--teal-dark);
  font-weight: 500;
}

.playbook-body h1 {
  font-size: 40px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.playbook-body h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: -0.02em;
  margin-top: 36px;
  margin-bottom: 12px;
}

.playbook-body p {
  color: var(--ink-3);
  margin-bottom: 14px;
  max-width: 680px;
}

.playbook-chapter {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-2);
}

.playbook-chapter:last-child {
  border-bottom: none;
}

.playbook-related {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--bg);
  border-radius: var(--radius-md);
}

.playbook-related-heading {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-5);
  margin-bottom: 10px;
}

.playbook-related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ─── Alerts ────────────────────────────────────── */
.alert {
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.alert-info {
  background: var(--teal-bg);
  color: var(--teal-dark);
}

/* ─── Utilities ─────────────────────────────────── */
.mono { font-family: var(--font-mono); }
.text-muted { color: var(--ink-5); }
.text-sm { font-size: 12px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ─── Home dashboard ────────────────────────────── */
.home-page {
  max-width: 900px;
  padding: var(--space-10) var(--space-8);
  animation: dgfade 0.2s ease;
}

.home-hero {
  margin-bottom: var(--space-10);
}

.home-hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-2);
}

.home-hero-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-2);
  line-height: 1.2;
}

.home-hero-meta {
  font-size: 13px;
  color: var(--ink-5);
  margin-bottom: var(--space-4);
}

.home-hero-body {
  font-size: 15px;
  color: var(--ink-4);
  max-width: 560px;
  line-height: 1.65;
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.home-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: box-shadow 0.15s;
}

.home-card:hover {
  box-shadow: var(--shadow);
}

.home-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.home-card-icon {
  font-size: 18px;
  line-height: 1;
}

.home-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.home-card-desc {
  font-size: 13px;
  color: var(--ink-5);
  line-height: 1.5;
}

.home-card-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-1);
}

.home-card-link {
  font-size: 13px;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.home-card-link::before {
  content: '\2192';
  font-size: 12px;
  opacity: 0.6;
}

.home-card-link:hover {
  text-decoration: underline;
}

/* ─── Wizard intro screen ───────────────────────── */
.wizard-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-8);
}

.wizard-intro-brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-4);
}

.wizard-intro-heading {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: var(--space-5);
}

.wizard-intro-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.wizard-intro-body p {
  font-size: 14px;
  color: var(--ink-4);
  line-height: 1.65;
}

.wizard-intro-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  padding: var(--space-5);
  background: var(--teal-bg);
  border-radius: var(--radius-md);
  width: 100%;
}

.wizard-intro-list li {
  font-size: 13px;
  color: var(--teal-dark);
  font-weight: 500;
}

.wizard-intro-footer {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.btn-lg {
  padding: 12px 28px;
  font-size: 15px;
}

/* ─── Wizard field help text ────────────────────── */
.form-help {
  margin-top: var(--space-1);
  font-size: 12px;
  color: var(--ink-5);
  line-height: 1.5;
}

/* ─── Wizard intro — privacy + data layer ───────── */
.wizard-intro-privacy {
  font-size: 12px;
  color: var(--ink-5);
  line-height: 1.55;
  padding: var(--space-3) var(--space-4);
  background: var(--border-2);
  border-radius: var(--radius);
  margin-bottom: var(--space-5);
  width: 100%;
}

.wizard-intro-datalayer {
  width: 100%;
  margin-bottom: var(--space-6);
}

.wizard-intro-datalayer-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-5);
  margin-bottom: var(--space-3);
}

.wizard-intro-datalayer-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.wizard-datalayer-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s;
}

.wizard-datalayer-option input[type="radio"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--teal);
}

.wizard-datalayer-option.selected {
  border-color: var(--teal);
  background: var(--teal-bg);
}

.wizard-datalayer-option-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 2px;
}

.wizard-datalayer-option-desc {
  font-size: 12px;
  color: var(--ink-5);
  line-height: 1.5;
}

.wizard-datalayer-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--border);
  color: var(--ink-4);
  padding: 1px 6px;
  border-radius: 99px;
}

.wizard-datalayer-badge.badge-teal {
  background: var(--teal-bg);
  color: var(--teal);
}
