:root {
  color-scheme: light;
  --page: #f5f6f0;
  --card: #fff;
  --ink: #172820;
  --muted: #4b6055;
  --border: #d9e1d8;
  --accent: #155b43;
  --dark: #163027;
  --lime: #d5eca8;
  --success: #e9f5ec;
  --danger: #8f352b;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); line-height: 1.55; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid #2c926b; outline-offset: 3px; }
.skip-link { position: absolute; top: 10px; left: 12px; z-index: 10; padding: 8px 13px;
  background: var(--card); border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.topbar { color: #f8fff9; background: var(--dark); border-bottom: 1px solid #304f42; }
.bar-inner { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  max-width: 1220px; margin: auto; padding: 12px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none;
  font-size: 1.15rem; font-weight: 770; letter-spacing: -.025em; flex-shrink: 0; }
.logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px 6px 11px 6px;
  color: var(--dark); background: var(--lime); font-weight: 850; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.topbar a, .nav-muted { color: inherit; }
.topbar .skip-link { color: var(--dark); }
.topbar nav a, .topbar nav button { display: inline-flex; align-items: center; min-height: 42px;
  padding: 6px 9px; border-radius: 7px; text-decoration: none; white-space: nowrap; }
.topbar nav :is(a, button):hover { background: #ffffff14; }
.topbar nav a[aria-current="page"] { color: var(--dark); background: var(--lime); font-weight: 750; }
.topbar nav .nav-action { border: 1px solid #9dbda9; margin-left: 6px; }
.topbar .account-nav { border-left: 1px solid #52665d; padding-left: 8px; flex-shrink: 0; }
.topbar :focus-visible { outline-color: var(--lime); }
.link-button { border: 0; background: none; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.topbar nav a, .link-button { font-size: .87rem; }
.shell { max-width: 1220px; padding: 46px 24px 64px; margin: auto; min-width: 0; }
.page-head { margin-bottom: 27px; }
h1, h2, p { margin-top: 0; }
h1 { line-height: 1.06; font-size: clamp(2.08rem, 4.6vw, 3.45rem); letter-spacing: -.055em; margin-bottom: 11px; }
h2 { line-height: 1.25; font-size: 1.23rem; letter-spacing: -.02em; margin-bottom: 16px; }
p { margin-bottom: 14px; }
.muted { color: var(--muted); }
.page-head p { margin-bottom: 0; font-size: 1.05rem; }
.dashboard-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 20px; margin-bottom: 20px; }
.card { min-width: 0; padding: 25px; border-radius: 16px; border: 1px solid var(--border); background: var(--card);
  box-shadow: 0 1px 2px #16302708, 0 8px 30px #16302706; }
.login { max-width: 440px; margin: 30px auto; padding: clamp(22px, 5vw, 34px); }
.login h1 { font-size: 2rem; }
.issue-form, .login form { display: grid; gap: 8px; }
label { font-size: .92rem; font-weight: 680; }
input, select { min-width: 0; width: 100%; padding: 9px 11px; border-radius: 7px; color: var(--ink);
  border: 1px solid #b9c9bc; background: #fbfdfb; margin-bottom: 7px; }
.button { display: inline-flex; min-height: 42px; align-items: center; border-radius: 8px; border: 1px solid transparent;
  padding: 8px 14px; cursor: pointer; font-weight: 650; white-space: nowrap; text-decoration: none; }
.primary { color: #fff; background: var(--accent); justify-self: start; }
.primary:hover { background: #09543d; }
.secondary { color: var(--dark); background: #f6faf4; border-color: #cddccf; }
.secondary:hover { background: #eaf5e8; }
.danger { color: var(--danger); background: #fff; border-color: #e6c1b9; font-size: .88rem; }
.danger:hover { background: #fbebe7; }
.small { min-height: 34px; padding: 4px 9px; font-size: .85rem; }
.key-summary { background: #edf5e6; }
.summary-heading, .section-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.summary-heading a { font-size: .9rem; }
.key-summary dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 0; }
.key-summary dl div { padding: 12px 16px; background: #fff9; border: 1px solid #d6e4d4; border-radius: 10px; }
.key-summary dt { font-size: .88rem; color: var(--muted); }
.key-summary dd { margin: 0; font-size: 2rem; font-weight: 730; letter-spacing: -.035em; }
.verification-summary, .inventory + .inventory { margin-top: 16px; }
.verification-summary { margin-bottom: 16px; }
.verification-summary h2 { margin-top: 9px; }
.verification-summary dl { display: grid; grid-template-columns: repeat(auto-fit,minmax(125px,1fr)); gap: 12px; margin-bottom: 0; }
.verification-summary dl div { padding: 10px 14px; border-radius: 9px; background: #f3f6f0; }
.verification-summary dt { color: var(--muted); font-size: .88rem; }
.verification-summary dd { margin: 0; font-size: 1.55rem; font-weight: 720; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; text-align: left; white-space: nowrap; }
th, td { padding: 10px 12px; border-top: 1px solid var(--border); }
thead th { background: #f3f6f0; color: #40544a; }
.key-label { display: block; max-width: 260px; white-space: normal; overflow-wrap: anywhere; }
.key-prefix { display: block; color: var(--muted); font-size: .8rem; font-weight: 450; }
.badge { display: inline-block; border-radius: 20px; padding: 3px 10px; font-weight: 650; font-size: .8rem; }
.badge.active { background: #e1f3e6; color: #185438; }
.badge.revoked { background: #f9eae4; color: var(--danger); }
.badge.expired { background: #eaece9; color: #526256; }
.empty { color: var(--muted); padding: 22px 12px; }
.notice { padding: 15px 17px; background: var(--success); border: 1px solid #c2ddca;
  border-radius: 10px; margin-bottom: 20px; }
.notice.error { background: #fff2ee; border-color: #e8c7bf; color: var(--danger); }
.issued h2 { margin-bottom: 8px; }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.copy-row code { background: #fff; padding: 8px 11px; border: 1px solid #d1e1d1; border-radius: 7px;
  overflow-wrap: anywhere; user-select: all; }
.copy-feedback { margin: 5px 0 0; color: var(--muted); font-size: .86rem; }
.copy-feedback:empty { display: none; }
.guide-grid { display: grid; grid-template-columns: 175px minmax(0, 1fr); gap: 25px; }
.guide-nav { display: flex; flex-direction: column; align-self: start; position: sticky; top: 18px; gap: 9px; padding: 10px 0; }
.guide-nav a { font-size: .94rem; }
.guide { display: grid; gap: 16px; min-width: 0; }
.guide .card { scroll-margin-top: 12px; }
.guide .card > :last-child { margin-bottom: 0; }
.endpoint { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.endpoint span, .error-list dt { color: var(--dark); background: #e9f4e6; padding: 3px 7px;
  border-radius: 4px; font-weight: 700; font-size: .79rem; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .89em; }
.endpoint code { overflow-wrap: anywhere; }
pre { padding: 14px 17px; background: #172d25; color: #f1f7ee; border-radius: 8px; overflow-x: auto; }
.error-list { display: grid; gap: 9px; }
.error-list div { display: flex; align-items: start; gap: 10px; }
.error-list dd { margin: 0; }
.workspace-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 30px; flex-wrap: wrap; }
.country-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 4px; border-radius: 11px;
  border: 1px solid #d5dfd1; background: #ebefe7; }
.country-switch a { padding: 8px 11px; min-height: 41px; display: inline-flex; align-items: center; border-radius: 7px;
  text-decoration: none; font-size: .9rem; color: var(--dark); }
.country-switch a:hover { background: #e0e8da; }
.country-switch a[aria-current="page"] { background: #fff; font-weight: 750; box-shadow: 0 1px 3px #16302724; }
.calculator-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.calculator-form { display: grid; gap: 17px; }
.calculator-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.calculator-form input, .calculator-form select { margin: 4px 0 0; }
.calculator-form + .field-note { margin-top: 16px; }
.field-note { color: var(--muted); font-size: .86rem; margin: 0; }
#florida-base-help, #street-help, #zip-help { margin-top: 5px; }
.optional { color: var(--muted); font-weight: 450; }
.calculator-empty { background: #eaf0e4; border-color: #d7e2d4; }
.calculator-empty h2, .conflict-panel h2 { margin-bottom: 7px; }
.calculator-empty p { color: var(--muted); margin: 0; }
.calculator-result { padding: 0; overflow: hidden; font-variant-numeric: tabular-nums; }
.result-summary { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px;
  background: var(--dark); color: #fff; padding: 23px 25px; }
.result-summary h2 { margin-bottom: 6px; font-size: 1rem; color: #e2efd9; letter-spacing: 0; }
.result-summary h2:focus-visible { outline-color: var(--lime); }
.calculated-tax { margin: 0; font-size: clamp(2.25rem, 5vw, 3.6rem); font-weight: 735; line-height: 1.05;
  letter-spacing: -.065em; overflow-wrap: anywhere; }
.result-rate { background: var(--lime); color: var(--dark); padding: 8px 12px; border-radius: 10px; }
.result-rate dt { font-size: .78rem; font-weight: 640; }
.result-rate dd { font-size: 1.35rem; line-height: 1.16; }
.result-details { padding: 8px 25px 23px; }
.calculator-result dl { margin: 0; }
.result-facts > div, .component-rates > div { border-bottom: 1px solid var(--border); padding: 9px 0;
  display: flex; justify-content: space-between; gap: 12px; }
.result-facts dt { color: var(--muted); }
.nightly-facts dd { margin: 0; font-weight: 650; }
.calculator-result dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.result-total dd { font-size: 1.17rem; }
.result-actions { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-top: 16px; font-size: .9rem; }
.rate-breakdown { padding-top: 11px; }
.rate-breakdown summary { cursor: pointer; font-weight: 690; color: var(--accent); }
.rate-breakdown h3 { margin: 10px 0 0; font-size: .92rem; }
.component-rates { font-size: .88rem; }
.candidate-rates { display: flex; flex-wrap: wrap; list-style: none; padding: 0; gap: 7px; }
.candidate-rates li { padding: 5px 10px; border-radius: 7px; color: #623710; background: #f9edda; font-weight: 700; }
.conflict-panel .component-rates dt, .conflict-panel .component-rates dd { min-width: 0; overflow-wrap: anywhere; }
.conflict-panel .component-rates dd { margin: 0; text-align: right; }
.table-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.table-filters > div:not(.filter-actions) { flex: 1 1 175px; max-width: 285px; }
.table-filters input, .table-filters select { margin: 4px 0 0; display: block; }
.filter-actions { display: flex; align-items: center; gap: 10px; }
.catalog-count { margin: 10px 0 13px; font-size: .88rem; }
.calculator-recovery { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.notice.error > p { margin: 0; }
.taxability-coverage { margin-top: 14px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 8px; }
.taxability-coverage p { margin: 0; }
.taxability-coverage ul { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 5px 0; padding-inline-start: 18px; font-size: .88rem; }
.state-code { margin-left: 4px; color: var(--muted); font-size: .8rem; font-weight: 450; }
.inventory tbody tr:hover { background: #f7faf4; }
.taxability-table th[scope="row"] { min-width: 130px; }
.taxability-table td:nth-child(2) { min-width: 155px; }
.taxability-table td:nth-child(3) { width: 44%; min-width: 245px; }
.taxability-table td:last-child { min-width: 150px; }
.taxability-table small { display: block; color: var(--muted); margin-top: 5px; font-size: .8rem; font-weight: 400; }
.taxability-status { display: inline-block; color: var(--accent); font-weight: 700; }
.audit-meta { margin-bottom: 18px; }
.audit-meta p:last-child { margin-bottom: 0; }
.audit-meta code { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.audit-files { margin: 0; padding: 0; list-style: none; }
.audit-files li { padding-block: 13px; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.audit-files li:last-child { padding-bottom: 0; }
.audit-files li div, .audit-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; }
.audit-files li div { justify-content: space-between; }
.audit-files li p { margin: 5px 0 0; }
.audit-files li code { color: var(--muted); }
.download-notes { margin-top: 16px; }
.page-head .download-updated { margin-top: 8px; font-size: .9rem; }
.download-notes ul { margin: 0; padding-left: 20px; }
.download-notes li + li { margin-top: 5px; }
.changes-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.changes-card h2 { margin-bottom: 4px; }
.change-freshness { font-size: .9rem; margin-bottom: 14px; }
.change-row { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 14px;
  padding: 14px 0; border-top: 1px solid var(--border); }
.change-row:last-child { padding-bottom: 0; }
.change-date { font-size: .9rem; font-weight: 670; }
.change-date span { display: block; color: var(--muted); font-weight: 450; }
.change-row h3 { margin: 4px 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.change-row p { margin-bottom: 7px; }
.change-row .change-links { margin: 0; font-size: .87rem; }
.changes-card th[scope="row"] { font-weight: 600; }
@media (max-width: 1040px) {
  .bar-inner { display: grid; grid-template-columns: 1fr auto; }
  .topbar .workspace-nav { grid-column: 1 / -1; grid-row: 2; }
  .topbar .account-nav { grid-column: 2; grid-row: 1; border: 0; padding-left: 0; }
}
@media (max-width: 720px) {
  .dashboard-grid, .guide-grid, .calculator-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-nav { position: static; flex-flow: row wrap; gap: 10px 16px; padding: 0; }
  .shell { padding: 30px 16px 52px; }
  .bar-inner { padding: 10px 15px; gap: 6px 10px; }
  .topbar nav { gap: 2px; }
  .topbar nav a, .topbar nav button { font-size: .81rem; padding-inline: 6px; }
  .topbar .workspace-nav { border-top: 1px solid #52665d; padding-top: 4px; }
  .card { padding: 18px; }
  .calculator-result { padding: 0; }
  .result-summary, .result-details { padding-inline: 18px; }
  .table-filters > div:not(.filter-actions) { max-width: none; }
}
@media (max-width: 420px) {
  .calculator-fields { grid-template-columns: minmax(0, 1fr); }
  .change-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .change-date span { display: inline; margin-left: 7px; }
}

.map-heading { margin-bottom: 18px; }
.map-toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.map-toolbar select { width: auto; min-width: 182px; }
.map-toolbar input[type="date"] { width: auto; min-width: 145px; }
.map-filter { display: grid; gap: 5px; }
.map-layer-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 8px 0; }
.map-toolbar .map-toggle { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; }
.map-toolbar .map-toggle input { width: auto; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 330px); gap: 18px; align-items: start; }
.map-card { padding: 0; overflow: hidden; }
.map-card-head { padding: 16px 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.map-card-head p, .map-card-head h2 { margin: 0; }
.map-card-head p { margin-top: 5px; font-size: .89rem; }
.map-buttons { display: flex; flex-wrap: nowrap; gap: 5px; }
.map-buttons .button { min-width: 34px; }
.map-buttons [hidden] { display: none; }
#tax-map { width: 100%; height: clamp(340px, 50vw, 570px); display: block; background: #eaf1f5; touch-action: pan-y; cursor: pointer; }
#tax-map.state-mode { touch-action: none; cursor: grab; }
#tax-map.state-mode:active { cursor: grabbing; }
.map-legend { display: flex; flex-wrap: wrap; gap: 9px 16px; padding: 12px 18px 3px; color: #3a505c; font-size: .82rem; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-swatch { display: inline-block; width: 11px; height: 11px; border: 1px solid #718a97; border-radius: 3px; }
.map-swatch.zone { background: #91c9be; border-color: #2a9183; }
.map-swatch.postal { background: #064e46; border: none; border-radius: 50%; width: 7px; height: 7px; }
.map-swatch.conflict { background: #c36d19; border: none; border-radius: 0; width: 7px; height: 7px; transform: rotate(45deg); }
.map-swatch.blank { background: #f9fbfc; }
.map-inspection { padding: 0 18px 14px; font-size: .86rem; margin: 8px 0 0; }
.map-side { display: grid; gap: 18px; }
.map-side h2 { margin-top: 0; }
.map-address form { display: grid; gap: 8px; }
.map-address button { margin-top: 5px; }
.map-result { margin-top: 14px; padding: 12px; background: #eff6f4; border-radius: 8px; overflow-wrap: anywhere; }
.map-result strong { display: block; color: #14594f; font-size: 1.6rem; }
#map-links { display: grid; gap: 6px; font-size: .9rem; }
@media (max-width: 840px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-side { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}
@media (max-width: 570px) {
  .map-side { grid-template-columns: 1fr; }
  .map-toolbar { gap: 8px; }
  .map-toolbar select { min-width: 150px; max-width: 100%; }
  .map-card-head { flex-wrap: wrap; }
  #tax-map { height: 350px; }
}

/* Customer workspace */
.customer-heading { border-bottom: 1px solid var(--border); padding-bottom: 22px; }
.workspace-label { display: inline-block; color: var(--accent); margin: 0 0 9px; font-weight: 680; font-size: .9rem; }
.customer-search-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr); align-items: start; gap: 20px; }
.customer-side { display: grid; gap: 16px; }
.customer-links a { display: block; text-decoration: none; padding: 14px 0; border-top: 1px solid var(--border); }
.customer-links a:last-child { padding-bottom: 0; }
.customer-links a:hover strong { text-decoration: underline; }
.customer-links span { display: block; color: var(--muted); font-size: .9rem; }
.customer-login-guide { display: inline-block; margin-top: 18px; }
.customer-fields { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.customer-fields label, .customer-filters label { display: block; margin-bottom: 4px; }
.customer-fields small { color: var(--muted); font-weight: 450; margin-left: .3rem; }
.customer-fields [hidden], [data-workspace-name][hidden] { display: none; }
.customer-span { grid-column: 1 / -1; }
.customer-form textarea { min-width: 0; width: 100%; border: 1px solid #b9c9bc; border-radius: 7px; font: inherit;
  background: #fbfdfb; color: var(--ink); padding: 9px 11px; resize: vertical; }
.customer-form button { margin-top: 12px; }
.customer-fields .customer-checkbox { display: flex; align-items: start; gap: 8px; font-weight: 520; }
.customer-checkbox input { width: auto; margin: .3rem 0 0; accent-color: var(--accent); }
.field-help { font-size: .88rem; margin: 1px 0 6px; }
.customer-rate { border-color: #bbd4aa; background: #f1f7e9; }
.customer-rate-number { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 780; letter-spacing: -.06em; line-height: 1.05; margin-bottom: 15px; }
.customer-rate dl { columns: 2; margin: 0 0 12px; }
.customer-rate dt { color: var(--muted); font-size: .85rem; }
.customer-rate dd { margin: 0; font-weight: 650; }
.customer-digest { overflow-wrap: anywhere; }
.customer-rate details { border-top: 1px solid #cfdfc3; padding-top: 9px; }
.customer-rate summary { color: var(--accent); cursor: pointer; font-weight: 650; }
.customer-record-head, .customer-actions, .customer-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.customer-record-head { justify-content: space-between; }
.customer-filters { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 15px; }
.customer-filters button { margin-bottom: 7px; }
.customer-pagination:not(:empty), .customer-record-status { margin-top: 18px; }
.customer-editor { max-width: 800px; }
.nexus-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 16px; margin-bottom: 20px; }
.nexus-stats strong { display: block; font-size: 1.8rem; line-height: 1.2; letter-spacing: -.035em; }
.nexus-stats span, .nexus-rule-note, .nexus-reported { color: var(--muted); font-size: .86rem; }
.nexus-rule-note { display: block; margin-top: 3px; }
.nexus-review { background: #f8ecd2; color: #6b491a; }
.nexus-report-filters { grid-template-columns: 1fr 1fr auto; max-width: 650px; margin: 12px 0; }
.nexus-footnote { margin: 14px 0 0; font-size: .86rem; }
.nexus-import, .nexus-section { margin-top: 20px; }
.nexus-import textarea { display: block; margin-top: 5px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.nexus-state-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nexus-window { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 10px; }
.nexus-window p { margin: 2px 0; }
.nexus-window p:empty { display: none; }
@media (max-width: 760px) {
  .customer-search-grid, .customer-fields, .customer-filters { grid-template-columns: minmax(0, 1fr); }
  .customer-actions .button { white-space: normal; }
}
