html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}
.portal-page main.space-y-12 > section:first-of-type {
  margin-top: 0;
}
.portal-page header .font-extrabold {
  white-space: nowrap;
}
.portal-page header nav {
  font-size: 0.75rem;
}
.portal-page header nav a {
  white-space: nowrap;
}
#pageStatus:empty {
  display: none;
}
[hidden] {
  display: none !important;
}
.portal-page {
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.portal-page main {
  min-width: 0;
}
.portal-page section {
  scroll-margin-top: 6rem;
}
.portal-input {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  background: #f8fafc;
  font-size: 0.8rem;
  margin-top: 0.3rem;
}
.portal-input:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}
.portal-button,
.portal-page button.secondary,
.portal-page button[data-close] {
  padding: 0.5rem 0.8rem;
  background: #2563eb;
  border: 1px solid #2563eb;
  border-radius: 0.5rem;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.portal-button.secondary,
.portal-page button.secondary {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.portal-page button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.portal-page button:focus-visible,
.portal-page a:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}
.portal-page button[data-city],
.portal-page button[data-amount] {
  background: #f1f5f9;
  color: #475569;
}
.portal-page button[aria-pressed="true"] {
  background: #2563eb;
  color: white;
}
.portal-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  line-height: 1.65;
}
.portal-page th {
  text-align: left;
  padding: 0.85rem 1rem;
  font-weight: 700;
  background: #f8fafc;
  color: #475569;
}
.portal-page td {
  padding: 1rem;
  vertical-align: top;
  border-top: 1px solid #f1f5f9;
}
.portal-page tbody tr:hover {
  background: #f8fafc;
}
.portal-page td strong,
.portal-page td small {
  display: block;
}
.portal-page td small {
  font-size: 0.65rem;
  color: #64748b;
  margin-top: 0.35rem;
}
.portal-page td p {
  margin-bottom: 0.4rem;
}
.portal-page td a,
.ref-source a,
.ref-tax-card a,
.portal-page .message a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.portal-page .overflow-x-auto {
  overscroll-behavior-x: contain;
}
.portal-page .overflow-x-auto table {
  min-width: 650px;
}
.ref-details {
  min-width: 230px;
  max-width: 360px;
}
.ref-cities {
  color: #2563eb;
}
.ref-badge {
  display: inline-block;
  margin-top: 0.35rem;
  margin-right: 0.25rem;
  padding: 0.12rem 0.4rem;
  border-radius: 0.35rem;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.65rem;
  line-height: 1.5;
}
.ref-badge.positive {
  color: #047857;
  background: #ecfdf5;
}
.ref-badge.negative {
  color: #b91c1c;
  background: #fef2f2;
}
.ref-archived {
  background: #f8fafc;
  color: #64748b;
}
.ref-guide {
  white-space: pre-line;
  margin-top: 0.6rem;
}
#cityInsightBox,
[id$="-cityInsightBox"] {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.ref-tax-card {
  border: 1px solid #fde68a;
  background: #fffbeb;
  padding: 1.2rem;
  border-radius: 0.8rem;
  font-size: 0.8rem;
  line-height: 1.7;
}
.ref-tax-card.blue {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.ref-tax-card h3 {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.6rem;
}
.ref-tax-card p,
.ref-tax-card ul {
  margin: 0.6rem 0;
}
.ref-tax-card ul {
  padding-left: 1.2rem;
  list-style: disc;
}
.ref-tax-card small {
  color: #64748b;
}
.ref-tax-card a {
  display: block;
}
.ref-source {
  border: 1px solid #e2e8f0;
  padding: 0.8rem;
  border-radius: 0.6rem;
  background: #f8fafc;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}
.chart-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 1rem;
  border-radius: 0.8rem;
  min-width: 0;
}
.analytics-toggle {
  cursor: pointer;
  font-size: 0.9rem;
}
.analytics-toggle::marker {
  color: #2563eb;
}
.analytics-toggle > span:first-child {
  margin-right: 1rem;
}
.analytics-toggle .analytics-show,
.analytics-toggle .analytics-hide {
  font-size: 0.75rem;
  color: #2563eb;
}
.analytics-hide,
details[open] > .analytics-toggle .analytics-show {
  display: none;
}
details[open] > .analytics-toggle .analytics-hide {
  display: inline;
}
.analytics-content {
  margin-top: 1.3rem;
}
.chart-panel h3 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}
.data-chart {
  width: 100%;
  height: auto;
  display: block;
}
.chart-label {
  font: 12px system-ui;
  fill: #475569;
}
.chart-count {
  font: 12px system-ui;
  fill: #0f172a;
}
.chart-legend {
  font-size: 0.65rem;
  color: #64748b;
  margin-top: 0.5rem;
}
.portal-page .message {
  border: 1px solid #e2e8f0;
  border-radius: 0.8rem;
  padding: 1rem;
  background: #f8fafc;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
.portal-page .message h3 {
  font-weight: 700;
  font-size: 0.9rem;
}
.portal-page .message p {
  margin: 0.6rem 0;
}
.portal-page .message small {
  display: block;
  color: #64748b;
}
.portal-dialog {
  width: min(760px, calc(100% - 2rem));
  max-height: 85vh;
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  padding: 1.4rem;
  color: #1e293b;
}
.portal-dialog::backdrop {
  background: #0f172a88;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.dialog-heading h2 {
  font-size: 1.2rem;
  font-weight: 700;
}
.portal-dialog .message {
  margin: 0.8rem 0;
}
.portal-dialog label {
  display: block;
  margin: 0.8rem 0;
  font-size: 0.8rem;
}
.portal-dialog input:not([type="hidden"]),
.portal-dialog textarea {
  display: block;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.6rem;
  width: 100%;
}
.portal-dialog [type="submit"] {
  background: #2563eb;
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
}
.portal-page .notice {
  padding: 0.8rem;
  border-radius: 0.5rem;
  background: #eff6ff;
}
.portal-page .error {
  color: #b91c1c;
  background: #fef2f2;
}
.portal-page .empty {
  padding: 1rem;
  color: #64748b;
  text-align: center;
}
.guide-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: #1d4ed8;
  font-size: 13px;
}
.guide-cta strong,
.guide-cta small {
  display: block;
}
.guide-cta small {
  color: #64748b;
  margin-top: 5px;
  font-size: 11px;
}
.guide-cta > span:last-child {
  flex-shrink: 0;
  font-weight: 700;
}
.quote-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.quote-filters select {
  display: block;
  width: 100%;
  border: 1px solid #cbd5e1;
  padding: 7px;
  border-radius: 6px;
}
.quote-explanation {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 15px;
}
.quote-summary {
  font-weight: 600;
}
.cost-panel {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  min-width: 0;
  color: #334155;
  scroll-margin-top: 6rem;
}
.cost-panel > * + * {
  margin-top: 1.25rem;
}
.cost-heading h2,
.cost-heading h3 {
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 750;
  margin: 0.35rem 0;
}
.cost-heading {
  scroll-margin-top: 6rem;
}
.cost-heading p,
.cost-note {
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.6;
}
.cost-eyebrow {
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 700;
}
.cost-profile,
.cost-payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
}
.cost-panel label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 0;
}
.cost-panel select,
.cost-panel input[type="number"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.65rem;
  font: inherit;
  color: #0f172a;
  background: #fff;
}
.cost-panel input:invalid {
  border-color: #dc2626;
}
.cost-panel fieldset {
  min-width: 0;
  border: 1px solid #dbeafe;
  border-radius: 0.75rem;
  padding: 1rem;
  background: #f8fafc;
}
.cost-panel fieldset > label + label {
  margin-top: 0.75rem;
}
.cost-panel legend {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e40af;
  padding: 0 0.25rem;
}
.cost-panel .cost-mobile {
  flex-direction: row;
  align-items: center;
}
.cost-panel .cost-mobile input {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}
.cost-details > summary,
.cost-legacy > summary {
  cursor: pointer;
  color: #1d4ed8;
  font-weight: 650;
}
.cost-table-scroll {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
}
.cost-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  font-size: 0.8rem;
  line-height: 1.5;
}
.cost-table th,
.cost-table td {
  padding: 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e2e8f0;
  min-width: 100px;
  white-space: normal;
}
.cost-table th {
  background: #f1f5f9;
  color: #475569;
}
.cost-table td:first-child {
  min-width: 200px;
  max-width: 350px;
}
.cost-table small,
.cost-table strong {
  display: block;
}
.cost-table small,
.cost-table p {
  margin-top: 0.4rem;
}
.cost-table a {
  color: #1d4ed8;
}
.cost-missing {
  color: #92400e;
}
.cost-summary {
  border-left: 3px solid #2563eb;
  background: #eff6ff;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
}
.cost-legacy > section {
  margin-top: 1.5rem;
}
@media (max-width: 640px) {
  .cost-results {
    display: block;
    min-width: 0;
  }
  .cost-results thead {
    display: none;
  }
  .cost-results tbody,
  .cost-results tr {
    display: block;
    width: 100%;
  }
  .cost-results tr + tr {
    border-top: 3px solid #e2e8f0;
  }
  .cost-results td {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.65rem 1rem;
    min-width: 0;
  }
  .cost-results td::before {
    content: attr(data-label);
    color: #64748b;
  }
  .cost-results td:first-child {
    display: block;
    min-width: 0;
    max-width: none;
    background: #f8fafc;
  }
  .cost-results td:first-child::before {
    content: none;
  }
  .cost-results td small {
    flex-basis: 100%;
    margin: 0;
  }
}
.quote-original {
  border-left: 3px solid #bfdbfe;
  padding-left: 12px;
  white-space: pre-wrap;
  margin: 12px 0;
}
@media (max-width: 640px) {
  .guide-cta {
    align-items: flex-start;
    flex-direction: column;
  }
  .quote-filters {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
@media (max-width: 640px) {
  .portal-page header .h-16 {
    height: auto;
    min-height: 4rem;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }
  .portal-page header [data-open-takedown] {
    padding: 0.35rem 0.5rem;
  }
  .portal-page main {
    padding-top: 1rem;
  }
  .portal-page main > section {
    padding: 1.1rem;
  }
  .portal-page .space-y-12 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1.5rem;
  }
  .portal-page header .text-base {
    font-size: 0.9rem;
  }
  .portal-page header .text-\[11px\] {
    font-size: 0.6rem;
  }
}
