/* The demo: an iPhone and an Apple Watch drawn in the page, running Stride with made-up data. */
.demo-stage { display: flex; gap: 40px; justify-content: center; align-items: center; flex-wrap: wrap; padding: 8px 0 24px; }
.demo-switch { display: none; justify-content: center; gap: 6px; margin: 0 auto 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; width: max-content; }
.demo-switch button { border: 0; background: transparent; color: var(--text-2); font: 600 0.95rem system-ui, sans-serif; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.demo-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.demo-get { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 32px; text-align: center; }
.demo-get p { margin: 0; color: var(--text-2); }
.demo-hint { text-align: center; color: var(--text-2); font-size: 0.9rem; margin: 0; }

/* Device frames hold a fixed-size screen that is scaled to fit. */
.dev { position: relative; flex: 0 0 auto; }
.dev .scaler { transform-origin: top left; position: absolute; top: 0; left: 0; }
.iphone .bezel { width: 402px; height: 874px; border-radius: 62px; background: #000; padding: 12px; box-shadow: 0 0 0 2px #2c333e, 0 40px 80px rgba(0,0,0,.5); }
.iphone .screen { width: 378px; height: 850px; border-radius: 52px; overflow: hidden; position: relative; background: #000; }
.watch .bezel { width: 236px; height: 284px; border-radius: 64px; background: #111; padding: 14px; box-shadow: 0 0 0 2px #2c333e, 0 30px 60px rgba(0,0,0,.5); position: relative; }
.watch .bezel::after { content: ""; position: absolute; right: -9px; top: 70px; width: 9px; height: 46px; border-radius: 0 6px 6px 0; background: #2a3039; }
.watch .bezel::before { content: ""; position: absolute; right: -6px; top: 140px; width: 6px; height: 34px; border-radius: 0 4px 4px 0; background: #2a3039; }
.watch .screen { width: 208px; height: 256px; border-radius: 50px; overflow: hidden; position: relative; background: #000; }

/* App UI (phone) */
.app { --lime: #c7ff3d; --card: #1c1c1e; --card2: #2c2c2e; --sec: rgba(235,235,245,.6); --ter: rgba(235,235,245,.3);
  --ahead: #33c759; --ghost: #9e6bfa; --heart: #ff3b5f; --elev: #409eff; --orange: #ff9f0a; --parkrun: #ffa300;
  font: 15px/1.3 -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; color: #fff; -webkit-font-smoothing: antialiased; }
.app * { box-sizing: border-box; }
.app :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
.num { font-family: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.ph .status { position: absolute; top: 0; left: 0; right: 0; height: 54px; display: flex; justify-content: space-between; align-items: center; padding: 6px 30px 0 36px; font-weight: 600; font-size: 16px; z-index: 5;
  background: linear-gradient(#000 0%, rgba(0,0,0,.85) 70%, rgba(0,0,0,0)); pointer-events: none; }
.ph .island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 124px; height: 36px; border-radius: 20px; background: #000; z-index: 6; }
.ph .status .icons { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.ph .body { position: absolute; inset: 0; overflow-y: auto; padding: 58px 16px 120px; scrollbar-width: none; }
.ph .body::-webkit-scrollbar { display: none; }
.ph .tabbar { position: absolute; left: 14px; right: 14px; bottom: 18px; height: 64px; border-radius: 32px; background: rgba(40,40,44,.82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: flex; justify-content: space-around; align-items: center; padding: 0 6px; z-index: 5; box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
.ph .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: #fff; padding: 7px 0; border-radius: 26px; }
.ph .tabbar button svg { width: 24px; height: 24px; }
.ph .tabbar button.on { color: var(--lime); background: rgba(255,255,255,.08); }
.ph .navbar { display: flex; align-items: center; justify-content: space-between; height: 44px; margin: 0 0 8px; }
.ph .navbar .back { width: 40px; height: 40px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 20px; }
.ph .navbar .title { font-weight: 600; font-size: 17px; }
.ph h1.big { font-size: 34px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.ph .caption { font-size: 12px; font-weight: 600; color: var(--sec); letter-spacing: .02em; text-transform: uppercase; }
.ph .head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.app .card { background: var(--card); border: 0; border-radius: 20px; padding: 16px; margin: 0 0 14px; }
.app .card.tap { cursor: pointer; transition: transform .12s; display: block; width: 100%; }
.app .card.tap:active { transform: scale(.98); }
.app .card .ctitle { display: flex; align-items: center; gap: 8px; color: var(--sec); font-weight: 600; font-size: 15px; margin-bottom: 10px; }
.row { display: flex; align-items: center; gap: 12px; }
.sp { flex: 1; }
.sec { color: var(--sec); }
.lime { color: var(--lime); }
.chev { color: var(--ter); font-size: 14px; }
.chip { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 999px; padding: 4px 12px 4px 4px; }
.chip small { display: block; font-size: 8.5px; font-weight: 700; color: var(--sec); }
.chip b { font-size: 13px; color: var(--orange); }
.ring { position: relative; display: grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring > b { line-height: 1; }
.btns { display: flex; gap: 10px; margin-bottom: 14px; }
.pill { flex: 1; height: 48px; border-radius: 24px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 16px; }
.pill.lime-bg { background: var(--lime); color: #000; }
.pill.dim { background: rgba(199,255,61,.18); color: var(--lime); }
.pill.grey { background: var(--card2); }
.weekstrip { display: flex; justify-content: space-between; margin-top: 12px; }
.weekstrip div { width: 34px; text-align: center; font-size: 12px; color: var(--sec); }
.weekstrip i { display: grid; place-items: center; width: 28px; height: 28px; margin: 6px auto 0; border-radius: 50%; font-style: normal; font-size: 13px; }
.weekstrip .done i { background: var(--lime); color: #000; font-weight: 800; }
.weekstrip .today { color: var(--lime); }
.weekstrip .today i { box-shadow: 0 0 0 2px var(--lime) inset; color: var(--lime); }
.weekstrip .pl i { background: var(--card2); color: #fff; font-size: 11px; }
.weekstrip .rest i::after { content: "·"; color: var(--ter); font-size: 20px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.kpis .card { margin: 0; }
.stat small { display: block; color: var(--sec); font-size: 13px; }
.stat b { font-size: 28px; font-weight: 700; }
.stat em { font-style: normal; color: var(--sec); font-size: 13px; margin-left: 3px; }
.stat .foot { color: var(--sec); font-size: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px; }
.grid3 small { color: var(--sec); font-size: 12px; display: block; }
.grid3 b { font-size: 21px; font-weight: 600; }
.grid3 em { font-style: normal; font-size: 11px; color: var(--sec); margin-left: 2px; }
.list .item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.07); width: 100%; }
.list .item:last-child { border-bottom: 0; }
.thumb { width: 44px; height: 44px; border-radius: 10px; background: #000; flex: 0 0 auto; }
.seg { display: flex; background: var(--card); border-radius: 10px; padding: 2px; margin-bottom: 14px; }
.seg button { flex: 1; text-align: center; padding: 6px 0; border-radius: 8px; font-size: 13px; font-weight: 600; }
.seg button.on { background: #5a5a5e; }
.group-title { color: var(--sec); font-size: 13px; margin: 16px 4px 6px; display: flex; justify-content: space-between; }
.cell { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.07); width: 100%; }
.cell:last-child { border-bottom: 0; }
.toggle { width: 50px; height: 30px; border-radius: 15px; background: #39393d; position: relative; transition: background .2s; flex: 0 0 auto; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle.on { background: var(--ahead); }
.toggle.on::after { transform: translateX(20px); }
.stepper { display: flex; background: var(--card2); border-radius: 8px; }
.stepper button { width: 44px; height: 30px; display: grid; place-items: center; font-size: 18px; }
.stepper button + button { border-left: 1px solid rgba(255,255,255,.12); }
.popover { position: absolute; z-index: 8; right: 16px; top: 108px; width: 280px; background: rgba(50,50,54,.96); backdrop-filter: blur(16px); border-radius: 18px; padding: 16px; box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.popover .item { display: flex; gap: 12px; align-items: center; margin-top: 10px; font-size: 14px; }
.toast { position: absolute; left: 50%; transform: translateX(-50%); bottom: 96px; background: rgba(60,60,64,.95); padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; z-index: 9; white-space: nowrap; animation: toast 2.4s forwards; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.fade-in { animation: fadein .22s ease; }
@keyframes fadein { from { transform: translateX(14px); } to { transform: none; } }

/* Watch UI */
.wt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; color: #fff; font-family: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif; user-select: none; }
.wt .time { position: absolute; top: 8px; right: 22px; font-size: 13px; font-weight: 600; }
.wt .ttl { position: absolute; top: 8px; left: 22px; font-size: 13px; font-weight: 600; color: var(--lime); }
.wt .scroll { position: absolute; inset: 30px 0 0; overflow-y: auto; padding: 0 12px 16px; scrollbar-width: none; }
.wt .scroll::-webkit-scrollbar { display: none; }
.wt .disc { width: 74px; height: 74px; border-radius: 50%; background: var(--lime); color: #000; display: grid; place-items: center; margin: 8px auto 4px; }
.wt .row2 { display: flex; align-items: center; gap: 8px; background: #222; border-radius: 14px; padding: 8px 10px; margin-top: 6px; width: 100%; font-size: 12px; text-align: left; }
.wt .row2 i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; flex: 0 0 auto; }
.wt .row2 small { display: block; color: #999; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.wt .metrics { position: absolute; inset: 26px 10px 18px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.wt .fig { text-align: center; line-height: 1; }
.wt .fig b { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.wt .fig span { display: block; font-size: 9px; font-weight: 600; color: #8e8e93; margin-top: 3px; letter-spacing: .03em; }
.wt .pair { display: flex; gap: 6px; width: 100%; justify-content: space-around; }
.wt .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 6px; width: 100%; }
.wt .dots { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; }
.wt .dots i { width: 4px; height: 4px; border-radius: 50%; background: #444; }
.wt .dots i.on { background: #fff; height: 9px; border-radius: 2px; }
.wt .ctrl { position: absolute; inset: 30px 0 0; display: flex; gap: 10px; justify-content: center; align-items: center; }
.wt .ctrl button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: #ccc; }
.wt .ctrl button i { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 20px; }
.wt .count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 90px; font-weight: 700; color: var(--lime); animation: pop .9s ease; }
@keyframes pop { from { transform: scale(1.5); opacity: 0; } 30% { transform: scale(1); opacity: 1; } }
.wt .banner { position: absolute; top: 26px; left: 12px; right: 12px; background: #1f6b2f; border-radius: 12px; padding: 5px 8px; font-size: 11px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.wt .pagename { position: absolute; top: 9px; left: 0; right: 0; text-align: center; font-size: 10px; font-weight: 700; color: #8e8e93; letter-spacing: .06em; }
.watch-btns { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.watch-btns button { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 12px; font: 600 0.85rem system-ui, sans-serif; cursor: pointer; }

@media (max-width: 820px) {
  .demo-switch { display: flex; }
  .demo-stage[data-show="phone"] .watch-col, .demo-stage[data-show="watch"] .phone-col { display: none; }
}

/* Maps (MapLibre with OpenFreeMap tiles) */
.app .card.mapcard { padding: 0; overflow: hidden; position: relative; background: #11161d; }
.mapbox { width: 100%; }
.maploading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--sec); font-size: 13px; pointer-events: none; }
.maplegend { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; align-items: center; gap: 8px; font-size: 11px; color: #fff; pointer-events: none; text-shadow: 0 1px 2px #000; }
.maplegend i { flex: 1; height: 5px; border-radius: 3px; background: linear-gradient(90deg, #38d5ff, #c7ff3d, #ff7a2f); }
.app .maplibregl-ctrl-attrib { font-size: 9px; background: rgba(0,0,0,.55) !important; color: #aaa; }
.app .maplibregl-ctrl-attrib a { color: #ccc; }
.app .maplibregl-ctrl-attrib-button { filter: invert(1); }
.app .pill[disabled] { opacity: .4; }
.app .planner-panel button { font-weight: 600; color: var(--lime); }
.app .planner-panel .pill { color: #000; }
