:root {
  color-scheme: light;
  --ink: #192018;
  --muted: #687064;
  --yellow: #ffd52f;
  --yellow-dark: #e6b900;
  --green: #27643b;
  --red: #a6342b;
  --paper: #f7f6ef;
  --card: #ffffff;
  --line: #dfe1d8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); min-height: 100vh; }
.site-header { height: 76px; padding: 0 5vw; display: flex; align-items: center; background: var(--yellow); color: var(--ink); border-bottom: 1px solid rgba(25,32,24,.15); }
.site-header > div { display: flex; align-items: center; gap: 12px; }
.brand-logo { display: block; width: min(300px, 72vw); height: 60px; object-fit: contain; object-position: left center; }
main { width: min(1180px, 92vw); margin: 0 auto; padding: 40px 0 70px; }
.showcase-nav { position: sticky; top: 8px; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: -24px 0 24px; border-radius: 16px; background: rgba(25,32,24,.96); color: white; box-shadow: 0 10px 26px rgba(0,0,0,.18); }
.showcase-nav > div { display: flex; flex-wrap: wrap; gap: 7px; }
.showcase-nav form { margin: 0; }
.showcase-link { padding: 8px 11px; border-radius: 9px; background: #354137; color: white; font-size: .84rem; }
.showcase-link.active, .showcase-link:hover { background: var(--yellow); color: var(--ink); }
.showcase-entry { background: var(--yellow); }
.showcase-home { max-width: 760px; margin: 7vh auto; }
.parent-demo-link { display: flex; justify-content: center; margin: 12px 0; background: var(--yellow); }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1; margin-bottom: 12px; }
h2 { font-size: 1.4rem; }
.eyebrow { color: var(--green); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .76rem; margin-bottom: 10px; }
.muted, .optional { color: var(--muted); }
.optional { font-size: .85rem; font-weight: 400; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: 0 14px 35px rgba(27, 40, 26, .06); }
.narrow { max-width: 620px; margin: 10vh auto; }
.login-shell { min-height: calc(100vh - 180px); display: grid; place-items: center; }
.login-card { width: min(480px, 100%); }
.account-chooser { width: min(760px, 100%); }
.account-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
.account-card { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); text-decoration: none; background: #fbfcf8; }
.account-card:hover { border-color: var(--yellow-dark); background: #fffbea; transform: translateY(-1px); }
.account-card strong, .account-card small { display: block; }
.account-card small { color: var(--muted); margin-top: 3px; }
.account-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--yellow); font-weight: 900; }
.account-arrow { font-size: 2rem; color: var(--muted); }
.back-link { color: var(--green); text-align: center; font-weight: 750; text-decoration: none; }
.pair-code-form { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 10px; align-items: end; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.stack { display: grid; gap: 17px; }
.compact { gap: 12px; }
label { display: grid; gap: 7px; font-weight: 700; }
input { width: 100%; border: 1px solid #c9cec4; border-radius: 12px; padding: 13px 14px; font: inherit; background: #fff; }
input::placeholder { color: #adb2aa; opacity: 1; font-weight: 450; }
select { width: 100%; border: 1px solid #c9cec4; border-radius: 12px; padding: 13px 14px; font: inherit; background: #fff; }
input:focus { outline: 3px solid rgba(255, 213, 47, .45); border-color: var(--yellow-dark); }
button { border: 0; border-radius: 12px; padding: 13px 17px; font: inherit; font-weight: 800; cursor: pointer; }
button.primary { background: var(--yellow); color: var(--ink); }
button.primary:hover { background: #ffdf59; }
button.quiet { background: #e8ebe4; color: var(--ink); }
button.danger { background: #f4dedb; color: #7a2019; width: 100%; }
.dashboard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.button-link { display: inline-flex; align-items: center; padding: 12px 16px; border-radius: 12px; background: #e8ebe4; color: var(--ink); font-weight: 800; text-decoration: none; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.issue-metrics { grid-template-columns: repeat(4, 1fr); margin-top: 18px; }
.metric.definitive { background: var(--green); }
.metric { background: #1c2a1e; color: white; padding: 22px; border-radius: 20px; display: grid; gap: 12px; }
.metric.yellow { background: var(--yellow); color: var(--ink); }
.metric span { font-weight: 700; opacity: .78; }
.metric strong { font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1; }
.metric strong.status-locked { font-size: 1.8rem; color: #ffd2cc; }
.metric strong.status-open { font-size: 1.8rem; color: #b9f5c9; }
.grid.two { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(450px, 1.7fr); gap: 18px; }
.top-space { margin-top: 12px; }
.setting-separator { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.last-seen { font-variant-numeric: tabular-nums; }
.alert { border-radius: 13px; padding: 13px 15px; margin-bottom: 18px; font-weight: 700; }
.alert.success { background: #dff2e5; color: #1f5c33; }
.alert.error { background: #f7dfdc; color: #842a22; }
.accounts-layout { display: grid; grid-template-columns: minmax(280px, .7fr) minmax(520px, 1.7fr); gap: 18px; align-items: start; }
.account-list { display: grid; gap: 12px; }
.account-admin { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 10px 25px rgba(27,40,26,.05); }
.account-admin.protected { display: flex; justify-content: space-between; align-items: center; }
.account-admin strong, .account-admin small { display: block; }
.account-admin small { color: var(--muted); margin-top: 4px; }
.account-edit { display: grid; grid-template-columns: 1fr 1.3fr 1.1fr auto auto; gap: 12px; align-items: end; }
.password-reset { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.pair-action { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.quick-device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quick-device-card { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fbfcf8; }
.quick-device-card small { color: var(--muted); min-height: 2.4em; }
.device-summary, .device-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.device-actions { justify-content: flex-start; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.device-actions form { margin: 0; }
.inline-danger { width: auto !important; }
.short-code { display: inline-block; font-size: clamp(2.6rem, 10vw, 5rem); font-weight: 900; letter-spacing: .15em; background: #eef0ea; padding: 10px 18px; border-radius: 14px; margin-bottom: 15px; }
.toggle { display: flex; align-items: center; gap: 8px; min-height: 46px; }
.toggle input { width: 20px; height: 20px; }
.pill { padding: 7px 10px; border-radius: 999px; font-size: .8rem; font-weight: 800; }
.pill.active { background: #dff2e5; color: #1f5c33; }
.workstation { max-width: 620px; margin: 8vh auto; text-align: center; }
.work-role { display: inline-block; padding: 8px 12px; border-radius: 999px; background: var(--yellow); font-weight: 800; }
.issue-card { max-width: 820px; margin: 0 auto; }
.issue-metrics { max-width: 920px; margin-left: auto; margin-right: auto; }
.child-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; }
.child-buttons form { height: 100%; }
.child-count { width: 100%; min-height: 120px; background: var(--yellow); font-size: 3rem; }
.child-count small { display: block; font-size: .9rem; }
.other-count { grid-column: 1 / 4; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.handoff-shell { min-height: calc(100vh - 180px); display: grid; place-items: center; }
.handoff-card { width: min(560px, 100%); text-align: center; }
.handoff-qr { width: min(360px, 80vw); height: auto; padding: 14px; background: white; border-radius: 18px; }
.scan-status { font-weight: 800; padding: 12px; border-radius: 12px; background: #eef0ea; }
.scan-status.claimed { background: #dff2e5; color: #1f5c33; }
.parent-start { max-width: 620px; margin: 12vh auto; text-align: center; }
.parent-form-shell { max-width: 920px; margin: 0 auto; }
.form-heading { margin-bottom: 24px; }
.parent-form { gap: 18px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.parent-name-grid { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(125px, .42fr) minmax(0, 1fr); gap: 14px; }
.child-name-grid { grid-template-columns: minmax(0, 1fr) minmax(110px, .38fr) minmax(0, 1fr); }
.child-name-grid label:nth-child(n+4) { grid-column: auto; }
.required-notice { padding: 12px 14px; border-left: 5px solid var(--yellow-dark); background: #fff7cf; border-radius: 8px; }
.full-row { grid-column: 1 / -1; }
.field-message { min-height: 1.2em; color: var(--muted); font-weight: 500; }
.field-message.error { color: var(--red); }
.field-message.success { color: var(--green); }
.child-form { border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 0 0 16px; }
.child-form:last-child { margin-bottom: 0; }
.child-form legend { padding: 0 8px; font-weight: 900; color: var(--green); }
.school-other { display: none; grid-column: 1 / -1; }
.school-other.visible { display: grid; }
.check-list { display: grid; gap: 12px; }
.check-list label { grid-template-columns: 24px 1fr; align-items: start; font-weight: 600; }
.check-list input, .payment-options input { width: 20px; height: 20px; margin: 1px 0 0; }
.address-lookup-action { display: grid; align-content: end; gap: 5px; }
.address-lookup-action small { color: var(--muted); min-height: 1.2em; }
.consent-list { display: grid; gap: 12px; }
.consent-choice { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-wrap: wrap; gap: 12px 24px; }
.consent-choice legend { padding: 0 5px; font-weight: 700; }
.consent-choice label { display: flex; grid-template-columns: none; align-items: center; gap: 7px; font-weight: 600; }
.consent-choice input { width: 20px; height: 20px; margin: 0; }
.payment-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.payment-options label { display: grid; grid-template-columns: 24px 1fr; align-items: start; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcf8; }
.payment-options strong, .payment-options small { display: block; }
.payment-options small { color: var(--muted); margin-top: 3px; font-weight: 500; }
.large-action { min-height: 58px; font-size: 1.05rem; }
.status-shell { min-height: calc(100vh - 160px); display: grid; place-items: center; }
.family-status { width: min(650px, 100%); text-align: center; }
.family-qr { width: min(330px, 78vw); height: auto; padding: 12px; background: white; border-radius: 18px; }
.name-list { display: inline-grid; text-align: left; gap: 4px; margin: 6px auto 12px; padding-left: 22px; }
.total-line { font-size: 1.12rem; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.status-panel { margin-top: 18px; padding: 18px; border-radius: 16px; text-align: left; }
.status-panel strong { font-size: 1.18rem; }
.status-panel p { margin: 7px 0 0; }
.status-panel.success { background: #dff2e5; color: #1f5c33; }
.status-panel.waiting { background: #fff3bf; color: #604b00; }
.status-panel.danger { background: #f7dfdc; color: #842a22; }
.qr-instruction { border: 3px solid currentColor; }
.qr-instruction strong { display: block; font-size: clamp(1.2rem, 4vw, 1.7rem); }
.language-switch { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.destination-banner, .payment-method-banner { margin: 18px 0 10px; padding: 18px; border-radius: 16px; background: var(--yellow); color: #172016; font-size: clamp(1.45rem, 5vw, 2.5rem); line-height: 1.05; font-weight: 950; text-align: center; }
.payment-method-banner { background: #152b65; color: white; }
.fallback-payment { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.invalid-field { outline: 4px solid var(--red); background: #fff2f0; }
.feedback-card { width: min(650px, 100%); margin-top: 18px; }
.rating-choice { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; }
.rating-choice legend { font-weight: 800; margin-bottom: 8px; }
.rating-choice label { display: block; }
.rating-choice input { position: absolute; opacity: 0; }
.rating-choice span { display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid var(--line); border-radius: 50%; font-weight: 900; }
.rating-choice input:checked + span { background: var(--yellow); border-color: var(--yellow-dark); }
.manual-handoff { margin: 16px 0; padding: 14px; border-radius: 14px; background: #f2f4ee; }
.short-manual-code { display: inline-block; font-size: 1.6rem; font-weight: 950; letter-spacing: .12em; }
.manual-parent-link { width: 100%; justify-content: center; margin-top: 14px; }
.lookup-card { max-width: 680px; margin: 0 auto 18px; }
.scan-button { width: 100%; margin: 8px 0 16px; }
.scan-button-prominent { min-height: 92px; font-size: clamp(1.35rem, 5vw, 2rem); }
.manual-search-toggle { width: 100%; padding: 8px; background: transparent; color: var(--green); text-decoration: underline; font-size: .95rem; }
#manual-search { margin-top: 10px; }
#manual-search[hidden] { display: none; }
.scanner-panel { margin: 8px 0 18px; padding: 12px; border-radius: 16px; background: #111; color: white; text-align: center; }
.scanner-panel[hidden] { display: none; }
.scanner-panel video { width: 100%; max-height: 55vh; object-fit: cover; border-radius: 12px; background: #000; }
.scanner-panel p { margin: 10px 0; font-weight: 750; }
.lookup-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.family-action { max-width: 680px; margin: 0 auto; }
.next-family { width: 100%; justify-content: center; margin-top: 16px; }
.action-feedback { margin: 12px 0 0; padding: 12px; border-radius: 12px; font-weight: 850; text-align: center; background: #eef0ea; }
.action-feedback.success { color: var(--green); background: #dff2e5; }
.action-feedback.error { color: var(--red); background: #f7dfdc; }
.child-check-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.child-check-list li { padding: 12px; border-radius: 12px; background: #f2f4ee; }
.child-check-list strong, .child-check-list small { display: block; }
.child-check-list small { color: var(--muted); margin-top: 3px; }
.section-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.counter-screen { min-height: calc(100vh - 150px); display: grid; place-content: center; text-align: center; background: var(--yellow); border-radius: 34px; padding: 7vw; }
.counter-screen p { font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.counter-screen h1 { font-size: clamp(8rem, 28vw, 22rem); margin: 0; }
.counter-screen .counter-supporting { font-size: clamp(2rem, 6vw, 5rem); line-height: 1.05; margin: 0; }
.counter-screen small.counter-supporting { display: block; margin-top: 20px; }
.counter-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 4vw; }
.counter-details article { padding: 20px; border: 2px solid rgba(25,32,24,.25); border-radius: 22px; display: grid; gap: 7px; }
.counter-details span { font-size: clamp(1.1rem, 2.5vw, 2rem); font-weight: 800; }
.counter-details strong { font-size: clamp(2.5rem, 7vw, 5rem); line-height: 1; }
.counter-details small { font-size: clamp(1rem, 2vw, 1.5rem); }
.counter-progress-card { background: #ffb347; }
.counter-awaiting-card { background: #8fc8ff; }
.counter-final-card { background: #9bdd9b; }
.analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.analytics-grid article { padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.analytics-row { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(80px, 1.4fr) auto; gap: 8px; align-items: center; margin: 9px 0; font-size: .88rem; }
.analytics-row > div { height: 12px; background: #eef0ea; border-radius: 99px; overflow: hidden; }
.analytics-row i { display: block; height: 100%; background: var(--yellow-dark); border-radius: inherit; }
.approval-section { margin-bottom: 18px; border: 3px solid var(--yellow-dark); }
.approval-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 0; border-top: 1px solid var(--line); }
.approval-card span { display: block; margin-top: 4px; color: var(--muted); }
.approval-actions { display: flex; gap: 8px; }
.approval-actions form { margin: 0; }
.sales-rounds { margin-bottom: 18px; border-left: 7px solid var(--yellow-dark); }
.sales-wait { max-width: 760px; margin: 8vh auto 18px; text-align: center; }
.sales-countdown { display: block; font-size: clamp(3.4rem, 12vw, 8rem); line-height: 1; margin: 28px 0; }
.counter-screen.counter-waiting h1 { font-size: clamp(4rem, 13vw, 12rem); }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.intake-control { border-left: 7px solid #138a4b; margin-bottom: 18px; }
.intake-control.paused { border-left-color: #d54a31; background: #fff8f4; }
.counter-pause-message { max-width: 900px; margin: 22px auto 0; padding: 18px 24px; border-radius: 16px; background: rgba(255,255,255,.86); font-size: clamp(1.2rem, 2.4vw, 2rem); font-weight: 700; }
.year-picker { margin-bottom: 18px; }
.inline-form { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.inline-form label { flex: 1; min-width: 240px; }
.print-heading { display: none; }
.emergency-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.emergency-card { border: 2px dashed #222; padding: 18px; break-inside: avoid; }
.emergency-card { position: relative; }
.emergency-card-number { position: absolute; right: 14px; top: 12px; font-size: 1.15rem; font-weight: 900; }
.emergency-card h2 { margin: 8px 0 16px; }
.emergency-card dl { display: grid; grid-template-columns: 145px 1fr; gap: 7px 12px; }
.emergency-card dt { font-weight: 700; }
.emergency-card dd { margin: 0; }
.confidential { color: #a40000; font-weight: 900; letter-spacing: .04em; }
@media print {
  header, .no-print { display: none !important; }
  main { max-width: none; padding: 0; }
  .print-heading { display: block; }
  .emergency-cards { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .emergency-card { box-sizing: border-box; height: 133mm; page-break-inside: avoid; padding: 8mm; }
  .emergency-card:nth-child(4n) { break-after: page; }
  .emergency-list table { font-size: 11pt; width: 100%; }
  .emergency-list thead { display: table-header-group; }
  .emergency-list th, .emergency-list td { padding: 7px 6px; }
  .emergency-list tr { break-inside: avoid; }
  @page { size: A4; margin: 10mm; }
}
.compact-button { min-height: 38px; padding: 8px 12px; font-size: .88rem; white-space: nowrap; }
@media (max-width: 760px) {
  main { padding-top: 26px; }
  .metrics { grid-template-columns: 1fr; }
  .grid.two { grid-template-columns: 1fr; }
  .accounts-layout { grid-template-columns: 1fr; }
  .account-edit { grid-template-columns: 1fr; }
  .password-reset { grid-template-columns: 1fr; }
  .child-buttons { grid-template-columns: 1fr; }
  .other-count { grid-column: auto; grid-template-columns: 1fr; }
  .dashboard-head { align-items: center; }
  .card { padding: 20px; border-radius: 17px; }
  .account-grid { grid-template-columns: 1fr; }
  .pair-code-form { grid-template-columns: 1fr; }
  .form-grid.two-col { grid-template-columns: 1fr; }
  .parent-name-grid { grid-template-columns: 1fr; }
  .child-name-grid { grid-template-columns: 1fr; }
  .issue-metrics { grid-template-columns: repeat(2, 1fr); }
  .counter-details { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .approval-card { align-items: flex-start; flex-direction: column; }
  .payment-options { grid-template-columns: 1fr; }
  .lookup-form { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .showcase-nav { position: relative; top: auto; align-items: flex-start; flex-direction: column; margin-top: -12px; }
  .showcase-nav > div { width: 100%; }
  .showcase-link { font-size: .78rem; padding: 8px 9px; }
  .head-actions { flex-wrap: wrap; justify-content: flex-end; }
  .quick-device-grid { grid-template-columns: 1fr; }
  .device-summary, .device-actions { align-items: flex-start; flex-direction: column; }
}
