:root{color-scheme:light;--navy:#172c43;--ink:#23374c;--muted:#667589;--line:#e1e7ee;--amber:#e9b86b;--paper:#f6f8fb}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--paper);line-height:1.5}button, input{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.55}a{color:inherit}button, a, input, main{ -webkit-tap-highlight-color:transparent}button:focus-visible, a:focus-visible, input:focus-visible, main:focus-visible{outline:3px solid #b47718;outline-offset:4px}svg{stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:fixed;top:-70px;left:16px;padding:12px 18px;background:white;border-radius:6px;z-index:50}.skip-link:focus{top:16px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:23px 0;border-bottom:1px solid var(--line);font-size:14px;color:var(--muted)}.topbar strong{font-weight:500;color:#44566a}.topbar a{text-decoration:none}.topbar a:hover{text-decoration:underline}.divider{padding:0 11px;color:#a0aab8}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:31px 0 24px}.eyebrow{margin:0 0 7px;color:#7d633c;font-size:14px;font-weight:700;letter-spacing:1.7px}h1{margin:0;font-size:clamp(31px,3vw,42px);font-weight:650;line-height:1.2;letter-spacing:-1.45px}h1>span{color:#c48b38}.description{margin:10px 0 0;color:var(--muted)}.private-badge{padding:6px 10px;font-size:14px;color:#526c60;background:#eaf2ed;border:1px solid #d8e6dd;border-radius:6px;white-space:nowrap}.operator-note{display:flex;align-items:flex-start;gap:11px;background:#fff7e9;border:1px solid #ead8b7;border-radius:8px;padding:13px 16px;color:#745222}.note-icon{width:21px;height:21px;flex:0 0 21px;text-align:center;line-height:19px;border:1.5px solid #a67a31;border-radius:50%;font-size:14px;margin-top:1px}.operator-note strong, .operator-note p{font-size:14px}.operator-note p{margin:2px 0 0;color:#81643b}.service-toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:26px 0}.date-controls{display:flex;align-items:center;gap:13px}.date-controls>div{display:flex;flex-direction:column;position:relative}.date-controls label{font-size:14px;color:var(--muted);margin-bottom:3px}.date-controls input{border:0;background:transparent;padding:0;color:var(--ink);font-size:19px;font-weight:600;min-height:30px;max-width:205px}.date-label{color:var(--muted);font-size:14px;margin-top:2px}.button{display:inline-flex;justify-content:center;align-items:center;gap:7px;min-height:44px;padding:9px 15px;color:#425568;background:#fff;border:1px solid #d3dce6;border-radius:7px;font-size:14px;font-weight:600;white-space:nowrap}.button:hover:not(:disabled){background:#f1f5f9;border-color:#a5b4c3}.button-primary{background:var(--navy);border-color:var(--navy);color:#fff}.button-primary:hover:not(:disabled){background:#2b4763;border-color:#2b4763}.button-danger{color:#8c3c35;background:#fff5f3;border-color:#e3c3bd}.icon-button{width:36px;min-height:38px;padding:0;font-size:27px;font-weight:400}.toolbar-actions, .save-actions{display:flex;gap:10px;align-items:center}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:25px}.stat{display:flex;justify-content:space-between;align-items:center;gap:12px;background:white;border:1px solid var(--line);border-radius:8px;padding:19px 20px}.stat>span{color:var(--muted);font-size:14px}.stat>strong{font-size:30px;line-height:1.1;font-weight:650;font-variant-numeric:tabular-nums;letter-spacing:-.6px}.stat-present{background:#edf5ef;border-color:#d8e6dd}.stat-present>strong{color:#3c7654}.roster-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.search-field{display:flex;align-items:center;gap:10px;width:min(480px,100%);min-width:0;border:1px solid #d9e1e9;border-radius:7px;background:white;padding:0 13px;color:#8491a0}.search-field:focus-within{border-color:#a0804c;box-shadow:0 0 0 3px #e9b86b26}.search-field input{border:0;outline:none;width:100%;min-width:0;height:45px;padding:0;background:transparent;color:var(--ink);font-size:16px}.search-field input:focus-visible{outline:none}.search-field input::placeholder{color:#798898}.search-field input::-webkit-search-cancel-button{display:none}.clear-search{background:#eef2f7;border:0;border-radius:4px;color:#687a8d;width:29px;min-height:30px;font-size:23px;line-height:1}.muted{color:var(--muted);font-size:14px}.roster-help{font-size:14px;color:var(--muted);margin:0 0 17px;max-width:850px}.roster-help strong{font-weight:600;color:#4d6074}.roster-container{background:white;border:1px solid var(--line);border-radius:9px;overflow:hidden}.roster-table{width:100%;border-collapse:collapse;table-layout:fixed}.roster-table th{text-align:left;font-size:14px;font-weight:600;color:#596d82;background:#eef2f7;padding:13px 16px;border-bottom:1px solid var(--line)}.roster-table .name-column{width:320px}.roster-table .present-column{width:80px;text-align:center}.type-column{width:auto}.roster-table td{padding:13px 16px;border-bottom:1px solid #edf0f4}.roster-table tr:last-child td{border-bottom:0}.roster-table .group-heading td{padding:11px 19px;background:#f8fafc;border-top:1px solid var(--line);border-bottom:1px solid var(--line);color:#5f7286;font-size:14px;font-weight:600}.group-heading-label{display:flex;align-items:center;flex-wrap:wrap;gap:6px 9px;min-width:0}.family-heading-text{flex:1 1 11rem;min-width:0;overflow-wrap:anywhere}.group-dot{display:inline-block;width:6px;height:6px;flex:0 0 6px;background:#bd965b;border-radius:50%}.group-size{font-size:14px;font-weight:400;color:#8593a2}.person-row:hover{background:#fbfcfe}.person-row.is-present{background:#f3f9f4}.checkbox-cell{text-align:center}.checkbox-label{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;cursor:pointer;border-radius:7px}.checkbox-label:hover{background:#eaf0f6}.checkbox-label input, input[type=checkbox], input[type=radio]{width:22px;height:22px;accent-color:#385f4b;cursor:pointer;flex-shrink:0;margin:0}.person-name{font-weight:600;font-size:16px;overflow-wrap:anywhere;line-height:1.4}.person-name-row{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.person-row.is-dependent .person-cell{padding-left:37px;position:relative}.person-row.is-dependent .person-cell::before{content:"";position:absolute;left:21px;top:19px;width:7px;height:10px;border-left:1px solid #cbd4df;border-bottom:1px solid #cbd4df}.person-detail{display:block;color:#7b8998;font-size:14px;margin-top:3px;line-height:1.4}.type-badge{display:inline-block;border-radius:5px;padding:3px 7px;background:#edf1f6;color:#667a90;font-size:14px;line-height:1.4}.type-member{color:#567562;background:#edf4ef}.type-consistent_visitor{color:#617b9c;background:#edf1f8}.type-visitor{color:#877294;background:#f2eff6}.type-unknown{color:#977239;background:#faf3e6}.today-chip{font-size:14px;color:#8c7041;background:#faf4e9;padding:1px 6px;border-radius:4px;font-weight:400}.mobile-type{display:none}.row-hint{font-size:14px;color:#926e35;display:block;margin-top:3px}.classification-note{font-size:14px;color:#7a8897;margin:14px 0 25px}.state-panel, .empty-state{text-align:center;padding:40px 20px;border:1px dashed #d5dfe9;border-radius:9px;background:#ffffffa6}.empty-state{border:0;background:white}.state-panel h2, .empty-state h2{font-size:19px;margin:10px 0 6px;font-weight:600}.state-panel p, .empty-state p{font-size:16px;color:var(--muted);margin:0 0 17px}.spinner{display:inline-block;width:26px;height:26px;border:2px solid #dce4ec;border-top-color:#b8904f;border-radius:50%;animation:spin 1s linear infinite}.history-section{border:1px solid var(--line);background:#fff;border-radius:8px;margin-bottom:22px;overflow:hidden}.history-toggle{width:100%;display:flex;justify-content:space-between;align-items:center;gap:15px;padding:14px 17px;color:#4c6278;background:white;border:0;font-size:14px;font-weight:600;min-height:46px}.history-toggle[aria-expanded=true]{border-bottom:1px solid var(--line)}#history-panel{padding:1px 18px 15px}.history-list{list-style:none;padding:0;margin:0;max-height:380px;overflow:auto}.history-list li{padding:11px 0;border-top:1px solid #edf0f4;font-size:14px}.history-action{display:block;color:#4e6276}.history-meta{display:block;font-size:14px;color:#85919e;margin-top:3px}.save-bar{display:flex;justify-content:space-between;align-items:center;gap:20px;position:sticky;bottom:12px;background:white;border:1px solid #d6dfe9;border-radius:9px;padding:15px 18px;box-shadow:0 5px 25px #172c4310;z-index:5}.save-information{display:flex;flex-direction:column;gap:2px;min-width:0}.save-information strong{font-size:14px;font-weight:600;color:#4f6e5c}.save-information strong.is-dirty{color:#967139}.save-information strong.is-error{color:#a0473b}.save-information span{font-size:14px;color:#7b8998;overflow-wrap:anywhere}.error-notice{padding:13px 16px;border:1px solid #e8c7bf;border-radius:7px;background:#fff4f0;color:#994f40;font-size:14px;margin-top:13px}footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:25px 0;color:#85919f;font-size:14px}footer>span{color:#95a0ac}.picker-dialog, .confirm-dialog{border:1px solid #d8e0e9;border-radius:12px;padding:24px;color:var(--ink);box-shadow:0 20px 70px #12253b35;width:min(600px,calc(100% - 30px));max-height:calc(100dvh - 40px);overflow:auto}.picker-dialog::backdrop, .confirm-dialog::backdrop{background:#13283e80;backdrop-filter:blur(2px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:15px}.dialog-heading h2, .confirm-dialog h2{margin:0;font-size:25px;font-weight:650;letter-spacing:-.6px}.dialog-heading .eyebrow{font-size:14px}.dialog-close{border:0;background:#f0f3f7;color:#697b8e;width:35px;height:35px;border-radius:6px;font-size:25px}.dialog-description{font-size:16px;color:var(--muted);margin:16px 0 18px}.picker-dialog .search-field{width:100%}.picker-options{margin-top:16px;max-height:43vh;overflow:auto;border:1px solid var(--line);border-radius:7px}.picker-option{display:flex;align-items:center;gap:12px;min-height:64px;padding:12px 14px;border-bottom:1px solid #e9edf2;cursor:pointer}.picker-option:last-child{border-bottom:0}.picker-option:hover{background:#f7f9fc}.picker-option>span{min-width:0}.picker-option strong{font-size:16px;font-weight:600;overflow-wrap:anywhere}.picker-option small{display:block;font-size:14px;color:var(--muted);margin-top:2px}.picker-empty{padding:20px 14px;color:var(--muted);font-size:16px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.confirm-dialog{width:min(490px,calc(100% - 30px))}.confirm-dialog>p{color:var(--muted);font-size:16px}.noscript-message{position:fixed;bottom:20px;left:20px;right:20px;background:#fff7e9;border:1px solid #ead8b7;padding:16px;z-index:20}
@keyframes spin{to{transform:rotate(360deg)}}
/* Each confirmed household closes before the next family or individual. */
.roster-container { border: 0; border-radius: 0; background: transparent; overflow: visible; }
.roster-table { border-collapse: separate; border-spacing: 0; }
.roster-table thead th { border-top: 1px solid var(--line); }
.roster-table thead th:first-child { border-left: 1px solid var(--line); border-radius: 8px 0 0 8px; }
.roster-table thead th:last-child { border-right: 1px solid var(--line); border-radius: 0 8px 8px 0; }
.roster-table .roster-spacer td { padding: 0; height: 10px; border: 0; background: transparent; }
.roster-table .roster-group .person-row { background: transparent; }
.roster-table .roster-group td { background: white; }
.roster-table .roster-group td:first-child { border-left: 1px solid #cad5e0; }
.roster-table .roster-group td:last-child { border-right: 1px solid #cad5e0; }
.roster-table .roster-group .group-heading th {
  padding: 11px 19px;
  border: 1px solid #cad5e0;
  border-bottom-color: var(--line);
  border-radius: 8px 8px 0 0;
  background: #f1f5f9;
  color: #5f7286;
  font-size: 14px;
  font-weight: 600;
}
.roster-table .roster-group tr:last-child td { border-bottom: 1px solid #cad5e0; }
.roster-table .roster-group tr:last-child td:first-child { border-bottom-left-radius: 8px; }
.roster-table .roster-group tr:last-child td:last-child { border-bottom-right-radius: 8px; }
.roster-table .individual-block td { border-top: 1px solid #cad5e0; }
.roster-table .individual-block td:first-child { border-top-left-radius: 8px; }
.roster-table .individual-block td:last-child { border-top-right-radius: 8px; }
.roster-table .roster-group .person-row:hover td { background: #fbfcfe; }
.roster-table .roster-group .person-row.is-present td { background: #f3f9f4; }
@media (max-width: 1100px) {
  .roster-table thead .present-column { border-right: 1px solid var(--line); border-radius: 0 8px 8px 0; }
  .roster-table .roster-group .present-cell { border-right: 1px solid #cad5e0; }
  .roster-table .roster-group tr:last-child .present-cell { border-bottom-right-radius: 8px; }
  .roster-table .individual-block .present-cell { border-top-right-radius: 8px; }
}
@media (max-width: 560px) {
  .roster-table .roster-spacer td { height: 8px; }
  .roster-table .roster-group .group-heading th { padding: 10px 12px; }
}
@media(max-width:1220px){.stat{padding:16px 13px}.service-toolbar{gap:13px}.toolbar-actions{gap:7px}.button{padding:9px 12px}}
/* Bound the name-to-Present distance when the sidebar leaves less room. */
@media(max-width:1100px){.roster-container{max-width:29.5rem}.roster-table .name-column{width:auto}.type-column{display:none}.mobile-type{display:block;margin-top:4px;font-size:14px;color:#7d8996}}
@media(max-width:1000px){.stats{gap:8px}.stat{flex-direction:column;align-items:flex-start;gap:8px;padding:13px}.roster-table th, .roster-table td{padding-left:12px;padding-right:12px}.service-toolbar{flex-wrap:wrap}.toolbar-actions{margin-left:auto}.date-controls{gap:9px}}
@media(max-width:760px){.topbar{padding:17px 0}.page-heading{padding:26px 0 22px}.stat{flex-direction:row;align-items:center}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.save-bar{bottom:8px}.service-toolbar{padding:22px 0}}
@media(max-width:560px){.topbar{font-size:14px;gap:8px;flex-wrap:wrap;overflow-wrap:anywhere}.divider{padding:0 6px}.page-heading{align-items:flex-start}h1{font-size:32px;letter-spacing:-1.15px}.private-badge{display:none}.description{font-size:16px}.operator-note{padding:12px;gap:9px}.service-toolbar{flex-direction:column;align-items:stretch;gap:18px}.date-controls{justify-content:space-between}.date-controls>div{align-items:center;min-width:0;flex:1}.date-controls input{width:100%;min-width:0;max-width:205px;font-size:18px}.date-label{max-width:100%;text-align:center;overflow-wrap:anywhere}.toolbar-actions{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.toolbar-actions .button{min-width:0;white-space:normal}.stats{gap:8px;margin-bottom:20px}.stat{padding:13px 12px;min-width:0;gap:8px}.stat>span{font-size:14px;min-width:0;overflow-wrap:anywhere}.stat>strong{font-size:27px}.roster-toolbar{flex-wrap:wrap;gap:8px}.search-field{width:100%}#visible-count{font-size:14px}.roster-help{margin-top:4px}.type-column{display:none}.mobile-type{display:block;margin-top:4px;font-size:14px;color:#7d8996}.roster-table .present-column{width:60px;padding:12px 4px}.roster-table .present-cell{padding-left:4px;padding-right:4px}.roster-table th, .roster-table td{padding:11px 8px}.roster-table .person-cell{padding-left:5px;padding-right:5px}.roster-table .group-heading td{padding:10px 12px}.person-row.is-dependent .person-cell{padding-left:19px}.person-row.is-dependent .person-cell::before{left:5px;top:19px}.person-name{font-size:16px}.person-detail{font-size:14px}.group-size{font-size:14px}.checkbox-label{min-width:44px;min-height:44px}.today-chip{font-size:14px;padding:0;background:transparent}.save-bar{padding:12px;gap:12px;flex-direction:column;align-items:stretch;bottom:6px}.save-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.save-actions .button{min-width:0;white-space:normal;padding:10px 8px;line-height:1.3}.save-information strong, .save-information span{font-size:14px}.save-information span{line-height:1.35}.classification-note{margin-bottom:20px}.history-section{margin-bottom:18px}.picker-dialog, .confirm-dialog{padding:19px;max-height:calc(100dvh - 24px)}.dialog-heading h2{font-size:24px}.picker-options{max-height:38vh}.dialog-actions .button{flex:1}.dialog-actions{gap:8px}.dialog-description{margin:14px 0 16px}footer{flex-direction:column;gap:3px;padding-bottom:23px}}
@media(prefers-reduced-motion:reduce){.spinner{animation-duration:3s}*, *::before, *::after{scroll-behavior:auto!important}}

.attendance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.weekly-roster-button {
  background: #fff4dc;
  border: 1px solid #b58a45;
  color: #644719;
}
.weekly-roster-button:hover:not(:disabled) {
  background: #fce6bc;
  border-color: #91703b;
}
@media (max-width: 560px) {
  .attendance-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attendance-actions .button { min-width: 0; min-height: 48px; padding: 8px 7px; white-space: normal; line-height: 1.3; }
  .attendance-actions .button span { flex-shrink: 0; }
}
