@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  /* Neutral light foundation; cobalt is the single brand accent.
     Green is reserved for semantic success only. */
  --background: #f6f7f9;
  --surface: #ffffff;
  --surface-raised: #f1f3f6;
  --surface-muted: #eef1f5;
  --foreground: #0f172a;
  --muted: #475569;
  --subtle: #5b6576;
  --border: #dde2e9;
  --border-strong: #c3cad5;
  --accent: #1d4ed8;
  --accent-bright: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-soft: #eef2ff;
  --accent-ink: #ffffff;
  --success: #15803d;
  --warning: #b45309;
  --warning-soft: #fff7ed;
  --danger: #b91c1c;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-raised: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent-bright);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.site-header-inner,
.site-footer-inner {
  display: flex;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.site-header-inner {
  min-height: 72px;
  gap: 24px;
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--foreground);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(29, 78, 216, 0.39);
  border-radius: 10px;
  background: rgba(29, 78, 216, 0.09);
  color: var(--accent-bright);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.brand-accent {
  color: var(--accent-bright);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-nav a,
.back-link,
.button-quiet,
.card-link {
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover,
.back-link:hover,
.button-quiet:hover,
.card-link:hover {
  color: var(--accent-bright);
}

.site-main {
  width: min(1120px, calc(100% - 40px));
  min-height: calc(100vh - 145px);
  margin: 0 auto;
  padding: 72px 0 96px;
}

.hero-block {
  max-width: 780px;
  padding: 28px 0 54px;
}

.eyebrow,
.section-kicker,
.source-label,
.lot-number {
  margin: 0;
  color: var(--accent-bright);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.status-dot,
.schedule-marker {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--subtle);
}

.status-dot {
  background: var(--accent-bright);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.08);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.045em;
}

.hero-block h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  color: var(--foreground);
  font-size: clamp(2.55rem, 7vw, 5.5rem);
  line-height: 0.98;
}

.hero-copy {
  max-width: 650px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.button-primary,
.button-quiet {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
}

.button-primary {
  border: 0;
  padding: 0 18px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.button-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.button-quiet {
  padding: 0 12px;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.button-quiet:hover {
  border-color: rgba(29, 78, 216, 0.39);
  background: rgba(29, 78, 216, 0.05);
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 84px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.metric-item {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 18px 22px;
  border-right: 1px solid var(--border);
}

.metric-item:last-child {
  border-right: 0;
}

.metric-item strong {
  color: var(--foreground);
  font-size: 1.65rem;
  line-height: 1.1;
}

.metric-item span {
  color: var(--muted);
  font-size: 0.78rem;
}

.metric-item small {
  color: var(--subtle);
  font-size: 0.68rem;
  line-height: 1.35;
}

.catalog-section {
  scroll-margin-top: 96px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading.compact {
  align-items: center;
}

.section-heading h2 {
  margin: 7px 0 0;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.1;
}

.section-note,
.muted-copy {
  color: var(--muted);
  font-size: 0.86rem;
}

.section-note {
  max-width: 270px;
  margin-bottom: 0;
  text-align: right;
}

.auction-filters {
  margin: 24px 0 28px;
  padding: 20px 22px;
  border: 1px solid rgba(29, 78, 216, 0.11);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auction-filters-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.auction-filters-heading h3 {
  margin: 5px 0 0;
  font-size: 1.05rem;
}

.auction-filter-form {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.9fr);
  align-items: start;
  gap: 14px;
  margin-top: 18px;
}

.auction-filter-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.auction-filter-date-field {
  min-height: 100%;
  padding-left: 22px;
  border-left: 1px solid var(--border);
}

.auction-filter-checkbox-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.auction-filter-checkbox-field legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  color: var(--foreground);
  font-size: 0.78rem;
  font-weight: 800;
}

.auction-filter-count {
  color: var(--accent-bright);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auction-filter-field label {
  color: var(--foreground);
  font-size: 0.78rem;
  font-weight: 800;
}

.auction-filter-field select,
.auction-filter-field input[type="date"] {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--foreground);
  color-scheme: light;
  font: inherit;
  font-size: 0.84rem;
}

.auction-filter-field select {
  cursor: pointer;
}

.auction-filter-help {
  min-height: 18px;
  color: var(--subtle);
  font-size: 0.7rem;
}

.auction-house-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 7px;
}

.auction-house-option {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.auction-house-option:hover {
  border-color: rgba(29, 78, 216, 0.42);
  color: var(--foreground);
}

.auction-house-option.active {
  border-color: rgba(29, 78, 216, 0.45);
  background: rgba(29, 78, 216, 0.08);
  color: var(--foreground);
}

.auction-house-option-mark {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border: 1px solid var(--subtle);
  border-radius: 50%;
  background: transparent;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.auction-house-option.active .auction-house-option-mark {
  border-color: var(--accent-bright);
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.08);
}

.auction-filter-select-all {
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--accent-bright);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 750;
  cursor: pointer;
}

.auction-filter-select-all:hover {
  color: var(--foreground);
}

.auction-filter-live {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--subtle);
  font-size: 0.7rem;
}

.auction-filter-status {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.auction-filter-status strong {
  color: var(--foreground);
}

.auction-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.auction-card,
.detail-panel,
.empty-state {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.auction-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  padding: 21px;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.auction-card:hover {
  border-color: rgba(29, 78, 216, 0.36);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.088);
  transform: translateY(-3px);
}

.auction-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.source-label {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auction-status {
  flex-shrink: 0;
  color: var(--accent-bright);
  font-size: 0.68rem;
  font-weight: 700;
}

.auction-card h3 {
  margin: 38px 0 10px;
  font-size: 1.2rem;
  line-height: 1.15;
}

.auction-card h3 a {
  text-decoration: none;
}

.auction-card h3 a:hover {
  color: var(--accent-bright);
}

.auction-date-label {
  margin-bottom: 26px;
  color: var(--foreground);
  font-size: 0.88rem;
  font-weight: 700;
}

.auction-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.75rem;
}

.auction-card-meta span {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--surface-muted);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 19px;
  color: var(--foreground);
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
}

.source-directory-grid .auction-card {
  min-height: 0;
}

.source-directory-grid h2 {
  margin: 14px 0 8px;
  font-size: 1.12rem;
}

.source-directory-grid .auction-date-label {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.source-directory-grid .source-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.empty-state-title {
  margin-bottom: 6px;
  color: var(--foreground);
  font-size: 1.05rem;
  font-weight: 750;
}

.disclaimer-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 50px;
  padding: 17px 20px;
  border: 1px solid rgba(29, 78, 216, 0.15);
  border-radius: 10px;
  background: rgba(29, 78, 216, 0.035);
  color: var(--muted);
  font-size: 0.78rem;
}

.disclaimer-block p {
  margin: 0;
}

.disclaimer-mark {
  display: grid;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  place-items: center;
  border: 1px solid rgba(29, 78, 216, 0.35);
  border-radius: 50%;
  color: var(--accent-bright);
  font-size: 0.72rem;
  font-weight: 800;
}

.refresh-status {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: -60px 0 52px auto;
  color: var(--subtle);
  font-size: 0.72rem;
}

.refresh-status-dot,
.live-label > span {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--subtle);
}

.refresh-status-dot.active,
.live-label > span {
  background: var(--accent-bright);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.07);
}

.directory-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 26px;
  padding: 30px 0 30px;
  border-bottom: 1px solid var(--border);
}

.directory-header h1 {
  max-width: 760px;
  margin: 14px 0 16px;
  font-size: clamp(2.35rem, 6vw, 4.8rem);
  line-height: 1;
}

.directory-header .hero-copy {
  margin-bottom: 0;
}

.directory-header .refresh-status {
  margin: 0 0 3px;
  max-width: 100%;
  white-space: normal;
}

.directory-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 22px;
  margin: 28px 0 34px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.catalog-search-form {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.catalog-search-form label {
  color: var(--foreground);
  font-size: 0.78rem;
  font-weight: 800;
}

.catalog-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-search-row input {
  min-width: min(360px, 100%);
  min-height: 44px;
  flex: 1 1 240px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--foreground);
  font: inherit;
  font-size: 0.84rem;
}

.directory-summary {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.directory-summary strong {
  color: var(--foreground);
  font-size: 1.3rem;
}

.directory-summary span {
  color: var(--subtle);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.history-filter-panel {
  margin: 28px 0 18px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.history-filter-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.history-filter-header h2 {
  margin: 5px 0 0;
  font-size: 1.15rem;
}

.history-filter-header .catalog-filter-reset {
  flex: 0 0 auto;
  text-decoration: none;
}

.history-filter-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.history-filters {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.history-filter-search,
.history-filter-grid label,
.history-range-fields label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--foreground);
  font-size: 0.76rem;
  font-weight: 800;
}

.history-filter-search input,
.history-filter-grid select,
.history-range-fields input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--foreground);
  font: inherit;
  font-size: 0.78rem;
}

.history-filter-search input::placeholder,
.history-range-fields input::placeholder {
  color: var(--subtle);
  opacity: 1;
}

.history-filter-search input:hover,
.history-filter-grid select:hover,
.history-range-fields input:hover {
  border-color: rgba(29, 78, 216, 0.35);
}

.history-filter-search input:focus-visible,
.history-filter-grid select:focus-visible,
.history-range-fields input:focus-visible,
.history-house-chip:has(input:focus-visible) {
  border-color: var(--accent-bright);
  outline: 3px solid rgba(29, 78, 216, 0.14);
  outline-offset: 1px;
}

.history-filter-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.history-filter-group legend {
  margin-bottom: 9px;
  padding: 0;
  color: var(--foreground);
  font-size: 0.78rem;
  font-weight: 800;
}

.history-house-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-house-chip {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.history-house-chip input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent-bright);
}

.history-house-chip:hover,
.history-house-chip.active,
.history-house-chip:has(input:checked) {
  border-color: var(--accent);
  background: rgba(29, 78, 216, 0.09);
  color: var(--foreground);
}

.history-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.history-range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.history-range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.history-filter-status {
  margin: 16px 0 0;
  color: var(--subtle);
  font-size: 0.72rem;
}

.history-summary-toolbar {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 12px;
}

.lot-directory-filters {
  margin: -10px 0 34px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.lot-directory-filters-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.lot-directory-filters-header h2 {
  margin: 5px 0 0;
  font-size: 1.05rem;
}

.lot-filter-group {
  min-width: 0;
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.lot-filter-group legend {
  padding: 0;
  color: var(--foreground);
  font-size: 0.8rem;
  font-weight: 800;
}

.lot-filter-help {
  margin: 7px 0 11px;
  color: var(--muted);
  font-size: 0.74rem;
}

.lot-filter-select-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.lot-filter-select-grid label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--foreground);
  font-size: 0.78rem;
  font-weight: 800;
}

.lot-filter-select-grid select {
  width: 100%;
  min-height: 44px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--foreground);
  font: inherit;
  font-size: 0.78rem;
}

.lot-filter-select-grid select:focus-visible,
.lot-directory-filters button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.lot-filter-status {
  margin: 14px 0 0;
  color: var(--subtle);
  font-size: 0.72rem;
}

.all-lot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.all-lot-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.all-lot-card:hover {
  border-color: rgba(29, 78, 216, 0.36);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.088);
  transform: translateY(-3px);
}

.all-lot-image {
  display: grid;
  min-height: 190px;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--subtle);
  font-size: 0.75rem;
  text-decoration: none;
}

.all-lot-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.all-lot-card-content {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.all-lot-card-topline {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.all-lot-number {
  flex: 0 0 auto;
  color: var(--subtle);
  font-size: 0.68rem;
  font-weight: 700;
}

.all-lot-card h3 {
  margin: 17px 0 6px;
  font-size: 1.02rem;
  line-height: 1.18;
}

.all-lot-card h3 a {
  overflow-wrap: anywhere;
  text-decoration: none;
}

.all-lot-card h3 a:hover {
  color: var(--accent-bright);
}

.all-lot-meta,
.all-lot-event {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.all-lot-event {
  margin-top: 7px;
  color: var(--subtle);
}

.all-lot-price-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: auto;
  padding-top: 17px;
}

.all-lot-price-row > div {
  min-width: 0;
}

.all-lot-price-row > div + div {
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.all-lot-price-row span {
  display: block;
  color: var(--subtle);
  font-size: 0.62rem;
  line-height: 1.3;
}

.all-lot-price-row strong {
  display: block;
  margin-top: 3px;
  color: var(--accent-bright);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.all-lot-price-row > div + div strong {
  color: var(--foreground);
}

.all-lot-card .lot-fipe-comparison {
  margin-top: 13px;
}

.all-lot-card .card-link {
  margin-top: 14px;
}

.all-lot-history-meta {
  display: grid;
  gap: 4px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 0.68rem;
  line-height: 1.35;
}

.all-lot-history-details {
  margin-top: 5px;
  color: var(--muted);
}

.all-lot-history-details summary {
  width: fit-content;
  color: var(--foreground);
  cursor: pointer;
  font-weight: 700;
}

.all-lot-history-details summary:hover {
  color: var(--accent-bright);
}

.all-lot-history-details ol {
  display: grid;
  gap: 6px;
  margin: 9px 0 0;
  padding-left: 17px;
}

.all-lot-history-details li {
  display: grid;
  gap: 2px;
  padding-left: 2px;
}

.all-lot-history-details li span {
  color: var(--subtle);
  font-size: 0.66rem;
}

.all-lot-history-details li strong {
  color: var(--foreground);
  font-size: 0.67rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.all-lot-history-more {
  display: block;
  margin-top: 8px;
  color: var(--subtle);
  font-size: 0.64rem;
}

.pagination {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto minmax(100px, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.pagination > :last-child {
  justify-self: end;
}

.pagination > span {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.catalog-updated-at {
  margin: 22px 0 0;
  color: var(--subtle);
  font-size: 0.72rem;
}

.live-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 28px 0 46px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.live-summary > div {
  display: flex;
  min-width: 0;
  min-height: 94px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 15px 18px;
  border-right: 1px solid var(--border);
}

.live-summary > div:last-child {
  border-right: 0;
}

.live-summary strong {
  color: var(--foreground);
  font-size: 1.35rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.live-summary span {
  color: var(--muted);
  font-size: 0.72rem;
}

.live-summary small {
  color: var(--subtle);
  font-size: 0.66rem;
  line-height: 1.35;
}

.live-auction-card {
  border-color: rgba(29, 78, 216, 0.24);
}

.live-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.live-empty .button-primary {
  width: fit-content;
  margin-top: 14px;
}

.directory-lots-section {
  margin-top: 58px;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 0.73rem;
}

.site-footer-inner {
  min-height: 72px;
  gap: 16px;
}

.detail-shell {
  max-width: 1000px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  font-size: 0.83rem;
  text-decoration: none;
}

.detail-header {
  padding: 46px 0 40px;
}

.detail-header h1 {
  max-width: 820px;
  margin: 12px 0;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  line-height: 1;
}

.detail-lead {
  margin-bottom: 0;
  color: var(--muted);
}

.detail-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.8fr);
  align-items: start;
  gap: 16px;
}

.detail-panel {
  padding: 22px;
}

.detail-panel + .detail-panel {
  margin-top: 14px;
}

.detail-sidebar {
  min-width: 0;
}

.count-pill {
  display: grid;
  min-width: 40px;
  min-height: 40px;
  place-items: center;
  border-radius: 10px;
  background: rgba(29, 78, 216, 0.08);
  color: var(--accent-bright);
  font-weight: 800;
}

.catalog-filters {
  margin: 22px 0 4px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
}

.catalog-filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.catalog-filters-header h3 {
  margin: 4px 0 0;
  font-size: 1rem;
}

.catalog-filter-help {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.catalog-filter-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.catalog-filter-refinements {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.catalog-filter-refinement-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.catalog-filter-refinement-group legend {
  margin-bottom: 9px;
  padding: 0;
  color: var(--foreground);
  font-size: 0.8rem;
  font-weight: 800;
}

.catalog-filter-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.catalog-filter-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.catalog-filter-field > span {
  color: var(--subtle);
  font-size: 0.68rem;
  font-weight: 700;
}

.catalog-filter-field input,
.catalog-filter-field select {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--foreground);
  font: inherit;
  font-size: 0.76rem;
}

.catalog-filter-field input::placeholder {
  color: var(--subtle);
  opacity: 1;
}

.catalog-filter-field select {
  cursor: pointer;
}

.catalog-filter-field input:hover,
.catalog-filter-field select:hover {
  border-color: rgba(29, 78, 216, 0.35);
}

.catalog-filter-field input:focus-visible,
.catalog-filter-field select:focus-visible {
  border-color: var(--accent-bright);
  outline: 3px solid rgba(29, 78, 216, 0.14);
  outline-offset: 1px;
}

.catalog-filter-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 0.75rem;
}

.catalog-filter-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.catalog-filter-group legend {
  margin-bottom: 9px;
  padding: 0;
  color: var(--foreground);
  font-size: 0.8rem;
  font-weight: 800;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip,
.catalog-filter-reset {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.74rem;
  line-height: 1.2;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.filter-chip {
  gap: 7px;
  padding: 7px 10px 7px 12px;
}

.filter-chip:hover,
.catalog-filter-reset:hover {
  border-color: rgba(29, 78, 216, 0.42);
  color: var(--foreground);
}

.filter-chip.active {
  border-color: var(--accent);
  background: rgba(29, 78, 216, 0.1);
  color: var(--foreground);
}

.filter-chip:disabled {
  border-style: dashed;
  cursor: not-allowed;
  opacity: 0.42;
}

.filter-chip-count {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--subtle);
  font-size: 0.66rem;
  font-weight: 800;
}

.filter-chip.active .filter-chip-count {
  background: rgba(29, 78, 216, 0.13);
  color: var(--accent-bright);
}

.catalog-filter-reset {
  padding: 7px 13px;
  background: transparent;
}

.catalog-filter-status {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.catalog-filter-status strong {
  color: var(--foreground);
}

.catalog-empty-filter {
  margin-top: 18px;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  text-align: center;
}

.catalog-empty-filter p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

.lot-list {
  display: grid;
  gap: 0;
}

.lot-row {
  display: grid;
  align-items: flex-start;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 20px;
  min-width: 0;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.lot-row-main {
  display: grid;
  width: 100%;
  min-width: 0;
  flex: 1;
  grid-template-columns: minmax(132px, 0.34fr) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.lot-row-main > div:last-child {
  min-width: 0;
}

.lot-row:first-child {
  margin-top: 10px;
}

.lot-row h3 {
  margin: 5px 0 4px;
  font-size: 1.05rem;
}

.lot-row h3 a {
  text-decoration: none;
}

.lot-row h3 a:hover {
  color: var(--accent-bright);
}

.lot-row .muted-copy {
  margin-bottom: 0;
  font-size: 0.76rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.lot-location {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 5px;
  row-gap: 2px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.lot-location-label {
  color: var(--subtle);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lot-location > span:last-child {
  min-width: 0;
}

.detail-location {
  max-width: 820px;
  margin-top: 10px;
  font-size: 0.82rem;
}

.lot-gallery {
  min-width: 0;
}

.lot-gallery-main-wrap {
  position: relative;
}

.lot-gallery-main {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised);
}

.lot-gallery-main img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.lot-gallery-control {
  position: absolute;
  top: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.42);
  color: rgba(248, 250, 252, 0.95);
  font: inherit;
  cursor: pointer;
  opacity: 0.58;
  transform: translateY(-50%);
  transition: background-color 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.lot-gallery-control:hover,
.lot-gallery-control:focus-visible {
  border-color: rgba(248, 250, 252, 0.28);
  background: rgba(2, 6, 23, 0.62);
  opacity: 1;
}

.lot-gallery-control.previous {
  left: 7px;
}

.lot-gallery-control.next {
  right: 7px;
}

.lot-gallery-control span {
  margin-top: -3px;
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1;
}

.lot-gallery-count {
  position: absolute;
  bottom: 7px;
  left: 50%;
  min-width: 42px;
  padding: 3px 7px;
  border: 1px solid rgba(248, 250, 252, 0.2);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  color: #f8fafc;
  font-size: 0.62rem;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(3px);
}

.lot-gallery-thumbnails {
  display: flex;
  max-width: 100%;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 1px 2px;
  scrollbar-color: var(--border) transparent;
}

.lot-gallery-thumbnail {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.lot-gallery-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
}

.lot-gallery-thumbnail:hover,
.lot-gallery-thumbnail.active {
  border-color: var(--accent-bright);
}

.lot-gallery-placeholder {
  display: grid;
  min-height: 100px;
  place-items: center;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--subtle);
  font-size: 0.7rem;
  text-align: center;
}

.lot-price {
  min-width: 0;
  flex-shrink: 0;
  text-align: right;
}

.lot-price-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-self: start;
}

.lot-fipe-comparison {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  margin-top: -2px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-strong);
}

.lot-fipe-comparison-item {
  min-width: 0;
}

.lot-fipe-comparison-label {
  display: block;
  color: var(--subtle);
  font-size: 0.62rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.lot-fipe-comparison-value {
  display: block;
  margin-top: 3px;
  color: var(--accent-bright);
  font-size: 0.88rem;
}

.lot-fipe-comparison-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.lot-comparison-info {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.lot-comparison-info-trigger {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.lot-comparison-info-trigger > span {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.lot-comparison-info-trigger:hover,
.lot-comparison-info-trigger:focus-visible {
  border-color: rgba(29, 78, 216, 0.45);
  background: rgba(29, 78, 216, 0.09);
  color: var(--foreground);
  outline: none;
}

.lot-comparison-tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: grid;
  width: min(286px, calc(100vw - 32px));
  gap: 5px;
  padding: 11px 13px;
  border: 1px solid rgba(29, 78, 216, 0.24);
  border-radius: 9px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-raised);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.lot-comparison-tooltip strong {
  color: var(--foreground);
  font-size: 0.78rem;
}

.lot-price-grid .fipe-price {
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.lot-price-grid .fipe-price strong {
  color: var(--foreground);
}

.lot-price span,
.price-line span {
  display: block;
  color: var(--subtle);
  font-size: 0.7rem;
}

.lot-price strong {
  display: block;
  margin-top: 3px;
  color: var(--accent-bright);
  font-size: 0.95rem;
}

.lot-expenses {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--border-strong);
  text-align: right;
}

.lot-expenses-label {
  color: var(--subtle);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lot-expenses-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
  list-style: none;
}

.lot-expenses-list li {
  overflow-wrap: anywhere;
}

.schedule-list,
.facts-list {
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.schedule-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

.schedule-marker {
  margin-top: 6px;
}

.schedule-marker.active {
  background: var(--accent-bright);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.08);
}

.source-panel .button-quiet,
.full-width {
  width: 100%;
  margin-top: 14px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.image-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: var(--surface-raised);
  object-fit: cover;
}

.image-placeholder {
  display: grid;
  min-height: 220px;
  margin-bottom: 16px;
  padding: 24px;
  place-items: center;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.detail-description p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.price-panel {
  background: linear-gradient(160deg, var(--accent-soft), var(--surface) 62%);
}

.price-line {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 0 0;
}

.price-line strong {
  color: var(--accent-bright);
  font-size: 1.35rem;
}

.price-line.secondary {
  padding-top: 12px;
}

.price-line.secondary strong {
  color: var(--foreground);
  font-size: 0.95rem;
}

.facts-list {
  display: grid;
  gap: 12px;
}

.facts-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.facts-list dt {
  color: var(--subtle);
  font-size: 0.75rem;
}

.facts-list dd {
  margin: 0;
  color: var(--foreground);
  font-size: 0.8rem;
  text-align: right;
}

.bid-history-help {
  margin: 13px 0 0;
  font-size: 0.74rem;
}

.bid-history-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  margin: 18px 0 0;
  padding: 0 4px 0 0;
  overflow-y: auto;
  list-style: none;
}

.bid-history-list li {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-muted);
}

.bid-history-main,
.bid-history-bidder {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.bid-history-main strong {
  color: var(--accent-bright);
  font-size: 0.9rem;
}

.bid-history-main span,
.bid-history-bidder span {
  color: var(--subtle);
  font-size: 0.68rem;
}

.bid-history-bidder strong {
  min-width: 0;
  color: var(--foreground);
  font-size: 0.73rem;
  font-weight: 650;
  overflow-wrap: anywhere;
  text-align: right;
}

@media (max-width: 900px) {
  .auction-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .all-lot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-toolbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .directory-summary {
    white-space: normal;
  }

  .lot-filter-select-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auction-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .detail-panel + .detail-panel {
    margin-top: 0;
  }

  .lot-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-filter-refinements {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header-inner,
  .site-footer-inner,
  .site-main {
    width: min(100% - 28px, 1120px);
  }

  /* Marca numa linha e navegação inteira na linha de baixo, sem quebrar em duas linhas. */
  .site-header-inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    min-height: 0;
    padding: 6px 0 4px;
  }

  .site-nav {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 2px;
    width: 100%;
    font-size: 0.78rem;
  }

  .site-nav a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 0 4px;
    white-space: nowrap;
  }

  .site-main {
    padding-top: 46px;
    padding-bottom: 64px;
  }

  .hero-block {
    padding-top: 16px;
    padding-bottom: 40px;
  }

  .hero-block h1 {
    font-size: clamp(2.45rem, 14vw, 4rem);
  }

  .refresh-status {
    margin: -40px 0 38px;
    font-size: 0.68rem;
  }

  .directory-header {
    display: block;
    padding-top: 16px;
  }

  .directory-header h1 {
    font-size: clamp(2.35rem, 13vw, 3.8rem);
  }

  .directory-header .refresh-status {
    margin: 22px 0 0;
  }

  .directory-toolbar {
    margin-top: 22px;
    padding: 16px;
  }

  .history-filter-panel {
    margin-top: 22px;
    padding: 16px;
  }

  .history-filter-header {
    align-items: stretch;
    flex-direction: column;
  }

  .history-filter-header .catalog-filter-reset {
    width: 100%;
  }

  .lot-directory-filters {
    margin-top: -4px;
    padding: 16px;
  }

  .lot-directory-filters-header {
    align-items: stretch;
    flex-direction: column;
  }

  .lot-directory-filters-header .catalog-filter-reset {
    width: 100%;
  }

  .lot-filter-select-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-filter-grid,
  .history-range-grid,
  .history-range-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .catalog-search-row input {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .catalog-search-row .button-quiet,
  .catalog-search-row .button-primary {
    width: 100%;
  }

  .all-lot-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .all-lot-image {
    min-height: 0;
  }

  .live-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-summary > div:nth-child(2) {
    border-right: 0;
  }

  .live-summary > div:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
    border-right: 0;
  }

  .pagination {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
  }

  .pagination .button-quiet {
    width: 100%;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .directory-lots-section {
    margin-top: 42px;
  }

  .metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 58px;
  }

  .metric-item {
    min-height: 96px;
    padding: 15px;
  }

  .metric-item:nth-child(2) {
    border-right: 0;
  }

  .metric-item-wide {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
  }

  .section-heading {
    display: block;
  }

  .section-note {
    margin-top: 10px;
    text-align: left;
  }

  .auction-filters-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .auction-filters-heading .catalog-filter-reset {
    width: 100%;
  }

  .auction-filters {
    padding: 18px;
  }

  .auction-filter-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .auction-filter-date-field {
    padding-top: 14px;
    padding-left: 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .auction-grid,
  .detail-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .auction-card {
    min-height: 250px;
  }

  .lot-row {
    align-items: flex-start;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .lot-row-main {
    width: 100%;
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .lot-price {
    text-align: left;
  }

  .lot-expenses {
    text-align: left;
  }

  .lot-price-grid {
    width: 100%;
    min-width: 0;
  }

  .lot-price-grid .fipe-price {
    padding-left: 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .catalog-filters-header {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-filter-reset {
    width: 100%;
  }

  .catalog-filter-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-filter-refinements {
    grid-template-columns: minmax(0, 1fr);
  }

  .image-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------------------
   Catálogo (Explore): cabeçalho compacto, proveniência, controles e cartões.
   --------------------------------------------------------------------------- */

.eyebrow,
.section-kicker {
  color: var(--accent);
}

.site-header {
  border-bottom-color: var(--border);
}

.all-lot-card,
.auction-card,
.detail-panel,
.empty-state {
  box-shadow: var(--shadow);
}

.all-lot-price-row strong {
  color: var(--foreground);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.lot-fipe-comparison-value {
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
}

.directory-header-compact {
  padding: 8px 0 20px;
}

.directory-header-compact h1 {
  margin: 8px 0 8px;
  font-size: clamp(1.75rem, 3.4vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.directory-header-compact .hero-copy {
  font-size: 0.95rem;
}

.directory-header-compact .refresh-status {
  max-width: 300px;
  white-space: normal;
  text-align: right;
}

/* Proveniência e frescor */
.provenance-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 12px 24px;
  margin: 20px 0 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.provenance-summary h2 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

.provenance-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.provenance-summary .provenance-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(180, 83, 9, 0.28);
  border-radius: 8px;
  background: var(--warning-soft);
  color: #7c2d12;
  font-weight: 600;
}

.provenance-warning > span[aria-hidden] {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--warning);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
}

.provenance-sources {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  align-content: start;
}

.provenance-source {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-muted);
  font-size: 0.8rem;
}

.provenance-source-name {
  min-width: 0;
  overflow: hidden;
  color: var(--foreground);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provenance-source-name a {
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}

.provenance-source-name a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.provenance-source-age {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.provenance-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--subtle);
}

.provenance-recent .provenance-dot { background: var(--success); }
.provenance-aging .provenance-dot { background: var(--warning); }
.provenance-stale .provenance-dot { background: var(--danger); }
.provenance-source.provenance-stale .provenance-source-age { color: var(--danger); font-weight: 650; }

.provenance-footnote {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 0.72rem;
}

/* Controles: busca + filtros num único painel */
.catalog-controls {
  margin: 0 0 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.catalog-controls .lot-directory-filters {
  margin: 16px 0 0;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.catalog-controls .lot-directory-filters-header {
  align-items: center;
}

.catalog-controls .lot-directory-filters-header h2 {
  margin: 0;
  margin-right: auto;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
}

.catalog-controls .lot-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
}

.catalog-controls .lot-filter-group legend {
  float: left;
  margin-right: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.catalog-controls .lot-filter-select-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.catalog-controls .lot-filter-select-grid label {
  color: var(--muted);
  font-weight: 700;
}

.catalog-controls .lot-filter-status {
  margin-top: 10px;
}

.lot-filter-toggle {
  display: none;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--foreground);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.lot-filter-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.68rem;
}

.catalog-search-row input::placeholder {
  color: var(--subtle);
}

.catalog-search-row input:hover,
.catalog-controls select:hover {
  border-color: var(--border-strong);
}

/* Barra de resultados */
.results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin: 18px 0 14px;
}

.results-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.results-bar strong {
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
}

.results-bar .results-bar-note {
  color: var(--subtle);
  font-size: 0.74rem;
}

/* Cartão de lote: fase do evento, fonte e idade da coleta */
.all-lot-image {
  position: relative;
  min-height: 0;
  aspect-ratio: 4 / 3;
}

.all-lot-image img {
  height: 100%;
}

.catalog-controls select {
  font-weight: 500;
}

.results-hint {
  margin: -4px 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
}

.results-hint a {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 3px;
}

.lot-phase-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
  color: var(--foreground);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.lot-phase-today {
  background: var(--accent);
  color: var(--accent-ink);
}

.lot-phase-past,
.lot-phase-unknown {
  background: rgba(241, 243, 246, 0.95);
  color: var(--muted);
}

.all-lot-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.all-lot-card .all-lot-footer .card-link {
  min-height: 44px;
  margin-top: 0;
  color: var(--accent);
}

.all-lot-source-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 5px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}

.all-lot-source-link:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.all-lot-collected {
  margin: 4px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.all-lot-collected.provenance-stale time {
  color: var(--danger);
}

.all-lot-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-raised);
}

.source-stale-notice {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 12px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 0.8rem;
  line-height: 1.4;
}

.source-stale-notice > span[aria-hidden="true"] {
  display: inline-grid;
  flex: none;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--warning);
  color: var(--accent-ink);
  font-size: 0.7rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .provenance-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-controls .lot-filter-select-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .directory-header-compact {
    padding-top: 0;
  }

  .directory-header-compact .refresh-status {
    max-width: none;
    margin-top: 12px;
    text-align: left;
  }

  .provenance-strip,
  .catalog-controls {
    padding: 14px;
  }

  .catalog-controls .lot-directory-filters-header {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .catalog-controls .lot-directory-filters-header .catalog-filter-reset {
    width: auto;
  }

  .lot-filter-toggle {
    display: inline-flex;
  }

  .lot-directory-filters[data-open="false"] .lot-filter-panel {
    display: none;
  }

  .catalog-controls .lot-filter-select-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-controls .lot-filter-group legend {
    float: none;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .all-lot-card:hover,
  .auction-card:hover,
  .button-primary:hover {
    transform: none;
  }
}
