/* =========================================================================
   BioInnsikt.no – /omvisning (guidet gjennomgang med ekte skjermbilder).
   Bygger på tokens og komponenter i landing.css. Mobile-first.
   ========================================================================= */

:root { --tour-nav-h: 50px; }
@media (min-width: 1000px) { :root { --tour-nav-h: 86px; } }

.tour-page { background: var(--c-bg); }

/* Hero */
.tour-hero { padding-bottom: 44px; }
.tour-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--c-text-on-dark-muted); margin-bottom: 18px; }
.tour-breadcrumb a { color: var(--c-text-on-dark-muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.3); }
.tour-breadcrumb a:hover { color: #fff; }
.tour-hero .hero-lead { max-width: 40.2em; }
.tour-hero h1 { max-width: 10.7em; }

/* Hero-visual: dashbordet i nettleser-ramme med telefonen (Min helseflyt) foran */
.tour-hero-visual { position: relative; max-width: 560px; margin: 8px auto 0; width: 100%; padding: 14px 0 0; }
.tour-hero-desktop { position: relative; z-index: 1; width: 92%; border-color: rgba(255,255,255,0.12); box-shadow: 0 30px 70px rgba(0,0,0,0.42), 0 0 0 1px rgba(255,255,255,0.06); }
.tour-hero-desktop img { display: block; width: 100%; height: auto; }
.tour-hero-phone { position: absolute; right: 0; bottom: -8px; z-index: 2; width: 28%; max-width: 160px; margin: 0; filter: drop-shadow(0 26px 40px rgba(0,0,0,0.45)); animation: shot-float 8s ease-in-out infinite; }
.tour-hero-phone .tour-phone-frame { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }
.tour-hero-visual-caption { margin: 14px 0 0; font-size: 0.86rem; font-weight: 500; line-height: 1.6; color: var(--c-text-on-dark-muted); max-width: 66%; }
@media (prefers-reduced-motion: reduce) { .tour-hero-phone { animation: none; } }

/* Kapittelnavigasjon (klistret under headeren)
   < 1000 px: kompakt linje «3/12 · Kapittel · Alle biomarkører · Alle kapitler ▾»
              som åpner listen som et panel under linjen.
   ≥ 1000 px: kapittel-linje med alle trinn synlige i én rad (grid med --n kolonner),
              så alt alltid får plass i containerbredden. */
.tour-nav { position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); z-index: 90; height: var(--tour-nav-h); background: rgba(255,255,255,0.94); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); border-bottom: 1px solid var(--c-border); }
.tour-nav-inner { position: relative; height: 100%; max-width: var(--max-w); margin: 0 auto; }
.tour-nav-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: var(--p, 0%); background: linear-gradient(90deg, var(--c-primary), var(--c-primary-dark)); transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1); }

.tour-nav-toggle { display: flex; align-items: center; gap: 12px; width: 100%; height: 100%; padding: 0 var(--gutter); background: none; border: 0; text-align: left; color: var(--c-text); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tour-nav-toggle:focus-visible { outline: 2px solid var(--c-primary); outline-offset: -4px; border-radius: 8px; }
.tour-nav-count { flex-shrink: 0; display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border-radius: var(--radius-pill); background: var(--c-primary-bg); color: var(--c-primary-dark); font-size: 0.82rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.tour-nav-count-sep { margin: 0 2px; font-weight: 600; opacity: 0.55; }
.tour-nav-current { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.tour-nav-kicker { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-text-tertiary); }
.tour-nav-current-label { font-size: 0.94rem; font-weight: 700; color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tour-nav-more { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 6px 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--c-border); color: var(--c-primary-dark); font-size: 0.8rem; font-weight: 600; white-space: nowrap; transition: background var(--transition), border-color var(--transition); }
.tour-nav-toggle:hover .tour-nav-more { background: var(--c-primary-bg); border-color: rgba(38,166,154,0.35); }
.tour-nav-more svg { width: 18px; height: 18px; transition: transform 0.25s ease; }
.tour-nav.is-open .tour-nav-more svg { transform: rotate(180deg); }
@media (max-width: 419px) {
    .tour-nav-toggle { gap: 10px; }
    .tour-nav-more span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .tour-nav-more { width: 32px; padding: 0; justify-content: center; }
}

.tour-nav-list { list-style: none; margin: 0; padding: 0; }
.tour-nav-list a { display: flex; align-items: center; gap: 10px; color: var(--c-text-secondary); font-weight: 600; text-decoration: none; transition: background var(--transition), color var(--transition), border-color var(--transition); }
.tour-nav-num { flex-shrink: 0; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-text-secondary); font-size: 0.7rem; font-weight: 800; font-variant-numeric: tabular-nums; transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition); }
.tour-nav-list li.is-done .tour-nav-num { background: var(--c-primary-bg); border-color: rgba(38,166,154,0.4); color: var(--c-primary-dark); }
.tour-nav-list a.is-active .tour-nav-num { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: #fff; box-shadow: 0 0 0 4px var(--c-primary-bg); }
.tour-nav-list a:hover { color: var(--c-primary-dark); }
.tour-nav-list a:hover .tour-nav-num { border-color: var(--c-primary); }

/* Panelet (smale skjermer) */
.tour-nav-list { position: absolute; left: 0; right: 0; top: 100%; display: none; grid-template-columns: 1fr; gap: 4px; padding: 10px var(--gutter) 14px; background: #fff; border-bottom: 1px solid var(--c-border); box-shadow: 0 28px 60px rgba(15,26,36,0.18); max-height: calc(100vh - var(--header-h) - var(--tour-nav-h) - 24px); max-height: calc(100dvh - var(--header-h) - var(--tour-nav-h) - 24px); overflow-y: auto; }
.tour-nav.is-open .tour-nav-list { display: grid; animation: tour-nav-drop 0.22s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes tour-nav-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.tour-nav-list a { min-height: 44px; padding: 6px 10px; border-radius: 10px; font-size: 0.92rem; }
.tour-nav-list a.is-active { background: var(--c-primary-bg); color: var(--c-primary-dark); }
.tour-nav-list a:hover { background: var(--c-bg); }
.tour-nav-list a.is-active:hover { background: var(--c-primary-bg); }
.tour-nav-scrim { position: fixed; inset: 0; z-index: 89; background: rgba(15,26,36,0.28); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); animation: tour-fade 0.2s ease; }
.tour-nav-scrim[hidden] { display: none; }
@keyframes tour-fade { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 480px) { .tour-nav-list { grid-template-columns: 1fr 1fr; column-gap: 12px; } }
@media (min-width: 720px) { .tour-nav-list { grid-template-columns: 1fr 1fr 1fr; } }

/* Kapitler */
.tour-chapter { padding: 56px 0; scroll-margin-top: calc(var(--header-h) + var(--tour-nav-h) + env(safe-area-inset-top, 0px) + 8px); }
.tour-chapter--alt { background: var(--c-surface); }
.tour-chapter-head { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: start; max-width: 860px; margin-bottom: 26px; }
.tour-step { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%); color: #fff; font-size: 1.05rem; font-weight: 800; box-shadow: 0 4px 14px rgba(38,166,154,0.3); margin-top: 2px; }
.tour-chapter-head h2 { margin-bottom: 12px; }
.tour-lead { color: var(--c-text-secondary); font-size: clamp(1rem, 0.5vw + 0.9rem, 1.12rem); line-height: 1.7; max-width: 42.7em; }
.tour-price { margin-left: 8px; padding-left: 8px; border-left: 1px solid rgba(0,77,64,0.25); font-weight: 700; letter-spacing: 0; text-transform: none; }

/* Bilde + punkter */
.tour-grid { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; }
.tour-grid > * { min-width: 0; }
.tour-shot { margin: 0; min-width: 0; }
.tour-shot-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--c-surface); border: 1px solid var(--c-border); box-shadow: var(--shadow-xl); }
.tour-shot-inner { position: relative; }
.tour-shot-frame img { display: block; width: 100%; height: auto; }
.tour-scroll-hint { display: none; }
/* Brede app-bilder på smale skjermer: la dem være større enn skjermen og rullbare
   sidelengs, så tekst og punkter forblir lesbare. */
@media (max-width: 639px) {
    .tour-shot--browser .tour-shot-frame { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
    .tour-shot--browser .tour-shot-inner { min-width: 640px; }
    .tour-scroll-hint { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.76rem; font-weight: 600; color: var(--c-text-tertiary); }
    .tour-scroll-hint::before { content: "\2194"; font-size: 0.9rem; }
}
.tour-shot--browser .tour-shot-frame { border-radius: var(--radius-lg); }
.tour-shot-canvas { position: relative; }
/* Bakgrunnen bildet «ligger på»: hvit for kort og paneler, appens sidefarge
   (--tint) der utsnittet selv viser siden rundt kortene. */
.tour-shot { --shot-bg: #fff; --shot-bg-0: rgba(255,255,255,0); --shot-bg-55: rgba(255,255,255,0.55); }
.tour-shot--tint { --shot-bg: #f5f7fa; --shot-bg-0: rgba(245,247,250,0); --shot-bg-55: rgba(245,247,250,0.55); }
/* Sideutsnitt: luft rundt innholdet, så markørene ikke klemmes mot rammen */
.tour-shot--page .tour-shot-frame { background: var(--shot-bg); }
.tour-shot--page .tour-shot-inner { padding: clamp(12px, 2.6vw, 22px); }
/* Utsnitt som slutter midt i innholdet tones mykt ut mot bakgrunnen */
.tour-shot--fade .tour-shot-inner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: clamp(56px, 16%, 120px); background: linear-gradient(to bottom, var(--shot-bg-0) 0%, var(--shot-bg-55) 60%, var(--shot-bg) 100%); pointer-events: none; }
.tour-shot--card .tour-shot-frame, .tour-shot--panel .tour-shot-frame { border-radius: 18px; }
.tour-shot--modal .tour-shot-frame { border-radius: 14px; border-color: var(--c-border); box-shadow: 0 18px 50px rgba(15,26,36,0.14); }
.tour-shot figcaption { margin-top: 12px; font-size: 0.82rem; color: var(--c-text-tertiary); line-height: 1.55; }

/* Nummererte punkter på bildet */
.tour-pin { position: absolute; z-index: 3; width: 28px; height: 28px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--c-primary-dark); color: #fff; font-size: 0.78rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,0.28); cursor: pointer; transition: transform 0.25s ease, background 0.25s ease; touch-action: manipulation; }
.tour-pin::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(38,166,154,0.55); animation: tour-pulse 2.6s ease-out infinite; pointer-events: none; }
.tour-pin span { position: relative; }
.tour-pin:hover, .tour-pin:focus-visible, .tour-pin.is-active { transform: translate(-50%, -50%) scale(1.14); background: var(--c-primary); }
.tour-pin.is-active::after { animation: none; opacity: 0; }
@keyframes tour-pulse { 0% { transform: scale(0.85); opacity: 0.9; } 70% { transform: scale(1.55); opacity: 0; } 100% { transform: scale(1.55); opacity: 0; } }
.tour-box { position: absolute; z-index: 2; border: 2px solid var(--c-primary); border-radius: 8px; background: rgba(38,166,154,0.08); box-shadow: 0 0 0 4px rgba(38,166,154,0.14); opacity: 0; transition: opacity 0.2s ease; pointer-events: none; }
.tour-box.is-active { opacity: 1; }

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

/* Klikkbar knapp i bildet (dekker appens egen knapp nøyaktig) */
.tour-hot { position: absolute; z-index: 3; padding: 0; margin: 0; background: transparent; border: 2px solid var(--c-primary); border-radius: var(--radius-pill); box-shadow: 0 0 0 5px rgba(38,166,154,0.16); cursor: pointer; transition: box-shadow 0.25s ease, border-color 0.25s ease; -webkit-tap-highlight-color: transparent; }
.tour-hot::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid rgba(38,166,154,0.6); animation: tour-hot-pulse 2.4s ease-out infinite; pointer-events: none; }
/* Etiketten ligger til venstre for knappen, så den ikke dekker teksten over */
.tour-hot::after { content: attr(data-label) "\00A0\2192"; position: absolute; right: calc(100% + 14px); top: 50%; transform: translateY(-50%); padding: 6px 12px; border-radius: var(--radius-pill); background: #0f1a24; color: #fff; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap; box-shadow: 0 8px 22px rgba(15,26,36,0.28); pointer-events: none; transition: transform 0.25s ease, background 0.25s ease; }
.tour-hot:hover, .tour-hot:focus-visible { border-color: var(--c-primary-dark); box-shadow: 0 0 0 7px rgba(38,166,154,0.22); outline: none; }
.tour-hot:hover::after, .tour-hot:focus-visible::after { transform: translateY(-50%) translateX(-3px); background: var(--c-primary-dark); }
/* Små mål (ikoner): fast rund treffflate sentrert på ikonet */
.tour-hot--dot { width: 34px; height: 34px; border-radius: 50%; transform: translate(-50%, -50%); }
.tour-hot--label-right::after { content: "\2190\00A0" attr(data-label); right: auto; left: calc(100% + 14px); }
.tour-hot--label-right:hover::after, .tour-hot--label-right:focus-visible::after { transform: translateY(-50%) translateX(3px); }
@keyframes tour-hot-pulse { 0% { transform: scale(1); opacity: 0.9; } 70% { transform: scale(1.25); opacity: 0; } 100% { transform: scale(1.25); opacity: 0; } }

/* Lysboks: appens delingsvindu, vist over siden slik modalen ligger over appen */
.tour-lightbox { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; padding: 16px; }
.tour-lightbox[hidden] { display: none; }
.tour-lightbox-backdrop { position: absolute; inset: 0; background: rgba(6,12,18,0.58); backdrop-filter: blur(12px) saturate(120%); -webkit-backdrop-filter: blur(12px) saturate(120%); animation: tour-fade 0.25s ease; }
.tour-lightbox-panel { position: relative; width: min(100%, 520px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: 20px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.12); animation: tour-lightbox-in 0.32s cubic-bezier(0.16, 1, 0.3, 1); overscroll-behavior: contain; }
@keyframes tour-lightbox-in { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }
.tour-lightbox-shot { position: relative; }
.tour-lightbox-shot img { display: block; width: 100%; height: auto; }
.tour-lightbox-view { display: none; }
.tour-lightbox-view.is-active { display: block; }
.tour-lightbox-hit { position: absolute; z-index: 2; padding: 0; margin: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tour-lightbox-hit:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.tour-lightbox-hit--close { border-radius: 50%; }
.tour-lightbox-foot { padding: 4px 24px 22px; border-top: 1px solid var(--c-border-light); }
.tour-lightbox-foot p { margin: 14px 0 16px; font-size: 0.88rem; line-height: 1.6; color: var(--c-text-secondary); }
.tour-lightbox-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.tour-lightbox-actions .tour-try { margin: 0; }
.tour-lightbox-close { min-height: 42px; padding: 8px 18px; border-radius: var(--radius-pill); border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background var(--transition), border-color var(--transition); }
.tour-lightbox-close:hover { background: var(--c-bg); border-color: var(--c-text-tertiary); }
body.tour-lightbox-open { overflow: hidden; }
@media (max-width: 479px) {
    .tour-hot::after { font-size: 0.68rem; padding: 5px 10px; right: calc(100% + 10px); }
    .tour-hot--label-right::after { right: auto; left: calc(100% + 10px); }
    .tour-hot--dot { width: 32px; height: 32px; }
    .tour-lightbox { padding: 10px; }
    .tour-lightbox-panel { border-radius: 16px; }
    .tour-lightbox-foot { padding: 2px 16px 16px; }
}

.tour-points { display: grid; grid-template-columns: 1fr; gap: 10px; }
.tour-points li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: start; padding: 12px 14px; border-radius: var(--radius-md); background: var(--c-surface); border: 1px solid var(--c-border); transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition); cursor: default; }
.tour-chapter--alt .tour-points li { background: var(--c-bg); }
.tour-points li.is-active { border-color: var(--c-primary); box-shadow: 0 6px 24px rgba(38,166,154,0.16); transform: translateY(-1px); }
.tour-points li strong { display: block; font-size: 0.95rem; line-height: 1.35; margin-bottom: 3px; }
.tour-points li p { font-size: 0.88rem; line-height: 1.6; color: var(--c-text-secondary); }
.tour-num { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--c-primary-dark); color: #fff; font-size: 0.74rem; font-weight: 800; margin-top: 1px; }
.tour-points li.is-active .tour-num { background: var(--c-primary); }
.tour-points--plain li { cursor: auto; grid-template-columns: 1fr; }
.tour-points--plain li.is-active { border-color: var(--c-border); box-shadow: none; transform: none; }
/* Nummererte punkter uten markører på bildet (tall til venstre, tittel ved siden av) */
.tour-points--static li { cursor: auto; column-gap: 14px; }

/* Lenker under kapitlet */
.tour-side { display: flex; flex-direction: column; gap: 16px; }
.tour-side h3 { margin-bottom: 8px; }
.tour-side > p { color: var(--c-text-secondary); line-height: 1.7; font-size: 0.97rem; }
.tour-note { font-size: 0.86rem; color: var(--c-text-tertiary); line-height: 1.6; }
.tour-try { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 46px; padding: 10px 16px 10px 18px; border-radius: var(--radius-pill); background: var(--c-surface); color: var(--c-primary-dark); font-weight: 700; font-size: 0.93rem; line-height: 1.3; text-align: left; text-decoration: none; border: 1.5px solid var(--c-primary); overflow-wrap: break-word; transition: background var(--transition), color var(--transition), transform var(--transition), border-color var(--transition); }
.tour-try span { min-width: 0; }
.tour-try:hover { background: var(--c-primary-bg); color: var(--c-primary-dark); transform: translateY(-1px); }
.tour-try:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 3px; }
.tour-try svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform var(--transition); }
.tour-try:hover svg { transform: translateX(3px); }
/* Samme pille som .tour-try, men litt roligere, så tre handlinger leses som én gruppe. */
.tour-try--secondary { font-weight: 600; background: var(--c-bg); }
.tour-try--secondary:hover { background: var(--c-primary-bg); }
.tour-chapter-foot { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; margin-top: 22px; }
.tour-chapter-foot--actions { align-items: stretch; gap: 10px; }
.tour-chapter-foot--actions .tour-try { align-self: stretch; width: 100%; min-height: 48px; padding: 12px 16px 12px 18px; justify-content: space-between; box-sizing: border-box; }
/* Krav for biologisk alder (kapittel 11): de ni markørene og hvordan man får dem */
.tour-req { margin-top: 26px; padding: 18px 20px; border-radius: var(--radius-lg); background: var(--c-surface); border: 1px solid var(--c-border); }
.tour-req-title { font-size: 0.9rem; font-weight: 700; color: var(--c-text); line-height: 1.5; }
.tour-req-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.tour-req-list li { padding: 5px 10px; border-radius: var(--radius-pill); background: var(--c-bg); border: 1px solid var(--c-border-light); font-size: 0.8rem; font-weight: 600; color: var(--c-text-secondary); white-space: nowrap; }
.tour-req-note { margin-top: 12px; font-size: 0.9rem; line-height: 1.65; color: var(--c-text-secondary); max-width: 80ch; }
.tour-req-note a { color: var(--c-primary-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tour-chapter-foot--center { align-items: center; justify-content: center; }
.tour-side .tour-chapter-foot { margin-top: 0; }

/* Levende avspilling av chatten (ekte panel, se chat-replay.css) */
.tour-live-frame { height: min(640px, 82vh); min-height: 520px; background: var(--c-surface); }
.tour-shot--live .tour-shot-frame { overflow: hidden; }
.tour-live-caption { text-align: center; }

/* Segmentert bryter (Fürst / PDF / Manuelt, Dagens flyt / Min helseuke ...) */
.tour-switch-wrap { display: flex; flex-direction: column; gap: 18px; }
.tour-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--radius-pill); background: var(--c-surface); border: 1px solid var(--c-border); box-shadow: var(--shadow-sm); align-self: flex-start; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tour-chapter--alt .tour-switch { background: var(--c-bg); }
.tour-switch::-webkit-scrollbar { display: none; }
.tour-switch [role="tab"] { flex-shrink: 0; min-height: 40px; padding: 8px 16px; border-radius: var(--radius-pill); font-size: 0.88rem; font-weight: 600; color: var(--c-text-secondary); transition: background var(--transition), color var(--transition), box-shadow var(--transition); white-space: nowrap; }
.tour-switch [role="tab"]:hover { color: var(--c-primary-dark); }
.tour-switch [role="tab"][aria-selected="true"] { background: var(--c-primary-dark); color: #fff; box-shadow: 0 4px 12px rgba(0,77,64,0.22); }
.tour-panel[hidden] { display: none; }
.tour-panel { animation: tour-fade 0.35s ease; }
@keyframes tour-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Telefonrammer (iPhone-lignende: tynn kant, statuslinje, Dynamic Island, sideknapper).
   .tour-phone-wrap er en container, og --u er 1/268 av bredden (cqw), så alle mål
   skalerer nøyaktig med bredden telefonen faktisk får, uansett hvor den brukes.
   Proporsjonene følger iPhone 15/16 (393 pt bred: øy 126×37, statuslinje 54). */
.tour-phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 26px 20px; max-width: 980px; margin: 0 auto; }
.tour-phone { margin: 0; text-align: center; }
.tour-phone-wrap { container-type: inline-size; width: min(100%, 268px); margin: 0 auto; }
.tour-phone-wrap--fill { width: 100%; }
.tour-phone-frame { --u: 1px; --u: calc(100cqw / 268); position: relative; width: 100%; padding: calc(7 * var(--u)); border-radius: calc(44 * var(--u)); background: linear-gradient(155deg, #4a5059 0%, #14181e 28%, #0b0e12 60%, #262b33 100%); box-shadow: 0 28px 60px rgba(15,26,36,0.32), inset 0 0 0 1px rgba(255,255,255,0.16); }
.tour-phone-screen { position: relative; overflow: hidden; border-radius: calc(37 * var(--u)); background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.55); }
.tour-phone-screen img { display: block; width: 100%; height: auto; }
.tour-phone-status { position: relative; height: calc(37 * var(--u)); display: flex; align-items: center; justify-content: space-between; padding: 0 calc(20 * var(--u)) 0 calc(24 * var(--u)); background: #fff; color: #111; }
.tour-phone-time { font-size: calc(11.5 * var(--u)); font-weight: 700; letter-spacing: -0.01em; line-height: 1; white-space: nowrap; overflow-wrap: normal; }
.tour-phone-island { position: absolute; left: 50%; top: calc(8 * var(--u)); transform: translateX(-50%); width: 32%; height: calc(24 * var(--u)); border-radius: calc(12 * var(--u)); background: #05070a; }
.tour-phone-icons { display: inline-flex; align-items: center; gap: calc(4 * var(--u)); }
.tour-phone-icons svg { height: calc(9.5 * var(--u)); width: auto; display: block; }
.tour-phone-btn { position: absolute; width: calc(3 * var(--u)); border-radius: calc(1.5 * var(--u)); background: linear-gradient(180deg, #3a3f47, #1a1e24); }
.tour-phone-btn--mute { left: calc(-2 * var(--u)); top: 16%; height: calc(20 * var(--u)); }
.tour-phone-btn--vol1 { left: calc(-2 * var(--u)); top: 24%; height: calc(40 * var(--u)); }
.tour-phone-btn--vol2 { left: calc(-2 * var(--u)); top: 33%; height: calc(40 * var(--u)); }
.tour-phone-btn--power { right: calc(-2 * var(--u)); top: 27%; height: calc(64 * var(--u)); }
.tour-phone figcaption { margin-top: 14px; }
.tour-phone figcaption strong { display: block; font-size: 0.98rem; margin-bottom: 3px; }
.tour-phone figcaption span { display: block; font-size: 0.85rem; color: var(--c-text-secondary); line-height: 1.55; max-width: 30ch; margin: 0 auto; }
/* Tekst som bare gjelder én skjermstørrelse (kapittelet «På mobilen») */
.tour-only-mobile { display: none; }
/* På smale skjermer: telefonene i én sveipbar rad i stedet for tre høye rammer
   under hverandre. Én skjermhøyde, og naturlig å sveipe på berøringsskjerm. */
@media (max-width: 639px) {
    .tour-only-mobile { display: inline; }
    .tour-only-desktop { display: none; }
    .tour-phones { display: flex; gap: 14px; max-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 6px var(--gutter) 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .tour-phones::-webkit-scrollbar { display: none; }
    .tour-phone { flex: 0 0 min(66vw, 240px); scroll-snap-align: center; }
    .tour-phone-wrap { width: 100%; }
    .tour-phone figcaption span { max-width: none; }
}

/* CTA-banner (tillegg): rolig prislinje med luft under knappene */
.cta-banner-price { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; max-width: 680px; margin: 34px auto 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.14); font-size: 0.88rem; line-height: 1.5; color: var(--c-text-on-dark-muted); }
.cta-banner-price strong { color: #fff; font-weight: 700; }
.cta-banner-price-item { display: inline; }
.cta-banner-price-item + .cta-banner-price-item::before { content: "\00B7"; margin-right: 16px; font-weight: 700; opacity: 0.55; }
.cta-banner-price-link { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.35); transition: text-decoration-color var(--transition); }
.cta-banner-price-link:hover { text-decoration-color: #fff; }
.cta-banner-price-link svg { width: 14px; height: 14px; transition: transform var(--transition); }
.cta-banner-price-link:hover svg { transform: translateX(3px); }
@media (max-width: 639px) {
    .cta-banner-price { flex-direction: column; gap: 8px; margin-top: 28px; }
    .cta-banner-price-item + .cta-banner-price-item::before { content: none; margin: 0; }
    .cta-banner-price-link { margin-top: 4px; }
}

/* Klistret bunnlinje på mobil */
.tour-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; transform: translateY(110%); transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); background: rgba(255,255,255,0.96); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); border-top: 1px solid var(--c-border); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)); }
.tour-sticky.visible { transform: translateY(0); }
.tour-sticky-inner { display: grid; grid-template-columns: auto 1fr; gap: 10px; max-width: 560px; margin: 0 auto; }
.tour-sticky-primary { min-height: 48px; padding: 10px 18px; border-radius: var(--radius-pill); background: var(--c-primary); color: #fff; font-weight: 700; font-size: 0.95rem; box-shadow: 0 6px 18px rgba(38,166,154,0.3); }
.tour-sticky-primary:hover { background: var(--c-primary-hover); }
.tour-sticky-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 16px; border-radius: var(--radius-pill); border: 1px solid var(--c-border); color: var(--c-primary-dark); font-weight: 600; font-size: 0.92rem; background: var(--c-surface); white-space: nowrap; }
.tour-sticky-secondary:hover { background: var(--c-primary-bg); color: var(--c-primary-dark); }
body.tour-sticky-open { padding-bottom: 76px; }

@media (prefers-reduced-motion: reduce) {
    .tour-pin::after { animation: none; display: none; }
    .tour-hot::before { animation: none; display: none; }
    .tour-lightbox-backdrop, .tour-lightbox-panel { animation: none; }
    .tour-panel { animation: none; }
    .tour-sticky { transition: none; }
}

/* Små mobiler: fanene i den segmenterte bryteren bryter til to rader i
   stedet for å rulle sidelengs (der ingenting viste at det fantes mer). */
@media (max-width: 479px) {
    .tour-switch { flex-wrap: wrap; overflow: visible; border-radius: 24px; align-self: stretch; }
    .tour-switch [role="tab"] { flex: 1 1 auto; text-align: center; }
}
@media (max-width: 380px) {
    .tour-pin { width: 24px; height: 24px; font-size: 0.7rem; }
    .tour-step { width: 36px; height: 36px; font-size: 0.95rem; }
}

/* ≥ 640 px */
@media (min-width: 640px) {
    .tour-chapter { padding: 72px 0; }
    .tour-points { grid-template-columns: 1fr 1fr; gap: 12px; }
    .tour-grid--portrait .tour-points, .tour-grid--balanced .tour-points { grid-template-columns: 1fr; }
    .tour-chapter-foot { flex-direction: row; align-items: center; gap: 18px; }
    .tour-chapter-foot--actions { display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: 10px; }
    .tour-chapter-foot--actions .tour-try { width: auto; flex: 1 1 calc(50% - 5px); min-width: 0; justify-content: center; text-align: center; }
    .tour-chapter-foot--actions .tour-try:last-child { flex-basis: 100%; }
    .tour-phones { grid-template-columns: repeat(3, 1fr); }
}

/* ≥ 900 px */
@media (min-width: 900px) {
    .tour-grid--portrait { grid-template-columns: minmax(320px, 500px) 1fr; gap: 36px; }
    .tour-grid--portrait .tour-shot { position: sticky; top: calc(var(--header-h) + var(--tour-nav-h) + 20px); }
    .tour-grid--balanced { grid-template-columns: 1.25fr 1fr; gap: 36px; align-items: center; }
    .tour-points { grid-template-columns: repeat(3, 1fr); }
    .tour-grid--portrait .tour-points, .tour-grid--balanced .tour-points { grid-template-columns: 1fr; }
    .tour-side .tour-points--plain { grid-template-columns: 1fr; }
    .tour-chapter-foot--actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
    .tour-chapter-foot--actions .tour-try { width: auto; justify-content: center; text-align: center; }
}

/* ≥ 1000 px: kapittel-linje med alle trinn synlige */
@media (min-width: 1000px) {
    .tour-nav-toggle, .tour-nav-progress, .tour-nav-scrim { display: none; }
    .tour-nav-inner { padding: 0 var(--gutter); }
    .tour-nav-list, .tour-nav.is-open .tour-nav-list { position: static; display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); gap: 0; height: 100%; padding: 0; background: none; border: 0; box-shadow: none; max-height: none; overflow: visible; animation: none; }
    .tour-nav-list li { position: relative; min-width: 0; }
    /* Linjen mellom trinnene: én halvdel på hver side av sirkelen, med luft inn mot den */
    .tour-nav-list li::before, .tour-nav-list li::after { content: ""; position: absolute; top: 27px; height: 2px; background: var(--c-border); transition: background var(--transition); }
    .tour-nav-list li::before { left: 0; right: calc(50% + 20px); }
    .tour-nav-list li::after { left: calc(50% + 20px); right: 0; }
    .tour-nav-list li:first-child::before, .tour-nav-list li:last-child::after { display: none; }
    .tour-nav-list li.is-done::before, .tour-nav-list li.is-done::after, .tour-nav-list li.is-active::before { background: var(--c-primary); }
    .tour-nav-list a, .tour-nav-list a.is-active, .tour-nav-list a:hover, .tour-nav-list a.is-active:hover { position: relative; z-index: 1; flex-direction: column; justify-content: flex-start; gap: 8px; min-height: 0; height: 100%; padding: 14px 6px 10px; border-radius: 8px; background: none; text-align: center; }
    .tour-nav-list a:focus-visible { outline: 2px solid var(--c-primary); outline-offset: -2px; }
    .tour-nav-num { width: 26px; height: 26px; font-size: 0.72rem; background: #fff; }
    .tour-nav-list a.is-active .tour-nav-num { box-shadow: 0 0 0 5px rgba(38,166,154,0.18); }
    .tour-nav-label { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 0.74rem; line-height: 1.2; font-weight: 600; color: var(--c-text-secondary); transition: color var(--transition); }
    .tour-nav-list a.is-active .tour-nav-label { color: var(--c-primary-dark); font-weight: 700; }
    .tour-nav-list a:hover .tour-nav-label { color: var(--c-primary-dark); }
}

/* ≥ 1024 px */
@media (min-width: 1024px) {
    .tour-hero { padding-bottom: 72px; }
    .tour-hero-visual { margin: 0 0 0 auto; max-width: 580px; }
    .tour-chapter { padding: 88px 0; }
    .tour-chapter-head { margin-bottom: 32px; }
    .tour-sticky { display: none; }
    body.tour-sticky-open { padding-bottom: 0; }
    .tour-shot figcaption { text-align: center; }
    .tour-shot--card .tour-shot-frame, .tour-shot--panel .tour-shot-frame { box-shadow: 0 24px 60px rgba(15,26,36,0.16); }
}

/* Hover-effekter kun der pekeren kan «hovre» */
@media (hover: none) {
    .tour-try:hover { transform: none; }
}
