/* Self-hosted Onest and Teko. Licenses accompany the font files. */
@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/onest-latin-ext-wght-normal.woff2) format('woff2-variations');
  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;
}

@font-face {
  font-family: 'Onest Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/onest-latin-wght-normal.woff2) format('woff2-variations');
  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;
}

@font-face {
  font-family: 'Teko';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/fonts/teko-latin-ext-600-normal.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;
}

@font-face {
  font-family: 'Teko';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/fonts/teko-latin-600-normal.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;
}

/* Palette, type and motion follow ../teges/src/styles/tokens.css. */
:root {
  color-scheme: dark;
  --bg-strong: oklch(0.11 0.018 325);
  --bg-soft: oklch(0.18 0.014 327);
  --text: oklch(0.94 0.02 330);
  --text-dim: oklch(0.75 0.018 326);
  --accent: #ff26c9;
  --accent-ink: oklch(0.16 0.04 340);
  --accent-tint: color-mix(in oklab, var(--accent) 14%, var(--bg-soft));
  --line: color-mix(in oklab, var(--text) 15%, var(--bg-soft));
  --line-strong: color-mix(in oklab, var(--text) 33%, var(--bg-soft));
  --font-display: 'Teko', sans-serif;
  --font-body: 'Onest Variable', sans-serif;
  --control-height: 2.65rem;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  font: 16px/1.5 var(--font-body);
  background: var(--bg-strong);
  color: var(--text);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, p, h1, h2 { margin: 0; }
body { font-variant-numeric: tabular-nums; }
button, input { font: inherit; border-radius: 0; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.shell { max-width: 1440px; min-height: 100dvh; margin-inline: auto; padding: 0 var(--gutter) 3rem; }
.frame-bar { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.brand { font-size: 1.36rem; font-weight: 650; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--accent); }
.muted, .secondary { color: var(--text-dim); font-size: .875rem; }
.header-actions { display: flex; align-items: center; gap: .75rem; }
#last-refresh { text-align: right; }
.heading { display: flex; align-items: end; justify-content: space-between; gap: .8rem; padding-block: clamp(1.6rem, 5vw, 3.4rem) 1.25rem; }
h1, .empty h2, .gallery-header h2 { font-family: var(--font-display); text-transform: uppercase; font-weight: 600; }
h1 { font-size: clamp(3rem, 8vw, 6rem); line-height: .86; letter-spacing: .01em; }
.button { min-height: 2.6rem; padding: .45rem .8rem; border: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--text); font-size: .875rem; font-weight: 650; }
.button:hover:not(:disabled) { border-color: var(--accent); }
.primary { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); }
.primary:hover:not(:disabled) { background: #ff71d8; }
.source-picker, .controls { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.3rem; border-top: 1px solid var(--line); padding-block: .7rem; }
#sources-heading, .search, th, .mobile-label { color: var(--text-dim); font-weight: 650; text-transform: uppercase; letter-spacing: .09em; }
#sources-heading, .search, th { font-size: .875rem; }
#source-list { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 0; list-style: none; min-width: 0; }
#source-list li { min-width: 0; max-width: 100%; }
#source-list button { padding: .4rem .65rem; min-height: 2.55rem; max-width: 100%; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); overflow-wrap: anywhere; text-align: left; font-size: .875rem; }
#source-list button:hover { border-color: var(--line-strong); }
#source-list button[aria-pressed=true] { border-color: var(--accent); background: var(--accent-tint); }
#source-list small { margin-left: .4rem; color: #ffb7c5; }
#source-caption { color: #ffb7c5; }
#source-caption:empty { display: none; }
.controls { justify-content: space-between; padding-block: .8rem; }
.views { display: flex; flex-wrap: wrap; gap: .3rem; }
.views button { min-height: 2.55rem; padding: .42rem .58rem; border: 1px solid transparent; border-bottom: 2px solid transparent; background: transparent; color: var(--text-dim); font-size: .875rem; font-weight: 650; }
.views button:hover, .views button[aria-pressed=true] { color: var(--text); }
.views button[aria-pressed=true] { background: var(--bg-soft); border-bottom-color: var(--accent); }
.views span { display: inline-block; padding-inline: .3rem; margin-left: .15rem; background: var(--bg-soft); color: var(--text-dim); }
.views [aria-pressed=true] span { background: var(--accent-tint); color: var(--text); }
.search { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .65rem; }
.control-actions { display: flex; align-items: end; gap: .55rem; min-width: 0; }
#refresh, .search input { height: var(--control-height); }
.search input { min-width: 0; width: min(100%, 14rem); padding: .45rem .55rem; border: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--text); font-size: 1rem; font-weight: 450; letter-spacing: normal; }
.search input::placeholder { color: var(--text-dim); }
.results { border: 1px solid var(--line); background: var(--bg-soft); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
th { white-space: nowrap; background: var(--bg-strong); text-align: left; }
td, th { padding: .8rem .85rem; vertical-align: middle; }
td { border-top: 1px solid var(--line); overflow-wrap: anywhere; }
tbody tr:hover { background: color-mix(in oklab, var(--accent) 4%, var(--bg-soft)); }
.listing { min-width: 16.5rem; width: 34%; }
.listing-layout { display: flex; align-items: center; gap: .75rem; }
.listing-details { min-width: 0; }
.listing a, .listing strong { font-size: 1rem; font-weight: 700; }
.listing a:hover { color: var(--accent); }
.lot-status, .sale, .lot-time { min-width: 6.25rem; }
.secondary { display: block; margin-top: .15rem; }
.status { display: inline-block; padding: .1rem .4rem; border: 1px solid color-mix(in oklab, var(--accent) 58%, var(--bg-soft)); background: var(--accent-tint); color: #ffd2f3; font-weight: 650; }
.status.pending { border-color: #a58152; background: #322619; color: #ffdaa5; }
.status.inactive { border-color: var(--line-strong); background: var(--bg-soft); color: var(--text-dim); }
.mobile-label { display: none; }
.result-count { padding: .55rem .85rem; border-top: 1px solid var(--line); }
.result-count:empty, .empty[hidden] + .table-wrap[hidden] + .result-count { display: none; }
.empty { display: grid; justify-items: center; place-content: center; min-height: 13rem; padding: 1.5rem; text-align: center; }
.empty h2 { font-size: 2.25rem; line-height: .95; }
.empty p:not(:empty) { margin-top: .45rem; color: var(--text-dim); }
.empty code { margin-top: .7rem; padding: .35rem .5rem; border: 1px solid var(--line); background: var(--bg-strong); overflow-wrap: anywhere; }
.error { margin-bottom: .65rem; color: #ffb7c5; }
.login-form { display: grid; gap: .7rem; width: min(100%, 29rem); padding: 1.25rem; border: 1px solid var(--line); border-top: 2px solid var(--accent); background: var(--bg-soft); }
.login-form label { font-size: .875rem; font-weight: 650; }
.login-form input { min-height: var(--control-height); border: 1px solid var(--line-strong); padding: .4rem .55rem; background: var(--bg-strong); color: var(--text); }
.login-form .error { margin: 0; }
.thumbnail { display: grid; flex: 0 0 6rem; width: 6rem; padding: 0; overflow: hidden; border: 1px solid var(--line-strong); background: var(--bg-strong); color: var(--text); }
.thumbnail:hover { border-color: var(--accent); }
.thumbnail img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.thumbnail span { padding: .15rem; font-size: .8125rem; }
#gallery { width: min(62rem, calc(100% - 1.5rem)); max-width: none; padding: .85rem; border: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--text); }
#gallery[open] { animation: gallery-in 240ms var(--ease); }
@keyframes gallery-in { from { opacity: 0; transform: translateY(.45rem); } to { opacity: 1; transform: translateY(0); } }
#gallery::backdrop { background: #0b070bd9; }
.gallery-header, .gallery-controls { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.gallery-header h2 { font-size: 1.85rem; line-height: 1; overflow-wrap: anywhere; }
.gallery-stage { display: grid; place-items: center; min-height: 6rem; margin-block: .65rem; background: var(--bg-strong); }
.gallery-stage img { display: block; width: 100%; max-height: 66dvh; object-fit: contain; }
@media (max-width: 850px) {
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: .85rem; gap: .55rem .7rem; }
  tbody tr + tr { border-top: 1px solid var(--line); }
  td, .lot-status, .sale, .lot-time, .listing { min-width: 0; padding: 0; border: 0; }
  .listing { grid-column: 1 / -1; width: auto; padding-bottom: .1rem; }
  .lot-status { grid-column: 2 / -1; }
  .lot-status .secondary { display: inline; margin-left: .4rem; }
  .mobile-label { display: block; font-size: .75rem; margin-bottom: .13rem; }
}
@media (max-width: 430px) {
  #last-refresh { font-size: .8125rem; }
  .control-actions { width: 100%; }
  .search { flex: 1; min-width: 0; }
  .search input { width: 100%; }
  .views { gap: 0; }
  .views button { padding-inline: .35rem; }
  .thumbnail { flex-basis: 5rem; width: 5rem; }
}
@media (prefers-reduced-motion: reduce) {
  #gallery[open] { animation: none; }
}
