.guide-main {
  width: 100%;
  overflow: visible;
}

.guide-main h1,
.guide-main h2,
.guide-main h3,
.guide-main p { margin-top: 0; }

.guide-main h1 {
  max-width: 720px;
  font-size: clamp(2.45rem, 10.8vw, 4.8rem);
}

.guide-main h2 { font-size: clamp(2rem, 8.2vw, 3.25rem); }

.breadcrumbs {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.breadcrumbs a { color: var(--teal-dark); font-weight: 800; text-underline-offset: 3px; }

.guide-hero,
.learning-paths,
.quickstart,
.course-section,
.participant-guide,
.faq-section,
.guide-feedback {
  width: calc(100% - 28px);
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
}

.guide-hero {
  margin-top: 18px;
  padding: 28px 22px 22px;
  display: grid;
  gap: 26px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 200, 87, 0.2), transparent 32%),
    linear-gradient(145deg, #ffffff 0%, #eef8f6 100%);
}

.guide-hero-copy .eyebrow { margin-bottom: 12px; }

.guide-lead {
  max-width: 670px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

.guide-hero-actions {
  margin-top: 26px;
  display: grid;
  gap: 10px;
}

.guide-secondary-action,
.guide-inline-action {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #9fc9c5;
  border-radius: 15px;
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: none;
}

.guide-secondary-action:hover,
.guide-inline-action:hover { background: var(--teal-soft); }

.guide-hero-status {
  padding: 24px;
  border-radius: 21px;
  background: var(--ink);
  color: #fff;
}

.guide-hero-mark {
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--yellow);
  font-size: 1.35rem;
}

.guide-hero-status > strong { display: block; font-size: 1.24rem; }
.guide-hero-status p { margin: 9px 0 0; color: #cbd9e5; font-size: 0.9rem; line-height: 1.6; }
.guide-hero-status ul { margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.guide-hero-status li { padding: 7px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 0.72rem; font-weight: 800; }

.learning-paths { margin-top: 56px; }
.learning-paths .section-heading h2 { font-size: clamp(2rem, 8vw, 2.8rem); }

.learning-path-grid {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.learning-path-card {
  min-height: 168px;
  padding: 22px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.learning-path-card:hover {
  border-color: #8fc1bc;
  box-shadow: 0 16px 35px rgba(16, 42, 67, 0.08);
  transform: translateY(-2px);
}

.learning-path-card.is-primary { border-color: #7ab6b0; background: linear-gradient(145deg, #eaf7f5, #fff); }
.learning-path-card .path-meta { margin-bottom: auto; color: var(--teal); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.learning-path-card strong { margin-top: 18px; font-size: 1.15rem; }
.learning-path-card > span:last-child { margin-top: 7px; color: var(--muted); font-size: 0.84rem; line-height: 1.55; }

.quickstart {
  margin-top: 64px;
  padding: 26px 20px 20px;
  border-radius: 25px;
  background: var(--ink);
  color: #fff;
}

.quickstart .eyebrow { color: #67d6cd; }
.quickstart h2 { max-width: 720px; font-size: clamp(2rem, 8vw, 3rem); }
.quickstart-heading { display: grid; gap: 22px; }
.quickstart .guide-inline-action { border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.quickstart .guide-inline-action:hover { background: rgba(255, 255, 255, 0.08); }

.quickstart-list {
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.16);
  list-style: none;
}

.quickstart-list li {
  min-width: 0;
  padding: 17px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 13px;
  background: #173650;
}

.quickstart-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(103, 214, 205, 0.13);
  color: #80e3dc;
  font-weight: 800;
}

.quickstart-list strong { font-size: 0.95rem; }
.quickstart-list p { margin: 5px 0 0; color: #c6d7e4; font-size: 0.8rem; line-height: 1.55; }

.quickstart-done {
  margin-top: 16px;
  padding: 17px;
  display: grid;
  gap: 4px;
  border-radius: 16px;
  background: var(--yellow);
  color: var(--ink);
}

.quickstart-done span { font-size: 0.82rem; line-height: 1.55; }

.course-section { margin-top: 72px; scroll-margin-top: 18px; }
.course-heading { display: grid; gap: 26px; }
.course-heading > div:first-child > p:last-child { max-width: 720px; margin: 18px 0 0; color: var(--muted); line-height: 1.65; }

.course-progress {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
}

.course-progress > div {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.course-progress strong { font-size: 0.84rem; }
.course-progress button { min-height: 36px; padding: 0 10px; border: 0; background: transparent; color: var(--teal-dark); font: inherit; font-size: 0.72rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.progress-track { height: 9px; display: block; overflow: hidden; border-radius: 999px; background: #e5edf3; }
.progress-track span { width: 0; height: 100%; display: block; border-radius: inherit; background: var(--teal); transition: width 220ms ease; }

.course-tools {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: #fff;
}

.guide-search { display: grid; gap: 7px; color: var(--ink); font-size: 0.74rem; font-weight: 800; }
.guide-search input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid #b9cad7;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
}

.guide-search input:focus { border-color: var(--teal); outline: 3px solid rgba(8, 127, 120, 0.12); }

.guide-filters {
  margin: 13px -4px 0;
  padding: 0 4px 3px;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.guide-filters button {
  min-height: 42px;
  padding: 0 13px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
}

.guide-filters button.is-active { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); }
.search-status { margin: 10px 2px 0; color: var(--muted); font-size: 0.72rem; }

.guide-layout { margin-top: 20px; }
.guide-toc { display: none; }
.chapter-list { display: grid; gap: 12px; }
.guide-chapter { scroll-margin-top: 20px; border: 1px solid var(--border); border-radius: 19px; background: #fff; box-shadow: 0 10px 28px rgba(16, 42, 67, 0.04); }
.guide-chapter[hidden] { display: none; }
.guide-chapter.is-complete { border-color: #87bdb7; background: #fbfffe; }

.guide-chapter summary {
  min-height: 92px;
  padding: 16px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.guide-chapter summary::-webkit-details-marker { display: none; }
.guide-chapter summary::after { grid-column: 1 / -1; justify-self: end; color: var(--teal-dark); content: "Öppna ↓"; font-size: 0.7rem; font-weight: 800; }
.guide-chapter[open] summary::after { content: "Stäng ↑"; }

.chapter-number {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 800;
}

.guide-chapter.is-complete .chapter-number { background: var(--teal); color: #fff; }
.guide-chapter summary > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.guide-chapter summary small { color: var(--teal); font-size: 0.64rem; font-style: normal; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.guide-chapter summary strong { font-size: 0.98rem; }
.guide-chapter summary em { overflow: hidden; color: var(--muted); font-size: 0.72rem; font-style: normal; line-height: 1.45; text-overflow: ellipsis; }
.chapter-state { display: none; }

.chapter-body { padding: 0 16px 18px; border-top: 1px solid #e4ecf2; }
.chapter-body > ol { margin: 20px 0 0; padding-left: 24px; color: #334e68; }
.chapter-body > ol li { padding-left: 5px; line-height: 1.7; }
.chapter-body > ol li + li { margin-top: 8px; }
.chapter-body code { overflow-wrap: anywhere; }

.chapter-goal,
.guide-tip,
.guide-warning,
.app-path {
  margin-top: 16px;
  padding: 15px;
  border-radius: 15px;
}

.chapter-goal { background: var(--teal-soft); }
.guide-tip { border: 1px solid #f0cc7d; background: #fff8e7; }
.guide-warning { border: 1px solid #e4c8c0; background: #fff5f2; }
.chapter-goal b, .guide-tip b, .guide-warning b, .app-path > span { display: block; margin-bottom: 4px; color: var(--ink); font-size: 0.73rem; letter-spacing: 0.07em; text-transform: uppercase; }
.chapter-goal p, .guide-tip p, .guide-warning p { margin: 0; color: #486581; font-size: 0.84rem; line-height: 1.6; }
.app-path { border: 1px dashed #94bfb9; background: #f9fcfc; }
.app-path code { color: var(--teal-dark); font-size: 0.78rem; font-weight: 700; line-height: 1.5; }

.superadmin-note {
  margin-top: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
  border-radius: 17px;
  background: var(--ink);
  color: #fff;
}

.superadmin-note > span { width: max-content; padding: 6px 9px; border-radius: 999px; background: rgba(255, 200, 87, 0.16); color: var(--yellow); font-size: 0.64rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.superadmin-note b { font-size: 0.94rem; }
.superadmin-note p { margin: 4px 0 0; color: #cbd9e5; font-size: 0.78rem; line-height: 1.55; }
.superadmin-note a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, 0.32); border-radius: 12px; color: #fff; font-size: 0.78rem; font-weight: 800; text-decoration: none; }

.chapter-actions {
  margin-top: 20px;
  display: grid;
  gap: 9px;
}

.chapter-actions a,
.chapter-actions button {
  min-height: 48px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #8dbeb9;
  border-radius: 13px;
  background: #fff;
  color: var(--teal-dark);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.chapter-actions button { border-color: var(--teal); background: var(--teal); color: #fff; }
.guide-chapter.is-complete .chapter-actions button { border-color: #aac9c6; background: var(--teal-soft); color: var(--teal-dark); }

.chapter-pager {
  margin-top: 18px;
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e4ecf2;
}

.chapter-pager a { color: var(--teal-dark); font-size: 0.7rem; font-weight: 800; text-underline-offset: 3px; }

.participant-guide {
  margin-top: 70px;
  padding: 26px 20px;
  border-radius: 25px;
  background: linear-gradient(145deg, #087f78, #06645f);
  color: #fff;
}

.participant-guide .eyebrow { color: #c6f3ee; }
.participant-copy > p:last-child { margin: 17px 0 0; color: #e0f4f2; line-height: 1.65; }
.participant-guide ol { margin: 26px 0 0; padding: 0; display: grid; gap: 10px; list-style: none; }
.participant-guide li { padding: 16px; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 16px; background: rgba(255, 255, 255, 0.08); }
.participant-guide li > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: #fff; color: var(--teal-dark); font-weight: 800; }
.participant-guide li b { font-size: 0.9rem; }
.participant-guide li p { margin: 5px 0 0; color: #d9efed; font-size: 0.78rem; line-height: 1.55; }

.faq-section { margin-top: 70px; }
.faq-section header { max-width: 650px; }
.faq-list { margin-top: 24px; display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.faq-list summary { min-height: 60px; padding: 16px 46px 16px 16px; position: relative; display: flex; align-items: center; cursor: pointer; font-size: 0.87rem; font-weight: 800; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { position: absolute; right: 16px; color: var(--teal); content: "+"; font-size: 1.2rem; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { margin: 0; padding: 0 16px 18px; color: var(--muted); font-size: 0.84rem; line-height: 1.65; }

.guide-feedback {
  margin-top: 58px;
  padding: 24px 20px;
  display: grid;
  gap: 22px;
  border: 1px solid #e4bf65;
  border-radius: 22px;
  background: #fff9e9;
}

.guide-feedback h2 { font-size: clamp(1.6rem, 7vw, 2.25rem); }
.guide-feedback p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.55; }
.guide-feedback > div:last-child { display: grid; gap: 9px; }
.guide-feedback button { min-height: 48px; padding: 0 16px; border: 1px solid #b7923e; border-radius: 13px; background: #fff; color: var(--ink); font: inherit; font-weight: 800; }
.guide-feedback button:first-child { border-color: var(--teal); background: var(--teal); color: #fff; }
.guide-feedback.is-answered button { opacity: 0.5; pointer-events: none; }

.guide-main a:focus-visible,
.guide-main button:focus-visible,
.guide-main summary:focus-visible,
.guide-main input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

@media (min-width: 700px) {
  .guide-hero,
  .learning-paths,
  .quickstart,
  .course-section,
  .participant-guide,
  .faq-section,
  .guide-feedback { width: min(100% - 40px, 1180px); }

  .guide-hero { padding: 42px; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr); align-items: end; gap: 44px; }
  .guide-hero-actions { grid-template-columns: max-content max-content; }
  .guide-hero-actions .primary-action { min-width: 230px; }
  .guide-secondary-action { padding: 0 22px; }
  .learning-path-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quickstart { padding: 38px; }
  .quickstart-heading { grid-template-columns: minmax(0, 1fr) max-content; align-items: end; }
  .quickstart .guide-inline-action { padding: 0 18px; }
  .quickstart-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .quickstart-list li { min-height: 205px; display: flex; align-items: flex-start; flex-direction: column; }
  .quickstart-done { grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 14px; }
  .course-heading { grid-template-columns: minmax(0, 1fr) 310px; align-items: end; }
  .course-tools { padding: 18px; display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: end; gap: 16px; }
  .guide-filters { margin: 0; }
  .search-status { grid-column: 1 / -1; margin: 0; }
  .guide-chapter summary { min-height: 96px; padding: 18px 20px; grid-template-columns: 44px minmax(0, 1fr) max-content max-content; gap: 16px; }
  .guide-chapter summary::after { grid-column: auto; content: "↓"; }
  .guide-chapter[open] summary::after { content: "↑"; }
  .chapter-state { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 999px; background: #eef3f7; color: var(--muted); font-size: 0.65rem; font-style: normal; font-weight: 800; }
  .guide-chapter.is-complete .chapter-state { background: var(--teal-soft); color: var(--teal-dark); }
  .guide-chapter summary strong { font-size: 1.05rem; }
  .chapter-body { padding: 0 24px 24px 80px; }
  .chapter-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .superadmin-note { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
  .superadmin-note a { padding: 0 14px; }
  .participant-guide { padding: 42px; display: grid; grid-template-columns: 0.75fr 1.25fr; align-items: center; gap: 50px; }
  .participant-guide ol { margin: 0; }
  .faq-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .guide-feedback { padding: 32px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .guide-feedback > div:last-child { grid-template-columns: repeat(2, max-content); }
}

@media (min-width: 960px) {
  .guide-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); align-items: start; gap: 24px; }
  .guide-toc { padding: 18px; position: sticky; top: 18px; display: block; border: 1px solid var(--border); border-radius: 18px; background: #fff; }
  .guide-toc > strong { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
  .guide-toc ol { margin: 14px 0 0; padding: 0; display: grid; gap: 3px; list-style: none; }
  .guide-toc a { min-height: 34px; padding: 7px 8px; display: flex; align-items: center; border-radius: 8px; color: var(--muted); font-size: 0.72rem; font-weight: 700; line-height: 1.35; text-decoration: none; }
  .guide-toc a:hover { background: var(--teal-soft); color: var(--teal-dark); }
  .print-guide { width: 100%; min-height: 42px; margin-top: 15px; padding: 0 10px; border: 1px solid #a7c8c4; border-radius: 11px; background: #fff; color: var(--teal-dark); font: inherit; font-size: 0.72rem; font-weight: 800; }
}

@media (max-width: 600px) {
  body { background: #f7fafc; }
  .guide-main h1 { letter-spacing: -0.055em; line-height: 1.02; }
  .guide-main h2 { letter-spacing: -0.04em; }
  .guide-hero { margin-top: 6px; }
  .guide-hero-copy h1 { max-width: 330px; }
  .breadcrumbs { margin-bottom: 22px; }
  .course-tools { position: relative; }
  .guide-chapter summary em { display: none; }
  .guide-chapter summary::after { margin-top: -4px; }
  .chapter-body > ol { font-size: 0.86rem; }
  .participant-guide { scroll-margin-top: 12px; }
  .guide-feedback button { width: 100%; }
  footer nav { overflow-x: auto; }
}

@media print {
  body { background: #fff; color: #000; }
  .site-header .header-action,
  .guide-hero-actions,
  .learning-paths,
  .course-tools,
  .guide-toc,
  .chapter-actions,
  .chapter-pager,
  .participant-guide,
  .faq-section,
  .guide-feedback,
  footer { display: none !important; }
  .guide-hero,
  .quickstart,
  .course-section { width: 100%; max-width: none; margin: 0; border: 0; box-shadow: none; }
  .guide-hero { padding: 0 0 24px; display: block; background: #fff; }
  .guide-hero-status { display: none; }
  .quickstart { padding: 20px; background: #eef3f7; color: #000; break-after: page; }
  .quickstart-list { display: block; border-color: #aaa; background: #fff; }
  .quickstart-list li { min-height: 0; background: #fff; color: #000; break-inside: avoid; }
  .quickstart-list p { color: #333; }
  .quickstart-done { background: #fff3cc; }
  .course-heading { display: block; }
  .course-progress { display: none; }
  .guide-layout { display: block; }
  .guide-chapter { margin-top: 14px; break-inside: avoid; box-shadow: none; }
  .guide-chapter[hidden] { display: block; }
  .guide-chapter summary { display: grid; }
  .guide-chapter summary::after,
  .chapter-state { display: none; }
  .guide-chapter:not([open]) .chapter-body { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .learning-path-card,
  .progress-track span { transition: none; }
}
