/* MRS members area, design B "Percorso" (Juanlu's pick, 2026-10-26). Night by default, Day when the
   device asks for light. No inline styles anywhere: the CSP allows only this file. */
@font-face { font-family: 'Archivo'; font-weight: 400 900; font-display: swap; src: url(/assets/fonts/archivo.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/inter.woff2) format('woff2'); }
@font-face { font-family: 'Share Tech Mono'; font-weight: 400; font-display: swap; src: url(/assets/fonts/sharetechmono.woff2) format('woff2'); }

:root {
  --ground: #0f0f0f; --surface: #151515; --surface-2: #1c1c1b; --line: #2a2a28; --ink: #f4f4f1; --ink-2: #aeafa9;
  --brand: #86e765; --on-brand: #0c1707; --brand-ink: #86e765; --brand-tint: #1f3a1a;
  --gold: #e9bc55; --gold-tint: #2a2312; --gold-line: #6b5524; --warn: #e9bc55; --warn-tint: #2a2312;
  --info: #35a8ff; --info-tint: #10263a; --error: #ff8a8a; --error-tint: #3a1d1d; --track: #2a2a28;
  --shadow: 0 8px 24px rgba(0, 0, 0, .45); --glow-a: rgba(134, 231, 101, .11); --glow-b: rgba(233, 188, 85, .07); --pitch: rgba(134, 231, 101, .09);
  --head: 'Archivo', -apple-system, system-ui, sans-serif; --body: 'Inter', -apple-system, system-ui, sans-serif;
  --mono: 'Share Tech Mono', ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --ground: #f4f4f1; --surface: #ffffff; --surface-2: #edefea; --line: #dfe0da; --ink: #151515; --ink-2: #4f514b;
    --brand-ink: #2e7234; --brand-tint: #e3f4dc; --gold: #785c24; --gold-tint: #f7eedb; --gold-line: #a8853a;
    --warn: #8a5a00; --warn-tint: #f7eedb; --info: #1b64a3; --info-tint: #e2eef9; --error: #b3261e; --error-tint: #fbe9e7;
    --track: #dfe0da; --shadow: 0 6px 20px rgba(21, 21, 21, .10); --glow-a: rgba(134, 231, 101, .22); --glow-b: rgba(233, 188, 85, .16); --pitch: rgba(46, 114, 52, .12);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.45 var(--body); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
p, ul, ol { margin: 0; }
button { cursor: pointer; }
a { color: var(--brand-ink); }
:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }
h1[tabindex="-1"]:focus { outline: none; }
.app { max-width: 480px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }
.app.no-nav { padding-bottom: 40px; }
.boot, .noscript { padding: 48px 16px; text-align: center; color: var(--ink-2); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* type */
.brand { font: 800 12px/1.2 var(--head); letter-spacing: .04em; text-transform: uppercase; margin: 0; }
.brand b { color: var(--brand-ink); font-weight: 800; }
.brand small { display: block; font: 600 11px/1.4 var(--body); letter-spacing: 0; text-transform: none; color: var(--ink-2); margin-top: 2px; }
h1, h2, h3 { font-family: var(--head); margin: 0; letter-spacing: -.01em; }
h1 { font-weight: 900; font-size: 30px; line-height: 1.1; }
h2 { font-weight: 800; font-size: 19px; }
h3 { font-weight: 800; font-size: 17px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.label { font: 800 11px/1.2 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink); display: flex; align-items: center; gap: 6px; }
.label svg { width: 16px; height: 16px; flex: none; }
.label.gold { color: var(--gold); }
.label.plain { color: var(--ink-2); }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card.gold { border-color: var(--gold-line); }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.code { font-family: var(--mono); font-size: 12px; padding: 3px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }

/* chips: a coloured dot plus a word */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 600 12px/1.2 var(--body); white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--brand-tint); color: var(--brand-ink); }
.chip.warn { background: var(--warn-tint); color: var(--warn); }
.chip.gold { background: var(--gold-tint); color: var(--gold); border: 1px solid var(--gold-line); }
.chip.info { background: var(--info-tint); color: var(--info); }
.chip.gold::before, .chip.lock::before { display: none; }
.chip svg { width: 13px; height: 13px; }

/* buttons */
.btn { min-height: 48px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 800 15px/1 var(--head); text-decoration: none; }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.ghost { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn.gold { background: var(--gold-tint); color: var(--gold); border-color: var(--gold-line); }
.btn.block { width: 100%; min-height: 54px; font-size: 16px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.link { min-height: 44px; padding: 0 4px; background: none; color: var(--brand-ink); font-size: 14px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.icon-btn svg { width: 20px; height: 20px; }

/* progress */
.bar { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--warn); width: 0; }
.bar.ok > i { background: var(--brand); }
.segs { display: flex; gap: 6px; }
.segs i { flex: 1; height: 6px; border-radius: 999px; background: var(--track); }
.segs i.done { background: var(--brand); }
.segs i.prog { background: var(--warn); }
.ring { width: 58px; height: 58px; position: relative; flex: none; }
.ring svg { width: 58px; height: 58px; transform: rotate(-90deg); }
.ring .track { stroke: var(--track); }
.ring .fill { stroke: var(--brand); stroke-linecap: round; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font: 900 20px/1 var(--head); }

/* the path: a vertical timeline of levels */
.path { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; position: relative; padding-bottom: 14px; }
.step::before { content: ''; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step.next-locked::before { background: none; border-left: 2px dashed var(--gold-line); width: 0; }
.node { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 800 15px/1 var(--mono); border: 2px solid var(--line); background: var(--surface); color: var(--ink-2); }
.node svg { width: 18px; height: 18px; }
.node.done { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.node.progress { border-color: var(--warn); color: var(--warn); }
.node.active { border-color: var(--brand); color: var(--brand-ink); }
.node.locked { border-style: dashed; border-color: var(--gold-line); color: var(--gold); }
.lvl { display: flex; flex-direction: column; gap: 6px; padding: 8px 0 4px; text-decoration: none; color: inherit; border-radius: 12px; }
.lvl.boxed { padding: 14px; border: 1px solid var(--gold-line); background: var(--gold-tint); }
.lvl .price { font: 900 20px/1 var(--head); color: var(--gold); }
.lvl .meta { display: flex; align-items: center; gap: 10px; }
.lvl .meta .bar { flex: 1; }

/* level page */
.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.stepper a, .stepper span { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink-2); font-size: 11px; text-align: center; }
.stepper .node { width: 34px; height: 34px; font-size: 13px; }
.stepper .cur { color: var(--ink); font-weight: 700; }
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.item { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); align-items: start; }
.item:first-child { border-top: 0; }
.item .st { width: 22px; height: 22px; margin-top: 2px; color: var(--ink-2); }
.item .st.done { color: var(--brand-ink); }
.item .st.prog { color: var(--warn); }
.item .t { font: 800 15px/1.25 var(--head); }
.item .d { font-size: 13px; color: var(--ink-2); }
.item .acts { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.item .acts .btn { min-height: 44px; padding: 0 14px; font-size: 14px; }
.item.cur { margin: 0 -16px; padding: 14px 16px; background: var(--warn-tint); border-left: 3px solid var(--warn); border-top-color: transparent; }
.item.cur + .item { border-top-color: transparent; }
.bonus { font: 600 11px/1 var(--body); color: var(--gold); margin-left: 6px; }

/* unlock preview */
.lock-tile { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-tint); border: 1px solid var(--gold-line); color: var(--gold); }
.lock-tile svg { width: 24px; height: 24px; }
.includes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.includes li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 14px; }
.includes svg { width: 20px; height: 20px; color: var(--brand-ink); }
.price-big { font: 900 30px/1 var(--head); color: var(--gold); }

/* account */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); min-height: 52px; }
.list li:first-child { border-top: 0; }
.list .amt { font-family: var(--mono); font-weight: 700; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-ink); display: grid; place-items: center; font: 900 22px/1 var(--head); flex: none; }
.dev-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.dev-ico svg { width: 18px; height: 18px; }

/* login: the steps card beside a preview of the path (one column on a phone, two from 900px) */
body.login-bg { min-height: 100vh; background: radial-gradient(900px 620px at 0% -12%, var(--glow-a), transparent 66%), radial-gradient(820px 560px at 100% 108%, var(--glow-b), transparent 66%), var(--ground); }
.app.wide { max-width: 1040px; }
.login { display: flex; flex-direction: column; gap: 22px; }
.login-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.lead { font-size: 16px; color: var(--ink-2); max-width: 36ch; }
.login-card { padding: 20px; }
.lsteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lstep { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 14px; position: relative; padding-bottom: 20px; }
.lstep:last-child { padding-bottom: 0; }
.lstep::before { content: ''; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--line); }
.lstep:last-child::before { display: none; }
.lstep.done::before { background: var(--brand); }
.lnode { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 800 14px/1 var(--mono); border: 2px solid var(--line); background: var(--surface); color: var(--ink-2); }
.lnode svg { width: 16px; height: 16px; }
.lnode.cur { border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 4px var(--brand-tint); }
.lnode.done { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.lbody { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-top: 6px; }
.lbody form { display: flex; flex-direction: column; gap: 12px; }
.lt { font: 800 15px/1.25 var(--head); }
.lstep.next .lt { color: var(--ink-2); }
.ld { font-size: 13px; color: var(--ink-2); }
.input-wrap { position: relative; }
.input-wrap svg { position: absolute; left: 15px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.input-wrap .input { padding-left: 46px; }
.preview { position: relative; overflow: hidden; padding: 22px; gap: 14px; }
.preview > * { position: relative; z-index: 1; }
/* a faint centre circle of a pitch in the corner */
.preview::after { content: ''; position: absolute; right: -131px; top: -131px; width: 320px; height: 320px; border-radius: 50%; border: 2px solid var(--pitch); }
.preview .lvl { padding: 7px 0 2px; gap: 2px; }
.preview .step { padding-bottom: 12px; }
.node.gold { border-color: var(--gold-line); background: var(--gold-tint); color: var(--gold); }
.perks { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.perks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-size: 13px; color: var(--ink-2); }
.perks svg { width: 18px; height: 18px; color: var(--brand-ink); margin-top: 1px; }
@media (min-width: 900px) {
  .app.wide { padding-top: 48px; gap: 28px; }
  .login { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 56px; align-items: center; min-height: calc(100vh - 150px); }
  .login h1 { font-size: 42px; }
  .preview { padding: 28px; }
}

/* login fields */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 700; font-size: 14px; }
.input { min-height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 16px; font-size: 16px; width: 100%; }
.input:focus { border-color: var(--brand-ink); outline: none; }
.code-input { font: 400 28px/1 var(--mono); letter-spacing: .5em; text-align: center; padding-left: .5em; }
.hint { display: grid; grid-template-columns: 20px 1fr; gap: 8px; font-size: 13px; color: var(--ink-2); }
.hint svg { width: 18px; height: 18px; color: var(--info); margin-top: 1px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font: 400 12px/1 var(--mono); letter-spacing: .12em; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.msg { border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.msg.err { background: var(--error-tint); color: var(--error); }
.msg.ok { background: var(--brand-tint); color: var(--brand-ink); }
.foot { text-align: center; font-size: 13px; color: var(--ink-2); }

/* bottom tabs */
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.nav ul { list-style: none; margin: 0 auto; padding: 0; max-width: 480px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nav a { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--ink-2); font: 600 11px/1 var(--body); }
.nav a i { width: 46px; height: 28px; border-radius: 999px; display: grid; place-items: center; }
.nav a svg { width: 20px; height: 20px; }
.nav a[aria-current="page"] { color: var(--brand-ink); }
.nav a[aria-current="page"] i { background: var(--brand-tint); }
