/* TuBro EYESEE. Blue, white and grey with a small red accent.
   Red is used sparingly: the pupil in the mark, the "New" pill and the current level marker.
   Semantic colours (good, warning, bad) are separate from the accent. */

@font-face { font-family: 'Source Serif 4'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/source-serif-4-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/source-serif-4-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/source-serif-4-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/public-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/public-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/public-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2'); }

:root {
  --navy: #061D45;
  --navy-2: #0B2A5E;
  --sky: #78AEF7;
  --blue: #1D5FBF;
  --blue-soft: #E6EFFC;
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --surface-2: #F3F5F9;
  --line: #D9DEE7;
  --ink: #101828;
  --muted: #566074;
  --accent: #D12F3F;
  --good: #1B7F4B;
  --good-soft: #E2F4EA;
  --warn: #9A5B00;
  --warn-soft: #FFF1D6;
  --bad: #B42318;
  --bad-soft: #FDE7E4;
  --focus: #1D5FBF;
  --shadow: 0 1px 2px rgba(6, 29, 69, .06), 0 4px 16px rgba(6, 29, 69, .06);
  --f-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --f-body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #78AEF7;
    --blue-soft: #14284C;
    --bg: #0A1426;
    --surface: #101D36;
    --surface-2: #0D182E;
    --line: #26375A;
    --ink: #E8EDF6;
    --muted: #A2AEC4;
    --accent: #FF5A6B;
    --good: #4CC38A;
    --good-soft: #10301F;
    --warn: #F0B35A;
    --warn-soft: #3A2A0B;
    --bad: #FF8A7E;
    --bad-soft: #3F1714;
    --focus: #9CC4FA;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1rem; margin: 1em 0 .3em; }
p { margin: 0 0 .8em; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
b, strong { font-weight: 600; }

.shell { min-height: 100vh; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 20px 16px 40px; }
.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.stack { display: grid; gap: 16px; }

/* Brand */
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark { flex: none; border-radius: 10px; }
.wm { display: flex; flex-direction: column; line-height: 1; }
.wm-name { font-family: var(--f-display); font-weight: 700; font-size: 1.45rem; letter-spacing: -.02em; }
.wm-name .tu { color: #fff; }
.wm-name .bro { color: var(--sky); }
.wm-sub { font-family: var(--f-mono); font-weight: 600; font-size: .68rem; letter-spacing: .32em; color: #C7D3E8; margin-top: 4px; }
.brand.big .mark { width: 56px; height: 56px; }
.brand.big .wm-name { font-size: 2.1rem; }
.brand.big .wm-sub { font-size: .8rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 10px; border: 1px solid transparent;
  background: var(--blue); color: #fff; font-weight: 600;
}
@media (prefers-color-scheme: dark) { .btn { color: #061D45; } }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: .9rem; }
.btn.ghost { background: transparent; color: var(--blue); border-color: var(--line); }
.btn.ghost.on-dark { color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn.ghost.on-dark:hover { background: rgba(255, 255, 255, .1); }

/* Language toggle */
.lang { display: inline-flex; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; overflow: hidden; }
.lang button { background: transparent; border: 0; color: #fff; padding: 4px 12px; min-height: 32px; font: 600 .78rem var(--f-mono); letter-spacing: .08em; }
.lang button[aria-pressed="true"] { background: #fff; color: var(--navy); }
.login-top .lang { border-color: var(--line); }
.login-top .lang button { color: var(--ink); }
.login-top .lang button[aria-pressed="true"] { background: var(--navy); color: #fff; }

/* Login */
.login { max-width: 460px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
.login-top { display: flex; justify-content: flex-end; }
.login-hero {
  position: relative; overflow: hidden; background: var(--navy); color: #fff;
  border-radius: 18px; padding: 32px 24px 28px;
}
.login-hero .arcs { position: absolute; right: -90px; top: -60px; width: 340px; height: 340px; opacity: .7; }
.login-hero > *:not(.arcs) { position: relative; }
.hero-line { margin: 18px 0 0; font-family: var(--f-display); font-size: 1.2rem; color: #DCE6F7; max-width: 22ch; }

.card, .panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow);
}
.card label { display: block; font-weight: 600; margin-bottom: 6px; }
.card input[type="email"] {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit;
}
.card .btn { width: 100%; }
.card .btn + .btn { margin-top: 8px; }
.msg { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--good-soft); color: var(--good); font-size: .95rem; }
.msg.err { background: var(--bad-soft); color: var(--bad); }

.loading { text-align: center; color: var(--muted); }
.spinner { width: 36px; height: 36px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blue); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Header band */
.band { background: var(--navy); color: #fff; }
.band-in { max-width: 1040px; margin: 0 auto; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.band-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tag { font: 600 .68rem var(--f-mono); letter-spacing: .16em; text-transform: uppercase; padding: 3px 8px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; color: #C7D3E8; }
.who { font-size: .85rem; color: #C7D3E8; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Top grid */
.top-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-bottom: 20px; }
@media (min-width: 820px) { .top-grid { grid-template-columns: 1.15fr 1fr; } }

.score-card {
  position: relative; overflow: hidden; background: var(--navy); color: #fff; border-radius: 18px;
  padding: 24px; display: grid; gap: 20px; align-items: center; grid-template-columns: auto 1fr;
}
@media (max-width: 480px) { .score-card { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.score-card .arcs { position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px; }
.score-card > *:not(.arcs) { position: relative; }
.score-card h2 { font-size: 1.8rem; color: #fff; margin-bottom: .2em; }
.label { font: 600 .72rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.score-card .label { color: #C7D3E8; }
.on-dark-muted { color: #C7D3E8; font-size: .92rem; margin-bottom: .5em; }

.ring { position: relative; width: 160px; height: 160px; }
.ring svg { width: 100%; height: 100%; display: block; }
.ring .bg { stroke: rgba(255, 255, 255, .14); }
.ring .fg { stroke: var(--sky); transition: stroke-dasharray .8s ease; }
.ring[data-tier="1"] .fg { stroke: #FF8A7E; }
.ring[data-tier="2"] .fg { stroke: #F0B35A; }
.ring[data-tier="3"] .fg { stroke: #78AEF7; }
.ring[data-tier="4"] .fg { stroke: #4CC38A; }
.ring .read { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .read b { font: 600 2.9rem/1 var(--f-mono); letter-spacing: -.04em; }
.ring .read span { font-size: .72rem; color: #C7D3E8; margin-top: 4px; }

/* Bars */
.bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 999px; transition: width .6s ease; }
.bar.dark { background: rgba(255, 255, 255, .16); height: 6px; }
.bar.dark > i { background: var(--sky); }
.bar.thin { height: 6px; }
.assess { margin-top: 10px; }
.assess p { margin: 6px 0 0; font-size: .85rem; }

/* Level card */
.level-card h2 { font-size: 1.6rem; margin-bottom: .2em; }
.xp { margin: 14px 0; }
.xp-row { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.xp-row b { font-family: var(--f-mono); color: var(--ink); }
.track { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; flex-wrap: wrap; }
.track li { font-size: .75rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.track li.reached { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.track li.current { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 600; }
.stats { display: flex; gap: 8px; flex-wrap: wrap; }

.chip { display: inline-block; font-size: .8rem; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.chip.score-chip { background: var(--good-soft); color: var(--good); border-color: transparent; font-weight: 600; }
.chip.xp-chip { background: var(--blue-soft); color: var(--blue); border-color: transparent; font-weight: 600; font-family: var(--f-mono); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs [role="tab"] {
  background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 12px 18px; min-height: 44px;
  font-weight: 600; color: var(--muted); white-space: nowrap;
}
.tabs [role="tab"][aria-selected="true"] { color: var(--blue); border-bottom-color: var(--blue); }

/* Next best step */
.next { border-left: 4px solid var(--blue); }
.next h2 { margin-bottom: .3em; }
.next-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

/* Missions */
.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.list-head h2 { margin-bottom: 8px; }
.note { font-size: .85rem; color: var(--muted); }
.note.flat { margin: 0; }
.filters { display: flex; gap: 8px; margin: 8px 0 14px; flex-wrap: wrap; }
.filters button, .opts button, .quiz-btns button {
  min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
}
.filters button[aria-pressed="true"], .opts button[aria-pressed="true"], .quiz-btns button[aria-pressed="true"] {
  background: var(--blue); color: #fff; border-color: var(--blue);
}
@media (prefers-color-scheme: dark) {
  .filters button[aria-pressed="true"], .opts button[aria-pressed="true"], .quiz-btns button[aria-pressed="true"] { color: #061D45; }
}
.missions { display: grid; gap: 10px; }
.empty { color: var(--muted); text-align: center; padding: 24px 0; margin: 0; }

.m { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.m.done { background: var(--surface-2); }
.m-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; background: transparent; border: 0; text-align: left; min-height: 64px; }
.check { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; }
.m.done .check { background: var(--good); border-color: var(--good); color: #fff; }
.m.claimed .check { border-color: var(--warn); }
.m-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.m-cat { font-size: .78rem; color: var(--muted); }
.m-title { font-weight: 600; }
.m.done .m-title { color: var(--muted); }
.m-reward { flex: none; text-align: right; display: flex; flex-direction: column; font-size: .8rem; }
.m-reward b { font-family: var(--f-mono); color: var(--blue); }
.m-reward i { font-style: normal; color: var(--good); font-weight: 600; }
.m-body { padding: 0 14px 16px 52px; }
@media (max-width: 480px) { .m-body { padding-left: 14px; } }
.m-body ol { margin: 0 0 12px; padding-left: 1.2em; }
.m-body li { margin-bottom: 6px; }
.why { color: var(--muted); }
.m-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }

.pill { display: inline-block; font: 600 .66rem var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 1px 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); margin-left: 4px; }
.pill.fresh { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .pill.fresh { color: #1A0509; } }

/* Quiz */
.quiz-item { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.quiz-from { display: block; font: 600 .75rem var(--f-mono); color: var(--muted); margin-bottom: 4px; }
.quiz-msg { margin-bottom: 10px; }
.quiz-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.fb { padding: 10px 12px; border-radius: 10px; font-size: .92rem; background: var(--surface); border: 1px solid var(--line); margin-top: 8px; }
.fb b { margin-right: 6px; }
.fb.ok { background: var(--good-soft); border-color: transparent; }
.fb.no { background: var(--bad-soft); border-color: transparent; }

/* DEHS breakdown */
.quick { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin: 12px 0; background: var(--blue-soft); border-radius: 10px; }
.quick p { margin: 0; }
.attrs { display: grid; gap: 10px; }
.attr { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.attr-head {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; width: 100%; padding: 14px; background: transparent; border: 0; text-align: left; align-items: center;
}
.attr-head .bar { grid-column: 1 / -1; }
.attr-name { display: flex; flex-direction: column; }
.attr-name span { font-size: .82rem; color: var(--muted); }
.attr-score { font: 500 .9rem var(--f-mono); color: var(--muted); }
.attr-score b { font-size: 1.25rem; color: var(--ink); }
.factors { list-style: none; margin: 0; padding: 0 14px 8px; border-top: 1px solid var(--line); }
.f { padding: 14px 0; border-bottom: 1px solid var(--line); }
.f:last-child { border-bottom: 0; }
.f-q { font-weight: 600; margin-bottom: 4px; }
.f-cur { display: block; font-size: .88rem; margin-bottom: 8px; }
.origin { font: 600 .66rem var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); margin-right: 6px; }
.origin.scan { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.origin.self { background: var(--good-soft); color: var(--good); border-color: transparent; }
.opts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.linkish { background: transparent !important; border: 0 !important; color: var(--blue) !important; text-decoration: underline; padding: 6px 4px !important; }
.muted { color: var(--muted); }

/* Import */
.howto { padding-left: 1.2em; }
.howto li { margin-bottom: 4px; }
.drop {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 24px; margin: 16px 0;
  border: 2px dashed var(--line); border-radius: 12px; background: var(--surface-2); justify-content: center;
}
.drop.over { border-color: var(--blue); background: var(--blue-soft); }
.finds { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.finds li { padding: 8px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: .92rem; }
.finds li.good { background: var(--good-soft); color: var(--good); }

/* Footer, toast, overlay */
.foot { max-width: 1040px; margin: 0 auto; padding: 0 16px 32px; display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; max-width: min(92vw, 460px);
  box-shadow: var(--shadow); transition: opacity .25s, transform .25s; z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.overlay { position: fixed; inset: 0; background: rgba(6, 29, 69, .72); display: grid; place-items: center; padding: 16px; z-index: 60; }
.lvl-card { background: var(--surface); border-radius: 18px; padding: 28px; max-width: 380px; text-align: center; box-shadow: var(--shadow); }
.lvl-card .mark { border-radius: 14px; margin-bottom: 8px; }
.lvl-card h2 { font-size: 1.8rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.score-card .ind { padding: 6px 10px; border-left: 3px solid var(--sky); background: rgba(255, 255, 255, .08); border-radius: 0 8px 8px 0; font-size: .85rem; }

.check-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 12px 0; }
.check-row .field { flex: 1 1 220px; }
.check-row label { display: block; font-weight: 600; margin-bottom: 6px; }
.check-row input { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; }
.note a { color: var(--blue); }

.prog-change { font-weight: 600; margin: 0 0 8px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 500 11px var(--f-mono); }
.chart .line { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--blue); }
.prog-attrs { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.prog-attrs li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.prog-attrs .bar { grid-column: 1 / -1; }
.prog-attrs .d { font: 500 .85rem var(--f-mono); color: var(--muted); }
.prog-attrs .d.up { color: var(--good); }
.prog-attrs .d.down { color: var(--bad); }
.plain { padding-left: 1.2em; margin: 0 0 12px; }
.plain li { margin-bottom: 6px; }
.panel.danger { border-color: var(--bad); }
.btn.danger { background: var(--bad); }
@media (prefers-color-scheme: dark) { .btn.danger { color: #1A0509; } }

/* Profile cards */
.profile-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.profile-summary { font-weight: 600; margin: 0 0 8px; }
#attrs.attrs { grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) { #attrs.attrs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { #attrs.attrs { grid-template-columns: repeat(4, 1fr); } }
.acard { padding: 16px; display: flex; flex-direction: column; gap: 6px; border-top: 4px solid var(--line); }
.acard.st-excellent { border-top-color: var(--good); }
.acard.st-good { border-top-color: var(--blue); }
.acard.st-attention { border-top-color: var(--warn); }
.acard.st-action { border-top-color: var(--bad); }
.ac-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; font: 600 .68rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: inline-block; }
.st-excellent .status { color: var(--good); } .st-excellent .dot { background: var(--good); }
.st-good .status { color: var(--blue); } .st-good .dot { background: var(--blue); }
.st-attention .status { color: var(--warn); } .st-attention .dot { background: var(--warn); }
.st-action .status { color: var(--bad); } .st-action .dot { background: var(--bad); }
.acard h3 { margin: 4px 0 0; font-size: 1.15rem; }
.acard .sub { margin: 0; font-size: .85rem; color: var(--muted); }
.ac-score { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.ac-score .bar { flex: 1; }
.ac-score .num { font: 500 .85rem var(--f-mono); color: var(--muted); white-space: nowrap; }
.ac-score .num b { font-size: 1.2rem; color: var(--ink); }
.st-excellent .bar > i { background: var(--good); }
.st-attention .bar > i { background: var(--warn); }
.st-action .bar > i { background: var(--bad); }
.unans { margin: 0; font-size: .78rem; color: var(--warn); }
.finding { background: var(--blue-soft); border-radius: 10px; padding: 10px 12px; margin-top: 4px; font-size: .88rem; }
.f-label { margin: 0 0 4px; font: 600 .66rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.f-ok { margin: 0; color: var(--good); }
.finds.compact { margin: 0; gap: 4px; }
.finds.compact li { padding: 4px 0; background: transparent; color: var(--ink); border-bottom: 1px solid var(--line); border-radius: 0; }
.finds.compact li:last-child { border-bottom: 0; }
.finds.compact li.good { color: var(--good); }
.finds.compact li.more { color: var(--muted); }
.nextstep { margin-top: 2px; font-size: .88rem; }
.next-link { background: transparent; border: 0; padding: 2px 0; color: var(--blue); text-align: left; text-decoration: underline; font-weight: 600; }
.est { display: block; font-size: .78rem; color: var(--good); font-weight: 600; }
.more-btn { margin-top: auto; align-self: flex-start; min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .85rem; }
.acard .factors { border-top: 1px solid var(--line); margin-top: 6px; padding: 0 0 4px; }

/* Detaljer per fynd */
.finds.compact li.fd { padding: 0; }
.fd-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 6px 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fd-head:hover span { text-decoration: underline; }
.fd-head .chev { flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-right: 4px; transition: transform .15s; }
.fd.open .fd-head .chev { transform: rotate(-135deg); }
.fd-body { padding: 4px 0 10px; font-size: .86rem; color: var(--ink); }
.fd-body p { margin: 0 0 8px; }
.fd-body .f-label { margin-top: 6px; }
.fd-items { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.fd-items li { padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: .78rem var(--f-mono); word-break: break-word; }
.fd-items li.more { border-style: dashed; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .fd-head .chev { transition: none; } }

/* Plus */
.pill.plus { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-soft); color: var(--blue); }
.m.locked .m-title { color: var(--muted); }
.m.locked .m-reward b { color: var(--muted); }
.lock-box { margin-top: 10px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 10px; background: var(--blue-soft); }
.lock-box p { margin: 0 0 8px; }
.plan-note { margin: 4px 0 10px; }

/* Trail: one mission at a time. The scenery clears up with every level. */
.trail { margin: 4px 0 14px; --sk-a: #BCD2EE; --sk-b: #E6EFFC; --h1: #9DB9DD; --h2: #86A6D2; --fog: .3; --road: #fff; --sun: #FFD36E; }
.trail.lv1 { --sk-a: #C9D2E0; --sk-b: #E3E8F0; --h1: #B7C2D4; --h2: #A5B2C8; --fog: .55; }
.trail.lv3 { --sk-a: #8FBCF2; --sk-b: #DCEBFD; --h1: #6C9CDD; --h2: #4F84CC; --fog: .08; }
.trail.lv4 { --sk-a: #5C9BEA; --sk-b: #F0F6FF; --h1: #3F7BCF; --h2: #2D63B3; --fog: 0; }
@media (prefers-color-scheme: dark) {
  .trail { --sk-a: #16305A; --sk-b: #1F3F73; --h1: #2A4A80; --h2: #223F70; --fog: .25; --road: rgba(255, 255, 255, .6); --sun: #F3C766; }
  .trail.lv1 { --sk-a: #1A2438; --sk-b: #223049; --h1: #2A3956; --h2: #334566; --fog: .5; }
  .trail.lv3 { --sk-a: #123A78; --sk-b: #1D5099; --h1: #1D5AAE; --h2: #154A93; --fog: .06; }
  .trail.lv4 { --sk-a: #0F4694; --sk-b: #2A6BC4; --h1: #2F7BD6; --h2: #1D5AAE; --fog: 0; }
}
.trail-svg { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.sk-a { stop-color: var(--sk-a); } .sk-b { stop-color: var(--sk-b); }
.sky { fill: url(#sky-g); }
.hill.h1 { fill: var(--h1); } .hill.h2 { fill: var(--h2); }
.tree { fill: var(--h2); opacity: .9; }
.fog { fill: var(--surface); opacity: var(--fog); pointer-events: none; }
.sun .disc { fill: var(--sun); } .sun .halo { fill: var(--sun); opacity: .28; }
.trail-road { fill: none; stroke: var(--road); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 11; }
.trail-walked { fill: none; stroke: var(--blue); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.tn .dot { fill: var(--surface); stroke: var(--line); stroke-width: 3; }
.tn.done .dot { fill: var(--blue); stroke: var(--blue); }
.tn.current .dot { fill: var(--blue); stroke: var(--navy); stroke-width: 3; }
.tn.wait .dot { fill: var(--warn-soft); stroke: var(--warn); }
.tn.locked .dot { fill: var(--surface-2); }
.tn .pulse { fill: none; stroke: var(--sky); stroke-width: 3; opacity: .7; animation: tpulse 2.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes tpulse { from { transform: scale(.9); opacity: .8; } to { transform: scale(1.35); opacity: 0; } }
.tn .ck { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tn .ck.dim { stroke: var(--muted); stroke-width: 2.4; } .tn .ck.wt { stroke: var(--warn); stroke-width: 2.4; }
.tn .ic { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tn.current .ic { stroke: #fff; stroke-width: 2.2; }
.tn.done .ic { stroke: #fff; }
.tn .ic-f { fill: var(--muted); }
.tn .lab { font: 600 11px var(--f-body); fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.walker-bob { animation: tbob 2.4s ease-in-out infinite; }
@keyframes tbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.trail-step { font-size: 1.15rem; line-height: 1.5; margin: 6px 0 14px; }
.list-toggle { margin: 0; text-align: center; }
@media (prefers-reduced-motion: reduce) { .tn .pulse, .walker-bob { animation: none; } }

.next { position: relative; }
.sound-btn { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; z-index: 2; }
.sound-btn:hover { color: var(--blue); }
.burst { fill: none; stroke: var(--sun); stroke-width: 4; transform-box: fill-box; transform-origin: center; animation: tburst 900ms ease-out 1 both; }
@keyframes tburst { from { transform: scale(.8); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .burst { animation: none; opacity: 0; } }
.next > .label { padding-right: 44px; }

/* AI help and scam check */
.m-actions.tight { margin-top: 0; }
.help-box { margin: 4px 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); display: grid; gap: 8px; }
.help-box label, #scam-form label { font-weight: 600; font-size: .9rem; }
.help-box input, .help-box textarea, #scam-text { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ai-answer { background: var(--blue-soft); border-radius: 10px; padding: 10px 12px; }
.ai-answer p { margin: 0 0 6px; }
#scam-form { display: grid; gap: 8px; }
#scam-out { margin-top: 14px; }
.verdict { border-radius: 12px; padding: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.verdict h3 { margin: 12px 0 4px; font-size: .95rem; }
.verdict ul { margin: 0; padding-left: 1.2em; }
.verdict-title { margin: 0; font: 600 1.15rem var(--f-display); }
.verdict.v-scam { background: var(--bad-soft); border-color: var(--bad); }
.verdict.v-suspicious { background: var(--warn-soft); border-color: var(--warn); }
.verdict.v-looks_ok { background: var(--good-soft); border-color: var(--good); }
