/*!
 * Crierium — design system
 * Hand written CSS3. No build step, no framework, no external requests.
 * 1. Fonts          2. Tokens          3. Reset            4. Typography
 * 5. Layout         6. Components      7. Storefront       8. Responsive
 */

/* ------------------------------------------------------------------ 1. Fonts */
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/fraunces-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;
}

@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/fraunces-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;
}

/* ----------------------------------------------------------------- 2. Tokens */
:root {
    --paper: #fbf8f3;
    --surface: #ffffff;
    --surface-2: #f5f1ea;
    --surface-3: #efe9df;
    --line: #e7dfd2;
    --line-strong: #d6cbb8;

    --ink: #16130f;
    --ink-2: #4a4239;
    --ink-3: #7a6f62;
    --ink-inverse: #fbf8f3;

    --brand: #7a1f2b;
    --brand-strong: #5e1520;
    --brand-ink: #ffffff;
    --brand-soft: #f6e9ea;
    --brand-line: #e2c8cb;

    --brass: #a97c24;
    --brass-strong: #8a641a;
    --brass-soft: #f8f0dc;
    --brass-line: #e6d5ac;

    --ok: #1f6f4a;
    --ok-soft: #e4f1ea;
    --warn: #a65b09;
    --warn-soft: #fbeeda;
    --danger: #a8261c;
    --danger-soft: #fbe6e4;
    --info: #2c5a78;
    --info-soft: #e6eff5;

    --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
    --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

    --radius-xs: 6px;
    --radius-sm: 9px;
    --radius: 14px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --shadow-1: 0 1px 2px rgba(22, 19, 15, .06), 0 1px 3px rgba(22, 19, 15, .05);
    --shadow-2: 0 4px 12px rgba(22, 19, 15, .07), 0 2px 4px rgba(22, 19, 15, .05);
    --shadow-3: 0 18px 40px rgba(22, 19, 15, .13), 0 4px 12px rgba(22, 19, 15, .06);

    --page: 1200px;
    --page-wide: 1440px;
    --gutter: 20px;
    --header-h: 68px;

    --t-fast: 140ms;
    --t: 220ms;
    --ease: cubic-bezier(.2, .7, .3, 1);

    --z-nav: 20;
    --z-dropdown: 30;
    --z-modal: 40;
    --z-toast: 50;
}

/* ------------------------------------------------------------------ 3. Reset */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, svg, video, canvas { max-width: 100%; height: auto; display: block; }
img { border-style: none; }

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }

a { color: var(--brand); text-decoration: none; transition: color var(--t) var(--ease); }
a:hover { color: var(--brand-strong); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

table { border-collapse: collapse; width: 100%; }

[hidden] { display: none !important; }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 3px;
}

::selection { background: var(--brand); color: var(--brand-ink); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------------------------------------------- 4. Typography */
.display-1, .display-2, .display-3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -.02em;
    color: var(--ink);
}

.display-1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
.display-2 { font-size: clamp(1.9rem, 3.6vw, 2.85rem); }
.display-3 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brass-strong);
}

.lede {
    font-size: clamp(1.02rem, 1.5vw, 1.18rem);
    line-height: 1.7;
    color: var(--ink-2);
    max-width: 62ch;
}

.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.strong { font-weight: 700; }
.tabular { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.prose { max-width: 72ch; color: var(--ink-2); }
.prose h2, .prose h3 { font-family: var(--font-display); color: var(--ink); margin: 1.6em 0 .5em; line-height: 1.25; }
.prose p { margin-bottom: 1.05em; }
.prose ul { margin: 0 0 1.05em 1.1em; }
.prose li { margin-bottom: .35em; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose img { border-radius: var(--radius); margin: 1.4em 0; }

/* ----------------------------------------------------------------- 5. Layout */
.page { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
.page-wide { max-width: var(--page-wide); }

.section { padding-block: clamp(40px, 6vw, 76px); }
.section-tight { padding-block: clamp(28px, 4vw, 48px); }
.section-alt { background: var(--surface); }
.section-ink { background: var(--ink); color: var(--ink-inverse); }
.section-ink .display-1, .section-ink .display-2, .section-ink .display-3 { color: var(--ink-inverse); }
.section-ink .lede { color: rgba(251, 248, 243, .72); }

.stack > * + * { margin-top: var(--stack-gap, 16px); }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.row-wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.grid-auctions { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }

.section-head { margin-bottom: 30px; }
.section-head p { margin-top: 8px; color: var(--ink-3); max-width: 60ch; }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: var(--z-toast);
    background: var(--ink); color: var(--ink-inverse); padding: 12px 18px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------- 6. Components */

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 46px; padding: 0 20px;
    border-radius: var(--radius-pill);
    font-size: .94rem; font-weight: 650; letter-spacing: .005em;
    border: 1px solid transparent;
    transition: background-color var(--t) var(--ease), color var(--t) var(--ease),
                border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
    text-align: center;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--brand-strong); color: var(--brand-ink); box-shadow: var(--shadow-2); }

.btn-secondary { background: var(--ink); color: var(--ink-inverse); }
.btn-secondary:hover { background: #000; color: var(--ink-inverse); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }

.btn-brass { background: var(--brass); color: #fff; }
.btn-brass:hover { background: var(--brass-strong); color: #fff; }

.btn-quiet { background: transparent; color: var(--ink-2); padding-inline: 10px; min-height: 38px; }
.btn-quiet:hover { background: var(--surface-2); color: var(--ink); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8d1d15; color: #fff; }

.btn-sm { min-height: 36px; padding: 0 14px; font-size: .85rem; }
.btn-lg { min-height: 54px; padding: 0 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
}
.card-pad { padding: 22px; }
.card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 16px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.card-head h2, .card-head h3 { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; }
.card-body { padding: 22px; }
.card-foot { padding: 16px 22px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card-hover { transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease), border-color var(--t) var(--ease); }
.card-hover:hover { box-shadow: var(--shadow-3); transform: translateY(-3px); border-color: var(--line-strong); }

/* Badges & pills */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: var(--radius-pill);
    font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.badge-brand { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.badge-brass { background: var(--brass-soft); color: var(--brass-strong); border-color: var(--brass-line); }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: #c6e2d3; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: #f0d9b2; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: #f0c7c2; }
.badge-info { background: var(--info-soft); color: var(--info); border-color: #c6dcea; }
.badge-lg { font-size: .8rem; padding: 6px 14px; }

.dot-live {
    width: 7px; height: 7px; border-radius: 50%; background: var(--danger);
    box-shadow: 0 0 0 0 rgba(168, 38, 28, .55);
    animation: pulse-live 1.8s infinite;
}
@keyframes pulse-live {
    0% { box-shadow: 0 0 0 0 rgba(168, 38, 28, .5); }
    70% { box-shadow: 0 0 0 9px rgba(168, 38, 28, 0); }
    100% { box-shadow: 0 0 0 0 rgba(168, 38, 28, 0); }
}

/* Forms */
.field { display: block; margin-bottom: 16px; }
.field > label, .label {
    display: block; margin-bottom: 7px;
    font-size: .82rem; font-weight: 650; color: var(--ink-2); letter-spacing: .01em;
}
.field-hint { margin-top: 6px; font-size: .78rem; color: var(--ink-3); }
.field-error { margin-top: 6px; font-size: .82rem; color: var(--danger); font-weight: 600; }

.input, .select, .textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    color: var(--ink);
    transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t) var(--ease);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.select {
    appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a4239' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}
.input::placeholder, .textarea::placeholder { color: #a99d8d; }
.input.is-error, .select.is-error, .textarea.is-error { border-color: var(--danger); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; }

.check {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: .9rem; color: var(--ink-2); cursor: pointer;
    min-height: 30px;
}
.check input[type="checkbox"], .check input[type="radio"] {
    width: 19px; height: 19px; margin-top: 2px; accent-color: var(--brand); flex: none; cursor: pointer;
}
.check a { text-decoration: underline; text-underline-offset: 2px; }

.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* Alerts */
.alert {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; border-radius: var(--radius-sm);
    border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
    font-size: .92rem; margin-bottom: 20px;
}
.alert svg { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.alert-success { background: var(--ok-soft); border-color: #c6e2d3; color: #17573a; }
.alert-danger { background: var(--danger-soft); border-color: #f0c7c2; color: #8d1d15; }
.alert-warn { background: var(--warn-soft); border-color: #f0d9b2; color: #7e4406; }
.alert-info { background: var(--info-soft); border-color: #c6dcea; color: #21485f; }
.alert-brand { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-strong); }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table { font-size: .92rem; }
.table th {
    text-align: left; font-size: .74rem; font-weight: 700; letter-spacing: .09em;
    text-transform: uppercase; color: var(--ink-3);
    padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color var(--t) var(--ease); }
.table tbody tr:hover { background: var(--surface-2); }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Pagination */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }
.pagination a, .pagination span {
    min-width: 40px; height: 40px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-size: .88rem; font-weight: 600; color: var(--ink-2); background: var(--surface);
    transition: background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.pagination a:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }
.pagination .active span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pagination .disabled span { opacity: .45; }

/* Empty state */
.empty { text-align: center; padding: 56px 20px; }
.empty svg { width: 46px; height: 46px; color: var(--ink-3); margin: 0 auto 14px; opacity: .6; }
.empty h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 6px; }
.empty p { color: var(--ink-3); max-width: 44ch; margin: 0 auto 18px; }

/* Avatar */
.avatar {
    width: 38px; height: 38px; border-radius: 50%; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-soft); color: var(--brand);
    font-weight: 700; font-size: .86rem; letter-spacing: .02em;
    border: 1px solid var(--brand-line); overflow: hidden;
}
.avatar-lg { width: 62px; height: 62px; font-size: 1.3rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Stat tile */
.stat {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 20px; box-shadow: var(--shadow-1);
}
.stat-label { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.stat-value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; line-height: 1.15; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-note { font-size: .82rem; color: var(--ink-3); margin-top: 4px; }

/* Price */
.price { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; }
.price-lg { font-size: 2rem; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tab {
    padding: 11px 16px; font-size: .9rem; font-weight: 620; color: var(--ink-3);
    border-bottom: 2px solid transparent; white-space: nowrap;
    transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); }

/* Progress */
.progress { width: 100%; height: 8px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: var(--radius-pill); }

/* ------------------------------------------------------------ 7. Storefront */

.site-header {
    position: sticky; top: 0; z-index: var(--z-nav);
    background: rgba(251, 248, 243, .92);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; min-height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); flex: none; }
.logo:hover { color: var(--ink); }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-word { font-family: var(--font-display); font-size: 1.32rem; font-weight: 700; letter-spacing: -.015em; }
.logo-tag { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brass-strong); display: block; line-height: 1; margin-top: 2px; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.site-nav a {
    padding: 9px 13px; border-radius: var(--radius-sm);
    font-size: .91rem; font-weight: 600; color: var(--ink-2);
    transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.site-nav a:hover, .site-nav a.is-active { background: var(--surface-2); color: var(--ink); }
.site-nav a.is-active { color: var(--brand); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-search { position: relative; }
.header-search .input { min-height: 40px; padding-left: 38px; width: 210px; }
.header-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-3); pointer-events: none; }

.icon-btn {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink-2); border: 1px solid transparent;
    transition: background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.has-dot { position: relative; }
.icon-btn.has-dot::after {
    content: ''; position: absolute; top: 7px; right: 8px;
    width: 8px; height: 8px; border-radius: 50%; background: var(--brand);
    border: 2px solid var(--paper);
}

.nav-toggle { display: none; }
.mobile-nav { display: none; }

/* Hero */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(900px 420px at 12% -8%, rgba(169, 124, 36, .14), transparent 62%),
        radial-gradient(760px 420px at 88% 4%, rgba(122, 31, 43, .10), transparent 60%),
        var(--paper);
    border-bottom: 1px solid var(--line);
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(22, 19, 15, .035) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(22, 19, 15, .035) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(circle at 50% 30%, #000 10%, transparent 72%);
    -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 10%, transparent 72%);
    pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; padding-block: clamp(52px, 7vw, 96px); }
.hero h1 { margin: 16px 0 18px; }
.hero h1 em { font-style: italic; color: var(--brand); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-trust { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-trust .stat-value { font-size: 1.6rem; }

.hero-visual { position: relative; }

/* The three lots of the hero cascade diagonally instead of stacking: they all
   share one grid cell, so the hero stays as tall as a single card. The offsets
   use the individual `translate` / `rotate` properties on purpose — the card
   hover uses `transform`, and the two compose instead of overwriting. */
.hero-stack { display: grid; grid-template-columns: 88%; padding-bottom: 140px; }
.hero-stack .auction-card { grid-area: 1 / 1; }
.hero-stack .auction-card .auction-media { aspect-ratio: 16 / 10; }
.hero-stack .auction-card:nth-child(1) { z-index: 3; }
.hero-stack .auction-card:nth-child(2) { z-index: 2; translate: 6% 64px; rotate: -1.4deg; }
.hero-stack .auction-card:nth-child(3) { z-index: 1; translate: 12% 128px; rotate: -2.6deg; }
.hero-stack .auction-card:hover { z-index: 5; }

.hero-badge {
    position: absolute; top: -18px; right: 8px; z-index: 6;
    background: var(--ink); color: var(--ink-inverse);
    border-radius: var(--radius-pill); padding: 9px 16px;
    font-size: .8rem; font-weight: 650;
    box-shadow: var(--shadow-3);
    display: inline-flex; align-items: center; gap: 8px;
}

/* Auction card */
.auction-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-1);
    display: flex; flex-direction: column;
    transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease), border-color var(--t) var(--ease);
}
.auction-card:hover { box-shadow: var(--shadow-3); transform: translateY(-3px); border-color: var(--line-strong); }
.auction-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-3); overflow: hidden; }
.auction-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 420ms var(--ease); }
.auction-card:hover .auction-media img { transform: scale(1.045); }
.auction-media .media-fallback {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2)); color: var(--ink-3);
}
.media-fallback svg { width: 40px; height: 40px; opacity: .5; }
.auction-media-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.auction-body { padding: 16px 17px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.auction-title { font-family: var(--font-display); font-size: 1.03rem; font-weight: 600; line-height: 1.34; }
.auction-card a.auction-title:hover { color: var(--brand); }
.auction-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.auction-seller { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--ink-3); }

.countdown { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .86rem; color: var(--ink); }
.countdown.is-over { color: var(--ink-3); font-weight: 600; }
.countdown-label { display: block; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }

/* Detail page */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .95fr); gap: 32px; align-items: start; }
.gallery-main { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-3); aspect-ratio: 4 / 3; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumb { width: 76px; height: 60px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface-3); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.bid-panel { position: sticky; top: calc(var(--header-h) + 18px); }
.bid-amount { display: flex; align-items: baseline; gap: 10px; }
.bid-amount .price { font-size: 2.3rem; line-height: 1; }
.bid-input-wrap { position: relative; }
.bid-input-wrap .input { padding-right: 62px; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.bid-input-wrap .suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: .84rem; color: var(--ink-3); font-weight: 600; }
.bid-hint { font-size: .84rem; color: var(--ink-3); }
.bid-steps { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.bid-step {
    padding: 7px 13px; border-radius: var(--radius-sm); border: 1px solid var(--line);
    background: var(--surface-2); font-size: .84rem; font-weight: 650; color: var(--ink-2);
    transition: background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.bid-step:hover { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

.bid-list { list-style: none; margin: 0; padding: 0; }
.bid-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.bid-list li:last-child { border-bottom: 0; }
.bid-amount-sm { font-weight: 700; font-variant-numeric: tabular-nums; }
.bid-leading { color: var(--brand); }

/* Category tiles */
.category-tile {
    display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
    padding: 20px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface); color: var(--ink);
    transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
    min-height: 44px;
}
.category-tile:hover { border-color: var(--brass); box-shadow: var(--shadow-2); transform: translateY(-2px); color: var(--ink); }
.category-icon { width: 42px; height: 42px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.category-icon svg { width: 21px; height: 21px; }
.category-count { font-size: .78rem; color: var(--ink-3); }

/* Feature list */
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--brass-soft); color: var(--brass-strong); display: flex; align-items: center; justify-content: center; }
.feature-icon svg { width: 21px; height: 21px; }
.feature h3 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 4px; }
.feature p { color: var(--ink-3); font-size: .92rem; }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 22px; }
.step { position: relative; padding-left: 60px; }
.step::before {
    counter-increment: step; content: counter(step);
    position: absolute; left: 0; top: 0;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--ink); color: var(--ink-inverse);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
}
.step h3 { font-family: var(--font-display); font-size: 1.08rem; margin-bottom: 5px; }
.step p { color: var(--ink-3); font-size: .93rem; }

/* Testimonial */
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.quote p { font-family: var(--font-display); font-size: 1.06rem; line-height: 1.55; margin-bottom: 16px; }
.quote-author { display: flex; align-items: center; gap: 12px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center; min-height: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; color: var(--brass); font-weight: 400; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { margin-top: 10px; color: var(--ink-2); }

/* Footer */
.site-footer { background: var(--ink); color: rgba(251, 248, 243, .74); padding-block: 56px 26px; }
.site-footer a { color: rgba(251, 248, 243, .74); }
.site-footer a:hover { color: var(--brass); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; }
.footer-brand .logo { color: var(--ink-inverse); margin-bottom: 14px; }
.footer-brand p { font-size: .92rem; max-width: 34ch; }
.footer-col h4 { font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; color: var(--brass); margin-bottom: 14px; font-weight: 700; }
.footer-col li { margin-bottom: 9px; font-size: .92rem; }
.footer-bottom { margin-top: 42px; padding-top: 20px; border-top: 1px solid rgba(251, 248, 243, .14); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .84rem; }
.pay-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-chip { border: 1px solid rgba(251, 248, 243, .22); border-radius: 7px; padding: 5px 10px; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }

/* Breadcrumb */
.breadcrumb { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .84rem; color: var(--ink-3); margin-bottom: 18px; }
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { opacity: .5; }

/* Filter bar */
.filter-bar {
    display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
    padding: 16px 18px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 24px;
}
.filter-bar .field { margin-bottom: 0; min-width: 160px; }
.filter-bar .input, .filter-bar .select { min-height: 42px; }

/* Chat widget */
.chat-panel {
    /* Sits above the launcher so the send button is never covered. */
    position: fixed; right: 20px; bottom: 88px; z-index: 35;
    width: min(340px, calc(100vw - 40px));
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-3); overflow: hidden;
}
.chat-toggle {
    position: fixed; right: 20px; bottom: 20px; z-index: var(--z-dropdown);
    width: 54px; height: 54px; border-radius: 50%;
    background: var(--brand); color: #fff; box-shadow: var(--shadow-3);
    display: flex; align-items: center; justify-content: center;
    transition: background-color var(--t) var(--ease);
}
.chat-toggle:hover { background: var(--brand-strong); }
.chat-toggle svg { width: 23px; height: 23px; }
.chat-head { background: var(--ink); color: var(--ink-inverse); padding: 13px 16px; font-weight: 650; font-size: .92rem; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-head button { color: rgba(251, 248, 243, .72); display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; }
.chat-head button:hover { color: var(--ink-inverse); background: rgba(251, 248, 243, .12); }
.chat-head button svg { width: 16px; height: 16px; }
.chat-body { max-height: 260px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.chat-msg { background: var(--surface-2); border-radius: 12px; padding: 9px 12px; font-size: .87rem; max-width: 86%; }
.chat-msg.is-staff { background: var(--brand-soft); align-self: flex-end; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }

/* Cookie banner */
.cookie-banner {
    position: fixed; left: 20px; bottom: 20px; z-index: var(--z-modal);
    width: min(420px, calc(100vw - 40px));
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-3); padding: 20px;
}
.cookie-banner h4 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 6px; }
.cookie-banner p { font-size: .88rem; color: var(--ink-3); margin-bottom: 14px; }

/* Auth pages */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-2); }
.auth-card h1 { font-family: var(--font-display); font-size: 1.7rem; margin-bottom: 6px; }
.auth-alt { text-align: center; font-size: .9rem; color: var(--ink-3); margin-top: 20px; }
.auth-alt a { font-weight: 650; }

/* Toast */
.toast-host { position: fixed; top: 18px; right: 18px; z-index: var(--z-toast); display: grid; gap: 10px; max-width: min(380px, calc(100vw - 36px)); }
.toast {
    background: var(--ink); color: var(--ink-inverse);
    border-radius: var(--radius-sm); padding: 13px 16px; box-shadow: var(--shadow-3);
    font-size: .9rem; display: flex; gap: 10px; align-items: flex-start;
    animation: toast-in 240ms var(--ease);
}
.toast.is-success { background: #17573a; }
.toast.is-error { background: #8d1d15; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ 8. Responsive */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .hero-stack { grid-template-columns: 84%; padding-bottom: 124px; }
    .hero-stack .auction-card:nth-child(2) { translate: 5% 56px; }
    .hero-stack .auction-card:nth-child(3) { translate: 10% 112px; }
    .detail-grid { grid-template-columns: 1fr; }
    .bid-panel { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 860px) {
    .site-nav, .header-search { display: none; }
    .nav-toggle { display: inline-flex; }
    .mobile-nav {
        display: block; border-top: 1px solid var(--line);
        padding: 14px 0 20px; background: var(--paper);
    }
    .mobile-nav a { display: block; padding: 12px 4px; font-weight: 600; border-bottom: 1px solid var(--line); }
    .mobile-nav form { margin-top: 14px; }
    .mobile-nav .btn { width: 100%; }
    .mobile-nav[data-open="false"] { display: none; }
}

@media (max-width: 640px) {
    :root { --gutter: 16px; }

    /* The header has to fit a 360px phone: the sign in link lives in the
       mobile menu as well, and the tagline would push the burger off screen. */
    .header-inner { gap: 10px; }
    .header-actions { gap: 6px; }
    .header-actions > .btn-ghost { display: none; }
    .header-actions > .btn { padding-inline: 13px; }
    .logo-word { font-size: 1.16rem; }
    .logo-tag { display: none; }

    .hero-trust { gap: 20px; }
    .hero-stack { grid-template-columns: 100%; padding-bottom: 132px; }
    .hero-stack .auction-card:nth-child(2) { translate: 0 60px; }
    .hero-stack .auction-card:nth-child(3) { translate: 0 120px; }
    .footer-grid { grid-template-columns: 1fr; }
    .card-pad, .card-body { padding: 17px; }
    .price-lg { font-size: 1.7rem; }
    .bid-amount .price { font-size: 1.85rem; }
    .auth-card { padding: 24px 20px; }
    /* On a phone the banner sits just below the sticky header: at the bottom
       it would cover the chat launcher, and at the very top it would cover
       the burger button in the header. */
    .cookie-banner { left: 12px; right: 12px; width: auto; top: calc(var(--header-h) + 10px); bottom: auto; }
    .chat-panel { left: 12px; right: 12px; width: auto; bottom: 84px; }
    .chat-toggle { right: 16px; bottom: 16px; }
}

@media print {
    .site-header, .site-footer, .chat-toggle, .chat-panel, .cookie-banner { display: none !important; }
}

/* ------------------------------------------------------- Utility classes */
.overline { letter-spacing: .08em; text-transform: uppercase; }
.avatar-xs { width: 24px; height: 24px; font-size: .7rem; }
.chart-axis-labels { justify-content: space-between; margin-top: 6px; }
.grid-2-tight { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.flash-wrap { margin-top: 20px; }
.mt-10 { margin-top: 10px; }
.mt-8 { margin-top: 8px; }
.gap-10 { gap: 10px; }
.inline-form { display: inline-flex; }
.list-plain { list-style: none; padding: 0; margin-top: 16px; }
.text-ink { color: var(--ink); }
.center-block { margin-inline: auto; }
.narrow { max-width: 820px; }
.section-ink .stat { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .14); }
.section-ink .stat-label { color: rgba(251, 248, 243, .55); }
.section-ink .stat-value { color: var(--ink-inverse); }
.section-ink .stat-note { color: rgba(251, 248, 243, .55); }
.section-ink .eyebrow { color: var(--brass); }
.hero-cta.is-centered { justify-content: center; }
.card-narrow { max-width: 640px; }
.card-mid { max-width: 720px; }
.card-wide { max-width: 860px; }
.card-narrow-lg { max-width: 760px; }
.stack-lg { --stack-gap: 20px; }
.mb-16 { margin-bottom: 16px; }
.text-brand { color: var(--brand); }
.qr-frame { border-radius: var(--radius-sm); }
.img-rounded { border-radius: var(--radius); }
