:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #66706a;
  --line: #ded8ca;
  --paper: #fbf7ed;
  --panel: #ffffff;
  --accent: #155c43;
  --accent-2: #c9912f;
  --danger: #a2412f;
  --focus: #1d6fd8;
  --soft: #eef5f1;
  --topbar: #ffffff;
  --hero: #ffffff;
  --hero-wash: linear-gradient(120deg, rgba(18, 107, 85, .1), rgba(241, 184, 75, .14));
  --card-shadow: 0 18px 50px rgba(23, 33, 28, .08);
  --photo-bg: linear-gradient(135deg, #e6ece8, #cdd9d2);
  --photo-ink: #3c4c43;
  --code-bg: #eef3ef;
  --code-ink: #22352c;
  --button-hover: #0d5846;
  --danger-hover: #7d3023;
  --drop-bg: #f7fbf8;
  --drop-active: #eef8f3;
  --drop-line: #aac4b8;
  --badge-bg: #eef5f1;
  --badge-line: #cfddd5;
  --badge-ink: #254236;
  --badge-accent-bg: #fff4d6;
  --badge-accent-line: #ead290;
  --badge-accent-ink: #624915;
  --token-ink: #244036;
  --token-accent-ink: #5c4321;
  --card-featured-line: rgba(18, 107, 85, .28);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #eef7f1;
    --muted: #aebdb4;
    --line: #33473e;
    --paper: #101713;
    --panel: #17211c;
    --accent: #5fd0ae;
    --accent-2: #e3b64c;
    --danger: #ff9a86;
    --focus: #7bb7ff;
    --soft: #1f3028;
    --topbar: #121b16;
    --hero: #151f19;
    --hero-wash: linear-gradient(120deg, rgba(95, 208, 174, .1), rgba(227, 182, 76, .12));
    --card-shadow: 0 18px 50px rgba(0, 0, 0, .28);
    --photo-bg: linear-gradient(135deg, #23342c, #18251f);
    --photo-ink: #cfe0d6;
    --code-bg: #1d2a23;
    --code-ink: #dbe8df;
    --button-hover: #48b998;
    --danger-hover: #d67664;
    --drop-bg: #16231d;
    --drop-active: #1f342b;
    --drop-line: #416353;
    --badge-bg: #213229;
    --badge-line: #436153;
    --badge-ink: #d8eadf;
    --badge-accent-bg: #3a321d;
    --badge-accent-line: #6a5626;
    --badge-accent-ink: #f2d88c;
    --token-ink: #d8eadf;
    --token-accent-ink: #f2d88c;
    --card-featured-line: rgba(95, 208, 174, .38);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --ink: #17211c;
  --muted: #66706a;
  --line: #d9e0db;
  --paper: #f8faf8;
  --panel: #ffffff;
  --accent: #126b55;
  --accent-2: #f1b84b;
  --danger: #a2412f;
  --focus: #1d6fd8;
  --soft: #eef5f1;
  --topbar: #ffffff;
  --hero: #ffffff;
  --hero-wash: linear-gradient(120deg, rgba(18, 107, 85, .1), rgba(241, 184, 75, .14));
  --card-shadow: 0 18px 50px rgba(23, 33, 28, .08);
  --photo-bg: linear-gradient(135deg, #e6ece8, #cdd9d2);
  --photo-ink: #3c4c43;
  --code-bg: #eef3ef;
  --code-ink: #22352c;
  --button-hover: #0d5846;
  --danger-hover: #7d3023;
  --drop-bg: #f7fbf8;
  --drop-active: #eef8f3;
  --drop-line: #aac4b8;
  --badge-bg: #eef5f1;
  --badge-line: #cfddd5;
  --badge-ink: #254236;
  --badge-accent-bg: #fff4d6;
  --badge-accent-line: #ead290;
  --badge-accent-ink: #624915;
  --token-ink: #244036;
  --token-accent-ink: #5c4321;
  --card-featured-line: rgba(18, 107, 85, .28);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eef7f1;
  --muted: #aebdb4;
  --line: #33473e;
  --paper: #101713;
  --panel: #17211c;
  --accent: #5fd0ae;
  --accent-2: #e3b64c;
  --danger: #ff9a86;
  --focus: #7bb7ff;
  --soft: #1f3028;
  --topbar: #121b16;
  --hero: #151f19;
  --hero-wash: linear-gradient(120deg, rgba(95, 208, 174, .1), rgba(227, 182, 76, .12));
  --card-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  --photo-bg: linear-gradient(135deg, #23342c, #18251f);
  --photo-ink: #cfe0d6;
  --code-bg: #1d2a23;
  --code-ink: #dbe8df;
  --button-hover: #48b998;
  --danger-hover: #d67664;
  --drop-bg: #16231d;
  --drop-active: #1f342b;
  --drop-line: #416353;
  --badge-bg: #213229;
  --badge-line: #436153;
  --badge-ink: #d8eadf;
  --badge-accent-bg: #3a321d;
  --badge-accent-line: #6a5626;
  --badge-accent-ink: #f2d88c;
  --token-ink: #d8eadf;
  --token-accent-ink: #f2d88c;
  --card-featured-line: rgba(95, 208, 174, .38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.topbar {
  align-items: center;
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px clamp(16px, 3vw, 40px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  align-items: center;
  color: var(--accent);
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 800;
  min-height: 42px;
}

.brand-logo {
  display: block;
  height: 60px;
  max-width: 217px;
  object-fit: contain;
  width: auto;
}

.topbar-controls {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.menu-toggle,
.theme-toggle {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
  min-height: 38px;
  padding: 8px 10px;
}

.menu-toggle {
  display: none;
}

nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  font-weight: 650;
}

.nav-form {
  margin: 0;
}

.nav-form button {
  padding: 7px 10px;
}

.shell {
  margin: 0 auto;
  max-width: 1120px;
  padding: 34px 18px 64px;
}

.shell.narrow {
  max-width: 560px;
}

.home-hero {
  background:
    var(--hero-wash),
    var(--hero);
  border-bottom: 1px solid var(--line);
}

.home-hero-inner {
  align-items: center;
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .75fr);
  margin: 0 auto;
  max-width: 1120px;
  padding: clamp(48px, 8vw, 92px) 18px;
}

.hero-copy {
  min-width: 0;
}

.home-hero .lede {
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.actions-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 16px;
}

.button-link {
  align-items: center;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  min-height: 44px;
  padding: 10px 16px;
}

.button-link.secondary {
  background: var(--panel);
  color: var(--accent);
}

.hero-market {
  display: grid;
  gap: 12px;
}

.market-card,
.mini-listing {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  padding: 16px;
}

.market-card.featured {
  border-color: var(--card-featured-line);
}

.market-card strong,
.mini-listing strong {
  display: block;
  line-height: 1.25;
}

.market-card p,
.mini-listing p {
  color: var(--muted);
  line-height: 1.5;
  margin: 8px 0 0;
}

.mini-listing {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 64px 1fr;
}

.photo-token {
  align-items: center;
  aspect-ratio: 1;
  background: var(--soft);
  border-radius: 8px;
  color: var(--token-ink);
  display: flex;
  font-size: .82rem;
  font-weight: 850;
  justify-content: center;
}

.photo-token.alt {
  background: color-mix(in srgb, var(--accent-2) 28%, var(--panel));
  color: var(--token-accent-ink);
}

.home-search {
  padding-bottom: 28px;
}

.home-info {
  padding-top: 0;
}

.search-band {
  align-items: end;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  margin-bottom: 32px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  margin-bottom: 0;
  max-width: 820px;
}

h2 {
  font-size: 1.1rem;
}

.eyebrow {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.search,
.panel,
.draft,
.notice {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.search {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
  padding: 12px;
  position: absolute;
  right: 18px;
  width: min(720px, calc(100vw - 36px));
  z-index: 4;
}

.search label {
  display: grid;
  gap: 6px;
}

.search label span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

input,
select,
textarea,
button {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  min-width: 0;
  padding: 10px 12px;
}

input,
select,
textarea {
  background: var(--panel);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
}

.filter-note,
.listing-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-note {
  margin-top: 12px;
}

.filter-note span,
.badge,
.status-pill {
  background: var(--soft);
  border: 1px solid var(--badge-line);
  border-radius: 999px;
  color: var(--badge-ink);
  display: inline-flex;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 6px 9px;
}

.badge.accent,
.status-pill {
  background: var(--badge-accent-bg);
  border-color: var(--badge-accent-line);
  color: var(--badge-accent-ink);
}

button:hover {
  background: var(--button-hover);
}

.button-danger {
  background: var(--danger);
  border-color: var(--danger);
}

.button-danger:hover {
  background: var(--danger-hover);
}

.listing-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.listing-actions form {
  margin: 0;
}

.button-danger {
  background: var(--danger);
  border-color: var(--danger);
}

.button-danger:hover {
  background: #7d3023;
}

.section-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 24px 0 14px;
}

.section-title.compact {
  margin: 0 0 12px;
}

.section-title a {
  color: var(--accent);
  font-weight: 750;
}

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.listing-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.listing-card:hover {
  border-color: var(--accent);
}

.photo-placeholder {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: var(--photo-bg);
  color: var(--photo-ink);
  display: flex;
  font-weight: 800;
  justify-content: center;
}

.listing-card-photo {
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  width: 100%;
}

.photo-placeholder.big {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  font-size: 2rem;
}

.photo-stack {
  display: grid;
  gap: 12px;
}

.listing-photo {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.asset-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.asset-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px;
}

.asset-row p {
  margin: 4px 0 0;
}

.listing-body {
  padding: 14px;
}

.listing-body .listing-badges {
  margin-bottom: 10px;
}

.listing-price,
.price {
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 850;
}

.listing-body h3 {
  font-size: 1rem;
  margin: 4px 0 8px;
}

.listing-body p,
.muted {
  color: var(--muted);
}

.detail-badges {
  margin: 14px 0 18px;
}

.field-group {
  background: var(--soft);
  border: 1px solid var(--line);
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.field-group h3 {
  font-size: 1rem;
  margin: 0;
}

.listing-meta-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  margin: 1.25rem 0;
}

.listing-meta-grid h2 {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 24px;
}

.two-col,
.listing-page,
.ops-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}

.stack,
.stack label {
  display: grid;
  gap: 8px;
}

.stack {
  gap: 14px;
}

.compact-form {
  border-top: 1px dashed var(--line);
  margin-top: 10px;
  padding-top: 12px;
}

.receipt-lines {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
}

.receipt-lines div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.receipt-lines div:last-child {
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}

.inline {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr .5fr .8fr;
}

.draft {
  margin-top: 16px;
}

.draft dl {
  display: grid;
  gap: 8px;
  grid-template-columns: max-content 1fr;
}

.draft dt {
  color: var(--muted);
  font-weight: 750;
}

.notice {
	border-color: var(--accent-2);
	margin-top: 16px;
}

.notice.subdued {
  border-color: var(--line);
}

.stepper {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 20px 0;
}

.stepper span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 850;
  padding: 12px;
  text-align: center;
}

.admin-tools {
  background: #fffaf0;
  border-color: #dfbf74;
  margin: 18px 0;
}

.report-panel summary {
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 850;
}

.report-panel form {
  margin-top: 14px;
}

.access-denied {
  margin-top: 36px;
}

.report-panel {
	margin-top: 20px;
}

.message-panel {
  margin-top: 16px;
}

.message-list {
  display: grid;
  gap: 12px;
}

.message-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 12px;
}

.message-row p {
  margin: 6px 0 0;
}

.message-thread {
  display: grid;
  gap: 10px;
}

.message-bubble {
  background: var(--soft);
  border: 1px solid #cfddd5;
  border-radius: 8px;
  justify-self: start;
  max-width: 88%;
  padding: 12px;
}

.message-bubble.mine {
  background: #fff4d6;
  border-color: #ead290;
  justify-self: end;
}

.message-bubble p {
  margin-bottom: 6px;
}

.message-bubble span {
  color: var(--muted);
  font-size: .78rem;
}

.seller-listings {
  display: grid;
  gap: 12px;
}

.seller-listing-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.seller-listing-row h2 {
  font-size: 1rem;
  margin: 10px 0 6px;
}

.seller-listing-row p {
  margin-bottom: 0;
}

.seller-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.seller-actions form {
  margin: 0;
}

.advanced-panel summary {
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 850;
}

.advanced-panel > h2,
.advanced-panel > form {
  margin-top: 14px;
}

.content-page {
  display: grid;
  gap: 24px;
}

.page-hero {
  max-width: 860px;
}

.lede {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.6;
  margin-top: 18px;
}

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

.info-grid .panel p,
.contact-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.panel-icon {
  align-items: center;
  background: var(--soft);
  border: 1px solid #cfddd5;
  border-radius: 6px;
  color: var(--accent);
  display: inline-flex;
  font-size: .76rem;
  font-weight: 850;
  margin-bottom: 12px;
  min-height: 32px;
  padding: 6px 9px;
}

.linked-panel {
  position: relative;
}

.linked-panel > a {
  inset: 0;
  position: absolute;
}

.linked-panel:hover {
  border-color: var(--accent);
}

.contact-panel {
  max-width: 620px;
}

.contact-panel a {
  color: var(--accent);
  font-weight: 750;
}

.site-footer {
  align-items: start;
  background: #fff;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 28px clamp(16px, 3vw, 40px);
}

.site-footer > div:first-child {
  max-width: 360px;
}

.site-footer p {
  margin: 8px 0 0;
}

.footer-links {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.footer-links nav {
  align-items: flex-start;
  display: grid;
  gap: 8px;
}

.footer-links h2 {
  color: var(--ink);
  font-size: .82rem;
  margin: 0 0 2px;
}

.footer-links a {
  color: var(--muted);
  font-weight: 650;
}

.site-footer a:hover,
.topbar a:hover {
  color: var(--accent);
}

.content-page {
  display: grid;
  gap: 24px;
}

.page-hero {
  max-width: 860px;
}

.lede {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.6;
  margin-top: 18px;
}

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

.info-grid .panel p,
.contact-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.panel-icon {
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--badge-line);
  border-radius: 6px;
  color: var(--accent);
  display: inline-flex;
  font-size: .76rem;
  font-weight: 850;
  margin-bottom: 12px;
  min-height: 32px;
  padding: 6px 9px;
}

.linked-panel {
  position: relative;
}

.linked-panel > a {
  inset: 0;
  position: absolute;
}

.linked-panel:hover {
  border-color: var(--accent);
}

.contact-panel {
  max-width: 620px;
}

.contact-panel a {
  color: var(--accent);
  font-weight: 750;
}

.site-footer {
  align-items: start;
  background: var(--topbar);
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 28px clamp(16px, 3vw, 40px);
}

.site-footer > div:first-child {
  max-width: 360px;
}

.site-footer p {
  margin: 8px 0 0;
}

.footer-links {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.footer-links nav {
  align-items: flex-start;
  display: grid;
  gap: 8px;
}

.footer-links h2 {
  color: var(--ink);
  font-size: .82rem;
  margin: 0 0 2px;
}

.footer-links a {
  color: var(--muted);
  font-weight: 650;
}

.site-footer a:hover,
.topbar a:hover {
  color: var(--accent);
}

.error {
  color: var(--danger);
  font-weight: 700;
}

.setting-row {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding: 12px 0;
}

.setting-row:first-of-type {
  border-top: 0;
}

code {
  background: var(--code-bg);
  border-radius: 6px;
  color: var(--code-ink);
  display: block;
  overflow-wrap: anywhere;
  padding: 8px;
}

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

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.file-drop {
  background: var(--drop-bg);
  border: 1px dashed var(--drop-line);
  display: grid;
  gap: 8px;
  min-height: 118px;
  place-items: center;
  text-align: center;
}

.file-drop.is-dragging {
  background: var(--drop-active);
  border-color: var(--accent);
}

.file-drop input {
  max-width: 100%;
}

td,
th {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: .82rem;
}

@media (max-width: 760px) {
  .topbar,
  .section-title,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }

  .brand {
    min-height: 38px;
  }

  .brand-logo {
    height: 53px;
    max-width: 186px;
  }

  .topbar-controls {
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    align-items: stretch;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    width: 100%;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a,
  .site-nav .nav-form button {
    border-radius: 6px;
    display: block;
    padding: 10px;
    text-align: left;
    width: 100%;
  }

  .site-nav a:hover {
    background: var(--soft);
  }

  .nav-form {
    width: 100%;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .search,
  .home-hero-inner,
  .two-col,
  .listing-page,
  .ops-grid,
  .info-grid,
  .inline {
    grid-template-columns: 1fr;
  }

  .home-hero-inner {
    padding-top: 38px;
  }

  .mini-listing {
    grid-template-columns: 54px 1fr;
  }
}
