/* =========================================================
   PT / coach – prototype fra Klartil
   Profesjonell og rolig: marineblå med korall aksent.
   Bytt --navy og --accent for coachens egne farger.
   ========================================================= */
:root {
  --bg: #ffffff;
  --soft: #f4f6f9;
  --soft-2: #eaeef4;
  --line: #e1e6ed;
  --ink: #0e1a2b;
  --ink-2: #3a4658;
  --muted: #6a7586;
  --navy: #0e1a2b;
  --navy-2: #17263b;
  --navy-3: #22344d;
  --accent: #ff6a3d;
  --accent-2: #f2551f;
  --accent-soft: #ffece5;
  --accent-ink: #c2410c;     /* korall som tekst på lys bakgrunn */
  --ok: #1f8a55;
  --ok-soft: #e3f4ea;
  --warn: #b26a00;
  --err: #c0271a;
  --c-weight: #ff6a3d;
  --c-trend: #0e1a2b;
  --c-goal: #8a96a8;
  --radius: 18px;
  --shadow: 0 24px 50px -28px rgba(14, 26, 43, .35);
  --head: "Manrope", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1rem/1.6 var(--sans); color: var(--ink); background: var(--bg); overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 800; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 4.8vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.eyebrow { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: .8em; }
.eyebrow--dark { color: var(--accent-ink); }
.muted { color: var(--muted); }
.muted-light { color: #a9b6c8; }
.small { font-size: .875rem; }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 34em; }
.hl { color: var(--accent); }

/* Knapper */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .7em 1.35em; border-radius: 12px; border: 2px solid transparent; font-weight: 700; font-size: .98rem; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; white-space: nowrap; }
.btn--lg { min-height: 54px; padding: .8em 1.6em; font-size: 1.04rem; }
.btn--sm { min-height: 38px; padding: .4em .9em; font-size: .88rem; border-radius: 10px; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-2); }
.btn--accent:disabled { background: #f4c3b2; cursor: not-allowed; }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--ghost-light { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.btn--ghost-light:hover { border-color: #fff; }
.btn--danger { background: transparent; border-color: #f3c6c1; color: var(--err); }
.btn--block { width: 100%; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 0; background: transparent; cursor: pointer; color: inherit; }
.icon-btn:hover { background: var(--soft); }
.link-btn { background: none; border: 0; padding: .2em 0; color: var(--accent-ink); font-weight: 650; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: .9rem; }
.link-btn--light { color: #ffb69e; }

.proto-badge { background: #050a12; color: #ffd8cb; text-align: center; font-size: .8rem; padding: .5em 16px; }

/* Topp */
.top { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 16px; min-height: 70px; }
.logo { display: inline-flex; align-items: center; gap: .6em; text-decoration: none; color: var(--ink); }
.logo__mark { width: 38px; height: 38px; border-radius: 11px; background: var(--navy); color: var(--accent); display: grid; place-items: center; }
.logo__mark svg { width: 22px; height: 22px; stroke-width: 2.6; }
.logo__text { font: 600 1.2rem/1 var(--head); letter-spacing: -.02em; }
.logo__text strong { font-weight: 800; }
.logo--light { color: #fff; }
.logo--light .logo__mark { background: var(--accent); color: #fff; }
.nav { display: flex; gap: 24px; margin: 0 auto 0 28px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .95rem; white-space: nowrap; }
.login-btn span, .logo__text { white-space: nowrap; }
.nav a:hover { color: var(--accent-ink); }
.login-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: .4em .8em; border-radius: 12px; border: 0; background: transparent; font-weight: 650; font-size: .95rem; cursor: pointer; }
.login-btn:hover { background: var(--soft); }
.login-btn svg { width: 22px; height: 22px; }
.top__cta { min-height: 44px; padding: .5em 1.1em; font-size: .95rem; }
.nav-toggle { display: none; }

/* Hero */
.hero { padding: clamp(36px, 6vw, 80px) 0 clamp(48px, 7vw, 96px); background: linear-gradient(180deg, #fff 0%, var(--soft) 100%); }
.hero__in { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 30px; }
.hero__proof { list-style: none; padding: 0; margin: 0; display: flex; gap: 34px; flex-wrap: wrap; }
.hero__proof li { display: grid; }
.hero__proof strong { font: 800 1.7rem/1.1 var(--head); }
.hero__proof span { color: var(--muted); font-size: .88rem; }
.hero__media { position: relative; }
.hero__media img { border-radius: 28px; aspect-ratio: 5 / 4.2; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.float-card { position: absolute; background: #fff; border-radius: 16px; box-shadow: 0 18px 40px -16px rgba(14,26,43,.35); padding: 14px 16px; }
.float-card--weight { left: -26px; bottom: 30px; width: 190px; display: grid; gap: 2px; }
.float-card--weight svg { width: 100%; height: 34px; margin-top: 4px; }
.float-card__label { font-size: .75rem; color: var(--muted); font-weight: 600; }
.float-card--weight strong { font: 800 1.5rem/1 var(--head); color: var(--ok); }
.float-card--plan { right: -18px; top: 28px; display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.float-card--plan strong { display: block; font-size: .92rem; }
.float-card--plan span { color: var(--muted); }
.float-card__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }

/* Seksjoner */
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section--soft { background: var(--soft); }
.section--dark { background: var(--navy); color: #fff; }
.section__head { max-width: 680px; margin-bottom: 36px; }
.section__head--center { margin-inline: auto; text-align: center; }

.how { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.how__img { border-radius: 24px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 18px; }
.steps li { display: flex; gap: 16px; }
.steps li > span { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font: 800 1.1rem/1 var(--head); flex: none; }
.steps h3 { margin: 4px 0 .2em; }
.steps p { margin: 0; color: var(--muted); }

/* Pakker */
.packages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pack { background: #fff; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.pack--pop { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.pack img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.pack__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.pack__tag { align-self: flex-start; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .3em .8em; border-radius: 999px; margin-bottom: 10px; }
.pack h3 { font-size: 1.45rem; margin-bottom: .15em; }
.pack__for { color: var(--muted); font-size: .93rem; margin-bottom: 12px; }
.pack__price { margin: 0 0 14px; }
.pack__price strong { font: 800 2.2rem/1 var(--head); }
.pack__price span { color: var(--muted); font-weight: 600; }
.pack__price small { display: block; color: var(--muted); margin-top: 4px; }
.pack ul { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; flex: 1; }
.pack li { display: flex; gap: 10px; font-size: .95rem; }
.pack li svg { color: var(--ok); stroke-width: 2.6; margin-top: 2px; }

/* Min side-visning */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.features { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 16px; }
.features li { display: flex; gap: 14px; }
.features svg { width: 42px; height: 42px; padding: 10px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.features strong { display: block; }
.features span { color: var(--muted); font-size: .94rem; }
.showcase__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.device { background: var(--navy); border-radius: 30px; padding: 14px; box-shadow: var(--shadow); max-width: 460px; justify-self: center; width: 100%; }
.device__bar { display: flex; gap: 6px; padding: 4px 8px 12px; }
.device__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--navy-3); }
.device__screen { background: var(--soft); border-radius: 20px; padding: 20px; display: grid; gap: 14px; }
.device__hello { font: 800 1.3rem/1 var(--head); margin: 0; }
.device__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.device__stats div { background: #fff; border-radius: 12px; padding: 10px; }
.device__stats small { display: block; color: var(--muted); font-size: .72rem; }
.device__stats strong { font: 800 1.1rem/1.2 var(--head); }
.device__chart { background: #fff; border-radius: 14px; padding: 8px; }
.device__meal { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 8px; }
.device__meal img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.device__meal div { flex: 1; display: grid; }
.device__meal small { color: var(--muted); font-size: .75rem; }
.device__meal strong { font-size: .92rem; }
.check-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: .85rem; font-weight: 800; margin-right: 6px; }

/* Resultater */
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.result { background: var(--navy-2); border: 1px solid var(--navy-3); border-radius: 20px; padding: 24px; margin: 0; }
.result__num { font: 800 2.2rem/1 var(--head); color: var(--accent); margin-bottom: 4px; }
.result__what { color: #a9b6c8; font-size: .9rem; margin-bottom: 14px; }
.result p { color: #e3e9f1; }
.result footer { font-weight: 700; font-size: .92rem; }

/* Om */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about img { border-radius: 24px; aspect-ratio: 4 / 3.3; object-fit: cover; width: 100%; }
.creds { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.creds li { background: var(--soft); border-radius: 999px; padding: .4em .95em; font-size: .9rem; font-weight: 600; }

.band { position: relative; color: #fff; overflow: hidden; }
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,26,43,.93), rgba(14,26,43,.6)); z-index: 1; }
.band__in { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: clamp(48px, 7vw, 84px) 0; }
.band p { margin: 0; color: #dbe3ee; max-width: 34em; }

.faq-wrap { max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 54px 18px 20px; font-weight: 650; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 20px 18px; margin: 0; color: var(--ink-2); }

.footer { background: #070e18; color: #a9b6c8; padding: 44px 0 40px; }
.footer__in { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; }
.footer a { color: #ffb69e; }
.footer p { margin: 0 0 .5em; }
.footer .logo { margin-bottom: 12px; }
.credits summary { cursor: pointer; }
.credits ul { padding-left: 1.1em; margin: 8px 0 0; font-size: .78rem; display: grid; gap: 4px; }
.mobile-bar { display: none; }

/* Skjema */
label { display: grid; gap: 6px; font-size: .92rem; font-weight: 650; color: var(--ink-2); margin-bottom: 14px; }
input, select, textarea { width: 100%; min-height: 48px; padding: .6em .85em; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-weight: 400; font-size: 1rem; }
textarea { min-height: 0; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,106,61,.18); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.field-label { font-size: .92rem; font-weight: 650; color: var(--ink-2); margin: 4px 0 8px; }
.form-error { color: var(--err); font-weight: 650; font-size: .92rem; margin: 10px 0 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pills button { min-height: 42px; padding: .4em 1em; border-radius: 999px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: .9rem; }
.pills button[aria-checked="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.demo-code { background: var(--accent-soft); color: var(--accent-ink); border-radius: 10px; padding: .55em .9em; }

/* Vindu */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(7, 14, 24, .6); backdrop-filter: blur(3px); }
.modal__panel { position: relative; width: min(600px, 100%); max-height: min(880px, 100%); display: flex; flex-direction: column; background: #fff; border-radius: 22px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); overflow: hidden; }
.modal__head { display: flex; align-items: center; gap: 8px; padding: 18px 18px 12px 24px; }
.modal__titles { flex: 1; min-width: 0; }
.modal__head h2 { font-size: 1.55rem; margin: 0; }
.modal__step { margin: 0; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); font-weight: 700; }
.progress { height: 4px; background: var(--line); }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.modal__body { padding: 18px 24px 24px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.modal__foot { display: flex; align-items: center; gap: 16px; padding: 14px 24px; border-top: 1px solid var(--line); }
.demo-note { background: #fff3d6; color: #6b4e00; font-size: .82rem; padding: .5em .9em; border-radius: 10px; margin-bottom: 14px; }
.sum { flex: 1; min-width: 0; font-size: .88rem; line-height: 1.35; }
.sum strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum span { color: var(--muted); }
.mdays { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 10px; }
.mday { flex: none; width: 64px; padding: 9px 0; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; display: grid; gap: 1px; text-align: center; }
.mday small { font-size: .72rem; color: var(--muted); text-transform: uppercase; }
.mday strong { font-size: 1.1rem; }
.mday span { font-size: .68rem; color: var(--ok); font-weight: 650; }
.mday:disabled { opacity: .4; cursor: not-allowed; }
.mday[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.mday[aria-selected="true"] small, .mday[aria-selected="true"] span { color: #ffb69e; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot { min-height: 46px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 650; cursor: pointer; }
.slot[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.done { text-align: center; }
.done__icon { width: 66px; height: 66px; margin: 6px auto 14px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.done__icon svg { width: 34px; height: 34px; stroke-width: 2.6; }
.done-card { text-align: left; background: var(--soft); border-radius: 14px; padding: 14px 18px; display: grid; gap: 6px; font-size: .94rem; margin: 14px 0; }
.done-card div { display: flex; justify-content: space-between; gap: 16px; }
.done-card span:first-child { color: var(--muted); }
.done-card span:last-child { font-weight: 650; text-align: right; }
.done-next { text-align: left; padding-left: 1.3em; margin: 0 0 18px; color: var(--ink-2); display: grid; gap: 6px; }
.done-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.shop { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 20px; }
.shop li { break-inside: avoid; margin-bottom: 6px; }
.shop label { display: flex; gap: 10px; align-items: center; font-weight: 500; margin: 0; color: var(--ink); }
.shop input { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--ok); flex: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center; }
.tooltip { position: fixed; z-index: 70; pointer-events: none; background: var(--navy); color: #fff; padding: 8px 11px; border-radius: 10px; font-size: .82rem; line-height: 1.35; box-shadow: var(--shadow); transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; }
.tooltip strong { font-size: .95rem; }

/* ===== App: Min side og coach-panel ===== */
body.app-view main, body.app-view .mobile-bar { display: none; }
.app { background: var(--soft); min-height: 80vh; padding-bottom: 64px; }
.app-top { background: var(--navy); color: #fff; padding: 28px 0 0; }
.app-top__in { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.app-top h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 0; }
.app-top__btns { display: flex; gap: 8px; }
.tabs { display: flex; gap: 4px; margin-top: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 48px; padding: .6em 1.1em; border: 0; border-radius: 12px 12px 0 0; background: transparent; color: #c3cedd; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.tab:hover { color: #fff; }
.tab[aria-selected="true"] { background: var(--soft); color: var(--ink); }
.tab .count { background: var(--accent); color: #fff; font-size: .72rem; border-radius: 999px; padding: .1em .5em; }
.app-body { padding-top: 24px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(12, 1fr); }
.card { background: #fff; border-radius: 20px; padding: 22px; border: 1px solid var(--line); min-width: 0; grid-column: span 12; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; }
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card__head h2, .card__head h3 { margin: 0; font-size: 1.15rem; }
.label { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.kpi strong { display: block; font: 800 1.7rem/1.1 var(--head); }
.kpi span { color: var(--muted); font-size: .85rem; }
.kpi .up { color: var(--err); } .kpi .down { color: var(--ok); }
.progressbar { height: 12px; background: var(--soft-2); border-radius: 999px; overflow: hidden; margin: 8px 0 6px; }
.progressbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff9466); border-radius: 999px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; align-items: center; gap: 12px; }
.checklist .tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.checklist .tick.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist .tick svg { width: 14px; height: 14px; stroke-width: 3; }
.checklist span { flex: 1; }
.checklist small { color: var(--muted); }
.note { background: var(--accent-soft); border-radius: 14px; padding: 14px 16px; color: #6b2a10; }
.note strong { display: block; margin-bottom: 2px; color: var(--accent-ink); }

/* Graf */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; stroke: none; stroke-width: 0; }
.chart text { font: 500 11px var(--sans); fill: var(--muted); }
.chart .grid-line { stroke: var(--soft-2); stroke-width: 1; }
.chart .w-line { fill: none; stroke: var(--c-weight); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .w-area { fill: url(#wgrad); stroke: none; }
.chart .w-dot { fill: #fff; stroke: var(--c-weight); stroke-width: 2.2; }
.chart .w-dot.is-hover { fill: var(--c-weight); }
.chart .trend { fill: none; stroke: var(--c-trend); stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; }
.chart .goal { stroke: var(--c-goal); stroke-width: 1.5; stroke-dasharray: 6 5; }
.chart .goal-label { fill: var(--ink-2); font-weight: 650; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .x-guide { stroke: var(--ink-2); stroke-width: 1; opacity: .25; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .84rem; color: var(--ink-2); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 0; border-top: 3px solid var(--c-weight); }
.legend i.t { border-top: 2px dotted var(--c-trend); }
.legend i.g { border-top: 2px dashed var(--c-goal); }
.seg { display: inline-flex; background: var(--soft); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { min-height: 34px; padding: .2em .8em; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.analysis { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.analysis li { display: flex; gap: 12px; align-items: flex-start; }
.analysis li > b { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--soft); }
.analysis li > b.good { background: var(--ok-soft); color: var(--ok); }
.analysis li > b.warn { background: #fff1d6; color: var(--warn); }
.analysis li div strong { display: block; }
.analysis li div span { color: var(--muted); font-size: .9rem; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 8px 6px; border-bottom: 2px solid var(--line); }
.table td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .diff-down { color: var(--ok); font-weight: 650; } .table .diff-up { color: var(--err); font-weight: 650; }
.table-wrap { overflow-x: auto; }
.mood { font-size: .8rem; font-weight: 650; padding: .15em .6em; border-radius: 999px; background: var(--soft); white-space: nowrap; }

/* Matplan og trening */
.day-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.total small { color: var(--muted); display: flex; justify-content: space-between; font-size: .85rem; }
.total small b { color: var(--ink); }
.meals { display: grid; gap: 10px; }
.meal { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.meal.is-eaten { background: #f6fbf8; border-color: #cde9d9; }
.meal__time { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--accent-ink); }
.meal__name { font-weight: 700; }
.meal__items { color: var(--muted); font-size: .88rem; }
.meal__macros { font-size: .82rem; color: var(--ink-2); margin-top: 2px; }
.eat { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: .3em .85em; border-radius: 999px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 650; font-size: .86rem; }
.eat[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.session { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; background: #fff; }
.session + .session { margin-top: 12px; }
.session__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.session__head h3 { margin: 0; }
.ex { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--soft-2); }
.ex input { width: 22px; height: 22px; min-height: 0; padding: 0; accent-color: var(--ok); }
.ex__name { font-weight: 650; }
.ex__note { color: var(--muted); font-size: .85rem; }
.ex__sets { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; padding: 4px 2px 10px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: .95rem; }
.msg small { display: block; font-size: .72rem; opacity: .7; margin-top: 4px; }
.msg--them { background: var(--soft); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg--me { background: var(--navy); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-form { display: flex; gap: 8px; margin-top: 8px; }
.chat-form input { flex: 1; }

/* Coach-panel */
.coach { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.clients { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 10px; position: sticky; top: 86px; }
.clients__head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 10px; }
.client-btn { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px; border-radius: 14px; border: 0; background: transparent; cursor: pointer; }
.client-btn:hover { background: var(--soft); }
.client-btn[aria-current="true"] { background: var(--soft-2); }
.avatar { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font: 800 1.1rem/1 var(--head); color: #fff; background: var(--navy-3); }
.client-btn strong { display: block; font-size: .95rem; }
.client-btn span { color: var(--muted); font-size: .8rem; }
.client-btn .avatar { color: #fff; font-size: 1.1rem; }
.flag { color: var(--warn) !important; font-weight: 650; }
.editor-meal { display: grid; grid-template-columns: 130px 1fr 90px 90px 44px; gap: 8px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; background: #fff; }
.editor-meal label, .editor-ex label { margin: 0; font-size: .74rem; color: var(--muted); }
.editor-meal input, .editor-meal select, .editor-ex input { min-height: 40px; padding: .4em .6em; font-size: .92rem; border-radius: 10px; }
.editor-meal .full { grid-column: 2 / -1; }
.editor-ex { display: grid; grid-template-columns: 1fr 70px 90px 1fr 44px; gap: 8px; align-items: end; margin-bottom: 8px; }
.rm { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--line); background: #fff; cursor: pointer; color: var(--err); display: grid; place-items: center; align-self: end; }
.rm svg { width: 16px; height: 16px; }
.editor-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.empty { color: var(--muted); text-align: center; padding: 30px 10px; }

/* ===== Før og etter ===== */
.tf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.res-more { margin-top: 28px; }
.res-more:empty { display: none; }
.tf { background: #fff; color: var(--ink); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; margin: 0; }
.section--dark .tf { border-color: var(--navy-3); }
.tf__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.tf__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tf__stat { font: 800 2rem/1 var(--head); color: var(--accent-ink); }
.tf__tag { font-size: .75rem; font-weight: 700; background: var(--soft); border-radius: 999px; padding: .3em .75em; white-space: nowrap; }
.tf__sub { color: var(--muted); margin: 4px 0 10px; font-size: .92rem; }
.tf__quote { margin: 0 0 12px; color: var(--ink-2); flex: 1; }
.tf__name { margin: 0; font-weight: 700; font-size: .92rem; }
.tf__name span { color: var(--muted); font-weight: 400; }

/* Sammenlign før/etter med glider */
.ba { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--soft-2); user-select: none; touch-action: pan-y; }
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba--hideface::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 26%; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); background: rgba(255,255,255,.08); pointer-events: none; }
.ba__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); pointer-events: none; z-index: 2; }
.ba__knob { position: absolute; top: 50%; left: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; background: #fff; color: var(--navy); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.ba__knob svg { width: 20px; height: 20px; stroke-width: 2.4; }
.ba__tag { position: absolute; top: 12px; z-index: 3; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .35em .75em; border-radius: 999px; background: rgba(14,26,43,.78); color: #fff; pointer-events: none; }
.ba__tag--l { left: 12px; } .ba__tag--r { right: 12px; background: var(--accent); }
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 4; min-height: 0; padding: 0; border: 0; }
.ba__range:focus-visible + .ba__line, .ba:focus-within .ba__knob { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Egen side */
.tf-top { padding-bottom: 28px; }
.tf-top h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.tf-top__lead { color: #c7d2e1; max-width: 40em; margin: 8px 0 18px; }
.tf-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn { min-height: 40px; padding: .4em 1em; border-radius: 999px; border: 2px solid rgba(255,255,255,.3); background: transparent; color: #fff; font-weight: 650; cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.tf-grid--page { margin-bottom: 24px; }
.tf-cta { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.tf-cta h2 { margin: 0 0 .2em; font-size: 1.5rem; }
.tf-cta p { margin: 0; }

/* Coach: administrasjon */
.tf-switch { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.tf-switch h2 { font-size: 1.2rem; margin: 0 0 .2em; }
.tf-switch p { margin: 0; }
.switch-toggle { position: relative; display: inline-block; width: 58px; height: 32px; margin: 0; flex: none; cursor: pointer; }
.switch-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; min-height: 0; cursor: pointer; z-index: 1; }
.switch-toggle span { position: absolute; inset: 0; border-radius: 999px; background: #cfd6e0; transition: background .2s; }
.switch-toggle span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch-toggle input:checked + span { background: var(--ok); }
.switch-toggle input:checked + span::after { transform: translateX(26px); }
.switch-toggle input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tf-admin { display: grid; grid-template-columns: 170px 1fr; gap: 16px; }
.tf-admin__imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-self: start; }
.tf-admin__imgs img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; border-radius: 10px; background: var(--soft); }
.tf-admin h3 { font-size: 1.05rem; }
.tf-admin p { margin: 0 0 8px; }
.badge-c { display: inline-block; font-size: .75rem; font-weight: 700; padding: .2em .65em; border-radius: 999px; background: var(--soft); color: var(--ink-2); }
.badge-c--good { background: var(--ok-soft); color: var(--ok); }
.badge-c--warn { background: #fff1d6; color: var(--warn); }
.badge-c--bad { background: #fde3e0; color: var(--err); }
.switch-row, .check-row { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; color: var(--ink); margin: 6px 0 10px; cursor: pointer; }
.switch-row input, .check-row input { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 2px 0 0; accent-color: var(--ok); flex: none; }
.switch-row small { font-weight: 400; color: var(--muted); }
.switch-row.is-disabled { color: var(--muted); cursor: not-allowed; }
.check-row { font-weight: 500; }
.tf-up { display: grid; gap: 8px; align-content: start; }
.tf-up img, .tf-up__empty { aspect-ratio: 3 / 4; width: 100%; border-radius: 12px; object-fit: cover; background: var(--soft); }
.tf-up__empty { display: grid; place-items: center; color: var(--muted); font-size: .85rem; border: 2px dashed var(--line); }
.tf-up__btn { cursor: pointer; margin: 0; justify-self: start; }
.tf-up label:last-child { margin: 0; }
.tf-ask { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--accent-soft); border-color: #ffd2c2; }
.tf-ask strong { display: block; color: var(--accent-ink); }
.tf-ask span { color: #6b2a10; font-size: .93rem; }
@media (max-width: 1060px) { .tf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .tf-grid { grid-template-columns: 1fr; }
  .tf-admin { grid-template-columns: 1fr; }
  .tf-admin__imgs { max-width: 240px; }
  .tf-switch { align-items: flex-start; }
}

@media (max-width: 1500px) { .nav { gap: 18px; } .nav a[href="#faq-sec"] { display: none; } }
/* Mobil og nettbrett */
@media (max-width: 1060px) {
  .nav { gap: 16px; margin-left: 16px; }
  .nav a[href="#faq-sec"] { display: none; }
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .coach { grid-template-columns: 1fr; }
  .clients { position: static; display: flex; overflow-x: auto; gap: 6px; }
  .clients__head { display: none; }
  .client-btn { flex: none; width: auto; min-width: 200px; }
}
@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  .top__cta { display: none; }
  .login-btn { margin-left: auto; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; flex-direction: column; gap: 0; background: #fff; padding: 6px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a, .nav a[href="#faq-sec"] { display: block; padding: 13px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--soft); }
  .hero__in, .how, .showcase, .about { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
  .float-card--weight { left: 12px; bottom: 12px; }
  .float-card--plan { right: 12px; top: 12px; }
  .how__img { aspect-ratio: 16 / 10; }
  .packages, .results { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .footer__in { grid-template-columns: 1fr; }
  .footer { padding-bottom: 104px; }
  .mobile-bar { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(14, 26, 43, .97); }
  .editor-meal { grid-template-columns: 1fr 1fr; }
  .editor-meal .full, .editor-meal .name { grid-column: 1 / -1; }
  .editor-ex { grid-template-columns: 1fr 1fr; }
  .editor-ex .name, .editor-ex .note { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .login-btn span { display: none; }
  .login-btn { width: 44px; padding: 0; justify-content: center; }
  .hero__ctas .btn { width: 100%; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .totals { grid-template-columns: 1fr; }
  .meal { grid-template-columns: 1fr auto; }
  .meal__time { grid-column: 1 / -1; }
  .shop { columns: 1; }
  .msg { max-width: 90%; }
  .card { padding: 18px 16px; }
  .app-top__btns .btn { padding: .4em .7em; }
  .modal { padding: 0; place-items: end stretch; }
  .modal__panel { width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 22px 22px 0 0; }
  .modal__body { padding: 14px 16px 20px; }
  .modal__head { padding: 14px 10px 10px 16px; }
  .modal__foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
