/* Print-friendly, monochrome-base styling */
:root {
  --fg: #1a1a1a;
  --muted: #666;
  --bg: #fdfdfd;
  --accent: #b8001f;
  --emphasis-bg: #fff7e6;
  --you-bg: #e6f3ff;
  --info-bg: #e7f3ff;
  --border: #ddd;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.5;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h1 {
  font-size: 1.85rem;
  margin: 0 0 0.5rem;
  color: var(--accent);
}
h2 {
  font-size: 1.3rem;
  margin: 1.5rem 0 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
}
h3 {
  font-size: 1.05rem;
  margin: 1rem 0 0.5rem;
}

.lead {
  font-size: 1.05rem;
  color: #444;
  margin-bottom: 1.5rem;
}

/* Search form */
.search-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.search-form input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.search-form button {
  padding: 0.6rem 1.25rem;
  font-size: 1rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
}
table th, table td {
  padding: 0.45rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table thead th {
  background: #f5f5f5;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
}
table tbody th {
  font-weight: 600;
  color: #444;
}
table tr.emphasis {
  background: var(--emphasis-bg);
  font-weight: 600;
}
table tr.you {
  background: var(--you-bg);
  font-weight: 600;
}

table.results td:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
table.results .btn {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  background: var(--accent);
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.875rem;
}

/* Number columns right-align */
section.headline td:nth-child(n+2),
section.uniform-equal td:nth-child(n+2),
section.appeal-pattern td:nth-child(n+2),
section.components td:nth-child(n+2),
section.yoy-detail td:nth-child(n+2),
section.targets li {
  font-variant-numeric: tabular-nums;
}

/* Report header */
header {
  margin-bottom: 1.5rem;
}
header .addr {
  margin: 0 0 0.5rem;
  color: #444;
  font-size: 1rem;
}
header .ids {
  margin: 0.25rem 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Notes / alerts */
.note {
  font-size: 0.9rem;
  color: #444;
  margin: 0.5rem 0 0;
}
.muted { color: var(--muted); font-size: 0.875em; }
.alert {
  background: #fee;
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border-radius: 0 4px 4px 0;
}
.alert.info {
  background: var(--info-bg);
  border-left-color: #2c7be5;
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  background: #2c7be5;
  color: white;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 0.25rem;
}

/* Disclaimer */
.disclaimer {
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #444;
  margin: 1.5rem 0;
}
.disclaimer p { margin: 0.4rem 0; }

ul.statutes {
  list-style: none;
  padding: 0;
}
ul.statutes li { padding: 0.15rem 0; font-size: 0.9rem; }

footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
}
footer .meta { font-size: 0.8rem; }

/* Exemptions section */
.exemptions {
  margin: 1.25rem 0;
}
.exemption-list {
  list-style: none;
  padding-left: 0;
  margin: 0.25rem 0 0.5rem;
}
.exemption-list li {
  padding: 0.2rem 0;
  border-bottom: 1px dotted var(--border);
}
.exemption-list li:last-child { border-bottom: none; }
.exemptions .alert ul { margin: 0.4rem 0; padding-left: 1.25rem; }
.exemptions .alert li { padding: 0.2rem 0; }

/* Narrative section */
.narrative {
  background: #fafaf7;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.narrative h2 {
  margin-top: 0;
  border-bottom-color: #d8d8d0;
}
.narrative-intro {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}
.narrative-text {
  background: white;
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1rem;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.6;
}
.narrative-text p { margin: 0 0 0.75rem; }
.narrative-text p:last-child { margin-bottom: 0; }
.narrative-text code {
  background: #f0f0f0;
  padding: 0 0.25rem;
  font-size: 0.85em;
  border-radius: 2px;
}

/* Download button */
.download-row { margin: 0.75rem 0 0; }
.btn-download {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.btn-download:hover { background: #960018; }

/* Print */
@media print {
  .search-form, .back-link, footer .meta, .download-row { display: none; }
  body { font-size: 11pt; }
  h1 { color: var(--fg); }
  .alert, .disclaimer { background: #f5f5f5 !important; }
  section { page-break-inside: avoid; }
}
