/* ==========================================================================
   qais-app-tour.css: the QaiS phone app's What's new tour, ported to the web
   (qrm-mobile/qrm/lib/features/whats_new/whats_new_art.dart). Used by
   /mobile-app and the homepage's mobile card; the drawing code is
   qais-app-tour.js. The phone screens use the app's own tokens
   (lib/design2/tokens.dart, design_system/theme/app_palette.dart): Midnight in
   dark mode, Light in light mode, the default accent, DM Sans, Instrument
   Serif titles and JetBrains Mono counts.
   ========================================================================== */
@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url(/assets/fonts/qrm-dm-sans-400.ttf) format('truetype'); }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url(/assets/fonts/qrm-dm-sans-500.ttf) format('truetype'); }
@font-face { font-family: 'DM Sans'; font-weight: 600 800; font-display: swap; src: url(/assets/fonts/qrm-dm-sans-600.ttf) format('truetype'); }
@font-face { font-family: 'Instrument Serif'; font-weight: 400; font-display: swap; src: url(/assets/fonts/qrm-instrument-serif-400.ttf) format('truetype'); }

/* The app's Midnight palette (dark) and Light palette. */
.qa-phone {
  --q-bg: #111111; --q-card: #171717; --q-s2: #1C1C1C; --q-hl: #222222; --q-hl2: #2A2A2A;
  --q-t1: #E8E8E8; --q-t2: #9A9595; --q-t3: #7C7C7C; --q-btn: #E8E8E8; --q-btnfg: #101010;
  --q-acc: #3B82F6; --q-ok: #10B981; --q-warn: #F59E0B; --q-bad: #EF4444; --q-info: #3B82F6;
  --q-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
[data-theme="light"] .qa-phone {
  --q-bg: #FAFAF9; --q-card: #FFFFFF; --q-s2: #F0F0EE; --q-hl: #DBD9D4; --q-hl2: #C9C6C0;
  --q-t1: #1A1A1A; --q-t2: #6B6B6B; --q-t3: #757575; --q-btn: #282822; --q-btnfg: #FFFFFF;
  --q-ok: #0E8A63; --q-warn: #B45309; --q-bad: #DC2626; --q-info: #2563EB;
  --q-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

/* The phone: built at 320 x 640 and scaled to the width the page gives it. */
.qa-phone { position: relative; width: 100%; aspect-ratio: 1 / 2; --qa-s: 1; }
.qa-dev {
  position: absolute; left: 0; top: 0; width: 320px; height: 640px; transform-origin: 0 0; transform: scale(var(--qa-s));
  border-radius: 50px; background: #17181B;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .1), 0 0 0 1px rgba(255, 255, 255, .07), 0 40px 80px -32px rgba(0, 0, 0, .7);
}
[data-theme="light"] .qa-dev { background: #0D0E10; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .08), 0 36px 70px -30px rgba(20, 22, 26, .38); }
.qa-scr {
  position: absolute; left: 10px; top: 10px; width: 300px; height: 620px; border-radius: 40px; overflow: hidden;
  background: var(--q-bg); color: var(--q-t1);
  font: 500 11px/1.3 'DM Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased; text-align: left;
}
.qa-island { position: absolute; left: 50%; top: 18px; width: 80px; height: 23px; margin-left: -40px; border-radius: 12px; background: #000; z-index: 9; }
.qa-status { position: absolute; left: 0; right: 0; top: 0; height: 36px; padding: 12px 24px 0 30px; display: flex; justify-content: space-between; align-items: flex-start; font: 600 12.5px/1 'DM Sans', sans-serif; color: var(--q-t1); z-index: 8; }
.qa-status i { display: flex; gap: 5px; align-items: center; font-style: normal; }
.qa-status svg { display: block; }
.qa-home { position: absolute; left: 50%; bottom: 6px; width: 100px; height: 4px; margin-left: -50px; border-radius: 2px; background: var(--q-t1); opacity: .5; z-index: 8; }

/* One drawing per layer. The hero phone stacks all eight and cross-fades. */
.qa-layer { position: absolute; left: 0; top: 36px; width: 300px; height: 584px; overflow: hidden; transition: opacity .35s cubic-bezier(.22, 1, .36, 1); }
.qa-layer.is-off { opacity: 0; visibility: hidden; transition: opacity .35s cubic-bezier(.22, 1, .36, 1), visibility 0s .35s; }
.qa-layer > * { position: absolute; }
.qa-layer .qa-flow { position: static; }

/* Shared parts (the _T, _Pill, _Tag, _Avatar … widgets of the Dart file). */
.qa-t { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 1.3; min-width: 0; }
.qa-t.l2, .qa-t.l3 { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; }
.qa-t.l2 { -webkit-line-clamp: 2; }
.qa-t.l3 { -webkit-line-clamp: 3; }
.qa-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 400; }
.qa-title { font: 400 24px/1.1 'Instrument Serif', Georgia, serif; letter-spacing: -.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--q-t1); }
.qa-row { display: flex; align-items: center; min-width: 0; }
.qa-row.top { align-items: flex-start; }
.qa-row > .qa-grow { flex: 1; min-width: 0; }
.qa-ic { display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qa-ic.fill { fill: currentColor; stroke: none; }
.qa-phone .qa-av { flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; line-height: 1; }
.qa-ch { flex: none; display: grid; place-items: center; color: #fff; }
.qa-card { background: var(--q-card); border: 1px solid var(--q-hl); border-radius: 14px; }
.qa-shadow { box-shadow: var(--q-shadow); }
.qa-pill { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 11px; border-radius: 22px; background: var(--q-card); border: 1px solid var(--q-hl); color: var(--q-t2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.qa-pill.dense { height: 24px; font-size: 11px; }
.qa-pill.icon { padding: 0 8px; }
.qa-pill.on { background: var(--q-btn); border-color: var(--q-btn); color: var(--q-btnfg); }
.qa-pill .n { font: 400 11px 'JetBrains Mono', monospace; color: var(--q-acc); margin-left: 1px; }
.qa-pill.on .n { color: inherit; }
.qa-tag { flex: none; display: inline-block; padding: 2px 6px; border-radius: 6px; font-size: 9.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.qa-round { flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--q-btn); color: var(--q-btnfg); }
.qa-press { position: absolute; width: 46px; height: 46px; display: grid; place-items: center; pointer-events: none; }
.qa-press i { display: block; border-radius: 50%; border: 2px solid transparent; }
.qa-sheet { left: 0; right: 0; bottom: 0; padding: 8px 18px 12px; background: var(--q-card); border: 1px solid var(--q-hl); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: var(--q-shadow); z-index: 6; will-change: transform; }
.qa-grab { width: 36px; height: 4px; margin: 0 auto 10px; border-radius: 2px; background: var(--q-hl2); }

/* The app's tab bar (Deck, Messages, Work, Alerts, More), as on the real screens. */
.qa-phone .qa-nav { left: 12px; right: 12px; bottom: 14px; height: 56px; display: flex; align-items: center; border-radius: 28px; background: color-mix(in srgb, var(--q-card) 94%, transparent); border: 1px solid var(--q-hl); box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .35); z-index: 5; }
.qa-phone .qa-nav span { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 8.5px; color: var(--q-t2); }
.qa-phone .qa-nav span.on { color: var(--q-acc); font-weight: 600; }
.qa-phone .qa-nav b { position: absolute; top: -5px; left: calc(50% + 4px); min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: #EF4444; color: #fff; font: 400 8.5px/15px 'JetBrains Mono', monospace; text-align: center; }

/* Page controls around a phone (pause, the hero's chapter bar). */
.qa-ctl { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 10px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--fg-2); font: 500 13px var(--sans); cursor: pointer; transition: color .2s var(--ease), border-color .2s var(--ease); }
.qa-ctl:hover { color: var(--fg); border-color: rgba(var(--ov), .35); }
.qa-ctl:focus-visible, .qa-seg:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.qa-ctl svg { width: 14px; height: 14px; fill: currentColor; }
.qa-ctl .play { display: none; }
.qa-ctl[aria-pressed="true"] .play { display: block; }
.qa-ctl[aria-pressed="true"] .pause { display: none; }

@media (prefers-reduced-motion: reduce) {
  .qa-layer, .qa-layer.is-off { transition: none; }
  .qa-ctl[data-qa-pause] { display: none; }
}
