:root {
  color-scheme: dark;
  --bg: #05070a;
  --text: #f7fbff;
  --muted: #9fb2c8;
  --panel: rgba(5, 8, 13, 0.86);
  --line: rgba(255, 255, 255, 0.1);
  --focus: #41f0d0;
  --gold: #ffcf65;
  --hot: #ff3a48;
  --good: #72ffd8;
  --bad: #ffd98a;
  --code-bg: #05070a;
  --code-text: #d9e5ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(2, 4, 8, 0.18) 0%, rgba(2, 4, 8, 0.74) 62%, #030407 100%),
    radial-gradient(circle at 50% 28%, rgba(255, 207, 101, 0.18), transparent 28%),
    radial-gradient(circle at 16% 16%, rgba(65, 240, 208, 0.2), transparent 24%),
    url("./assets/gotham-market-bg.png") center top / cover fixed,
    #05070a;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
textarea {
  font: inherit;
}

button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  padding: 0 12px;
}

button:hover:not(:disabled) {
  border-color: var(--focus);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

button:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(31, 111, 235, 0.2);
  outline-offset: 2px;
}

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

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(2, 4, 8, 0.54);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  padding: 0 16px;
  backdrop-filter: blur(20px);
  color: #eaf3ff;
  font-size: 0.95rem;
  font-weight: 800;
}

.topbar small {
  margin-left: auto;
  border: 1px solid rgba(255, 207, 101, 0.24);
  border-radius: 999px;
  padding: 8px 12px;
  color: #ffe2a1;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 24px rgba(255, 58, 72, 0.84);
}

.hero {
  display: block;
  min-height: min(72vh, 760px);
  margin: 34px 0 26px;
}

.offer-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 0.24fr) minmax(0, 1fr) minmax(190px, 0.24fr);
  align-items: center;
  gap: 18px;
  min-height: min(72vh, 760px);
}

.offer-window {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(320px, 48vw, 560px);
  border: 1px solid rgba(255, 207, 101, 0.34);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 58, 72, 0.11), transparent 28%),
    linear-gradient(180deg, rgba(6, 11, 18, 0.78), rgba(2, 4, 8, 0.92));
  box-shadow:
    0 28px 120px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 207, 101, 0.12);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  backdrop-filter: blur(18px);
}

.offer-window::before,
.offer-window::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.offer-window::before {
  inset: 18px;
  border: 1px solid rgba(65, 240, 208, 0.2);
  border-radius: 22px;
}

.offer-window::after {
  width: min(64%, 680px);
  height: 160px;
  border-radius: 999px;
  background: rgba(65, 240, 208, 0.16);
  filter: blur(46px);
  opacity: 0.76;
}

.offer-window:hover {
  border-color: rgba(255, 207, 101, 0.62);
  transform: translateY(-2px);
}

.offer-window:focus-visible {
  outline: 3px solid rgba(65, 240, 208, 0.34);
  outline-offset: 4px;
}

.offer-window__scan {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 12px
    );
  opacity: 0.38;
}

.offer-window__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(820px, calc(100% - 72px));
  min-height: 170px;
  border-radius: 24px;
}

.offer-window__title,
.offer-window__meta {
  display: block;
  min-height: 1.2em;
  overflow-wrap: anywhere;
  text-align: center;
}

.offer-window__title {
  color: #fff8e8;
  font-size: clamp(1.5rem, 4.4vw, 4.35rem);
  font-weight: 950;
  line-height: 1.03;
  text-shadow: 0 0 34px rgba(255, 207, 101, 0.28);
}

.offer-window__meta {
  color: #9ffbe8;
  font-size: clamp(0.95rem, 1.7vw, 1.2rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.inventory-rail {
  display: grid;
  gap: 14px;
}

.inventory-card {
  display: grid;
  align-content: space-between;
  gap: 16px;
  min-height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 207, 101, 0.1), transparent 34%),
    rgba(3, 7, 12, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 60px rgba(0, 0, 0, 0.3);
  padding: 16px;
  backdrop-filter: blur(14px);
  color: var(--text);
  text-decoration: none;
}

.inventory-card:hover {
  border-color: rgba(65, 240, 208, 0.52);
  transform: translateY(-2px);
}

.inventory-card:focus-visible {
  outline: 3px solid rgba(65, 240, 208, 0.3);
  outline-offset: 3px;
}

.inventory-card strong {
  color: #fff8e8;
  font-size: 0.95rem;
  line-height: 1.18;
}

.inventory-card span {
  justify-self: start;
  border: 1px solid rgba(255, 207, 101, 0.24);
  border-radius: 999px;
  padding: 7px 10px;
  color: #ffe2a1;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 8ch;
  margin-top: 26px;
  font-family: var(--font-sans, inherit);
  font-size: clamp(3.2rem, 8vw, 6rem);
  font-weight: 950;
  line-height: 0.86;
}

h2 {
  font-size: 1rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

textarea,
pre {
  width: 100%;
  min-height: 520px;
  margin: 0;
  border: 0;
  padding: 16px;
  font-family:
    "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.48;
  letter-spacing: 0;
  overflow: auto;
}

textarea {
  display: block;
  resize: vertical;
  color: var(--text);
  background: var(--code-bg);
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--code-bg);
  color: var(--code-text);
}

.status-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.status-line,
.summary {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.status-line {
  font-weight: 700;
}

.status-line[data-mode="good"] {
  border-color: rgba(15, 123, 84, 0.32);
  color: var(--good);
}

.status-line[data-mode="bad"] {
  border-color: rgba(170, 45, 45, 0.32);
  color: var(--bad);
}

.summary {
  min-height: 84px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

@media (max-width: 860px) {
  .workspace {
    width: min(100% - 20px, 720px);
    padding: 18px 0;
  }

  .tool-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }

  body {
    background:
      linear-gradient(180deg, rgba(2, 4, 8, 0.18) 0%, rgba(2, 4, 8, 0.78) 58%, #030407 100%),
      url("./assets/gotham-market-bg.png") center top / auto 100vh no-repeat fixed,
      #05070a;
  }

  .hero {
    min-height: 640px;
  }

  .offer-stage {
    grid-template-columns: 1fr;
    min-height: 640px;
  }

  .inventory-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    order: 2;
  }

  .inventory-rail--right {
    display: none;
  }

  .offer-window {
    min-height: 420px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 24px;
    padding: 14px;
  }

  .topbar small {
    margin-left: 0;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row {
    justify-content: flex-start;
  }

  textarea,
  pre {
    min-height: 360px;
  }
}
