:root {
  color-scheme: dark;
  --bg: #050506;
  --surface: #111214;
  --surface-2: #181a1d;
  --line: #2d3035;
  --line-soft: rgba(255, 255, 255, 0.08);
  --muted: #9097a1;
  --text: #f4f5f2;
  --good: #2fd36d;
  --warn: #f2c84b;
  --bad: #f4494b;
  --blue: #3478f6;
  --gold: #d6ad4b;
  --ink: #050506;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(214, 173, 75, 0.09), transparent 260px),
    radial-gradient(circle at 18% 0%, rgba(244, 73, 75, 0.12), transparent 300px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.shell {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 20px;
  border-bottom: 1px solid var(--line);
}

.topbar::before {
  content: "SNK";
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 1px solid rgba(214, 173, 75, 0.55);
  border-radius: 8px;
  color: var(--gold);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  background: linear-gradient(180deg, #17181b, #090a0b);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.eyebrow,
.label {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 42px;
  line-height: 0.98;
  letter-spacing: 0;
}

.status-pill {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.03);
}

.brief {
  max-width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.brief > div {
  min-width: 0;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  min-height: 112px;
}

.brief > div:first-child {
  grid-row: span 2;
}

.brief p,
.listing-row p,
.source-row p {
  margin: 0;
  color: #d2d6dc;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  gap: 6px;
  margin: 0 0 14px;
  padding: 10px 0;
  overflow-x: auto;
  max-width: 100%;
  background: rgba(5, 5, 6, 0.92);
  backdrop-filter: blur(16px);
}

.tab {
  appearance: none;
  border: 1px solid var(--line);
  background: #0b0c0e;
  color: var(--muted);
  border-radius: 8px;
  padding: 10px 13px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.tab.is-active {
  background: var(--text);
  color: var(--ink);
  border-color: var(--text);
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.empty,
.listing-row,
.source-row {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.empty {
  padding: 36px;
  min-height: 220px;
  display: grid;
  align-content: center;
  gap: 12px;
}

.empty strong {
  font-size: 24px;
}

.stack {
  max-width: 100%;
  display: grid;
  gap: 10px;
}

.listing-row,
.source-row {
  min-width: 0;
  padding: 16px;
}

.listing-head {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 118px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(214, 173, 75, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(214, 173, 75, 0.16), transparent 42%),
    linear-gradient(180deg, #18191b, #070708);
  text-decoration: none;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb.placeholder span {
  color: var(--gold);
  font-size: 18px;
  font-weight: 900;
}

.thumb.placeholder small {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.listing-title {
  min-width: 0;
}

.source-line {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.listing-row h2,
.source-row h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.neo-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.neo-dots i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.45);
}

.neo-dots i:nth-child(1) { background: var(--bad); }
.neo-dots i:nth-child(2) { background: var(--warn); }
.neo-dots i:nth-child(3) { background: var(--blue); }
.neo-dots i:nth-child(4) { background: var(--good); }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 13px 0 12px;
}

.price-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 12px;
  max-width: 680px;
}

.price-strip div {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  padding: 11px 12px;
}

.price-strip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.price-strip strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.price-strip div:first-child strong {
  color: #f2f3f5;
}

.price-strip div:last-child {
  border-color: rgba(214, 173, 75, 0.34);
  background: rgba(214, 173, 75, 0.055);
}

.price-strip div:last-child strong {
  color: var(--gold);
}

.assessment-strip {
  max-width: 760px;
  display: grid;
  gap: 7px;
  margin: 12px 0;
  border: 1px solid rgba(52, 120, 246, 0.34);
  border-radius: 8px;
  background: rgba(52, 120, 246, 0.06);
  padding: 12px;
}

.assessment-strip > span {
  color: #9ebeff;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.assessment-strip strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.assessment-strip p {
  margin: 0;
  color: #d2d8e8;
}

.assessment-strip div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.assessment-strip em {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: #cfd8ea;
  background: rgba(0, 0, 0, 0.18);
  padding: 5px 7px;
  font-size: 12px;
  font-style: normal;
}

.badge {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 5px 8px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.18);
  overflow-wrap: anywhere;
}

.badge.reject {
  color: var(--bad);
  border-color: rgba(244, 73, 75, 0.42);
}

.badge.good {
  color: var(--good);
  border-color: rgba(47, 211, 109, 0.42);
}

.badge.last {
  color: var(--gold);
  border-color: rgba(214, 173, 75, 0.56);
  background: rgba(214, 173, 75, 0.09);
}

.badge.number {
  color: var(--ink);
  border-color: var(--gold);
  background: var(--gold);
  font-weight: 900;
}

.listing-row.last-opened {
  border-color: rgba(214, 173, 75, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(214, 173, 75, 0.35),
    0 0 0 1px rgba(214, 173, 75, 0.08),
    0 18px 54px rgba(214, 173, 75, 0.07);
}

.summary {
  max-width: 76ch;
  overflow-wrap: anywhere;
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 0 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--line-soft);
}

.details div {
  min-width: 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.18);
}

.details dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.details dd {
  margin: 4px 0 0;
  color: #e6e8ec;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.link-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.link-strip a {
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  color: #cfd4dc;
  background: rgba(0, 0, 0, 0.18);
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.proof-strip span {
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  color: #cfd4dc;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 8px;
  font-size: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  min-width: 300px;
}

.action-button,
.open-button {
  min-width: 0;
  appearance: none;
  border: 1px solid var(--line);
  background: #0c0d0f;
  color: var(--text);
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 13px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  text-align: center;
  text-decoration: none;
}

.open-button {
  background: var(--text);
  border-color: var(--text);
  color: var(--ink);
  min-width: 132px;
}

.open-button.compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 14px;
}

.action-button.accept {
  border-color: rgba(47, 211, 109, 0.5);
  color: var(--good);
}

.action-button.reject {
  border-color: rgba(244, 73, 75, 0.5);
  color: var(--bad);
}

.action-button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.listing-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--text);
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
  font-weight: 800;
}

a {
  color: var(--text);
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}

ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #cdd3da;
  overflow-wrap: anywhere;
}

li + li {
  margin-top: 6px;
}

@media (max-width: 820px) {
  .shell {
    width: calc(100% - 18px);
    max-width: 620px;
    margin: 0 auto;
    padding-top: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar::before {
    width: 48px;
    height: 48px;
    font-size: 15px;
  }

  h1 {
    font-size: 34px;
  }

  .status-pill {
    white-space: normal;
  }

  .brief,
  .listing-head,
  .details,
  .price-strip {
    grid-template-columns: 1fr;
  }

  .brief > div:first-child {
    grid-row: auto;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
    min-width: 0;
  }

  .open-button {
    grid-column: 1 / -1;
  }

  .thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .action-button {
    width: 100%;
  }
}
