:root {
  color-scheme: light;
  --ink: #18201d;
  --muted: #64706b;
  --line: #d9dfdc;
  --line-strong: #b8c2bd;
  --panel: #ffffff;
  --soft: #f3f6f4;
  --accent: #006b52;
  --accent-dark: #004d3b;
  --signal: #d99b19;
  --danger: #a13a35;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f7f8f7;
  color: var(--ink);
  letter-spacing: 0;
}

button, input, select { font: inherit; letter-spacing: 0; }

button, select, input {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
}

button {
  padding: 0 15px;
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button:hover { background: var(--accent-dark); }
button.secondary { background: white; color: var(--accent); }
[hidden] { display: none !important; }

.site-header {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 max(20px, calc((100vw - 1440px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.account-toggle { margin-left: auto; display: grid; justify-items: end; align-content: center; min-width: 112px; padding: 5px 12px; line-height: 1.1; }
.account-toggle-main { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-toggle-sub { max-width: 220px; margin-top: 3px; overflow: hidden; color: #dcebe7; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.account-backdrop { position: fixed; z-index: 80; inset: 0; background: rgb(24 32 29 / 42%); }
.account-panel { position: fixed; z-index: 90; top: 0; right: 0; width: min(440px, 100vw); height: 100dvh; overflow-y: auto; padding: 22px; border-left: 1px solid var(--line); background: var(--panel); box-shadow: -12px 0 36px rgb(24 32 29 / 14%); transform: translateX(105%); transition: transform 180ms ease; }
.account-panel.open { transform: translateX(0); }
.account-panel-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.account-panel-head h2 { margin: 2px 0 0; font-size: 23px; }
.account-close { min-height: 36px; }
.account-state { padding: 22px 0; border-bottom: 1px solid var(--line); }
.account-state h3 { margin: 0 0 7px; }
.account-state p { color: var(--muted); font-size: 14px; line-height: 1.55; }
.google-login { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 16px; border: 1px solid var(--line-strong); border-radius: 6px; background: white; color: var(--ink); font-weight: 750; text-decoration: none; }
.google-login:hover { border-color: var(--accent); }
.account-legal { font-size: 11px !important; }
.account-legal a { color: var(--accent-dark); }
.account-identity { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.account-identity img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.account-identity div { display: grid; gap: 3px; min-width: 0; }
.account-identity span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; }
.account-admin-link { display: flex; align-items: center; justify-content: center; min-height: 40px; margin-bottom: 9px; border: 1px solid var(--accent); border-radius: 6px; color: var(--accent-dark); font-size: 13px; font-weight: 750; text-decoration: none; }
.account-feature-grid { display: grid; gap: 12px; padding-top: 22px; }
.account-feature-card { padding: 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }
.account-feature-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-feature-card h3 { margin: 0; font-size: 15px; }
.account-feature-card > div:first-child > span { padding: 3px 7px; border-radius: 999px; background: var(--panel); color: var(--muted); font-size: 10px; font-weight: 800; }
.feature-caption { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.saved-list { display: grid; gap: 8px; margin-top: 10px; }
.saved-list > p { margin: 0; color: var(--muted); font-size: 12px; }
.saved-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding-top: 9px; border-top: 1px solid var(--line); }
.saved-row a, .saved-row strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; text-decoration: none; white-space: nowrap; }
.saved-row-actions { display: flex; gap: 5px; }
.saved-row button { min-height: 30px; padding: 0 8px; font-size: 10px; }
.saved-search-row { grid-template-columns: 1fr; align-items: start; gap: 7px; }
.saved-search-row .saved-search-label { overflow-wrap: anywhere; white-space: normal; }
.saved-search-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.saved-search-filter { padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); font-size: 11px; line-height: 1.2; overflow-wrap: anywhere; }
.saved-search-row .saved-row-actions { flex-wrap: wrap; }
.auth-message { min-height: 20px; padding-top: 14px; color: var(--danger); font-size: 13px; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--muted); font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.auth-tab { min-height: 34px; padding: 0 5px; border-color: var(--line); background: var(--soft); color: var(--muted); font-size: 11px; }
.auth-tab.active { border-color: var(--accent); background: white; color: var(--accent-dark); }
.auth-form { display: grid; gap: 11px; margin-top: 14px; }
.auth-form[hidden] { display: none; }
.auth-form label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.auth-form input { width: 100%; padding: 0 10px; }
.auth-form p { margin: 0; font-size: 11px; }
.auth-link-button { min-height: 32px; padding: 0; border: 0; background: transparent; color: var(--accent-dark); font-size: 12px; }
.auth-link-button:hover { background: transparent; text-decoration: underline; }
body.account-open { overflow: hidden; }

.brand {
  color: var(--ink);
  font-size: 23px;
  font-weight: 800;
  text-decoration: none;
}

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

main { max-width: 1440px; margin: 0 auto; }

.search-band {
  padding: 25px 20px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.heading-row {
  margin-bottom: 18px;
}

.heading-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: 27px; line-height: 1.2; }
.result-count {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  white-space: nowrap;
}
.search-intro { max-width: 760px; margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.search-controls {
  display: grid;
  grid-template-columns: minmax(250px, 2fr) repeat(4, minmax(145px, 1fr)) auto auto auto auto;
  align-items: end;
  gap: 10px;
}
.save-search-status { min-height: 22px; padding-top: 8px; color: var(--muted); font-size: 12px; }

.search-controls label { display: grid; gap: 5px; min-width: 0; }
.search-controls label > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.search-controls input, .search-controls select { width: 100%; padding: 0 10px; }
.ended-toggle { display: flex !important; align-items: center; gap: 7px !important; min-height: 40px; white-space: nowrap; }
.ended-toggle input { width: 18px; min-height: 18px; accent-color: var(--accent); }
.ended-toggle span { color: var(--ink) !important; }

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  min-height: calc(100vh - 220px);
}

.content-layout > section { padding: 18px 20px 40px; }
.status { min-height: 24px; color: var(--muted); font-size: 13px; }

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

.auction-card-wrap { position: relative; min-width: 0; }
.auction-card {
  display: grid;
  grid-template-rows: 150px 1fr;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}
.save-heart { position: absolute; z-index: 2; top: 9px; right: 9px; display: grid; place-items: center; width: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / 8%); color: var(--ink); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.save-heart:hover { background: rgb(255 255 255 / 14%); color: var(--accent); }
.save-heart svg { width: 22px; height: 22px; fill: transparent; stroke: currentColor; stroke-width: 1.8; }
.save-heart.saved { background: rgb(255 255 255 / 8%); color: var(--accent); }
.save-heart.saved svg { fill: currentColor; }
.detail-save-heart { position: static; float: right; margin: 0 0 10px 12px; }

.auction-card:hover, .auction-card.selected { border-color: var(--accent); }
.auction-card img { width: 100%; height: 150px; object-fit: cover; background: var(--soft); }
.image-placeholder { display: grid; place-items: center; height: 150px; background: var(--soft); color: var(--muted); font-size: 13px; }
.card-body { display: grid; align-content: start; gap: 7px; min-width: 0; padding: 12px; }
.card-source { display: grid; gap: 2px; color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.source-auction-house { color: var(--ink); font-size: 10px; font-weight: 650; text-transform: none; }
.card-title { min-height: 42px; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.card-price { color: var(--ink); font-weight: 800; text-align: right; }

.detail-panel {
  position: sticky;
  top: 0;
  min-height: calc(100vh - 62px);
  padding: 20px;
  border-left: 1px solid var(--line);
  background: var(--panel);
}

.detail-panel img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 6px; background: var(--soft); }
.detail-panel h2 { margin: 16px 0 8px; font-size: 20px; overflow-wrap: anywhere; }
.detail-panel p { color: var(--muted); line-height: 1.5; }
.detail-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.detail-facts div { border-top: 1px solid var(--line); padding-top: 8px; }
.detail-facts span { display: block; color: var(--muted); font-size: 11px; }
.detail-facts strong { display: block; margin-top: 3px; font-size: 13px; overflow-wrap: anywhere; }
.detail-facts a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.source-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 6px; background: var(--accent); color: white; font-weight: 750; text-decoration: none; }
.detail-empty { color: var(--muted); }
.load-more { display: block; margin: 20px auto 0; }
.error { color: var(--danger); }

.save-login-backdrop { position: fixed; z-index: 100; inset: 0; background: rgb(40 45 43 / 68%); backdrop-filter: grayscale(1); }
.save-login-modal { position: fixed; z-index: 110; top: 50%; left: 50%; width: min(420px, calc(100vw - 28px)); padding: 26px; border: 1px solid var(--line-strong); border-radius: 8px; background: #f1f2f1; box-shadow: 0 24px 70px rgb(0 0 0 / 28%); transform: translate(-50%, -50%); }
.save-login-modal h2 { margin: 5px 0 8px; font-size: 22px; }
.save-login-modal > p:not(.eyebrow) { margin: 0; color: var(--muted); line-height: 1.55; }
.save-login-close { position: absolute; top: 9px; right: 9px; min-height: 34px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); font-size: 24px; }
.save-login-close:hover { background: transparent; color: var(--ink); }
.save-login-actions { display: flex; gap: 9px; margin-top: 20px; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 15px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: white; font-weight: 700; text-decoration: none; }
.button-link.secondary { background: white; color: var(--accent); }

.auction-detail-page { max-width: 1120px; padding: 24px 20px 60px; }
.back-link { display: inline-block; margin-bottom: 18px; color: var(--accent); font-weight: 750; text-decoration: none; }
.back-link::before { content: "← "; }
.auction-detail-article { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 28px; align-items: start; }
.detail-media { min-height: 320px; background: var(--soft); }
.detail-hero-image { display: block; width: 100%; max-height: 620px; object-fit: contain; background: var(--soft); }
.detail-hero-placeholder { display: grid; place-items: center; min-height: 320px; color: var(--muted); }
.detail-content h1 { margin: 6px 0 12px; font-size: 30px; line-height: 1.2; overflow-wrap: anywhere; }
.detail-description { color: var(--muted); line-height: 1.55; }
.source-trust-note { margin-top: 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.freshness-note {
  margin: 18px 0;
  padding: 13px 15px;
  border-left: 3px solid var(--signal);
  background: #fff9eb;
}
.freshness-note strong { display: block; font-size: 13px; }
.freshness-note p { margin: 4px 0 0; color: #575044; font-size: 12px; line-height: 1.55; }

.landing-page, .docs-page { max-width: 1180px; padding: 28px 20px 60px; }
.landing-description, .docs-page p { max-width: 760px; color: var(--muted); line-height: 1.6; }
.landing-page > .result-count { display: block; margin: 18px 0 12px; }
.pagination-link { display: inline-flex; margin-top: 22px; color: var(--accent); font-weight: 750; }
.docs-page section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.docs-page h2 { font-size: 19px; }
.docs-page code { overflow-wrap: anywhere; }
.docs-page pre { max-width: 760px; overflow: auto; padding: 14px; border: 1px solid var(--line); background: var(--soft); }

.discovery-directory { padding: 28px 20px 44px; border-top: 1px solid var(--line); background: var(--panel); }
.discovery-directory h2 { margin: 0 0 18px; font-size: 20px; }
.discovery-directory h3 { margin: 20px 0 10px; font-size: 14px; }
.discovery-link-list { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.discovery-link-list a { color: var(--accent-dark); font-size: 13px; font-weight: 700; text-decoration: none; }
.discovery-link-list a:hover { text-decoration: underline; }
.discovery-link-list span { color: var(--muted); font-weight: 500; }

.site-footer {
  border-top: 1px solid var(--line-strong);
  background: #edf1ef;
}
.site-footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, auto);
  align-items: start;
  gap: 36px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 20px 32px;
}
.site-footer-summary strong { font-size: 15px; }
.site-footer-summary p { max-width: 440px; margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.site-footer-links { display: grid; gap: 8px; }
.site-footer a { color: var(--accent-dark); font-size: 13px; font-weight: 700; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer-contact { display: grid; gap: 7px; }
.site-footer-contact span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }

.info-page { max-width: 900px; padding: 28px 20px 70px; }
.info-page article { max-width: 760px; }
.info-page h1 { margin-bottom: 14px; font-size: 30px; }
.info-page h2 { margin: 0 0 8px; font-size: 19px; }
.info-page section { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.info-page p { color: var(--muted); line-height: 1.65; }
.info-page p strong { color: var(--ink); }
.info-page a { color: var(--accent-dark); font-weight: 700; }
.info-lead { margin: 0; color: var(--ink) !important; font-size: 17px; }
.policy-updated { margin-top: 30px; font-size: 13px; }
.info-page code { padding: 1px 4px; background: var(--soft); color: var(--ink); }

.admin-home-link { margin-left: auto; color: var(--accent-dark); font-size: 13px; font-weight: 750; text-decoration: none; }
.admin-page { max-width: 1440px; padding: 28px 20px 70px; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.admin-generated { margin: 0; color: var(--muted); font-size: 12px; }
.admin-page > section { margin-top: 30px; }
.admin-section-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.admin-section-heading h2 { margin: 0; font-size: 20px; }
.admin-section-heading p { max-width: 760px; margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.admin-stat-card { padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.admin-stat-card strong { display: block; color: var(--accent-dark); font-size: 27px; }
.admin-stat-card span { display: block; margin-top: 3px; font-size: 13px; font-weight: 750; }
.admin-stat-card p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.admin-table-wrap table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table-wrap th, .admin-table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.admin-table-wrap th { background: var(--soft); color: var(--muted); font-size: 10px; text-transform: uppercase; }
.admin-table-wrap tbody tr:last-child td { border-bottom: 0; }
.admin-note { color: var(--muted); font-size: 11px; }
.admin-two-column { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.admin-two-column h3 { margin: 0 0 10px; font-size: 14px; }
.admin-route-list { display: grid; gap: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.admin-route-row { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(100px, 2fr) auto; align-items: center; gap: 9px; font-size: 11px; }
.admin-route-row progress { width: 100%; height: 10px; accent-color: var(--accent); }

@media (max-width: 1120px) {
  .search-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search-field { grid-column: span 2; }
  .auction-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .site-header { padding: 0 14px; }
  .account-toggle { min-width: 96px; }
  .account-toggle-main, .account-toggle-sub { max-width: 150px; }
  .account-panel { padding: 18px 16px; }
  .search-band { padding: 18px 14px 14px; }
  h1 { font-size: 22px; }
  .search-controls { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .content-layout { display: block; }
  .content-layout > section { padding: 14px; }
  .auction-grid { grid-template-columns: 1fr; }
  .detail-panel { display: none; }
  .auction-detail-page { padding: 18px 14px 40px; }
  .auction-detail-article { grid-template-columns: 1fr; gap: 18px; }
  .detail-media, .detail-hero-placeholder { min-height: 220px; }
  .detail-content h1 { font-size: 24px; }
  .discovery-directory { padding: 24px 14px 36px; }
  .site-footer-inner { grid-template-columns: 1fr; gap: 22px; padding: 24px 14px 28px; }
  .info-page { padding: 20px 14px 48px; }
  .info-page h1 { font-size: 25px; }
  .admin-page { padding: 20px 14px 48px; }
  .admin-heading { align-items: start; }
  .admin-stat-grid { grid-template-columns: 1fr 1fr; }
  .admin-two-column { grid-template-columns: 1fr; }
}
