/* Modernist design system for the public listing page (Claude Design "NSX Listing").
   Section 1: Archivo, self-hosted (SIL Open Font License). One variable font, split by script.
   Section 2: design-system tokens and components, copied verbatim from the design.
   Section 3: page layout for _LayoutModernist and the listing/auction views. */

/* latin-ext */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/archivo/archivo-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/archivo/archivo-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-accent: #ec3013;
  --color-accent-2: #e15b47;
  --color-divider: color-mix(in srgb, #201e1d 40%, transparent);

  /* Tonal ramps — generated in OKLCH on one shared lightness scale, so the
     same step of any role matches the others in visual value. */
  --color-neutral-100: #f8f4f4;
  --color-neutral-200: #eae7e7;
  --color-neutral-300: #d7d3d3;
  --color-neutral-400: #bab6b6;
  --color-neutral-500: #9b9797;
  --color-neutral-600: #7d7979;
  --color-neutral-700: #605d5d;
  --color-neutral-800: #444141;
  --color-neutral-900: #2d2b2b;

  --color-accent-100: #fff2ef;
  --color-accent-200: #ffe0d9;
  --color-accent-300: #ffc4b8;
  --color-accent-400: #ff9783;
  --color-accent-500: #ff563c;
  --color-accent-600: #dd2b0f;
  --color-accent-700: #ae1800;
  --color-accent-800: #7c1405;
  --color-accent-900: #4d170e;

  --color-accent-2-100: #fff2ef;
  --color-accent-2-200: #ffe0da;
  --color-accent-2-300: #ffc4b9;
  --color-accent-2-400: #ff9784;
  --color-accent-2-500: #ef6853;
  --color-accent-2-600: #c94b39;
  --color-accent-2-700: #9e3526;
  --color-accent-2-800: #71261b;
  --color-accent-2-900: #471d16;

  --font-heading: "Archivo", system-ui, sans-serif;
  --font-heading-weight: 800;
  --font-body: "Archivo", system-ui, sans-serif;

  --space-1: 4.0px;
  --space-2: 8.0px;
  --space-3: 12.0px;
  --space-4: 16.0px;
  --space-6: 24.0px;
  --space-8: 32.0px;

  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;

  /* Elevation — derived from the ground: soft ink-tinted shadows on a
     light theme, a hairline edge + ambient darkness on a dark one. */
  --shadow-sm: 0 1px 2px color-mix(in srgb, #2d2b2b 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2d2b2b 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2d2b2b 22%, transparent);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); }

.grayscale{filter:grayscale(1) contrast(1.08)}

/* ══════════════════════════════════════════════════════════════════════════
   Components — built with the tokens above. Plain CSS
   on plain HTML: no JavaScript, no build step. Each class is documented in
   readme.md and demonstrated in foundations/ and components/.
   ══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 400; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 { font-size: 13px; }
h6 { letter-spacing: 0.08em; text-transform: uppercase; }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption {
  font-size: 11px; margin-top: var(--space-1);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.text-muted { color: color-mix(in srgb, var(--color-text) 55%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — rules — */
.hr {
  height: 2px; border: 0; margin: var(--space-4) 0;
  background: var(--color-divider);
}

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text); /* matches the .input's 14px —
     the pair sits side by side in sign-up rows */
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-block { width: 100%; margin-top: var(--space-2); justify-content: flex-start; text-align: left; }

/* — forms — */
.field > label {
  display: block; font-size: 12px; margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.radio input, .seg-opt input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.radio .dot {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--color-divider);
}
.radio:hover .dot { border-color: var(--color-accent); }
.radio input:checked + .dot {
  border-color: var(--color-accent); background: var(--color-accent);
  box-shadow: inset 0 0 0 4px var(--color-bg);
}
.radio input:focus-visible + .dot { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.seg {
  display: inline-flex; overflow: hidden;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.seg-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 13px; cursor: pointer;
}
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { background: var(--color-accent); color: var(--color-bg); }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }

/* — cards — */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface);
}
.card-kicker { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.card-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 17px; line-height: 1.2;
}
.card-body { margin: 0; font-size: 13px; opacity: 0.8; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-accent-2 { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

/* — navigation — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: 2px solid var(--color-divider);
}
.nav-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; margin-right: auto;
}
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--color-accent); }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 2px solid var(--color-divider);
}
.table td {
  padding: var(--space-2);
  border-bottom: 1px solid var(--color-divider);
}
.table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }

/* — dialog — */
.dialog-backdrop {
  position: fixed; inset: 0; display: grid; place-items: center;
  padding: var(--space-4);
  background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent);
}
.dialog {
  width: min(440px, 100%); display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--color-surface); box-shadow: var(--shadow-lg);
}
.dialog-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 20px;
}
.dialog-body { font-size: 14px; opacity: 0.85; }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }

</style>

/* ══════════════════════════════════════════════════════════════════════════
   Page layout — the design's inline styles as classes, plus responsive rules.
   ══════════════════════════════════════════════════════════════════════ */

body { background: var(--color-bg); }
a { color: var(--color-accent-700); }
a:hover { color: var(--color-accent-600); }
input::placeholder { color: var(--color-neutral-500); font-weight: 400; }
.hide-element { display: none !important; }
.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;
}

.mx-page { min-height: 100vh; display: flex; flex-direction: column; color: var(--color-text); font-family: var(--font-body); }
.mx-page > main { flex: 1; }
.mx-container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.mx-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-neutral-700);
}
.mx-section { padding: 40px 0; border-bottom: 2px solid var(--color-divider); }
.mx-section:last-child { border-bottom: 0; }
.mx-section-title { font-size: 32px; margin: 0 0 16px; text-wrap: balance; }
.mx-rule-top { border-top: 2px solid var(--color-text); }

/* — header — */
/* The header stays at the top while scrolling, as the old Silicon header did. Its height is kept in
   --mx-header-h by the script in _LayoutModernist so the live auction bar, the Dark Mode panel and
   in-page anchors (#bidding-area, #condition, #garage) sit below it rather than under it. */
:root { --mx-header-h: 74px; --mx-bar-h: 0px; }
html { scroll-padding-top: calc(var(--mx-header-h) + var(--mx-bar-h) + 16px); }
.mx-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 2px solid var(--color-text); background: var(--color-bg);
  transition: box-shadow 0.15s ease-in-out;
}
.mx-header.is-scrolled { box-shadow: var(--shadow-md); }
.mx-header-inner { display: flex; align-items: center; gap: 40px; height: 72px; }
.mx-logo { display: flex; align-items: center; height: 72px; padding: 0 16px; background: #000; flex: none; }
.mx-logo img { height: 44px; width: auto; }
.mx-nav { display: flex; gap: 28px; font-size: 14px; font-weight: 600; }
.mx-nav a { color: var(--color-text); text-decoration: none; }
.mx-nav a:hover, .mx-nav a[aria-current='page'] { color: var(--color-accent); }
.mx-header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.mx-header-actions .btn-primary { color: var(--color-bg); }
.mx-menu-toggle { display: none; }

.mx-user { position: relative; }
.mx-user > summary {
  list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 14px; font-weight: 600; padding: 4px 0;
}
.mx-user > summary::-webkit-details-marker { display: none; }
.mx-user > summary::after { content: ''; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.mx-user img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.mx-user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 200px;
  display: flex; flex-direction: column; background: var(--color-bg);
  border: 2px solid var(--color-text); box-shadow: var(--shadow-md);
}
.mx-user-menu a { padding: 10px 14px; color: var(--color-text); text-decoration: none; font-size: 14px; }
.mx-user-menu a + a { border-top: 1px solid var(--color-divider); }
.mx-user-menu a:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-accent); }

/* — sticky auction bar — */
.mx-bar { position: sticky; top: var(--mx-header-h); z-index: 15; background: var(--color-text); color: var(--color-bg); }
.mx-bar-inner {
  display: grid; grid-template-columns: auto 1fr 1fr 1fr auto; align-items: stretch;
  min-height: 64px; padding-top: 8px; padding-bottom: 8px;
}
.mx-bar-tag-cell { display: flex; align-items: center; padding-right: 24px; }
.mx-tag-solid {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 8px; white-space: nowrap; background: var(--color-neutral-800); color: var(--color-bg);
}
.mx-tag-solid.is-accent { background: var(--color-accent); }
.mx-bar-stat {
  display: flex; flex-direction: column; justify-content: center; min-width: 0;
  padding: 0 24px; border-left: 1px solid var(--color-neutral-700);
}
.mx-bar-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-400); }
.mx-bar-value { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-bar-actions { display: flex; align-items: center; gap: 8px; padding-left: 24px; }
.mx-bar .btn-primary { color: var(--color-bg); }

/* — hero — */
.mx-hero {
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px;
  padding: 32px 0; border-bottom: 2px solid var(--color-divider);
}
.mx-gallery { display: flex; flex-direction: column; gap: 8px; }
.mx-gallery-main { position: relative; aspect-ratio: 3 / 2; background: var(--color-surface); overflow: hidden; }
.mx-gallery-main a { position: absolute; inset: 0; display: block; }
.mx-gallery-main a[hidden] { display: none; }
.mx-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.mx-gallery-count {
  position: absolute; right: 12px; bottom: 12px; z-index: 1; pointer-events: none;
  background: color-mix(in srgb, #000 72%, transparent); color: var(--color-bg);
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; padding: 4px 10px;
}
.mx-thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.mx-thumb {
  position: relative; padding: 0; border: 2px solid transparent; background: var(--color-surface);
  aspect-ratio: 3 / 2; overflow: hidden; cursor: pointer;
}
.mx-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mx-thumb.is-active { border-color: var(--color-accent); }
.mx-thumb-more {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: color-mix(in srgb, #000 60%, transparent); color: var(--color-bg);
  font-family: var(--font-heading); font-weight: 800; font-size: 14px;
}

.mx-aside { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.mx-title { font-size: 42px; line-height: 1.05; margin: 0; text-wrap: balance; }
.mx-title-sub { margin-top: 8px; font-size: 16px; color: var(--color-neutral-700); }
.mx-facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--color-text); }
.mx-fact { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--color-divider); min-width: 0; }
.mx-fact:nth-child(even) { padding: 12px 0 12px 12px; border-left: 1px solid var(--color-divider); }
.mx-fact-label { font-size: 12px; color: var(--color-neutral-700); }
.mx-fact-value { font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.mx-figures { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 16px; }
.mx-figure-value { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.mx-figure-value small { font-size: 16px; color: var(--color-neutral-600); }
.mx-figure-link { text-decoration: none; color: var(--color-text); text-align: right; }
.mx-figure-link:hover { color: var(--color-text); }
.mx-figure-link:only-child { grid-column: 1 / -1; text-align: left; }
.mx-callout { background: var(--color-surface); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.mx-callout p { font-size: 14px; line-height: 1.5; margin: 0; }
.mx-cta-lg { justify-content: flex-start; padding: 14px 16px; font-size: 16px; }
a.btn-primary, a.btn-primary:hover { color: var(--color-bg); }
a.btn-secondary, a.btn-secondary:hover { color: var(--color-text); }

/* — condition — */
.mx-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.mx-section-head h2 { margin: 0; }
.mx-section-head .mx-meta { font-size: 14px; color: var(--color-neutral-700); }
.mx-section-head .mx-meta strong { color: var(--color-text); }
.mx-cond-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 2px solid var(--color-text); border-left: 1px solid var(--color-divider);
}
.mx-cond {
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
  border-right: 1px solid var(--color-divider); border-bottom: 1px solid var(--color-divider);
}
.mx-cond-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mx-cond-label { font-size: 14px; font-weight: 600; }
.mx-cond-score { font-size: 24px; font-weight: 800; }
.mx-cond-bar { height: 6px; background: var(--color-neutral-300); }
.mx-cond-bar > span { display: block; height: 100%; background: var(--color-accent); }
.mx-cond.is-good .mx-cond-bar > span { background: var(--color-text); }
.mx-cond-note { font-size: 12px; line-height: 1.4; color: var(--color-neutral-700); }

/* — seller + specs / bidding two-column sections — */
.mx-split {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px;
  padding: 40px 0; border-bottom: 2px solid var(--color-divider);
}
/* The bidding area closes the page (its dialogs follow it, so :last-child can't be used). */
#bidding-area.mx-split { border-bottom: 0; padding-bottom: 64px; }
.mx-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 32px; }
.mx-list-title {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  margin: 0 0 8px; padding-bottom: 8px; border-bottom: 2px solid var(--color-text);
}
.mx-list-title.is-accent { border-bottom-color: var(--color-accent); }
.mx-list { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.45; }
.mx-list li { padding: 10px 0; border-bottom: 1px solid var(--color-divider); }

.mx-specs .mx-spec {
  display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 10px 0;
  border-bottom: 1px solid var(--color-divider); font-size: 14px;
}
.mx-spec > span:first-child { color: var(--color-neutral-700); }
.mx-spec > span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* Seller copy comes from the admin's TinyMCE editor, so style plain HTML. */
.mx-prose { font-size: 16px; line-height: 1.65; max-width: 62ch; text-wrap: pretty; overflow-wrap: break-word; }
.mx-prose h1, .mx-prose h2, .mx-prose h3, .mx-prose h4 { margin: 24px 0 8px; }
.mx-prose h1 { font-size: 25px; }
.mx-prose h2 { font-size: 22px; }
.mx-prose h3 { font-size: 19px; }
.mx-prose h4 { font-size: 17px; }
.mx-prose ul, .mx-prose ol { margin: 0 0 12px; padding-left: 20px; }
.mx-prose img { height: auto; margin: 16px 0; }
.mx-prose iframe, .mx-prose video { max-width: 100%; }
.mx-prose table { width: 100% !important; border-collapse: collapse; font-size: 14px; margin: 16px 0; height: auto !important; }
.mx-prose td, .mx-prose th { padding: 8px; border-bottom: 1px solid var(--color-divider); text-align: left; vertical-align: top; width: auto !important; }
.mx-prose tr:first-child td, .mx-prose tr:first-child th { border-top: 2px solid var(--color-text); }
.mx-prose th { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-700); }

/* — bidding — */
.mx-kv-row {
  display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 14px 0;
  border-bottom: 1px solid var(--color-divider); align-items: baseline;
}
.mx-kv-row > span:first-child { font-size: 14px; color: var(--color-neutral-700); }
.mx-kv-row > span:last-child, .mx-kv-row > p { margin: 0; font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mx-kv-row.is-big > span:last-child, .mx-kv-row.is-big > p { font-size: 18px; font-weight: 800; }
.is-urgent { color: var(--color-accent-700); }

.mx-bid-form { padding: 24px 0; display: flex; flex-direction: column; gap: 8px; }
.mx-bid-form label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-700); }
.mx-bid-row { display: flex; gap: 8px; }
.mx-money-input {
  flex: 1; min-width: 0; display: flex; align-items: center;
  background: var(--color-surface); border: 1px solid var(--color-divider);
}
.mx-money-input:focus-within { border-color: var(--color-accent); }
.mx-money-input > span { padding: 0 4px 0 14px; font-size: 18px; font-weight: 800; color: var(--color-neutral-600); }
.mx-money-input input {
  flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 18px; font-weight: 800;
  padding: 12px 8px; min-height: 52px; outline: none; color: var(--color-text);
}
.mx-bid-row .btn-primary { justify-content: flex-start; padding: 0 32px 0 20px; font-size: 16px; min-width: 180px; }
.mx-bid-msg { font-size: 13px; margin: 0; color: var(--color-neutral-700); }
.mx-bid-msg.is-error { color: var(--color-accent-700); font-weight: 600; }
.mx-bid-actions { padding: 24px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mx-bid-actions .btn { padding: 14px 20px; font-size: 16px; }
.mx-bid-actions .btn-primary { justify-content: flex-start; min-width: 220px; }
.mx-ready { font-size: 14px; color: var(--color-neutral-700); align-self: center; margin: 0; }

.mx-bids-title { font-size: 25px; margin: 16px 0 12px; }
.mx-bids { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--color-text); }
.mx-bids > li {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 14px 0;
  border-bottom: 1px solid var(--color-divider); align-items: baseline; font-variant-numeric: tabular-nums;
}
.mx-bids > li.mx-bids-head {
  position: static; padding: 10px 0; font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--color-neutral-700);
}
.mx-bids > li > :last-child { text-align: right; }
.mx-bid-user { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.mx-bid-time { font-size: 14px; color: var(--color-neutral-700); white-space: nowrap; }
.mx-bid-amount { font-size: 15px; font-weight: 800; }
.mx-bids > li.is-top .mx-bid-amount { font-size: 20px; color: var(--color-accent-700); }
.mx-bids > li.is-own .mx-bid-user::after {
  content: 'You'; margin-left: 8px; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 6px; background: var(--color-accent-100); color: var(--color-accent-800); vertical-align: middle;
}
.mx-bids-empty { padding: 20px 0; margin: 0; font-size: 14px; color: var(--color-neutral-700); border-bottom: 1px solid var(--color-divider); }
.mx-log { margin-top: 32px; font: 12px/1.5 ui-monospace, monospace; white-space: pre-wrap; }

.mx-dark-panel {
  position: sticky; top: calc(var(--mx-header-h) + var(--mx-bar-h) + 24px); background: #000; color: var(--color-bg); padding: 32px;
  display: flex; flex-direction: column; gap: 16px;
}
.mx-dark-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.mx-dark-panel h3 { font-size: 25px; margin: 0; color: var(--color-bg); }
.mx-dark-panel p { font-size: 16px; line-height: 1.6; margin: 0; text-wrap: pretty; }
.mx-dark-panel .mx-dark-panel-foot { font-size: 14px; line-height: 1.5; color: var(--color-neutral-300); }
.mx-dark-panel a { color: var(--color-bg); font-weight: 600; }
.mx-dark-panel hr { height: 1px; border: 0; margin: 0; background: var(--color-neutral-700); }

/* Live bidding overlays (spinner while a bid posts, banner while SignalR reconnects). */
.bidding-area { position: relative; }
.spinner-overlay, .reconnecting-overlay {
  position: absolute; inset: 0; z-index: 10; display: flex; justify-content: center; align-items: center;
  visibility: hidden; opacity: 0; transition: visibility 0s, opacity 0.3s ease-in-out;
}
.spinner-overlay { background: color-mix(in srgb, var(--color-bg) 60%, transparent); }
.reconnecting-overlay { background: color-mix(in srgb, #000 55%, transparent); }
.bidding-area.loading .spinner-overlay, .bidding-area.reconnecting .reconnecting-overlay { visibility: visible; opacity: 1; }
.reconnecting-title { color: var(--color-bg); font-size: 24px; margin: 0; }
.mx-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 4px solid var(--color-neutral-300); border-top-color: var(--color-accent);
  animation: mx-spin 0.9s linear infinite;
}
@keyframes mx-spin { to { transform: rotate(360deg); } }
.zlower { z-index: 0 !important; }

/* — dialogs (native <dialog> with the design's .dialog look) — */
dialog.dialog { border: 0; color: var(--color-text); max-width: calc(100% - 32px); }
dialog.dialog:not([open]) { display: none; }
dialog.dialog::backdrop { background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog-close { font-size: 22px; line-height: 1; padding: 0 4px; background: none; border: 0; cursor: pointer; color: inherit; }
.dialog-body p { margin: 0 0 8px; }
.dialog-alert { background: var(--color-accent-100); color: var(--color-accent-800); padding: 10px 12px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.dialog-amount { font-size: 25px; margin: 0 0 12px; }
.dialog-terms { margin: 0; padding-left: 20px; font-size: 14px; }
.dialog-terms li { padding: 4px 0; }

/* — footer — */
.mx-footer { background: #000; color: var(--color-bg); }
.mx-footer-inner { padding: 40px 32px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; font-size: 14px; }
.mx-footer img.mx-footer-logo { height: 60px; width: auto; }
.mx-footer-links { display: flex; flex-direction: column; gap: 8px; }
.mx-footer a { color: var(--color-bg); text-decoration: none; }
.mx-footer a:hover { color: var(--color-accent-400); }
.mx-footer-social { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; }
.mx-footer-legal { font-size: 12px; color: var(--color-neutral-500); padding-bottom: 24px; }
.mx-sitelock { margin-top: 24px; }

/* — home: featured hero — */
.mx-feature {
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px;
  padding: 32px 0 40px; border-bottom: 2px solid var(--color-text);
}
.mx-feature .mx-aside { gap: 20px; }
.mx-feature-head { display: flex; flex-direction: column; gap: 12px; }
.mx-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mx-tag-solid.is-dark { background: var(--color-text); }
.mx-feature-title { font-size: 40px; line-height: 1.05; margin: 0; text-wrap: balance; }
.mx-feature-title a, .mx-feature-title a:hover { color: var(--color-text); text-decoration: none; }
.mx-thumbs.mx-thumbs-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mx-kv-row.mx-kv-tight { grid-template-columns: 100px 1fr; padding: 12px 0; font-size: 14px; }
.mx-kv-row.mx-kv-tight > span:last-child { font-size: 14px; }
.mx-strong { font-weight: 800; }
.mx-muted { color: var(--color-neutral-700); font-size: 14px; margin: 0; }
.mx-feature-copy { font-size: 15px; line-height: 1.6; max-width: none; }
.mx-feature-copy p:last-child { margin-bottom: 0; }
.mx-feature-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }

/* — home: Rockstar Garage — */
.mx-garage { padding: 40px 0 64px; }
.mx-garage-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.mx-garage-title { font-size: 40px; margin: 0; }
.mx-filters { display: flex; border: 2px solid var(--color-text); }
.mx-filter {
  padding: 10px 16px; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--color-text);
}
.mx-filter + .mx-filter { border-left: 2px solid var(--color-text); }
.mx-filter:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.mx-filter[aria-current='page'], .mx-filter[aria-current='page']:hover { background: var(--color-text); color: var(--color-bg); }
.mx-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px;
  padding-top: 24px; border-top: 2px solid var(--color-text);
}
.mx-card {
  display: flex; flex-direction: column; color: var(--color-text); text-decoration: none;
  border: 1px solid var(--color-divider); background: var(--color-bg);
}
.mx-card:hover { background: var(--color-surface); color: var(--color-text); }
.mx-card:hover .mx-card-title { color: var(--color-accent-700); }
.mx-card-photo { position: relative; aspect-ratio: 3 / 2; background: var(--color-surface); overflow: hidden; }
.mx-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.mx-card-tag { position: absolute; top: 12px; left: 12px; }
.mx-card-tag .mx-tag-solid { font-size: 11px; }
.mx-card-body { padding: 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mx-card-title { font-size: 18px; font-weight: 800; line-height: 1.2; text-wrap: balance; }
.mx-card-miles { font-size: 14px; color: var(--color-neutral-700); }
.mx-card-live, .mx-card-figures { display: grid; grid-template-columns: 1fr auto; border-top: 1px solid var(--color-divider); }
.mx-card-live { background: var(--color-text); color: var(--color-bg); border-top-color: var(--color-text); }
.mx-card-live .mx-card-label { color: var(--color-neutral-400); }
.mx-card-live .mx-card-right { border-left-color: var(--color-neutral-700); }
.mx-card-live .is-urgent { color: var(--color-accent-400); }
.mx-card-live > div, .mx-card-figures > div { padding: 12px 16px; min-width: 0; }
.mx-card-right { border-left: 1px solid var(--color-divider); text-align: right; }
.mx-card-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-700); }
.mx-card-value { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mx-empty { padding: 48px 0; border-bottom: 1px solid var(--color-divider); }
.mx-empty-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.mx-empty p { font-size: 14px; color: var(--color-neutral-700); margin: 0; }
.mx-pager-linkr { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.mx-pager-link {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px;
  border: 2px solid var(--color-text); color: var(--color-text); text-decoration: none; font-weight: 700; font-size: 14px;
}
.mx-pager-link:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.mx-pager-link.is-current, .mx-pager-link.is-current:hover { background: var(--color-text); color: var(--color-bg); }
.mx-pager-link.is-gap { border-color: transparent; }

/* — estimated-value market range bar (listing page) — */
.mx-gauge { grid-column: 1 / -1; padding-top: 4px; }
.mx-gauge-band { font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--color-neutral-700); }
.mx-gauge-track { position: relative; display: flex; height: 10px; margin-top: 14px; background: var(--color-neutral-200); }
.mx-gauge-band-seg { height: 100%; }
.mx-gauge-band-seg + .mx-gauge-band-seg { border-left: 2px solid var(--color-bg); }
.mx-gauge-band-seg.is-tone-2 { background: var(--color-neutral-300); }
.mx-gauge-band-seg.is-tone-1 { background: var(--color-neutral-500); }
.mx-gauge-band-seg.is-tone-0 { background: var(--color-text); }
.mx-gauge-marker {
  position: absolute; top: -8px; bottom: -4px; width: 3px; margin-left: -1.5px; background: var(--color-accent);
}
.mx-gauge-marker::before {
  content: ''; position: absolute; top: -6px; left: 50%; margin-left: -6px;
  border: 6px solid transparent; border-top-color: var(--color-accent);
}
.mx-gauge-scale { position: relative; height: 18px; margin-top: 6px; font-size: 11px; color: var(--color-neutral-700); font-variant-numeric: tabular-nums; }
.mx-gauge-scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.mx-gauge-scale span:first-child { transform: none; }
.mx-gauge-scale span:last-child { transform: translateX(-100%); }
.mx-gauge-legend { display: flex; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-600); }
.mx-gauge-legend span { text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* — tooltips (replaces the Bootstrap tooltips on the old estimate and condition badges) — */
.mx-tip { position: relative; }
.mx-tip::after {
  content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 30;
  padding: 6px 10px; background: var(--color-text); color: var(--color-bg);
  font: 600 12px/1.3 var(--font-body); letter-spacing: 0; text-transform: none; white-space: nowrap;
  opacity: 0; visibility: hidden; transition: opacity 0.12s ease-in-out; pointer-events: none;
}
.mx-tip.mx-tip-end::after { left: auto; right: 0; }
.mx-tip:hover::after, .mx-tip:focus-visible::after { opacity: 1; visibility: visible; }
@media (hover: none) { .mx-tip:not(:focus-visible)::after { display: none; } }

/* ══ responsive ══ */
@media (max-width: 1024px) {
  .mx-hero, .mx-split, .mx-feature { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .mx-cond-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mx-dark-panel { position: static; }
  .mx-header-inner { gap: 24px; }
  .mx-nav { gap: 20px; }
  .mx-bar-stat { padding: 0 16px; }
}
@media (max-width: 820px) {
  .mx-menu-toggle {
    display: inline-flex; align-items: center; justify-content: center; order: 3;
    width: 40px; height: 40px; background: none; border: 1px solid var(--color-divider); cursor: pointer;
  }
  .mx-menu-toggle span, .mx-menu-toggle span::before, .mx-menu-toggle span::after {
    display: block; width: 18px; height: 2px; background: var(--color-text); position: relative; content: '';
  }
  .mx-menu-toggle span::before { position: absolute; top: -6px; }
  .mx-menu-toggle span::after { position: absolute; top: 6px; }
  .mx-header-inner { flex-wrap: wrap; height: auto; min-height: 64px; gap: 12px; }
  .mx-logo { height: 64px; }
  .mx-logo img { height: 36px; }
  .mx-nav { display: none; order: 4; flex-basis: 100%; flex-direction: column; gap: 0; padding-bottom: 8px; }
  .mx-nav a { padding: 12px 0; border-top: 1px solid var(--color-divider); }
  .mx-header.is-open .mx-nav { display: flex; }
  .mx-header-actions { order: 2; }
  .mx-bar-stat.mx-bar-third { display: none; }
  .mx-bar-inner { grid-template-columns: auto 1fr 1fr auto; }
}
@media (max-width: 640px) {
  .mx-container { padding: 0 16px; }
  .mx-footer-inner { padding: 32px 16px; grid-template-columns: 1fr 1fr; }
  .mx-footer-inner > :first-child { grid-column: 1 / -1; }
  .mx-header-inner { gap: 8px; }
  .mx-logo { padding: 0 10px; }
  .mx-logo img { height: 28px; }
  .mx-header-actions { gap: 6px; }
  .mx-header-actions .btn { padding: 6px 10px; font-size: 13px; }
  .mx-header-actions .mx-hide-sm { display: none; }
  .mx-title, .mx-feature-title { font-size: 32px; }
  .mx-garage-title { font-size: 30px; }
  .mx-cards { grid-template-columns: minmax(0, 1fr); }
  .mx-filters { flex-wrap: wrap; width: 100%; }
  .mx-filter { flex: 1 1 50%; text-align: center; }
  .mx-filter + .mx-filter { border-left: 0; }
  .mx-filter:nth-child(even) { border-left: 2px solid var(--color-text); }
  .mx-filter:nth-child(n+3) { border-top: 2px solid var(--color-text); }
  .mx-section-title { font-size: 26px; }
  .mx-figure-value { font-size: 26px; }
  .mx-cond-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mx-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mx-thumbs > :nth-child(n+5) { display: none; }
  .mx-lists { grid-template-columns: 1fr; gap: 24px; }
  .mx-specs .mx-spec, .mx-kv-row { grid-template-columns: 120px 1fr; }
  .mx-bid-row { flex-direction: column; }
  .mx-bid-row .btn-primary { min-height: 48px; min-width: 0; }
  .mx-bids > li { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .mx-bid-time { white-space: normal; font-size: 13px; }
  .mx-dark-panel { padding: 24px; }
  .mx-bar-inner { grid-template-columns: auto 1fr 1fr; row-gap: 8px; }
  .mx-bar-tag-cell { padding-right: 12px; }
  .mx-bar-stat { padding: 0 12px; }
  .mx-bar-actions { grid-column: 1 / -1; padding-left: 0; }
  .mx-bar-actions .btn { flex: 1; }
}
