/* Medarivo platform app (My Learning, Courses, Account, sign-in). Colours and fonts: design/tokens.css (inlined).
   Same visual language as the public site: light header with the M tile, Manrope headings, Inter body, teal actions. */
:root{ --deep: var(--brand-navy); --radius-m: 14px; --radius-l: 20px; --gutter: 16px;
  --shadow: 0 1px 2px rgba(16,30,52,.06), 0 8px 24px -14px rgba(16,30,52,.2); }
@media (min-width: 600px){ :root{ --gutter: 24px; } }
*,*::before,*::after{ box-sizing: border-box; }
body{ margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--font-body); }
img{ max-width: 100%; display: block; }
a{ color: var(--accent); text-underline-offset: .18em; }
:focus-visible{ outline: 3px solid var(--brand-teal); outline-offset: 2px; border-radius: 4px; }
h1,h2,h3{ font-family: var(--font-cond); margin: 0 0 .5em; letter-spacing: -.015em; text-wrap: balance; }
h1{ font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); font-weight: 800; line-height: 1.1; }
h2{ font-size: 1.5rem; font-weight: 750; line-height: 1.2; }
h3{ font-size: 1.25rem; font-weight: 700; }
p{ margin: 0 0 .8em; }
.lead{ font-size: 1.2rem; color: var(--muted); max-width: 40em; }
.note, .meta{ color: var(--muted); font-size: .95rem; }
.skip{ position: absolute; left: 12px; top: -48px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 30; }
.skip:focus{ top: 12px; }
.wrap{ max-width: 1100px; margin-inline: auto; padding-inline: var(--gutter); }
.loading main{ visibility: hidden; }

.site-header{ background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row{ display: flex; align-items: center; gap: 12px 20px; min-height: 64px; flex-wrap: wrap; }
.brand{ display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 1.2rem/1 var(--font-cond); }
.brand img{ display: block; width: auto; height: 28px; }
.course-card-head img{ border-radius: 12px; }
.nav{ list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a{ display: inline-flex; min-height: 44px; align-items: center; padding: 0 12px; color: var(--ink); text-decoration: none; font-weight: 600; border-radius: 999px; }
.nav a:hover{ background: var(--navy-soft); }
.nav a[aria-current="page"]{ box-shadow: inset 0 -2px 0 var(--brand-teal); border-radius: 0; }
.header-row nav{ flex: 1; }
/* phones: the navigation gets its own row below the logo and "Sign out" (instead of a narrow column beside the logo) */
@media (max-width: 599px){ .header-row{ padding-block: 8px; } .header-row nav{ order: 3; flex: 1 1 100%; } .header-row #signout{ margin-left: 0; } .nav a{ padding: 0 10px; } }
.langs{ list-style: none; display: flex; gap: 4px; margin: 0 0 0 auto; padding: 0; }
.langs button{ min-width: 44px; min-height: 44px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font: 650 .9rem var(--font-body); cursor: pointer; }
.langs button[aria-pressed="true"]{ background: var(--navy-soft); color: var(--ink); }
.theme-btn{ display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; flex: none; }
.theme-btn:hover{ border-color: var(--accent); }
.theme-btn[aria-pressed="true"]{ background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.header-row nav + .theme-btn{ margin-left: auto; }

main{ display: grid; gap: 28px; padding-block: 40px 72px; }
.card{ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px; box-shadow: var(--shadow); }
.card.narrow{ max-width: 34rem; }
.empty{ border-style: dashed; box-shadow: none; }
.stack{ display: grid; gap: 16px; }
.course-grid{ display: grid; gap: 16px; }
@media (min-width: 900px){ .course-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.course-card{ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px; box-shadow: var(--shadow); }
.course-card-head{ display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.course-card-head img{ border-radius: 12px; }
.course-card-head h3{ margin: 0; }
.course-card-head .meta{ margin: 0; }
.progress{ height: 10px; border-radius: 999px; background: var(--navy-soft); overflow: hidden; }
.progress i{ display: block; height: 100%; background: var(--brand-teal); border-radius: 999px; }
.progress-label{ margin-top: 8px; font-weight: 600; }
.course-row.highlight{ outline: 3px solid var(--brand-teal); }
.course-row.planned{ background: transparent; box-shadow: none; border-style: dashed; }
.badge{ display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .85rem; font-weight: 650; }
.badge-muted{ background: var(--navy-soft); color: var(--muted); }
.plain-list{ list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.subs{ list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.sub{ display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-m); }
.sub .meta{ margin: 2px 0 0; }

.btn{ display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px; border-radius: 999px; font: 650 1rem/1.2 var(--font-body);
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer; }
.btn-primary{ background: var(--brand-teal); color: var(--brand-navy); }
.btn-primary:hover{ background: #5ED6C7; }
.btn-secondary{ background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover{ border-color: var(--ink); }
.btn-quiet{ background: transparent; color: var(--ink); border-color: var(--line); min-height: 40px; padding: 6px 16px; font-size: .95rem; }
.btn:disabled{ opacity: .6; cursor: progress; }
.actions{ display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0 0; }

input, select{ width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
input[aria-invalid="true"]{ border-color: var(--bad); }
form .btn{ margin-top: 8px; }
.form-grid{ display: grid; gap: 16px; max-width: 34rem; }
.form-msg{ min-height: 1.4em; margin: 6px 0 0; font-weight: 600; color: var(--ink); }
#login-msg{ color: var(--bad); }
.static{ margin: 0; padding: 10px 0; }
label, .label{ display: block; font-weight: 600; margin-bottom: 6px; }
.mono{ font-family: var(--font-mono); letter-spacing: .02em; }

/* closed-pilot sign-in (username + password) */
.login-card{ max-width: 30rem; width: 100%; }
/* the sign-in card sits in the middle of the screen, horizontally and vertically (owner request 2026-10-29) */
main:has(.login-card){ min-height: calc(100dvh - 76px); align-content: center; justify-items: center; padding-block: 24px; }
.login-form .field{ margin-bottom: 16px; }
.check{ display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.check input{ width: 24px; height: 24px; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent); flex: none; }
.check label{ margin: 0; font-weight: 500; min-height: 24px; display: inline-flex; align-items: center; }
.btn-block{ width: 100%; }
.login-card .note{ margin-top: 16px; }
#pw-msg{ color: var(--bad); }
.login-alt{ font-size: 1.15rem; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }

/* pilot admin overview */
.stats{ display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 12px; margin: 0 0 16px; }
.stat{ background: var(--surface2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; }
.stat dt{ color: var(--muted); font-size: .92rem; font-weight: 600; }
.stat dd{ margin: 4px 0 0; font: 800 2rem/1.1 var(--font-cond); font-variant-numeric: tabular-nums; }
.stat-key{ border-color: var(--accent); background: var(--accent-soft); }
.card-danger{ border-left: 4px solid var(--bad); }
.btn-danger{ background: transparent; color: var(--bad); border-color: var(--bad); }
.btn-danger:hover{ background: var(--bad-soft); }
@media (prefers-reduced-motion: reduce){ *{ transition: none !important; animation: none !important; } }
