/* ── Kontira guider — delt stilark ──
   Design-tokens og nav/footer er kopiert fra docs/index.html for visuell
   konsistens. Denne filen er komponentbiblioteket for guide-sider:
   breadcrumb, toc, guide-header/body, comparison-table, cta-soft/hard,
   faq, author-box, related, guide-hub (liste på /guider/). */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── THEME (identisk med docs/index.html) ── */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-card: #ffffff;
  --bg-elevated: #f1f5f9;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --green: #059669;
  --green-light: #d1fae5;
  --green-dark: #065f46;
  --nav-bg: rgba(255,255,255,0.92);
  --invert-bg: #0f172a;
  --invert-text: #f8fafc;
  --invert-muted: #94a3b8;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.08);
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --bg-card: #1e293b;
  --bg-elevated: #334155;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --green: #34d399;
  --green-light: rgba(52,211,153,0.15);
  --green-dark: #059669;
  --nav-bg: rgba(15,23,42,0.92);
  --invert-bg: #f1f5f9;
  --invert-text: #0f172a;
  --invert-muted: #64748b;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.3);
  --amber: #fbbf24;
  --amber-bg: rgba(251,191,36,0.08);
  --amber-border: rgba(251,191,36,0.3);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

/* ── NAV (samme klasser som forsiden) ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

nav .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

nav .logo {
  display: flex;
  align-items: center;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--text);
}

nav .logo img {
  vertical-align: middle;
  margin-right: 0.4rem;
  border-radius: 6px;
}

nav .nav-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

nav .nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

nav .nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

nav .nav-links a:hover,
nav .nav-links a.active { color: var(--text); }

nav .nav-links a.cta {
  background: var(--green);
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.15s;
}

nav .nav-links a.cta:hover { background: var(--green-dark); }

.nav-controls { display: flex; align-items: center; gap: 0.4rem; }

.theme-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.15s, border-color 0.15s;
}

.theme-toggle:hover { border-color: var(--green); }

@media (max-width: 768px) {
  nav .nav-links a:not(.cta) { display: none; }
}

/* ── BREADCRUMB ── */
.breadcrumb-bar {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.2rem 2rem 0;
}

.breadcrumb-bar ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.breadcrumb-bar a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb-bar a:hover { color: var(--green); }

.breadcrumb-bar li:not(:last-child)::after {
  content: "\203A";
  margin-left: 0.35rem;
  color: var(--text-muted);
}

.breadcrumb-bar li[aria-current] { color: var(--text-secondary); }

/* ── GUIDE HEADER ── */
.guide-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 2rem 0;
}

.guide-header h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 1.1rem;
}

.guide-header .ingress {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.series-note {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ── TOC ── */
.toc {
  max-width: 720px;
  margin: 2rem auto;
  padding: 1.2rem 1.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.toc-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.toc ol { list-style: none; padding-left: 0; }
.toc li { margin-bottom: 0.4rem; }
.toc li:last-child { margin-bottom: 0; }

.toc a {
  color: var(--green);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.toc a:hover { text-decoration: underline; }

/* ── GUIDE BODY ── */
.guide-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
}

.guide-body h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 2.5rem 0 1rem;
  scroll-margin-top: 84px;
}

.guide-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.8rem 0 0.75rem;
  scroll-margin-top: 84px;
}

.guide-body p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.guide-body ul, .guide-body ol {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 0 1rem 1.3rem;
}

.guide-body .table-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: -0.5rem 0 1.5rem;
}

/* ── COMPARISON TABLE (stables til kort på mobil) ── */
.table-wrap { margin: 1.5rem 0 0.5rem; }

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border);
}

.comparison-table thead th {
  background: var(--bg-elevated);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
}

.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:hover { background: var(--bg-alt); }

@media (max-width: 640px) {
  .comparison-table thead { display: none; }
  .comparison-table, .comparison-table tbody, .comparison-table tr, .comparison-table td {
    display: block;
    width: 100%;
  }
  .comparison-table { border-radius: 12px; }
  .comparison-table tr {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
  }
  .comparison-table tr:last-child { border-bottom: none; }
  .comparison-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.3rem 0;
    border-bottom: none;
    font-size: 0.9rem;
  }
  .comparison-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
  }
}

.comparison-table .status-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.status-beta { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }
.status-none { background: var(--bg-elevated); color: var(--text-muted); }
.status-full { background: var(--green-light); color: var(--green-dark); }

/* ── CAPABILITY GRID (feature cards, e.g. MCP tool list) ── */
.capability-grid {
  display: grid;
  gap: 0.85rem;
  margin: 1.5rem 0 2rem;
}

.capability-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1rem 1.2rem;
}

.capability-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}

.capability-card p {
  margin: 0;
  font-size: 0.92rem;
}

.capability-card code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  background: var(--bg-elevated);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  color: var(--text);
}

/* ── CTA SOFT (midtveis, tekstlenke) ── */
.cta-soft {
  margin: 2rem 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--green);
  background: var(--bg-alt);
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.cta-soft a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

.cta-soft a:hover { text-decoration: underline; }

/* ── FAQ ── */
.faq-section {
  max-width: 720px;
  margin: 2.5rem auto 0;
  padding: 0 2rem;
}

.faq-section h2 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--text-muted);
  font-weight: 400;
  flex-shrink: 0;
}

.faq-item[open] summary::after { content: "\2013"; }

.faq-item p {
  padding: 0 1.2rem 1.1rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ── AUTHOR BOX ── */
.author-box {
  max-width: 720px;
  margin: 3rem auto 2rem;
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-alt);
}

.author-box .avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.author-box .name { font-weight: 700; font-size: 0.95rem; }
.author-box .role { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.author-box .bio { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.65; }

/* ── CTA HARD (bunn, knapp) ── */
.cta-hard {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem;
  text-align: center;
  background: var(--invert-bg);
  color: var(--invert-text);
  border-radius: 20px;
}

.cta-hard h2 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}

.cta-hard p {
  color: var(--invert-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.cta-hard .btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  padding: 0.8rem 2.2rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s;
}

.cta-hard .btn:hover { background: var(--green-dark); }

.guide-cta-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem 0;
}

/* ── RELATED ── */
.related {
  max-width: 720px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

.related h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.related-grid { display: grid; gap: 0.85rem; }

.related-card {
  display: block;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  background: var(--bg-card);
  transition: border-color 0.15s;
}

.related-card:hover { border-color: var(--green); }

.related-card span {
  display: block;
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* ── GUIDE HUB (/guider/) ── */
.guide-hub-intro {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 2rem 0;
}

.guide-hub-intro h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 1.1rem;
}

.guide-hub-intro p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.guide-list {
  max-width: 720px;
  margin: 2.5rem auto 0;
  padding: 0 2rem 4rem;
  display: grid;
  gap: 1rem;
}

.guide-list-item {
  display: block;
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.guide-list-item:hover {
  border-color: var(--green);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.guide-list-item h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.3rem; }
.guide-list-item p { font-size: 0.88rem; color: var(--text-secondary); }

/* ── FOOTER (identisk med forsiden) ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  max-width: 1100px;
  margin: 3rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer span { font-size: 0.85rem; color: var(--text-muted); }

footer a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

footer a:hover { color: var(--text); }

footer .sep { margin: 0 0.25rem; opacity: 0.3; }
