/* LabAn website: the phone scenes on the home page. Loaded only by index.html.
   The default (no script, or reduced motion) is a plain list of scenes, each with one finished screen.
   Everything under html.scenes-on is the scroll story; scenes.js adds that class only when motion is allowed. */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- scene layout (default = static) ---------- */
.story { margin-top: 0.5rem; }
.scene {
  --kh: 0.5; --kw: 0.56; --k: min(var(--kh), var(--kw));
  --run: 190vh; --run-m: 140vh;
  margin-bottom: 3.5rem;
}
@supports (height: 1svh) { .scene { --run: 190svh; --run-m: 140svh; } }

.scene-stage { display: grid; gap: 1.5rem; }
.scene-copy h3 { font-size: 1.5rem; line-height: 1.2; margin: 0 0 0.6rem; letter-spacing: -0.01em; }
.scene-copy > p { margin: 0 0 1rem; }
.scene-device { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }

.pw { margin: 0 0 1.6rem; position: relative; flex: none; width: calc(406px * var(--k)); height: calc(860px * var(--k)); }
.pw figcaption { position: absolute; left: 0; right: 0; top: 100%; margin-top: 0.55rem; text-align: center; font-size: 0.8rem; line-height: 1.3; color: var(--ink-2); }

.beats { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 0.4rem; font-family: var(--head); font-weight: 500; }
.beats li { position: relative; padding-left: 1.5rem; line-height: 1.35; }
.beats li::before {
  content: ""; position: absolute; left: 0; top: 0.42em; width: 0.7rem; height: 0.7rem;
  border-radius: 50%; border: 2px solid var(--teal);
}

/* mobile: the phone fills the screen height (860k + caption and beat line + top gap fits) */
@media (min-height: 600px) { .scene { --kh: 0.58; } }
@media (min-height: 650px) { .scene { --kh: 0.63; } }
@media (min-height: 700px) { .scene { --kh: 0.69; } }
@media (min-height: 750px) { .scene { --kh: 0.75; } }
@media (min-height: 800px) { .scene { --kh: 0.8; } }
@media (min-height: 860px) { .scene { --kh: 0.86; } }
@media (min-width: 360px) { .scene { --kw: 0.8; } }
@media (min-width: 390px) { .scene { --kw: 0.86; } }
@media (min-width: 420px) { .scene { --kw: 0.92; } }

@media (min-width: 760px) {
  .scene { --kh: 0.62; --kw: 0.62; margin-bottom: 4.5rem; }
  @media (min-height: 700px) { .scene { --kh: 0.72; } }
  @media (min-height: 780px) { .scene { --kh: 0.8; } }
  @media (min-height: 860px) { .scene { --kh: 0.9; } }
  @media (min-height: 940px) { .scene { --kh: 1; } }
  @media (min-width: 900px) { .scene { --kw: 0.78; } }
  @media (min-width: 1100px) { .scene { --kw: 0.9; } }
  @media (min-width: 1240px) { .scene { --kw: 1; } }

  .scene-stage {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: clamp(2rem, 5vw, 4.5rem); row-gap: 1.25rem; align-items: start;
  }
  .scene-stage { grid-template-areas: "gap1 pw" "copy pw" "beats pw" "gap2 pw"; }
  .scene-flip .scene-stage { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "pw gap1" "pw copy" "pw beats" "pw gap2"; }
  .scene-device { display: contents; }
  .scene-copy { grid-area: copy; }
  .beats { grid-area: beats; }
  .pw { grid-area: pw; align-self: center; }
  .scene-copy h3 { font-size: 2.1rem; letter-spacing: -0.015em; }
  .scene-copy > p { font-size: 1.15rem; }
  .beats { font-size: 1.15rem; margin-top: 0.5rem; }
  .feature-flip .panel { order: 2; }
}

/* ---------- the scroll story (only when scenes.js has switched it on) ---------- */
html.scenes-on .story { margin-top: 1rem; }
html.scenes-on .scene { margin-bottom: 0; }
html.scenes-on .scr { display: block; }
html.scenes-on .ptr { display: block; }
html.scenes-on .beats li { opacity: 0.62; }

/* mobile: copy flows, the phone and its caption stick while the scene plays */
html.scenes-on .scene-stage { display: block; }
html.scenes-on .scene-copy { padding-bottom: 0.75rem; }
html.scenes-on .scene-device { position: sticky; top: 0.5rem; z-index: 1; gap: 0.6rem; }
html.scenes-on .scene-stage::after { content: ""; display: block; height: var(--run-m); }
html.scenes-on .beats { display: grid; justify-items: center; text-align: center; font-size: 1.05rem; gap: 0; }
html.scenes-on .beats li { grid-area: 1 / 1; opacity: 0; padding-left: 0; }
html.scenes-on .beats li::before { display: none; }
html.scenes-on .pw { margin-bottom: 1.2rem; }

@media (min-width: 760px) {
  html.scenes-on .scene-track::after { content: ""; display: block; height: var(--run); }
  html.scenes-on .scene-stage::after { display: none; }
  html.scenes-on .scene-stage { display: grid; position: sticky; top: 0; height: 100vh; height: 100svh; row-gap: 1.25rem; column-gap: clamp(2rem, 5vw, 4.5rem); }
  html.scenes-on .scene-copy { padding-bottom: 0; }
  html.scenes-on .scene-device { position: static; display: contents; }
  html.scenes-on .beats { display: grid; justify-items: stretch; text-align: left; font-size: 1.15rem; gap: 0.4rem; }
  html.scenes-on .beats li { grid-area: auto; opacity: 0.62; padding-left: 1.5rem; }
  html.scenes-on .beats li::before { display: block; }
}

/* ---------- the phone ---------- */
.phone {
  --ink: #16201C; --ink2: #45524C; --accent: #1D6B58; --bad: #B5483A; --wrong: #A13E31; --onink: #F4F7F5;
  --soft: rgba(255, 255, 255, 0.55); --edge: rgba(255, 255, 255, 0.78); --card: rgba(255, 255, 255, 0.74);
  position: absolute; left: 0; top: 0; width: 406px; height: 860px;
  transform: scale(var(--k)); transform-origin: 0 0;
  border: 8px solid #1F2925; border-radius: 54px; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, #BFE9D9 0%, #E6F1EE 45%, #DCD9F2 100%);
  box-shadow: 0 24px 50px rgba(22, 32, 28, 0.22);
  font: 400 16px/1.3 var(--head); color: var(--ink); text-align: left; letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
.phone::before, .phone::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.phone::before { width: 340px; height: 340px; left: -120px; top: -80px; background: radial-gradient(circle, rgba(159, 225, 200, 0.55), rgba(159, 225, 200, 0) 70%); }
.phone::after { width: 380px; height: 380px; right: -140px; bottom: -60px; background: radial-gradient(circle, rgba(201, 195, 242, 0.6), rgba(201, 195, 242, 0) 70%); }
.phone p, .phone ol, .phone ul { margin: 0; padding: 0; list-style: none; }
.phone b { font-weight: 700; }
.screen { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.scr { position: absolute; inset: 0; display: none; }
.scr-end { display: block; }
.screen-in { position: absolute; inset: 0; overflow: hidden;
  background: radial-gradient(circle at 12% 4%, rgba(159, 225, 200, 0.55), rgba(159, 225, 200, 0) 45%), radial-gradient(circle at 96% 98%, rgba(201, 195, 242, 0.6), rgba(201, 195, 242, 0) 50%), linear-gradient(160deg, #BFE9D9 0%, #E6F1EE 45%, #DCD9F2 100%); }
.pi { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.p-status { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 6px 28px 0; font-size: 14px; font-weight: 500; position: relative; z-index: 2; }
.p-bat { width: 24px; height: 12px; border: 1.5px solid var(--ink); border-radius: 4px; position: relative; display: block; }
.p-bat i { position: absolute; inset: 1.5px 6px 1.5px 1.5px; background: var(--ink); border-radius: 2px; }
.p-round { width: 44px; height: 44px; border-radius: 50%; background: var(--soft); border: 1px solid var(--edge); display: grid; place-items: center; flex: none; }
.p-back { position: absolute; left: 16px; top: 56px; z-index: 3; }

/* folder (tab + body as one shape) */
.p-fold { position: absolute; left: 12px; top: 52px; overflow: visible; pointer-events: none; }
.p-fold path { fill: rgba(255, 255, 255, 0.62); stroke: rgba(255, 255, 255, 0.9); stroke-width: 1.5; }
.p-tab { position: absolute; left: 68px; top: 52px; height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 18px 0 8px; z-index: 3; }
.tw126 { width: 126px; } .tw142 { width: 142px; }
.p-tc { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--onink); display: grid; place-items: center; flex: none; }
.p-tb { font-size: 17px; font-weight: 500; white-space: nowrap; }
.p-tb small { font-size: 14px; font-weight: 400; color: var(--ink2); }
.p-pill { position: absolute; right: 20px; top: 60px; height: 36px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 18px; background: var(--soft); border: 1px solid var(--edge); font-size: 13px; font-weight: 500; z-index: 3; }
.p-pill .pi { width: 16px; height: 16px; }
.p-fbody { position: absolute; left: 12px; top: 104px; width: 366px; height: 728px; border-radius: 0 0 28px 28px; overflow: hidden; display: flex; flex-direction: column; }
.p-body { display: flex; flex-direction: column; height: 100%; }

/* number navigator */
.p-navr { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 16px 14px 8px; flex: none; }
.p-chips { flex: 1; display: flex; justify-content: center; gap: 5px; }
.p-cp { flex: 1; max-width: 32px; height: 36px; border-radius: 12px; border: 1.5px solid transparent; display: grid; place-items: center; font-size: 13px; font-weight: 500; background: rgba(255, 255, 255, 0.9); color: var(--ink2); }
.p-cp.cur { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.p-cp.ans { background: rgba(29, 107, 88, 0.18); color: #174F42; border-color: var(--accent); }
.p-cp.fl { border: 2.5px solid var(--ink); }
.p-cp.dis { opacity: 0.45; }
.p-arr { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, 0.7); display: grid; place-items: center; flex: none; }
.p-arr .pi { width: 18px; height: 18px; }
.p-legend { display: flex; justify-content: center; gap: 14px; font-size: 11px; line-height: 15px; color: var(--ink2); margin: -2px 0 6px; flex: none; }
.p-legend span { display: flex; align-items: center; gap: 5px; }
.p-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.p-legend .la { background: rgba(29, 107, 88, 0.18); border: 1px solid var(--accent); }
.p-legend .lf { border: 1.5px solid var(--ink); }
.p-legend .ln { background: rgba(255, 255, 255, 0.9); }

/* question page */
.p-pg { padding: 6px 14px 72px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.p-tl { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px; }
.p-tl .t { flex: 1; font-size: 13px; line-height: 18px; color: var(--ink2); }
.p-flag { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid rgba(22, 32, 28, 0.12); background: rgba(255, 255, 255, 0.6); font-size: 13px; flex: none; }
.p-flag .pi { width: 16px; height: 16px; }
.p-flag.on { background: var(--ink); color: var(--onink); border-color: var(--ink); }
.p-flag.on .pi { fill: currentColor; }
.p-q { background: rgba(255, 255, 255, 0.78); border-radius: 22px; padding: 18px; font: 400 19px/29px "Atkinson Hyperlegible", system-ui, sans-serif; }
.p-q.s { padding: 12px 18px; font-size: 17px; line-height: 25px; }
.p-chs { display: flex; flex-direction: column; gap: 8px; }
.p-ch { position: relative; isolation: isolate; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 14px; border-radius: 18px; border: 1.5px solid rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.6); font: 400 16px/21px "Atkinson Hyperlegible", system-ui, sans-serif; }
.p-ch.big { min-height: 58px; font-size: 17px; border-radius: 20px; gap: 14px; }
.p-ch .ring { position: absolute; z-index: -1; inset: -1.5px; border: 1.5px solid var(--ink); border-radius: inherit; opacity: 0; pointer-events: none; background: rgba(255, 255, 255, 0.55); }
.p-ch .lc { position: relative; width: 30px; height: 30px; border-radius: 50%; background: rgba(22, 32, 28, 0.06); display: grid; place-items: center; font: 500 14px var(--head); flex: none; }
.p-ch.big .lc { width: 34px; height: 34px; }
.p-ch .mk { position: absolute; left: 14px; top: 50%; margin-top: -15px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; transform: scale(0); }
.p-ch .mk .pi { width: 16px; height: 16px; stroke-width: 2.2; }
.p-ch .tx { flex: 1; }
.p-ch .em { font: 500 12px/16px var(--head); text-align: right; max-width: 92px; opacity: 0; font-style: normal; }
.p-ch.is-right .ring { opacity: 1; border-color: var(--accent); background: rgba(255, 255, 255, 0.55); }
.p-ch.is-wrong .ring { opacity: 1; border-color: var(--bad); background: rgba(255, 255, 255, 0.55); }
.p-ch.is-right .mk { background: var(--accent); transform: scale(1); }
.p-ch.is-wrong .mk { background: var(--bad); transform: scale(1); }
.p-ch.is-right .em { opacity: 1; color: var(--accent); }
.p-ch.is-wrong .em { opacity: 1; color: var(--wrong); }
.p-ch.is-right .lc, .p-ch.is-wrong .lc { opacity: 0; }
.p-ch.is-dim { opacity: 0.6; }
.p-why { background: rgba(255, 255, 255, 0.78); border-radius: 22px; padding: 12px 18px; display: flex; flex-direction: column; gap: 6px; }
.p-wh { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.p-wh .pi { width: 16px; height: 16px; }
.p-why p { font: 400 15px/22px "Atkinson Hyperlegible", system-ui, sans-serif; color: #2F3B36; }
.p-why small { font-size: 12px; line-height: 17px; color: var(--ink2); }
.p-bot { margin-top: auto; }
.p-mb { position: relative; height: 56px; border-radius: 28px; background: var(--ink); color: var(--onink); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; font-weight: 500; padding: 0 20px; flex: none; }
.p-mb .pi { width: 18px; height: 18px; }
.p-mb .l1 { position: absolute; opacity: 0; }
.p-mb.sec { background: var(--soft); color: var(--ink); border: 1px solid var(--edge); }
.p-btnrow { display: flex; gap: 10px; margin-top: auto; }
.p-btnrow .p-mb { flex: 1; padding: 0 8px; }
.p-fab { position: absolute; right: 26px; bottom: 26px; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--onink); display: grid; place-items: center; z-index: 4; }
.p-fab .pi { width: 22px; height: 22px; }

/* all-questions sheet */
.p-scrim { position: absolute; inset: 0; background: rgba(22, 32, 28, 0.26); z-index: 5; opacity: 0; visibility: hidden; }
.p-sheet { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 6; border-radius: 28px; padding: 16px 14px 14px; background: rgba(255, 255, 255, 0.99); box-shadow: 0 20px 50px rgba(22, 32, 28, 0.22); opacity: 0; visibility: hidden; }
.p-sh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px 10px; }
.p-st { font-size: 17px; font-weight: 500; }
.p-sn { font-size: 13px; color: var(--ink2); }
.p-qgrid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.p-qgrid li { height: 30px; border-radius: 9px; border: 1.5px solid transparent; background: rgba(22, 32, 28, 0.06); display: grid; place-items: center; font-size: 11.5px; font-weight: 500; color: var(--ink2); }
.p-qgrid li.a { background: rgba(29, 107, 88, 0.18); border-color: var(--accent); color: #174F42; }
.p-qgrid li.f { border: 2.5px solid var(--ink); }
.p-legend.in { margin: 10px 0 0; }

/* cards (results, streak, home) */
.p-fpg { padding: 16px 14px; display: flex; flex-direction: column; gap: 14px; flex: 1; min-height: 0; }
.p-fpg.fadeb { -webkit-mask-image: linear-gradient(#000 calc(100% - 70px), transparent); mask-image: linear-gradient(#000 calc(100% - 70px), transparent); }
.p-card { background: var(--card); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.p-card .ct { font-size: 14px; line-height: 20px; font-weight: 500; }
.p-card .bd { font-size: 15px; line-height: 22px; }
.p-card .sm { font-size: 13px; line-height: 19px; color: var(--ink2); }
.p-big { font-size: 44px; line-height: 52px; font-weight: 300; letter-spacing: -1px; }
.p-sr { display: flex; flex-direction: column; gap: 6px; }
.prow { display: flex; align-items: center; gap: 10px; }
.prow .pi { width: 18px; height: 18px; color: #2F3B36; }
.prow .n { flex: 1; font-size: 14px; line-height: 20px; }
.prow .nm { font-size: 14px; line-height: 20px; font-weight: 500; }
.fb { height: 8px; border-radius: 4px; background: rgba(22, 32, 28, 0.1); overflow: hidden; }
.fb i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transform-origin: 0 50%; transform: scaleX(var(--v, 1)); }
.v61 { --v: 0.61; } .v70 { --v: 0.7; } .v72 { --v: 0.72; } .v78 { --v: 0.78; } .v80 { --v: 0.8; } .v84 { --v: 0.84; } .v85 { --v: 0.85; }

/* note */
.p-sub { position: absolute; left: 18px; top: 116px; font-size: 14px; color: var(--ink2); }
.p-read { position: absolute; left: 14px; right: 14px; top: 142px; height: 548px; border-radius: 28px; background: rgba(255, 255, 255, 0.72); border: 1px solid var(--edge); overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent 0, #000 22px, #000 calc(100% - 46px), transparent); mask-image: linear-gradient(transparent 0, #000 22px, #000 calc(100% - 46px), transparent); }
.p-note { padding: 24px 18px 40px; font: 400 16px/26px "Atkinson Hyperlegible", system-ui, sans-serif; transform: translateY(-190px); }
.p-note p { margin: 0 0 12px; }
.p-nh { font: 500 17px/24px var(--head); margin: 0 0 8px; }
.p-note b { --h: 1; background-image: linear-gradient(rgba(29, 107, 88, 0.22), rgba(29, 107, 88, 0.22)); background-repeat: no-repeat; background-position: 0 92%; background-size: calc(var(--h) * 100%) 46%; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.p-mnw { margin: 4px 0 14px; }
.p-mn { display: flex; gap: 12px; padding: 14px; border-radius: 18px; background: rgba(29, 107, 88, 0.1); border: 1px solid rgba(29, 107, 88, 0.35); font: 400 15px/22px "Atkinson Hyperlegible", system-ui, sans-serif; }
.p-mn .mi { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.p-mn .k { font: 500 13px/18px var(--head); color: var(--accent); }
.p-mn .mw { display: flex; font: 600 26px/32px var(--head); letter-spacing: 1px; color: #174F42; }
.p-mn .mw span { display: block; }
.p-mn .m b { background: none; }
.p-after { padding-top: 2px; }
.p-stick { position: absolute; left: 14px; right: 14px; bottom: 100px; height: 64px; border-radius: 32px; background: rgba(255, 255, 255, 0.72); border: 1px solid var(--edge); display: flex; align-items: center; gap: 14px; padding: 0 12px 0 8px; z-index: 3; box-shadow: 0 8px 22px rgba(22, 32, 28, 0.1); }
.p-stick .p-mb { height: 48px; padding: 0 18px; gap: 8px; font-size: 15px; }
.p-pr { flex: 1; font-size: 13px; line-height: 18px; color: var(--ink2); }
.p-pr .bar { height: 6px; border-radius: 3px; background: rgba(22, 32, 28, 0.12); margin-top: 6px; overflow: hidden; }
.p-pr .bar i { display: block; height: 100%; width: 100%; background: var(--accent); border-radius: 3px; transform-origin: 0 50%; transform: scaleX(0.55); }
.p-bnav { position: absolute; left: 12px; right: 12px; bottom: 22px; height: 68px; border-radius: 34px; background: rgba(255, 255, 255, 0.78); border: 1px solid var(--edge); box-shadow: 0 10px 26px rgba(22, 32, 28, 0.14); display: flex; align-items: center; justify-content: space-around; padding: 0 6px; z-index: 4; }
.p-nt { width: 64px; height: 56px; border-radius: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; color: var(--ink2); }
.p-nt .pi { width: 22px; height: 22px; }
.p-nt.on { background: var(--ink); color: var(--onink); font-weight: 500; }

/* home */
.p-hd { display: flex; align-items: flex-start; justify-content: space-between; padding: 6px 16px 0 22px; height: 64px; }
.p-brand { display: flex; flex-direction: column; gap: 4px; }
.p-brand img { height: 26px; width: auto; display: block; }
.p-brand .hi { font-size: 17px; font-weight: 500; }
.p-hr { display: flex; gap: 10px; align-items: center; margin-top: 2px; }
.p-streak { height: 44px; padding: 0 14px; border-radius: 22px; background: var(--soft); border: 1px solid var(--edge); display: flex; align-items: center; gap: 6px; font-size: 16px; }
.p-streak .pi { width: 18px; height: 18px; }
.p-streak b { font-weight: 600; }
.p-search { margin: 8px 16px 12px; height: 48px; border-radius: 24px; background: var(--card); border: 1px solid var(--edge); display: flex; align-items: center; gap: 10px; padding: 0 16px; color: var(--ink2); font-size: 15px; }
.p-wg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; margin-bottom: 12px; }
.p-w { position: relative; border-radius: 22px; background: var(--card); border: 1px solid var(--edge); box-shadow: 0 6px 18px rgba(22, 32, 28, 0.07); padding: 12px 14px; }
.p-w .wt { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: #2F3B36; }
.p-w .wt .pi { width: 18px; height: 18px; color: var(--accent); }
.p-goal { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.p-ring { position: relative; width: 64px; height: 64px; flex: none; }
.p-ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.p-ring circle { fill: none; stroke-width: 8; }
.p-ring .tr { stroke: rgba(22, 32, 28, 0.1); }
.p-ring .fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 40; }
.p-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; font-weight: 600; }
.p-goal .gn { font-size: 30px; line-height: 32px; font-weight: 600; }
.p-goal .gs { font-size: 13px; line-height: 17px; color: var(--ink2); }
.p-w .rm { font-size: 14px; line-height: 20px; margin-top: 8px; }
.p-acc { font-size: 36px; line-height: 42px; font-weight: 600; margin-top: 2px; }
.p-w .trend { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--accent); font-weight: 500; }
.p-w .trend .pi { width: 16px; height: 16px; }
.p-bar { height: 8px; border-radius: 4px; background: rgba(22, 32, 28, 0.1); margin-top: 8px; position: relative; }
.p-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--v, 1)); }
.p-bar u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); left: 75%; }
.p-bar.dk i { background: #4a5651; }
.p-days { font-size: 36px; line-height: 42px; font-weight: 600; margin-top: 2px; }
.p-days small { font-size: 17px; font-weight: 400; color: var(--ink2); }
.p-w .dt { font-size: 13px; color: var(--ink2); }
.p-ins { margin: 0 16px 12px; padding: 12px 14px 12px; }
.p-ins .chev { margin-left: auto; color: var(--ink2); }
.p-ins .row { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 7px; }
.p-ins .row .pi { width: 16px; height: 16px; }
.p-ins .row .n { width: 126px; flex: none; white-space: nowrap; }
.p-ins .row .p-bar { flex: 1; margin: 0; }
.p-ins .row b { width: 34px; text-align: right; font-weight: 600; }
.p-qod { margin: 0 16px; padding: 12px 16px 14px; }
.p-qod .tag { margin-left: auto; font-size: 12px; color: var(--ink2); background: rgba(22, 32, 28, 0.07); border-radius: 10px; padding: 3px 9px; font-weight: 400; }
.p-qod p { font: 400 16px/24px "Atkinson Hyperlegible", system-ui, sans-serif; margin: 6px 0 10px; }
.p-qod .p-mb { display: inline-flex; height: 48px; font-size: 16px; }

/* streak */
.p-sh2 { position: relative; display: flex; align-items: center; height: 60px; padding-left: 76px; margin-top: 4px; }
.p-sh2 .p-back { top: 8px; }
.p-title { font-size: 22px; font-weight: 500; }
.p-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; margin-top: 8px; }
.p-num { margin-top: 4px; }
.p-num b { font-size: 42px; line-height: 48px; font-weight: 700; }
.p-num small { font-size: 16px; color: var(--ink2); }
.p-cal { margin: 14px 16px 0; padding: 14px 12px 14px; border-radius: 26px; background: rgba(255, 255, 255, 0.66); border: 1px solid var(--edge); }
.p-ch2 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.p-ch2 .mo { font-size: 18px; font-weight: 500; }
.p-arr.w { width: 40px; height: 40px; background: #fff; }
.p-arr.off { width: 40px; height: 40px; background: rgba(255, 255, 255, 0.5); color: rgba(22, 32, 28, 0.35); }
.p-wd { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12.5px; color: var(--ink2); margin-bottom: 4px; }
.p-days2 { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 6px; }
.p-days2 li { position: relative; height: 40px; display: grid; place-items: center; font-size: 14px; font-weight: 500; }
.p-days2 li .c { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: transparent; }
.p-days2 li > span { position: relative; z-index: 1; }
.p-days2 li.on { color: #fff; font-weight: 700; }
.p-days2 li.on .c { background: var(--accent); }
.p-days2 li.fut { color: var(--ink2); }
.p-days2 li .tr2 { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 3px solid var(--ink); }
.p-leg { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; padding-left: 6px; }
.p-leg span { display: flex; align-items: center; gap: 6px; }
.p-leg i { width: 20px; height: 20px; border-radius: 50%; display: inline-block; }
.p-leg .s { background: var(--accent); }
.p-leg .t { border: 2.5px solid var(--ink); }
.p-leg .n { border: 1.5px solid var(--ink2); }
.phone .p-streaknote { margin: 14px 24px 0; font: 400 15px/22px "Atkinson Hyperlegible", system-ui, sans-serif; color: var(--ink2); }

/* pointer (decorative, aria-hidden): shown only in the scroll story */
.ptr { display: none; position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; z-index: 40; pointer-events: none; opacity: 0; will-change: transform; }
.ptr i { position: absolute; border-radius: 50%; }
.ptr .dot { inset: 9px; background: rgba(22, 32, 28, 0.3); border: 2px solid rgba(255, 255, 255, 0.95); box-shadow: 0 2px 8px rgba(22, 32, 28, 0.3); }
.ptr .rg { inset: 0; border: 2.5px solid rgba(29, 107, 88, 0.75); background: rgba(29, 107, 88, 0.12); opacity: 0; }

/* will-change only on what moves while a scene plays */
html.scenes-on .p-why, html.scenes-on .p-sheet, html.scenes-on .scr, html.scenes-on .p-note, html.scenes-on .p-after { will-change: transform; }
