/* Onboard part: the first-run welcome. A takeover screen in the app's own colours (navy, Santa red,
   fluoro yellow, snow), over everything but the update screen (20000). */
.ob {
  position: fixed; inset: 0; z-index: 9500;
  display: flex; align-items: center; justify-content: center;
  padding: calc(24px + var(--sat, 0px)) 20px calc(24px + var(--sab, 0px));
  background:
    radial-gradient(120% 70% at 50% 38%, #ffffff 0%, #fbfdff 45%, #e6eefa 100%);
  color: #1d2f52; text-align: center; overflow: hidden;
  font-family: var(--font); -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none; touch-action: manipulation; cursor: default;
  transition: opacity .45s ease, transform .45s ease;
}
.ob.bye { opacity: 0; transform: scale(1.04); pointer-events: none; }
.ob-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.ob-step { position: relative; z-index: 1; width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; }
.ob-step[hidden] { display: none; }
.ob-step-1.out { animation: ob-out .26s ease-in both; }
.ob-step-2 { animation: ob-in .5s cubic-bezier(.25, 1.4, .5, 1) both; }

.ob-logo {
  width: 112px; height: 112px; border-radius: 28px; display: block;
  box-shadow: 0 14px 34px rgba(46, 79, 134, .28);
  animation: ob-pop .7s cubic-bezier(.25, 1.6, .5, 1) .05s both;
}
.ob-logo-small { width: 72px; height: 72px; border-radius: 20px; margin-bottom: 22px; animation: none; }
.ob-title { margin: 26px 0 0; line-height: 1; font-weight: 800; }
.ob-kicker {
  display: block; font-size: 19px; font-weight: 800; letter-spacing: .04em; color: #d3202f;
  margin-bottom: 10px; animation: ob-in .5s ease-out .2s both;
}
.ob-letters {
  display: block; font-family: var(--font-head); font-size: clamp(30px, 10.6vw, 54px); letter-spacing: -.02em;
  color: #2e4f86; white-space: nowrap;
}
.ob-l { display: inline-block; animation: ob-letter .55s cubic-bezier(.25, 1.7, .5, 1) both; }
.ob-tap {
  margin-top: 46px; font-size: 15px; font-weight: 700; color: #5c6f92; opacity: 0;
  transition: opacity .4s ease;
}
.ob-tap.show { opacity: 1; animation: ob-bob 1.6s ease-in-out .4s infinite; }

.ob-q {
  margin: 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(30px, 9vw, 44px);
  line-height: 1.08; letter-spacing: -.02em; color: #2e4f86; max-width: 340px;
}
.ob-line { margin-top: 12px; font-size: 17px; font-weight: 700; color: #d3202f; }
.ob-btn {
  margin-top: 40px; min-height: 68px; width: 100%; max-width: 320px; padding: 0 28px;
  border: 3px solid #2e4f86; border-radius: 999px; background: #e8ff1f; color: #1d2f52;
  font: inherit; font-size: 24px; font-weight: 800; letter-spacing: -.01em; cursor: pointer;
  box-shadow: 0 7px 0 #2e4f86; transition: transform .1s ease, box-shadow .1s ease;
  animation: ob-wiggle 2.8s ease-in-out 1.2s infinite;
}
.ob-step-1 .ob-btn { margin-top: 44px; animation: ob-in .5s ease-out .9s both; }
.ob-btn:active { animation: none; }
.ob-btn:active, .ob-btn.cheer { transform: translateY(5px); box-shadow: 0 2px 0 #2e4f86; }
.ob-btn.cheer { animation: ob-cheer .5s cubic-bezier(.25, 1.7, .5, 1) both; background: #d3202f; color: #ffffff; border-color: #8f1420; box-shadow: 0 2px 0 #8f1420; }
.ob-btn:focus-visible { outline: 3px solid #d3202f; outline-offset: 4px; }

@keyframes ob-pop { from { transform: scale(.2) rotate(-14deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ob-letter { from { transform: translateY(26px) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ob-in { from { transform: translateY(22px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ob-out { to { transform: translateY(-18px); opacity: 0; } }
@keyframes ob-bob { 0%, 100% { transform: none; } 50% { transform: translateY(-4px); } }
@keyframes ob-wiggle { 0%, 84%, 100% { transform: none; } 88% { transform: rotate(-2.5deg) scale(1.03); } 92% { transform: rotate(2.5deg) scale(1.03); } 96% { transform: rotate(-1deg); } }
@keyframes ob-cheer { 0% { transform: translateY(5px) scale(.94); } 60% { transform: translateY(5px) scale(1.08); } 100% { transform: translateY(5px) scale(1); } }

/* one card at a time: the shell's install and notification cards wait until the welcome has gone */
.ob-open .install-card, .ob-open .push-card { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  .ob, .ob * { animation: none !important; transition: none !important; }
  .ob-tap { opacity: 1; }
}

/* the starts, the inductions (coach marks with an arrow at the real button), Get set up and Phone check.
   The app's own colours: navy #2e4f86, Santa red #d3202f, fluoro yellow #e8ff1f, snow #fbfdff. 48 px taps. */
.obt {
  position: fixed; inset: 0; z-index: 9400; color: #1d2f52; font-family: var(--font);
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
.obt-choice, .obs {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(20px + var(--sat, 0px)) 16px calc(20px + var(--sab, 0px));
  background: radial-gradient(120% 70% at 50% 38%, #ffffff 0%, #fbfdff 45%, #e6eefa 100%);
}
.obt-card { width: 100%; max-width: 400px; text-align: center; animation: obt-in .4s cubic-bezier(.25, 1.4, .5, 1) both; }
.obt-logo { width: 64px; height: 64px; border-radius: 18px; display: block; margin: 0 auto 18px; box-shadow: 0 10px 26px rgba(46, 79, 134, .25); }
.obt-title { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: clamp(26px, 8vw, 36px); line-height: 1.1; letter-spacing: -.02em; color: #2e4f86; }
.obt-line { margin: 10px 0 0; font-size: 17px; font-weight: 700; color: #d3202f; }
.obt-choices { display: flex; flex-direction: column; gap: 14px; margin-top: 30px; }
.obt-choices.busy { opacity: .6; pointer-events: none; }
.obt-note { min-height: 1.4em; margin: 14px 0 0; font-weight: 700; color: #d3202f; }
.obt-btn {
  min-height: 56px; width: 100%; padding: 0 22px; border-radius: 999px; font: inherit; font-size: 19px;
  font-weight: 800; cursor: pointer; transition: transform .1s ease, box-shadow .1s ease;
}
.obt-btn.primary { border: 3px solid #2e4f86; background: #e8ff1f; color: #1d2f52; box-shadow: 0 5px 0 #2e4f86; }
.obt-btn.second { border: 2px solid #2e4f86; background: #ffffff; color: #2e4f86; box-shadow: 0 3px 0 rgba(46, 79, 134, .35); }
.obt-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #2e4f86; }
.obt-btn:disabled { opacity: .55; cursor: default; }
.obt-btn:focus-visible, .obs-fix:focus-visible, .obs-switch:focus-visible { outline: 3px solid #d3202f; outline-offset: 3px; }
.obt-row { display: flex; gap: 10px; margin-top: 16px; }
.obt-row .obt-btn { flex: 1 1 0; min-width: 0; font-size: 17px; padding: 0 12px; }

/* the tour: the page shows through a hole round the real button, an arrow points at it, the card says what it is */
.obt-tour { background: transparent; }
.obt-spot {
  position: fixed; border-radius: 16px; pointer-events: none;
  box-shadow: 0 0 0 4px #e8ff1f, 0 0 0 9999px rgba(20, 32, 60, .74);
  transition: left .3s ease, top .3s ease, width .3s ease, height .3s ease;
  animation: obt-ring 1.6s ease-in-out infinite;
}
.obt-tour.no-target .obt-spot { left: 50%; top: 50%; width: 0; height: 0; box-shadow: 0 0 0 9999px rgba(20, 32, 60, .74); animation: none; }
.obt-arrow { position: fixed; width: 32px; height: 36px; pointer-events: none; }
.obt-arrow[hidden] { display: none; }
.obt-arrow::before {
  content: ""; position: absolute; left: 13px; width: 6px; height: 22px; border-radius: 3px; background: #e8ff1f;
}
.obt-arrow::after {
  content: ""; position: absolute; left: 4px; width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent;
}
.obt-arrow.up::before { top: 12px; }
.obt-arrow.up::after { top: 0; border-bottom: 16px solid #e8ff1f; }
.obt-arrow.down::before { top: 2px; }
.obt-arrow.down::after { top: 20px; border-top: 16px solid #e8ff1f; }
.obt-arrow.up { animation: obt-bob-up 1.1s ease-in-out infinite; }
.obt-arrow.down { animation: obt-bob-down 1.1s ease-in-out infinite; }
.obt-bubble {
  position: fixed; left: 16px; right: 16px; margin: 0 auto; max-width: 420px; box-sizing: border-box;
  padding: 18px 18px 16px; border-radius: 22px; background: #fbfdff; border: 3px solid #2e4f86;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .3); max-height: calc(100dvh - 120px); overflow: auto;
  animation: obt-in .35s cubic-bezier(.25, 1.4, .5, 1) both;
}
.obt-tour.no-target .obt-bubble { top: 50%; transform: translateY(-50%); animation: none; }
.obt-dots { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #d3202f; }
.obt-h { margin: 6px 0 0; font-family: var(--font-head); font-size: 24px; line-height: 1.15; font-weight: 800; color: #2e4f86; }
.obt-p { margin: 8px 0 0; font-size: 17px; line-height: 1.4; color: #1d2f52; }
.obt-admin .obt-bubble { border-color: #d3202f; }
.obt-admin .obt-dots::after { content: "  \00b7  admins only"; }
.obt-tree { margin-top: 10px; }
.obt-treecard { text-align: left; }
.obt-tree-name { font-size: 20px; font-weight: 800; color: #2e4f86; }
.obt-facts { margin: 8px 0 0; padding-left: 22px; }
.obt-facts li { margin: 4px 0; }

/* Get set up */
.obs { justify-content: flex-start; overflow-y: auto; }
.obs-card { width: 100%; max-width: 440px; padding-top: 8px; }
.obs-card .obt-title { text-align: left; }
.obs-card .obt-line { text-align: left; color: #1d2f52; font-weight: 600; font-size: 16px; }
.obs-list, .obs-check { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.obs-row {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 12px; box-sizing: border-box;
  border-radius: 18px; background: #ffffff; border: 2px solid #d5deee; cursor: pointer;
}
.obs-row.is-on { border-color: #2e4f86; }
.obs-row.is-na { opacity: .6; }
.obs-ico { flex: 0 0 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #e6eefa; color: #2e4f86; }
.obs-ico svg { width: 22px; height: 22px; }
.obs-own-ico { display: inline-flex; }
.obs-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.obs-label { font-weight: 800; font-size: 17px; }
.obs-why { font-size: 14px; color: #5c6f92; }
.obs-state { font-size: 14px; font-weight: 800; }
.obs-state:empty { display: none; }
.obs-state.ok { color: #1f7a3a; }
.obs-state.ok::before { content: "\2713  "; }
.obs-state.off { color: #d3202f; }
.obs-state.busy { color: #2e4f86; }
.obs-state.na { color: #5c6f92; }
.obs-help { margin: 4px 0 0; font-size: 13px; color: #1d2f52; }
.obs-help[hidden], .obs-fix[hidden], .obs-switch[hidden] { display: none; }
.obs-fix {
  flex: 0 0 auto; min-height: 48px; min-width: 64px; padding: 0 14px; border-radius: 999px; border: 2px solid #d3202f;
  background: #ffffff; color: #d3202f; font: inherit; font-weight: 800; cursor: pointer;
}
/* the switch: a big pill, On is navy */
.obs-switch {
  -webkit-appearance: none; appearance: none; flex: 0 0 auto; position: relative; width: 56px; height: 32px; margin: 8px 0;
  border-radius: 999px; background: #c5cfdf; cursor: pointer; transition: background .15s ease;
}
.obs-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s ease;
}
.obs-switch:checked { background: #2e4f86; }
.obs-switch:checked::after { transform: translateX(24px); }
.obs-switch:disabled { opacity: .5; }
.obs-foot {
  position: sticky; bottom: 0; width: 100%; max-width: 440px; margin-top: auto; padding: 14px 0 4px;
  background: #fbfdff; box-shadow: 0 -18px 18px -2px #fbfdff;
}
.obs-hint { margin: 0 0 10px; text-align: center; font-weight: 700; color: #2e4f86; }
.obs-go { min-height: 64px; font-size: 22px; }
.obs-ding { margin: 0 0 12px; padding: 12px; border-radius: 18px; background: #ffffff; border: 2px solid #2e4f86; text-align: center; }
.obs-ding-q { margin: 0; font-weight: 700; }
.obs-sheet .obs-check { margin-top: 4px; }
.obs-sheet .obs-row { cursor: default; }

/* a sheet another part opens while one of these screens shows (the thumb part's Face ID sheet in a browser, the
   push part's) goes over it, or the person could not reach it */
html.obt-open .sheet-backdrop { z-index: 9600; }
html.obt-open .sheet:not(.modeless) { z-index: 9601; }
@keyframes obt-in { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes obt-ring { 0%, 100% { box-shadow: 0 0 0 4px #e8ff1f, 0 0 0 9999px rgba(20, 32, 60, .74); } 50% { box-shadow: 0 0 0 8px #e8ff1f, 0 0 0 9999px rgba(20, 32, 60, .74); } }
@keyframes obt-bob-up { 0%, 100% { transform: none; } 50% { transform: translateY(-6px); } }
@keyframes obt-bob-down { 0%, 100% { transform: none; } 50% { transform: translateY(6px); } }
.obt-open .install-card, .obt-open .push-card { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .obt, .obt * { animation: none !important; transition: none !important; }
}
