/* The dark room: a page for holders of the coin, with an assistant that runs in the visitor's browser.
   Tokens, text styles, header and footer come from style.css; the phone comes from demo.css. */
.wrap.wide { max-width: 1180px; }
.dr-head { max-width: 680px; }
.dr-head h1 { margin-top: var(--sp-100); }
@media (min-width: 768px) { .dr-head h1 { font-size: 48px; line-height: 48px; } }

.room { display: grid; gap: var(--sp-500); margin-top: var(--sp-500); }
@media (min-width: 1024px) { .room { grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-700); align-items: start; } }

/* The steps: one is open at a time, the ones before it are ticked */
.wrap .gate { display: flex; flex-direction: column; gap: var(--sp-75); max-width: 560px; margin: 0; padding: 0; list-style: none; counter-reset: g; }
.wrap .gate > li { margin: 0; padding: var(--sp-300); border-radius: var(--r-lg); background: var(--s1); counter-increment: g; transition: opacity 300ms var(--ease); }
.gate > li[data-on="wait"] { opacity: 0.5; }
.gate-top { display: flex; align-items: center; gap: var(--sp-100); }
.gate-top::before { content: "(0" counter(g) ")"; font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--dim); }
.wrap .gate h2 { flex: 1; margin: 0; font-size: 18px; line-height: 28px; font-weight: 600; }
.gate-tick { display: none; width: 16px; height: 16px; fill: var(--safe); }
.gate > li[data-on="done"] .gate-tick { display: block; }
.wrap .gate p { margin: var(--sp-75) 0 0; color: var(--dim); font-size: 14px; line-height: 20px; }
.gate-body[hidden] { display: none; }
.gate .buttons { margin: var(--sp-200) 0 0; }
.gate .button[disabled] { opacity: 0.5; cursor: default; }
.wrap .gate .say { min-height: 20px; color: var(--soft); }
.wrap .gate .say.bad { color: var(--help); }
.pick { display: grid; gap: var(--sp-75); margin-top: var(--sp-200); }
.pick button {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-25) var(--sp-200); align-items: center; width: 100%; min-height: 48px;
  padding: var(--sp-100) var(--sp-200); border: 0; border-radius: var(--r-md); background: var(--s3); color: var(--fg); text-align: left; cursor: pointer;
  transition: transform 500ms var(--ease), background-color 300ms var(--ease);
}
.pick button:hover { background: var(--s4); }
.pick button:active { transform: scale(0.98); }
.pick button[disabled] { opacity: 0.5; cursor: default; }
.pick b { font-size: 16px; line-height: 24px; font-weight: 500; }
.pick .why { grid-column: 1; font-size: 12px; line-height: 16px; color: var(--dim); }
.pick .sz { grid-row: 1 / span 2; grid-column: 2; font-family: var(--mono); font-size: 12px; line-height: 16px; text-transform: uppercase; color: var(--soft); }
/* Download progress: a bar that grows by scale, never by width */
.bar { height: 4px; margin-top: var(--sp-200); border-radius: var(--r-full); background: var(--s3); overflow: hidden; }
.bar[hidden] { display: none; }
.bar span { display: block; height: 100%; background: var(--fg); transform: scaleX(0); transform-origin: 0 50%; transition: transform 500ms var(--ease); }

/* The phone: the app's Ask screen, locked until the steps are done */
.room-phone { display: flex; justify-content: center; }
.dr-lock { position: absolute; inset: 0; display: grid; place-content: center; gap: var(--sp-75); padding: var(--sp-300); text-align: center; }
.dr-lock[hidden] { display: none; }
.dr-lock b { font-family: var(--mono); font-size: 12px; line-height: 16px; font-weight: 500; text-transform: uppercase; color: var(--dim); }
.dr-lock span { font-size: 14px; line-height: 20px; color: var(--faint); }
.scr[hidden] { display: none; }
/* The fixed note under an answer that mentions medicine amounts. Red here means danger, as it means help in the app. */
.dr-warn { max-width: 84%; padding: 0 var(--sp-50); font-size: 12px; line-height: 16px; font-weight: 600; color: var(--help); }
/* The page's own heading and paragraph rules must not reach into the phone */
.wrap .p-title { margin: 0; font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.02em; }
.wrap .p-sub { margin: 0; }

/* What the page contacts, in plain words */
.wrap .tells { max-width: 680px; margin-top: var(--sp-700); }
.wrap .tells li { color: var(--dim); }

@media (prefers-reduced-motion: reduce) {
  .pick button, .bar span { transition: background-color 300ms var(--ease); }
  .pick button:active { transform: none; }
}
