/* =========================================================================
   VITALi app screens (2026-10-09)

   Every phone on the site is real HTML that has to look like a screenshot of the app. Each screen is
   authored at the iPhone's own size, 393 x 852 points, with the app's own measurements (taken from the
   store screenshots in App/docs/store/raw), and the whole screen is scaled down with one number:
   --k on the .dev element. Nothing inside a screen is ever sized for the website.

   Screens are dark like the app on the dark site, and drawn in cream on the light site (tokens at the end).
   They cannot be selected, dragged or tapped: a screenshot cannot.

   Anatomy:
     .dev                 the device; set --k to size it (screen width = 393px * k)
       .dev-screen        the glass
         .as              one app screen at 393 x 852 (several can be stacked: .as.is-layer)
           .as-status     time + icons, the Dynamic Island sits above it
           .as-body       the scrolling content
           .as-tabs       the five-tab bar
   ========================================================================= */

.dev {
  --k: 0.72;
  --bz: calc(13px * var(--k));
  position: relative;
  width: calc(393px * var(--k) + var(--bz) * 2);
  height: calc(852px * var(--k) + var(--bz) * 2);
  padding: var(--bz);
  border-radius: calc(68px * var(--k));
  background: linear-gradient(145deg, #3b3d42 0%, #1a1b1e 22%, #0c0c0d 50%, #1d1e21 78%, #44464c 100%);
  box-shadow:
    inset 0 0 0 calc(1.5px * var(--k)) rgba(255, 255, 255, 0.14),
    inset 0 0 0 calc(4px * var(--k)) #060607,
    0 calc(50px * var(--k)) calc(90px * var(--k)) calc(-30px * var(--k)) rgba(0, 0, 0, 0.75),
    0 calc(18px * var(--k)) calc(40px * var(--k)) calc(-18px * var(--k)) rgba(0, 0, 0, 0.6);
  flex: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
  isolation: isolate;
}
[data-theme="light"] .dev {
  box-shadow:
    inset 0 0 0 calc(1.5px * var(--k)) rgba(255, 255, 255, 0.18),
    inset 0 0 0 calc(4px * var(--k)) #060607,
    0 calc(50px * var(--k)) calc(90px * var(--k)) calc(-34px * var(--k)) rgba(21, 24, 28, 0.42),
    0 calc(18px * var(--k)) calc(40px * var(--k)) calc(-20px * var(--k)) rgba(21, 24, 28, 0.3);
}
/* Side buttons */
.dev::before,
.dev::after {
  content: "";
  position: absolute;
  width: calc(3px * var(--k));
  border-radius: 2px;
  background: linear-gradient(90deg, #2a2b2f, #4a4c52);
}
.dev::before {
  left: calc(-2px * var(--k));
  top: calc(190px * var(--k));
  height: calc(64px * var(--k));
  box-shadow: 0 calc(84px * var(--k)) 0 #34363b;
}
.dev::after {
  right: calc(-2px * var(--k));
  top: calc(240px * var(--k));
  height: calc(100px * var(--k));
}
.dev-screen {
  position: relative;
  width: calc(393px * var(--k));
  height: calc(852px * var(--k));
  border-radius: calc(55px * var(--k));
  overflow: hidden;
  background: var(--as-bg);
  /* Safari clips transformed children to the radius only with a mask */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  transform: translateZ(0);
}
/* Faint glass reflection, the difference between a picture of a screen and a flat rectangle */
.dev-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 28%, transparent 46%);
}
.dev-island {
  position: absolute;
  z-index: 40;
  top: calc(11px * var(--k));
  left: 50%;
  width: calc(124px * var(--k));
  height: calc(36px * var(--k));
  margin-left: calc(-62px * var(--k));
  border-radius: 999px;
  background: #000;
}

/* --- The screen itself, at 393 x 852 ------------------------------------- */
.as {
  position: absolute;
  top: 0;
  left: 0;
  width: 393px;
  height: 852px;
  transform: scale(var(--k));
  transform-origin: 0 0;
  background: var(--as-bg);
  color: var(--as-tx);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-align: left;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] .as { text-align: right; }
.as * { box-sizing: border-box; }
.as svg { display: block; flex: none; }
.as b { font-weight: 800; }

.as-status {
  height: 54px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 30px 0 40px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  direction: ltr;
}
.as-status .st-icons { display: flex; align-items: center; gap: 6px; }
.as-status .st-icons svg { height: 12px; width: auto; }

.as-body {
  flex: 1;
  min-height: 0;
  padding: 10px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  position: relative;
}

/* Type, from the app's Type scale */
.as-kicker { font-size: 12.5px; font-weight: 700; letter-spacing: 0.17em; text-transform: uppercase; color: var(--as-mu2); }
.as-title { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 33px; line-height: 1.1; letter-spacing: -0.01em; color: var(--as-tx); }
.as-greet { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 28px; line-height: 1.15; letter-spacing: -0.005em; }
.as-sub { font-size: 14.5px; font-weight: 600; color: var(--as-mu); margin-top: 3px; }
.as-label { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--as-mu2); }
.as-muted { color: var(--as-mu); }
.as-serif { font-family: "Fraunces", Georgia, serif; font-weight: 500; }

/* Header row with a back button or two round icon buttons */
.as-head { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.as-head .grow { flex: 1; min-width: 0; }
.as-round {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--as-el);
  border: 1px solid var(--as-line2);
  display: grid;
  place-items: center;
  color: var(--as-tx);
  flex: none;
}
.as-round.flat { border: 0; background: var(--as-el); }
.as-round svg { width: 19px; height: 19px; }

/* Cards */
.as-card {
  background: var(--as-card);
  border: 1px solid var(--as-line);
  border-radius: 22px;
  padding: 18px;
  position: relative;
}
.as-card.tight { padding: 14px 16px; }
.as-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.as-row + .as-row { margin-top: 10px; }
.as-hr { height: 1px; background: var(--as-line); margin: 14px 0; }

.as-bar { height: 7px; border-radius: 999px; background: var(--as-track); overflow: hidden; }
.as-bar > i { display: block; height: 100%; border-radius: inherit; width: var(--p, 50%); background: #33d2ec; transform-origin: 0 50%; }
[dir="rtl"] .as-bar > i { transform-origin: 100% 50%; }

.as-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--as-el2);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.as-chip small { font-size: 13px; font-weight: 700; color: var(--as-mu); }
.as-chip.on { background: #33d2ec; color: #04222b; }
.as-chip.out { background: transparent; border: 1px solid var(--as-line3); }

/* Rings: an SVG circle, r = 40 in a 100 x 100 box, circumference 251.33 */
.as-ring { position: relative; display: grid; place-items: center; }
.as-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.as-ring .trk { fill: none; stroke: var(--as-track2); }
.as-ring .arc { fill: none; stroke-linecap: round; stroke-dasharray: 251.33; stroke-dashoffset: calc(251.33 * (1 - var(--p, 0.7))); }
.as-ring .mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }

/* Tab bar: five tabs, the active one in cyan with a soft pill behind its icon */
.as-tabs {
  flex: none;
  height: 86px;
  border-top: 1px solid var(--as-track2);
  background: var(--as-bg);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 6px 0;
  position: relative;
  z-index: 5;
}
.as-tab { display: grid; justify-items: center; align-content: start; gap: 4px; color: var(--as-mu3); font-size: 11.5px; font-weight: 700; letter-spacing: 0.01em; }
.as-tab .ti { width: 56px; height: 34px; border-radius: 999px; display: grid; place-items: center; }
.as-tab svg { width: 24px; height: 24px; }
.as-tab.on { color: var(--as-acc-ink); }
.as-tab.on .ti { background: radial-gradient(ellipse at 50% 60%, rgba(51, 210, 236, 0.28), rgba(51, 210, 236, 0.08) 70%); }
.as-home-ind { position: absolute; bottom: 8px; left: 50%; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: var(--as-tx); opacity: 0.92; }

/* --- Home ---------------------------------------------------------------- */
.as-week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; margin: 2px -4px 0; }
.as-week > div { display: grid; justify-items: center; gap: 6px; padding: 8px 0 7px; border-radius: 16px; font-size: 12px; font-weight: 800; color: var(--as-mu3); }
.as-week > div b { font-size: 17px; color: var(--as-tx3); }
.as-week > div i { width: 5px; height: 5px; border-radius: 50%; background: #33d2ec; }
.as-week > div.fut b { color: var(--as-mu5); }
.as-week > div.fut i { background: transparent; }
.as-week > div.on { background: var(--as-card3); border: 1px solid var(--as-line3); color: var(--as-tx); }
.as-week > div.on b { color: var(--as-tx); }

.as-score {
  border-radius: 26px;
  border: 1px solid var(--as-score-line);
  background: linear-gradient(180deg, var(--as-score-a) 0%, var(--as-score-b) 38%, var(--as-score-c) 70%);
  padding: 22px 18px 18px;
  display: grid;
  justify-items: center;
  gap: 14px;
}
.as-score .as-ring { width: 196px; height: 196px; }
.as-score .as-ring .trk { stroke-width: 7.4; }
.as-score .as-ring .arc { stroke-width: 7.4; stroke: url(#asCyan); }
.as-score .big { font-size: 58px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.as-score .big small { font-size: 26px; font-weight: 700; letter-spacing: 0; }
.as-score .cap { font-size: 12px; font-weight: 800; letter-spacing: 0.24em; color: var(--as-mu2); margin-top: 8px; }
.as-score .line { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 17.5px; color: var(--as-tx4); }
.as-score .pills { display: flex; gap: 8px; }
.as-breakdown { width: 100%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.as-breakdown > div { display: grid; gap: 8px; min-width: 0; }
.as-breakdown span { font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em; color: var(--as-mu2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.as-breakdown b { font-size: 12px; }
.as-breakdown .as-bar { height: 4px; }
.as-kv { width: 100%; display: grid; }
.as-kv > div { display: flex; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--as-line); font-size: 15.5px; }
.as-kv > div span { color: var(--as-mu); font-weight: 600; }
.as-kv > div b { font-weight: 800; }
.as-kv .ok { color: var(--as-ok-ink); display: inline-flex; align-items: center; gap: 6px; }

/* --- Nutrition ----------------------------------------------------------- */
.as-cal { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; gap: 6px; }
.as-cal .side b { display: block; font-size: 20px; font-weight: 800; }
.as-cal .side span { font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em; color: var(--as-mu2); text-transform: uppercase; }
.as-cal .as-ring { width: 150px; height: 150px; }
.as-cal .as-ring .trk, .as-cal .as-ring .arc { stroke-width: 7.5; }
.as-cal .as-ring .arc { stroke: #33d2ec; }
.as-cal .as-ring .mid b { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.as-cal .as-ring .mid span { font-size: 10px; font-weight: 800; letter-spacing: 0.17em; color: var(--as-mu2); margin-top: 6px; text-transform: uppercase; }
.as-macro + .as-macro { margin-top: 14px; }
.as-macro .as-row { font-size: 14.5px; margin-bottom: 9px; }
.as-macro .as-row span { color: var(--as-tx6); }
.as-macro .as-row b { font-weight: 800; }
.as-macro .as-row b small { font-weight: 600; color: var(--as-mu); font-size: 14px; }
.as-water-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.as-water-top .as-serif { font-size: 20px; font-weight: 600; }
.as-water-top b { font-size: 15px; }
.as-water-top b small { color: var(--as-mu); font-weight: 600; font-size: 14px; }
.as-sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 14px; }
.as-sizes > div { border: 1px solid var(--as-line2); background: var(--as-el); border-radius: 16px; height: 50px; display: grid; place-items: center; font-size: 14.5px; font-weight: 800; }
.as-sizes small { font-weight: 600; color: var(--as-mu3); font-size: 12px; margin-left: 4px; }
.as-meal { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--as-line); }
.as-meal:first-of-type { border-top: 0; }
.as-meal .mi { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--as-el3); }
.as-meal .mi svg { width: 19px; height: 19px; }
.as-meal .mt { flex: 1; min-width: 0; font-size: 15px; font-weight: 800; }
.as-meal .mt span { display: block; font-size: 12.5px; font-weight: 600; color: var(--as-mu); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-meal .mk { font-size: 15px; font-weight: 800; }
.as-meal .mk small { font-weight: 600; color: var(--as-mu3); font-size: 12px; }

/* --- Workout ------------------------------------------------------------- */
.as-live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--as-ok-ink); }
.as-live i { width: 8px; height: 8px; border-radius: 50%; background: #3dc585; box-shadow: 0 0 0 4px rgba(61, 197, 133, 0.18); }
.as-stats3 { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.as-stats3 > div + div { border-inline-start: 1px solid var(--as-line); }
.as-stats3 b { display: block; font-size: 20px; font-weight: 800; }
.as-stats3 span { font-size: 12px; color: var(--as-mu); font-weight: 600; }
.as-ex-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.as-ex-title b { font-size: 17px; }
.as-ex-title span { font-size: 12.5px; color: var(--as-mu); font-weight: 600; }
.as-sets { display: grid; gap: 6px; }
.as-set { display: grid; grid-template-columns: 30px 1fr 1fr 1fr 40px; align-items: center; height: 40px; border-radius: 12px; padding: 0 8px; font-size: 15px; font-weight: 800; text-align: center; }
.as-set.hd { height: 22px; font-size: 10.5px; letter-spacing: 0.12em; color: var(--as-mu3); }
.as-set .n { color: var(--as-mu); }
.as-set .prev { color: var(--as-mu4); font-weight: 700; font-size: 13px; }
.as-set .ck { width: 28px; height: 28px; border-radius: 9px; background: var(--as-track); display: grid; place-items: center; justify-self: center; color: var(--as-bg); }
.as-set .ck svg { width: 16px; height: 16px; opacity: 0; }
.as-set.done { background: rgba(61, 197, 133, 0.11); }
.as-set.done .ck { background: #3dc585; }
.as-set.done .ck svg { opacity: 1; }
.as-pr {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f0b84d, #d98a2a);
  color: #2a1704;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 20px -6px rgba(240, 184, 77, 0.5);
}
[dir="rtl"] .as-pr { right: auto; left: 14px; }
.as-pr svg { width: 14px; height: 14px; }
.as-rest { display: flex; align-items: center; gap: 14px; }
.as-rest .as-ring { width: 54px; height: 54px; }
.as-rest .as-ring .trk, .as-rest .as-ring .arc { stroke-width: 9; }
.as-rest .as-ring .arc { stroke: #33d2ec; }
.as-rest b { font-size: 22px; font-weight: 800; display: block; }
.as-rest span { font-size: 12.5px; color: var(--as-mu); font-weight: 600; }
.as-suggest { border-color: rgba(51, 210, 236, 0.35); background: linear-gradient(180deg, var(--as-sug-a), var(--as-sug-b)); }
.as-suggest .as-label { color: var(--as-acc-ink); }
.as-suggest p { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--as-tx4); line-height: 1.4; }
.as-suggest p b { color: var(--as-tx); }

/* --- Sleep --------------------------------------------------------------- */
.as-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.as-tile { background: var(--as-card); border: 1px solid var(--as-line); border-radius: 20px; padding: 16px; }
.as-tile .as-label { font-size: 10.5px; }
.as-tile b { display: block; font-size: 25px; font-weight: 800; margin-top: 8px; letter-spacing: -0.01em; }
.as-stages { display: flex; height: 16px; border-radius: 999px; overflow: hidden; gap: 3px; margin: 14px 0 12px; }
.as-stages i { display: block; height: 100%; border-radius: 3px; transform-origin: 0 50%; }
.as-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--as-mu); }
.as-legend span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.as-legend span::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.as-legend b { color: var(--as-tx); }
.as-nights { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin-top: 14px; }
.as-nights > div { flex: 1; display: grid; justify-items: center; gap: 7px; height: 100%; align-content: end; font-size: 11px; font-weight: 800; color: var(--as-mu3); }
.as-nights i { display: block; width: 100%; height: var(--h); border-radius: 8px; background: linear-gradient(180deg, #8d72ff, #5b5bd6); transform-origin: 50% 100%; }
.as-nights > div.on i { background: linear-gradient(180deg, #4ad8ee, #22b8d4); }
.as-nights > div.on { color: var(--as-acc-ink); }

/* --- Coach --------------------------------------------------------------- */
.as-chat { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.as-msg { max-width: 86%; font-size: 15.5px; font-weight: 600; line-height: 1.42; border-radius: 22px; padding: 12px 16px; }
.as-msg.user { align-self: flex-end; background: var(--as-user); color: var(--as-user-tx); }
.as-msg.coach { align-self: flex-start; background: var(--as-card2); border: 1px solid var(--as-line2); color: var(--as-tx2); }
.as-msg.coach p { margin: 0; }
.as-msg.coach p + p { margin-top: 8px; }
.as-logs { display: grid; gap: 9px; margin-top: 10px; }
.as-log { background: var(--as-el2); border-radius: 16px; padding: 12px; font-size: 14.5px; }
.as-log .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
.as-log .btns > span { height: 36px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14.5px; font-weight: 700; background: var(--as-line2); color: var(--as-tx2); }
.as-log .btns > span.log { background: #33d2ec; color: #04222b; }
.as-log .btns svg { width: 15px; height: 15px; }
.as-log .done { display: flex; align-items: center; gap: 7px; height: 36px; margin-top: 10px; font-weight: 800; color: var(--as-ok-ink); }
.as-log .done svg { width: 18px; height: 18px; }
.as-compose { position: absolute; left: 16px; right: 16px; bottom: 34px; }
.as-compose .bar { height: 58px; border-radius: 999px; border: 1px solid var(--as-line3); background: var(--as-card2); display: flex; align-items: center; gap: 12px; padding: 0 6px 0 18px; font-size: 15px; color: var(--as-mu3); font-weight: 600; }
.as-compose .bar .cam { color: var(--as-acc-ink); }
.as-compose .bar .cam svg { width: 22px; height: 22px; }
.as-compose .bar .txt { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-compose .bar .send { width: 46px; height: 46px; border-radius: 50%; background: var(--as-send); display: grid; place-items: center; color: var(--as-acc-ink); }
.as-compose .bar .send svg { width: 20px; height: 20px; }
.as-compose .note { text-align: center; font-size: 11px; font-weight: 700; color: var(--as-mu3); margin-top: 9px; letter-spacing: 0.02em; }
.as-typing { display: inline-flex; gap: 5px; padding: 15px 18px; }
.as-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--as-mu3); }

/* --- Body (weight) ------------------------------------------------------- */
.as-weight { font-size: 52px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.as-weight small { font-size: 19px; color: var(--as-mu); font-weight: 700; letter-spacing: 0; margin-left: 6px; }
.as-delta { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 13px; border-radius: 999px; background: var(--as-el2); color: var(--as-ok-ink); font-size: 14.5px; font-weight: 800; }
.as-delta svg { width: 15px; height: 15px; }
.as-chart { position: relative; height: 160px; margin-top: 14px; }
.as-chart svg { width: 100%; height: 100%; overflow: visible; }
.as-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--as-mu3); font-weight: 700; margin-top: 10px; }

/* --- Profile + achievements ---------------------------------------------- */
.as-banner { height: 90px; margin: -18px -18px 0; border-radius: 22px 22px 0 0; background: linear-gradient(100deg, #a8dcf7, #5f9ac4 55%, #2f638c); }
.as-avatar { width: 92px; height: 92px; border-radius: 50%; margin: -48px auto 0; background: #33d2ec; color: #04222b; display: grid; place-items: center; font-size: 34px; font-weight: 900; box-shadow: 0 0 0 7px #3c4a73; position: relative; }
.as-plan { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--as-acc-soft); color: var(--as-acc-ink); font-size: 13.5px; font-weight: 800; }
.as-plan svg { width: 15px; height: 15px; }
.as-level { display: flex; align-items: center; gap: 14px; }
.as-level .sh { width: 50px; height: 50px; border-radius: 14px; background: var(--as-gold-soft); display: grid; place-items: center; color: var(--as-gold-ink); }
.as-level .sh svg { width: 24px; height: 24px; }
.as-level .grow { flex: 1; }
.as-level .t { display: flex; justify-content: space-between; font-size: 16px; font-weight: 800; color: var(--as-gold-ink); margin-bottom: 8px; }
.as-level .t span { color: var(--as-tx); display: inline-flex; align-items: center; gap: 5px; }
.as-level .as-bar > i { background: #d98a2a; }
.as-level small { display: block; font-size: 12px; color: var(--as-mu); font-weight: 600; margin-top: 8px; }
.as-ach { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.as-ach .ai { width: 26px; height: 26px; display: grid; place-items: center; }
.as-ach .ai svg { width: 22px; height: 22px; }
.as-ach .an { flex: 1; font-size: 15px; font-weight: 800; }
.as-ach .as-bar { width: 96px; height: 7px; }
.as-ach .ap { width: 38px; text-align: right; font-size: 13px; color: var(--as-mu); font-weight: 700; }
.as-quality { display: flex; gap: 5px; }
.as-quality i { width: 9px; height: 9px; border-radius: 50%; background: var(--as-line4); }
.as-quality i.on { background: #8d72ff; }

/* --- Colour tokens (2026-10-10) -----------------------------------------
   Dark is the app as it ships. Under the site's light theme the same screens are drawn in cream, so a
   light page does not carry five black rectangles. Accents used as text get a darker "ink" in cream. */
.dev {
  --as-bg: #121315;
  --as-card: #17181b;
  --as-card2: #141518;
  --as-card3: #1d1e22;
  --as-el: #1c1d20;
  --as-el2: #1e1f23;
  --as-el3: #1f2024;
  --as-track: #232428;
  --as-track2: #222327;
  --as-line: #26272c;
  --as-line2: #2a2b30;
  --as-line3: #2c2e33;
  --as-line4: #2e3035;
  --as-tx: #f5f6f8;
  --as-tx2: #eceef1;
  --as-tx3: #d7d9de;
  --as-tx4: #cfd2d6;
  --as-tx5: #c9ccd1;
  --as-tx6: #c4c7cc;
  --as-mu: #a7a9b0;
  --as-mu2: #9b9ea6;
  --as-mu3: #8a8d95;
  --as-mu4: #6f727a;
  --as-mu5: #4d4f56;
  --as-user: #0f3138;
  --as-user-tx: #e7f7fa;
  --as-send: #155a66;
  --as-acc-soft: #0f2a32;
  --as-acc-soft2: #12303d;
  --as-gold-soft: #2b2216;
  --as-indigo-soft: #1b1b33;
  --as-indigo-ink: #8f8ff0;
  --as-score-a: #1c3138;
  --as-score-b: #182327;
  --as-score-c: #16181b;
  --as-score-line: #263136;
  --as-sug-a: #102a31;
  --as-sug-b: #15191c;
  --as-acc-ink: #33d2ec;
  --as-ok-ink: #3dc585;
  --as-gold-ink: #d98a2a;
}
[data-theme="light"] .dev {
  --as-bg: #F2EADB;
  --as-card: #FBF6EC;
  --as-card2: #FBF6EC;
  --as-card3: #FBF6EC;
  --as-el: #EAE1D0;
  --as-el2: #E8DECC;
  --as-el3: #E8DECC;
  --as-track: #E2D8C5;
  --as-track2: #E2D8C5;
  --as-line: #E3D9C6;
  --as-line2: #DDD2BE;
  --as-line3: #D9CEB9;
  --as-line4: #D6CAB5;
  --as-tx: #1E1A14;
  --as-tx2: #26211A;
  --as-tx3: #2E2922;
  --as-tx4: #3D372E;
  --as-tx5: #3D372E;
  --as-tx6: #484137;
  --as-mu: #5D564A;
  --as-mu2: #675F52;
  --as-mu3: #726A5C;
  --as-mu4: #8A8272;
  --as-mu5: #B3AA98;
  --as-user: #D3ECEF;
  --as-user-tx: #0E3640;
  --as-send: #CDE9EE;
  --as-acc-soft: #D6EEF1;
  --as-acc-soft2: #D6EEF1;
  --as-gold-soft: #F2E2C8;
  --as-indigo-soft: #E3E3F7;
  --as-indigo-ink: #4B4BC0;
  --as-score-a: #D5EDF0;
  --as-score-b: #ECEEE3;
  --as-score-c: #FBF6EC;
  --as-score-line: #D3E2E1;
  --as-sug-a: #DCEFF1;
  --as-sug-b: #FBF6EC;
  --as-acc-ink: #0A6C89;
  --as-ok-ink: #21714B;
  --as-gold-ink: #9A5F14;
}
[data-theme="light"] .dev-screen::after { background: linear-gradient(115deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.08) 28%, transparent 46%); }
[data-theme="light"] .as-tab.on .ti { background: radial-gradient(ellipse at 50% 60%, rgba(11, 115, 146, 0.16), rgba(11, 115, 146, 0.05) 70%); }
[data-theme="light"] .as-set.done { background: rgba(35, 120, 79, 0.1); }
[data-theme="light"] .as-suggest { border-color: rgba(11, 115, 146, 0.28); }
[data-theme="light"] .as-home-ind { opacity: 0.8; }

/* --- Filled screens (2026-10-11) ----------------------------------------- */
.as-badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.as-badge { display: grid; justify-items: center; gap: 8px; padding: 14px 6px 12px; border-radius: 18px; background: var(--as-card); border: 1px solid var(--as-line); text-align: center; }
.as-badge .bi { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.as-badge .bi svg { width: 22px; height: 22px; }
.as-badge b { font-size: 12.5px; line-height: 1.2; }
.as-heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px; }
.as-heat i { aspect-ratio: 1; border-radius: 6px; background: var(--as-track); }
.as-heat i.l1 { background: color-mix(in srgb, #33d2ec 28%, var(--as-track)); }
.as-heat i.l2 { background: color-mix(in srgb, #33d2ec 58%, var(--as-track)); }
.as-heat i.l3 { background: #33d2ec; }
/* Coach: the newest messages sit just above the message bar; older ones scroll up under the header */
.as-coach .as-chat { flex: 1; min-height: 0; overflow: hidden; justify-content: flex-end; padding-bottom: 116px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28px); mask-image: linear-gradient(to bottom, transparent 0, #000 28px); }
/* A full screen runs off the bottom like a real one, instead of squashing what is above */
.as-body > * { flex-shrink: 0; }
.as-coach .as-body > .as-chat { flex-shrink: 1; }
/* The week of nights: each bar's height is a share of the column, so the column must be a flex box (a grid row
   of auto height turned every percentage into zero, and the chart was empty) */
.as-nights > div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.as-nights i { height: calc(var(--h) * 0.82); flex: none; }
