* { box-sizing: border-box; }
:root { color-scheme: dark; font-family: Geist, Inter, system-ui, sans-serif; background: #141414; color: #e5e5e5; font-size: 14px; --accent: #c6a039; --muted: #a3a3a3; --line: #333; --surface: #202020; }
body { margin: 0; }
#app { display: grid; grid-template-columns: 222px minmax(0, 1fr); min-height: 100vh; }
aside { display: flex; flex-direction: column; gap: 24px; background: #191919; border-right: 1px solid var(--line); padding: 22px 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .12em; padding: 3px; color: #e5e5e5; }
.brand span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--accent); border-radius: 4px; color: var(--accent); }
.brand small { font-size: 8px; letter-spacing: .1em; }
nav { display: grid; gap: 3px; }
nav a { padding: 9px 10px; color: var(--muted); border-radius: 4px; }
nav a:hover, button:hover, .button:hover { background: #2c2c2c; }
nav a[aria-current] { color: var(--accent); background: #2a2518; box-shadow: inset 2px 0 var(--accent); }
.profile { margin-top: auto; }
.workspace { min-width: 0; }
.banner { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 12px 26px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.banner strong { color: var(--accent); letter-spacing: .1em; }
main { max-width: 1480px; margin: auto; padding: 26px; }
main:focus { outline: none; }
.page-title { margin-bottom: 20px; }
h1 { font-size: clamp(25px, 4vw, 34px); margin: 0; letter-spacing: -.04em; }
h2 { font-size: 17px; margin: 22px 0 10px; }
p { color: var(--muted); line-height: 1.5; }
.page-title p { margin: 6px 0 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button, input, select, .button { font: inherit; color: inherit; border: 1px solid #505050; background: #191919; border-radius: 4px; padding: 7px 9px; min-height: 34px; }
button, select, .button { cursor: pointer; }
.button { display: inline-flex; align-items: center; }
.primary { background: var(--accent); color: #141414; border-color: var(--accent); font-weight: 700; }
.primary:hover { background: #ddba58; color: #141414; }
.panel, .empty { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; }
.filters, .detail, .empty { padding: 15px; }
.fields, .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; }
label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; min-width: 0; }
input, select { width: 100%; min-width: 0; }
fieldset { border: 0; padding: 0; margin: 14px 0; }
legend { color: var(--muted); padding: 0 0 5px; font-size: 12px; }
.checks, .actions, .spread, .tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.checks label { display: flex; align-items: center; color: #e5e5e5; border: 1px solid var(--line); padding: 2px 7px; border-radius: 4px; }
input[type=checkbox] { width: 15px; margin: 0; accent-color: var(--accent); }
.spread, .tools { justify-content: space-between; }
.tools { margin: 14px 0 8px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.metric { display: grid; gap: 8px; padding: 14px; color: var(--muted); }
.metric strong, .price { color: var(--accent); font-size: 26px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 5px; }
table { border-collapse: collapse; width: 100%; background: var(--surface); }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 8px 10px; }
th { font-weight: 600; color: var(--muted); background: #262626; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #252525; }
small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.numeric { white-space: nowrap; font-variant-numeric: tabular-nums; }
.status { display: inline-block; background: #2c2c2c; color: #d0d0d0; border-radius: 4px; padding: 3px 6px; font-size: 11px; }
.status.active { color: #a4d2b4; background: #25342b; }
.status.unavailable { color: #e6abab; background: #3a2727; }
.favorite { color: var(--accent); min-width: 34px; font-size: 17px; }
.listing-cards { display: none; }
.cards-only .table-wrap { display: none; }
.cards-only .listing-cards { display: grid; }
.listing-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.listing-card { padding: 10px; }
.listing-card a { display: inline-block; font-weight: 700; margin: 4px 0; }
.listing-card p { margin: 1px 0 8px; font-size: 12px; }
.detail { margin-bottom: 12px; }
.detail h2 { margin-top: 0; }
.detail a, .back { color: var(--accent); }
.back { display: inline-flex; margin: 8px 0; }
.back.primary { color: #141414; }
dt { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
dd { margin: 0; }
.scan-list a { display: flex; gap: 6px 14px; flex-wrap: wrap; justify-content: space-between; padding: 12px; }
.scan-list a + a { border-top: 1px solid var(--line); }
.notice, #form-error { color: #f4b0a8; }
.skip, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { z-index: 2; width: auto; height: auto; clip-path: none; padding: 10px; background: #141414; }
@media (max-width: 760px) {
  #app { display: block; }
  aside { gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; }
  nav { display: flex; flex-wrap: wrap; gap: 3px; }
  nav a { padding: 6px; font-size: 12px; }
  .profile { width: min(200px, 100%); }
  main, .banner { padding: 14px; }
  .results .table-wrap { display: none; }
  .listing-cards { display: grid; }
  .metrics { gap: 5px; }
  .metric { padding: 8px; }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
