/* Norico Opplæring - "night grid": deep ink-navy, electric volt, gold for what is won. */

@font-face {
  font-family: 'Fredoka';
  src: url('/fonts/fredoka.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0c1330;
  --bg-deep: #080d24;
  --surface: #131c3d;
  --surface-2: #1a2550;
  --line: #28356a;
  --text: #f4f6ff;
  --muted: #aab3d9;
  --faint: #8089b3;
  --ink: #0c1330;

  --volt: #c8f53c;
  --volt-deep: #86a91c;
  --gold: #ffc83d;
  --gold-deep: #c48d0a;
  --sky: #5cc8ff;
  --sky-deep: #2289c2;
  --coral: #ff7070;
  --coral-deep: #c24444;
  --coral-text: #ff9a9a;
  --mint: #3ddc97;
  --mint-deep: #1f9c66;
  --flame: #ff8a3d;
  --focus: #7ce0ff;

  --display: 'Fredoka', ui-rounded, 'Segoe UI', sans-serif;
  --body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --tabbar-h: 68px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  /* The offer's paper (the PDF the customer gets): the owner's light Norico palette, used only where the
     app shows that page (MISSION.md M-20261020-tilbudsmal section 5). */
  --paper: #ffffff;
  --paper-navy: #14285e;
  --paper-mist: #eef2f9;
  --paper-line: #d5dce8;
  --paper-body: #3e4b66;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(92, 200, 255, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(200, 245, 60, .07), transparent 60%),
    radial-gradient(circle at 1px 1px, rgba(170, 179, 217, .09) 1px, transparent 0) 0 0 / 26px 26px,
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--sky); }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
[tabindex="-1"]:focus { outline: none; }
.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; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.noscript { padding: 24px; text-align: center; }
.icon { flex: none; display: block; }
.eyebrow { font-family: var(--display); font-weight: 600; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--volt); --d: var(--volt-deep); --t: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px;
  border: 0; border-radius: var(--r);
  background: var(--b); color: var(--t);
  box-shadow: 0 5px 0 var(--d);
  font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: .01em;
  cursor: pointer; user-select: none;
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
  touch-action: manipulation;
  margin-bottom: 5px;
}
.btn:hover:not(:disabled) { filter: brightness(1.06); }
.btn:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 var(--d); }
.btn:disabled { --b: #26305a; --d: #1a2247; --t: #8a93bd; cursor: not-allowed; }
.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 58px; font-size: 1.15rem; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: .95rem; border-radius: var(--r-sm); }
.btn-secondary { --b: var(--surface-2); --d: #0e1636; --t: var(--text); box-shadow: 0 5px 0 var(--d), inset 0 0 0 2px var(--line); }
.btn-secondary:active:not(:disabled) { box-shadow: 0 0 0 var(--d), inset 0 0 0 2px var(--line); }
.btn-sky { --b: var(--sky); --d: var(--sky-deep); }
.btn-gold { --b: var(--gold); --d: var(--gold-deep); }
.btn-ok { --b: var(--mint); --d: var(--mint-deep); }
.btn-bad { --b: var(--coral); --d: var(--coral-deep); }
.btn-quiet, .btn-quiet-bad { --b: transparent; --d: transparent; --t: var(--muted); box-shadow: none; }
.btn-quiet-bad { --t: var(--coral-text); }
.btn-quiet:hover, .btn-quiet-bad:hover { background: rgba(255, 255, 255, .05); }
.btn-ghost-dark { --b: rgba(12, 19, 48, .88); --d: rgba(12, 19, 48, .5); --t: #fff; }
.link-btn { background: none; border: 0; padding: 10px 4px; min-height: 44px; color: var(--sky); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:disabled { opacity: .6; }
.link { color: var(--sky); font-weight: 600; font-size: .9rem; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); border-radius: 12px; cursor: pointer; }
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, .06); }

/* ---------- Pills, cards, states ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill-gold { background: rgba(255, 200, 61, .16); color: var(--gold); }
.pill-sky { background: rgba(92, 200, 255, .16); color: var(--sky); }
.pill-mint { background: rgba(61, 220, 151, .15); color: var(--mint); }
.pill-muted { background: rgba(170, 179, 217, .12); color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 12px; }
.card h2 { font-size: 1.25rem; }
.state-card { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 28px 16px; }
.state-card h1 { font-size: 1.6rem; }
.state-card p { color: var(--muted); max-width: 32ch; }
.loading { display: grid; place-items: center; padding: 40px; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--volt); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px; }
.form-error { color: var(--coral-text); font-weight: 600; font-size: .95rem; }
.form-ok { color: var(--mint); font-weight: 600; font-size: .95rem; }
.form-ok:empty, .form-error:empty { display: none; }
.offline-bar { position: sticky; top: 0; z-index: 60; padding: 8px 16px calc(8px); padding-top: calc(8px + env(safe-area-inset-top)); background: #5a2130; color: #fff; text-align: center; font-weight: 600; font-size: .9rem; }

/* ---------- Forms ---------- */
.stack { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field.grow { flex: 1; }
.field-label { font-weight: 700; font-size: .95rem; }
.field-hint { color: var(--muted); font-size: .85rem; }
.input {
  width: 100%; min-height: 54px; padding: 0 16px;
  background: var(--bg-deep); color: var(--text);
  border: 2px solid var(--line); border-radius: var(--r);
  font: inherit; font-size: 1.05rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(92, 200, 255, .2); }
.input[aria-invalid="true"] { border-color: var(--coral); }

/* ---------- Auth ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 0; padding: 32px 20px calc(32px + env(safe-area-inset-bottom)); }
.auth-hero { position: relative; display: grid; place-items: center; margin-bottom: -18px; z-index: 1; }
.auth-glow { position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(200, 245, 60, .35), transparent 65%); filter: blur(8px); }
.auth-card { position: relative; width: min(100%, 440px); background: var(--surface); border: 1px solid var(--line); border-radius: 30px; padding: 34px 24px 26px; display: grid; gap: 16px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6); }
.auth-card.wide { width: min(100%, 560px); }
.wordmark { font-family: var(--display); font-weight: 500; font-size: .95rem; color: var(--muted); text-align: center; letter-spacing: .02em; }
.wordmark span { color: var(--volt); font-weight: 700; }
.auth-title { font-size: clamp(1.7rem, 6.5vw, 2.2rem); text-align: center; }
.auth-title .hl { color: var(--volt); }
.auth-lead { color: var(--muted); text-align: center; }
.auth-email { text-align: center; font-family: var(--display); font-weight: 600; font-size: 1.25rem; background: var(--bg-deep); padding: 12px; border-radius: var(--r); word-break: break-all; }
.auth-foot { text-align: center; color: var(--faint); font-size: .9rem; }
.auth-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.code-fieldset { border: 0; padding: 0; margin: 0; }
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-box {
  width: 100%; aspect-ratio: 4 / 5; min-height: 54px; text-align: center;
  font-family: var(--display); font-size: 1.8rem; font-weight: 600;
  background: var(--bg-deep); color: var(--text);
  border: 2px solid var(--line); border-radius: 14px; caret-color: var(--volt);
}
.code-box:focus { outline: none; border-color: var(--volt); box-shadow: 0 0 0 4px rgba(200, 245, 60, .2); }
.code-fieldset:disabled .code-box { opacity: .6; }
.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.auth-register { align-content: start; padding-top: 24px; }
.privacy { background: var(--bg-deep); border-radius: var(--r); padding: 18px; display: grid; gap: 8px; font-size: .95rem; }
.privacy h3 { font-size: 1.02rem; color: var(--volt); margin-top: 6px; }
.privacy h3:first-of-type { margin-top: 0; }
.privacy p { color: #d5daf2; }
.sticky-action { position: sticky; bottom: 0; padding: 12px 0 calc(4px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--surface) 30%); }
.float { animation: float 3.6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-2deg); } }

/* ---------- Shell ---------- */
.shell { min-height: 100dvh; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--volt); color: var(--ink); padding: 10px 16px; border-radius: 12px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(12, 19, 48, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(40, 53, 106, .6);
}
.stats { display: flex; justify-content: space-between; gap: 12px; max-width: 600px; margin: 0 auto; }
.stat { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 14px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--text); }
.stat:hover { background: rgba(255, 255, 255, .05); }
.stat.streak.hot { color: var(--flame); }
.stat.streak.cold { color: var(--faint); }
.stat.streak.hot .icon { filter: drop-shadow(0 0 8px rgba(255, 138, 61, .55)); }
.stat.xp { color: var(--gold); }
.content { max-width: 640px; margin: 0 auto; padding: 16px 16px 32px; outline: none; }
.rail { display: none; }
.tabbar {
  position: fixed; inset: auto 0 0; z-index: 30;
  display: flex; justify-content: space-around;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 6px 6px env(safe-area-inset-bottom);
  background: rgba(10, 16, 42, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tab { flex: 1; display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 56px; border-radius: 14px; color: var(--faint); text-decoration: none; font-size: .75rem; font-weight: 700; transition: color .15s ease; }
.tab-icon { position: relative; display: grid; place-items: center; width: 52px; height: 32px; border-radius: 12px; transition: background .2s ease, transform .2s var(--ease-spring); }
.tab.active { color: var(--volt); }
.tab.active .tab-icon { background: rgba(200, 245, 60, .14); transform: translateY(-1px); }
.dot { position: absolute; top: 2px; inset-inline-end: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px var(--bg-deep); }

@media (min-width: 1024px) {
  .shell {
    display: grid; padding-bottom: 0;
    grid-template-columns: 250px minmax(0, 1fr) 340px;
    grid-template-rows: auto 1fr;
    grid-template-areas: "side main top" "side main rail";
    column-gap: 28px;
    padding-inline-end: 24px;
  }
  .sidebar {
    grid-area: side; display: flex; flex-direction: column; gap: 22px;
    position: sticky; top: 0; height: 100dvh; padding: 26px 14px;
    border-inline-end: 1px solid var(--line); background: rgba(8, 13, 36, .55);
  }
  .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; text-decoration: none; color: var(--text); font-family: var(--display); font-size: 1.2rem; }
  .brand b { color: var(--volt); font-weight: 700; }
  .sidebar ul { display: grid; gap: 6px; }
  .side-link {
    display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 14px;
    border-radius: 16px; border: 2px solid transparent;
    color: var(--muted); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.1rem; letter-spacing: .02em;
  }
  .side-link:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
  .side-link.active { color: var(--volt); background: rgba(200, 245, 60, .08); border-color: rgba(200, 245, 60, .45); }
  .badge { margin-inline-start: auto; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--coral); color: var(--ink); font-size: .85rem; display: grid; place-items: center; font-family: var(--body); font-weight: 800; }
  .topbar { grid-area: top; position: sticky; top: 0; background: none; backdrop-filter: none; border: 0; padding: 20px 0 0; }
  .content { grid-area: main; width: 100%; max-width: 620px; padding: 28px 8px 60px; }
  .rail { grid-area: rail; display: block; }
  .rail-inner { position: sticky; top: 90px; display: grid; gap: 16px; padding-bottom: 24px; }
  .tabbar { display: none; }
}
@media (min-width: 1024px) and (max-width: 1180px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr) 300px; column-gap: 20px; }
}

/* Rail cards */
.rail-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: grid; gap: 10px; }
.rail-card h2 { font-size: 1.15rem; }
.rail-card-head { display: flex; justify-content: space-between; align-items: baseline; }
.streak-card { text-align: center; justify-items: center; }
.streak-big { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 3rem; line-height: 1; }
.streak-card.hot .streak-big { color: var(--flame); }
.streak-card.cold .streak-big { color: var(--faint); }
.streak-card p { color: var(--muted); font-size: .95rem; }
.mini-league li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; }
.mini-league li.me { background: rgba(200, 245, 60, .1); box-shadow: inset 0 0 0 2px rgba(200, 245, 60, .5); }
.mini-league .rank { font-family: var(--display); font-weight: 700; color: var(--muted); }
.mini-league .xp { color: var(--gold); font-weight: 700; font-size: .9rem; }

/* ---------- Path ---------- */
.path-screen { display: grid; gap: 20px; }

.block { display: grid; gap: 18px; margin-top: 10px; }
.block-head { display: grid; gap: 4px; justify-items: start; padding: 0 4px; }
.block-head h2 { font-size: 1.5rem; }
.block-head p { color: var(--muted); font-weight: 600; }

.unit { --c: var(--volt); --cd: var(--volt-deep); display: grid; gap: 8px; }
.theme-sky { --c: var(--sky); --cd: var(--sky-deep); }
.theme-coral { --c: var(--coral); --cd: var(--coral-deep); }
.theme-gold { --c: var(--gold); --cd: var(--gold-deep); }
.unit-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 18px; border-radius: var(--r-lg);
  background: var(--c); color: var(--ink);
  box-shadow: 0 6px 0 var(--cd);
  margin-bottom: 6px;
}
.unit-banner h3 { font-size: 1.2rem; }
.unit-banner .btn { flex: none; margin-bottom: 4px; }
.unit-banner.locked { background: var(--surface); color: var(--faint); box-shadow: none; border: 2px dashed var(--line); }
.unit-banner.locked h3 { color: var(--muted); }
.unit-goal { margin-top: 6px; font-size: .9rem; line-height: 1.35; font-weight: 500; }
.unit-goal strong { font-weight: 700; }
.unit-banner.locked .unit-goal { color: var(--muted); }
.lock-badge { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); color: var(--faint); }
.lock-badge.done { background: rgba(12, 19, 48, .88); color: var(--gold); }

.trail { position: relative; margin: 52px 0 18px; }
.trail-line { position: absolute; top: 0; left: 50%; width: 320px; height: 100%; margin-left: -160px; overflow: visible; }
.wire { fill: none; stroke: var(--line); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 2 18; }
.wire.lit { stroke: var(--c); stroke-dasharray: none; stroke-width: 8; opacity: .55; filter: drop-shadow(0 0 6px var(--c)); }
.nodes { position: absolute; inset: 0; }
.node-wrap { position: absolute; left: calc(50% + var(--x)); width: 76px; margin-left: -38px; display: grid; justify-items: center; }
.node-wrap.is-checkpoint { width: 88px; margin-left: -44px; }
.node-wrap:has(.node-pop) { z-index: 10; }
.node {
  position: relative; width: 76px; height: 70px; border-radius: 50%;
  border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--c); color: var(--ink);
  box-shadow: 0 8px 0 var(--cd), inset 0 -4px 0 rgba(0, 0, 0, .08);
  transition: transform .1s ease, box-shadow .1s ease;
}
.is-checkpoint .node { width: 88px; height: 80px; border-radius: 28px; }
.node:active { transform: translateY(6px); box-shadow: 0 2px 0 var(--cd); }
.node.done { background: var(--gold); box-shadow: 0 8px 0 var(--gold-deep), inset 0 -4px 0 rgba(0, 0, 0, .08); }
.node.done::after { content: ''; position: absolute; inset: -6px; border-radius: inherit; box-shadow: 0 0 22px rgba(255, 200, 61, .35); pointer-events: none; }
.node.locked { background: #242e5a; color: #6f79a6; box-shadow: 0 8px 0 #161e44; }
.node.current::before {
  content: ''; position: absolute; inset: -10px; border-radius: inherit;
  border: 4px solid var(--c); opacity: .6; animation: ring 1.8s var(--ease-out) infinite;
}
@keyframes ring { 0% { transform: scale(.9); opacity: .8; } 100% { transform: scale(1.25); opacity: 0; } }
.start-bubble {
  position: absolute; bottom: calc(100% + 12px); padding: 6px 14px; border-radius: 12px;
  background: #fff; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap; animation: bob 1.6s ease-in-out infinite; pointer-events: none;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .25);
}
.start-bubble::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -7px; border: 7px solid transparent; border-top-color: #fff; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.node-pop {
  position: absolute; top: calc(100% + 16px); left: calc(38px - var(--x)); z-index: 6;
  width: min(320px, calc(100vw - 40px)); transform: translateX(-50%);
  padding: 18px 18px 14px; border-radius: 22px; background: var(--c); color: var(--ink);
  display: grid; gap: 10px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6);
  animation: popIn .22s var(--ease-spring);
  scroll-margin-bottom: calc(var(--tabbar-h) + 24px);
}
.is-checkpoint .node-pop { left: calc(44px - var(--x)); }
.node-pop.done { background: var(--gold); }
.node-pop.locked { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.node-pop h4 { font-size: 1.15rem; padding-inline-end: 36px; }
.node-pop p { font-weight: 600; opacity: .9; }
.node-pop .btn { --b: #fff; --d: rgba(12, 19, 48, .35); --t: var(--ink); }
.pop-close { position: absolute; top: 6px; inset-inline-end: 6px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; border-radius: 12px; cursor: pointer; color: inherit; opacity: .75; }
@keyframes popIn { from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(.96); } }
.path-end { display: grid; place-items: center; padding: 10px 0 20px; opacity: .6; }

/* ---------- Screens ---------- */
.screen { display: grid; gap: 20px; }
.screen-title { font-size: clamp(1.8rem, 6vw, 2.3rem); }
.review-hero { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 28px 20px; border-radius: 30px; background: var(--surface); border: 1px solid var(--line); }
.review-hero.has-due { background: linear-gradient(160deg, rgba(92, 200, 255, .2), rgba(19, 28, 61, 1) 60%); border-color: rgba(92, 200, 255, .45); }
.review-hero h2 { font-size: 1.5rem; }
.review-hero p { color: var(--muted); max-width: 38ch; }
.how-list { display: grid; gap: 10px; }
.how-list li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: rgba(19, 28, 61, .6); border: 1px solid var(--line); }
.how-no { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--sky); font-family: var(--display); font-weight: 700; }
.how-list p { color: #d5daf2; font-size: .95rem; }

.league-head { display: flex; gap: 16px; align-items: center; padding: 22px; border-radius: 30px; background: linear-gradient(135deg, rgba(255, 200, 61, .22), rgba(19, 28, 61, .9) 70%); border: 1px solid rgba(255, 200, 61, .35); }
.league-badge { flex: none; width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; background: var(--gold); color: var(--ink); box-shadow: 0 6px 0 var(--gold-deep); transform: rotate(-6deg); }
.league-meta { color: #e8dcc0; font-weight: 600; font-size: .92rem; }
.league-note { color: var(--muted); font-size: .95rem; }
.league-list { display: grid; gap: 8px; }
.league-row { display: grid; grid-template-columns: 34px 44px 1fr auto; gap: 12px; align-items: center; min-height: 64px; padding: 8px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.league-row .rank { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--muted); text-align: center; }
.league-row.top-1 .rank { color: var(--gold); }
.league-row.top-2 .rank { color: #d9e1ff; }
.league-row.top-3 .rank { color: #f0a36b; }
.league-row .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.league-row .you { color: var(--volt); font-weight: 600; }
.league-row .xp { font-family: var(--display); font-weight: 600; color: var(--gold); }
.league-row.me { background: rgba(200, 245, 60, .1); border: 2px solid var(--volt); box-shadow: 0 0 24px -6px rgba(200, 245, 60, .45); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--sky); font-family: var(--display); font-weight: 700; flex: none; }
.avatar.big { width: 72px; height: 72px; font-size: 1.6rem; background: var(--volt); color: var(--ink); box-shadow: 0 5px 0 var(--volt-deep); }

.profile-head { display: flex; gap: 16px; align-items: center; }
.profile-head p { overflow-wrap: anywhere; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { display: grid; justify-items: start; gap: 2px; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.tile strong { font-family: var(--display); font-size: 1.6rem; line-height: 1.1; }
.tile span { color: var(--muted); font-size: .82rem; font-weight: 600; }
.tile.streak .icon { color: var(--flame); }
.tile.xp .icon { color: var(--gold); }
.tile.week .icon { color: var(--sky); }
/* Mastery per unit (public/js/mastery.js): the seller's page and the leaders' view of a seller. */
.unit-mastery { display: grid; gap: 8px; }
.um-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 10px; width: 100%; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-deep); border: 1px solid var(--line); color: inherit; font: inherit; text-align: start; }
button.um-row { min-height: 44px; cursor: pointer; }
div.um-row { padding-inline-end: 32px; } /* + the empty chevron track's 10px gap: lines up with the rows that have one */
button.um-row:hover { border-color: var(--sky-deep); }
.um-head { grid-column: 1; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 700; }
.um-title { min-width: 0; overflow-wrap: anywhere; }
.um-title .pill { vertical-align: 2px; }
.um-row .bar { grid-column: 1; }
.um-chevron { grid-column: 2; grid-row: 1 / span 2; color: var(--muted); transition: transform .2s var(--ease-out); }
[aria-expanded="true"] > .um-chevron { transform: rotate(180deg); }
.um-topics { padding: 6px 12px 8px; }
.bar-val.none { font-family: var(--body); font-size: .85rem; font-weight: 600; color: var(--faint); }
.weak { display: grid; gap: 8px; }
.weak-list { display: grid; gap: 6px; }
.weak-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--bg-deep); }
.weak-name { display: grid; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.weak-val { display: grid; justify-items: end; flex: none; text-align: end; }
.weak-pct { font-family: var(--display); font-size: 1.15rem; line-height: 1.2; }
.weak-pct.low { color: var(--coral-text); }
.weak-pct.mid { color: var(--gold); }
.weak-pct.high { color: var(--mint); }
.bars { display: grid; gap: 12px; }
.bars.compact { gap: 8px; }
.bar-label { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
.bar-val { font-family: var(--display); color: var(--muted); white-space: nowrap; }
.bar { display: block; height: 14px; border-radius: 7px; background: var(--bg-deep); overflow: hidden; border: 1px solid var(--line); }
.bar span { display: block; height: 100%; border-radius: 7px; min-width: 2px; transition: width .8s var(--ease-out); }
.bar .low { background: var(--coral); }
.bar .mid { background: var(--gold); }
.bar .high { background: var(--mint); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-top: 1px solid var(--line); }
.toggle-row label { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.switch { position: relative; width: 60px; height: 44px; border: 0; background: none; cursor: pointer; padding: 0; }
.switch::before { content: ''; position: absolute; left: 4px; right: 4px; top: 8px; bottom: 8px; border-radius: 14px; background: var(--line); transition: background .2s ease; }
.switch .knob { position: absolute; top: 11px; inset-inline-start: 7px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease-spring); }
.switch.on::before { background: var(--mint); }
.switch.on .knob { transform: translateX(24px); }
.switch[aria-busy="true"] { opacity: .7; }
.push-box { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.push-status { font-weight: 600; font-size: .95rem; }
.push-status:empty { display: none; }
.push-status.ok { color: var(--mint); }
.push-status.error { color: var(--coral-text); }
.push-status.busy { color: var(--muted); }

/* The app on the phone: Home screen steps and notifications (public/js/phone.js) */
.phone-offer { width: 100%; max-width: 440px; }
.phone-offer > p { max-width: 36ch; }
.phone-setup { display: grid; gap: 12px; width: 100%; text-align: start; }
.phone-setup p { max-width: none; }
.setup-lead { color: var(--text); font-weight: 600; }
.setup-steps { list-style: none; counter-reset: step; display: grid; gap: 8px; margin: 0; padding: 0; }
.setup-steps li {
  counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start;
  padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg-deep); color: #d5daf2; line-height: 1.45;
}
.setup-steps li::before {
  content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--sky); color: var(--ink); font-family: var(--display); font-weight: 700;
}
.setup-steps li:only-child { grid-template-columns: 1fr; }
.setup-steps li:only-child::before { content: none; }
.setup-steps .icon { display: inline-block; vertical-align: -4px; color: var(--sky); }
.setup-note { font-size: .85rem; color: var(--faint); }
.setup-home { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.setup-title { font-size: 1.05rem; }
.phone-card { position: relative; padding-inline-end: 52px; }
.phone-card-close { position: absolute; top: 6px; inset-inline-end: 6px; }
.phone-card .phone-setup { grid-column: 1 / -1; }

/* Team */
.team-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.team-sum div { display: grid; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.team-sum strong { font-family: var(--display); font-size: 1.7rem; line-height: 1.1; color: var(--volt); }
.team-sum span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.invite-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.invite-row .field.grow { flex: 1 1 240px; }
.invite-row .btn { min-height: 54px; flex: 1 0 auto; }
.members { display: grid; gap: 14px; }
.member { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: grid; gap: 14px; }
.member.invited { border-style: dashed; }
.member-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.member-top h2 { font-size: 1.15rem; }
.member-id { min-width: 0; }
.pills { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
@media (min-width: 560px) { .member-top { grid-template-columns: auto minmax(0, 1fr) auto; } .pills { grid-column: auto; } }
.member-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; }
@media (min-width: 560px) { .member-facts { grid-template-columns: repeat(3, 1fr); } }
.member-facts div { background: var(--bg-deep); border-radius: var(--r-sm); padding: 8px 12px; }
.member-facts dt { color: var(--muted); font-size: .78rem; font-weight: 700; }
.member-facts dd { margin: 0; font-weight: 700; }
.member-facts dd.yes { color: var(--mint); }
.activity { display: grid; gap: 6px; }
.activity-title { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 700; }
.grid14 { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; }
.cell { display: grid; justify-items: center; gap: 2px; }
.cell::before { content: ''; width: 100%; aspect-ratio: 1; border-radius: 5px; background: var(--bg-deep); border: 1px solid var(--line); }
.cell.l1::before { background: rgba(200, 245, 60, .35); border-color: transparent; }
.cell.l2::before { background: rgba(200, 245, 60, .65); border-color: transparent; }
.cell.l3::before { background: var(--volt); border-color: transparent; }
.cell .wd { font-size: .62rem; color: var(--faint); font-weight: 700; text-transform: uppercase; }
.more { justify-self: start; padding-inline-start: 0; }
.member-more { display: grid; gap: 10px; }
.small-title { font-size: .95rem; color: var(--muted); }
.member-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
.member-actions .btn { margin-bottom: 5px; }
.confirm { display: grid; gap: 10px; width: 100%; padding: 12px 14px; border-radius: var(--r-sm); background: rgba(255, 112, 112, .1); border: 1px solid rgba(255, 112, 112, .4); }
.confirm-row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Player ---------- */
.player-page { min-height: 100dvh; display: flex; flex-direction: column; outline: none; }
.player-head, .player-body, .foot-inner, .foot-action { width: 100%; max-width: 680px; margin-inline: auto; }
.player-page.center { justify-content: center; align-items: center; gap: 16px; padding: 24px; }
.player-head { display: flex; align-items: center; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 12px 8px; }
.progress { flex: 1; height: 18px; border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.progress-fill { position: relative; height: 100%; border-radius: 9px; background: var(--volt); transition: width .5s var(--ease-out); }
.progress-shine { position: absolute; left: 10px; right: 10px; top: 4px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .45); }
.kind-review .progress-fill { background: var(--sky); }
.kind-checkpoint .progress-fill { background: var(--gold); }
.player-count { min-width: 44px; text-align: center; font-family: var(--display); font-weight: 700; color: var(--muted); display: grid; place-items: center; }
.player-count .icon { color: var(--volt); }
.player-body { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 14px 18px 24px; animation: slideIn .35s var(--ease-out); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } }
.player-kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-family: var(--display); font-weight: 600; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; }
.learn-card { margin: 4px 0 18px; padding: 14px 16px; border-radius: var(--r-lg); background: rgba(92, 200, 255, .12); border: 2px solid rgba(92, 200, 255, .45); }
.learn-card:focus { outline: none; }
.learn-card:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.learn-tag { display: flex; align-items: center; gap: 6px; color: var(--sky); font-family: var(--display); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.learn-text { margin-top: 6px; font-size: 1.05rem; line-height: 1.45; }
.again-tag { text-transform: none; letter-spacing: 0; padding: 3px 10px; border-radius: 99px; background: rgba(255, 138, 61, .16); color: #ffb88a; font-size: .85rem; }
.prompt { font-size: clamp(1.4rem, 5vw, 1.75rem); font-weight: 600; outline: none; }
.prompt.small { font-size: 1.2rem; }
.prompt-label { color: var(--muted); font-weight: 600; font-size: .95rem; }
.statement { padding: 22px 20px; border-radius: var(--r-lg); background: var(--surface); border: 2px solid var(--line); }

.options { display: grid; gap: 12px; }
.option {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 12px 16px;
  text-align: start; cursor: pointer;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r);
  box-shadow: 0 4px 0 #0a1029; font-size: 1.05rem; font-weight: 600;
  transition: transform .08s ease, border-color .15s ease, background .15s ease;
}
.option:hover:not(:disabled) { border-color: #3b4a88; background: #17214a; }
.option:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #0a1029; }
.option .key, .tf .key { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; border: 2px solid var(--line); color: var(--muted); font-size: .85rem; font-weight: 800; }
.option.picked { border-color: var(--sky); background: rgba(92, 200, 255, .12); box-shadow: 0 4px 0 var(--sky-deep); }
.option.picked .key { border-color: var(--sky); color: var(--sky); }
.option.right { border-color: var(--mint); background: rgba(61, 220, 151, .14); box-shadow: 0 4px 0 var(--mint-deep); }
.option.wrong { border-color: var(--coral); background: rgba(255, 112, 112, .12); box-shadow: 0 4px 0 var(--coral-deep); }
.option.dim { opacity: .55; }
.option:disabled { cursor: default; color: var(--text); }
@media (hover: none) { .option .key, .tf .key { display: none; } }
.options.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.options.chips .option { width: auto; min-height: 52px; padding: 8px 18px; }
.options.chips .key { display: none; }

.scenario { display: grid; gap: 18px; }
.customer { display: flex; gap: 12px; align-items: flex-start; }
.customer-avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, var(--sky), #6f7dff); color: var(--ink); margin-top: 22px; }
.speech { position: relative; margin: 0; flex: 1; }
.speech figcaption { font-family: var(--display); font-weight: 600; color: var(--sky); font-size: .95rem; margin-bottom: 6px; }
.speech blockquote { position: relative; margin: 0; padding: 16px 18px; border-radius: 6px 22px 22px 22px; background: #fff; color: var(--ink); font-size: 1.15rem; font-weight: 600; line-height: 1.4; }
.speech blockquote::before { content: ''; position: absolute; left: -9px; top: 0; border-top: 14px solid #fff; border-left: 12px solid transparent; }
.options.replies .option { border-radius: 22px 22px 6px 22px; }

.gap-text { line-height: 1.6; }
.slot { display: inline-block; min-width: 5.5em; margin: 0 4px; padding: 0 10px; border-bottom: 3px dashed var(--muted); text-align: center; color: var(--sky); }
.slot.filled { border-bottom-style: solid; border-color: var(--sky); animation: popIn2 .25s var(--ease-spring); }
@keyframes popIn2 { from { transform: scale(.8); } }

.tf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tf {
  display: grid; justify-items: center; gap: 6px; min-height: 120px; padding: 16px; cursor: pointer; position: relative;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 5px 0 #0a1029;
  font-family: var(--display); font-weight: 600; font-size: 1.3rem;
}
.tf .key { position: absolute; top: 10px; inset-inline-end: 10px; }
.tf-true .icon { color: var(--mint); }
.tf-false .icon { color: var(--coral); }
.tf:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #0a1029; }
.tf.picked { border-color: var(--sky); background: rgba(92, 200, 255, .12); box-shadow: 0 5px 0 var(--sky-deep); }
.tf.right { border-color: var(--mint); background: rgba(61, 220, 151, .14); box-shadow: 0 5px 0 var(--mint-deep); }
.tf.wrong { border-color: var(--coral); background: rgba(255, 112, 112, .12); box-shadow: 0 5px 0 var(--coral-deep); }
.tf.dim { opacity: .55; }
.tf:disabled { cursor: default; color: var(--text); }

.order-line { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-lg); background: rgba(8, 13, 36, .6); border: 2px dashed var(--line); }
.order-line.right { border-color: var(--mint); border-style: solid; }
.order-line.wrong { border-color: var(--coral); border-style: solid; }
.order-slot { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.order-no { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 800; font-size: .85rem; }
.order-slot.empty::after { content: ''; flex: 1; height: 48px; border-radius: 14px; background: rgba(255, 255, 255, .03); }
.bank { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  min-height: 50px; padding: 8px 16px; border-radius: 14px; cursor: pointer; text-align: start;
  background: var(--surface); border: 2px solid var(--line); box-shadow: 0 4px 0 #0a1029; font-weight: 700; font-size: 1rem;
  transition: transform .08s ease, opacity .15s ease;
}
.chip:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #0a1029; }
.chip.placed { flex: 1; border-color: var(--sky); background: rgba(92, 200, 255, .1); animation: popIn2 .2s var(--ease-spring); }
.chip.used { opacity: .25; box-shadow: none; }
.chip:disabled { cursor: default; color: var(--text); }

.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match-col { display: grid; gap: 10px; align-content: start; }
.match-item {
  position: relative; min-height: 64px; padding: 10px 12px; border-radius: var(--r); cursor: pointer;
  background: var(--surface); border: 2px solid var(--line); box-shadow: 0 4px 0 #0a1029;
  font-weight: 700; font-size: .98rem; line-height: 1.25; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.match-item:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #0a1029; }
.match-item.selected { border-color: var(--volt); background: rgba(200, 245, 60, .12); box-shadow: 0 4px 0 var(--volt-deep); }
.match-item.paired { --pc: var(--sky); border-color: var(--pc); background: color-mix(in srgb, var(--pc) 14%, var(--surface)); }
.match-item.p1 { --pc: var(--gold); }
.match-item.p2 { --pc: #ff8fb0; }
.match-item.p3 { --pc: var(--mint); }
.pair-tag { position: absolute; top: -8px; inset-inline-start: -6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--pc); color: var(--ink); font-size: .8rem; font-weight: 800; }
.match-item.right { box-shadow: 0 4px 0 var(--mint-deep); border-color: var(--mint); }
.match-item.wrong { box-shadow: 0 4px 0 var(--coral-deep); border-color: var(--coral); }
.match-item:disabled { cursor: default; color: var(--text); }

.player-foot { position: sticky; bottom: 0; z-index: 10; border-top: 2px solid var(--line); background: rgba(12, 19, 48, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .2s ease; }
.player-foot.ok { background: #0e3326; border-top-color: rgba(61, 220, 151, .5); }
.player-foot.bad { background: #3a1523; border-top-color: rgba(255, 112, 112, .5); }
.foot-inner { padding: 0 18px; }
.foot-action { padding: 14px 18px calc(12px + env(safe-area-inset-bottom)); }
.feedback { display: flex; gap: 14px; align-items: flex-start; padding-top: 18px; animation: sheetUp .28s var(--ease-out); }
@keyframes sheetUp { from { opacity: 0; transform: translateY(18px); } }
.fb-badge { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #fff; }
.feedback.ok .fb-badge { color: var(--mint-deep); }
.feedback.bad .fb-badge { color: var(--coral-deep); }
.fb-text { display: grid; gap: 6px; min-width: 0; }
.fb-text h2 { font-size: 1.5rem; }
.feedback.ok h2 { color: var(--mint); }
.feedback.bad h2 { color: var(--coral-text); font-size: 1.2rem; }
/* An answer kept on the device while the network is gone: calm, not an error. */
.feedback.kept h2 { color: var(--sky); font-size: 1.2rem; }
.feedback.kept p { color: var(--muted); }
.fb-answer { font-weight: 700; font-size: 1.08rem; color: #fff; }
.fb-answer strong { color: #ffd2d2; text-decoration: underline; text-underline-offset: 3px; }
.fb-list { display: grid; gap: 2px; padding-inline-start: 20px; list-style: decimal; font-weight: 700; color: #fff; }
.fb-list.pairs { list-style: none; padding-inline-start: 0; }
.pair-arrow::before { content: ' \2192 '; }
.fb-explain { color: #ffd9d9; font-size: .98rem; }
.feedback.ok .fb-explain { color: #d3f5e5; }
.foot-inner { max-height: 50vh; overflow-y: auto; }
.fb-note { color: #ffb88a; font-size: .9rem; font-weight: 700; }

/* ---------- Results ---------- */
.result-page { position: relative; min-height: 100dvh; display: grid; place-items: center; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); overflow: hidden; outline: none; }
.result-inner { position: relative; z-index: 2; width: min(100%, 460px); display: grid; justify-items: center; gap: 16px; text-align: center; }
.result-hero { position: relative; display: grid; place-items: center; width: 220px; height: 200px; }
.hero-ring { position: absolute; width: 210px; height: 210px; border-radius: 50%; background: conic-gradient(from 0deg, rgba(200, 245, 60, .45), rgba(92, 200, 255, .3), rgba(255, 200, 61, .45), rgba(200, 245, 60, .45)); filter: blur(24px); animation: spin 8s linear infinite; }
.retry .hero-ring { background: radial-gradient(circle, rgba(92, 200, 255, .3), transparent 70%); animation: none; }
.pop-in { position: relative; animation: popBig .7s var(--ease-spring) both; }
@keyframes popBig { 0% { transform: scale(.3) rotate(-18deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.result-title { font-size: clamp(1.9rem, 7vw, 2.5rem); outline: none; }
.celebrate .result-title { color: var(--volt); }
.result-sub { color: var(--muted); max-width: 34ch; }
.xp-burst { display: grid; justify-items: center; gap: 8px; }
.xp-big { font-family: var(--display); font-weight: 700; font-size: 3.6rem; line-height: 1; color: var(--gold); text-shadow: 0 0 30px rgba(255, 200, 61, .45); font-variant-numeric: tabular-nums; }
.xp-big small { font-size: 1.6rem; }
.xp-parts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.xp-parts li { padding: 4px 12px; border-radius: 99px; background: var(--surface-2); font-weight: 700; font-size: .9rem; animation: popIn2 .4s .5s var(--ease-spring) both; }
.xp-parts li.gold { background: rgba(255, 200, 61, .18); color: var(--gold); animation-delay: .75s; }
.xp-zero { font-weight: 700; color: var(--muted); padding: 10px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.rstat { display: grid; border-radius: var(--r); overflow: hidden; border: 2px solid var(--c); animation: popIn2 .45s var(--ease-spring) both; }
.rstat.xp { --c: var(--gold); animation-delay: .2s; }
.rstat.streak { --c: var(--flame); animation-delay: .32s; }
.rstat.acc { --c: var(--mint); animation-delay: .44s; }
.rstat-label { background: var(--c); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; padding: 4px; }
.rstat-val { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 12px 4px; font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: var(--c); background: var(--surface); }
.result-note { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #ffc7a1; }
.result-note .icon { color: var(--flame); }
.result-note.gold { color: var(--gold); }
.result-note.gold .icon { color: var(--gold); }
.result-actions { width: 100%; display: grid; gap: 6px; margin-top: 8px; }
.score-dots { display: flex; gap: 6px; }
.score-dots span { width: 18px; height: 18px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--line); animation: popIn2 .3s var(--ease-spring) both; }
.score-dots span.hit { background: var(--gold); border-color: var(--gold-deep); }
.score-dots span:nth-child(2) { animation-delay: .05s; } .score-dots span:nth-child(3) { animation-delay: .1s; } .score-dots span:nth-child(4) { animation-delay: .15s; } .score-dots span:nth-child(5) { animation-delay: .2s; }
.score-dots span:nth-child(6) { animation-delay: .25s; } .score-dots span:nth-child(7) { animation-delay: .3s; } .score-dots span:nth-child(8) { animation-delay: .35s; } .score-dots span:nth-child(9) { animation-delay: .4s; } .score-dots span:nth-child(10) { animation-delay: .45s; }

.confetti { position: absolute; left: 50%; top: 38%; z-index: 1; pointer-events: none; }
.bit { position: absolute; width: 10px; height: 16px; border-radius: 3px; background: var(--volt); opacity: 0; animation: burst 1.8s var(--d) cubic-bezier(.2, .7, .3, 1) forwards; }
.bit.round { width: 12px; height: 12px; border-radius: 50%; }
.bit.gold { background: var(--gold); } .bit.sky { background: var(--sky); } .bit.coral { background: var(--coral); } .bit.mint { background: var(--mint); }
@keyframes burst {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(.4); }
  55% { opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); }
  100% { opacity: 0; transform: translate(calc(var(--x) * 1.15), calc(var(--y) + 320px)) rotate(calc(var(--r) * 2)) scale(.9); }
}

/* ---------- Badges (public/js/badges.js) ---------- */
.medal { --s: 48px; --c: var(--gold); position: relative; flex: none; display: grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); }
.medal-face { display: grid; place-items: center; width: calc(var(--s) - 8px); height: calc(var(--s) - 8px); border-radius: 50%; background: var(--surface-2); color: var(--faint); }
.medal.on { background: var(--c); box-shadow: 0 6px 18px -8px var(--c); }
.medal.on .medal-face { background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .6), transparent 55%), var(--c); color: var(--ink); box-shadow: inset 0 0 0 2px rgba(12, 19, 48, .22); }
.medal-block { --c: var(--gold); }
.medal-unit { --c: var(--volt); }
.medal-conversations { --c: var(--sky); }
.medals { display: grid; gap: 12px; }
.medals-count { font-family: var(--display); font-weight: 600; color: var(--muted); }
.medals-count strong { font-size: 1.6rem; color: var(--gold); }
.medal-list { display: grid; gap: 8px; }
.medal-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-deep); border: 1px solid var(--line); }
.medal-row.earned { border-color: rgba(255, 200, 61, .4); }
.medal-body { display: grid; gap: 2px; min-width: 0; }
.medal-name { font-weight: 700; overflow-wrap: anywhere; }
.medal-rule { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.medal-status { display: flex; align-items: center; gap: 4px; color: var(--faint); font-size: .85rem; font-weight: 600; }
.medal-status.got { color: var(--mint); }
.member-medals { display: grid; gap: 8px; }
.member-medals .count { background: var(--surface-2); color: var(--text); }
.medal-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.medal-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px; padding-inline-end: 12px; border-radius: 99px; background: var(--bg-deep); border: 1px solid var(--line); font-size: .85rem; font-weight: 700; }
.medal-chip-name { min-width: 0; overflow-wrap: anywhere; }
.new-medals { display: grid; gap: 10px; width: 100%; }
.new-medal { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); background: linear-gradient(135deg, rgba(255, 200, 61, .16), rgba(200, 245, 60, .07)); border: 2px solid rgba(255, 200, 61, .5); text-align: start; animation: popIn2 .5s calc(.3s + var(--i) * .15s) var(--ease-spring) both; }
.new-medal .medal::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid var(--c); opacity: 0; animation: ring 1.4s .7s ease-out 2; }
.new-medal-text { display: grid; gap: 2px; min-width: 0; }
.new-medals .new-medal .eyebrow { color: var(--gold); }
.new-medals .new-medal-name { font-family: var(--display); font-weight: 700; font-size: 1.2rem; line-height: 1.2; color: var(--text); overflow-wrap: anywhere; }
.new-medals .new-medal-got { color: var(--muted); font-size: .9rem; max-width: none; }

/* ---------- Toast ---------- */
.toast-region { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 90; width: min(92vw, 420px); pointer-events: none; }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: #fff; color: var(--ink); box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .6); animation: sheetUp .3s var(--ease-out); pointer-events: auto; }
.toast .icon { color: var(--sky-deep); }
.toast p { font-size: .92rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .node.current::before { opacity: .6; transform: scale(1.08); }
}
@media (forced-colors: active) {
  .btn, .option, .chip, .match-item, .tf, .node { border: 2px solid ButtonText; }
}

/* ---------- Helper ---------- */
.helper-card {
  display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center;
  padding: 18px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(200, 245, 60, .16), rgba(200, 245, 60, .04));
  border: 2px solid rgba(200, 245, 60, .45);
}
.helper-card-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--volt); color: var(--ink); }
.helper-card h2 { font-size: 1.15rem; }
.helper-card p { color: var(--muted); font-size: .92rem; }
.helper-card .btn { grid-column: 1 / -1; }
.helper-card .helper-new { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--gold); font-weight: 700; }
@media (min-width: 560px) { .helper-card { grid-template-columns: auto 1fr auto; } .helper-card .btn { grid-column: auto; } }

.helper { gap: 16px; }
.helper-head { display: grid; gap: 6px; }
.thread { display: grid; gap: 18px; }
.turn { display: grid; gap: 8px; }
.msg { max-width: 88%; padding: 12px 14px; border-radius: 18px; display: grid; gap: 6px; line-height: 1.45; overflow-wrap: anywhere; }
.msg.me { justify-self: end; background: var(--sky); color: var(--ink); border-end-end-radius: 6px; font-weight: 600; }
.msg-time { font-size: .75rem; opacity: .75; justify-self: end; }
.msg.bot { justify-self: start; background: var(--surface); border: 1px solid var(--line); border-end-start-radius: 6px; }
.msg.bot.unknown, .msg.bot.budget { border-color: rgba(255, 200, 61, .5); }
.msg.leader { justify-self: start; background: rgba(61, 220, 151, .1); border: 1px solid rgba(61, 220, 151, .5); border-end-start-radius: 6px; }
.msg-who { font-size: .8rem; font-weight: 700; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.msg.leader .msg-who { color: var(--mint); }
.msg-text { white-space: pre-line; }
.msg-hint { font-size: .92rem; padding: 8px 10px; border-radius: 12px; background: rgba(200, 245, 60, .08); }
.msg-hint strong { color: var(--volt); }
.msg-source { font-size: .8rem; color: var(--faint); }
.msg-source-k { font-weight: 700; color: var(--muted); }
.msg-source a { color: var(--sky); }
.thinking { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--volt); animation: dotPulse 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotPulse { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.helper-empty { display: grid; gap: 10px; color: var(--muted); }
.starters { display: flex; flex-wrap: wrap; gap: 8px; }
.starter { min-height: 44px; padding: 8px 14px; border-radius: 22px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; text-align: start; }
.starter:hover { border-color: var(--sky); }
.composer {
  position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 10;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end;
  padding: 14px 0 10px; background: linear-gradient(transparent, var(--bg) 22%);
}
.composer .btn { margin-bottom: 7px; }
.composer-input { min-height: 58px; max-height: 40vh; padding: 14px 16px; resize: none; line-height: 1.35; }
.composer-error { grid-column: 1 / -1; }
@media (min-width: 1024px) { .composer { bottom: 0; } }

.segmented { display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); justify-self: start; }
.segmented a { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; border-radius: 12px; color: var(--muted); font-weight: 700; text-decoration: none; }
.segmented a[aria-current="page"] { background: rgba(200, 245, 60, .14); color: var(--volt); }
.count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--coral); color: var(--ink); font-size: .8rem; font-weight: 800; display: inline-grid; place-items: center; font-family: var(--body); }
.helper-admin { display: grid; gap: 28px; }
.section-title { font-size: 1.2rem; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.h-list { display: grid; gap: 12px; }
.h-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 10px; }
.h-item .msg { max-width: 100%; background: var(--bg-deep); }
.h-item .msg.leader { background: rgba(61, 220, 151, .1); }
.h-meta { font-size: .85rem; color: var(--muted); }
/* How long an item has waited for a leader; gold once it is in the leaders' daily reminder. */
.h-wait { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-weight: 700; color: var(--muted); }
.h-wait.late { color: var(--gold); }
.h-order { margin: -4px 0 12px; }
.h-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.h-q { font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
.h-answer { display: grid; gap: 10px; }
.h-textarea { min-height: 96px; padding: 12px 16px; resize: vertical; line-height: 1.4; }
.h-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.h-filter .btn { margin-bottom: 7px; }
/* The check of a leader answer against the facts, on the review item. */
.h-check { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-deep); }
.h-check.bad { border-color: var(--coral); background: rgba(255, 107, 138, .08); }
.h-check.good { border-color: rgba(61, 220, 151, .5); }
.h-check.own { border-color: rgba(255, 200, 61, .5); }
.h-check-title { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.h-held { display: flex; align-items: flex-start; gap: 8px; color: var(--gold); font-weight: 700; }
.h-check.bad .h-check-title { color: var(--coral); }
.h-check.good .h-check-title { color: var(--mint); }
.h-check.own .h-check-title { color: var(--gold); }
.h-facts { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.h-fact { font-weight: 600; overflow-wrap: anywhere; }
/* A leader answer no fact covers, in the seller's chat. */
.msg-own { font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* The seller's earlier questions, folded under the chat's header. */
.helper-history { display: grid; gap: 12px; }
.helper-history-head { font-size: 1rem; }
.helper-history-toggle {
  width: 100%; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 700; text-align: start; cursor: pointer;
}
.helper-history-toggle:hover { border-color: var(--sky); }
.helper-history-toggle .chev { margin-inline-start: auto; transition: transform .2s; }
.helper-history-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .helper-history-toggle .chev { transition: none; } }

/* ---------- Strømsone ---------- */
.stromsone { --z-NO1: #5cc8ff; --z-NO2: #ffc83d; --z-NO3: #c8f53c; --z-NO4: #b48cff; --z-NO5: #ff8a3d; }
.stromsone-grid { display: grid; gap: 16px; }
.stromsone-form { display: grid; gap: 14px; }
.stromsone-result { display: grid; gap: 12px; }
.stromsone-result:empty { display: none; }

.zone-answer { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r); border: 2px solid var(--zone, var(--line)); background: color-mix(in srgb, var(--zone, var(--surface-2)) 14%, var(--bg-deep)); }
.zone-code { flex: none; display: grid; place-items: center; min-width: 62px; padding: 8px 10px; border-radius: 14px; background: var(--zone, var(--surface-2)); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.4rem; }
.zone-name { font-family: var(--display); font-weight: 600; font-size: 1.25rem; color: var(--zone, var(--text)); }
.zone-sentence { font-size: .95rem; color: var(--text); }
.zone-caveat { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); padding: 12px 14px; border-radius: var(--r); background: var(--bg-deep); }
.zone-caveat .icon { flex: none; color: var(--sky); margin-top: 2px; }
.zone-alts ul { display: grid; gap: 2px; justify-items: start; margin-top: 2px; }
.zone-source { overflow-wrap: anywhere; }

.zone-bg-NO1 { --zone: var(--z-NO1); }
.zone-bg-NO2 { --zone: var(--z-NO2); }
.zone-bg-NO3 { --zone: var(--z-NO3); }
.zone-bg-NO4 { --zone: var(--z-NO4); }
.zone-bg-NO5 { --zone: var(--z-NO5); }

.zone-map { display: block; width: 100%; max-width: min(100%, 44vh); height: auto; margin: 0 auto; }
.zone-map .zone { stroke: var(--bg-deep); stroke-width: 3; fill-opacity: .42; transition: fill-opacity .25s ease; }
.zone-map .zone.off { fill-opacity: .22; }
.zone-map .zone.on { fill-opacity: .95; stroke: #fff; stroke-width: 5; }
.zone-map .zone-NO1 { fill: var(--z-NO1); }
.zone-map .zone-NO2 { fill: var(--z-NO2); }
.zone-map .zone-NO3 { fill: var(--z-NO3); }
.zone-map .zone-NO4 { fill: var(--z-NO4); }
.zone-map .zone-NO5 { fill: var(--z-NO5); }
.zone-pin-halo { fill: rgba(255, 112, 112, .35); }
.zone-pin-dot { fill: var(--coral); stroke: #fff; stroke-width: 5; }

.zone-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.zone-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; font-size: .82rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 2px solid transparent; }
.zone-chip b { color: var(--zone, var(--text)); font-family: var(--display); }
.zone-chip.on { border-color: var(--zone); color: var(--text); }

@media (prefers-reduced-motion: reduce) { .zone-map .zone { transition: none; } }
/* Six tabs on a small phone: the labels must stay on one line. */
.tab-label { white-space: nowrap; }
@media (max-width: 430px) { .tab { font-size: .66rem; min-width: 46px; } .tab-icon { width: 44px; } }

/* ---------- The next step: one big button at the top of the path ---------- */
.next-step {
  display: grid; gap: 8px; padding: 18px; border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 2px solid var(--volt); box-shadow: 0 6px 0 var(--volt-deep);
}
.next-step .eyebrow { color: var(--volt); }
.next-step h2 { font-size: 1.3rem; line-height: 1.25; }
.next-step .progress { flex: none; height: 12px; }
.next-step .btn { margin-top: 6px; }

/* ---------- «Dagens økt»: today's session at the top of the path ---------- */
.daily {
  display: grid; gap: 12px; padding: 18px; border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 2px solid var(--volt); box-shadow: 0 6px 0 var(--volt-deep);
}
.daily-title { font-size: 1.35rem; color: var(--volt); }
.daily-parts { display: grid; gap: 8px; }
.daily-parts li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.part-mark { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(200, 245, 60, .14); color: var(--volt); }
.part-title { flex: 1; min-width: 0; }
.daily-parts li.done .part-mark { background: var(--mint); color: var(--ink); }
.daily-parts li.done .part-title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(170, 179, 217, .55); }
.part-pct { color: var(--volt); font-size: .85rem; font-weight: 700; }
.daily-sub { color: var(--muted); font-size: .92rem; }
.daily.done { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; border-color: var(--mint); box-shadow: 0 6px 0 var(--mint-deep); }
.daily.done .eyebrow { color: var(--mint); }
.daily.done h2 { font-size: 1.25rem; line-height: 1.25; }
.daily-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--mint); color: var(--ink); animation: popIn2 .45s var(--ease-spring) both; }
.restart-note {
  display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r-sm);
  background: rgba(92, 200, 255, .1); border: 1px solid rgba(92, 200, 255, .35); color: #bfe9ff; font-weight: 600; font-size: .92rem;
}
.restart-note .icon { flex: none; color: var(--sky); margin-top: 2px; }
.part-break .eyebrow { color: var(--volt); }
.part-xp { display: inline-flex; align-items: center; gap: 4px; font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: var(--gold); }
.rstat.streak.up .rstat-val { animation: streakUp .7s var(--ease-spring) .6s both; }
@keyframes streakUp { 40% { transform: scale(1.35); } }

/* Leaders: who has done Dagens økt, workday by workday */
.day-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.day-chip {
  min-height: 44px; padding: 0 14px; border-radius: 12px; cursor: pointer;
  background: var(--bg-deep); border: 2px solid var(--line); color: var(--muted); font-weight: 700; font-size: .95rem;
}
.day-chip.on { border-color: var(--volt); background: rgba(200, 245, 60, .12); color: var(--volt); }
.daily-count strong { font-family: var(--display); font-size: 1.3rem; color: var(--volt); }
/* Two columns only when the board itself is wide enough: beside the sidebar at 1024-1200 px it is not. */
.daily-board { container-type: inline-size; }
.daily-cols { display: grid; gap: 12px; }
@container (min-width: 520px) { .daily-cols { grid-template-columns: 1fr 1fr; } }
.daily-col { display: grid; gap: 10px; align-content: start; padding: 12px 14px; border-radius: var(--r); background: var(--bg-deep); }
.daily-col h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.daily-col.left h3 { color: var(--coral-text); }
.daily-col.done h3 { color: var(--mint); }
.daily-col .count { padding: 1px 9px; border-radius: 99px; background: var(--surface-2); color: var(--text); font-size: .82rem; }
.daily-col ul { display: grid; gap: 8px; }
.daily-col li { display: flex; align-items: center; gap: 10px; }
.daily-col .who { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.daily-col .who .small { display: block; font-weight: 400; }
.avatar.sm { width: 32px; height: 32px; font-size: .8rem; }

/* ---------- «Prøven»: the ready-to-sell test ---------- */
.test-card {
  display: grid; gap: 10px; padding: 18px; border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 2px solid var(--gold); box-shadow: 0 6px 0 var(--gold-deep);
}
.test-card h3 { font-size: 1.25rem; }
.test-card .eyebrow, .test-locked .eyebrow { color: var(--gold); }
.test-locked .lock-badge { color: var(--gold); }
.test-intro { color: var(--muted); font-size: .95rem; line-height: 1.4; }
.test-talks { display: grid; gap: 8px; margin-bottom: 4px; }
.test-talks li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.talk-no {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 200, 61, .18); color: var(--gold); font-family: var(--display); font-size: .9rem;
}
.test-mark, .ready-mark { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; color: var(--gold); font-size: 1.05rem; }
.ready-mark { justify-content: center; margin-bottom: 4px; }

.player-body.conversation { display: grid; gap: 12px; align-content: start; }
.talk-title { font-family: var(--display); font-size: 1.1rem; margin-top: -8px; }
.thread { display: grid; gap: 12px; }
.thread-turn { display: grid; gap: 6px; }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: .95rem; line-height: 1.35; }
.bubble-who { display: block; font-family: var(--display); font-size: .78rem; margin-bottom: 2px; }
.from-customer { background: rgba(255, 255, 255, .92); color: var(--ink); border-start-start-radius: 6px; margin-inline-end: auto; }
.from-customer .bubble-who { color: #3b4680; }
.from-seller {
  background: rgba(200, 245, 60, .14); border: 1px solid rgba(200, 245, 60, .38); color: var(--text);
  border-end-end-radius: 6px; margin-inline-start: auto; text-align: end;
}
.from-seller .bubble-who { color: var(--volt); }
.talk-break { padding: 8px 0 0; }
.talk-scores { display: grid; gap: 8px; margin: 16px 0 4px; }
.talk-scores li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r); background: var(--surface); text-align: start; }
.talk-scores li.ok .icon { color: var(--mint); }
.talk-scores li.bad .icon { color: var(--coral); }
.talk-name { flex: 1; font-weight: 600; }
.talk-wrong { color: var(--muted); font-size: .9rem; }

/* ---------- Samtaletrening: whole customer conversations after «Prøven» ---------- */
.talks-card {
  display: grid; gap: 10px; padding: 18px; border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 2px solid var(--sky); box-shadow: 0 6px 0 var(--sky-deep);
}
.talks-card .eyebrow, .talks-locked .eyebrow { color: var(--sky); }
.talks-card h3 { font-size: 1.25rem; line-height: 1.25; }
.talks-intro { color: var(--muted); font-size: .95rem; line-height: 1.4; }
.talk-list { display: grid; gap: 8px; margin-top: 4px; }
.talk-row {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 12px; border-radius: var(--r);
  background: var(--bg-deep); border: 2px solid var(--line); color: var(--text); text-decoration: none;
}
a.talk-row:hover { border-color: var(--sky); }
a.talk-row:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.talk-row.locked { border-style: dashed; color: var(--muted); }
.talk-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(92, 200, 255, .16); color: var(--sky); }
.talk-icon.locked { background: var(--surface-2); color: var(--faint); }
.talk-text { flex: 1; min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.talk-text .talk-name { font-weight: 700; }
.talk-meta { font-size: .85rem; color: var(--muted); }
.talk-status.hot { color: var(--volt); font-weight: 700; }
.talk-go { flex: none; color: var(--sky); transform: rotate(-90deg); }
.talk-situation { color: var(--muted); font-size: .92rem; line-height: 1.4; margin-top: -4px; }
.thread-scene {
  justify-self: center; text-align: center; max-width: 36ch; padding: 6px 12px; border-radius: 99px;
  background: rgba(92, 200, 255, .1); color: #bfe9ff; font-size: .85rem; font-weight: 600;
}
.option.tried { opacity: .5; text-decoration: line-through; text-decoration-color: var(--coral); border-style: dashed; }
.signed-line { max-width: 34ch; margin: 4px auto 0; text-align: start; }

/* ---------- Offer tool (#/tilbud, offer-tool.js) ---------- */
/* A work surface: the stats bar gives its place to the pinned result strip on a phone, and the rail gives
   its column to the form and the page on a PC. */
.route-tilbud .topbar { display: none; }
/* Without network the tool still works (only a price refresh waits): the notice scrolls away instead of
   covering the pinned strip. */
.offline-bar:has(~ .shell.route-tilbud) { position: static; }
a.btn { text-decoration: none; }
.offer { gap: 16px; }
.offer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.offer-lead { color: var(--muted); max-width: 62ch; }
.offer-note { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: var(--r-sm); background: rgba(255, 200, 61, .12); color: var(--gold); font-weight: 600; font-size: .92rem; }
.offer-kept { text-align: center; }
.offer-grid, .offer-form, .offer-side { display: grid; gap: 16px; min-width: 0; }
.offer input, .offer select { scroll-margin-top: 120px; scroll-margin-bottom: calc(var(--tabbar-h) + 24px); }
.num { text-align: end; font-variant-numeric: tabular-nums; }

/* The four figures, pinned to the top of a phone's screen while the seller types. */
.offer-strip {
  position: sticky; top: 0; z-index: 15;
  margin: 0 -16px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px;
  background: rgba(12, 19, 48, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-block: 1px solid var(--line);
}
.offer-strip .fig { display: grid; min-width: 0; }
.offer-strip .k { font-size: .78rem; font-weight: 700; color: var(--muted); }
.offer-strip .v { font-family: var(--display); font-weight: 600; font-size: 1.35rem; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.offer-strip .fig + .fig .v { color: var(--sky); }
.offer-strip .diff { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0 10px; font-size: .9rem; color: var(--muted); }
.diff.good strong, .offer-diff.good strong { color: var(--mint); }
.diff.bad strong, .offer-diff.bad strong { color: var(--coral-text); }
.offer-result { display: none; }

.offer-card h2, .offer-email h2 { display: flex; align-items: center; gap: 10px; }
.step { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 9px; background: rgba(92, 200, 255, .16); color: var(--sky); font-family: var(--body); font-size: .9rem; font-weight: 800; }
.offer-row { display: grid; gap: 12px; align-items: end; }
.offer-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .offer-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.offer .field { min-width: 0; }
.offer input[type="date"].input { min-width: 0; padding-inline: 12px; }
.select {
  appearance: none; -webkit-appearance: none; padding-inline-end: 44px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23aab3d9' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
  cursor: pointer;
}
.select option { background: var(--surface); color: var(--text); }

.offer-lines-head { display: grid; gap: 4px; padding-top: 4px; }
.offer-lines-head h3 { font-size: 1.05rem; }
.offer-lines { display: grid; gap: 10px; container-type: inline-size; }
.offer-line {
  margin: 0; padding: 12px; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 255, 255, .02);
  display: grid; gap: 8px 10px; align-items: end;
  grid-template-columns: minmax(0, 1fr) 80px 44px;
  grid-template-areas: "type type rm" "text amount amount";
}
.offer-line .type { grid-area: type; }
.offer-line .text { grid-area: text; }
.offer-line .amount { grid-area: amount; }
.offer-line .remove { grid-area: rm; align-self: end; margin-bottom: 5px; }
.offer-line .field-label { font-size: .8rem; color: var(--muted); }
.offer-line .remove:hover { color: var(--coral-text); }
/* A line entered per kWh has a third row: what it comes to, right under its number. */
.offer-line.per-kwh { grid-template-areas: "type type rm" "text amount amount" "cost cost cost"; }
.offer-line .cost { grid-area: cost; justify-self: end; margin-top: -2px; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; text-align: end; }
.unit-switch { display: inline-flex; justify-self: start; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.unit-switch label { position: relative; display: block; cursor: pointer; }
.unit-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.unit-switch span { display: block; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.4; color: var(--muted); white-space: nowrap; }
.unit-switch input:checked + span { background: rgba(92, 200, 255, .16); color: var(--sky); }
.unit-switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
/* A finger gets 44 px of height; the width stays inside a phone's 134 px number column. */
@media (pointer: coarse) { .unit-switch span { display: flex; align-items: center; min-height: 44px; } }
/* One row per line only where its text keeps room: type 172, amount 130 and remove 44 with their gaps,
   padding and border take 402 px, so from 540 px the text field has at least 138. Narrower (a phone, and a
   PC from 1024 to about 1300 px, where the pinned right column leaves the form under 560 px), the two rows. */
@container (min-width: 540px) {
  .offer-line { grid-template-columns: 172px minmax(0, 1fr) 130px 44px; grid-template-areas: "type text amount rm"; }
  .offer-line.per-kwh { grid-template-areas: "type text amount rm" ". cost cost ."; }
}
.offer-empty { color: var(--muted); padding: 12px 14px; border-radius: var(--r); border: 1px dashed var(--line); }
.offer-lines-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.offer-sum { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.offer-sum strong { font-family: var(--display); font-weight: 600; font-size: 1.15rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.toggle-text { display: grid; gap: 2px; min-width: 0; padding-block: 8px; }

.offer-price { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--r); background: rgba(92, 200, 255, .08); border: 1px solid rgba(92, 200, 255, .3); }
.offer-price .k { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sky); }
.offer-price p { font-weight: 700; }
.offer-price.missing { background: rgba(255, 112, 112, .08); border-color: rgba(255, 112, 112, .4); }
.offer-price.missing .k { color: var(--coral-text); }

.offer-result h2 { font-size: 1.05rem; }
.offer-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.offer-figs div { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r); background: var(--bg-deep); min-width: 0; }
.offer-figs dt { font-size: .82rem; font-weight: 700; color: var(--muted); }
.offer-figs dd { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.55rem; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.offer-figs .norico dd { color: var(--sky); }
.offer-diff { display: grid; gap: 2px; color: var(--muted); }
.offer-diff strong { font-family: var(--display); font-weight: 600; font-size: 1.35rem; }

.offer-status ul { display: grid; gap: 8px; }
.offer-status li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); }
.offer-status li .icon { margin-top: 2px; }
.offer-status li strong { display: block; }
.offer-status li p { color: var(--muted); font-size: .92rem; }
.offer-status li.lead { display: block; padding: 0; border: 0; color: var(--muted); font-weight: 700; font-size: .92rem; }
.offer-status li.block { background: rgba(255, 112, 112, .08); border-color: rgba(255, 112, 112, .38); }
.offer-status li.block .icon { color: var(--coral-text); }
.offer-status li.warn { background: rgba(255, 200, 61, .08); border-color: rgba(255, 200, 61, .4); }
.offer-status li.warn .icon { color: var(--gold); }
.offer-status li.ok { background: rgba(61, 220, 151, .08); border-color: rgba(61, 220, 151, .4); }
.offer-status li.ok .icon { color: var(--mint); }

.offer-deliver { gap: 6px; }
.offer-file { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.offer-file .icon { margin-top: 2px; }

.offer-preview { margin: 0; display: grid; gap: 10px; }
.offer-preview figcaption { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: .9rem; }
.offer-preview figcaption .muted { margin-inline-start: auto; }
.offer-paper { position: relative; width: 100%; aspect-ratio: 210 / 297; background: var(--paper); border-radius: 4px; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .75); overflow: hidden; }
.offer-paper canvas { display: block; width: 100%; height: 100%; }
.offer-paper canvas[hidden] { display: none; }
.paper-msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; color: var(--paper-body); font-weight: 600; }
/* The page's own proportions while it is being made: top field, headline, comparison, two cards. */
.paper-skeleton { position: absolute; inset: 0; display: grid; grid-template-rows: 26% 3% 3% 15% 26%; row-gap: 3.5%; padding: 0 6% 6%; }
.paper-skeleton span { display: block; border-radius: 3px; background: var(--paper-mist); animation: paperPulse 1.4s ease-in-out infinite; }
.paper-skeleton .sk-top { margin: 0 -6.4%; border-radius: 0; background: var(--paper-navy); opacity: .9; }
.paper-skeleton .w80 { width: 80%; }
.paper-skeleton .w60 { width: 60%; }
.paper-skeleton .sk-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4%; background: none; animation: none; }
.paper-skeleton .sk-cols span { border: 1px solid var(--paper-line); background: var(--paper); }
@keyframes paperPulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .paper-skeleton span { animation: none; } }

.offer-email .mail-part { display: grid; gap: 8px; justify-items: start; }
.mail-box { width: 100%; margin: 0; padding: 12px 14px; border-radius: var(--r); background: var(--bg-deep); border: 1px solid var(--line); white-space: pre-wrap; user-select: text; -webkit-user-select: text; font-size: .95rem; overflow-wrap: anywhere; }
.mail-box.subject { font-weight: 700; }

@media (min-width: 1024px) {
  .shell.route-tilbud { grid-template-columns: 250px minmax(0, 1fr); grid-template-areas: "side main" "side main"; }
  .route-tilbud .content { max-width: 1160px; padding-inline: 8px 0; }
  .offer-grid { grid-template-columns: minmax(0, 1fr) minmax(340px, 410px); grid-template-areas: "form side" "email side"; gap: 16px 28px; align-items: start; }
  .offer-form { grid-area: form; }
  .offer-side { grid-area: side; position: sticky; top: 24px; max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; padding-bottom: 8px; }
  .offer-email { grid-area: email; }
  .offer-strip { display: none; }
  .offer-result { display: grid; }
  .offer input, .offer select { scroll-margin-top: 24px; scroll-margin-bottom: 24px; }
}
@media (min-width: 1024px) and (max-width: 1180px) {
  .shell.route-tilbud { grid-template-columns: 220px minmax(0, 1fr); }
  .offer-grid { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* «Lag tilbud» on the home screen: the helper card's shape in sky, the tool's colour. */
.offer-home { background: linear-gradient(135deg, rgba(92, 200, 255, .16), rgba(92, 200, 255, .04)); border-color: rgba(92, 200, 255, .45); }
.offer-home .helper-card-icon { background: var(--sky); }
.helper-card .offer-missing { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; color: var(--gold); font-weight: 700; }
.offer-missing .icon { margin-top: 3px; }
.offer-missing a { color: var(--gold); }

/* ---------- SpotFlex prices (#/team/priser, offer-prices.js) ---------- */
.prices { display: grid; gap: 16px; }
.prices-missing { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: rgba(255, 200, 61, .12); border: 1px solid rgba(255, 200, 61, .45); color: var(--gold); font-weight: 700; }
.prices-missing .icon { margin-top: 2px; }
.price-months { display: grid; gap: 10px; }
.price-month { padding: 0; gap: 0; }
.price-month-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 60px; padding: 0 18px; background: none; border: 0; border-radius: var(--r-lg); cursor: pointer; text-align: start; }
.price-month-head .name { margin-inline-end: auto; font-family: var(--display); font-weight: 600; font-size: 1.1rem; }
.price-month-head .chev { color: var(--muted); transition: transform .2s var(--ease-out); }
.price-month.open .chev { transform: rotate(180deg); }
.price-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 16px; }
.price-chips span { padding: 4px 10px; border-radius: 10px; background: var(--bg-deep); font-size: .85rem; font-variant-numeric: tabular-nums; }
.price-chips b { color: var(--sky); }
.price-chips .none { color: var(--gold); }
.price-form { display: grid; gap: 14px; padding: 4px 18px 18px; }
.price-grid { display: grid; gap: 14px; }
@media (min-width: 560px) { .price-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }
.price-cell { display: grid; gap: 6px; align-content: start; }
.price-input { position: relative; }
.price-input .input { padding-inline-end: 52px; }
.price-input .unit { position: absolute; inset-inline-end: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.price-cell .link-btn { justify-self: start; min-height: 44px; padding: 0 4px; color: var(--coral-text); font-size: .9rem; }
.price-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.price-log ol { display: grid; gap: 10px; }
.price-log li { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.price-log li:last-child { border-bottom: 0; padding-bottom: 0; }
.price-log .when { color: var(--muted); font-size: .85rem; }
@media (prefers-reduced-motion: reduce) { .price-month-head .chev { transition: none; } }
