:root {
  --ink: #172b25;
  --muted: #68766f;
  --paper: #f6f8f6;
  --surface: #fff;
  --line: #e2e9e4;
  --green: #176b4b;
  --green-dark: #10543a;
  --green-soft: #edf6f0;
  --gold: #936716;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--paper); color: var(--ink); font: 16px/1.55 "Source Sans 3", "Segoe UI", sans-serif; }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid #8bc9a7; outline-offset: 3px; }
.awning { display: none; }
.shell { width: min(1120px, 100% - 48px); margin: 0 auto; padding: 28px 0 52px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.mark { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--green); box-shadow: 0 4px 12px #176b4b26; }
.mark::before { content: ""; width: 23px; height: 18px; border: 2px solid white; border-top-width: 5px; border-radius: 3px; background: linear-gradient(90deg, transparent 45%, white 45% 55%, transparent 55%); }
.kicker, .eyebrow { color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); font-weight: 650; line-height: 1.2; }
h1 { margin: 2px 0 0; font-size: 22px; letter-spacing: -.025em; }
h2 { margin-bottom: 12px; font-size: 27px; letter-spacing: -.035em; }
h3 { margin-bottom: 8px; font-size: 18px; letter-spacing: -.015em; }
.top-tools { display: flex; align-items: center; gap: 10px; }
.nav { display: flex; align-items: center; gap: 5px; margin: 28px 0 30px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 2px 8px #172b2506; }
.nav a { padding: 9px 16px; border-radius: 10px; color: #53635a; font-size: 14px; font-weight: 600; text-decoration: none; transition: background .16s, color .16s; }
.nav a:hover { background: #f4f7f4; color: var(--ink); }
.nav a[aria-current="page"] { background: var(--green-soft); color: var(--green-dark); }
.seg { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.seg button, #connect, .primary, .ghost, .texty, .actions button { border-radius: 10px; }
.seg button { padding: 6px 10px; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--green-soft); color: var(--green-dark); font-weight: 700; }
#connect { padding: 9px 15px; border: 1px solid var(--green); background: var(--green); color: white; font-weight: 650; }
#connect:hover, button.primary:hover, .actions button.primary:hover { background: var(--green-dark); }
.account-control { position: relative; }
.account-dropdown { position: absolute; z-index: 20; top: calc(100% + 10px); right: 0; display: grid; width: min(330px, calc(100vw - 28px)); gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 14px 38px #172b2520; }
.account-dropdown[hidden] { display: none; }
.account-dropdown-title { margin: 3px 8px 6px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.account-choice, .account-menu-action { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); text-align: left; }
.account-choice:hover, .account-menu-action:hover { background: #f4f8f5; }
.account-choice.selected { background: var(--green-soft); color: var(--green-dark); font-weight: 700; }
.account-choice-dot { display: grid; width: 20px; height: 20px; flex: none; place-items: center; border: 1px solid #cbd8ce; border-radius: 50%; color: var(--green); font-size: 12px; }
.account-current-label { margin-left: auto; color: var(--green); font-size: 11px; font-weight: 600; }
.account-menu-action { margin-top: 3px; border-top: 1px solid #edf1ee; border-radius: 0 0 8px 8px; color: #43584b; font-size: 14px; }
.account-menu-action.disconnect-action { color: #9c4141; }
.banner { margin: 0 0 20px; padding: 12px 15px; border: 1px solid #e7c878; border-radius: 12px; background: #fff8e7; color: #684e16; }
.market-page { display: grid; gap: 22px; }
.market-heading { padding: 10px 0 0; }
.market-heading h2 { margin: 5px 0 5px; font-size: 34px; }
.market-title-line { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.market-intro { margin: 0; color: var(--muted); }
.network-indicator { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 5px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: #52635a; font-size: 12px; font-weight: 600; white-space: nowrap; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #48a978; box-shadow: 0 0 0 3px #48a97820; }
.market-toolbar { display: flex; gap: 10px; align-items: center; }
.market-search-label { position: relative; display: block; flex: 1; }
.market-search-label input { min-height: 48px; padding: 11px 15px 11px 44px; border: 1px solid #dce5de; border-radius: 12px; background: var(--surface); box-shadow: 0 2px 8px #172b2506; }
.market-search-label input:focus-visible { outline: none; border-color: #71ad8a; box-shadow: 0 0 0 3px #71ad8a20; }
.market-search-label input::placeholder { color: #8a9790; }
.search-icon { position: absolute; z-index: 1; top: 50%; left: 15px; color: #708077; font-size: 24px; line-height: 1; transform: translateY(-55%); }
.ghost { padding: 10px 14px; border: 1px solid #dce5de; background: white; color: #3b5145; font-size: 14px; font-weight: 600; }
.ghost:hover { border-color: #afc7b7; background: #f8fbf8; }
.listing-list { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 3px 14px #172b2508; }
.listing-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto 22px; align-items: center; gap: 17px; min-height: 108px; padding: 16px 20px; text-decoration: none; transition: background .15s; }
.listing-row + .listing-row { border-top: 1px solid #edf1ee; }
.listing-row:hover { background: #f8fbf8; }
.listing-row-photo, .listing-thumb-placeholder { display: grid; width: 72px; height: 72px; place-items: center; border-radius: 12px; background: #eff4f0; object-fit: cover; color: #7b9885; font-size: 14px; font-weight: 700; }
.listing-row-content { display: grid; min-width: 0; gap: 4px; }
.listing-row-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.listing-row-title { overflow: hidden; font-size: 16px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.listing-row-meta, .listing-row-description { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.listing-row-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.listing-row-price { display: grid; justify-items: end; gap: 1px; white-space: nowrap; }
.listing-row-price strong { font-size: 16px; }
.listing-row-price span { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.listing-row-arrow { color: #8a9a90; font-size: 20px; }
.badge { display: inline-flex; flex: none; align-items: center; width: fit-content; padding: 3px 8px; border: 1px solid #dfe8e1; border-radius: 99px; background: #f7faf7; color: #617268; font-size: 10px; font-weight: 700; letter-spacing: .07em; line-height: 1.4; text-transform: uppercase; }
.badge.held, .badge.pending { border-color: #f0dfb7; background: #fff9eb; color: var(--gold); }
.badge.sold, .badge.completed, .badge.released { border-color: #d0e8d8; background: #f0f8f2; color: var(--green); }
.empty-state { display: grid; justify-items: center; gap: 8px; padding: 52px 24px; border: 1px dashed #cbd9ce; border-radius: 16px; background: #fbfdfb; text-align: center; }
.empty-state h3, .empty-state p { margin: 0; }
.empty-state .steps { max-width: 520px; margin-top: 12px; text-align: left; }
.empty-state-icon { display: grid; width: 44px; height: 44px; margin-bottom: 5px; place-items: center; border-radius: 14px; background: var(--green-soft); color: var(--green); font-size: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card, .panel { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 3px 14px #172b2508; }
.card { display: flex; min-height: 150px; flex-direction: column; gap: 9px; padding: 17px; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px #172b2510; }
.panel { display: grid; gap: 13px; padding: 22px; }
.photo, .listing-photo { display: block; width: 100%; background: #f4f7f4; object-fit: cover; }
.photo { height: 165px; border-radius: 10px; }
.listing-photo { max-height: 460px; border-radius: 12px; object-fit: contain; }
.price { margin: 0; color: var(--ink); font-size: 22px; font-weight: 700; }
.meta, .fine, .hint { color: var(--muted); }
.fine, .hint { font-size: 14px; }
.swap-close-warning {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 14px;
  color: #9f2525;
  background: #fff0f0;
  border: 1px solid #e9aaaa;
  border-left: 4px solid #c62828;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
}
label { display: grid; gap: 6px; font-weight: 600; }
input, textarea, select { width: 100%; border: 1px solid #dce5de; border-radius: 10px; background: white; padding: 10px 12px; font-weight: 400; }
input:focus, textarea:focus, select:focus { border-color: #71ad8a; outline: 3px solid #71ad8a20; }
textarea { min-height: 120px; resize: vertical; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.primary, .actions button.primary { border: 1px solid var(--green); background: var(--green); color: white; font-weight: 700; }
.primary, .actions button, .texty { padding: 9px 14px; }
.texty { border: 0; background: transparent; color: var(--muted); }
.primary:disabled, .ghost:disabled { cursor: wait; opacity: .55; }
.split { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.stars { color: var(--gold); letter-spacing: .08em; }
.review + .review { padding-top: 12px; border-top: 1px solid var(--line); }
code, .mono { font-family: ui-monospace, "Cascadia Mono", monospace; font-size: .92em; }
.steps { margin: 0; padding-left: 20px; }
.steps li + li { margin-top: 6px; }
.prose { white-space: pre-wrap; }
.private-panel { padding-top: 15px; border-top: 1px solid var(--line); }
.private-value { overflow-wrap: anywhere; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf8; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.two[hidden] { display: none; }
.foot { margin-top: 54px; padding-top: 20px; border-top: 1px solid var(--line); color: #7b8981; font-size: 12px; line-height: 1.6; }

@media (max-width: 720px) {
  .shell { width: min(100% - 28px, 580px); padding-top: 18px; }
  .top { align-items: flex-start; }
  .top-tools { justify-content: flex-end; flex-wrap: wrap; }
  .brand { gap: 9px; }
  .mark { width: 40px; height: 40px; border-radius: 12px; }
  h1 { font-size: 18px; }
  .nav { overflow-x: auto; margin: 20px 0 25px; }
  .nav a { padding: 9px 12px; white-space: nowrap; }
  .market-heading h2 { font-size: 29px; }
  .market-title-line { align-items: flex-start; }
  .network-indicator { margin-top: 4px; }
  .listing-row { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; padding: 13px; }
  .listing-row-photo, .listing-thumb-placeholder { width: 58px; height: 58px; }
  .listing-row-arrow { display: none; }
  .listing-row-description { display: none; }
  .listing-row-heading { flex-wrap: wrap; gap: 5px 8px; }
  .listing-row-title { max-width: 100%; }
  .listing-row-meta { gap: 4px; font-size: 11px; }
  .listing-row-price strong { font-size: 14px; }
  .listing-row-price span { font-size: 10px; }
  .two { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .top { flex-direction: column; }
  .top-tools { width: 100%; justify-content: space-between; }
  .market-title-line { display: block; }
  .network-indicator { margin-top: 12px; }
  .market-toolbar { align-items: stretch; }
  .market-toolbar .ghost { padding-inline: 10px; }
  .listing-row { grid-template-columns: 50px minmax(0, 1fr); }
  .listing-row-photo, .listing-thumb-placeholder { width: 50px; height: 50px; }
  .listing-row-price { grid-column: 2; justify-items: start; display: flex; align-items: baseline; gap: 6px; }
  .listing-row-content { grid-column: 2; grid-row: 1; }
  .listing-row-heading { align-items: flex-start; }
}
