/* Undersidene: samme uttrykk som forsiden – rolige seksjoner, scene-kort med levende pustesirkler, mørk avslutning. */
:root {
  --snow: #F7F4EE;
  --card: #FFFFFF;
  --raised: #EFEAE1;
  --ink: #1D3441;
  --ink-soft: #5E7280;
  --line: #E6DFD4;
  --multe: #F29E4C;
  --multe-deep: #D9792A;
  --glow: #FF7B54;
  --fjord: #2F6B8A;
  --stage: #FCEBD9;
  --stage-hill: #F8DCC0;
  --stage-sun: #FBD2A8;
  --night: #13222C;
  --night-ink: #E8EEF1;
  --night-soft: #9AABB6;
  --shadow: 0 30px 60px -20px rgba(29, 52, 65, .28), 0 12px 24px -12px rgba(29, 52, 65, .18);
  --soft-shadow: 0 18px 40px -24px rgba(29, 52, 65, .35);
  --display: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Nunito Sans", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  --t-multe: #F29E4C; --t-fjord: #3A7CA0; --t-mose: #6E9C7A; --t-isbre: #4FA9C4; --t-lyng: #9C7BC0; --t-nordlys: #36B28E;
  --s-multe: #FCEBD9; --s-fjord: #DEEAF1; --s-mose: #E3EEE5; --s-isbre: #DDF0F5; --s-lyng: #EDE5F5; --s-nordlys: #D9F2E9;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --snow: #0F171D; --card: #17232B; --raised: #1D2B34; --ink: #E8EEF1; --ink-soft: #9AABB6; --line: #26343D;
    --multe-deep: #F6B06B; --stage: #2A2119; --stage-hill: #3A2C1F; --stage-sun: #5A3F25;
    --night: #09121A; --shadow: 0 30px 60px -20px rgba(0,0,0,.6), 0 12px 24px -12px rgba(0,0,0,.5);
    --soft-shadow: 0 18px 40px -24px rgba(0,0,0,.7);
    --s-multe: #33261A; --s-fjord: #16293A; --s-mose: #1B2D22; --s-isbre: #14313B; --s-lyng: #271F35; --s-nordlys: #13332B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --snow: #0F171D; --card: #17232B; --raised: #1D2B34; --ink: #E8EEF1; --ink-soft: #9AABB6; --line: #26343D;
  --multe-deep: #F6B06B; --stage: #2A2119; --stage-hill: #3A2C1F; --stage-sun: #5A3F25;
  --night: #09121A; --shadow: 0 30px 60px -20px rgba(0,0,0,.6), 0 12px 24px -12px rgba(0,0,0,.5);
  --soft-shadow: 0 18px 40px -24px rgba(0,0,0,.7);
  --s-multe: #33261A; --s-fjord: #16293A; --s-mose: #1B2D22; --s-isbre: #14313B; --s-lyng: #271F35; --s-nordlys: #13332B;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--snow); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, canvas { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--multe); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.025em; line-height: 1.04; margin: 0; text-wrap: balance; }
p { margin: 0; }
.eyebrow { font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--multe-deep); }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-soft); max-width: 34em; text-wrap: pretty; }

/* Nav */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--snow) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav nav { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }
.nav nav a { text-decoration: none; color: var(--ink-soft); }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--ink); }
.pill {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  font: 700 14px/1 var(--display); padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--snow);
}
@media (max-width: 720px) { .nav nav { display: none; } .nav .pill { margin-left: auto; } }

/* Knapper */
.store-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px 12px 16px; border-radius: 14px;
  background: var(--ink); color: var(--snow); text-decoration: none;
}
.badge svg { width: 26px; height: 26px; fill: currentColor; }
.badge small { display: block; font: 600 11px/1.1 var(--body); opacity: .75; }
.badge strong { display: block; font: 800 18px/1.1 var(--display); letter-spacing: -.01em; }
.ghost { font: 700 16px/1 var(--display); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; padding: 14px 4px; }
.ghost span { transition: transform .3s; }
.ghost:hover span { transform: translateY(3px); }
.meta { font-size: 14px; color: var(--ink-soft); display: flex; gap: 8px 16px; flex-wrap: wrap; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--multe); }

/* Brødsmuler */
.crumbs { font-size: 14px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: 6px; opacity: .6; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* Scene med pusteprikker */
.stage {
  position: relative; border-radius: 30px; overflow: hidden; aspect-ratio: 16 / 10; isolation: isolate;
  background: var(--soft, var(--stage));
}
.stage .hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 42%; }
.stage .hills path { fill: color-mix(in srgb, var(--tone, var(--multe)) 16%, var(--soft, var(--stage))); }
.stage .hills path + path { fill: color-mix(in srgb, var(--tone, var(--multe)) 26%, var(--soft, var(--stage))); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage .num {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  font: 800 13px/1 var(--display); letter-spacing: .08em; padding: 8px 12px; border-radius: 99px;
  background: color-mix(in srgb, var(--card) 86%, transparent); font-variant-numeric: tabular-nums;
}
.stage .play {
  position: absolute; right: 14px; bottom: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--ink);
  background: color-mix(in srgb, var(--card) 86%, transparent); opacity: 0; transition: opacity .3s;
}
.stage:hover .play, .stage .play:focus-visible, .stage.paused .play { opacity: 1; }
.stage .play svg { width: 16px; height: 16px; fill: currentColor; }
.stage .play .i-play { display: none; }
.stage.paused .play .i-play { display: block; }
.stage.paused .play .i-pause { display: none; }

/* Hero */
.hero { padding-block: clamp(28px, 5vw, 72px) clamp(56px, 7vw, 96px); overflow: clip; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero h1 { font-size: clamp(38px, 4.4vw, 64px); font-weight: 900; }
.hero h1 em { font-style: normal; color: var(--multe); display: block; }
.hero-art { position: relative; min-width: 0; padding-bottom: 28px; }
.hero-art .sunglow { position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--stage-sun), transparent 68%); right: -12%; top: -18%; z-index: -1; opacity: .9; }
.hero .stage { box-shadow: var(--shadow); transform: rotate(-1.5deg); }
.hero .segments { position: absolute; z-index: 3; left: 18px; right: 18px; top: 16px; display: flex; gap: 6px; }
.hero .segments i { flex: 1; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 16%, transparent); overflow: hidden; }
.hero .segments i b { display: block; height: 100%; width: 0; background: var(--multe); border-radius: 4px; }
.hero .segments i.done b { width: 100%; }
.now {
  position: absolute; z-index: 3; left: -14px; bottom: 0;
  display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow); max-width: calc(100% - 20px);
}
.now .dot { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--glow) 16%, transparent); font: 800 14px/1 var(--display); color: var(--glow); font-variant-numeric: tabular-nums; }
.now b { display: block; font: 800 16px/1.15 var(--display); }
.now small { display: block; font: 600 13px/1.25 var(--body); color: var(--ink-soft); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .stage { transform: none; }
  .now { left: 10px; }
}

/* Kort fortalt */
.summary { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 5vw, 72px); background: var(--card); border-radius: 32px; padding: clamp(26px, 4.4vw, 56px); }
.summary h2 { font-size: clamp(30px, 3.6vw, 46px); }
.summary .lead { display: grid; gap: 14px; align-content: start; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.checks li { display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: start; font-size: 18px; }
.checks li::before {
  content: ""; width: 30px; height: 30px; border-radius: 50%;
  background: var(--multe) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 16px no-repeat;
}
@media (max-width: 800px) { .summary { grid-template-columns: 1fr; } }

/* Seksjoner */
section.block { padding-block: clamp(72px, 10vw, 140px); }
.head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); max-width: 780px; }
.head h2 { font-size: clamp(38px, 5.4vw, 72px); }

/* Øvelsene */
.ex-list { display: grid; gap: clamp(56px, 8vw, 110px); }
.ex { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.ex:nth-child(even) .stage { order: 2; }
.ex .stage { box-shadow: var(--soft-shadow); }
.ex-copy { display: grid; gap: 16px; min-width: 0; }
.ex-copy h3 { font-size: clamp(30px, 3.4vw, 44px); }
.ex-copy .why { font-size: 19px; color: var(--ink-soft); text-wrap: pretty; }
.areas { display: flex; flex-wrap: wrap; gap: 8px; }
.areas span { padding: 7px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font: 700 14px/1 var(--display); }
.areas span.hot { background: var(--multe); border-color: var(--multe); color: #fff; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-soft); }
.facts span { display: inline-flex; gap: 6px; align-items: center; }
.facts svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.how { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.how li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.how li::before {
  content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font: 800 13px/1 var(--display); background: color-mix(in srgb, var(--ink) 8%, transparent); margin-top: 1px;
}
.tip { display: grid; gap: 4px; padding: 14px 16px; border-radius: 18px; background: var(--raised); font-size: 15px; }
.tip b { font: 800 14px/1.2 var(--display); }
.tip.easy { background: color-mix(in srgb, var(--multe) 13%, transparent); }
.tip-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 860px) {
  .ex { grid-template-columns: 1fr; }
  .ex:nth-child(even) .stage { order: 0; }
}
@media (max-width: 520px) { .tip-row { grid-template-columns: 1fr; } }

/* Årsaker */
.causes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cause { background: var(--card); border-radius: 28px; padding: clamp(22px, 2.6vw, 34px); display: grid; gap: 10px; align-content: start; }
.cause i { font: 900 44px/1 var(--display); font-style: normal; color: var(--multe); letter-spacing: -.03em; }
.cause h3 { font-size: clamp(22px, 2.2vw, 28px); }
.cause p { color: var(--ink-soft); }
@media (max-width: 860px) { .causes { grid-template-columns: 1fr; } }

/* Lege */
.doctor { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(24px, 5vw, 72px); background: var(--night); color: var(--night-ink); border-radius: 32px; padding: clamp(28px, 5vw, 64px); position: relative; overflow: clip; }
.doctor h2 { font-size: clamp(32px, 4vw, 52px); }
.doctor p { color: var(--night-soft); }
.doctor .lead { display: grid; gap: 16px; align-content: start; position: relative; }
.doctor .sign { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.doctor .sign svg { width: 26px; height: 26px; stroke: var(--multe); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; }
.flags li { padding: 14px 16px 14px 44px; border-radius: 16px; background: rgba(255,255,255,.05); position: relative; }
.flags li::before { content: ""; position: absolute; left: 18px; top: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--multe); }
.flags li.acute { background: rgba(255,123,84,.14); }
.flags li.acute::before { background: var(--glow); box-shadow: 0 0 0 4px rgba(255,123,84,.25); }
.flags li strong { color: #fff; }
.doctor .ridge { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 45%; pointer-events: none; }
.doctor .ridge path { fill: rgba(255,255,255,.03); }
@media (max-width: 860px) { .doctor { grid-template-columns: 1fr; } }

/* Appen */
.app { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 6vw, 90px); align-items: center; }
.app-copy { display: grid; gap: 20px; }
.app-copy h2 { font-size: clamp(36px, 4.8vw, 64px); }
.phone {
  position: relative; width: min(320px, 78%); aspect-ratio: 1206 / 2622; border-radius: 15% / 7%; justify-self: center;
  padding: 3.2%; background: #0B1116; box-shadow: var(--shadow), inset 0 0 0 1.5px #2a343c;
}
.phone img { width: 100%; height: 100%; border-radius: 12.2% / 5.7%; object-fit: cover; }
.routine { display: grid; gap: 10px; background: var(--card); border-radius: 24px; padding: 18px; }
.routine header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.routine header b { font: 800 20px/1.2 var(--display); }
.routine header span { font-size: 14px; color: var(--ink-soft); white-space: nowrap; }
.routine ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.routine li { padding: 8px 12px; border-radius: 12px; background: var(--raised); font: 700 14px/1.2 var(--display); }
@media (max-width: 860px) { .app { grid-template-columns: 1fr; } .app .phone { order: 2; } }

/* Spørsmål */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { background: var(--card); border-radius: 22px; padding: 4px 22px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative;
  font: 800 clamp(18px, 1.7vw, 21px)/1.3 var(--display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 8%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F29E4C' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform .3s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--ink-soft); max-width: 44em; }

/* Andre øvelser */
.others { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.other {
  display: grid; gap: 6px; padding: 22px; border-radius: 24px; background: var(--card); text-decoration: none;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; position: relative;
}
.other:hover { transform: translateY(-4px); box-shadow: var(--soft-shadow); }
.other small { font: 800 12px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--multe-deep); }
.other b { font: 800 21px/1.2 var(--display); letter-spacing: -.01em; padding-right: 28px; }
.other span { font-size: 15px; color: var(--ink-soft); }
.other::after { content: "→"; position: absolute; right: 22px; top: 44px; font: 800 20px/1 var(--display); color: var(--multe); transition: transform .3s; }
.other:hover::after { transform: translateX(4px); }
@media (max-width: 960px) { .others { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .others { grid-template-columns: 1fr; } }

/* Oversikt (pust/index.html) */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { display: grid; background: var(--card); border-radius: 30px; overflow: hidden; text-decoration: none; transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card .stage { border-radius: 0; }
.card .txt { display: grid; gap: 8px; padding: 22px 26px 26px; }
.card .txt b { font: 800 clamp(24px, 2.4vw, 30px)/1.1 var(--display); letter-spacing: -.02em; }
.card .txt span { color: var(--ink-soft); }
.card .txt small { font: 800 12px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--multe-deep); }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }

/* Avslutning */
.cta { background: var(--night); color: var(--night-ink); padding-block: clamp(90px, 12vw, 170px); text-align: center; position: relative; overflow: clip; }
.cta .wrap { display: grid; justify-items: center; gap: 24px; position: relative; z-index: 1; }
.cta img.icon { width: 104px; height: 104px; border-radius: 24px; box-shadow: 0 20px 50px -10px rgba(242,158,76,.45); }
.cta h2 { font-size: clamp(44px, 7vw, 96px); font-weight: 900; }
.cta .lede { color: var(--night-soft); margin-inline: auto; }
.cta .badge { background: #F7F4EE; color: #1D3441; }
.cta .ridge { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 40%; }
.cta .ridge path { fill: rgba(255,255,255,.035); }
.cta .csun { position: absolute; width: 420px; aspect-ratio: 1; border-radius: 50%; left: 50%; top: 55%; transform: translate(-50%, 0); background: radial-gradient(circle, rgba(242,158,76,.22), transparent 65%); animation: csun 10s ease-in-out infinite; }
@keyframes csun { 0%, 100% { transform: translate(-50%, 0) scale(.86); } 40% { transform: translate(-50%, 0) scale(1.08); } }
footer { background: var(--night); color: var(--night-soft); font-size: 13px; padding-block: 36px 40px; border-top: 1px solid rgba(255,255,255,.07); }
footer .wrap { display: grid; gap: 24px; }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
footer .links a { text-decoration: none; color: var(--night-ink); opacity: .8; }
footer .links a:hover { opacity: 1; }
footer .fine { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer .disclaimer { max-width: 60em; }

/* Inn-animasjon */
.rise { transition: transform .9s cubic-bezier(.2,.7,.2,1), opacity .9s; }
.js .rise.pending { transform: translateY(28px); opacity: .001; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { transition: none; } .js .rise.pending { transform: none; opacity: 1; }
  .card, .other { transition: none; }
  .cta .csun { animation: none; }
}

/* Apples «Last ned fra App Store»-merke (Tools/appstore_lansering.py) */
.badge-apple { display: inline-block; line-height: 0; border-radius: 10px; transition: transform .2s ease; }
.badge-apple:hover { transform: translateY(-1px); }
.badge-apple img { height: 52px; width: auto; }
.alt-badge.badge-apple { background: none; padding: 0; box-shadow: none; border: 0; }

/* Lenker til appen (Tools/appstore_lansering.py) */
.hero-app { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.hero-app .badge-apple img { height: 46px; }
.hero-app span { font-size: 14px; line-height: 1.4; color: var(--ink-soft); }
.app-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding: clamp(24px, 4vw, 44px); border-radius: 30px; background: var(--card); box-shadow: var(--soft-shadow); }
.app-band > div { display: grid; gap: 8px; max-width: 36em; }
.app-band h3 { font-size: clamp(24px, 2.6vw, 32px); }
.app-band p:not(.eyebrow) { color: var(--ink-soft); }
footer .fine a { color: inherit; }
