/* Water bill checker (water/) */

select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper-dim);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
}

.hint {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 8px;
  line-height: 1.5;
}

.flag {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  background: var(--amber-soft);
  color: #7A4E12;
  border-left: 3px solid var(--amber);
}

.flag.calm {
  background: #E7F1EC;
  color: var(--teal-deep);
  border-left-color: var(--teal);
}

.flag b {
  font-weight: 700;
}

.uploads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.drop {
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 26px 16px;
  text-align: center;
  background: var(--paper-dim);
  position: relative;
  transition: border-color 0.15s;
}

.drop.has-file {
  border-color: var(--teal);
  background: #E7F1EC;
}

.drop .icon {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 10px;
  color: var(--ink-soft);
  transition: color 0.15s;
}

.drop.has-file .icon {
  color: var(--teal-deep);
}

.drop .label {
  font-weight: 700;
  font-size: 14.5px;
  margin-bottom: 4px;
}

.drop .sub {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.drop input[type='file'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.drop input[type='file']:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.filename {
  margin-top: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--teal-deep);
  font-weight: 600;
  word-break: break-all;
}

.filename.error {
  color: var(--red);
}

button.primary {
  margin-top: 22px;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  background: var(--teal-deep);
  color: #fff;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  letter-spacing: 0.01em;
}

button.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.primary:not(:disabled):hover {
  background: #173F37;
}

.status {
  margin-top: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  color: var(--ink-soft);
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.spinner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--teal);
  animation: spin 0.8s linear infinite;
  display: none;
  flex: none;
}

.status.busy .spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
}

.review {
  display: none;
}

.review.show {
  display: block;
}

.review-doc {
  margin-bottom: 26px;
}

.review-doc h3 {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
}

.review-doc .method {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.checks {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.checks li {
  font-size: 12.5px;
  line-height: 1.5;
  padding-left: 20px;
  position: relative;
  margin-bottom: 5px;
}

.checks li::before {
  position: absolute;
  left: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
}

.checks li.ok {
  color: var(--teal-deep);
}

.checks li.ok::before {
  content: '✓';
}

.checks li.warn {
  color: #8C5A18;
}

.checks li.warn::before {
  content: '!';
}

.rows {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.row:last-child {
  border-bottom: none;
}

.row.checked {
  background: #EAF4EF;
}

.row label {
  flex: 1;
  cursor: pointer;
}

.row label .basis {
  color: var(--ink-soft);
  font-size: 12px;
}

.row .amt {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
}

.row input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: var(--teal-deep);
  cursor: pointer;
  flex: none;
}

.empty-note {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 14px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.totalline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--paper-dim);
  border-radius: 10px;
}

.totalline .tl-label {
  font-weight: 700;
  font-size: 14px;
}

.totalline input {
  width: 140px;
  text-align: right;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
}

.totalline input:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 1px;
}

.compare-btn {
  margin-top: 26px;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  background: var(--amber);
  color: #3A2400;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
}

.compare-btn:hover {
  background: #B67A28;
}

.results {
  display: none;
}

.results.show {
  display: block;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 16px;
}

.stat-card .cat {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.stat-card .amt {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 23px;
}

.stat-card .chip {
  display: inline-flex;
  margin-top: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: #8C5A18;
}

.stat-card.total {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: #fff;
}

.stat-card.total .cat {
  color: #BFE0D6;
}

.stat-card.total .chip {
  background: rgba(255, 255, 255, 0.16);
  color: #FFF3DF;
}

.promise-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
}

.promise-box h4 {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  margin: 0 0 4px;
}

.promise-box .src {
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.promise-grid {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.promise-figure .n {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 18px;
}

.promise-figure .l {
  font-size: 12px;
  color: var(--ink-soft);
  max-width: 150px;
  line-height: 1.35;
}

.verdict {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.verdict.below {
  background: #E7F1EC;
  color: var(--teal-deep);
}

.verdict.above {
  background: #FBEADD;
  color: #8C5A18;
}

.verdict.unclear {
  background: var(--paper-dim);
  color: var(--ink);
}

.methodology h2 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
}

.methodology .updated {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.method-grid h3 {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

.method-grid p,
.method-grid li {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.method-grid p {
  margin: 0 0 10px;
}

.method-grid ul {
  margin: 0;
  padding-left: 18px;
}

.method-grid li + li {
  margin-top: 6px;
}

.sources {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sources h3 {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.source-links a {
  color: var(--teal-deep);
  font-size: 12.5px;
  font-weight: 600;
  text-underline-offset: 3px;
}

.source-links a:hover {
  color: var(--ink);
}

.source-links a:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 640px) {
  .uploads {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .promise-grid {
    gap: 14px;
  }

  .method-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
