.exchange-ui {
  --gold: #f4c433;
  --red: #d53223;
  --edge: #4c432a;
  --muted: #aaa89e;
  --up: #8ddd9d;
  --down: #ff8378;
  color: #f5f3eb;
  font: 15px/1.5 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}
.exchange-ui *, .exchange-ui *::before, .exchange-ui *::after { box-sizing: border-box; }
body.market-page { margin: 0; background: #090909; color-scheme: dark; }
.exchange-ui a { color: inherit; }
.exchange-ui button, .exchange-ui input, .exchange-ui select, .exchange-ui textarea { font: inherit; }
.exchange-ui button, .exchange-ui a, .exchange-ui input, .exchange-ui select, .exchange-ui textarea { -webkit-tap-highlight-color: transparent; }
.exchange-ui :focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.exchange-ui button { cursor: pointer; }
.exchange-ui button:disabled { cursor: not-allowed; opacity: .45; }
.exchange-ui h1, .exchange-ui h2, .exchange-ui h3, .exchange-brand, .category-name, .portal-title {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.06;
  margin: 0;
}
.exchange-ui h1 { font-size: 48px; }
.exchange-ui h2 { font-size: 28px; }
.exchange-ui h3 { font-size: 24px; }
.exchange-ui p { margin: 0; }
.exchange-ui svg { width: 19px; height: 19px; flex-shrink: 0; }
.exchange-ui [hidden] { display: none !important; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 12px; background: #000; z-index: 10; }
.skip-link:focus { top: 12px; }
.exchange-header { border-bottom: 1px solid var(--edge); background: #0d0d0d; }
.exchange-header-inner { max-width: 1440px; margin: auto; min-height: 78px; display: flex; align-items: center; gap: 32px; padding: 16px 32px; }
.exchange-brand { text-decoration: none; color: var(--gold) !important; font-size: 29px; white-space: nowrap; }
.brand-sub { color: #eee; font: 10px/1.4 Arial, sans-serif; display: block; }
.exchange-nav { display: flex; gap: 24px; align-self: stretch; align-items: center; margin-left: auto; }
.exchange-nav a { text-decoration: none; font-size: 14px; padding: 8px 0; border-bottom: 2px solid transparent; }
.exchange-nav a[aria-current="page"] { border-color: var(--gold); color: var(--gold); }
.exchange-nav a:hover { color: var(--gold); }
.preview-badge { display: inline-flex; gap: 7px; align-items: center; color: var(--gold); border: 1px solid var(--edge); padding: 5px 8px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.preview-badge::before { content: ""; width: 5px; height: 5px; background: var(--gold); }
.market-main { max-width: 1440px; margin: auto; padding: 32px; min-height: 72vh; }
.page-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 25px; }
.eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--gold); margin-bottom: 8px !important; }
.heading-sub { margin-top: 10px !important; color: var(--muted); font-size: 14px; }
.action { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 11px 18px; border: 1px solid var(--gold); border-bottom: 3px solid var(--red); background: var(--gold); color: #0c0c0c !important; text-decoration: none; font-weight: 800; font-size: 13px; border-radius: 2px; }
.action:hover { background: #ffe086; }
.action.secondary { background: transparent; color: var(--gold) !important; border-color: var(--edge); }
.action.secondary:hover { border-color: var(--gold); }
.category-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.category-card { display: flex; flex-direction: column; border: 1px solid #77632c; border-radius: 4px; overflow: hidden; background: #0e0e0e; text-decoration: none; transition: border-color .15s; }
.category-card:hover, .category-card[aria-current="true"] { border-color: var(--gold); }
.category-card[aria-current="true"] { box-shadow: inset 0 -3px var(--gold); }
.category-name { color: var(--gold); font-size: 29px; padding: 14px 14px 6px; }
.category-tagline { font-size: 11px; color: var(--muted); padding: 0 14px 12px; }
.category-art { width: 100%; aspect-ratio: 10/7; background-image: url('/assets/market-concept.jpg'); background-size: 425.532% auto; background-repeat: no-repeat; background-position-y: 54.45%; background-color: #181512; }
.art-garage { background-position-x: 2.2%; }
.category-card .art-garage { background-image: url('/assets/garage-correct-bugatti.png'); background-size: cover; background-position: center; }
.art-wrist { background-position-x: 34.2%; }
.art-vault { background-position-x: 66.1%; }
.art-billionaire { background-position-x: 98.2%; }
.category-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--edge); font-size: 12px; color: var(--gold); }
.category-count { color: var(--muted); font-size: 11px; margin-left: auto; }
.data-notice { display: flex; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid #292822; color: var(--muted); font-size: 12px; }
.data-notice strong { color: var(--gold); font-weight: 600; }
.catalogue { margin-top: 30px; }
.catalogue-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.result-count { color: var(--muted); font-size: 12px; }
.market-tools { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search-field { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 10px; border: 1px solid #48473f; padding: 0 12px; background: #111; }
.search-field input { border: 0; background: transparent; color: white; min-width: 0; width: 100%; height: 44px; outline-offset: 0; }
.search-field svg { color: var(--muted); }
.sort-field { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); }
.sort-field select { border: 1px solid #48473f; padding: 10px 28px 10px 10px; background: #111; color: #eee; min-height: 44px; max-width: 100%; }
.filter-tabs { display: flex; gap: 8px 20px; flex-wrap: wrap; border-bottom: 1px solid #37352e; margin-bottom: 20px; }
.filter-tabs a { padding: 7px 0 10px; font-size: 12px; color: var(--muted); border-bottom: 2px solid transparent; text-decoration: none; }
.filter-tabs a[aria-current="true"] { color: var(--gold); border-color: var(--gold); }
.asset-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.asset-card { border: 1px solid #37352c; border-radius: 4px; background: #11110f; padding: 18px; text-decoration: none; min-width: 0; transition: border-color .15s,background .15s; }
.asset-card:hover { border-color: var(--gold); background: #171611; }
.asset-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.asset-card h3 { font-size: 23px; min-height: 50px; overflow-wrap: anywhere; }
.asset-symbol { color: var(--muted); font: 10px/1.5 Arial, sans-serif; display: block; margin-top: 5px; }
.asset-icon { color: var(--gold); padding: 8px; border: 1px solid #554a2b; display: inline-flex; }
.price-label { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.price-row { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.asset-price { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.change { font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }
.mini-chart { position: relative; height: 54px; margin: 16px 0 12px; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; border-top: 1px solid #292822; padding-top: 10px; }
.empty-state { grid-column: 1/-1; padding: 60px 20px; text-align: center; border-block: 1px solid #35332d; }
.empty-state p { color: var(--muted); margin: 14px 0 24px; }
.exchange-footer { max-width: 1440px; margin: 30px auto 0; padding: 24px 32px; border-top: 1px solid #37352c; display: flex; gap: 20px; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.exchange-footer a { color: var(--gold); text-decoration: none; font-weight: 700; }
.crumbs { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; font-size: 12px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--gold); }
.asset-heading { margin-bottom: 18px; }
.detail-layout { display: grid; grid-template-columns: minmax(0,2fr) minmax(260px,1fr); gap: 32px; margin-top: 26px; }
.chart-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.detail-price { display: block; font-size: 38px; line-height: 1.3; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.periods { display: flex; border: 1px solid #494439; }
.periods button { background: transparent; border: 0; color: var(--muted); min-width: 44px; min-height: 38px; font-size: 12px; }
.periods button[aria-pressed="true"] { background: var(--gold); color: #111; font-weight: 700; }
.detail-chart { position: relative; height: 300px; margin-top: 20px; }
.chart-caption { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin: 10px 0 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-block: 1px solid #454033; margin: 0; }
.stats-grid div { padding: 18px 12px 18px 0; }
.stats-grid dt { font-size: 11px; color: var(--muted); }
.stats-grid dd { margin: 7px 0 0; font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.asset-aside { border-left: 1px solid #454033; padding-left: 30px; }
.asset-aside .category-art { border: 1px solid var(--edge); }
.art-caption { color: var(--muted); font-size: 10px; margin-top: 5px !important; }
.asset-aside h2 { margin-top: 22px; }
.reference-list { margin: 12px 0 22px; }
.reference-list div { padding: 11px 0; border-bottom: 1px solid #33312a; }
.reference-list dt { color: var(--muted); font-size: 11px; }
.reference-list dd { margin: 3px 0 0; font-size: 13px; }
.asset-aside .action { width: 100%; }
.related { margin-top: 38px; }
.related h2 { margin-bottom: 18px; }
.related .asset-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.history-data { margin-top: 20px; font-size: 12px; }
.history-data summary { color: var(--muted); cursor: pointer; }
.history-table-wrap { max-height: 220px; overflow: auto; margin-top: 10px; }
.history-data table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.history-data td, .history-data th { padding: 7px; text-align: left; border-bottom: 1px solid #302e26; }
.launch-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(280px,1fr); gap: 54px; margin-top: 28px; }
.launch-form { min-width: 0; }
.launch-form fieldset { padding: 0 0 26px; margin: 0 0 24px; border: 0; border-bottom: 1px solid #403b2e; }
.launch-form legend { margin-bottom: 20px; font-size: 23px; font-family: Impact, sans-serif; text-transform: uppercase; }
.step-number { color: var(--gold); margin-right: 12px; font: 12px Arial, sans-serif; }
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #514b3c; background: #141411; color: #f4f3ee; padding: 12px; border-radius: 2px; min-width: 0; }
.field textarea { resize: vertical; min-height: 100px; }
.field-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.field small, .form-note { color: var(--muted); font-size: 11px; }
.upload-field { border: 1px dashed #655933; padding: 16px; }
.upload-field input { border: 0; padding: 5px 0; font-size: 12px; background: transparent; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.form-message { min-height: 24px; margin-top: 15px !important; font-size: 13px; color: var(--up); }
.form-message.error { color: var(--down); }
.draft-aside { border-left: 1px solid #454033; padding-left: 32px; min-width: 0; }
.draft-aside .category-art { margin: 15px 0 20px; }
.draft-identity { display: flex; gap: 14px; align-items: center; padding: 20px 0; border-block: 1px solid #403b2e; }
.draft-avatar { width: 64px; height: 64px; object-fit: cover; background: #211d13; border: 1px solid #655933; flex-shrink: 0; }
.draft-placeholder { display: grid; place-items: center; color: var(--gold); }
.draft-avatar svg { width: 30px; height: 30px; }
.draft-name { font-size: 22px !important; overflow-wrap: anywhere; }
.draft-pair { color: var(--gold); margin-top: 7px !important; font-size: 13px; overflow-wrap: anywhere; }
.draft-description { color: var(--muted); font-size: 13px; margin-top: 18px !important; white-space: pre-wrap; overflow-wrap: anywhere; }
.draft-aside .action { width: 100%; }
.market-portal { width: min(92vw,1320px); margin: 24px auto 40px; padding-block: 24px; border-block: 1px solid #77632c; background: #080808; }
.portal-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 24px; }
.portal-title { font-size: 42px; color: #f4f3ed; }
.portal-title span { color: var(--gold); }
.portal-copy { margin-top: 8px !important; color: var(--muted); }
.portal-actions { display: flex; gap: 10px; flex-shrink: 0; }
@media (min-width: 1600px) { .market-main { padding-top: 40px; } }
@media (max-width: 1050px) {
  .asset-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .category-name { font-size: 24px; }
  .portal-heading { align-items: flex-start; flex-direction: column; }
  .detail-layout { grid-template-columns: minmax(0,1.5fr) minmax(240px,1fr); gap: 22px; }
  .asset-aside { padding-left: 22px; }
  .launch-layout { gap: 30px; }
}
@media (max-width: 760px) {
  .exchange-header-inner { padding: 14px 18px; gap: 16px; flex-wrap: wrap; }
  .exchange-brand { font-size: 25px; }
  .exchange-nav { order: 3; width: 100%; justify-content: space-between; gap: 18px; }
  .exchange-header-inner > .preview-badge { margin-left: auto; }
  .exchange-nav a { font-size: 13px; }
  .market-main { padding: 24px 18px; }
  .exchange-ui h1 { font-size: 36px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; }
  .page-heading > .action { min-height: 38px; }
  .category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .category-name { font-size: 25px; min-height: 73px; }
  .category-tagline { font-size: 10px; min-height: 37px; }
  .category-count { display: none; }
  .asset-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .asset-card { padding: 14px; }
  .asset-card h3 { font-size: 21px; }
  .asset-icon { padding: 5px; }
  .asset-icon svg { width: 16px; height: 16px; }
  .asset-price { font-size: 19px; }
  .sort-field { width: 100%; justify-content: space-between; }
  .sort-field select { flex: 1; }
  .detail-layout, .launch-layout { grid-template-columns: minmax(0,1fr); }
  .asset-aside, .draft-aside { border-left: 0; border-top: 1px solid #454033; padding: 26px 0 0; }
  .asset-aside .category-art, .draft-aside .category-art { max-width: 440px; }
  .detail-chart { height: 260px; }
  .detail-price { font-size: 32px; }
  .stats-grid dd { font-size: 13px; }
  .related .asset-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .related .asset-card:last-child:nth-child(odd) { grid-column: 1/-1; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .exchange-footer { padding: 24px 18px; margin-top: 10px; gap: 12px; }
  .exchange-footer span { width: 100%; }
  .market-portal { width: calc(100% - 20px); margin-block: 14px 24px; padding-block: 20px; }
  .portal-title { font-size: 33px; }
  .portal-actions { flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .market-main { padding-inline: 12px; }
  .asset-grid { grid-template-columns: 1fr; }
  .category-name { font-size: 21px; }
  .category-tagline { min-height: 38px; }
  .category-count { display: none; }
  .preview-badge { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { .exchange-ui * { transition: none !important; } }

.detail-layout .art-bugatti-reference { background-image: url("/assets/garage-correct-bugatti.png"); background-size: cover; background-position: center; }
