/* =====================================================================
   app.css — Design system
   Layered on top of Bootstrap 5. Loaded AFTER bootstrap.min.css.
   Palette derives from Rwandan road signage: official blue for authority,
   red/green reserved exclusively for answer feedback.
   ===================================================================== */

:root {
  color-scheme: light only;

  /* Core */
  --ink:          #12243A;   /* deep navy — headings, primary text */
  --ink-soft:     #4A5B70;   /* secondary text */
  --ink-faint:    #8494A8;   /* meta, timestamps */
  --paper:        #F7F9FC;   /* app background */
  --surface:      #FFFFFF;   /* cards, sheets */
  --line:         #DDE4ED;   /* borders, dividers */

  /* Signage blue — primary action colour */
  --signal:       #0B4FA8;
  --signal-dark:  #083C80;
  --signal-tint:  #E7EFFA;

  /* Semantic — used ONLY for their meaning, never decoration */
  --correct:      #2E7D32;
  --correct-tint: #E8F3E9;
  --incorrect:    #D32F2F;
  --incorrect-tint:#FBEAEA;
  --weak:         #E8A317;
  --weak-tint:    #FDF3E0;

  /* Type scale */
  --fs-display: 2.25rem;
  --fs-h1:      1.5rem;
  --fs-h2:      1.1875rem;
  --fs-body:    1rem;
  --fs-small:   0.875rem;
  --fs-micro:   0.75rem;

  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 1px 2px rgba(18,36,58,.06), 0 4px 12px rgba(18,36,58,.05);

  --nav-height: 60px;
}

/* ---------- Base ---------- */

body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
}

h1, .h1 { font-size: var(--fs-h1);  font-weight: 650; letter-spacing: -.01em; }
h2, .h2 { font-size: var(--fs-h2);  font-weight: 620; letter-spacing: -.005em; }
p       { max-width: 68ch; }

.text-soft  { color: var(--ink-soft); }
.text-faint { color: var(--ink-faint); font-size: var(--fs-small); }

a { color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* Visible keyboard focus everywhere — never removed */
:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- App shell ---------- */

.app-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: .75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 56px;
}
.app-bar__title { font-size: var(--fs-h2); font-weight: 620; margin: 0; flex: 1; }
.app-bar__back  { color: var(--ink); font-size: 1.25rem; line-height: 1; padding: .25rem; }

.app-main { padding: 1rem; max-width: 640px; margin: 0 auto; }

.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 1030;
}
.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink-faint);
  text-decoration: none;
  font-size: var(--fs-micro);
  min-height: 44px;
}
.bottom-nav__item i { font-size: 1.25rem; }
.bottom-nav__item.is-active { color: var(--signal); font-weight: 600; }

/* ---------- Surfaces ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}
.panel + .panel { margin-top: .75rem; }
.panel--flush { padding: 0; overflow: hidden; }

/* ---------- Readiness gauge (the signature element) ---------- */

.gauge {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.gauge__svg { width: 200px; height: 112px; display: block; margin: 0 auto; }
.gauge__track { fill: none; stroke: var(--line); stroke-width: 14; stroke-linecap: round; }
.gauge__fill  { fill: none; stroke: var(--signal); stroke-width: 14; stroke-linecap: round;
                transition: stroke-dashoffset .9s cubic-bezier(.22,.8,.3,1); }
.gauge__value {
  font-size: var(--fs-display);
  font-weight: 680;
  letter-spacing: -.03em;
  line-height: 1;
  margin-top: -3.25rem;
}
.gauge__value span { font-size: 1.25rem; font-weight: 600; }
.gauge__label { color: var(--ink-soft); font-size: var(--fs-small); margin-top: .5rem; }
.gauge__delta { font-size: var(--fs-small); font-weight: 600; color: var(--correct); }

@media (prefers-reduced-motion: reduce) {
  .gauge__fill { transition: none; }
}

/* ---------- Topic performance rows ---------- */

.topic-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.topic-row:last-child { border-bottom: 0; }
.topic-row__name { flex: 1; font-weight: 520; }
.topic-row__pct  { font-variant-numeric: tabular-nums; font-weight: 640; }

.topic-row__bar {
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  margin-top: .3rem;
}
.topic-row__bar > i { display: block; height: 100%; border-radius: 3px; }

.is-strong   .topic-row__pct { color: var(--correct); }
.is-strong   .topic-row__bar > i { background: var(--correct); }
.is-mid      .topic-row__pct { color: var(--weak); }
.is-mid      .topic-row__bar > i { background: var(--weak); }
.is-weak     .topic-row__pct { color: var(--incorrect); }
.is-weak     .topic-row__bar > i { background: var(--incorrect); }
.is-untouched .topic-row__pct { color: var(--ink-faint); }
.is-untouched .topic-row__bar > i { background: var(--ink-faint); }

/* ---------- Question & answer options ---------- */

.question-stem {
  font-size: 1.125rem;
  font-weight: 560;
  line-height: 1.45;
  margin-bottom: 1rem;
}
.question-meta {
  font-size: var(--fs-small);
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .875rem 1rem;
  margin-bottom: .625rem;
  min-height: 52px;
  font-size: var(--fs-body);
  color: var(--ink);
  transition: border-color .12s ease, background-color .12s ease;
}
.option:active { background: var(--signal-tint); }
.option__label {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: var(--fs-small);
  font-weight: 640;
}
.option.is-selected  { border-color: var(--signal); background: var(--signal-tint); }
.option.is-selected  .option__label { background: var(--signal); border-color: var(--signal); color: #fff; }
.option.is-correct   { border-color: var(--correct); background: var(--correct-tint); }
.option.is-correct   .option__label { background: var(--correct); border-color: var(--correct); color: #fff; }
.option.is-incorrect { border-color: var(--incorrect); background: var(--incorrect-tint); }
.option.is-incorrect .option__label { background: var(--incorrect); border-color: var(--incorrect); color: #fff; }
.option:disabled { opacity: 1; }

/* ---------- Feedback panel ---------- */

.feedback { border-radius: var(--radius); padding: 1rem; margin-top: .5rem; }
.feedback--correct   { background: var(--correct-tint);   border: 1px solid var(--correct); }
.feedback--incorrect { background: var(--incorrect-tint); border: 1px solid var(--incorrect); }
.feedback__verdict { font-weight: 680; display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.feedback--correct   .feedback__verdict { color: var(--correct); }
.feedback--incorrect .feedback__verdict { color: var(--incorrect); }
.feedback__label { font-size: var(--fs-small); color: var(--ink-soft); font-weight: 600; margin-top: .75rem; }
.feedback__text  { margin: .125rem 0 0; }

/* ---------- Buttons ---------- */

.btn { border-radius: var(--radius-sm); font-weight: 600; min-height: 48px; padding: .75rem 1.25rem; }
.btn-primary {
  background: var(--signal);
  border-color: var(--signal);
}
.btn-primary:hover, .btn-primary:focus { background: var(--signal-dark); border-color: var(--signal-dark); }
.btn-outline-primary { color: var(--signal); border-color: var(--signal); border-width: 1.5px; }
.btn-block-mobile { width: 100%; }

/* ---------- Forms ---------- */

.form-label { font-weight: 560; font-size: var(--fs-small); margin-bottom: .375rem; color: var(--ink); }
.form-control, .form-select {
  min-height: 48px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-size: var(--fs-body);
}
.form-control:focus, .form-select:focus {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-tint);
}
.form-control.is-invalid { border-color: var(--incorrect); }
.invalid-feedback { font-size: var(--fs-small); color: var(--incorrect); }

.input-prefix {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.input-prefix:focus-within { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-tint); }
.input-prefix__code {
  display: grid;
  place-items: center;
  padding: 0 .75rem;
  background: var(--paper);
  border-right: 1.5px solid var(--line);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.input-prefix .form-control { border: 0; box-shadow: none; border-radius: 0; }

/* ---------- Auth screens ---------- */

.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; padding: 1.5rem 1.25rem; max-width: 460px; margin: 0 auto; }
.auth-head { margin: 2rem 0 1.75rem; }
.auth-head h1 { font-size: 1.75rem; margin-bottom: .375rem; }
.auth-foot { margin-top: auto; padding-top: 2rem; text-align: center; font-size: var(--fs-small); color: var(--ink-soft); }
body.auth-page { padding-bottom: 0; }

/* Wordmark — sign-plate shape, drawn not decorated */
.mark {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
}
.mark__plate {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: var(--signal);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: .9rem;
  font-weight: 700;
}

/* ---------- States ---------- */

.state { text-align: center; padding: 2.5rem 1.25rem; color: var(--ink-soft); }
.state__icon { font-size: 2rem; color: var(--ink-faint); margin-bottom: .5rem; }
.state__title { font-weight: 620; color: var(--ink); margin-bottom: .25rem; }

.alert { border-radius: var(--radius-sm); border-width: 1px; font-size: var(--fs-small); }
.alert-danger  { background: var(--incorrect-tint); border-color: var(--incorrect); color: #8B1E1E; }
.alert-success { background: var(--correct-tint);   border-color: var(--correct);   color: #1B5E20; }
.alert-warning { background: var(--weak-tint);      border-color: var(--weak);      color: #8A6008; }

.pill {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: var(--fs-micro); font-weight: 620;
  padding: .2rem .5rem; border-radius: 99px;
}
.pill--weak { background: var(--weak-tint); color: #8A6008; }
.pill--free { background: var(--signal-tint); color: var(--signal-dark); }

/* ---------- Utility ---------- */

.stack > * + * { margin-top: .75rem; }
.divider { height: 1px; background: var(--line); margin: 1rem 0; }
.tabular { font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@media (min-width: 768px) {
  .app-main { padding: 1.5rem; }
  .btn-block-mobile { width: auto; }
}

/* ---------- Question images ---------- */

.question-image {
  display: flex;
  justify-content: center;
  margin: -.25rem 0 1rem;
}
.question-image img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Picture answers: a 2x2 grid so four signs fit a phone screen */
.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .625rem;
}
.option-grid .option {
  flex-direction: column;
  align-items: center;
  margin-bottom: 0;
  padding: .75rem;
  min-height: 130px;
}
.option-grid .option__label { align-self: flex-start; }
.option__image {
  max-width: 100%;
  max-height: 90px;
  object-fit: contain;
}

/* ---------- Lessons ---------- */

.panel.is-locked { background: #FAFBFD; }
.panel.is-locked .fw-semibold { color: var(--ink-soft) !important; }

.lesson-body { margin-top: 1rem; }
.lesson-body h2 {
  font-size: 1.0625rem;
  font-weight: 640;
  margin: 1.5rem 0 .5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.lesson-body h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.lesson-body h3 { font-size: .9375rem; font-weight: 620; margin: 1rem 0 .375rem; }
.lesson-body p  { margin-bottom: .75rem; line-height: 1.6; }
.lesson-body ul, .lesson-body ol { margin: 0 0 .875rem; padding-left: 1.25rem; }
.lesson-body li { margin-bottom: .375rem; line-height: 1.55; }
.lesson-body strong { font-weight: 640; }
.lesson-body blockquote {
  margin: 1rem 0;
  padding: .75rem 1rem;
  background: var(--signal-tint);
  border-left: 3px solid var(--signal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.lesson-body blockquote p:last-child { margin-bottom: 0; }
.lesson-body table {
  width: 100%;
  border-collapse: collapse;
  margin: .875rem 0;
  font-size: var(--fs-small);
  display: block;
  overflow-x: auto;
}
.lesson-body th, .lesson-body td {
  border: 1px solid var(--line);
  padding: .5rem .625rem;
  text-align: left;
}
.lesson-body th { background: var(--paper); font-weight: 620; }

/* ---------- Exam ---------- */

.exam-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}
.exam-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
  padding: .125rem .5rem;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--line);
}
.exam-timer.is-urgent {
  color: var(--incorrect);
  border-color: var(--incorrect);
  background: var(--incorrect-tint);
}

/* ---------- Mistake review ---------- */

.review-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: .75rem;
}
.review-card__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--fs-micro);
  margin-bottom: .5rem;
}
.review-card__num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--incorrect-tint);
  color: var(--incorrect);
  display: grid; place-items: center;
  font-weight: 700; font-size: var(--fs-micro);
}
.review-card__stem { font-weight: 560; line-height: 1.45; margin-bottom: .75rem; }

.review-answer {
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  margin-bottom: .375rem;
  font-size: var(--fs-small);
  line-height: 1.45;
}
.review-answer__tag {
  display: block;
  font-size: var(--fs-micro);
  font-weight: 620;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: .125rem;
}
.review-answer--wrong { background: var(--incorrect-tint); border: 1px solid var(--incorrect); }
.review-answer--wrong .review-answer__tag { color: var(--incorrect); }
.review-answer--right { background: var(--correct-tint); border: 1px solid var(--correct); }
.review-answer--right .review-answer__tag { color: var(--correct); }

.review-why {
  margin-top: .625rem;
  padding-top: .625rem;
  border-top: 1px solid var(--line);
}
.review-card .question-image img { max-height: 150px; }

/* ---------- Progress ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .875rem;
  text-align: center;
}
.stat__value { font-size: 1.5rem; font-weight: 680; line-height: 1.1; letter-spacing: -.02em; }
.stat__label { font-size: var(--fs-micro); color: var(--ink-soft); margin-top: .125rem; }

.trend { width: 100%; height: 70px; display: block; margin: .25rem 0 .5rem; }

.locked-box {
  text-align: center;
  padding: 1rem .5rem .5rem;
  color: var(--ink-soft);
  font-size: var(--fs-small);
}
.locked-box i { display: block; font-size: 1.5rem; color: var(--ink-faint); margin-bottom: .375rem; }

@media (min-width: 560px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Road signs ---------- */

.chip-row { display:flex; gap:.375rem; overflow-x:auto; padding-bottom:.25rem; -webkit-overflow-scrolling:touch; }
.chip {
  flex: 0 0 auto;
  padding: .375rem .75rem;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: var(--fs-small);
  text-decoration: none;
  white-space: nowrap;
}
.chip.is-on { background: var(--signal); border-color: var(--signal); color: #fff; font-weight: 600; }

.sign-card {
  display: flex;
  gap: .875rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .875rem;
  margin-bottom: .625rem;
}
.sign-card__img {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 4px;
}
.sign-card__body { min-width: 0; }
.sign-card__name { font-size: 1rem; font-weight: 620; margin: 0 0 .25rem; }
.sign-card__meaning { font-size: var(--fs-small); color: var(--ink-soft); margin: 0 0 .375rem; line-height: 1.5; }
.sign-card__action {
  font-size: var(--fs-small);
  font-weight: 560;
  color: var(--signal-dark);
  background: var(--signal-tint);
  border-radius: var(--radius-sm);
  padding: .375rem .5rem;
  margin: 0 0 .375rem;
}
.sign-card__link { font-size: var(--fs-micro); font-weight: 600; }

@media (min-width: 560px) {
  .sign-card__img { flex-basis: 88px; width: 88px; height: 88px; }
}

/* ---------- Notifications ---------- */

.notif {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .875rem;
  margin-bottom: .5rem;
}
.notif.is-unread { border-left: 3px solid var(--signal); background: #FCFDFF; }
.notif__icon { font-size: 1.125rem; margin-top: .125rem; flex: 0 0 auto; }
.notif__body { min-width: 0; flex: 1; }
.notif__title { font-weight: 620; font-size: var(--fs-small); display: flex; align-items: center; gap: .375rem; }
.notif__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); flex: 0 0 auto; }
.notif__text { font-size: var(--fs-small); color: var(--ink-soft); margin: .25rem 0 .25rem; line-height: 1.5; }
.notif__time { font-size: var(--fs-micro); color: var(--ink-faint); }
.notif__action { flex: 0 0 auto; }

/* Bell with unread count */
.bell { position: relative; color: var(--ink); font-size: 1.25rem; padding: .25rem; text-decoration: none; }
.bell__count {
  position: absolute; top: -2px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px; background: var(--incorrect); color: #fff;
  font-size: .625rem; font-weight: 700; line-height: 16px; text-align: center;
}

/* ---------- Navigation progress ---------- */

#nav-progress {
  position: fixed;
  top: 0; left: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, var(--signal), #4A90E2);
  box-shadow: 0 0 8px rgba(11, 79, 168, .5);
  z-index: 9999;
  transition: width .2s ease, opacity .25s ease;
  border-radius: 0 2px 2px 0;
}

/* A disabled submit button should look deliberate, not broken */
button[disabled], .btn[disabled] { opacity: .65; cursor: default; }

/* ---------- Skeletons: shape of the content, before the content ---------- */

.skeleton {
  background: linear-gradient(90deg, #EEF1F5 25%, #F7F9FC 50%, #EEF1F5 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
.skeleton--line { height: 12px; margin-bottom: .5rem; }
.skeleton--title { height: 18px; width: 70%; margin-bottom: .75rem; }
.skeleton--option { height: 52px; margin-bottom: .625rem; border-radius: 8px; }
.skeleton--image { height: 120px; margin-bottom: .75rem; }

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
  #nav-progress { transition: none; }
}


/* ---------- Full-page skeleton between pages ---------- */

#nav-skeleton {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 9990;
  opacity: 0;
  transition: opacity .18s ease;
  overflow: hidden;
  padding-top: env(safe-area-inset-top, 0px);
}
#nav-skeleton.is-on { opacity: 1; }

.nsk-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
}
.nsk-body { padding: 1rem; max-width: 640px; margin: 0 auto; }
.nsk-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: .75rem;
}
.nsk-row {
  display: flex;
  gap: .75rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .875rem;
  margin-bottom: .5rem;
}

@media (prefers-reduced-motion: reduce) {
  #nav-skeleton { transition: none; }
}

/* ---------- Install to home screen ---------- */

#install-bar {
  position: fixed;
  left: .75rem; right: .75rem;
  bottom: calc(var(--nav-height, 64px) + .75rem + env(safe-area-inset-bottom, 0px));
  z-index: 9995;
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .75rem;
  box-shadow: 0 10px 30px rgba(18,36,58,.18);
  transform: translateY(140%);
  transition: transform .32s cubic-bezier(.22,1,.36,1);
}
#install-bar.is-on { transform: translateY(0); }

.ib__icon {
  flex: 0 0 42px; height: 42px;
  border-radius: 11px;
  background: var(--signal); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 1.125rem;
}
.ib__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ib__text strong { font-size: var(--fs-small); font-weight: 640; }
.ib__text span  { font-size: var(--fs-micro); color: var(--ink-soft); }

.ib__go {
  flex: 0 0 auto;
  background: var(--signal); color: #fff;
  border: 0; border-radius: 9px;
  padding: .5rem .875rem;
  font-size: var(--fs-small); font-weight: 620;
}
.ib__x {
  flex: 0 0 auto;
  background: none; border: 0;
  color: var(--ink-faint);
  font-size: 1.5rem; line-height: 1;
  padding: 0 .25rem;
}

/* iOS instructions */
#ios-help {
  position: fixed; inset: 0;
  background: rgba(18,36,58,.55);
  z-index: 9999;
  display: grid; place-items: center;
  padding: 1.5rem;
}
.ios__card {
  background: var(--surface);
  border-radius: 16px;
  padding: 1.25rem;
  max-width: 340px;
  width: 100%;
}
.ios__card h3 { font-size: 1.0625rem; font-weight: 640; margin: 0 0 .75rem; }
.ios__card ol { padding-left: 1.1rem; margin: 0 0 1rem; }
.ios__card li { font-size: var(--fs-small); color: var(--ink-soft); margin-bottom: .5rem; line-height: 1.5; }

@media (min-width: 768px) {
  #install-bar { left: auto; right: 1.25rem; max-width: 420px; bottom: 1.25rem; }
}
