/*
 * Screen layout and motion for the OIS Mobile App (website and App Store versions).
 * Works with layout.js, which adds the c3home, c3incident and c3prepare classes and regroups rows.
 * The wording is unchanged and still comes from content.js.
 */
:root{--c3-card-shadow:inset 0 0 0 1px rgba(255,255,255,.05);--c3-accent-soft:rgba(0,191,99,.14);--c3-hero-shadow:0 14px 32px rgba(179,38,30,.28)}
:root[data-theme="light"]{--c3-card-shadow:0 1px 2px rgba(16,24,20,.05),0 8px 24px rgba(16,24,20,.06);--c3-accent-soft:rgba(0,122,61,.10);--c3-hero-shadow:0 14px 30px rgba(179,38,30,.24)}
@media (prefers-color-scheme: light){:root:not([data-theme="dark"]){--c3-card-shadow:0 1px 2px rgba(16,24,20,.05),0 8px 24px rgba(16,24,20,.06);--c3-accent-soft:rgba(0,122,61,.10);--c3-hero-shadow:0 14px 30px rgba(179,38,30,.24)}}

.c3home.stack{gap:24px}
.c3home .logo{width:200px;max-width:70%;margin:0}
.c3home .c3chev{flex-shrink:0;color:var(--muted)}

/* The one large action, then a quieter second row */
.c3home .cta{justify-content:space-between;gap:16px;text-align:left;min-height:108px;padding:20px 20px 20px 22px;border-radius:22px;font-size:22px;line-height:1.22;letter-spacing:-.01em;box-shadow:var(--c3-hero-shadow)}
.c3home .cta .c3go{width:44px;height:44px;flex-shrink:0;border-radius:999px;background:rgba(255,255,255,.16);display:flex;align-items:center;justify-content:center}
.c3home .cta2{justify-content:space-between;gap:12px;text-align:left;min-height:60px;padding:12px 16px 12px 22px;border:none;border-radius:18px;box-shadow:var(--c3-card-shadow)}

/* One-tap call */
.c3home .c3call{flex:none;justify-content:flex-start;gap:14px;height:auto;min-height:60px;padding:10px 16px;border:none;border-radius:18px;background:var(--surface);box-shadow:var(--c3-card-shadow);font-size:16px;font-weight:600}
.c3home .c3call .c3phone{width:40px;height:40px;flex-shrink:0;border-radius:999px;background:var(--c3-accent-soft);color:var(--accent);display:flex;align-items:center;justify-content:center}

/* Readiness: thin bar, count on the right, quiet "Incomplete" label */
.c3home .readiness,.c3home .readiness.is-incomplete,.c3home .readiness.is-complete{gap:12px;padding:16px 16px 18px;border:none;border-radius:18px;box-shadow:var(--c3-card-shadow)}
.c3home .readiness .top small{flex-shrink:0}
.c3home .readiness .meter{height:4px}
.c3home .readiness .meter span{border-radius:999px}
.c3home .readiness .incomplete{align-self:flex-start;padding:0;border:none;border-radius:0;color:var(--muted);font-size:12px;letter-spacing:.04em;text-transform:uppercase;line-height:1.3}

/* Grouped list: legal defense options, wellness resources, disclaimer */
.c3home .c3group{border-radius:18px;background:var(--surface);box-shadow:var(--c3-card-shadow);overflow:hidden}
.c3home .c3group>a{border-bottom:1px solid var(--line)}
.c3home .c3group>a:last-child{border-bottom:none}
.c3home .c3row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;padding:12px 16px;color:var(--text);text-decoration:none;font-size:16px;font-weight:500}
.c3home .c3row[hidden]{display:none}
.c3home .c3group .ready.disc{gap:3px;padding:14px 16px;border:none;border-bottom:1px solid var(--line);border-radius:0;background:none}
.c3home .c3group .ready.disc:last-child{border-bottom:none}
.c3home .c3group .ready.disc .top{align-items:center}
.c3home .c3group .ready.disc strong{color:var(--text);font-weight:500}
.c3home .c3group .ready.disc small{color:var(--muted);line-height:1.4;padding-right:30px}

.c3home .textlink{font-size:13px}
.c3home>p.fine{margin-bottom:-14px}

/* ---------- Incident screen (Your OIS plan) ---------- */
:root{--c3-bar-bg:rgba(18,20,23,.9);--c3-seg-on:#30363E;--c3-seg-track:var(--surface);--c3-seg-shadow:none}
:root[data-theme="light"]{--c3-bar-bg:rgba(244,244,241,.9);--c3-seg-on:#FFFFFF;--c3-seg-track:#E7E5DF;--c3-seg-shadow:0 1px 3px rgba(16,24,20,.12)}
@media (prefers-color-scheme: light){:root:not([data-theme="dark"]){--c3-bar-bg:rgba(244,244,241,.9);--c3-seg-on:#FFFFFF;--c3-seg-track:#E7E5DF;--c3-seg-shadow:0 1px 3px rgba(16,24,20,.12)}}

.c3incident.stack{gap:22px}
.c3incident .c3chev{flex-shrink:0;color:var(--muted)}
.c3incident .c3ico{flex-shrink:0;color:var(--muted)}

/* Officer / supporting switch: neutral, so green means calling and progress */
.c3incident .seg{border:none;border-radius:16px;background:var(--c3-seg-track)}
.c3incident .seg button{border-radius:12px;line-height:1.25;padding:4px 8px}
.c3incident .seg button[aria-pressed="true"]{background:var(--c3-seg-on);color:var(--text);box-shadow:var(--c3-seg-shadow)}

/* Calls: one solid green button, then a card of three rows */
.c3incident .c3callblock{display:flex;flex-direction:column;gap:10px}
.c3incident .c3legal{flex:none;justify-content:flex-start;gap:14px;height:auto;min-height:64px;padding:10px 18px;border-radius:18px;font-size:18px;font-weight:700;text-align:left}
.c3incident .row.calls{flex-direction:column;gap:0;border-radius:18px;background:var(--surface);box-shadow:var(--c3-card-shadow);overflow:hidden}
.c3incident .calls .btn{flex:none;width:100%;justify-content:flex-start;gap:14px;min-height:58px;padding:9px 16px;border:none;border-bottom:1px solid var(--line);border-radius:0;font-size:16px;font-weight:500;text-align:left}
.c3incident .calls .btn:last-child{border-bottom:none}
.c3incident .calls .c3phone{width:36px;height:36px;flex-shrink:0;border-radius:999px;background:var(--c3-accent-soft);color:var(--accent);display:flex;align-items:center;justify-content:center}
.c3incident .calls .c3label{flex:1}
.c3incident .calls .c3num{max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:400;color:var(--muted)}
.c3incident .c3callblock>p.fine{margin:0;padding:0 4px}

/* Quick access: procedures (supporting), saved documents, trauma center, public safety statement */
.c3incident .c3group{border-radius:18px;background:var(--surface);box-shadow:var(--c3-card-shadow);overflow:hidden}
.c3incident .c3group>*{border-bottom:1px solid var(--line)}
.c3incident .c3group>*:last-child{border-bottom:none}
.c3incident .c3row{display:flex;align-items:center;gap:14px;min-height:60px;padding:10px 16px;color:var(--text);text-decoration:none;font-size:16px;font-weight:500}
.c3incident .c3row>span:not([class]){flex:1}
.c3incident .c3group #incidentDocs{padding:0;border:none;border-bottom:1px solid var(--line);border-radius:0;background:none}
.c3incident #incidentDocs .list{border:none;border-radius:0;background:none}
.c3incident #incidentDocs .list a{gap:14px;min-height:60px;padding:10px 16px}
.c3incident #incidentDocs .list a::before{content:"";width:22px;height:22px;flex-shrink:0;background:var(--muted);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l5 5v13H7z'/%3E%3Cpath d='M14 3v5h5'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l5 5v13H7z'/%3E%3Cpath d='M14 3v5h5'/%3E%3C/svg%3E") center/contain no-repeat}
.c3incident #incidentDocs .list .docname{font-size:16px!important;font-weight:500}
.c3incident #incidentDocsBody>.stack,.c3incident #incidentDocsBody>small{display:flex;padding:14px 16px}
.c3incident .c3group .pss{padding:0;border:none;border-radius:0;background:none}
.c3incident .c3group .pss summary{justify-content:center;min-height:60px;padding:10px 16px}
.c3incident .c3group .pss summary .top{align-items:center;justify-content:flex-start;gap:14px}
.c3incident .c3group .pss summary .top strong{flex:1;font-weight:500}
.c3incident .c3group .pss summary>small{padding-left:36px}
.c3incident .c3group .pss[open] .pssbody{margin-top:0;padding:4px 16px 16px}

.c3incident .remember{padding:14px 16px;border-radius:18px}

/* Progress: stays in view while the steps scroll */
.c3incident .c3prog{position:sticky;top:env(safe-area-inset-top,0px);z-index:3;margin:0 -20px;padding:0 20px 10px;background:var(--c3-bar-bg);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.c3incident .c3prog #prog{font-weight:600;color:var(--text)}
.c3incident .c3bar{height:4px;margin-top:-4px;border-radius:999px;background:var(--line);overflow:hidden}
.c3incident .c3bar span{display:block;height:100%;border-radius:999px;background:var(--accent);transition:width .25s ease}

/* Steps as a timeline */
.c3incident .phasenote{margin:0;padding:0;border:none}
.c3incident .phase h2{letter-spacing:.02em}
.c3incident .phase ol.steps{position:relative;gap:2px}
.c3incident .phase ol.steps::before{content:"";position:absolute;left:21px;top:30px;bottom:30px;width:2px;background:var(--line)}
.c3incident .phase .scard{position:relative;border:none;border-radius:0;background:none}
.c3incident .phase .shead{padding:4px 0}
.c3incident .phase .check .num{width:32px;height:32px;background:var(--bg)}
.c3incident .phase .check[aria-pressed="true"] .num{background:var(--accent)}
.c3incident .phase .stitle b{font-size:16px}
.c3incident .phase .scard.is-done .stitle b{color:var(--muted);text-decoration:none}
.c3incident .phase .sitems{padding:0 4px 14px 50px;font-size:16px;line-height:1.5}

.c3incident>.ready.disc{border:none;border-radius:18px;background:var(--surface);box-shadow:var(--c3-card-shadow)}
.c3incident>.ready.disc strong{color:var(--text);font-weight:500}
.c3incident>.ready.disc small{color:var(--muted);line-height:1.4}
@media (prefers-reduced-motion: reduce){.c3incident .c3bar span{transition:none}}
.c3incident .pss[open] summary .c3ico{transform:none}

/* ---------- While typing: the tab bar gets out of the way of the keyboard ---------- */
html.c3typing .tabs{display:none}

/* ---------- Form fields and buttons (all screens) ---------- */
.field input,.field textarea{border-radius:14px}
.field input{height:52px}
.field input:focus,.field textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--c3-accent-soft)}
.btn{border-radius:14px}

/* ---------- Prepare screen ---------- */
.c3prepare.stack{gap:22px}
.c3prepare .c3chev{flex-shrink:0;color:var(--muted)}

/* Readiness checklist: one card, thin bar, steps as rows */
.c3prepare .preplist{border-radius:18px;background:var(--surface);box-shadow:var(--c3-card-shadow);overflow:hidden}
.c3prepare .preplist>summary,.c3prepare .preplist.is-incomplete>summary,.c3prepare .preplist.is-complete>summary{gap:12px;padding:16px 16px 18px;border:none;border-radius:0;background:none}
.c3prepare .preplist .incomplete{padding:0;border:none;border-radius:0;color:var(--muted);font-size:12px;letter-spacing:.04em;text-transform:uppercase;line-height:1.3}
.c3prepare #prog,.c3prepare #prog.todo,.c3prepare #prog.ok{color:var(--muted);font-size:13px;font-weight:400}
.c3prepare .c3bar{height:4px;border-radius:999px;background:var(--line);overflow:hidden}
.c3prepare .c3bar span{display:block;height:100%;border-radius:999px;background:var(--accent);transition:width .25s ease}
.c3prepare .preplist>.steps,.c3prepare .preplist>.prepdone{margin-top:0}
.c3prepare .preplist ol.steps{gap:0}
.c3prepare .preplist .scard.prep,.c3prepare .preplist .scard.prep:not(.is-done),.c3prepare .preplist .scard.prep.is-done{border:none;border-top:1px solid var(--line);border-radius:0;background:none}
.c3prepare .preplist .shead{padding:6px 12px 6px 8px}
.c3prepare .preplist .stitle b{font-size:16px}
.c3prepare .preplist .scard.is-done .stitle b{color:var(--muted);text-decoration:none}
.c3prepare .preplist .sitems{font-size:15px;line-height:1.5}
.c3prepare .prepdone>summary,.c3prepare .prepdone[open]>summary{min-height:52px;margin:0;padding:0 16px;border:none;border-top:1px solid var(--line);border-radius:0}

/* My Documents, trauma center, procedures: one grouped list */
.c3prepare .c3group{border-radius:18px;background:var(--surface);box-shadow:var(--c3-card-shadow);overflow:hidden}
.c3prepare .c3group>.ready{gap:3px;margin:0!important;padding:14px 16px;border:none;border-bottom:1px solid var(--line);border-radius:0;background:none}
.c3prepare .c3group>.ready:last-child{border-bottom:none}
.c3prepare .c3group>.ready .top{align-items:center}
.c3prepare .c3group>.ready strong{font-weight:500}
.c3prepare .c3group>.ready small{line-height:1.4;padding-right:30px}

.c3prepare #legalplan{border:none;border-radius:18px;box-shadow:var(--c3-card-shadow)}
.c3prepare #legalplan textarea{background:var(--bg)}
.c3prepare section>div>h2.sect{font-size:18px}
@media (prefers-reduced-motion: reduce){.c3prepare .c3bar span{transition:none}}

/* ---------- Motion and touch feedback ---------- */
/* The screen that is arriving animates in: from the right when going deeper, from the left when going
   back, and a short fade when switching tabs. layout.js picks the class. Off with Reduce Motion. */
@keyframes c3-in-forward{from{opacity:0;transform:translateX(28px)}to{opacity:1;transform:none}}
@keyframes c3-in-back{from{opacity:0;transform:translateX(-28px)}to{opacity:1;transform:none}}
@keyframes c3-in-fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes c3-pop{0%{transform:scale(.72)}60%{transform:scale(1.14)}100%{transform:scale(1)}}
.c3-forward{animation:c3-in-forward .26s cubic-bezier(.2,.7,.2,1) backwards}
.c3-back{animation:c3-in-back .26s cubic-bezier(.2,.7,.2,1) backwards}
.c3-fade{animation:c3-in-fade .2s ease-out backwards}
.c3pop{animation:c3-pop .28s cubic-bezier(.3,1.4,.5,1)}

/* Pressed states: everything tappable answers the finger */
a,button,summary{-webkit-tap-highlight-color:transparent}
.btn,.cta,.cta2,.c3row,.ready,.list a,.stitle,.seg button,.tabs a,.linkbtn,.textlink,.back,.preplist>summary,.prepdone>summary,.pss summary{transition:opacity .12s ease,transform .12s ease}
.btn:active,.cta:active,.cta2:active,a.ready:active{transform:scale(.98);opacity:.82}
.c3row:active,.list a:active,.stitle:active,.seg button:active,.tabs a:active,.linkbtn:active,.textlink:active,.back:active,.preplist>summary:active,.prepdone>summary:active,.pss summary:active{opacity:.55}
.check:active .num{transform:scale(.9)}
.check .num{transition:transform .12s ease}
@media (prefers-reduced-motion: reduce){
  .c3-forward,.c3-back,.c3-fade,.c3pop{animation:none}
  .btn:active,.cta:active,.cta2:active,a.ready:active,.check:active .num{transform:none}
}

/* ---------- Home: main button wording, always on the same two lines ---------- */
/* layout.js splits the question into two lines and sizes the type so the wider line exactly fits. */
.c3home .cta>span:first-child{flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:6px}
.c3home .cta .c3hero-h{display:block;font-family:'Barlow Condensed','Arial Narrow',sans-serif;font-weight:700;font-size:30px;line-height:.98;letter-spacing:.01em;text-transform:uppercase}
.c3home .cta .c3line{display:block;width:max-content;white-space:nowrap}
.c3home .cta .c3hero-t{font-size:15px;font-weight:500;line-height:1.3;letter-spacing:0;opacity:.88}
.c3home .cta2>span:first-child{flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:2px}
.c3home .cta2 .c3tail{font-size:13px;font-weight:400;color:var(--muted)}

/* Add to Home Screen reminder (phone browsers only) */
.c3home .installbanner{padding:14px 16px;border:none;border-radius:18px;box-shadow:var(--c3-card-shadow)}
