/* babylon landing — phone mockups (Graphite app screens, HTML-recreated) */

.phone {
  --pw: 300px;
  width: var(--pw); height: calc(var(--pw) * 2.06);
  background: #0B0C0E; border-radius: 48px; padding: 10px;
  box-shadow: 0 24px 60px rgba(20,22,28,0.22), 0 4px 14px rgba(20,22,28,0.10), inset 0 0 0 2px #2A2C31;
  flex: none; position: relative;
}
.phone.lg { --pw: 330px; }
.phone .screen {
  position: relative; width: 100%; height: 100%;
  background: var(--graphite-100); border-radius: 38px; overflow: hidden;
  font-family: var(--font-display);
  display: flex; flex-direction: column;
}
.phone .island {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 26px; background: #0B0C0E; border-radius: 999px; z-index: 5;
}
.phone .statusbar {
  height: 46px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 26px 0; font-size: 12.5px; font-weight: 700; color: var(--graphite-900);
}
.phone .statusbar .icons { display: flex; gap: 4px; align-items: center; }
.phone .app { flex: 1; overflow: hidden; padding: 10px 16px 0; display: flex; flex-direction: column; gap: 10px; }
.phone .homebar { flex: none; height: 20px; display: flex; align-items: center; justify-content: center; }
.phone .homebar::after { content: ""; width: 110px; height: 4px; border-radius: 999px; background: var(--graphite-900); opacity: 0.85; }

/* shared app pieces */
.p-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px; }
.p-head .title { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--graphite-400); }
.p-head .rt { width: 26px; height: 26px; border-radius: 999px; background: #fff; border: 1px solid var(--graphite-200); display: flex; align-items: center; justify-content: center; color: var(--graphite-500); font-size: 12px; }
.p-greet { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; padding: 0 2px; }
.p-greet small { display: block; font-size: 12px; font-weight: 500; color: var(--graphite-500); letter-spacing: 0; margin-top: 2px; }

.p-card { background: #fff; border: 1px solid var(--graphite-200); border-radius: 16px; padding: 14px; }
.p-label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--graphite-400); }
.p-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p-pill { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 600; }
.p-pill.dark { background: var(--graphite-800); color: #fff; font-size: 12px; padding: 8px 16px; }
.p-pill.light { background: var(--surface-high); color: var(--graphite-700); font-size: 11px; padding: 5px 11px; }
.p-meter { height: 5px; border-radius: 999px; background: var(--progress-track); overflow: hidden; }
.p-meter i { display: block; height: 100%; border-radius: 999px; background: var(--graphite-800); }
.p-divider { height: 1px; background: var(--graphite-200); margin: 10px 0; }

/* bottom nav */
.p-nav {
  flex: none; margin: 6px 14px 8px; height: 52px; border-radius: 999px;
  background: rgba(255,255,255,0.85); border: 1px solid rgba(20,22,28,0.08);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 4px 18px rgba(20,22,28,0.08);
  display: flex; align-items: center; justify-content: space-around; padding: 0 10px;
}
.p-nav .ni { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 8.5px; font-weight: 600; color: var(--graphite-400); }
.p-nav .ni svg { width: 18px; height: 18px; }
.p-nav .ni.on { color: var(--graphite-900); }

/* --- Today screen --- */
.workout-hero { background: var(--graphite-800); color: #fff; border: none; }
.workout-hero .p-label { color: var(--graphite-400); }
.workout-hero .wt { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin: 6px 0 2px; }
.workout-hero .ws { font-size: 11.5px; color: var(--graphite-300); }
.workout-hero .p-pill.go { background: #fff; color: var(--graphite-900); font-size: 12px; padding: 9px 0; width: 100%; margin-top: 12px; }
.macro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.macro { text-align: center; }
.macro .v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.macro .k { font-size: 9px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite-400); margin-top: 1px; }
.ring-wrap { display: flex; align-items: center; gap: 12px; }
.ring { width: 62px; height: 62px; flex: none; }
.ring circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.ring .track { stroke: var(--ring-track); }
.ring .val { stroke: var(--graphite-800); }
.ring-num { position: relative; }
.ring-num .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }

/* --- Program screen --- */
.prog-week { display: flex; gap: 6px; margin-top: 2px; }
.prog-week .d { flex: 1; text-align: center; border-radius: 12px; padding: 8px 0 7px; background: #fff; border: 1px solid var(--graphite-200); }
.prog-week .d .dn { font-size: 8.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--graphite-400); }
.prog-week .d .dd { font-size: 13px; font-weight: 700; margin-top: 1px; }
.prog-week .d.on { background: var(--graphite-800); border-color: var(--graphite-800); }
.prog-week .d.on .dn { color: var(--graphite-400); }
.prog-week .d.on .dd { color: #fff; }
.prog-week .d.done .dd { color: var(--graphite-400); text-decoration: line-through; }
.sess { display: flex; align-items: center; gap: 11px; padding: 11px 2px; border-top: 1px solid var(--graphite-200); }
.sess:first-child { border-top: none; }
.sess .ic { width: 34px; height: 34px; border-radius: 11px; background: var(--surface-high); display: flex; align-items: center; justify-content: center; flex: none; color: var(--graphite-700); }
.sess .n { font-size: 13px; font-weight: 600; }
.sess .s { font-size: 10.5px; color: var(--graphite-500); margin-top: 1px; }
.sess .st { margin-left: auto; font-size: 10px; font-weight: 700; color: var(--graphite-400); }
.sess .st.ok { color: var(--success); }

/* --- Logging screen --- */
.log-ex { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; padding: 0 2px; }
.log-ex small { display: block; font-size: 11px; font-weight: 500; color: var(--graphite-500); margin-top: 2px; }
.set-row { display: grid; grid-template-columns: 30px 1fr 1fr 34px; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--graphite-200); }
.set-row:first-child { border-top: none; }
.set-row .sn { font-size: 11px; font-weight: 700; color: var(--graphite-400); }
.set-row .cell { background: var(--surface-high); border-radius: 9px; text-align: center; font-size: 13px; font-weight: 600; padding: 8px 0; font-variant-numeric: tabular-nums; }
.set-row .cell small { font-size: 9px; font-weight: 600; color: var(--graphite-400); margin-left: 2px; }
.set-row .chk { width: 26px; height: 26px; border-radius: 999px; border: 1.5px solid var(--graphite-300); justify-self: center; display: flex; align-items: center; justify-content: center; }
.set-row.done .chk { background: var(--graphite-800); border-color: var(--graphite-800); color: #fff; }
.set-row.done .cell { background: #fff; border: 1px solid var(--graphite-200); color: var(--graphite-500); }
.rest-chip { display: flex; align-items: center; justify-content: center; gap: 7px; background: var(--surface-high); border-radius: 999px; padding: 8px 0; font-size: 11.5px; font-weight: 600; color: var(--graphite-600); font-variant-numeric: tabular-nums; }

/* --- Nutrition screen --- */
.macro-bars { display: flex; flex-direction: column; gap: 9px; margin-top: 10px; }
.mb { display: grid; grid-template-columns: 52px 1fr 64px; gap: 10px; align-items: center; }
.mb .k { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--graphite-500); }
.mb .v { font-size: 10.5px; font-weight: 600; color: var(--graphite-500); text-align: right; font-variant-numeric: tabular-nums; }
.meal { display: flex; align-items: center; gap: 11px; padding: 10px 2px; border-top: 1px solid var(--graphite-200); }
.meal:first-child { border-top: none; }
.meal .sw { width: 34px; height: 34px; border-radius: 11px; flex: none; background: linear-gradient(135deg, var(--graphite-200), var(--graphite-100)); border: 1px solid var(--graphite-200); }
.meal .n { font-size: 12.5px; font-weight: 600; }
.meal .s { font-size: 10.5px; color: var(--graphite-500); margin-top: 1px; }
.meal .kcal { margin-left: auto; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* --- Coach screen --- */
.chat { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 2px 2px 0; }
.bubble { max-width: 86%; border-radius: 16px; padding: 10px 13px; font-size: 12.5px; line-height: 1.45; }
.bubble.user { align-self: flex-end; background: #fff; border: 1px solid var(--graphite-200); border-bottom-right-radius: 6px; }
.bubble.coach { align-self: flex-start; color: var(--graphite-800); padding: 2px 2px; }
.bubble.coach b { font-weight: 700; }
.chat-input { flex: none; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--graphite-200); border-radius: 999px; padding: 8px 8px 8px 15px; margin: 4px 2px 2px; }
.chat-input .ph { font-size: 12px; color: var(--graphite-400); flex: 1; }
.chat-input .send { width: 28px; height: 28px; border-radius: 999px; background: var(--graphite-800); color: #fff; display: flex; align-items: center; justify-content: center; }
.coach-head { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 4px 0 2px; font-size: 13.5px; font-weight: 700; }
.adjusted { background: #fff; border: 1px solid var(--graphite-200); border-radius: 13px; overflow: hidden; margin-top: 8px; }
.adjusted .ah { font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--graphite-400); padding: 9px 12px 7px; border-bottom: 1px solid var(--graphite-200); }
.adjusted .ar { display: flex; justify-content: space-between; padding: 7px 12px; font-size: 11.5px; font-weight: 600; border-top: 1px solid var(--graphite-100); }
.adjusted .ar:first-of-type { border-top: none; }
.adjusted .ar .m { color: var(--graphite-400); font-weight: 500; font-variant-numeric: tabular-nums; }

/* --- Progress screen --- */
.metric-big { padding: 0 2px; }
.metric-big .mv { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.metric-big .mv small { font-size: 14px; font-weight: 600; color: var(--graphite-400); }
.metric-big .delta { display: inline-flex; align-items: center; gap: 5px; background: var(--success-tint); color: var(--success); font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 4px 10px; margin-top: 6px; }
.seg { display: flex; background: #fff; border: 1px solid var(--graphite-200); border-radius: 999px; padding: 3px; }
.seg .si { flex: 1; text-align: center; font-size: 10.5px; font-weight: 600; color: var(--graphite-500); border-radius: 999px; padding: 6px 0; }
.seg .si.on { background: var(--graphite-800); color: #fff; }
.spark { width: 100%; height: auto; display: block; }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat3 .p-card { padding: 11px 12px; }
.stat3 .v { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat3 .k { font-size: 8.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--graphite-400); margin-top: 2px; }

/* responsive phone sizing */
@media (max-width: 720px) {
  .phone { --pw: 270px; }
  .phone.lg { --pw: 290px; }
}
