:root{font-family:Arial,Helvetica,sans-serif;color:#19354f;background:#f4f7fa;font-size:16px;--navy:#12376c;--teal:#007575;--line:#d3dfe7}*{box-sizing:border-box}body{margin:0;min-height:100vh;display:flex;flex-direction:column}header{background:white;border-top:4px solid var(--navy);border-bottom:1px solid var(--line)}.top,main,footer{width:min(100% - 36px,970px);margin:auto}.top{display:flex;align-items:center;justify-content:space-between;min-height:104px}.brand{display:flex;gap:20px;align-items:center}.brand img{object-fit:contain;width:92px;height:92px}.brand b{display:block;color:var(--navy);font-size:1.13rem}.brand span,footer,.hint,.intro{color:#526574}.brand span{display:block;margin-top:5px;font-size:.94rem}main{flex:1;padding:34px 0 48px}.narrow{max-width:650px;margin:auto}#login{max-width:465px;margin:32px auto}h1{font-size:clamp(1.9rem,4vw,2.65rem);letter-spacing:-.045em;line-height:1.1;color:var(--navy);margin:0 0 12px}h2{font-size:1.22rem;letter-spacing:-.02em;color:var(--navy);margin:0 0 16px}p{line-height:1.5;margin:0 0 16px}.intro{margin-bottom:24px}.card,.metrics>div{background:white;border:1px solid var(--line);border-radius:14px;padding:24px;margin:0 0 16px}.card label,.toolbar label{display:flex;flex-direction:column;gap:7px;font-size:.94rem;font-weight:600;margin:0 0 15px}.pair{display:grid;grid-template-columns:1fr 1fr;gap:16px}input,select,textarea{width:100%;border:1px solid #a8bac7;border-radius:7px;background:white;padding:11px;color:#1c3446;font:inherit;font-size:1rem;min-height:44px}button,a.secondary{display:inline-flex;align-items:center;justify-content:center;font:inherit;font-weight:600;background:var(--navy);color:white;border:1px solid var(--navy);border-radius:8px;text-decoration:none;min-height:43px;padding:10px 17px;cursor:pointer}button:disabled{opacity:.5;cursor:default}.secondary,a.secondary,.quiet,.tab{background:white;color:var(--navy);border-color:#b3c6d5}.quiet{border-color:transparent}.tab{border-radius:0;border:none;border-bottom:3px solid transparent;background:transparent}.tab[aria-pressed="true"]{color:var(--teal);border-bottom-color:var(--teal)}nav{display:flex;border-bottom:1px solid var(--line);margin:20px 0}.toolbar,.metrics,.pager,.row{display:flex;align-items:center;gap:16px}.toolbar,.row,.pager{justify-content:space-between}.toolbar label{margin:0;min-width:200px}.toolbar{margin-bottom:18px;align-items:end}.metrics>div{flex:1;padding:17px}.metrics span{display:block;font-size:.9rem;color:#516273}.metrics b{display:block;font-size:1.7rem;margin-top:6px}.receipt,video{display:block;max-width:100%;max-height:240px;margin:10px auto;border-radius:6px}.hint{font-size:.9rem;margin:10px 0 16px}.row{padding:15px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.row small,.details{display:block;margin-top:4px;color:#526574;line-height:1.45}.row a,.card a{color:#006875;font-weight:600}.pager{margin-top:12px}.actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}#notice{max-width:760px;margin:0 auto 20px;padding:14px 18px;color:#10564e;background:#e0f3ec;border:1px solid #9ecbbd;border-radius:8px}#notice.error{background:#fff0ed;border-color:#edb2aa;color:#822a2c}footer{display:flex;justify-content:space-between;font-size:.85rem;padding:16px 0;border-top:1px solid var(--line)}[hidden]{display:none!important}:focus-visible{outline:3px solid #128aa3;outline-offset:3px}button:hover:enabled,a.secondary:hover{filter:brightness(.93)}@media(max-width:600px){.top{min-height:85px}.brand{gap:12px}.brand img{width:75px;height:75px}main{padding-top:25px}.card{padding:17px}.pair{grid-template-columns:1fr;gap:0}.toolbar{align-items:stretch;flex-direction:column;gap:9px}.toolbar a{align-self:start}.metrics{gap:10px}.row{align-items:flex-start}.pager{gap:5px}.pager .quiet{padding:8px}.receipt{max-height:200px}#submitReg,#access button{width:100%}}

/* Keep the application's own contrast inside a light or dark host page. */
#nan3-surface {
  color-scheme: only light;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  color: #19354f;
  background: #f4f7fa;
}
#nan3-surface :is(header, .card, .metrics > div, dialog) { background: #fff; color: #19354f; }
#nan3-surface :is(label, .row, .pager, .metrics b) { color: #19354f; }
#nan3-surface :is(.demobar, .previewbar) { background: #e4eef6; color: #19354f; }
#nan3-surface :is(h1, h2, .brand b, .demobar b) { color: #12376c; }
#nan3-surface :is(.hint, .intro, footer, .brand span, .demobar small, .row small) { color: #405769; }
#nan3-surface :is(input, select, textarea) { background-color: #fff; color: #19354f; }
#nan3-surface input::file-selector-button { background-color: #e4eef6; color: #19354f; }
#nan3-surface input::placeholder { color: #536573; opacity: 1; }
#nan3-surface button:disabled { background: #e0e7ed; color: #445766; opacity: 1; }
.chart-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.chart-grid .card {margin:0 0 16px}
.chart-grid svg {width:100%;height:auto;display:block;margin-top:8px}
.axis {display:flex;justify-content:space-between}
#nan3-surface .axis, #nan3-surface .chart-grid small {color:#405769;font-size:.84rem}
.store-bar {display:grid;grid-template-columns:minmax(120px,1fr) minmax(45px,2fr) 3ch;gap:12px;align-items:center;margin:9px 0;font-size:.93rem}
.store-bar b {text-align:right}
.store-bar progress {width:100%;height:.65rem;accent-color:#176169;border:0;appearance:none;border-radius:6px;overflow:hidden;background:#e4eef6}
.store-bar progress::-webkit-progress-bar {background:#e4eef6}
.store-bar progress::-webkit-progress-value {background:#176169}
.store-bar progress::-moz-progress-bar {background:#176169}
#dailyTable summary {cursor:pointer;font-weight:bold;color:#12376c}
#dailyTable table {width:100%;border-collapse:collapse;margin-top:14px;text-align:right}
#dailyTable :is(td,th) {padding:6px;border-bottom:1px solid #d3dfe7}
#dailyTable th:first-child {text-align:left}
.dashboard-actions {display:flex;flex-wrap:wrap;align-items:center;gap:10px}
@media(max-width:650px){.chart-grid{grid-template-columns:1fr;gap:0}}
#nan3-surface .metrics {display:grid;grid-template-columns:1fr 1fr;align-items:stretch}
.trend-tools,.period-switch,.trend-readout {display:flex;align-items:center;gap:8px}
.trend-tools {justify-content:space-between;flex-wrap:wrap;margin:12px 0 14px}
.trend-tools h2 {margin:0}
.period-switch {gap:2px;padding:3px;background:#e3ebf1;border-radius:10px}
#nan3-surface .period-switch button {background:transparent;color:#234565;border:0;min-height:38px;padding:6px 16px}
#nan3-surface .period-switch button[aria-pressed=true] {background:#173c67;color:white}
.chart-grid .card {box-shadow:0 3px 14px #173c6709}
.chart-grid h3 {margin:0;color:#294663;font-size:1rem}
.trend-readout {justify-content:space-between;flex-wrap:wrap;color:#36516a;margin:10px 0 4px;font-size:.86rem}
.trend-readout strong {font-size:1.65rem;color:#15477b;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
#unitTrend .trend-readout strong {color:#006e68}
.chart-grid svg {cursor:crosshair;touch-action:pan-y;overflow:visible}
.chart-grid svg text {font:11px Arial,sans-serif;fill:#486071}
#dailyTable {overflow-x:auto}
#regErrors {background:#fff1ed;color:#7c2b25;border:1px solid #e7afa4;padding:14px 18px;border-radius:8px}
#registration [aria-invalid="true"] {border:2px solid #a63c32}
.compare-head {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.compare-head h2 {margin:0}
#nan3-surface .compare-head label {margin:0;gap:3px;font-size:.82rem}
#nan3-surface button.store-bar {display:grid;width:100%;padding:8px;margin:2px 0;gap:10px;grid-template-columns:minmax(100px,1fr) minmax(30px,1.7fr) minmax(75px,auto);color:#19354f;background:#fff;border:1px solid transparent;text-align:left;font-weight:normal}
#nan3-surface .store-bar[aria-pressed=true] {background:#eef6f5;border-color:#a8cbca}
.compare-detail {border-top:1px solid #cfdddf;margin:12px 0 0;padding-top:12px;color:#20494c}
#nan3-surface #dailyTable :is(th, td) {
  color: #19354f !important;
  -webkit-text-fill-color: currentColor !important;
  background-color: #fff !important;
  font-variant-numeric: tabular-nums;
}
#nan3-surface #dailyTable thead th {
  color: #12376c !important;
  background-color: #e4eef6 !important;
}
#nan3-surface #dailyTable tbody tr:nth-child(even) > * {background-color: #f4f7fa !important}

#nan3-surface #modal {width:min(34rem,92vw);max-height:88vh;overflow:auto;box-sizing:border-box;padding:20px;border:1px solid #a9bac3;border-radius:12px}
#receiptDetails {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0;color:#19354f}
#receiptDetails dt {font-size:.84rem;color:#405769}
#receiptDetails dd {margin:3px 0 0;font-weight:600;overflow-wrap:anywhere;color:#19354f}
#receiptDetails .receipt-total {grid-column:1/-1;padding:10px 12px;border-radius:6px;background:#eaf4f1}
#modalImg {display:block;width:auto;height:auto;max-width:100%;max-height:65vh;object-fit:contain;margin:0 auto;border-radius:5px}
#modal::backdrop {background:rgba(22,39,52,.45)}

#access label[for="loginPassword"] {margin-bottom:7px}
.password-row {display:flex;align-items:center;gap:6px;margin-bottom:15px}
.password-row input {flex:1;min-width:0}
#access #togglePassword {width:auto;min-height:44px;padding:8px 12px}

#nan3-surface .review-counts {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:16px}
#nan3-surface .review-counts > div {border-top:3px solid #ba8228}
#nan3-surface .review-counts > div:nth-child(2) {border-color:#24816a}
#nan3-surface .review-counts > div:nth-child(3) {border-color:#af5857}
#reviewError {color:#8a2926}
#reviewActions {padding:12px 0}
#reviewActions .actions {flex-wrap:wrap}
@media(max-width:480px){#nan3-surface .review-counts>div {padding:8px;font-size:.9rem}}
.top { display: grid; grid-template-columns: 1fr auto 1fr; }
.top .brand { grid-column: 2; text-align: center; }
.top #logout { grid-column: 3; justify-self: end; }
@media (max-width: 460px) {
  .top #logout { grid-column: 2; justify-self: center; margin-bottom: 6px; }
}

#registration .field-error { color: #8b2d24; font-size: .875rem; line-height: 1.4; font-weight: 600; }

#openPhotoZoom {display:block; max-width:100%; margin:14px auto; padding:0; background:white; color:var(--navy); border:0; cursor:zoom-in}
#openPhotoZoom:hover:enabled {filter:none}
#openPhotoZoom span {display:block; padding:8px; text-decoration:underline}
#nan3-surface #photoZoom {width:min(96vw,90rem); height:92vh; height:92dvh; max-width:100%; max-height:100%; padding:0; border:1px solid var(--line); border-radius:12px}
#photoZoom[open] {display:flex; flex-direction:column}
#photoZoom::backdrop {background:rgba(16,29,40,.78)}
.zoom-tools {display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px}
.zoom-tools h2 {font-size:1rem; margin:0}
#zoomViewport {flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; background:#e6edf1}
#zoomedPhoto {display:block; max-width:none; max-height:none; margin:auto}
#acceptEntry:enabled {background:#17663d; border-color:#17663d; color:#fff}
#rejectEntry:enabled {background:#a12931; border-color:#a12931; color:#fff}

#nan3-surface select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%2319354f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
@media (forced-colors: active) {
  #nan3-surface select {
    -webkit-appearance: menulist;
    appearance: auto;
    background-image: none;
    padding-right: 11px;
  }
}
