/* Ambulance at Your Fingertips: interactive prototype
   Same three colours as the case study: teal (brand), green (action), neutrals. */
:root{
  --teal:#4C9180; --teal-l:#E4EFEC; --lime:#7DBC20; --lime-l:#EEF6DF;
  --ink:#1E2B27; --muted:#5E6E69; --line:#E2E6E1; --soft:#F2F5F4; --paper:#F7F6F1;
  --shade:#1E2B27; --shade-tile:#33433E;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{font-family:Inter,system-ui,sans-serif;color:var(--ink);background:transparent;-webkit-font-smoothing:antialiased;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;overflow:hidden;padding-top:6px}
body.static{padding-top:0}
body.static{background:#fff}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
.jost{font-family:Jost,sans-serif}

/* Phone frame */
#stage{width:380px;transform-origin:top center}
.phone{width:380px;height:780px;border-radius:52px;background:#0F1513;padding:10px;box-shadow:0 8px 18px rgba(15,21,19,.22)}
.screen{position:relative;width:360px;height:760px;border-radius:42px;overflow:hidden;background:var(--shade)}
body.static #stage{transform:none!important;width:360px}
body.static .phone{width:360px;height:760px}
body.static .phone{padding:0;background:none;box-shadow:none;border-radius:0}
body.static .screen{border-radius:0}
.controls{display:flex;gap:8px;justify-content:center;margin-top:14px}
.controls button{font-size:13px;font-weight:600;padding:8px 14px;border-radius:20px;background:#fff;border:1px solid var(--line);color:var(--ink)}
body.static .controls{display:none}

/* Status bar */
.sb{position:absolute;top:0;left:0;right:0;height:34px;display:flex;align-items:center;justify-content:space-between;padding:0 26px;font-size:13px;font-weight:600;z-index:20;color:#fff}
.sb.darktext{color:var(--ink)}
.sb .icons{display:flex;gap:6px;align-items:center}
.sb svg{width:15px;height:15px}

/* Quick settings */
.qs{position:absolute;inset:0;background:var(--shade);color:#fff;padding:50px 20px 0}
.qs .clock{font-family:Jost;font-size:44px;font-weight:400;line-height:1}
.qs .date{font-size:13px;color:rgba(255,255,255,.65);margin-top:4px}
.qs .big{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:22px}
.qs .bigtile{height:62px;border-radius:20px;background:var(--shade-tile);display:flex;align-items:center;gap:10px;padding:0 16px;font-size:14px;font-weight:600}
.qs .bigtile.on{background:var(--teal)}
.qs .bigtile small{display:block;font-size:11px;font-weight:500;opacity:.7}
.qs .bigtile svg{width:20px;height:20px;flex:none}
.qs .grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px 8px;margin-top:22px}
.qs .tile{display:flex;flex-direction:column;align-items:center;gap:7px;font-size:10.5px;color:rgba(255,255,255,.7);text-align:center}
.qs .tile .ic{width:58px;height:58px;border-radius:50%;background:var(--shade-tile);display:flex;align-items:center;justify-content:center}
.qs .tile .ic svg{width:22px;height:22px}
.qs .tile.amb{color:#fff;font-weight:600}
.qs .tile.amb .ic{background:var(--lime);color:var(--ink);position:relative}
.qs .tile.amb .ic:after{content:"";position:absolute;inset:-6px;border-radius:50%;border:2px solid var(--lime);opacity:.6;animation:ring 1.8s ease-out infinite}
body.static .qs .tile.amb .ic:after{animation:none;opacity:.45}
@keyframes ring{0%{transform:scale(.9);opacity:.7}100%{transform:scale(1.25);opacity:0}}
.qs .bright{margin-top:24px;height:44px;border-radius:22px;background:var(--shade-tile);position:relative;overflow:hidden}
.qs .bright:before{content:"";position:absolute;left:0;top:0;bottom:0;width:58%;background:rgba(255,255,255,.22);border-radius:22px}
.qs .hint{margin-top:26px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.1);border-radius:18px;padding:14px 16px;font-size:12.5px;line-height:1.5;color:rgba(255,255,255,.8);display:flex;gap:12px;align-items:flex-start}
.qs .hint b{color:#fff}
.qs .hint .dot{width:8px;height:8px;border-radius:50%;background:var(--lime);margin-top:5px;flex:none}
.qs .notif{margin-top:12px;background:var(--shade-tile);border-radius:18px;padding:14px 16px;font-size:12.5px;color:rgba(255,255,255,.75)}
.qs .notif b{color:#fff;font-weight:600}

/* Sheets */
.dim{position:absolute;inset:0;background:rgba(15,21,19,.55);z-index:5}
.sheet{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:28px 28px 0 0;z-index:10;display:flex;flex-direction:column;animation:up .35s cubic-bezier(.2,.8,.2,1)}
body.static .sheet{animation:none}
@keyframes up{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
.handle{width:40px;height:4px;border-radius:2px;background:var(--line);margin:10px auto 0}
.sheet .pad{padding:14px 20px 0}
.row{display:flex;align-items:center;gap:12px}
.between{justify-content:space-between}
.iconbtn{width:36px;height:36px;border-radius:50%;background:var(--soft);display:flex;align-items:center;justify-content:center;flex:none}
.iconbtn svg{width:18px;height:18px}
.badge{width:40px;height:40px;border-radius:14px;background:var(--lime-l);color:var(--teal);display:flex;align-items:center;justify-content:center;flex:none}
.badge svg{width:22px;height:22px}
.h1{font-family:Jost;font-size:22px;font-weight:600;line-height:1.15}
.h-eta{font-family:Jost;font-size:30px;font-weight:600;line-height:1.05}
.sub{font-size:13px;color:var(--muted);line-height:1.45}
.label{font-size:11.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.card{border:1px solid var(--line);border-radius:18px;overflow:hidden}
.loc{padding:12px 14px;display:flex;gap:12px;align-items:flex-start}
.loc .pin{width:32px;height:32px;border-radius:50%;background:var(--teal-l);color:var(--teal);display:flex;align-items:center;justify-content:center;flex:none}
.loc .pin svg{width:17px;height:17px}
.loc .addr{font-size:14px;font-weight:600;line-height:1.3}
.loc .acc{font-size:11.5px;color:var(--teal);font-weight:600;margin-top:3px;display:flex;gap:5px;align-items:center}
.loc .acc:before{content:"";width:6px;height:6px;border-radius:50%;background:var(--lime)}
.link{font-size:13px;font-weight:600;color:var(--teal)}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:flex;align-items:center;gap:6px;padding:8px 12px;border-radius:14px;border:1px solid var(--line);font-size:13px;font-weight:500;background:#fff;transition:.15s}
.chip svg{width:16px;height:16px;color:var(--teal)}
.chip.on{background:var(--teal);border-color:var(--teal);color:#fff}
.chip.on svg{color:#fff}
.cta{width:100%;height:58px;border-radius:18px;background:var(--lime);color:var(--ink);font-weight:700;font-size:17px;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.2;box-shadow:0 6px 16px rgba(125,188,32,.35)}
.cta small{font-size:11.5px;font-weight:500;opacity:.8}
.cta:active{transform:scale(.98)}
.ghost{flex:1;height:46px;border-radius:14px;border:1px solid var(--line);font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:8px}
.ghost svg{width:17px;height:17px;color:var(--teal)}
.count{width:100%;height:58px;border-radius:18px;background:var(--ink);color:#fff;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;padding:0 8px 0 18px}
.count .fill{position:absolute;left:0;top:0;bottom:0;background:var(--teal);width:0}
.count span,.count button{position:relative}
.count .t{font-weight:700;font-size:16px}
.count .t small{display:block;font-size:11.5px;font-weight:500;opacity:.75}
.count button{height:42px;padding:0 18px;border-radius:13px;background:#fff;color:var(--ink);font-weight:700;font-size:14px}
.check{display:flex;gap:10px;align-items:flex-start;font-size:13px;line-height:1.4}
.check .c{width:22px;height:22px;border-radius:50%;background:var(--teal);color:#fff;display:flex;align-items:center;justify-content:center;flex:none}
.check .c svg{width:13px;height:13px}
.check .c.wait{background:var(--soft);color:var(--teal)}
.check .c.wait svg{animation:spin 1.2s linear infinite}
body.static .check .c.wait svg{animation:none}
@keyframes spin{to{transform:rotate(360deg)}}
.check b{font-weight:600}

/* Map */
.map{position:absolute;left:0;right:0;top:0;overflow:hidden;background:#E9EDE9}
.map svg{display:block}
.pulse{transform-box:fill-box;transform-origin:center;animation:pulse 2s ease-out infinite}
.pulse.d2{animation-delay:1s}
body.static .pulse{animation:none;opacity:.25}
@keyframes pulse{0%{transform:scale(.3);opacity:.6}100%{transform:scale(2.4);opacity:0}}

/* Tracking */
.progress{height:6px;border-radius:3px;background:var(--soft);overflow:hidden}
.progress div{height:100%;background:var(--lime);border-radius:3px;transition:width .6s}
.crew{padding:14px;display:flex;gap:12px;align-items:center}
.avatar{width:46px;height:46px;border-radius:50%;background:var(--teal-l);color:var(--teal);display:flex;align-items:center;justify-content:center;font-family:Jost;font-weight:600;font-size:17px;flex:none;position:relative}
.avatar:after{content:"";position:absolute;right:-1px;bottom:-1px;width:16px;height:16px;border-radius:50%;background:var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/9px no-repeat;border:2px solid #fff}
.plate{display:inline-block;font-size:11.5px;font-weight:700;letter-spacing:.04em;border:1.5px solid var(--ink);border-radius:6px;padding:2px 6px;margin-top:5px}
.callbtn{width:44px;height:44px;border-radius:50%;background:var(--lime);color:var(--ink);display:flex;align-items:center;justify-content:center;flex:none}
.callbtn svg{width:19px;height:19px}
.msgbtn{width:44px;height:44px;border-radius:50%;border:1px solid var(--line);color:var(--teal);display:flex;align-items:center;justify-content:center;flex:none}
.msgbtn svg{width:19px;height:19px}
.tips{background:var(--lime-l);border-radius:18px;padding:14px 16px}
.tips ol{list-style:none;margin-top:10px;display:grid;gap:9px;counter-reset:t}
.tips li{counter-increment:t;display:flex;gap:10px;font-size:13px;line-height:1.4}
.tips li:before{content:counter(t);width:20px;height:20px;border-radius:50%;background:#fff;color:var(--teal);font-weight:700;font-size:11px;display:flex;align-items:center;justify-content:center;flex:none}
.listrow{display:flex;align-items:center;gap:12px;padding:13px 0;border-top:1px solid var(--line);font-size:13.5px}
.listrow .ic{width:34px;height:34px;border-radius:12px;background:var(--soft);color:var(--teal);display:flex;align-items:center;justify-content:center;flex:none}
.listrow .ic svg{width:17px;height:17px}
.listrow b{font-weight:600;display:block}
.listrow .chev{margin-left:auto;color:var(--muted)}
.listrow .chev svg{width:16px;height:16px}
.scroll{overflow-y:auto;scrollbar-width:none}
.scroll::-webkit-scrollbar{display:none}
.toast{position:absolute;left:20px;right:20px;bottom:24px;background:var(--ink);color:#fff;font-size:13px;padding:12px 16px;border-radius:14px;z-index:40;display:flex;gap:10px;align-items:center;animation:up .3s}
.toast svg{width:16px;height:16px;color:var(--lime)}

/* Cancel */
.reason{display:flex;align-items:center;gap:12px;padding:13px 14px;border:1px solid var(--line);border-radius:14px;font-size:14px}
.reason .r{width:18px;height:18px;border-radius:50%;border:2px solid #9AA6A2;flex:none}
.reason.on{border-color:var(--teal);background:var(--teal-l)}
.reason.on .r{border:5px solid var(--teal)}
.outline{width:100%;height:50px;border-radius:16px;border:1.5px solid var(--ink);font-weight:600;font-size:15px}
.outline:disabled{opacity:.35}

/* Big status */
.okmark{width:64px;height:64px;border-radius:50%;background:var(--lime);color:var(--ink);display:flex;align-items:center;justify-content:center}
.okmark svg{width:32px;height:32px}

/* More options (full screen) */
.full{position:absolute;inset:0;background:#fff;z-index:10;display:flex;flex-direction:column}
.topbar{padding:44px 16px 12px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line)}
.seg{display:grid;grid-template-columns:1fr 1fr;background:var(--soft);border-radius:14px;padding:4px}
.seg button{height:38px;border-radius:11px;font-size:13.5px;font-weight:600;color:var(--muted)}
.seg button.on{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.field{border:1px solid var(--line);border-radius:14px;padding:9px 14px;font-size:14px}
.field small{display:block;font-size:11px;color:var(--muted);font-weight:500}
.field input{border:0;outline:0;font:inherit;width:100%;color:var(--ink);background:none}
.type{border:1px solid var(--line);border-radius:16px;padding:12px 14px;display:flex;gap:12px;align-items:flex-start;text-align:left;width:100%}
.type .r{width:18px;height:18px;border-radius:50%;border:2px solid #9AA6A2;flex:none;margin-top:2px}
.type.on{border-color:var(--teal);background:var(--teal-l)}
.type.on .r{border:5px solid var(--teal)}
.type b{font-size:14px;display:block}
.type span{font-size:12px;color:var(--muted);line-height:1.4;display:block;margin-top:2px}
.tag{font-size:10.5px;font-weight:700;color:var(--teal);background:#fff;border-radius:6px;padding:2px 6px;margin-left:6px;vertical-align:1px}
.note{font-size:12px;color:var(--muted);line-height:1.45;display:flex;gap:8px}
.note svg{width:15px;height:15px;color:var(--teal);flex:none;margin-top:1px}
.foot{padding:12px 20px 22px;border-top:1px solid var(--line);background:#fff}
.gap6{height:6px}.gap10{height:10px}.gap14{height:14px}.gap18{height:18px}.gap22{height:22px}
.type span.tag{display:inline;margin-top:0;font-size:10.5px;color:var(--teal);background:#fff}
.calm{display:flex;gap:10px;align-items:flex-start;background:var(--soft);border-radius:14px;padding:11px 13px;font-size:12.5px;line-height:1.45;color:var(--muted)}
.calm svg{width:16px;height:16px;color:var(--teal);flex:none;margin-top:1px}
.calm b{color:var(--ink);font-weight:600}
