/* =============================================================================
   Smart SWOT — long-form learning guides (SWOT / TOWS).
   Extends app chrome variables; teal brand only.
   ============================================================================= */

.guide-shell {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.25rem 1.35rem 3.75rem;
}

.guide-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.guide-top-nav a.back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.95rem;
}

.guide-top-nav a.back:hover {
  text-decoration: underline;
}

.guide-hero {
  text-align: left;
  padding: 1.75rem 1.5rem 1.9rem;
  margin-bottom: 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  background:
    radial-gradient(800px 280px at 0% 0%, rgba(15, 118, 110, 0.16), transparent 55%),
    linear-gradient(145deg, #ffffff 0%, #f0fdfa 70%, #ecfeff 100%);
  box-shadow: var(--shadow-soft);
  animation: fade-up 0.45s var(--ease) both;
  position: relative;
  overflow: hidden;
}

.guide-hero::after {
  content: "";
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--accent-deep), #14b8a6, transparent);
}

.guide-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 0.85rem;
}

.guide-hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0;
}

/* Course switch — same spirit as board / print mode-toggle */
.guide-hero .mode-toggle {
  display: inline-flex;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.04);
}

.guide-hero .mode-toggle a {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--muted);
  border-right: 1px solid rgba(15, 118, 110, 0.16);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.guide-hero .mode-toggle a:last-child {
  border-right: none;
}

.guide-hero .mode-toggle a:hover:not(.is-active) {
  background: #f0fdfa;
  color: var(--accent-deep);
}

.guide-hero .mode-toggle a.is-active {
  background: var(--accent);
  color: #fff;
}

.guide-hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.65rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--ink);
}

.guide-hero-lede {
  margin: 0;
  max-width: 40rem;
  font-size: 1.06rem;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.6;
}

.guide-toc {
  position: sticky;
  top: 4.25rem;
  z-index: 12;
  margin: 0 0 1.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}

.guide-toc summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  list-style: none;
}

.guide-toc summary::-webkit-details-marker {
  display: none;
}

.guide-toc[open] summary {
  margin-bottom: 0.65rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.guide-toc ol {
  margin: 0;
  padding-left: 1.15rem;
  columns: 1;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .guide-toc ol {
    columns: 2;
  }
}

.guide-toc li {
  break-inside: avoid;
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  line-height: 1.4;
}

.guide-toc a {
  text-decoration: none;
  color: var(--accent-deep);
  font-weight: 550;
}

.guide-toc a:hover {
  text-decoration: underline;
  color: var(--accent);
}

.guide-section {
  margin-top: 2.5rem;
  scroll-margin-top: 6.5rem;
}

.guide-section h2 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  color: var(--ink);
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(15, 118, 110, 0.12);
}

.guide-section h3 {
  margin: 1.65rem 0 0.6rem;
  font-size: 1.08rem;
  font-weight: 650;
  color: #334155;
  letter-spacing: -0.015em;
}

.guide-section p {
  margin: 0 0 1rem;
  line-height: 1.65;
}

.guide-section ul,
.guide-section ol {
  margin: 0 0 1.1rem;
  padding-left: 1.25rem;
  line-height: 1.6;
}

.guide-section li {
  margin-bottom: 0.45rem;
}

.guide-section li > ul,
.guide-section li > ol {
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
}

.guide-callout {
  border-radius: 14px;
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
  border: 1px solid rgba(15, 118, 110, 0.16);
  background: linear-gradient(180deg, #fff 0%, #f7fffe 100%);
}

.guide-callout strong {
  color: var(--ink);
}

.guide-callout p:last-child {
  margin-bottom: 0;
}

.guide-steps {
  counter-reset: guide-step;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.guide-steps > li {
  position: relative;
  counter-increment: guide-step;
  margin: 0 0 1rem;
  padding: 0.95rem 1rem 0.95rem 3.1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
}

.guide-steps > li::before {
  content: counter(guide-step);
  position: absolute;
  left: 0.85rem;
  top: 0.95rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #ecfdf8;
  background: linear-gradient(145deg, #0f766e, #134e4a);
}

.guide-steps > li > strong:first-child {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-size: 1.02rem;
}

.guide-matrix {
  display: grid;
  gap: 0.75rem;
  margin: 1.15rem 0 1.35rem;
}

@media (min-width: 640px) {
  .guide-matrix {
    grid-template-columns: 1fr 1fr;
  }
}

.guide-matrix-cell {
  padding: 1rem 1.05rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.guide-matrix-cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-deep), #14b8a6);
}

.guide-matrix-cell h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 750;
  color: var(--accent-deep);
  letter-spacing: -0.02em;
}

.guide-matrix-cell p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.55;
}

.guide-compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.guide-compare th,
.guide-compare td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #e8edf5;
  vertical-align: top;
  line-height: 1.45;
}

.guide-compare thead th {
  background: #f0fdfa;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

.guide-compare tbody tr:last-child th,
.guide-compare tbody tr:last-child td {
  border-bottom: none;
}

.guide-compare tbody th[scope="row"] {
  font-weight: 650;
  color: var(--ink);
  width: 32%;
  background: #fafbfc;
}

.guide-cta {
  margin-top: 2.75rem;
  padding: 1.45rem 1.35rem;
  border-radius: 16px;
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(15, 118, 110, 0.14), transparent 60%),
    linear-gradient(135deg, #f0fdfa 0%, #ffffff 55%, #ecfeff 100%);
  border: 1px solid rgba(15, 118, 110, 0.2);
  text-align: center;
}

.guide-cta p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.guide-cta .action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.guide-foot {
  margin-top: 2.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.guide-foot a {
  font-weight: 600;
}

@media (max-width: 720px) {
  .guide-toc {
    position: static;
  }
}
