:root {
  --bg: #0b0c0b;
  --surface: #121412;
  --surface-2: #171a16;
  --raised: #1e221c;
  --border: #242922;
  --border-strong: #323a2f;
  --text: #eceee8;
  --muted: #a6ae9e;
  --dim: #767f6e;
  --sage: #9caf88;
  --sage-light: #c3d2b4;
  --sage-deep: #5c6e50;
  --sage-tint: rgba(156, 175, 136, .13);
  --amber: #d9a64e;
  --red: #e0715c;
  --radius: 14px;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --hawk: url("https://images.unsplash.com/photo-1647275705266-090f95db1a4c?w=2200&q=78&auto=format");
  --falcon: url("https://images.unsplash.com/photo-1712841355673-b593765b7af7?w=900&q=78&auto=format");
  --wings: url("https://images.unsplash.com/photo-1709741298206-4fb7ba663a91?w=2000&q=78&auto=format");
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

.duo { position: relative; isolation: isolate; background: #000; }
.duo::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--img) var(--pos, center) / cover no-repeat; filter: grayscale(1) contrast(1.25) brightness(1.15); }
.duo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fade, linear-gradient(transparent, transparent)), var(--sage); mix-blend-mode: multiply; }

.hero {
  --img: var(--hawk);
  --pos: 72% 30%;
  --fade: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .92) 32%, rgba(0, 0, 0, .1) 62%, transparent 80%), linear-gradient(0deg, #000 0%, transparent 32%);
  min-height: 620px;
  display: flex;
}
.emblem { width: 210px; height: 210px; margin: 0 0 18px -18px; background: radial-gradient(closest-side, rgba(156, 175, 136, .22), transparent); }
.emblem img { width: 120px; height: 120px; margin: 45px; }
.emblem canvas { display: block; width: 100%; height: 100%; }
.hero-inner { flex: 1; display: flex; flex-direction: column; padding-top: 22px; padding-bottom: 56px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.logo img { display: block; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6)); }
.logo span { font: 400 30px/1 var(--serif); letter-spacing: .01em; }
.status { color: var(--muted); font-size: 13px; }
.hero-copy { margin-top: auto; max-width: 620px; }
h1 { margin: 0; font: 400 clamp(46px, 7vw, 84px)/.98 var(--serif); letter-spacing: -.015em; }
h1 em { color: var(--sage-light); }
.sub { margin: 18px 0 0; max-width: 480px; color: var(--muted); font-size: 17px; }
.figures { display: flex; flex-wrap: wrap; gap: 0; margin: 34px 0 0; }
.figures div { padding: 0 26px; border-left: 1px solid var(--border-strong); }
.figures div:first-child { padding-left: 0; border-left: 0; }
.figures dd { margin: 0; font: 400 40px/1 var(--serif); }
.figures dt { margin-top: 6px; color: var(--muted); font-size: 13px; }
.figures .hot dd { color: var(--sage-light); }

.next { display: grid; grid-template-columns: 1fr 300px; min-height: 200px; margin: 8px 0 34px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.next-copy { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 28px 32px; }
.next-label { color: var(--sage); font-size: 13px; font-weight: 600; }
.next-time { font: 400 54px/1 var(--serif); color: var(--sage-light); font-variant-numeric: tabular-nums; }
.urgent .next-time { color: var(--red); }
.soon .next-time { color: var(--amber); }
.next-title { margin: 0; max-width: 640px; color: var(--text); font-size: 16px; font-weight: 500; }
.next-buyer { color: var(--muted); font-size: 14px; }
.next-photo { --img: var(--falcon); --pos: center 30%; --fade: linear-gradient(90deg, #121412 0%, transparent 45%); }
.next .btn { align-self: flex-start; margin-top: 6px; }

.toolbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 0; margin-bottom: 6px; background: var(--bg); border-bottom: 1px solid var(--border); }
.search { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.search:focus-within { border-color: var(--sage-deep); }
.search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--dim); stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; padding: 11px 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; }
.search input::placeholder { color: var(--dim); }
.segments { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.segments button { padding: 8px 12px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: 500 13px/1 var(--sans); cursor: pointer; }
.segments button:hover { color: var(--text); }
.segments button[aria-pressed="true"] { background: var(--sage); color: #101310; font-weight: 600; }
.segments button span { margin-left: 6px; opacity: .6; font-variant-numeric: tabular-nums; }
select { padding: 10px 36px 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a6ae9e' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; color: var(--text); font: 500 13px var(--sans); appearance: none; cursor: pointer; }
select:focus { outline: 0; border-color: var(--sage-deep); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; padding-top: 14px; }
.card { --tone: var(--sage-light); position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, var(--surface-2), var(--surface) 55%); overflow: hidden; transition: border-color .2s, transform .2s, box-shadow .2s; }
.card.soon { --tone: var(--amber); }
.card.urgent { --tone: var(--red); }
.card:hover, .card:focus-within { border-color: var(--sage-deep); transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.card:hover h3, .card:focus-within h3 { color: var(--sage-light); }
.stretch { all: unset; cursor: pointer; }
.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.stretch:focus-visible { outline: 0; }
.card:has(.stretch:focus-visible) { outline: 2px solid var(--sage); outline-offset: 2px; }
.card-head { display: flex; align-items: center; gap: 12px; }
.mono { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(145deg, #2a3226, #161a14); box-shadow: inset 0 1px 0 rgba(195, 210, 180, .18), 0 0 0 1px var(--border-strong); color: var(--sage-light); font: 600 13px/1 var(--sans); letter-spacing: .04em; }
.who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card .buyer { overflow: hidden; color: var(--text); font-size: 13.5px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.kind { color: var(--dim); font-size: 12px; }
.kind b { color: var(--sage-light); font-weight: 600; }
.star { position: relative; z-index: 1; flex: none; align-self: flex-start; padding: 4px; border: 0; background: none; color: var(--dim); cursor: pointer; line-height: 0; }
.star svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.star:hover, .star[aria-pressed="true"] { color: var(--sage-light); }
.star[aria-pressed="true"] svg { fill: currentColor; }
.card h3 { margin: 0; font: 600 16px/1.42 var(--sans); transition: color .2s; }
.card h3 span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.buyer { color: var(--muted); font-size: 13.5px; }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: auto; }
.meta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.cat { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--sage-tint); color: var(--sage-light); font-size: 12px; font-weight: 600; }
.cat svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.due { color: var(--muted); font-size: 12.5px; }
.due b { color: var(--text); font-weight: 600; }
.clock { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.clock b { font: 400 38px/.9 var(--serif); color: var(--tone); white-space: nowrap; font-variant-numeric: tabular-nums; }
.clock small { margin-top: 4px; color: var(--dim); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; }
.track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--raised); }
.track i { display: block; width: 0; height: 100%; background: var(--tone); opacity: .85; transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.empty { grid-column: 1 / -1; padding: 80px 0; text-align: center; color: var(--muted); }
.empty b { display: block; margin-bottom: 4px; color: var(--text); font: 400 28px var(--serif); }

.city { --img: var(--wings); --pos: center 40%; --fade: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .25) 40%, rgba(0, 0, 0, .9) 100%); margin-top: 72px; padding: 150px 0 36px; }
.city p { margin: 0 0 10px; max-width: 560px; font: 400 clamp(30px, 4vw, 44px)/1.1 var(--serif); }
.city small { color: var(--muted); font-size: 12.5px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-2); color: var(--text); font: 600 14px var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn:hover { border-color: var(--sage-deep); }
.btn.primary { border-color: var(--sage); background: var(--sage); color: #101310; }
.btn.primary:hover { background: var(--sage-light); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sheet { width: min(620px, 100%); max-width: 100%; height: 100%; max-height: 100%; margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.sheet[open] { animation: slide .25s cubic-bezier(.2, .8, .2, 1); }
.sheet::backdrop { background: rgba(4, 5, 4, .72); }
@keyframes slide { from { transform: translateX(32px); opacity: 0; } }
.sheet-body { display: flex; flex-direction: column; gap: 22px; min-height: 100%; padding: 24px 28px 30px; }
.sheet-head { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 13px; font-weight: 500; }
.sheet-head .new { color: var(--sage-light); }
.close { margin-left: auto; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.close:hover { color: var(--text); border-color: var(--border-strong); }
.sheet h2 { margin: 0; font: 400 30px/1.15 var(--serif); }
.countdown { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.countdown strong { white-space: nowrap; font: 400 42px/1 var(--serif); color: var(--sage-light); font-variant-numeric: tabular-nums; }
.urgent .countdown strong { color: var(--red); }
.soon .countdown strong { color: var(--amber); }
.countdown span { color: var(--muted); font-size: 14px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--border); overflow: hidden; }
.facts div { padding: 14px 16px; background: var(--surface); }
.facts div.wide { grid-column: 1 / -1; }
.facts dt { color: var(--dim); font-size: 12.5px; }
.facts dd { margin: 2px 0 0; font-weight: 500; word-break: break-word; }
.section-title { margin: 0 0 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.docs { display: flex; flex-direction: column; gap: 8px; }
.doc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); text-decoration: none; }
.doc:hover { border-color: var(--sage-deep); background: var(--raised); }
.doc .ext { flex: none; width: 42px; padding: 6px 0; border-radius: 6px; background: var(--sage-tint); color: var(--sage-light); font: 700 10.5px/1 var(--sans); text-align: center; text-transform: uppercase; }
.doc .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.doc svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--sage); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; }
.actions .btn { flex: 1 1 auto; }
.actions .btn.primary { flex-basis: 100%; }

:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }

@media (max-width: 860px) {
  .hero { --pos: 68% 20%; --fade: linear-gradient(0deg, #000 6%, rgba(0, 0, 0, .82) 55%, rgba(0, 0, 0, .35) 100%); min-height: 560px; }
  .emblem { width: 160px; height: 160px; margin-left: -14px; }
  .emblem img { width: 96px; height: 96px; margin: 32px; }
  .next { grid-template-columns: 1fr; }
  .next-photo { order: -1; height: 180px; --fade: linear-gradient(0deg, #121412 0%, transparent 60%); }
  .figures div { padding: 0 18px; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  .status { display: none; }
  .toolbar { position: static; }
  .segments { width: 100%; }
  select { width: 100%; }
  .figures { gap: 16px 0; }
  .figures div:nth-child(3) { padding-left: 0; border-left: 0; }
  .figures div { flex: 0 0 50%; }
  .next-copy { padding: 22px 20px; }
  .sheet-body { padding: 20px 18px 26px; }
  .facts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
