@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-hyperlegible-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-hyperlegible-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --page: #0a0a0a;
  --card: #ffffff;
  --ink: #111111;
  --ink-2: #4a5254;
  --line: #e3e6e6;
  --field-line: #6b7577;
  --field-bg: #fafafa;
  --soft: #f1f3f3;
  --on-dark: #ffffff;
  --on-dark-2: #b9c0c1;
  --urgent: #b3261e;
  --urgent-soft: #fbe9e7;
  --urgent-ink: #8a1c15;
  --tabs-height: 4.5rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --radius-card: 24px;
  --radius-control: 14px;
  --font: "Atkinson Hyperlegible", "Atkinson Hyperlegible Next", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background-color: var(--page);
  background-image: url("textures/grain.png");
  background-size: 240px 240px;
  background-attachment: fixed;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

p {
  margin: 0;
}

.backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.backdrop::before,
.backdrop::after {
  content: "";
  position: absolute;
  background-image: url("textures/paths.svg");
  background-repeat: repeat;
  will-change: transform;
}

.backdrop::before {
  inset: -240px;
  background-size: 240px 240px;
  opacity: 0.055;
  animation: drift-near 90s linear infinite;
}

.backdrop::after {
  inset: -384px;
  background-size: 384px 384px;
  background-position: 150px 90px;
  opacity: 0.03;
  animation: drift-far 160s linear infinite;
}

@keyframes drift-near {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-240px, -240px, 0);
  }
}

@keyframes drift-far {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(384px, -384px, 0);
  }
}

.screen {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.card {
  width: min(100%, 26rem);
  padding: 2rem 1.75rem 1.75rem;
  border-radius: var(--radius-card);
  background: var(--card);
  color: var(--ink);
}

.brand {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.agency {
  margin-bottom: 1.25rem;
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.lockup {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mark {
  width: 4.25rem;
  height: auto;
  flex: none;
}

.name {
  margin: 0;
  line-height: 0.9;
}

.name-bz {
  display: block;
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.name-path {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lede {
  margin-top: 1.25rem;
  color: var(--ink-2);
  font-size: 1.125rem;
  line-height: 1.4;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.field label {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

input[type="password"],
input[type="text"],
select {
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--field-line);
  border-radius: var(--radius-control);
  background-color: var(--field-bg);
  color: var(--ink);
  font: 400 1.125rem/1.3 var(--font);
  appearance: none;
  transition: border-color 120ms ease, background-color 120ms ease;
}

input[type="password"]:hover,
input[type="text"]:hover,
select:hover {
  border-color: var(--ink);
}

input[type="password"]:focus,
input[type="text"]:focus,
select:focus {
  border-color: var(--ink);
  background-color: var(--card);
}

select {
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.2 6 6.2 11 1.2' fill='none' stroke='%23111111' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 0.75rem 0.5rem;
  cursor: pointer;
}

.show-password {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  margin: -0.25rem 0 0.75rem;
  font-size: 1rem;
  line-height: 1.3;
  cursor: pointer;
}

.show-password input {
  width: 1.3rem;
  height: 1.3rem;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--ink);
  color: #ffffff;
  font: 700 1.25rem/1 var(--font);
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms var(--ease-out), box-shadow 200ms ease, opacity 200ms ease;
}

button:hover {
  background: #2b2b2b;
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  background: #3a3a3a;
  cursor: wait;
}

button.is-loading,
button.is-loading:disabled {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  background: var(--ink);
}

.spinner {
  width: 1.15rem;
  height: 1.15rem;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

button.secondary {
  border: 1.5px solid var(--ink);
  background: var(--card);
  color: var(--ink);
}

button.secondary:hover {
  background: var(--field-bg);
}

.hint {
  margin-top: 1rem;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
}

.error {
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-control);
  background: var(--card);
  font-size: 1rem;
  line-height: 1.4;
}

.error[hidden] {
  display: none;
}

.error-title {
  margin-bottom: 0.15rem;
  font-weight: 700;
}

[hidden] {
  display: none !important;
}

/* Signed-in app */

.app {
  position: relative;
  z-index: 1;
  width: min(100%, 34rem);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 0.75rem calc(var(--tabs-height) + 1.25rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  min-height: 4.25rem;
  padding: calc(0.5rem + env(safe-area-inset-top)) 0 0.5rem;
  background: var(--page);
  color: var(--on-dark);
}

.topbar-side {
  display: flex;
}

.topbar-side-end {
  justify-content: flex-end;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.topbar-mark {
  width: 1.75rem;
  height: 1.75rem;
}

.topbar-button {
  width: auto;
  min-width: 5rem;
  min-height: 48px;
  padding: 0 1.1rem;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: transparent;
  color: var(--on-dark);
  font-size: 1.125rem;
}

.topbar-button:hover {
  border-color: var(--on-dark);
  background: rgba(255, 255, 255, 0.08);
}

.view {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.view:focus {
  outline: none;
}

.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1.35rem 1.5rem;
  border-radius: var(--radius-card);
  background: var(--card);
  color: var(--ink);
}

.panel + .panel {
  margin-top: 0.75rem;
}

.panel h1 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.panel h1:focus {
  outline: none;
}

.panel h2 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.muted {
  color: var(--ink-2);
}

.small {
  font-size: 1rem;
}

.panel-foot {
  margin-top: auto;
  padding-top: 1.5rem;
  color: var(--ink-2);
  font-size: 1rem;
}

.empty {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-control);
  background: var(--soft);
}

.empty button {
  margin-top: 0.85rem;
}

/* Bottom tabs */

.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 34rem);
  margin: 0 auto;
  padding: 0 0.5rem env(safe-area-inset-bottom);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--page);
}

.tab {
  position: relative;
  width: auto;
  min-height: var(--tabs-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.5rem 0.25rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--on-dark-2);
  font: 700 1rem/1.1 var(--font);
  text-decoration: none;
  transition: color 220ms ease;
}

button.tab:hover,
a.tab:hover {
  background: transparent;
  color: var(--on-dark);
}

.tab svg {
  width: 1.5rem;
  height: 1.5rem;
}

.tab[aria-current="page"] {
  color: var(--on-dark);
}

.tab[aria-current="page"] svg {
  animation: tab-bump 460ms var(--ease-spring);
}

.tab-indicator {
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--on-dark);
  opacity: 0;
  pointer-events: none;
  transition: transform 460ms var(--ease-out), width 460ms var(--ease-out), opacity 200ms ease;
}

.tab-indicator.instant {
  transition: none;
}

/* Home */

.search {
  margin-top: 1.25rem;
}

.search label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1rem;
  font-weight: 700;
}

input[type="search"] {
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--field-line);
  border-radius: var(--radius-control);
  background-color: var(--field-bg);
  color: var(--ink);
  font: 400 1.125rem/1.3 var(--font);
  appearance: none;
}

input[type="search"]:hover,
input[type="search"]:focus {
  border-color: var(--ink);
  background-color: var(--card);
}

.stage + .stage {
  margin-top: 0.25rem;
}

.stage h2 {
  margin: 1.6rem 0 0.7rem;
  color: var(--ink-2);
  font-size: 1rem;
}

.pathway-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pathway-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 64px;
  padding: 0.85rem 0.9rem 0.85rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 180ms var(--ease-out);
}

.pathway-row:hover {
  border-color: var(--ink);
  background: var(--field-bg);
}

.pathway-row:active {
  transform: scale(0.985);
}

.pathway-row .chevron {
  transition: transform 260ms var(--ease-out);
}

.pathway-row:hover .chevron {
  transform: translateX(3px);
}

.pathway-row-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  font-weight: 700;
  line-height: 1.3;
}

.chevron {
  flex: none;
  width: 0.75rem;
  height: 1.2rem;
}

.tag {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border: 1.5px solid var(--ink-2);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

/* Route line */

.route {
  margin: 0;
  padding: 0;
  list-style: none;
}

.stop {
  position: relative;
  padding: 0 0 1.35rem 2.75rem;
  font-size: 1.125rem;
  line-height: 1.4;
}

.stop::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--ink);
}

.stop:first-child::before {
  top: 0.7em;
}

.stop:last-child {
  padding-bottom: 0;
}

.stop:last-child::before {
  bottom: auto;
  height: 0.7em;
}

.marker {
  position: absolute;
  left: 8px;
  top: calc(0.7em - 8px);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
}

.stop-origin .marker {
  border: 3px solid var(--ink);
  background: var(--card);
}

.stop-origin .stop-label {
  font-weight: 700;
}

.stop-action .marker {
  border-radius: 4px;
}

.stop-label {
  display: block;
  color: var(--ink-2);
}

.stop-answer {
  display: block;
  font-weight: 700;
}

.stop-current .marker {
  left: 2px;
  top: calc(0.7em - 14px);
  width: 28px;
  height: 28px;
  border: 6px solid var(--ink);
  background: var(--card);
}

.stop-current.stop-action .marker {
  border-radius: 7px;
}

.stop-current-question {
  font-size: 1.75rem;
  line-height: 1.2;
}

.stop-current-question:last-child::before {
  height: 0.6em;
}

.stop-current-question .marker {
  top: calc(0.6em - 14px);
}

.stop-current-text {
  display: block;
  font-weight: 700;
  color: var(--ink);
}

.stop-current.stop-action .stop-current-text {
  margin-top: 0.35rem;
  font-size: 1.5rem;
  line-height: 1.25;
}

.stop-help {
  display: block;
  margin-top: 0.6rem;
  color: var(--ink-2);
  font-size: 1.125rem;
  line-height: 1.4;
}

.stop-end .marker {
  left: 4px;
  top: calc(0.7em - 12px);
  width: 24px;
  height: 24px;
  border: 5px solid var(--ink);
  background: var(--card);
}

.stop-end.is-emergency .marker {
  border-color: var(--urgent);
}

.stop-end .stop-label {
  color: var(--ink);
  font-weight: 700;
}

/* Step screens */

.step-panel .route {
  margin-bottom: 2rem;
}

.answers {
  display: grid;
  gap: 0.75rem;
  margin-top: auto;
}

.answers.two {
  grid-template-columns: 1fr 1fr;
}

.answer {
  min-height: 68px;
  font-size: 1.375rem;
}

/* Outcome */

.urgency {
  padding: 1.25rem 1.25rem 1.35rem;
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--on-dark);
}

.urgency.is-emergency {
  background: var(--urgent);
}

.urgency-label {
  margin-bottom: 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}

.urgency h1 {
  font-size: 1.5rem;
  line-height: 1.25;
}

.checklist {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
}

.checklist li {
  position: relative;
  padding-left: 2.6rem;
  counter-increment: item;
}

.checklist li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-dark);
  font-size: 1rem;
  font-weight: 700;
}

.note {
  margin-top: 1.25rem;
  padding: 0.95rem 1rem;
  border-left: 4px solid var(--ink);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: var(--soft);
}

.note-title {
  margin-bottom: 0.2rem;
  font-weight: 700;
}

.calls {
  display: grid;
  gap: 0.6rem;
}

.call {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  min-height: 64px;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--on-dark);
  text-decoration: none;
}

.call:hover {
  background: #2b2b2b;
}

.call.is-emergency {
  background: var(--urgent);
}

.call.is-emergency:hover {
  background: var(--urgent-ink);
}

.call-name {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
}

.call-number {
  font-size: 1rem;
  opacity: 0.85;
}

.call-missing {
  padding: 0.75rem 1.1rem;
  border: 1.5px dashed var(--field-line);
  border-radius: var(--radius-control);
}

.call-missing .call-name {
  font-size: 1.125rem;
}

.meta {
  margin-top: 1.75rem;
  color: var(--ink-2);
  font-size: 1rem;
}

.meta p + p {
  margin-top: 0.25rem;
}

.restart {
  margin-top: 1.25rem;
}

/* Fail-safe */

.failsafe {
  padding: 1.25rem;
  border-radius: var(--radius-control);
  background: var(--urgent-soft);
  color: var(--urgent-ink);
}

.failsafe h1 {
  color: var(--urgent-ink);
  font-size: 1.5rem;
  line-height: 1.25;
}

.failsafe p {
  margin-top: 0.5rem;
}

/* Contacts and videos */

.contact-list,
.video-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.contact {
  padding: 1rem 1.1rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-control);
}

.contact-name {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.contact-purpose {
  margin-top: 0.25rem;
  color: var(--ink-2);
}

.contact-call {
  margin-top: 0.85rem;
}

.call-missing span {
  display: block;
}

.video-button {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 0.9rem 1.1rem;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 1.125rem;
  line-height: 1.3;
  text-align: left;
}

.video-button:hover {
  border-color: var(--ink);
  background: var(--field-bg);
}

.video-description {
  color: var(--ink-2);
  font-weight: 400;
}

.player {
  overflow: hidden;
  border-radius: var(--radius-control);
  background: #000000;
  aspect-ratio: 16 / 9;
}

.player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-close {
  margin-top: 0.6rem;
}

/* Hide */

.hide-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #000000;
}

.unhide {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  border-radius: 0;
  background: #000000;
  color: #3a3a3a;
  font-size: 0.8rem;
  font-weight: 400;
}

.unhide:hover {
  background: #000000;
}

body.is-hidden .backdrop {
  display: none;
}

/* Motion */

@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
}

@keyframes drop-in {
  from {
    opacity: 0;
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@keyframes leave {
  to {
    opacity: 0;
    transform: translate3d(0, -14px, 0) scale(0.96);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
}

@keyframes settle {
  from {
    transform: scale(1.75);
  }
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translate3d(-8px, 0, 0);
  }
}

@keyframes grow-y {
  from {
    transform: scaleY(0);
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-9px);
  }
  40% {
    transform: translateX(7px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(3px);
  }
}

@keyframes tabs-in {
  from {
    transform: translate3d(0, 100%, 0);
  }
}

@keyframes tab-bump {
  40% {
    transform: translateY(-3px) scale(1.1);
  }
}

@keyframes wipe {
  from {
    clip-path: inset(0 0 100% 0 round var(--radius-control));
  }
  to {
    clip-path: inset(0 0 0 0 round var(--radius-control));
  }
}

@keyframes sheen {
  from {
    transform: translateX(-160%) skewX(-18deg);
  }
  to {
    transform: translateX(320%) skewX(-18deg);
  }
}

@keyframes pulse-urgent {
  from {
    box-shadow: 0 0 0 0 rgba(179, 38, 30, 0.45);
  }
  to {
    box-shadow: 0 0 0 14px rgba(179, 38, 30, 0);
  }
}

@keyframes pulse-ink {
  from {
    box-shadow: 0 0 0 0 rgba(17, 17, 17, 0.3);
  }
  to {
    box-shadow: 0 0 0 12px rgba(17, 17, 17, 0);
  }
}

@keyframes shimmer {
  from {
    background-position: 150% 0;
  }
  to {
    background-position: -50% 0;
  }
}

/* Boot splash: only shows when the first load is slow. */

.boot {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  color: var(--on-dark);
  pointer-events: none;
  animation: fade-in 400ms var(--ease-out) 350ms both;
}

.boot.is-done {
  animation: fade-out 240ms var(--ease-in) forwards;
}

.boot-mark {
  width: 4.5rem;
}

/* Logo drawing */

.mark .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 560ms var(--ease-out) both;
  animation-delay: var(--d, 0ms);
}

.mark .pill {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 560ms var(--ease-spring) both;
  animation-delay: var(--d, 0ms);
}

/* Sign in */

.card {
  animation: rise 640ms var(--ease-out) both;
}

.card .agency {
  animation: fade-in 600ms var(--ease-out) 150ms both;
}

.card .name-bz {
  animation: rise 600ms var(--ease-out) 300ms both;
}

.card .name-path {
  animation: rise 600ms var(--ease-out) 380ms both;
}

.card .lede {
  animation: rise 600ms var(--ease-out) 460ms both;
}

#login-form > * {
  animation: rise 560ms var(--ease-out) both;
  animation-delay: calc(520ms + var(--i, 0) * 60ms);
}

#login-form > .error {
  animation: drop-in 360ms var(--ease-out) both;
}

.card.is-leaving {
  animation: leave 380ms var(--ease-in) forwards;
}

.card.shake {
  animation: shake 440ms ease both;
}

/* App shell */

.app.is-entering .topbar {
  animation: drop-in 560ms var(--ease-out) both;
}

.app.is-entering .tabs {
  animation: tabs-in 620ms var(--ease-out) 160ms both;
}

.app.is-returning {
  animation: fade-in 240ms ease-out both;
}

.app.is-leaving {
  animation: fade-out 280ms var(--ease-in) forwards;
}

.panel.enter {
  animation: rise 520ms var(--ease-out) both;
}

.app.is-entering .panel.enter {
  animation-delay: 120ms;
}

.enter .stagger {
  animation: rise 520ms var(--ease-out) both;
  animation-delay: calc(160ms + var(--i, 0) * 55ms);
}

.app.is-entering .enter .stagger {
  animation-delay: calc(300ms + var(--i, 0) * 60ms);
}

.empty {
  animation: fade-in 260ms ease-out both;
}

.player {
  animation: rise 440ms var(--ease-out) both;
}

.unhide {
  animation: fade-in 700ms ease-out 900ms both;
}

/* Route line: forming as you answer */

.stop.line-grows::before {
  transform-origin: top;
  animation: grow-y 260ms var(--ease-out) both;
}

.stop.seg-a::before {
  animation-delay: var(--ld-a, 0ms);
}

.stop.seg-b::before {
  animation-delay: var(--ld-b, 0ms);
}

.stop-origin.is-arriving .marker {
  animation: pop 480ms var(--ease-spring) 120ms both;
}

.stop-origin.is-arriving .stop-label {
  animation: fade-in 420ms var(--ease-out) 80ms both;
}

.stop.is-fresh .marker {
  animation: settle 460ms var(--ease-out) both;
}

.stop.is-fresh .stop-answer {
  animation: slide-in 420ms var(--ease-out) 140ms both;
}

.stop-current.is-arriving .marker {
  animation: pop 520ms var(--ease-spring) both;
  animation-delay: var(--md, 0ms);
}

.stop-current.is-arriving .stop-label,
.stop-current.is-arriving .stop-current-text {
  animation: rise 480ms var(--ease-out) both;
  animation-delay: var(--td, 0ms);
}

.stop-current.is-arriving .stop-help {
  animation: rise 480ms var(--ease-out) both;
  animation-delay: calc(var(--td, 0ms) + 70ms);
}

.answers.is-arriving .answer {
  animation: rise 460ms var(--ease-out) both;
  animation-delay: calc(var(--ad, 0ms) + var(--i, 0) * 60ms);
}

.answers.has-choice .answer:not(.is-chosen) {
  opacity: 0.3;
}

.answer.is-chosen {
  box-shadow: 0 0 0 3px var(--card), 0 0 0 6px var(--ink);
  transform: scale(0.98);
}

.morph-ghost {
  position: fixed;
  z-index: 2;
  margin: 0;
  color: var(--ink);
  pointer-events: none;
  transform-origin: top left;
}

/* Preparing the outcome */

.stop-resolving .marker {
  left: 4px;
  top: calc(0.7em - 12px);
  width: 24px;
  height: 24px;
  border: 4px solid var(--line);
  background: var(--card);
  animation: pop 480ms var(--ease-spring) 200ms both;
}

.stop-resolving .marker::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 4px solid transparent;
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}

.stop-resolving.is-resolved .marker {
  border-color: var(--ink);
  animation: pulse-ink 700ms ease-out both;
}

.stop-resolving.is-resolved.is-emergency .marker {
  border-color: var(--urgent);
  animation: pulse-urgent 700ms ease-out both;
}

.stop-resolving.is-resolved .marker::after {
  display: none;
}

.resolving-label {
  display: block;
  font-weight: 700;
  background: linear-gradient(90deg, var(--ink-2) 0%, var(--ink-2) 38%, #c4cbcc 50%, var(--ink-2) 62%, var(--ink-2) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fade-in 360ms ease-out 220ms both, shimmer 1.4s linear infinite;
}

.skeleton {
  display: grid;
  gap: 0.7rem;
  margin-top: auto;
  padding-top: 2rem;
}

.skeleton span {
  height: 0.9rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--soft) 0%, #e2e6e6 50%, var(--soft) 100%);
  background-size: 200% 100%;
  animation: rise 420ms var(--ease-out) both, shimmer 1.2s linear infinite;
  animation-delay: calc(240ms + var(--i, 0) * 80ms), 0ms;
}

.skeleton span:nth-child(1) {
  width: 92%;
}

.skeleton span:nth-child(2) {
  width: 76%;
}

.skeleton span:nth-child(3) {
  width: 58%;
}

/* Outcome reveal */

.urgency {
  position: relative;
  overflow: hidden;
}

.urgency::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-160%) skewX(-18deg);
  pointer-events: none;
}

.is-revealing .urgency {
  animation: wipe 600ms var(--ease-out) both;
}

.is-revealing .urgency.is-emergency {
  animation: wipe 600ms var(--ease-out) both, pulse-urgent 1s ease-out 700ms 2;
}

.is-revealing .urgency::after {
  animation: sheen 1200ms var(--ease-out) 450ms both;
}

.is-revealing .urgency-label {
  animation: rise 500ms var(--ease-out) 160ms both;
}

.is-revealing .urgency h1 {
  animation: rise 500ms var(--ease-out) 230ms both;
}

.is-revealing .reveal {
  animation: rise 520ms var(--ease-out) both;
  animation-delay: calc(320ms + var(--i, 0) * 80ms);
}

.is-revealing .checklist li {
  animation: rise 480ms var(--ease-out) both;
  animation-delay: calc(400ms + var(--i, 0) * 90ms);
}

.is-revealing .checklist li::before {
  animation: pop 480ms var(--ease-spring) both;
  animation-delay: calc(460ms + var(--i, 0) * 90ms);
}

.is-revealing .call.is-emergency {
  animation: pulse-urgent 1s ease-out 1100ms 2;
}

.is-revealing .route .stop {
  animation: fade-in 380ms var(--ease-out) both;
  animation-delay: calc(760ms + var(--i, 0) * 100ms);
}

.is-revealing .route .stop::before {
  transform-origin: top;
  animation: grow-y 300ms var(--ease-out) both;
  animation-delay: calc(760ms + var(--i, 0) * 100ms);
}

.is-revealing .route .stop-end .marker {
  animation: pop 560ms var(--ease-spring) both, pulse-ink 900ms ease-out both;
  animation-delay: calc(820ms + var(--i, 0) * 100ms), calc(1200ms + var(--i, 0) * 100ms);
}

.is-revealing .route .stop-end.is-emergency .marker {
  animation: pop 560ms var(--ease-spring) both, pulse-urgent 900ms ease-out both;
  animation-delay: calc(820ms + var(--i, 0) * 100ms), calc(1200ms + var(--i, 0) * 100ms);
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.topbar :focus-visible,
.tabs :focus-visible,
.hide-screen :focus-visible {
  outline-color: var(--on-dark);
}

@media (max-width: 380px) {
  .screen {
    padding: 0.75rem;
  }

  .card {
    padding: 1.6rem 1.25rem 1.4rem;
    border-radius: 20px;
  }

  .app {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .panel {
    padding: 1.35rem 1.1rem 1.25rem;
    border-radius: 20px;
  }

  .topbar-name {
    display: none;
  }

  .answers.two {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .backdrop::before,
  .backdrop::after {
    animation: none !important;
  }
}
