
:root{
  --navy:#173f65;--navy2:#102e49;--blue:#3e78c2;--bg:#f4f7fb;--card:#fff;
  --text:#172337;--muted:#69798d;--line:#dfe6ee;
  --green:#285f31;--greenbg:#cfe8c2;
  --pref:#245d98;--prefbg:#dbeafe;
  --red:#9a1919;--redbg:#f6cccc;
  --amber:#7c5c00;--amberbg:#fee8bd;
  --gray:#edf0f4;--shadow:0 8px 24px rgba(23,63,101,.07);
}
*{box-sizing:border-box}
html{background:var(--bg);scroll-behavior:smooth}
body{
  margin:0;background:var(--bg);color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased;
}
button,input,select{font:inherit}
button{cursor:pointer}
.shell{width:min(1180px,calc(100% - 24px));margin:0 auto}

.hero{
  background:linear-gradient(135deg,var(--navy2),var(--navy));color:#fff;
  padding:calc(20px + env(safe-area-inset-top)) 0 22px;
}
.hero-row{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.kicker{font-size:10px;font-weight:900;letter-spacing:.14em;opacity:.7;margin-bottom:7px}
.hero h1{margin:0;font-size:clamp(25px,5vw,38px);line-height:1.08}
.hero p{margin:8px 0 0;opacity:.76;font-size:13px}
.latest{
  background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);
  padding:7px 10px;border-radius:999px;font-size:10px;font-weight:850
}

main{padding:18px 0 36px}
.matrix-first{margin-bottom:34px}
.section{border-top:1px solid var(--line);padding-top:28px;margin-top:28px}
.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.num{
  display:inline-flex;background:var(--navy);color:#fff;font-size:10px;font-weight:900;
  border-radius:7px;padding:4px 7px;margin-bottom:7px
}
.section-head h2{margin:0;font-size:21px;line-height:1.2}
.section-head p{margin:5px 0 0;color:var(--muted);font-size:12px}
.date{
  background:#e8f0f8;color:var(--navy);font-size:10px;font-weight:900;
  padding:7px 10px;border-radius:999px;white-space:nowrap
}

.summary-strip{
  display:flex;gap:7px;overflow-x:auto;padding-bottom:9px;scrollbar-width:none
}
.summary-strip::-webkit-scrollbar{display:none}
.summary-pill{
  flex:0 0 auto;background:#fff;border:1px solid var(--line);border-radius:999px;
  padding:7px 9px;font-size:10px;font-weight:800;color:#526377
}
.summary-pill strong{color:var(--navy)}

.legend-row{
  display:flex;flex-wrap:wrap;gap:7px 11px;
  margin-bottom:9px;color:var(--muted);font-size:10px;font-weight:700
}
.legend-row span{display:inline-flex;align-items:center;gap:5px}
.dot{width:9px;height:9px;border-radius:3px;display:inline-block}
.av-dot{background:var(--greenbg)}.p-dot{background:var(--prefbg)}
.na-dot{background:var(--redbg)}.tba-dot{background:var(--amberbg)}.q-dot{background:var(--gray)}

.matrix-card{
  background:#fff;border:1px solid var(--line);border-radius:18px;
  overflow:hidden;box-shadow:var(--shadow)
}
.swipe{
  display:none;padding:8px 12px;background:#f8fafc;border-bottom:1px solid var(--line);
  font-size:10px;color:#7c8b9d;text-align:right
}
.table-wrap{
  overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain
}
.matrix{
  border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-size:11px
}
.matrix th,.matrix td{
  padding:9px;text-align:center;white-space:nowrap;
  border-right:1px solid #edf1f5;border-bottom:1px solid #edf1f5;min-width:60px
}
.matrix th{
  background:var(--blue);color:#fff;font-weight:900;position:sticky;top:0;z-index:2
}
.matrix th:first-child,.matrix td:first-child{
  position:sticky;left:0;min-width:105px;text-align:left;font-weight:900;z-index:3
}
.matrix th:first-child{background:#2f64a6;z-index:4}
.matrix td:first-child{background:#fff}
.matrix th:last-child,.matrix td:last-child{min-width:285px;text-align:left}
.av{background:var(--greenbg);color:var(--green);font-weight:900}
.p{background:var(--prefbg);color:var(--pref);font-weight:900}
.na{background:var(--redbg);color:var(--red);font-weight:900}
.tba{background:var(--amberbg);color:var(--amber);font-weight:900}
.unknown{background:var(--gray);color:#687687}

.candidate-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.candidate{
  background:#fff;border:1px solid var(--line);border-radius:16px;
  padding:14px;box-shadow:var(--shadow)
}
.candidate .agenda{
  display:inline-flex;background:#eaf2fa;color:var(--navy);
  padding:5px 8px;border-radius:999px;font-size:9px;font-weight:900;margin-bottom:8px
}
.candidate h3{margin:0;font-size:16px}
.candidate p{margin:8px 0 0;font-size:11px;color:var(--muted);line-height:1.45}
.candidate .rec{color:#256b36;font-weight:850}
.candidate .constraint{color:#915c00}

.filters{
  display:grid;grid-template-columns:1fr 1fr;gap:9px;background:#fff;
  border:1px solid var(--line);border-radius:16px;padding:10px;margin-bottom:10px
}
.filters span{
  display:block;font-size:9px;text-transform:uppercase;letter-spacing:.08em;
  color:var(--muted);font-weight:900;margin:0 0 4px 2px
}
.filters select,.filters input{
  width:100%;height:40px;border:1px solid #dbe3ec;border-radius:11px;
  background:#fafcfe;padding:0 10px;outline:none
}
.people-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.person{
  background:#fff;border:1px solid var(--line);border-radius:16px;
  padding:13px;box-shadow:0 5px 18px rgba(23,63,101,.04)
}
.person-head{display:flex;justify-content:space-between;gap:8px}
.person h3{margin:0;font-size:16px}
.person .role{margin:4px 0 0;font-size:10px;color:var(--muted)}
.status{
  padding:5px 7px;border-radius:999px;font-size:9px;font-weight:900;
  white-space:nowrap;background:#eef2f6;color:#526377
}
.status.confirmed{background:#dcfce7;color:#166534}
.status.partial{background:#fef3c7;color:#92400e}
.status.tba{background:#ffedd5;color:#9a3412}
.status.preference{background:#dbeafe;color:#1d4ed8}
.sunday-box{
  margin-top:11px;border:1px solid var(--line);background:#fafbfd;
  border-radius:11px;padding:10px
}
.sunday-box span{
  display:block;font-size:9px;text-transform:uppercase;letter-spacing:.06em;
  color:var(--muted);font-weight:900
}
.sunday-box strong{display:block;font-size:13px;line-height:1.35;margin-top:4px}
.person-note{margin:8px 0 0;font-size:10px;line-height:1.45;color:var(--muted)}

.reset-btn{
  border:1px solid var(--line);background:#fff;color:var(--muted);
  padding:7px 10px;border-radius:10px;font-size:10px;font-weight:850
}
.progress-card{
  background:#fff;border:1px solid var(--line);border-radius:16px;
  padding:13px;margin-bottom:10px
}
.progress-copy{display:flex;justify-content:space-between;gap:10px;font-size:11px}
.progress-copy span{color:var(--muted)}
.track{height:7px;background:#e5ebf1;border-radius:999px;margin-top:9px;overflow:hidden}
#progressBar{height:100%;width:0;background:#2b9844;border-radius:999px;transition:width .2s}
.chips{display:flex;gap:6px;overflow-x:auto;margin-bottom:9px}
.chip{
  border:1px solid var(--line);background:#fff;color:var(--muted);
  padding:7px 10px;border-radius:999px;font-size:10px;font-weight:850
}
.chip.active{background:var(--navy);border-color:var(--navy);color:#fff}
.reminder-list{display:grid;gap:8px}
.item{
  display:grid;grid-template-columns:auto 1fr;gap:10px;background:#fff;
  border:1px solid var(--line);border-radius:15px;padding:12px;
  box-shadow:0 4px 17px rgba(23,63,101,.035)
}
.check{
  appearance:none;width:23px;height:23px;border:2px solid #c7d0db;
  border-radius:7px;margin:1px 0 0;display:grid;place-items:center
}
.check:checked{background:#26893d;border-color:#26893d}
.check:checked:after{content:"✓";color:#fff;font-size:14px;font-weight:900}
.item.done .item-title{text-decoration:line-through;color:#9ba6b5}
.item-title{font-size:13px;font-weight:850;margin:0;line-height:1.35}
.meta-row{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}
.meta{background:#f0f4f8;color:#566679;border-radius:999px;padding:4px 7px;font-size:9px;font-weight:750}
.meta.done-meta{background:#dcfce7;color:#166534}
.item-note{font-size:10px;line-height:1.45;color:var(--muted);margin:7px 0 0}
.footer{
  border-top:1px solid var(--line);
  padding:18px 0 calc(30px + env(safe-area-inset-bottom));
  display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;
  color:#96a3b1;font-size:9px
}
.empty{
  background:#fff;border:1px dashed #cbd5df;border-radius:15px;
  padding:24px;text-align:center;color:var(--muted);grid-column:1/-1
}

@media(max-width:720px){
  .swipe{display:block}
  .candidate-grid,.people-grid{grid-template-columns:1fr}
  .filters{grid-template-columns:1fr}
  .matrix th,.matrix td{padding:8px;min-width:57px}
  .matrix th:first-child,.matrix td:first-child{min-width:96px}
  .matrix th:last-child,.matrix td:last-child{min-width:235px}
}
@media(max-width:430px){
  .shell{width:calc(100% - 16px)}
  .hero{padding-bottom:18px}
  main{padding-top:14px}
  .section-head h2{font-size:19px}
}
