.guide-page {
  display: grid;
  gap: 20px;
  width: min(1120px, 100%);
  margin-inline: auto;
  color: var(--navy, #062b6f);
}

.guide-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.guide-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 42px);
  overflow: hidden;
  border: 1px solid rgba(214, 226, 234, .92);
  border-radius: 26px;
  background:
    radial-gradient(circle at 92% 12%, rgba(94, 223, 224, .22), transparent 28%),
    linear-gradient(135deg, #fff 35%, #f5f8fb);
  box-shadow: 0 18px 50px rgba(6, 43, 111, .08);
}

.guide-hero h1 {
  margin: 8px 0 10px;
  max-width: 760px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.045em;
}

.guide-hero p:not(.eyebrow) {
  max-width: 720px;
  color: var(--slate, #48617e);
  font-size: 15px;
  line-height: 1.7;
}

.guide-hero-stat,
.guide-management-stats {
  display: grid;
  flex: 0 0 auto;
  min-width: 150px;
  padding: 16px 20px;
  border: 1px solid rgba(18, 139, 140, .18);
  border-radius: 18px;
  background: rgba(229, 248, 248, .72);
}

.guide-hero-stat strong,
.guide-management-stats strong {
  font-size: 1.65rem;
  line-height: 1;
}

.guide-hero-stat span,
.guide-management-stats span {
  margin-top: 5px;
  color: var(--slate, #48617e);
  font-size: 12px;
  font-weight: 700;
}

.guide-toolbar,
.guide-action-row,
.guide-reading-actions,
.guide-editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.guide-toolbar {
  justify-content: space-between;
  padding: 14px;
  border: 1px solid rgba(214, 226, 234, .9);
  border-radius: 20px;
  background: #fff;
}

.guide-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(520px, 100%);
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid #d6e2ea;
  border-radius: 14px;
  color: var(--slate, #48617e);
}

.guide-search input {
  width: 100%;
  border: 0;
  padding: 0;
  box-shadow: none;
  background: transparent;
}

.guide-category-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 5px;
  scrollbar-width: thin;
}

.guide-category-nav a {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid #d6e2ea;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.guide-sections,
.guide-section {
  display: grid;
  gap: 16px;
}

.guide-sections { gap: 20px; }

.guide-section {
  scroll-margin-top: 100px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(214, 226, 234, .92);
  border-radius: 22px;
  background: #fff;
}

.guide-section-head,
.guide-progress-head,
.guide-reading-meta,
.guide-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.guide-section-head h2 {
  margin-top: 4px;
  font-size: 1.35rem;
  font-weight: 800;
}

.guide-section-head > span,
.guide-reading-meta,
.guide-card-top {
  color: var(--slate, #48617e);
  font-size: 12px;
  font-weight: 700;
}

.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.guide-card {
  display: grid;
  gap: 9px;
  min-height: 180px;
  padding: 18px;
  border: 1px solid #d6e2ea;
  border-radius: 18px;
  background: linear-gradient(160deg, #fff, #fbfcfd);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.guide-card:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 139, 140, .46);
  box-shadow: 0 14px 34px rgba(6, 43, 111, .08);
}

.guide-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
}

.guide-card p {
  color: var(--slate, #48617e);
  font-size: 13px;
  line-height: 1.6;
}

.guide-card > strong {
  align-self: end;
  color: var(--teal, #087a82);
  font-size: 13px;
}

.guide-section-single {
  gap: 12px;
  padding-block: 20px;
}

.guide-section-single .guide-card-grid {
  grid-template-columns: 1fr;
}

.guide-section-single .guide-card {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "meta action"
    "title action"
    "summary action";
  column-gap: 24px;
  min-height: 0;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid #d6e2ea;
  border-radius: 0;
  background: transparent;
}

.guide-section-single .guide-card:hover {
  transform: none;
  border-color: rgba(18, 139, 140, .38);
  box-shadow: none;
}

.guide-section-single .guide-card-top { grid-area: meta; }
.guide-section-single .guide-card h3 { grid-area: title; }
.guide-section-single .guide-card p {
  grid-area: summary;
  max-width: 760px;
}
.guide-section-single .guide-card > strong {
  grid-area: action;
  align-self: center;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(94, 223, 224, .12);
  white-space: nowrap;
}

.guide-read-badge,
.guide-check {
  color: var(--teal, #087a82);
}

.guide-stage-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.guide-stage-tab {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid #d6e2ea;
  border-radius: 18px;
  background: #fff;
}

.guide-stage-tab.is-active {
  border-color: rgba(18, 139, 140, .46);
  box-shadow: inset 0 0 0 1px rgba(18, 139, 140, .12);
  background: rgba(235, 249, 249, .7);
}

.guide-stage-tab.is-locked:not(.is-active) { opacity: .62; }

.guide-stage-number,
.guide-lock-icon,
.guide-complete-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #062b6f;
  color: #fff;
  font-weight: 800;
}

.guide-stage-tab strong,
.guide-stage-tab small { display: block; }
.guide-stage-tab strong { font-size: 14px; }
.guide-stage-tab small { margin-top: 3px; color: var(--slate, #48617e); font-size: 11px; }

.guide-onboarding-layout {
  display: grid;
  grid-template-columns: minmax(240px, .7fr) minmax(0, 1.5fr);
  gap: 18px;
  align-items: start;
}

.guide-step-panel,
.guide-reading-card,
.guide-detail-card,
.guide-empty-state,
.guide-management-list,
.guide-editor {
  border: 1px solid rgba(214, 226, 234, .92);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(6, 43, 111, .06);
}

.guide-step-panel {
  position: sticky;
  top: 88px;
  padding: 18px;
}

.guide-progress-head strong { font-size: 14px; }
.guide-progress-head > span { color: var(--teal, #087a82); font-size: 13px; font-weight: 800; }

.guide-progress-track {
  height: 7px;
  margin: 14px 0 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f6;
}

.guide-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #087a82, #5edfe0);
}

.guide-step-list { display: grid; gap: 6px; }
.guide-step-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 13px;
}

.guide-step-list li.is-current a { background: #f2f7fa; }
.guide-step-list a > span:first-child {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #d6e2ea;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}
.guide-step-list li.is-complete a > span:first-child { border-color: transparent; background: #e6f7f4; color: #087a82; }
.guide-step-list strong,
.guide-step-list small { display: block; }
.guide-step-list strong { font-size: 12px; line-height: 1.35; }
.guide-step-list small { margin-top: 2px; color: var(--slate, #48617e); font-size: 10px; }

.guide-reading-card,
.guide-detail-card { padding: clamp(22px, 4vw, 42px); }
.guide-reading-card h2,
.guide-detail-card h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.7rem, 4vw, 2.65rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.guide-lead {
  color: var(--slate, #48617e);
  font-size: 15px;
  line-height: 1.65;
}

.guide-prose {
  margin-top: 26px;
  color: #263f60;
  font-size: 15px;
  line-height: 1.82;
}
.guide-prose p + p { margin-top: 16px; }

.guide-key-points {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(18, 139, 140, .18);
  border-radius: 17px;
  background: rgba(235, 249, 249, .66);
}
.guide-key-points > strong { font-size: 14px; }
.guide-key-points ul { display: grid; gap: 9px; margin-top: 12px; }
.guide-key-points li {
  position: relative;
  padding-left: 21px;
  color: #294667;
  font-size: 13px;
  line-height: 1.5;
}
.guide-key-points li::before { position: absolute; left: 0; top: .15em; color: #087a82; content: "✓"; font-weight: 900; }

.guide-context-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: #087a82;
  font-size: 13px;
  font-weight: 800;
}
.guide-reading-actions { margin-top: 28px; }

.guide-empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: clamp(42px, 8vw, 80px) 24px;
  text-align: center;
}
.guide-empty-state h2 { max-width: 660px; font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; line-height: 1.15; }
.guide-empty-state > p:not(.eyebrow) { max-width: 640px; color: var(--slate, #48617e); line-height: 1.7; }
.guide-complete-icon { background: #e6f7f4; color: #087a82; }

.guide-detail-page { width: min(840px, 100%); }
.guide-back-link { width: fit-content; color: var(--slate, #48617e); font-size: 13px; font-weight: 700; }
.guide-detail-prose { font-size: 16px; }
.guide-next-prev { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.guide-next-prev a { display: grid; gap: 3px; padding: 16px; border: 1px solid #d6e2ea; border-radius: 16px; background: #fff; }
.guide-next-prev a:last-child { text-align: right; }
.guide-next-prev small { color: var(--slate, #48617e); }
.guide-next-prev strong { font-size: 13px; }

.guide-no-results { padding: 30px; text-align: center; color: var(--slate, #48617e); }

.guide-management-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 18px; align-items: start; }
.guide-management-list,
.guide-editor { padding: 20px; }
.guide-editor { position: sticky; top: 88px; }
.guide-management-stats { gap: 8px; }
.guide-admin-rows { display: grid; gap: 8px; margin-top: 16px; }
.guide-admin-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid #d6e2ea; border-radius: 15px; }
.guide-admin-row.is-passive { opacity: .58; }
.guide-admin-order { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #f2f7fa; font-size: 12px; font-weight: 800; }
.guide-admin-row h3 { margin-top: 5px; font-size: 14px; font-weight: 800; }
.guide-admin-row p { margin-top: 3px; color: var(--slate, #48617e); font-size: 11px; line-height: 1.4; }
.guide-admin-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.guide-admin-badges span { padding: 4px 7px; border-radius: 999px; background: #f2f7fa; color: var(--slate, #48617e); font-size: 9px; font-weight: 800; }
.guide-admin-actions { display: grid; justify-items: end; gap: 7px; }
.guide-admin-actions small { color: var(--slate, #48617e); }

.guide-editor-form { margin-top: 16px; }
.guide-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.guide-editor-grid label { display: grid; gap: 6px; }
.guide-editor-grid label > span { font-size: 11px; font-weight: 800; }
.guide-field-wide { grid-column: 1 / -1; }
.guide-editor-grid input,
.guide-editor-grid select,
.guide-editor-grid textarea {
  width: 100%;
  border: 1px solid #d6e2ea;
  border-radius: 12px;
  padding: 10px 12px;
  color: #062b6f;
  font-size: 13px;
  box-shadow: none;
}
.guide-editor-checks { display: grid; gap: 9px; margin-top: 14px; }
.guide-editor-checks label { display: flex; align-items: flex-start; gap: 8px; color: #294667; font-size: 12px; line-height: 1.4; }
.guide-editor-actions { margin-top: 18px; }
.guide-editor-note { margin-top: 14px; padding: 12px; border-radius: 12px; background: #f2f7fa; color: var(--slate, #48617e); font-size: 11px; line-height: 1.5; }

.client-guide-dashboard-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(18, 139, 140, .25);
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(235, 249, 249, .94), #fff);
}
.client-guide-dashboard-card h2 { margin-top: 4px; font-size: 1.15rem; font-weight: 800; }
.client-guide-dashboard-card p:not(.eyebrow) { margin-top: 5px; color: var(--slate, #48617e); font-size: 13px; line-height: 1.5; }
.client-guide-dashboard-progress { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.client-guide-dashboard-progress div { width: min(260px, 45vw); height: 6px; overflow: hidden; border-radius: 999px; background: #dce9ed; }
.client-guide-dashboard-progress div span { display: block; height: 100%; border-radius: inherit; background: #087a82; }
.client-guide-dashboard-progress small { color: #087a82; font-weight: 800; }

.context-guide-link { display: inline-flex; align-items: center; gap: 6px; color: #087a82; font-size: 12px; font-weight: 800; }

@media (max-width: 900px) {
  .guide-management-layout { grid-template-columns: 1fr; }
  .guide-editor { position: static; }
}

@media (max-width: 720px) {
  .guide-page { gap: 14px; }
  .guide-hero { flex-direction: column; align-items: flex-start; padding: 22px 18px; }
  .guide-hero-stat,
  .guide-management-stats { display: none; }
  .guide-stage-tabs,
  .guide-onboarding-layout,
  .guide-card-grid { grid-template-columns: 1fr; }
  .guide-step-panel { position: static; }
  .guide-step-list { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
  .guide-step-list li { flex: 0 0 170px; }
  .guide-section,
  .guide-management-list,
  .guide-editor { padding: 16px; border-radius: 18px; }
  .guide-card { min-height: 150px; }
  .guide-section-single .guide-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "meta"
      "title"
      "summary"
      "action";
    min-height: 0;
    row-gap: 7px;
  }
  .guide-section-single .guide-card > strong {
    width: fit-content;
    margin-top: 3px;
  }
  .guide-editor-grid { grid-template-columns: 1fr; }
  .guide-field-wide { grid-column: auto; }
  .guide-next-prev { grid-template-columns: 1fr; }
  .guide-next-prev > span:empty { display: none; }
  .guide-next-prev a:last-child { text-align: left; }
  .guide-admin-row { grid-template-columns: auto minmax(0, 1fr); }
  .guide-admin-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
  .client-guide-dashboard-card { grid-template-columns: 1fr; }
  .client-guide-dashboard-card .btn-primary { width: 100%; }
}
