* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1c2130; background: #f6f3ec; line-height: 1.55; }
a { color: #2f6df6; }
.lang-switch { text-align: right; max-width: 980px; margin: 0 auto 10px; }
.lang-switch button { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 7px; padding: 4px 10px; margin-left: 6px; cursor: pointer; font-size: 13px; }
.interface { margin-top: 22px; border-top: 1px solid #e8e2d4; padding-top: 14px; }
.interface figure { margin: 14px 0; }
.interface img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid #e3ddcf; }
.interface figcaption { font-size: 13.5px; color: #5a6070; margin-top: 6px; }
.hero { background: linear-gradient(135deg, #1d4e89, #2f6df6 55%, #e8734a); color: #fff; padding: 36px 20px 28px; text-align: center; }
.hero h1 { margin: 0 0 8px; font-size: 34px; }
.hero .tagline { font-size: 18px; margin: 0 0 14px; }
.hero .honest, .hero .privacy { max-width: 760px; margin: 10px auto 0; background: rgba(255,255,255,.14); border-radius: 10px; padding: 10px 14px; font-size: 14.5px; text-align: left; }
main { max-width: 980px; margin: 0 auto; padding: 0 16px 40px; }
.steps ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; padding: 0; list-style: none; margin: 22px 0; }
.steps li { background: #fff; border: 1px solid #e3ddcf; border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.checker { background: #fff; border: 1px solid #e3ddcf; border-radius: 14px; padding: 20px; }
.checker h2 { margin-top: 0; }
.checker h3 { margin: 22px 0 10px; font-size: 17px; }
.btn { display: inline-block; padding: 10px 16px; border-radius: 9px; border: 1.5px solid #c6cad6; background: #fff; font-size: 15px; cursor: pointer; color: #1c2130; text-decoration: none; }
.btn.primary { background: #2f6df6; border-color: #2f6df6; color: #fff; font-weight: 600; }
.btn.big { font-size: 16px; padding: 12px 18px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.status { font-size: 14px; color: #5a6070; }
.note { font-size: 13.5px; color: #5a6070; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: block; font-size: 14.5px; }
.field > span, fieldset.field > legend { display: block; font-weight: 600; margin-bottom: 6px; }
.field.wide { grid-column: 1 / -1; }
.field input[type="text"], .field select, .field textarea { width: 100%; padding: 9px 10px; font-size: 15px; border: 1.5px solid #c6cad6; border-radius: 9px; font-family: inherit; }
fieldset.field { border: 1.5px solid #c6cad6; border-radius: 9px; padding: 10px 12px; margin: 0; }
.check { display: block; font-size: 14.5px; margin: 6px 0; cursor: pointer; }
.check input { margin-right: 6px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2px 18px; }
.results { margin-top: 24px; border-top: 2px solid #e8e2d4; padding-top: 8px; }
.score-line { display: flex; align-items: baseline; gap: 14px; }
.score-num { font-size: 40px; font-weight: 800; }
.band { font-size: 17px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.band.low { background: #e2f5e9; color: #1d7a3d; }
.band.moderate { background: #fff4d6; color: #8a6d00; }
.band.high { background: #fde8d7; color: #9a4a00; }
.band.very-high { background: #fbdfe0; color: #8c2f1b; }
.gauge { height: 12px; background: #ece7db; border-radius: 999px; overflow: hidden; margin: 10px 0; }
.gauge-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.gauge-fill.low { background: #2e9e5b; }
.gauge-fill.moderate { background: #e0a800; }
.gauge-fill.high { background: #e8734a; }
.gauge-fill.very-high { background: #c0392b; }
.rule { border: 1px solid #e3ddcf; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.rule.sev-blocker { border-left: 5px solid #c0392b; }
.rule.sev-warning { border-left: 5px solid #e0a800; }
.rule.passed { opacity: .55; }
.rule-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #fff; }
.chip.blocker { background: #c0392b; }
.chip.warning { background: #b77900; }
.chip.store { background: #5a6070; }
.rule .ref { font-size: 13px; color: #5a6070; margin: 6px 0 0; }
.rule .fix { font-size: 14px; margin: 8px 0 0; }
.pro-panel { margin-top: 22px; background: #f0f5ff; border: 1px solid #c3d4f5; border-radius: 12px; padding: 16px 18px; }
.pro-panel h3 { margin-top: 0; }
.pro-panel ul { margin: 0 0 12px; }
.faq { margin-top: 28px; }
.faq details { background: #fff; border: 1px solid #e3ddcf; border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }
footer { text-align: center; font-size: 13.5px; color: #5a6070; padding: 20px; }
@media (max-width: 600px) {
  .hero h1 { font-size: 26px; }
  .form-grid { grid-template-columns: 1fr; }
  .score-num { font-size: 32px; }
}
@media print {
  .hero .lang-switch, .btn-row, .pro-panel, .interface, .faq, footer, #checkForm { display: none !important; }
  body { background: #fff; }
  .checker { border: 0; }
  .rule.passed { opacity: 1; }
}

/* AI Usage Tracker additions (v20261201a) */
.tracker { background: #fff; border: 1px solid #e3ddcf; border-radius: 14px; padding: 20px; }
.tracker h2 { margin-top: 0; }
.tracker h3 { margin: 22px 0 10px; font-size: 17px; }
.field input[type="number"], .field input[type="datetime-local"] { width: 100%; padding: 9px 10px; font-size: 15px; border: 1.5px solid #c6cad6; border-radius: 9px; font-family: inherit; }
.inline-input { display: flex; align-items: center; gap: 8px; }
.inline-input input { max-width: 110px; }
.plan-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 12px 0; }
.plan-card { display: flex; flex-direction: column; gap: 2px; text-align: left; background: #f8f6f0; border: 1.5px solid #e3ddcf; border-radius: 12px; padding: 12px 14px; cursor: pointer; font-size: 14.5px; color: #1c2130; font-family: inherit; }
.plan-card.active { border-color: #2f6df6; background: #f0f5ff; }
.plan-card .plan-meta { font-size: 13px; color: #5a6070; }
.dash-name { margin: 4px 0 2px; font-size: 21px; }
.est { background: #fff8e6; border: 1px solid #f0dc9e; border-radius: 8px; padding: 8px 10px; }
.gauge-line { display: flex; align-items: baseline; gap: 14px; }
.pace-bar { position: relative; height: 12px; background: #ece7db; border-radius: 999px; overflow: visible; margin: 10px 0 4px; }
.pace-fill { position: absolute; left: 0; top: 0; height: 100%; background: #2f6df6; border-radius: 999px; }
.pace-tick { position: absolute; top: -3px; width: 3px; height: 18px; background: #1c2130; border-radius: 2px; }
.pace-legend { font-size: 12.5px; }
.log-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; border: 1px solid #e3ddcf; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 14.5px; }
.log-row.old { opacity: .6; }
.log-amt { font-weight: 700; }
.log-when { color: #5a6070; font-size: 13.5px; }
.log-note { color: #5a6070; font-size: 13.5px; }
.chip.old-chip { background: #5a6070; }
.btn.small { padding: 5px 10px; font-size: 13px; margin-left: auto; }
@media print {
  .tracker .btn-row, .pro-panel, .faq, footer, #fb-prompt { display: none !important; }
}

/* Pool Service Route Manager additions (v20261201a) */
.tool { background: #fff; border: 1px solid #e3ddcf; border-radius: 14px; padding: 20px; }
.tool h2 { margin-top: 28px; }
.tool h2:first-child { margin-top: 0; }
.tool h3 { margin: 22px 0 10px; font-size: 17px; }
.field input[type="number"], .field input[type="date"] { width: 100%; padding: 9px 10px; font-size: 15px; border: 1.5px solid #c6cad6; border-radius: 9px; font-family: inherit; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.dash-card { background: #f8f6f0; border: 1px solid #e3ddcf; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.dash-num { font-size: 28px; font-weight: 800; }
.dash-num.dash-text { font-size: 15px; font-weight: 700; line-height: 1.4; word-break: break-word; }
.dash-label { font-size: 13px; color: #5a6070; }
.day-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.day-tab { padding: 8px 14px; border-radius: 999px; border: 1.5px solid #c6cad6; background: #fff; font-size: 14px; cursor: pointer; color: #1c2130; font-family: inherit; }
.day-tab.active { background: #2f6df6; border-color: #2f6df6; color: #fff; font-weight: 600; }
.stop-list, .visit-list, .stock-list, .flag-list, .est-list, .dose-list { margin: 12px 0; }
.stop-card { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; border: 1px solid #e3ddcf; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 14.5px; }
.stop-order { font-size: 20px; font-weight: 800; color: #2f6df6; min-width: 24px; text-align: center; }
.stop-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.stop-meta { font-size: 13.5px; color: #5a6070; }
.stop-gate { font-size: 13.5px; color: #5a6070; }
.stop-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.visit-row, .stock-row, .flag-row, .est-row, .dose-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; border: 1px solid #e3ddcf; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 14.5px; }
.visit-row.selected { border-color: #2f6df6; background: #f0f5ff; }
.visit-date { font-weight: 700; }
.visit-readings, .visit-services, .visit-min, .visit-doses, .visit-notes, .flag-notes, .est-context, .stock-reorder { font-size: 13.5px; color: #5a6070; }
.stock-row.low { border-left: 5px solid #c0392b; }
.chip.low-chip { background: #c0392b; }
.chip.kind-chip { background: #2f6df6; }
.chip.status-chip { background: #5a6070; }
.btn.danger { border-color: #e0b4ae; color: #8c2f1b; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.preview-note { background: #fff8e6; border: 1px solid #f0dc9e; border-radius: 8px; padding: 8px 10px; }
.print-visit-field { display: inline-flex; flex-direction: column; gap: 6px; }
.print-visit-field select { min-width: 220px; }

/* Print sheet: hidden on screen, the ONLY thing printed. The PREVIEW
 * watermark lives inside #printSheet, so it survives window.print. */
#printSheet { display: none; }
.preview-watermark { position: fixed; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-30deg); font-size: 110px; font-weight: 800; letter-spacing: 12px; color: rgba(192, 57, 43, .16); pointer-events: none; white-space: nowrap; z-index: 9999; }
.preview-print-note { font-size: 13px; color: #8c2f1b; }
.print-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13.5px; }
.print-table th, .print-table td { border: 1px solid #999; padding: 6px 8px; text-align: left; vertical-align: top; }
.print-table th { background: #eee; }

@media print {
  body > *:not(#printSheet) { display: none !important; }
  body { background: #fff; }
  #printSheet { display: block !important; color: #000; }
  #printSheet h2 { font-size: 20px; margin: 0 0 8px; }
  #printSheet h3 { font-size: 16px; margin: 16px 0 6px; }
  /* The watermark must stay visible in print, even though everything
   * else on the page is hidden. */
  .preview-watermark { display: block !important; position: fixed; }
}
@media (max-width: 600px) {
  .dash-num { font-size: 22px; }
  .preview-watermark { font-size: 64px; }
}
