.trader-page {
  min-height: 100vh;
  color: rgb(181, 188, 198);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(5, 7, 8, 0.84), rgba(5, 7, 8, 0.97) 34rem, #050708),
    #050708;
}

.trader-page .site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
}

.trader-page button,
.trader-page input,
.trader-page select {
  font: inherit;
}

.nav-inner {
  display: flex;
  width: 100%;
  max-width: 1600px;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}

.brand-group,
.nav-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.brand-link img {
  display: block;
  width: auto;
  height: 2rem;
  object-fit: contain;
  opacity: 0.9;
}

.nav-divider {
  display: none;
  width: 1px;
  height: 1.5rem;
  background: rgba(255, 255, 255, 0.08);
}

.nav-title {
  display: none;
}

.nav-title span {
  display: block;
  color: rgb(246, 247, 249);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.15;
}

.nav-title strong {
  display: block;
  color: rgb(111, 123, 138);
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.trader-page .nav-link,
.trader-page .nav-link-primary,
.trader-page .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  white-space: nowrap;
}

.nav-actions .nav-link:nth-child(1),
.nav-actions .nav-link:nth-child(2) {
  display: none;
}

.trader-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

.trader-shell {
  display: grid;
  gap: 1.1rem;
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
}

/* ----------------------------- Hero ----------------------------- */

.trader-hero {
  position: relative;
  min-height: 30rem;
  overflow: hidden;
}

.trader-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 8, 0.08), rgba(5, 7, 8, 0.7) 56%, rgba(5, 7, 8, 0.92)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 1px);
}

.trader-hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.85), rgba(245, 158, 11, 0.7) 50%, transparent);
}

.trader-hero-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    radial-gradient(circle at 22% 18%, rgba(52, 211, 153, 0.18), transparent 20rem),
    radial-gradient(circle at 78% 12%, rgba(245, 158, 11, 0.16), transparent 22rem),
    radial-gradient(circle at 50% 110%, rgba(125, 211, 252, 0.12), transparent 24rem);
  background-size: 36px 36px, 36px 36px, auto, auto, auto;
  opacity: 0.86;
  mask-image: linear-gradient(135deg, black, transparent 78%);
}

.trader-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: inherit;
  align-content: end;
  gap: 1.1rem;
  padding: 1.5rem;
}

.trader-page h1 {
  max-width: 58rem;
  margin: 0;
  color: rgb(250, 250, 250);
  font-size: clamp(2.25rem, 7vw, 4.6rem);
  font-weight: 800;
  line-height: 1.04;
}

.hero-accent {
  background: linear-gradient(90deg, rgb(134, 239, 172), rgb(253, 186, 116));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.trader-page h2,
.trader-page h3,
.trader-page p {
  margin-top: 0;
}

.hero-text {
  max-width: 46rem;
  margin: 0;
  color: rgb(189, 195, 204);
  font-size: 0.97rem;
  line-height: 1.65;
}

.hero-actions {
  flex-wrap: wrap;
  margin: 0;
}

.kicker.accent {
  border-color: rgba(125, 211, 252, 0.28);
  background: rgba(125, 211, 252, 0.1);
  color: rgb(186, 230, 253);
}

.hero-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.4rem;
}

.summary-card {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.32);
}

.summary-label {
  display: block;
  color: rgb(139, 148, 160);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  min-width: 0;
  margin: 0;
  color: rgb(246, 247, 249);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.4rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.summary-meta {
  display: block;
  color: rgb(120, 132, 146);
  font-size: 0.7rem;
}

.trader-page .accent-card {
  border-color: rgba(52, 211, 153, 0.28) !important;
  background: rgba(16, 185, 129, 0.1) !important;
}

.trader-page .accent-card strong {
  color: rgb(134, 239, 172);
}

.trader-page .budget-card {
  border-color: rgba(245, 158, 11, 0.3) !important;
  background: rgba(245, 158, 11, 0.09) !important;
}

.trader-page .budget-card strong {
  color: rgb(253, 186, 116);
}

/* --------------------- Affordable Now panel --------------------- */

.afford-panel {
  padding: 1rem;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  min-width: 0;
}

.panel-heading h2 {
  min-width: 0;
  margin-bottom: 0;
  color: rgb(246, 247, 249);
  font-size: 1.05rem;
  font-weight: 750;
}

.eyebrow {
  margin-bottom: 0.2rem;
  color: rgb(251, 191, 36);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.afford-meta,
.small-meta {
  color: rgb(143, 153, 166);
  font-size: 0.75rem;
  font-weight: 700;
}

.afford-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.afford-item {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.85rem 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
  color: inherit;
  font: inherit;
}

.afford-item:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.08);
}

.afford-item.ready {
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(16, 185, 129, 0.09);
}

.afford-item.ready:hover {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.14);
}

.afford-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.afford-name {
  min-width: 0;
  color: rgb(246, 247, 249);
  font-size: 0.88rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.afford-cat {
  display: block;
  margin-top: 0.15rem;
  color: rgb(143, 153, 166);
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.afford-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  background: rgba(16, 185, 129, 0.14);
  color: rgb(167, 243, 208);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.afford-pill.locked {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.1);
  color: rgb(252, 165, 165);
}

.afford-progress {
  position: relative;
  height: 0.4rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.afford-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgb(245, 158, 11), rgb(248, 113, 113));
  transition: width 240ms ease;
}

.afford-item.ready .afford-progress > span {
  background: linear-gradient(90deg, rgb(52, 211, 153), rgb(125, 211, 252));
}

.afford-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: rgb(143, 153, 166);
  font-size: 0.72rem;
}

.afford-foot strong {
  color: rgb(232, 234, 238);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
}

.afford-empty {
  grid-column: 1 / -1;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  color: rgb(143, 153, 166);
  text-align: center;
}

/* --------------------- Calculator grid --------------------- */

.calculator-grid,
.notes-grid {
  display: grid;
  gap: 1rem;
}

.inventory-panel {
  padding: 1rem;
}

.panel-hint {
  margin: 0.85rem 0 0;
  color: rgb(143, 153, 166);
  font-size: 0.78rem;
  line-height: 1.55;
}

.inventory-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.inventory-groups {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.inventory-group {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(5, 7, 8, 0.4);
}

.inventory-group.parts {
  border-color: rgba(125, 211, 252, 0.18);
  background: rgba(125, 211, 252, 0.045);
}

.inventory-group.trinkets {
  border-color: rgba(245, 158, 11, 0.18);
  background: rgba(245, 158, 11, 0.045);
}

.inventory-group.guns {
  border-color: rgba(52, 211, 153, 0.18);
  background: rgba(16, 185, 129, 0.045);
}

.group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.group-heading strong {
  display: block;
  color: rgb(246, 247, 249);
  font-size: 0.85rem;
  font-weight: 800;
}

.group-heading span {
  display: block;
  color: rgb(143, 153, 166);
  font-size: 0.7rem;
  margin-top: 0.15rem;
}

.group-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgb(214, 219, 226);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.inventory-group.parts .group-pill {
  border-color: rgba(125, 211, 252, 0.28);
  background: rgba(125, 211, 252, 0.1);
  color: rgb(186, 230, 253);
}

.inventory-group.trinkets .group-pill {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.11);
  color: rgb(253, 186, 116);
}

.inventory-group.guns .group-pill {
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(16, 185, 129, 0.12);
  color: rgb(167, 243, 208);
}

.group-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(0, 1fr);
}

.inventory-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(5.5rem, 7rem);
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 160ms ease, background 160ms ease;
}

.inventory-field:focus-within {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(0, 0, 0, 0.4);
}

.inventory-field.wide {
  grid-column: 1 / -1;
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.06);
}

.inventory-field label {
  min-width: 0;
}

.item-name,
.item-value,
.target-cost,
.combo-total,
.stock-tag,
.recipe-chip {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.item-name {
  display: block;
  color: rgb(235, 238, 243);
  font-size: 0.84rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.item-value {
  display: block;
  margin-top: 0.18rem;
  color: rgb(143, 153, 166);
  font-size: 0.7rem;
}

.inventory-field input {
  min-height: 2.45rem;
  text-align: right;
}

/* --------------------- Target panel --------------------- */

.target-panel {
  align-self: start;
  padding: 1rem;
}

.target-category {
  display: inline-block;
  margin-top: 0.25rem;
  color: rgb(143, 153, 166);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.target-status {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgb(190, 196, 204);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.target-status.ready {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(16, 185, 129, 0.14);
  color: rgb(167, 243, 208);
}

.target-status.locked {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(248, 113, 113, 0.1);
  color: rgb(252, 165, 165);
}

.target-progress {
  position: relative;
  height: 0.5rem;
  margin-top: 0.85rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
}

.target-progress > span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgb(245, 158, 11), rgb(248, 113, 113));
  transition: width 240ms ease;
}

.target-progress.ready > span {
  background: linear-gradient(90deg, rgb(52, 211, 153), rgb(125, 211, 252));
}

.target-breakdown {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.target-empty,
.trade-empty {
  min-width: 0;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  color: rgb(143, 153, 166);
  line-height: 1.5;
}

.target-stat,
.combo-line,
.fixed-line {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  padding: 0.78rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.035);
}

.target-stat span,
.combo-line span,
.fixed-line span {
  display: block;
  color: rgb(143, 153, 166);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.target-stat strong,
.combo-line strong,
.fixed-line strong {
  display: block;
  margin: 0;
  color: rgb(239, 242, 246);
  font-size: 0.95rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.combo-line.success {
  border-color: rgba(52, 211, 153, 0.26);
  background: rgba(16, 185, 129, 0.1);
}

.combo-line.success strong {
  color: rgb(167, 243, 208);
}

.combo-line.warning {
  border-color: rgba(245, 158, 11, 0.26);
  background: rgba(245, 158, 11, 0.09);
}

.combo-line.warning strong {
  color: rgb(253, 186, 116);
}

/* --------------------- Trade catalog --------------------- */

.table-panel {
  position: relative;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 0% 0%, rgba(52, 211, 153, 0.05), transparent 30rem),
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.04), transparent 30rem),
    linear-gradient(180deg, rgba(15, 18, 22, 0.92), rgba(8, 10, 13, 0.96));
  overflow: hidden;
}

.table-panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.4), rgba(245, 158, 11, 0.35), transparent);
}

.table-toolbar {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.toolbar-heading {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.trader-filter-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0;
}

.field {
  display: grid;
  min-width: 0;
  gap: 0.4rem;
}

.field span {
  color: rgb(139, 148, 160);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.trade-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.trade-empty {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 2rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: rgb(143, 153, 166);
  text-align: center;
  line-height: 1.5;
}

/* --------------------- Stock card --------------------- */

.stock-card {
  position: relative;
  display: grid;
  gap: 1rem;
  min-width: 0;
  padding: 1.25rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(22, 26, 32, 0.85), rgba(11, 14, 18, 0.95));
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  overflow: hidden;
}

.stock-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(180deg, rgb(245, 158, 11), rgb(248, 113, 113));
  opacity: 0.6;
  transition: opacity 200ms ease;
}

.stock-card.ready::before {
  background: linear-gradient(180deg, rgb(52, 211, 153), rgb(125, 211, 252));
  opacity: 0.85;
}

.stock-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.6);
}

.stock-card.ready:hover {
  border-color: rgba(52, 211, 153, 0.32);
  box-shadow: 0 12px 32px -14px rgba(16, 185, 129, 0.35);
}

.stock-card.selected {
  border-color: rgba(52, 211, 153, 0.5);
  background:
    linear-gradient(180deg, rgba(16, 32, 28, 0.85), rgba(11, 14, 18, 0.95));
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.18), 0 12px 32px -14px rgba(16, 185, 129, 0.3);
}

.stock-card.selected::before {
  opacity: 1;
  width: 4px;
}

.stock-card-select {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.stock-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  min-width: 0;
}

.stock-card-title {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.trade-item-title {
  display: block;
  color: rgb(246, 247, 249);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  transition: color 160ms ease;
}

.stock-card-select:hover .trade-item-title {
  color: rgb(167, 243, 208);
}

.trade-item-meta {
  display: block;
  color: rgb(143, 153, 166);
  font-size: 0.78rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.stock-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cat-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.6rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgb(214, 219, 226);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cat-tag.value {
  border-color: rgba(125, 211, 252, 0.28);
  background: rgba(125, 211, 252, 0.09);
  color: rgb(186, 230, 253);
}

.cat-tag.fixed {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.09);
  color: rgb(253, 186, 116);
}

.stock-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.6rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(52, 211, 153, 0.22);
  background: rgba(16, 185, 129, 0.08);
  color: rgb(167, 243, 208);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stock-card-progress {
  display: grid;
  gap: 0.4rem;
}

.row-progress {
  position: relative;
  height: 0.4rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.row-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgb(245, 158, 11), rgb(248, 113, 113));
  transition: width 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.row-progress.ready > span {
  background: linear-gradient(90deg, rgb(52, 211, 153), rgb(125, 211, 252));
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.35);
}

.stock-card-body {
  display: grid;
  gap: 0.85rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stock-section {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.stock-section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgb(160, 170, 182);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stock-section-label::before {
  content: "";
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: rgba(143, 153, 166, 0.6);
}

.target-cost {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.65rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  color: rgb(253, 186, 116);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.recipe-list,
.single-count-list,
.combo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
  align-items: center;
}

.recipe-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.32rem 0.6rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: rgb(226, 232, 240);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  transition: border-color 160ms ease, background 160ms ease;
}

.recipe-chip.met {
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(16, 185, 129, 0.1);
  color: rgb(167, 243, 208);
}

.recipe-chip.short {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.09);
  color: rgb(252, 165, 165);
}

.combo-total {
  display: inline-flex;
  align-items: center;
  width: 100%;
  margin-top: 0.25rem;
  color: rgb(134, 239, 172);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
  font-size: 0.78rem;
}

.shortfall {
  display: inline-flex;
  align-items: center;
  width: 100%;
  margin-top: 0.25rem;
  color: rgb(252, 165, 165);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
  font-size: 0.78rem;
}

.unlock-yes,
.unlock-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: 0.4rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.status-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.85);
  }
}

.unlock-yes {
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(16, 185, 129, 0.13);
  color: rgb(134, 239, 172);
}

.unlock-no {
  border: 1px solid rgba(248, 113, 113, 0.32);
  background: rgba(248, 113, 113, 0.09);
  color: rgb(252, 165, 165);
}

/* --------------------- Notes --------------------- */

.note-panel {
  padding: 1.1rem;
}

.note-panel h2 {
  margin-top: 0.25rem;
}

.note-panel p:last-child {
  margin-bottom: 0;
  margin-top: 0.55rem;
  color: rgb(181, 188, 198);
  line-height: 1.6;
}

.note-panel.accent-note {
  border-color: rgba(52, 211, 153, 0.22);
  background:
    linear-gradient(180deg, rgba(16, 32, 28, 0.86), rgba(9, 12, 15, 0.9)),
    rgba(9, 12, 15, 0.9);
}

.note-panel.accent-note .eyebrow {
  color: rgb(134, 239, 172);
}

/* --------------------- Footer --------------------- */
/* Site-wide footer styles live in modern.css under .arc-footer */

/* --------------------- Responsive --------------------- */

@media (min-width: 640px) {
  .nav-inner,
  .trader-shell {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }

  .nav-divider,
  .nav-title {
    display: block;
  }

  .hero-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .table-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(30rem, 0.9fr);
    align-items: end;
  }

  .trader-filter-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(8rem, 0.6fr) minmax(8rem, 0.6fr);
  }
}

@media (min-width: 1100px) {
  .trade-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1500px) {
  .trade-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .nav-inner,
  .trader-shell {
    padding-right: 2rem;
    padding-left: 2rem;
  }

  .trader-hero-content {
    padding: 2rem;
  }

  .calculator-grid {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem);
  }

  .notes-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1160px) {
  .nav-actions .nav-link:nth-child(1),
  .nav-actions .nav-link:nth-child(2) {
    display: inline-flex;
  }

  .group-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .nav-inner {
    align-items: flex-start;
  }

  .nav-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .trader-hero {
    min-height: 28rem;
  }

  .trader-hero-content {
    padding: 1.15rem;
  }

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

  .table-panel {
    padding: 1rem;
  }

  .stock-card {
    padding: 1rem;
  }
}

@media (max-width: 460px) {
  .trader-shell,
  .nav-inner {
    padding-right: 0.85rem;
    padding-left: 0.85rem;
  }

  .hero-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .inventory-field {
    grid-template-columns: minmax(0, 1fr);
  }

  .inventory-field input {
    text-align: left;
  }
}
