:root{--bg:#fdf7f9;--fg:#1b1f24;--muted:#5b6470;--brand:#cf1f50;--brand-dark:#9c1740;--card:#fff;--line:#f0dde3;--ok:#1a7f4b;--err:#b3261e;--b1:#cf1f50;--b2:#f4a3ba}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--fg);font:17px/1.5 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}
a{color:var(--brand-dark)}
.top{display:flex;justify-content:space-between;align-items:center;padding:10px 16px;background:var(--card);border-bottom:1px solid var(--line)}
.nav{display:flex;gap:18px;align-items:center;padding:10px 16px;background:var(--brand);flex-wrap:wrap}.nav a{color:#fff;text-decoration:none}.nav .link{color:#fff}.nav .logo{display:flex;background:#fff;border-radius:6px;padding:3px 6px;margin-right:6px}.nav .logo img{display:block}
main{padding:16px}.col{max-width:640px;margin:0 auto}.wide{max-width:1200px;margin:0 auto}
h1{font-size:1.7rem;margin:.6em 0 .3em}h2{font-size:1.25rem;margin:1.4em 0 .4em}h3{margin:1.2em 0 .3em}
label{display:block;margin:.9em 0;font-weight:600}
input,select,textarea{display:block;width:100%;min-height:46px;margin-top:4px;padding:10px 12px;font:inherit;border:1px solid #9aa3ad;border-radius:8px;background:#fff}
input[type=checkbox]{display:inline-block;width:22px;min-height:22px;margin:0 8px 0 0;vertical-align:middle}
.check{font-weight:400}
button{min-height:44px;padding:8px 16px;font:inherit;border:1px solid #9aa3ad;border-radius:8px;background:#fff;cursor:pointer}
button.primary{background:var(--brand);border-color:var(--brand);color:#fff;font-weight:700}form>button.primary{width:100%;margin-top:8px}
button.danger{color:var(--err)}button.link{border:0;background:none;color:var(--brand-dark);text-decoration:underline;min-height:0;padding:4px}
.box{padding:10px 14px;border-radius:8px}.ok{background:#e3f4ea;color:var(--ok)}.err{color:var(--err)}.box.err{background:#fbe9e7}.err{display:block;font-weight:400}
.muted{color:var(--muted)}.warn{color:#9a5b00;font-weight:600}
details{margin:1em 0;padding:8px 12px;background:var(--card);border:1px solid var(--line);border-radius:8px}summary{cursor:pointer;font-weight:600;min-height:32px}
#preview{max-width:100%;max-height:260px;border-radius:8px;margin-bottom:8px}
.runs{list-style:none;padding:0}.runs li{display:grid;grid-template-columns:52px 1fr auto;gap:2px 10px;padding:10px 0;border-bottom:1px solid var(--line)}
.runs li span:nth-child(4){grid-column:2/4;color:var(--muted)}
.big{font-size:1.3rem;margin:16px 0;padding:18px;background:var(--brand);color:#fff;border-radius:12px;line-height:1.2}.big b{font-size:3rem}.big small{color:#ffe;font-size:1rem}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:12px 0}
.card{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:14px;text-decoration:none;color:inherit}.card b{display:block;font-size:1.9rem;line-height:1.1}.card small{color:var(--muted)}
.todo:hover{border-color:var(--brand)}
.progress{height:16px;background:#e5e8ec;border-radius:8px;overflow:hidden}.progress div{height:100%;background:linear-gradient(90deg,var(--brand),#f27a9b);transition:width .6s}
.two{display:grid;grid-template-columns:1fr 1fr;gap:24px}@media(max-width:800px){.two{grid-template-columns:1fr}}
.chart{display:flex;align-items:flex-end;gap:8px;height:170px;padding:8px 0}.bar{flex:1;display:flex;flex-direction:column;align-items:center;height:100%}
.stack{flex:1;width:100%;display:flex;flex-direction:column-reverse;justify-content:flex-start}.stack i{display:block;width:100%}.b1{background:var(--b1)}.b2{background:var(--b2)}
.bar small{color:var(--muted)}.legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin:0 4px 0 12px}
.feed{list-style:none;padding:0}.feed li{padding:8px 0;border-bottom:1px solid var(--line)}
table{width:100%;border-collapse:collapse;background:var(--card);border:1px solid var(--line)}th,td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--line);vertical-align:middle}th{background:#eef0f3}
.inline{display:inline-block;margin:0 4px 0 0}.inline select,.inline input{width:auto;display:inline-block;margin:0}
.tabs{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.tabs a.on{font-weight:700}
.row{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:0 12px;align-items:end}
.chip{display:inline-block;padding:4px 12px;background:#fff;border:1px solid var(--line);border-radius:99px}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,540px),1fr));gap:16px}
.rc{display:grid;grid-template-columns:28px 220px minmax(0,1fr);gap:12px;align-items:start;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:12px;font-weight:400;margin:0}
.rc>input{margin:2px 0 0}.rc .ph{display:block;width:220px;height:300px;border-radius:8px;overflow:hidden;background:#e5e8ec}.rc .ph img,.nophoto{width:100%;height:100%;object-fit:contain;display:block}.nophoto{display:flex;align-items:center;justify-content:center;color:var(--muted);width:220px;height:300px;border-radius:8px;background:#e5e8ec}.rc>div{min-width:0;overflow-wrap:anywhere}
.acts{margin-top:10px;display:flex;gap:8px;flex-wrap:wrap}.acts button{flex:1 1 auto;white-space:nowrap;padding:8px 12px}
.badge{display:inline-block;padding:2px 10px;border-radius:99px;font-size:.9rem;font-weight:600;background:#e5e8ec;color:var(--fg)}
.s-approved{background:#e3f4ea;color:var(--ok)}.s-submitted{background:#fff3d6;color:#8a5a00}.s-rejected{background:#fbe9e7;color:var(--err)}
.warnbox{background:#fff3d6;color:#5c3d00}
button.ask{margin-left:4px}
input,select,textarea{font-weight:400}
input[type=file]{padding:8px;background:#fff}
input[type=file]::file-selector-button{min-height:36px;margin-right:12px;padding:4px 14px;font:inherit;font-weight:600;border:1px solid #9aa3ad;border-radius:6px;background:#eef0f3;cursor:pointer}
.cell-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.runs button.link{padding:0;margin-top:2px}
body{overflow-x:hidden}
@media(max-width:560px){.rc{grid-template-columns:28px minmax(0,1fr)}.rc .ph,.rc .nophoto{grid-column:2;width:100%;height:auto;aspect-ratio:3/4;max-height:420px}.rc>div:last-child{grid-column:1/3}}
.bulk label{margin:0}.bulk .check{display:inline-flex;align-items:center}
#preview{display:block;max-height:220px;width:auto;max-width:100%}
a.button{display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 16px;border-radius:8px;text-decoration:none;box-sizing:border-box}
a.button.primary{width:100%;margin:8px 0 4px;background:var(--brand);border:1px solid var(--brand);color:#fff;font-weight:700}
.home{max-width:960px;margin:0 auto}
.hero{padding:8px 0}.hero h1{font-size:2.2rem}.lead{font-size:1.2rem;max-width:70ch}
.head-act a.button{min-height:40px;border:1px solid var(--brand);color:var(--brand-dark);background:#fff;font-weight:600}
.purpose{background:var(--card);border:1px solid var(--line);font-size:1.1rem}
.steps{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;counter-reset:s}
.steps li{counter-increment:s;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:14px}
.steps li::before{content:counter(s);display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:var(--brand);color:#fff;font-weight:700;margin-bottom:6px}
.steps b{display:block}.steps span{color:var(--muted)}
.partners{display:flex;flex-wrap:wrap;gap:8px}
.cta{margin:28px 0 12px;padding:18px;background:var(--card);border:1px solid var(--line);border-radius:12px}

/* home page motion (only with JS and without prefers-reduced-motion) */
.motion .reveal{opacity:0;transform:translateY(18px);transition:opacity .7s ease,transform .7s cubic-bezier(.2,.7,.2,1)}
.motion .reveal.in{opacity:1;transform:none}
.motion .reveal .card,.motion .reveal .steps li,.motion .reveal .chip{opacity:0;transform:translateY(10px);transition:opacity .5s ease,transform .5s ease}
.motion .reveal.in .card,.motion .reveal.in .steps li,.motion .reveal.in .chip{opacity:1;transform:none}
.motion .reveal.in :is(.card,.steps li,.chip):nth-child(2){transition-delay:.1s}
.motion .reveal.in :is(.card,.steps li,.chip):nth-child(3){transition-delay:.2s}
.motion .reveal.in :is(.card,.steps li,.chip):nth-child(n+4){transition-delay:.3s}
.motion .reveal .stack{transform:scaleY(0);transform-origin:bottom;transition:transform .9s cubic-bezier(.2,.7,.2,1) .2s}
.motion .reveal.in .stack{transform:none}
.motion .reveal.in .bar:nth-child(2n) .stack{transition-delay:.3s}
.motion .reveal.in .bar:nth-child(3n) .stack{transition-delay:.4s}
.motion .hero h1{animation:rise .8s cubic-bezier(.2,.7,.2,1) both}
.home .card{transition:transform .2s ease,box-shadow .2s ease}
.home .card:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(207,31,80,.12)}
@keyframes rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion: reduce){*{transition:none!important;animation:none!important}}

/* run submitted: animated card + share */
.done{text-align:center;background:var(--card);border:1px solid var(--line);border-radius:16px;padding:22px 18px;margin:8px 0 20px;animation:pop .5s cubic-bezier(.2,.9,.3,1.3) both}
.done h2{margin:10px 0 4px;font-size:1.6rem}.done-km{color:var(--brand)}
.done>p,.done .share-actions{animation:rise .5s ease .45s both}.done .share-hint{animation:rise .5s ease .6s both}
.check{width:72px;height:72px;display:block;margin:0 auto}.check circle{fill:none;stroke:var(--brand);stroke-width:3;stroke-dasharray:151;stroke-dashoffset:151;animation:draw .6s ease-out .1s forwards}
.check path{fill:none;stroke:var(--brand);stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:36;stroke-dashoffset:36;animation:draw .35s ease-out .6s forwards}
.share-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:14px}.share-actions button{min-height:48px;padding:8px 18px;border-radius:10px;font:inherit;font-weight:600}
.fb{display:inline-flex;align-items:center;gap:8px;background:#1460c8;border:1px solid #1460c8;color:#fff;font-weight:700;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}
.fb svg{width:22px;height:22px}.fb:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(20,96,200,.3)}.fb.busy{opacity:.7}
a.button.fb{margin-top:12px;width:100%;justify-content:center}
@keyframes pop{from{opacity:0;transform:scale(.92) translateY(8px)}to{opacity:1;transform:none}}
@keyframes draw{to{stroke-dashoffset:0}}
/* home: community feed */
.cfeed{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.cfeed li{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:baseline;background:var(--card);border:1px solid var(--line);border-radius:10px;padding:10px 14px}
.cfeed b{color:var(--brand)}.cfeed small{color:var(--muted)}
.motion .reveal .cfeed li{opacity:0;transform:translateX(-12px);transition:opacity .45s ease,transform .45s ease}
.motion .reveal.in .cfeed li{opacity:1;transform:none}
.motion .reveal.in .cfeed li:nth-child(2){transition-delay:.08s}.motion .reveal.in .cfeed li:nth-child(3){transition-delay:.16s}.motion .reveal.in .cfeed li:nth-child(4){transition-delay:.24s}.motion .reveal.in .cfeed li:nth-child(n+5){transition-delay:.32s}
@media (max-width:480px){.cfeed li{grid-template-columns:auto 1fr}.cfeed small{grid-column:1/-1}}
@media (prefers-reduced-motion: reduce){.check circle,.check path{stroke-dashoffset:0}}

/* Facebook group card on /runs */
.fbcard{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin:20px 0}
.fbcard h2{display:flex;align-items:center;gap:8px;margin:0 0 8px;font-size:1.15rem}.fbcard h2 svg{width:24px;height:24px;color:#1460c8}
.fb.wide{width:100%;justify-content:center;min-height:48px;border-radius:10px;font:inherit;font-weight:700}
.fb.busy svg{animation:spin 1s linear infinite}
.fb-state{padding:10px 12px;border-radius:8px;margin:0 0 6px}.ok-state{background:#e3f4ea;color:var(--ok)}.wait-state{background:#fff3d6;color:#8a5a00}
@keyframes spin{to{transform:rotate(360deg)}}
