/* ByeBid styles. Tokens follow the ByeBid brand book (light theme). */
:root {
  --surface: #FAF6EF; --surface-raised: #FFFFFF; --surface-sunken: #F1EADF;
  --ink: #14232B; --ink-muted: #5C6A70; --line: #E2D9CB; --line-strong: #7A878D;
  --bye: #BD4B10; --on-bye: #FFFFFF; --peach: #FFE3D3; --bye-deep: #9A3412;
  --stay: #0F6E62; --on-stay: #FFFFFF; --mint: #D7F0EA;
  --sun: #F6C445; --on-sun: #14232B;
  --danger: #B42318; --danger-soft: #FDE8E6;
  --hold: #3D5A6C; --on-hold: #FFFFFF; --hold-soft: #E3ECF1;
  --focus: #BD4B10;
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --shadow-card: 0 1px 2px rgba(20,35,43,.06), 0 4px 12px rgba(20,35,43,.06);
  --shadow-sheet: 0 -8px 32px rgba(20,35,43,.16);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 24px; background: var(--surface); color: var(--ink); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; outline: none; }
img { max-width: 100%; display: block; }
a { color: var(--bye-deep); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; line-height: 20px; }
.tiny { font-size: 13px; line-height: 18px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--surface); padding: 8px 12px; border-radius: var(--r-sm); z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.section { padding-top: 24px; padding-bottom: 48px; }
[hidden] { display: none !important; }
.loading { padding: 64px 16px; text-align: center; color: var(--ink-muted); }
.display-xl { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 6vw, 64px); line-height: 1.02; letter-spacing: -0.025em; }
.display-l { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 4vw, 36px); line-height: 1.1; letter-spacing: -0.015em; }
.title { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 32px; letter-spacing: -0.015em; }
.heading { font-size: 18px; line-height: 24px; font-weight: 600; }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink-muted); text-transform: uppercase; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.logo-word { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.logo-word b { color: var(--bye); font-weight: 800; }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a, .nav button { font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; padding: 10px; border-radius: var(--r-sm); background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button:hover { background: var(--surface-sunken); }
.nav a.btn-primary { background: var(--bye); color: var(--on-bye); padding: 0 12px; }
.nav a.btn-primary:hover { background: var(--bye-deep); }
@media (max-width: 560px) { .nav { margin-left: 0; width: 100%; justify-content: space-between; padding-bottom: 8px; } .nav a, .nav button { font-size: 14px; padding: 8px 6px; } .hide-sm { display: none; } }
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 24px 20px; font-size: 14px; color: var(--ink-muted); }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--ink-muted); }

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 600; min-height: 44px; padding: 0 16px; border-radius: var(--r-md); border: 1.5px solid var(--line-strong); background: var(--surface-raised); color: var(--ink); cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { color: var(--ink); border-color: var(--ink); }
.btn-primary { background: var(--bye); border-color: var(--bye); color: var(--on-bye); }
.btn-primary:hover { background: var(--bye-deep); border-color: var(--bye-deep); color: var(--on-bye); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn-ink:hover { color: var(--surface); }
.btn-hold { background: var(--hold); border-color: var(--hold); color: var(--on-hold); }
.btn-hold:hover { color: var(--on-hold); }
.btn-quiet { border-color: transparent; background: transparent; text-decoration: underline; text-underline-offset: 3px; padding: 0 8px; }
.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-lg { min-height: 52px; font-size: 16px; padding: 0 24px; }
.btn-sm { min-height: 36px; font-size: 14px; padding: 0 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label, .label { font-size: 13px; font-weight: 600; }
.input, select.input, textarea.input { font: inherit; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface-raised); color: var(--ink); width: 100%; }
textarea.input { resize: vertical; min-height: 96px; }
.input:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.input.is-error { border-color: var(--danger); }
.help { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.error { font-size: 14px; color: var(--danger); font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 22px; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--ink); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-sunken); border-radius: var(--r-md); }
.seg button { font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-card); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chip-btn { flex: none; font: inherit; font-size: 14px; font-weight: 600; min-height: 36px; padding: 0 12px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: var(--surface-raised); color: var(--ink); cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }

/* Cards and panels */
.card { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.card-shadow { box-shadow: var(--shadow-card); }
.panel-hold { background: var(--hold-soft); border-radius: var(--r-lg); padding: 12px 16px; color: var(--ink); }
.panel-peach { background: var(--peach); border-radius: var(--r-lg); padding: 16px; }
.panel-mint { background: var(--mint); border-radius: var(--r-lg); padding: 16px; }
.panel-danger { background: var(--danger-soft); border-radius: var(--r-lg); padding: 12px 16px; }
.list { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0 16px; }
.list > * { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > *:last-child { border-bottom: 0; }
.empty { padding: 24px; text-align: center; color: var(--ink-muted); background: var(--surface-sunken); border-radius: var(--r-lg); }

/* Chips and pills */
.chip-leaving { display: inline-flex; align-items: center; gap: 4px; background: var(--peach); color: var(--bye-deep); font-size: 13px; line-height: 16px; font-weight: 600; padding: 6px 8px; border-radius: var(--r-sm); white-space: nowrap; }
.chip-area { font-weight: 400; color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 16px; font-weight: 600; padding: 5px 10px; border-radius: var(--r-pill); background: var(--surface-raised); border: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill-sun { background: var(--sun); border-color: var(--sun); color: var(--on-sun); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 16px; font-weight: 600; padding: 5px 8px; border-radius: var(--r-pill); background: var(--surface-raised); border: 1px solid var(--line); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-stay { color: var(--stay); } .status-hold { color: var(--hold); } .status-muted { color: var(--ink-muted); }
.status-muted::before { background: transparent; border: 1.5px solid currentColor; }
.status .wait { font-weight: 400; color: var(--ink); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 16px; font-weight: 600; padding: 6px 8px; border-radius: var(--r-sm); white-space: nowrap; }
.badge-hold { background: var(--hold-soft); color: var(--hold); }
.badge-stay { background: var(--mint); color: var(--stay); }
.tag { font-size: 12px; font-weight: 600; color: var(--ink-muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }

/* Banners */
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: var(--r-lg); }
.banner-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; }
.banner-top { background: var(--mint); } .banner-top .banner-ico { background: var(--stay); color: var(--on-stay); }
.banner-won { background: var(--stay); color: var(--on-stay); } .banner-won .banner-ico { background: var(--on-stay); color: var(--stay); } .banner-won a { color: var(--on-stay); }
.banner-outbid { background: var(--danger-soft); } .banner-outbid .banner-title { color: var(--danger); } .banner-outbid .banner-ico { background: var(--surface-raised); color: var(--danger); }
.banner-hold { background: var(--hold-soft); } .banner-hold .banner-ico { background: var(--hold); color: var(--on-hold); }
.banner-title { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Photos */
.photo { position: relative; background: var(--surface-sunken); border-radius: var(--r-md); overflow: hidden; aspect-ratio: 1 / 1; display: grid; place-items: center; color: var(--ink-muted); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-ph { width: 40%; height: 40%; opacity: .6; }
.photo-label { position: absolute; left: 8px; bottom: 8px; font-size: 11px; line-height: 14px; background: var(--surface-raised); color: var(--ink); padding: 3px 6px; border-radius: 6px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; }
.thumbs button { flex: none; width: 60px; height: 60px; padding: 0; border-radius: var(--r-sm); border: 2px solid transparent; overflow: hidden; background: var(--surface-sunken); cursor: pointer; }
.thumbs button[aria-pressed="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* Listing cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 240px), 1fr)); gap: 12px; }
.lcard { display: flex; flex-direction: column; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-card); text-decoration: none; color: var(--ink); }
.lcard:hover { color: var(--ink); border-color: var(--line-strong); }
.lcard .photo { border-radius: 0; }
.lcard-status { position: absolute; top: 8px; left: 8px; }
.lcard-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.lcard-price { font-size: 20px; line-height: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lcard-title { font-size: 15px; line-height: 20px; font-weight: 600; }
.lcard-meta { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.lcard .pill { margin-top: 6px; align-self: flex-start; }

/* Sale header */
.sale-head { border-radius: var(--r-lg); overflow: hidden; background: var(--surface-raised); border: 1px solid var(--line); }
.sale-band { display: flex; align-items: center; gap: 8px; background: var(--bye); color: var(--on-bye); padding: 12px 16px; font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.sale-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.sale-lot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--peach); border-radius: var(--r-md); padding: 12px 16px; }

/* Price boxes */
.price3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-variant-numeric: tabular-nums; }
.price3 .big { font-size: 22px; line-height: 28px; font-weight: 700; }
.breakdown { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; font-variant-numeric: tabular-nums; }
.breakdown .r { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; font-size: 15px; }
.breakdown .note { color: var(--ink-muted); font-size: 13px; }
.breakdown .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-weight: 700; font-size: 18px; }
.breakdown .split { font-size: 14px; }
.breakdown .split-first { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }

/* Condition */
.cond-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.cond-step { height: 8px; border-radius: var(--r-pill); background: var(--line); }
.cond-step.on { background: var(--ink-muted); } .cond-step.now { background: var(--ink); }
.cond-labels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.cond-labels .now { color: var(--ink); font-weight: 600; }

/* Slots */
.slots-day { margin-top: 12px; }
.slots-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.slot { font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: var(--surface-raised); color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.slot[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.slot[disabled] { color: var(--ink-muted); border-style: dashed; text-decoration: line-through; cursor: not-allowed; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer; background: var(--surface-raised); }
.opt:has(input:checked) { border-color: var(--ink); }
.opt input { width: 20px; height: 20px; accent-color: var(--ink); }

/* Handover code */
.code { display: flex; justify-content: center; gap: 6px; margin: 16px 0; }
.code span { display: grid; place-items: center; width: 42px; height: 54px; border-radius: var(--r-sm); background: var(--surface-sunken); border: 1.5px solid var(--line-strong); font-family: var(--font-display); font-size: 30px; font-weight: 800; }
.code span:nth-child(3) { margin-right: 10px; }

/* Progress */
.bar { height: 10px; border-radius: var(--r-pill); background: var(--surface-sunken); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--stay); border-radius: inherit; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 12px; }
.stat-n { font-weight: 700; font-size: 22px; line-height: 28px; font-variant-numeric: tabular-nums; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--r-lg); }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--ink-muted); }
tr:last-child td { border-bottom: 0; }

/* Home */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px; align-items: center; padding-top: 48px; padding-bottom: 40px; }
.band { background: var(--surface-raised); border-block: 1px solid var(--line); }
.problems { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.problem { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.problem s { font-size: 18px; font-weight: 700; color: var(--ink-muted); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.steps li { display: flex; gap: 14px; }
.step-n { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-weight: 700; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px; }
.salecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 12px 16px; border-radius: var(--r-md); font-weight: 600; box-shadow: var(--shadow-sheet); z-index: 20; max-width: calc(100% - 32px); }

/* Flyer (A5, prints at 148 x 210 mm) */
.flyer { width: 148mm; min-height: 210mm; margin: 0 auto; background: #FAF6EF; color: #14232B; display: flex; flex-direction: column; box-shadow: var(--shadow-card); }
.flyer-band { display: flex; align-items: center; gap: 8px; background: #BD4B10; color: #fff; padding: 6mm 8mm; font-family: var(--font-display); font-weight: 800; font-size: 22pt; }
.flyer-date { margin-left: auto; background: #fff; color: #9A3412; font-family: var(--font-sans); font-size: 12pt; font-weight: 700; padding: 2mm 3mm; border-radius: 2mm; }
.flyer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm; padding: 6mm 8mm 0; }
.flyer-grid .photo { aspect-ratio: 16 / 10; border-radius: 2mm; }
.flyer-title { font-family: var(--font-display); font-weight: 800; font-size: 26pt; line-height: 1.05; padding: 5mm 8mm 0; }
.flyer-sub { font-size: 11pt; color: #5C6A70; padding: 2mm 8mm 0; }
.flyer-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 4mm; padding: 6mm 8mm; border-top: 1px solid #E2D9CB; }
.flyer-qr { width: 30mm; height: 30mm; background: #fff; padding: 2mm; }
.flyer-qr img { width: 100%; height: 100%; image-rendering: pixelated; }

@media print {
  .site-header, .site-footer, .no-print, .skip { display: none !important; }
  body { background: #fff; }
  .flyer { box-shadow: none; margin: 0; }
  @page { size: A5; margin: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Additions */
.salecard-strip .photo { aspect-ratio: auto; height: 100%; border-radius: 0; }
.cards .photo img, .lcard .photo img { aspect-ratio: 1 / 1; }
.photo-label a { color: var(--ink); font-weight: 600; }
.breakdown .r > span:last-child { white-space: nowrap; }

.banner-won .btn { color: var(--stay); border-color: var(--on-stay); }
td select.input { width: auto; min-width: 110px; }
