:root {
  --font-sans: "Market Sans", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #f7f7f7;
  --surface: #ffffff;
  --surface-alt: #f3f4f6;
  --ink: #111820;
  --ink-soft: #5b6673;
  --line: #d9d9d9;
  --brand: #3665f3;
  --brand-dark: #264dc2;
  --signal: #ffd814;
  --signal-soft: #fff4ce;
  --mint: #eaf6ff;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow: 0 8px 22px rgba(17, 24, 32, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
  background: var(--bg);
}

a {
  color: inherit;
}

.site-shell,
footer {
  width: min(1320px, 94vw);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.topbar-utility {
  border-bottom: 1px solid #ececec;
  background: #fafafa;
  font-size: 0.78rem;
}

.topbar-utility-inner {
  width: min(1320px, 94vw);
  margin: 0 auto;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.topbar-utility-inner p {
  margin: 0;
  color: #555;
  font-weight: 600;
}

.utility-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.utility-nav a {
  text-decoration: none;
  color: #445266;
  font-weight: 600;
}

.utility-nav a:hover,
.utility-nav a:focus-visible {
  color: var(--brand-dark);
}

.topbar-main {
  background: #fff;
}

.topbar-inner {
  width: min(1320px, 94vw);
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  gap: 0.9rem;
  align-items: center;
  justify-content: flex-start;
  padding: 0.7rem 0;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
}

.logo-link img {
  width: 140px;
  height: auto;
}

.market-search {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 112px;
  align-items: stretch;
  gap: 0.45rem;
  min-width: 320px;
}

.market-search select,
.market-search input {
  height: 44px;
  border: 1px solid #b9c3d2;
  border-radius: 999px;
  background: #fff;
  padding-inline: 0.9rem;
}

.market-search button {
  border: 1px solid #1e4bd9;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.market-search button:hover {
  background: var(--brand-dark);
}

.nav {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.nav a {
  text-decoration: none;
  font-weight: 700;
  color: #2c3e55;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.35rem 0.64rem;
  font-size: 0.8rem;
}

.nav a:hover,
.nav a:focus-visible {
  border-color: #d5dded;
  color: var(--brand-dark);
  background: #f4f8ff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.admin-header {
  margin-top: 1rem;
  border: 1px solid #d9b20f;
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, #fff7d9 0%, #ffeab3 45%, #fff3cc 100%);
  box-shadow: var(--shadow);
  padding: 0.95rem 1rem;
}

.admin-header-inner {
  display: grid;
  gap: 0.45rem;
}

.admin-label {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #6d4f00;
}

.admin-copy {
  margin: 0;
  font-size: 0.86rem;
  color: #5c4a1a;
}

.admin-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-link {
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid #d9b20f;
  background: #fff8e1;
  color: #5c4a1a;
  padding: 0.34rem 0.68rem;
  font-size: 0.81rem;
  font-weight: 700;
}

.admin-link:hover,
.admin-link:focus-visible {
  background: #fff;
}

.admin-link.is-active {
  background: #6d4f00;
  border-color: #6d4f00;
  color: #fff;
}

.hero {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: clamp(1.1rem, 2.5vw, 2.2rem);
}

.hero-rich {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 1rem;
  align-items: start;
}

.hero h1 {
  margin: 0.25rem 0 0.52rem;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(1.65rem, 3vw, 2.9rem);
  line-height: 1.08;
  max-width: 18ch;
}

.hero p {
  margin: 0;
  color: var(--ink-soft);
}

.hero-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.88rem;
  background: #fbfcff;
}

.hero-panel-links {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.35rem;
}

.hero-panel-links a {
  font-size: 0.86rem;
  color: var(--brand-dark);
}

.home-intro-hero {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

.home-intro-hero > * {
  min-width: 0;
}

.home-intro-media {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 260px;
  max-height: 430px;
  width: 100%;
  background: #eaf2f7;
}

.home-intro-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.home-intro-copy {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  justify-content: center;
}

.home-intro-copy .hero-panel-links {
  margin-top: 0.25rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.46rem;
  margin-top: 0.85rem;
}

.pill {
  background: var(--signal-soft);
  border: 1px solid #f4dc96;
  border-radius: 999px;
  padding: 0.31rem 0.64rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #694d07;
}

.kpi-title {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
}

.kpi-value {
  margin: 0.35rem 0 0;
  font-size: 1.42rem;
  font-weight: 700;
}

.surface {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: baseline;
  margin-bottom: 0.8rem;
}

.section-head h2,
.section-head h3,
.card h3,
.card h4,
.spotlight-card h3,
.region-card h3,
.legal-card h3,
.method-card h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 800;
}

.section-head p,
.small,
.meta,
.breadcrumb,
.notice,
.region-card p,
.legal-card p,
.method-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.control-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1fr;
  gap: 0.62rem;
}

.page-search-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr auto;
  gap: 0.62rem;
  align-items: center;
}

.control-group label {
  display: block;
  font-size: 0.79rem;
  margin-bottom: 0.27rem;
  font-weight: 700;
  color: var(--ink-soft);
}

input,
select,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.62rem 0.67rem;
  background: #fff;
}

textarea {
  min-height: 180px;
  resize: vertical;
}

.toggle-row {
  margin-top: 0.72rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.toggle-item {
  display: inline-flex;
  gap: 0.44rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.cards,
.spotlight-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 0.8rem;
}

.featured-category-rows {
  display: grid;
  gap: 0.88rem;
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.72rem;
}

.track-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #f8fcfd;
  padding: 0.8rem;
}

.track-card h3 {
  margin: 0 0 0.35rem 0;
  font-family: var(--font-sans);
  font-weight: 800;
}

.category-slider-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.75rem;
}

.category-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.65rem;
}

.category-row-head h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 800;
}

.slider-nav {
  display: inline-flex;
  gap: 0.35rem;
}

.slider-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.slider-btn:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.slider-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.slider-btn:disabled:hover {
  border-color: var(--line);
  color: var(--ink);
}

.card,
.spotlight-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.8rem;
  display: grid;
  gap: 0.42rem;
  align-content: start;
  align-items: start;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover,
.spotlight-card:hover {
  box-shadow: 0 10px 26px rgba(17, 24, 32, 0.12);
  transform: translateY(-1px);
}

.card.card-clickable {
  cursor: pointer;
}

.card.card-clickable:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.product-image {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #eceff3;
  background: #fff;
  padding: 0.4rem;
}

.hero-image {
  max-width: 420px;
  margin: 0.55rem 0 0.85rem;
}

.thumb-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.video-row {
  display: flex;
  gap: 0.52rem;
  flex-wrap: wrap;
  margin: 0.22rem 0 0.85rem;
}

.product-video {
  width: min(320px, 100%);
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #000;
}

.product-thumb {
  width: 78px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f3f8fa;
}

.spotlight-card {
  background: #fff;
}

.spotlight-top {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  color: #365cad;
  font-weight: 700;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  border-radius: 999px;
  background: #f1f4f8;
  color: #2e4059;
  padding: 0.12rem 0.42rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.card h3 {
  margin: 0.06rem 0 0.02rem;
  font-size: 0.98rem;
  line-height: 1.26;
  font-family: var(--font-sans);
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.market-seller,
.market-rating,
.market-proof,
.market-delivery {
  margin: 0;
  font-size: 0.81rem;
  color: var(--ink-soft);
}

.market-seller {
  font-size: 0.78rem;
}

.market-stars {
  color: #f08804;
  letter-spacing: 0.02em;
  font-size: 0.83rem;
}

.market-rating-value {
  font-weight: 700;
  color: #1a293b;
}

.market-price {
  margin: 0.1rem 0 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.08rem;
  color: #111820;
}

.price-symbol {
  font-size: 0.86rem;
  font-weight: 700;
}

.price-code {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.price-whole {
  font-size: 1.58rem;
  line-height: 1;
  font-weight: 700;
}

.price-cents {
  font-size: 0.88rem;
  font-weight: 700;
}

.market-price-live {
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155;
}

.market-proof {
  font-size: 0.78rem;
}

.market-delivery {
  font-size: 0.79rem;
}

.market-blurb {
  font-size: 0.79rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.score {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  border-radius: 999px;
  background: #e8f9ef;
  border: 1px solid #c7efd5;
  color: #1f7044;
  padding: 0.17rem 0.56rem;
  font-weight: 700;
}

.momentum {
  height: 6px;
  border-radius: 999px;
  background: #dfe9ef;
  overflow: hidden;
}

.momentum span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f0b429, #0d5c63);
}

.actions {
  display: flex;
  gap: 0.46rem;
  margin-top: 0.3rem;
}

.market-actions {
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.5rem 0.66rem;
  font-weight: 700;
  font-size: 0.8rem;
  border: 1px solid transparent;
  flex: 1;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand);
  border-color: #1e4bd9;
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-outline {
  border-color: #bfc8d7;
  color: #111827;
  background: #fff;
}

.btn-outline:hover {
  border-color: #c8d0d0;
  color: #111827;
}

.btn-compact {
  flex: 0 0 auto;
  width: auto;
  padding-inline: 0.85rem;
}

.btn-disabled {
  background: #b9c9cf;
  color: #f5f8f9;
  cursor: not-allowed;
}

.load-more-wrap {
  margin-top: 0.82rem;
  display: flex;
  justify-content: center;
}

.region-grid,
.legal-grid,
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.67rem;
}

.region-card,
.legal-card,
.method-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  padding: 0.73rem;
}

.notice {
  border-left: 4px solid var(--signal);
  background: #fff9ed;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
}

.breadcrumb {
  font-size: 0.8rem;
}

.detail-grid {
  margin-top: 0.82rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0.72rem;
}

.detail-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 0.72rem;
}

.detail-section h3 {
  margin: 0;
  font-size: 1rem;
}

.detail-section p,
.detail-section li,
.detail-section td,
.detail-section th,
.list {
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.list {
  margin: 0;
  padding-left: 1rem;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.45rem;
}

.score-table th,
.score-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.3rem 0.25rem;
}

.rating {
  color: #966006;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

.page-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.7rem;
  flex-wrap: wrap;
}

.page-pager-label {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.slider-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 280px);
  gap: 0.72rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x mandatory;
}

.home-slider-track {
  grid-auto-columns: minmax(215px, 270px);
}

.slider-card {
  scroll-snap-align: start;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.72rem;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 0.74rem;
  display: grid;
  gap: 0.55rem;
}

.admin-panel h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 800;
}

.admin-output {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  padding: 0.65rem;
  font-size: 0.78rem;
  overflow-x: auto;
}

.market-card.is-selected {
  outline: 2px solid #1c4f84;
  outline-offset: 1px;
}

.status-ok,
.status-bad {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-ok {
  background: #e3f8eb;
  border: 1px solid #b9e8c9;
  color: #1f7044;
}

.status-bad {
  background: #fdecec;
  border: 1px solid #f6caca;
  color: #9e2f2f;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.calendar-table th,
.calendar-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.48rem 0.35rem;
  color: var(--ink-soft);
}

.calendar-table th {
  color: var(--ink);
  background: #f2f8fa;
}

.calendar-table tr.is-selected td {
  background: #e8f1ff;
}

#location-status {
  margin-top: 0.55rem;
}

footer {
  margin: 1.2rem auto 2rem;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

footer p {
  margin: 0.2rem 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
}

.footer-links a {
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}

@media (max-width: 980px) {
  .topbar-inner {
    flex-wrap: wrap;
  }

  .market-search {
    order: 3;
    width: 100%;
    grid-template-columns: 160px minmax(0, 1fr) 100px;
  }

  .hero-rich,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .home-intro-media {
    min-height: 220px;
  }

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

  .page-search-row {
    grid-template-columns: 1fr 1fr;
  }

  .page-search-row .btn {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .topbar-utility-inner {
    min-height: unset;
    padding: 0.45rem 0;
    flex-direction: column;
    align-items: flex-start;
  }

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

  .market-search {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

  .control-grid {
    grid-template-columns: 1fr;
  }

  .page-search-row {
    grid-template-columns: 1fr;
  }

  .page-search-row .btn {
    grid-column: span 1;
  }

  .actions {
    flex-direction: column;
  }
}
