/* ── Kith Market — the Item Vault storefront's page styles ──
   Register redesign 2026-07-16: layered on css/kith-base.css, which redefines
   the old site.css token names in Kith values (nightfall panels, mist/rain
   text, Archivo everywhere — no monospace). The accent is lamplight. The
   "Kith register" section at the very END of this file de-consoles the
   survivors — it must stay last. */

.market-page {
  --accent: var(--lamplight);
  --mma: var(--lamplight);
  --accent-soft: rgba(216, 184, 117, .14);
  --accent-line: rgba(216, 184, 117, .42);
  --mk-radius: 3px;
  --mk-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

/* ── app shell ── */
.mk-shell {
  position: relative; z-index: 2;
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 clamp(12px, 2vw, 28px) 70px;
  font-size: 16px;
}

.mk-shell button, .mk-shell input, .mk-shell select, .mk-shell textarea { font: inherit; }
.mk-shell button { color: inherit; }
.mk-shell button:focus-visible, .mk-shell a:focus-visible, .mk-shell input:focus-visible,
.mk-shell select:focus-visible, .mk-shell textarea:focus-visible,
.modal-root button:focus-visible, .modal-root input:focus-visible,
.modal-root select:focus-visible, .modal-root textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(216, 184, 117, .25), 0 0 0 1px var(--accent) inset;
}

.mode-tabs {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px;
  width: fit-content; max-width: 100%;
  margin: 0 auto 18px; padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--mk-radius);
  background: rgba(12, 31, 40, .78);
}

.mode-tab, .segmented button, .wide-button, .accent-button, .text-button, .tiny-button {
  min-height: 42px;
  border: 1px solid var(--line-bright);
  border-radius: var(--mk-radius);
  background: linear-gradient(180deg, rgba(16, 36, 46, .96), rgba(12, 31, 40, .96));
  color: var(--ice);
  cursor: pointer;
  font-family: var(--font-display); font-weight: 600;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.mk-shell button:hover:not(:disabled), .modal-root button:hover:not(:disabled) {
  transform: translateY(-1px); border-color: var(--accent);
}
.mk-shell button:disabled { opacity: .55; cursor: default; }

.mode-tab { min-width: 118px; padding: 8px 14px; font-weight: 700; }
.mode-tab.is-active, .segmented button.is-active {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(216, 184, 117, .2), rgba(216, 184, 117, .08));
  color: #fff;
  box-shadow: 0 0 18px rgba(216, 184, 117, .22);
}

.accent-button {
  padding: 0 16px;
  border-color: var(--accent-line);
  background: linear-gradient(180deg, rgba(216, 184, 117, .24), rgba(216, 184, 117, .1));
  font-weight: 700;
}
.tiny-button { min-height: 34px; padding: 0 12px; font-size: 13px; }
.text-button { min-height: 34px; padding: 0 12px; background: rgba(16, 36, 46, .36); }
.wide-button { width: 100%; margin-top: 14px; font-weight: 700; }
.wide-button.ghost { background: rgba(16, 36, 46, .36); }

/* ── workspace grid (responsive; prototype was fixed 1180px+) ── */
.workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}
.hidden { display: none !important; }

.filter-panel, .catalog-panel, .detail-rail .panel {
  border: 1px solid rgba(220, 232, 228, .14);
  border-radius: var(--mk-radius);
  background: linear-gradient(180deg, rgba(12, 31, 40, .9), rgba(6, 15, 20, .92));
  box-shadow: var(--mk-shadow);
}

.filter-panel { padding: 14px; }
details.mk-filters { display: block; }
details.mk-filters > summary {
  list-style: none; cursor: pointer;
  display: none;
  align-items: center; justify-content: space-between;
  font-weight: 700; color: var(--cream);
  padding: 4px 2px;
}
details.mk-filters > summary::-webkit-details-marker { display: none; }
details.mk-filters > summary .caret { color: var(--accent); transition: transform .18s; }
details.mk-filters[open] > summary .caret { transform: rotate(180deg); }

.catalog-panel { padding: 14px; min-width: 0; }
.detail-rail { display: grid; gap: 16px; min-width: 0; }
.panel { padding: 14px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.panel-heading.tight { margin-bottom: 8px; }

@media (min-width: 961px) {
  .filter-panel { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; overscroll-behavior: contain; }
  .detail-rail { position: sticky; top: 92px; }
}
@media (max-width: 1280px) {
  .workspace { grid-template-columns: 250px minmax(0, 1fr); }
  .detail-rail { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 960px) {
  .workspace { grid-template-columns: 1fr; }
  .detail-rail { grid-template-columns: 1fr; position: static; }
  details.mk-filters > summary { display: flex; }
  .mode-tab { min-width: 0; flex: 1; }
}

/* ── typography inside the app ── */
.mk-shell .eyebrow, .modal-root .eyebrow {
  margin: 0 0 5px; color: var(--accent);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
}
.mk-shell h1, .mk-shell h2, .mk-shell h3, .mk-shell p,
.modal-root h2, .modal-root h3, .modal-root p { margin-top: 0; }
.mk-shell h1 { margin-bottom: 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.05; font-weight: 700; }
.mk-shell h2, .modal-root h2 { margin-bottom: 0; font-size: 21px; line-height: 1.1; }
.mk-shell h3, .modal-root h3 { margin-bottom: 6px; font-size: 17px; line-height: 1.15; }
.mk-shell .muted, .modal-root .muted { color: var(--dim); margin-bottom: 0; }

.field-label, .filter-title { display: block; margin: 14px 0 8px; color: var(--cream); font-weight: 700; }

/* ── inputs ── */
.searchbox {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line-bright);
  border-radius: var(--mk-radius);
  background: rgba(6, 15, 20, .72);
}
.searchbox span { color: var(--accent); font-family: var(--font-mono); }
.searchbox input, .price-row input, .mk-shell select,
.modal-field input, .modal-field textarea, .modal-root select {
  width: 100%; border: 0; background: transparent; color: var(--ice);
}
.searchbox input::placeholder, .price-row input::placeholder,
.modal-field input::placeholder, .modal-field textarea::placeholder { color: var(--dim-2); }
.compact-search { min-height: 38px; margin-bottom: 8px; }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0; }
.segmented button { min-height: 38px; padding: 0 8px; font-weight: 700; }

.mk-shell select, .modal-root select {
  min-height: 42px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--mk-radius);
  background: var(--panel);
}
.filter-block { padding-top: 4px; }

.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.price-row label, .modal-field {
  display: grid; gap: 6px; padding: 10px;
  border: 1px solid var(--line); border-radius: var(--mk-radius);
  background: rgba(6, 15, 20, .55);
}
.price-row span, .modal-field > span {
  color: var(--dim); font-family: var(--font-mono);
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
}
.modal-field { margin-top: 10px; }
.modal-field textarea { min-height: 74px; resize: vertical; }

/* ── category / type lists ── */
.category-list { display: grid; gap: 8px; }
.category-button {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 40px; width: 100%; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--mk-radius);
  background: rgba(16, 36, 46, .58); color: var(--ice);
  cursor: pointer; text-align: left; gap: 8px;
}
.category-button.is-active { border-color: var(--accent); background: var(--accent-soft); }
.category-button span:first-child { display: flex; align-items: center; gap: 8px; min-width: 0; }
.category-count { color: var(--dim); font-family: var(--font-mono); font-size: 12px; }

.cat-chip {
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 24px;
  border: 1px solid var(--accent-line); border-radius: 6px;
  color: var(--accent); font-family: var(--font-mono); font-size: 11px;
}

.type-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 26px; margin-bottom: 8px;
  color: var(--dim); font-family: var(--font-mono); font-size: 12px;
}
.type-list { display: grid; gap: 6px; max-height: 320px; overflow-y: auto; padding-right: 4px; }
.type-button {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center;
  min-height: 34px; width: 100%; padding: 5px 8px;
  border: 1px solid rgba(20, 48, 57, .95); border-radius: var(--mk-radius);
  background: rgba(6, 15, 20, .34); color: var(--ice); cursor: pointer; text-align: left;
}
.type-button.is-active { border-color: var(--accent); background: var(--accent-soft); }
.type-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-count { color: var(--dim); font-family: var(--font-mono); font-size: 12px; }

/* ── banner + stats ── */
.market-banner {
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 16px;
  border: 1px solid var(--accent-line); border-radius: var(--mk-radius);
  background:
    linear-gradient(135deg, rgba(216, 184, 117, .12), transparent 32%),
    linear-gradient(180deg, rgba(16, 36, 46, .86), rgba(6, 15, 20, .86));
}
.market-stats { display: grid; grid-template-columns: repeat(3, minmax(84px, 96px)); gap: 10px; }
.market-stats div {
  display: grid; align-content: center; min-height: 68px; padding: 8px 10px;
  border: 1px solid rgba(220, 232, 228, .14); border-radius: var(--mk-radius);
  background: rgba(6, 15, 20, .48);
}
.market-stats strong { color: var(--cream); font-family: var(--font-mono); font-size: 20px; }
.market-stats span { color: var(--dim); font-size: 13px; }

.catalog-toolbar {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  margin: 14px 0 12px;
}
.catalog-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.view-toggle { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--mk-radius); background: rgba(12, 31, 40, .7); }
.view-toggle button { min-height: 34px; padding: 0 12px; border: 1px solid transparent; }
.view-toggle button.is-active { border-color: var(--accent); background: var(--accent-soft); }
.catalog-actions .accent-button { min-height: 42px; }

/* ── demand radar strip ── */
.radar-strip { margin: 14px 0 0; }
.radar-strip-card {
  display: grid; grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 16px; align-items: center; padding: 12px 14px;
  border: 1px solid rgba(145, 176, 158, .38); border-radius: var(--mk-radius);
  background: linear-gradient(90deg, rgba(145, 176, 158, .1), rgba(216, 184, 117, .07)), rgba(6, 15, 20, .72);
}
.radar-copy h2 { font-size: 18px; }
.radar-actions { display: grid; gap: 8px; }
.radar-scope {
  position: relative; width: 76px; height: 76px; margin: 0 auto;
  border: 1px solid rgba(145, 176, 158, .5); border-radius: 999px;
  background:
    radial-gradient(circle, rgba(145, 176, 158, .16), transparent 65%),
    conic-gradient(from 0deg, rgba(145, 176, 158, .35), transparent 40%);
  animation: mk-radar-sweep 4.5s linear infinite;
}
.radar-ping { position: absolute; width: 6px; height: 6px; border-radius: 999px; background: var(--green); box-shadow: 0 0 10px rgba(145, 176, 158, .8); }
.radar-ping.one { top: 22%; left: 58%; }
.radar-ping.two { top: 60%; left: 30%; }
.radar-ping.three { top: 44%; left: 72%; }
@keyframes mk-radar-sweep { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .radar-scope { animation: none; } }
@media (max-width: 700px) {
  .radar-strip-card { grid-template-columns: 1fr; }
  .radar-scope { display: none; }
  .radar-actions { grid-auto-flow: column; }
}

/* ── listing cards ── */
.listing-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px; margin-top: 4px;
}
.listing-card {
  display: grid; gap: 10px; align-content: start;
  padding: 12px;
  border: 1px solid var(--line); border-radius: var(--mk-radius);
  background: rgba(12, 31, 40, .82); cursor: pointer;
  transition: transform .16s ease, border-color .16s ease;
}
.listing-card:hover { transform: translateY(-2px); border-color: var(--line-bright); }
.listing-card.is-selected { border-color: var(--accent); box-shadow: 0 0 18px rgba(216, 184, 117, .18); }
.listing-card.sold { opacity: .78; }
.card-topline { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.card-title h3 { margin-bottom: 3px; }
.card-title .muted { font-size: 13px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 2px; }

.pill {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border: 1px solid var(--line-bright); border-radius: 999px;
  color: var(--dim); font-family: var(--font-mono); font-size: 11px;
  white-space: nowrap;
}
.pill.good { border-color: rgba(145, 176, 158, .5); color: var(--green); }
.pill.gold { border-color: var(--accent-line); color: var(--accent); }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }

.price { color: var(--cream); font-family: var(--font-mono); font-size: 17px; }
.price.sold-price { color: var(--accent); }

.demand-meter { display: grid; gap: 5px; color: var(--dim); font-size: 12.5px; }
.meter-track { height: 5px; border-radius: 999px; background: rgba(20, 48, 57, .9); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--amber)); }

/* ── listing table (horizontal-scrolls inside its own container) ── */
.listing-table-wrap { overflow-x: auto; margin-top: 4px; -webkit-overflow-scrolling: touch; }
.listing-table { min-width: 820px; display: grid; gap: 6px; }
.listing-table-head, .listing-table-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.6fr) 1fr 56px 1fr 1fr 110px 84px;
  gap: 10px; align-items: center; padding: 8px 10px; text-align: left;
}
.listing-table-head { color: var(--dim); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.listing-table-row {
  border: 1px solid var(--line); border-radius: var(--mk-radius);
  background: rgba(12, 31, 40, .82); color: var(--ice); cursor: pointer;
}
.listing-table-row.is-selected { border-color: var(--accent); }
.listing-table-row.is-sold { opacity: .78; }
.table-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.table-item strong { display: block; }
.table-item small { color: var(--dim); }
.table-price { font-family: var(--font-mono); color: var(--cream); }

/* ── detail rail ── */
.detail-hero { display: grid; gap: 12px; }
.item-art {
  position: relative; display: grid; place-items: center;
  height: 96px; border: 1px solid var(--accent-line); border-radius: var(--mk-radius);
  background:
    linear-gradient(135deg, rgba(216, 184, 117, .16), transparent 55%),
    repeating-linear-gradient(45deg, rgba(216, 184, 117, .05) 0 8px, transparent 8px 16px),
    rgba(6, 15, 20, .6);
}
.art-code { color: var(--accent); font-family: var(--font-mono); font-size: 26px; letter-spacing: .2em; }
.art-mark {
  position: absolute; right: 10px; bottom: 8px;
  color: var(--dim-2); font-family: var(--font-mono); font-size: 12px;
}
.detail-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.detail-stat {
  display: grid; gap: 2px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--mk-radius);
  background: rgba(6, 15, 20, .45);
}
.detail-stat span { color: var(--dim); font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; }
.detail-stat strong { color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-actions { display: grid; gap: 8px; margin-top: 10px; }
.detail-actions .accent-button { min-height: 44px; }
.detail-actions .wide-button { margin-top: 0; }

.seller-mini { display: flex; gap: 12px; align-items: center; }
.seller-avatar {
  display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent); font-weight: 700;
}
.seller-list { display: grid; gap: 6px; margin-top: 12px; }
.seller-page-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line); border-radius: var(--mk-radius);
  background: rgba(6, 15, 20, .4);
}
.seller-page-row span { color: var(--dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seller-page-row strong { color: var(--cream); font-family: var(--font-mono); font-size: 13px; }

/* ── history band ── */
.history-band {
  margin-top: 16px; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--mk-radius);
  background: rgba(6, 15, 20, .6);
}
.history-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 10px; }
.history-list { display: grid; gap: 8px; }
.history-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--mk-radius);
  background: rgba(12, 31, 40, .7);
}
.history-row strong { display: block; }
.history-row span { color: var(--dim); font-size: 12.5px; }
.history-row > div:last-child { text-align: right; flex: none; }
.history-row small { color: var(--dim-2); font-family: var(--font-mono); }

/* ── price check board ── */
.price-check-board, .wtb-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px; margin-top: 4px;
}
.price-check-card, .wtb-card {
  display: grid; gap: 10px; align-content: start;
  padding: 12px;
  border: 1px solid var(--line); border-radius: var(--mk-radius);
  background: rgba(12, 31, 40, .82); cursor: pointer;
  transition: transform .16s ease, border-color .16s ease;
}
.price-check-card:hover, .wtb-card:hover { transform: translateY(-2px); border-color: var(--line-bright); }
.price-check-card.is-selected, .wtb-card.is-selected { border-color: var(--accent); box-shadow: 0 0 18px rgba(216, 184, 117, .18); }
.price-check-card.is-resolved { opacity: .8; }
.wtb-card.is-matched { border-color: rgba(145, 176, 158, .4); }

.wtb-topline { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.wtb-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wtb-budget { color: var(--cream); font-family: var(--font-mono); }

.pc-range {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--accent-line); border-radius: var(--mk-radius);
  background: var(--accent-soft);
}
.pc-range span { color: var(--dim); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.pc-range strong { color: var(--cream); font-family: var(--font-mono); }
.pc-range.big { margin-top: 10px; }
.pc-range.big strong { font-size: 19px; }

.pc-response-list { display: grid; gap: 8px; margin-top: 14px; }
.pc-response {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px;
  border: 1px solid var(--line); border-radius: var(--mk-radius);
  background: rgba(6, 15, 20, .4);
}
.pc-response h3 { font-size: 14.5px; margin-bottom: 3px; }
.pc-response p { color: var(--dim); font-size: 13px; margin-bottom: 4px; }
.pc-response small { color: var(--dim-2); font-family: var(--font-mono); font-size: 11px; }
.pc-response > strong { color: var(--cream); font-family: var(--font-mono); white-space: nowrap; }

/* ── trade-history guide card (historical price guide) ── */
.pc-guide-block { margin-top: 14px; }
.pc-guide {
  display: grid; gap: 7px;
  padding: 10px;
  border: 1px solid var(--line); border-radius: var(--mk-radius);
  background: rgba(6, 15, 20, .4);
}
.pc-guide-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pc-guide-median { color: var(--cream); font-family: var(--font-mono); font-size: 20px; line-height: 1; }
.pc-guide-medians { display: flex; gap: 6px; flex-wrap: wrap; }
.pc-guide-meta { margin: 0; color: var(--dim); font-family: var(--font-mono); font-size: 11px; }
.pc-guide-close { margin: 0; color: var(--dim); font-size: 12px; }
.pc-guide-sample {
  display: flex; justify-content: space-between; gap: 8px;
  color: var(--dim-2); font-family: var(--font-mono); font-size: 11px;
}
.pc-guide-sample span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-guide-sample span:last-child { flex: none; }
.pc-guide-preview { margin: 8px 0 0; min-height: 15px; color: var(--dim); font-family: var(--font-mono); font-size: 12px; }

/* ── item-name combobox (price-check form typeahead) ── */
.item-combo { position: relative; }
.combo-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40;
  display: grid; max-height: 250px; overflow-y: auto;
  border: 1px solid var(--line-bright); border-radius: var(--mk-radius);
  background: rgba(7, 13, 22, .98);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
}
.combo-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 11px;
  border: 0; border-bottom: 1px solid var(--line);
  background: none; color: var(--ice);
  font: inherit; text-align: left; cursor: pointer;
}
.combo-row:last-child { border-bottom: 0; }
.combo-row:hover, .combo-row.is-active { background: var(--accent-soft); }
.combo-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-row .pill { flex: none; }
.combo-hint { margin: 6px 0 0; color: var(--dim-2); font-size: 11.5px; }

.trend-list { display: grid; gap: 8px; margin-top: 14px; }
.trend-row { display: grid; gap: 5px; }
.trend-row strong { color: var(--cream); font-family: var(--font-mono); margin-right: 8px; }
.trend-row span { color: var(--dim); font-size: 12px; }
.trend-meter { height: 5px; border-radius: 999px; background: rgba(20, 48, 57, .9); overflow: hidden; }
.trend-meter span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--amber), var(--green)); }

/* ── empty states ── */
.empty-state {
  display: grid; gap: 4px; place-items: center; text-align: center;
  grid-column: 1 / -1;
  padding: 34px 18px;
  border: 1px dashed var(--line-bright); border-radius: var(--mk-radius);
  color: var(--dim);
}
.empty-state p { margin: 0; color: var(--ice); font-weight: 600; }
.empty-state small { color: var(--dim); }

/* ── modal + toast ── */
.modal-root {
  position: fixed; inset: 0; z-index: 400;
  display: none; place-items: center;
  padding: 18px;
  background: rgba(6, 15, 20, .72);
  backdrop-filter: blur(6px);
}
.modal-root.is-open { display: grid; }
.modal {
  width: min(480px, 100%);
  max-height: min(86vh, 720px);
  display: flex; flex-direction: column;
  border: 1px solid var(--line-bright); border-radius: 10px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--mk-shadow);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.modal-body { padding: 6px 16px 14px; overflow-y: auto; }
.modal-footer {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}
.modal-footer .wide-button, .modal-footer .accent-button { margin-top: 0; min-height: 44px; }
.close-button {
  flex: none; width: 34px; height: 34px;
  border: 1px solid var(--line-bright); border-radius: var(--mk-radius);
  background: rgba(16, 36, 46, .6); color: var(--dim);
  cursor: pointer; font-family: var(--font-mono);
}

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 500;
  transform: translate(-50%, 16px);
  max-width: min(440px, calc(100vw - 32px));
  padding: 12px 18px;
  border: 1px solid var(--accent-line); border-radius: var(--mk-radius);
  background: rgba(7, 13, 22, .96);
  color: var(--ice);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ── harvesting contracts ── */
.pill.bad { border-color: rgba(255, 120, 120, .55); color: #ff8a8a; }
.hc-bar { position: relative; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin: 8px 0 4px; }
.hc-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #ffd58a); }
.hc-bar.done i { background: linear-gradient(90deg, #46e0a0, #8af5c9); }
.hc-progress-line { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted, #8894a4); font-variant-numeric: tabular-nums; }
.hc-ledger { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; margin: 6px 0 10px; }
.hc-ledger .hcl-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 6px 8px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 6px; background: rgba(6, 15, 20, .35); }
.hc-ledger .hcl-row span:last-child { font-variant-numeric: tabular-nums; color: var(--accent); white-space: nowrap; }

/* ══ KITH REGISTER (2026-07-16) — KEEP THIS SECTION LAST ══════════════════
   De-consoles the survivors above: serif banner headings, mixed case where a
   machine used to shout, no glow on controls. Component geometry untouched. */

/* the eyebrow becomes a quiet caption — the JS uses it for real labels
   ("Seller", "Sold comps", breadcrumbs), so it keeps its information and
   loses the tracked-caps machine voice. The decorative section eyebrows were
   deleted from the page markup instead. */
.mk-shell .eyebrow, .modal-root .eyebrow {
  font-family: var(--sans); font-size: 12.5px;
  letter-spacing: .02em; text-transform: none;
  color: var(--rain);
}

/* banner + modal headlines speak Vollkorn; card titles stay Archivo */
.market-banner h2, .modal-root h2, .radar-copy h2 {
  font-family: var(--serif); font-weight: 700; letter-spacing: -0.01em;
}
.market-banner h2 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.08; text-wrap: balance; }

/* mixed case, no tracking */
.price-row span, .modal-field > span { text-transform: none; letter-spacing: .02em; font-size: 12px; }
.listing-table-head { text-transform: none; letter-spacing: .02em; font-size: 12px; }

/* no glowing UI — light means people */
.mode-tab.is-active, .segmented button.is-active { box-shadow: none; color: var(--mist); }
.listing-card.is-selected { box-shadow: none; }
.radar-ping { box-shadow: none; }

/* the "/" console prompt in search boxes is retired */
.searchbox > span { display: none; }

/* view-toggle buttons leaned on the old site.css global button reset —
   without it they fell back to UA default light-gray */
.view-toggle button { background: transparent; color: var(--dim); cursor: pointer; }
.view-toggle button.is-active { color: var(--mist); }

/* ── impeccable pass (2026-07-16, critique 26/40): the survivors it caught ── */

/* §8: no monospace, anywhere — the contracts board shipped two literals */
.hc-progress-line { font-family: var(--sans); }
.hc-ledger .hcl-row span:last-child { font-family: var(--sans); font-variant-numeric: tabular-nums; }

/* no glow on selection (the register only caught .listing-card) */
.price-check-card.is-selected, .wtb-card.is-selected { box-shadow: none; }

/* mixed case, no tracking, readable size for 40-year-old eyes */
.detail-stat span { text-transform: none; letter-spacing: .02em; font-size: 12px; font-family: var(--sans); }
.pc-range span { text-transform: none; letter-spacing: .02em; font-size: 12px; font-family: var(--sans); }
.art-code { letter-spacing: .04em; }

/* alarm hues bypassing the drench → rust / patina */
.pill.bad { border-color: rgba(196, 103, 94, .55); color: var(--rust); }
.hc-bar i { background: var(--lamplight); }
.hc-bar.done i { background: var(--patina); }
.hc-progress-line { color: var(--rain); }

/* the radar scope was a spinning machine readout — hold the still frame */
.radar-scope { animation: none; }

/* decardify one level: stat tiles are figures, not cards-in-a-card */
.market-stats div { border: 0; background: none; padding: 4px 0; min-height: 0; }
.market-stats strong { font-family: var(--serif); font-size: 24px; color: var(--lamplight); }
.item-art { background: rgba(6, 15, 20, .6); border-color: var(--line); }

/* the sticky offset assumed the old fixed site-nav */
@media (min-width: 961px) {
  .filter-panel { top: 16px; max-height: calc(100vh - 32px); }
  .detail-rail { top: 16px; }
}

/* the founding line that replaces zeros in claims-position */
.banner-founding { margin: 0; max-width: 34ch; color: var(--rain); }
.banner-founding a { color: var(--mist); text-decoration: underline; text-decoration-color: var(--bronze); text-underline-offset: 3px; }
.banner-founding a:hover { color: var(--lamplight); }

/* footer doors */
.foot-doors { max-width: var(--max); margin: 0 auto 18px; padding: 0 24px; display: flex; gap: 10px; flex-wrap: wrap; }

/* 390: tabs breathe in two rows; the hero keeps its lantern in frame */
@media (max-width: 640px) {
  .mode-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .mode-tab { min-width: 0; }
}

/* the hidden attribute must win over our explicit display */
.market-stats[hidden], .banner-founding[hidden] { display: none; }
