:root {
  color-scheme: light;
  --bg: #fff;
  --panel: #f5f5f4;
  --edge: #e3e2df;
  --orange: #f26822;
  --accent: #ac410a;
  --fg: #252525;
  --muted: #575755;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* { box-sizing: border-box }
html { scroll-behavior: smooth; scroll-padding-top: 90px }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.7 system-ui, -apple-system, sans-serif }
a { color: inherit; text-decoration: none }
button, input { font: inherit }
button, summary { cursor: pointer }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px }
.wrap { width: min(1160px, calc(100% - 72px)); margin-inline: auto }
header { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--edge) }
.bar { min-height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 20px }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; line-height: 1.15 }
.brand i { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 50%; background: var(--orange); color: #212121; font: 900 24px var(--mono) }
.brand small { display: block; font: 11px var(--mono); letter-spacing: .12em; margin-top: 5px; color: var(--muted) }
nav { display: flex; gap: clamp(16px, 4vw, 44px); font-weight: 650 }
a:hover { color: var(--accent) }
#searchJump { min-height: 42px; padding: 6px 12px; border: 1px solid #d6d5d2; border-radius: 6px; background: #fff; color: var(--fg) }
#searchJump:hover { border-color: var(--accent) }
kbd { margin-left: 7px; padding: 2px 5px; background: var(--panel); border-radius: 3px; color: var(--muted); font: 12px var(--mono) }
.hero-band { background: #252525; color: #fff; overflow: hidden; border-bottom: 4px solid var(--orange) }
.hero { min-height: 435px; display: grid; grid-template-columns: 1.08fr 1fr; align-items: center; gap: 26px }
.hero-copy { padding: 54px 0 }
.eyebrow { color: #ffaf7e; font: 700 13px var(--mono); letter-spacing: .2em }
.hero h1 { margin: 16px 0; font-size: clamp(51px, 7vw, 94px); font-weight: 900; letter-spacing: -.075em; line-height: 1.08 }
.hero em { color: #ff914d; font-style: normal }
.hero p { max-width: 460px; margin: 0 0 24px; color: #e0dfdc; font-size: 18px }
.actions { display: flex; flex-wrap: wrap; gap: 10px }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 8px 20px; border: 1px solid transparent; border-radius: 5px; font-weight: 750 }
.primary { background: #ff863e; color: #261307 }
.primary:hover { background: #ffab76; color: #261307 }
.secondary { border-color: #a7a19b; color: #fff }
.secondary:hover { border-color: #ffab76; color: #ffab76 }
.hero a:focus-visible { outline-color: #ffab76 }
.section { padding-block: 65px }
h2 { margin: 0 0 12px; font-size: clamp(33px, 5vw, 49px); line-height: 1.18; letter-spacing: -.05em }
h3 { margin: 5px 0 6px; font-size: 20px; line-height: 1.35 }
.lede { color: var(--muted); max-width: 690px; margin: 0 0 24px }
.concepts, .cards, .doclist { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px }
.concepts article, .card, .doc { min-width: 0; border: 1px solid var(--edge); border-radius: 7px; padding: 20px; background: #fff }
.concepts article { border-top: 3px solid var(--orange) }
.concepts p, .card p, .doc p, details p, footer p { margin: 4px 0 0; color: var(--muted) }
details { margin-top: 22px; padding-top: 13px; border-top: 1px solid var(--edge) }
details a { color: var(--accent); text-decoration: underline }
.directory-band { background: var(--panel); border-block: 1px solid var(--edge) }
.directory-layout { display: grid; grid-template-columns: 185px minmax(0,1fr); gap: 18px }
.directory-controls { position: sticky; top: 90px; align-self: start; background: #fff; border: 1px solid var(--edge); border-radius: 7px; padding: 13px }
.directory-controls h3 { margin: 4px 8px 10px; font-size: 14px }
.filters { display: grid; gap: 3px }
.filters button { padding: 7px 9px; border: 1px solid transparent; border-radius: 4px; text-align: left; background: transparent; color: var(--muted); font-size: 14px }
.filters button:hover { background: #f5f5f4 }
.filters button[aria-pressed=true] { background: #fff0e6; color: var(--accent); border-color: #e6aa88; font-weight: 700 }
.search { display: flex; align-items: center; gap: 10px; padding-inline: 14px; border: 1px solid #cfceca; border-radius: 6px; background: #fff; color: var(--accent) }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px }
.search input { min-width: 0; width: 100%; border: 0; background: transparent; padding: 11px 0; color: var(--fg) }
.search input:focus-visible { outline: none }
.count { margin: 12px 0 }
.card, .doc { display: flex; flex-direction: column; transition: border-color .18s, box-shadow .18s }
.card:hover, .doc:hover { border-color: #bf602c; box-shadow: 0 4px 14px #3c230c12; color: var(--fg) }
.card p, .doc p { margin-bottom: 13px }
.domain { margin-top: auto; color: var(--accent); font: 12px var(--mono); overflow-wrap: anywhere }
.doclist { grid-template-columns: repeat(2,minmax(0,1fr)) }
footer { background: #252525; color: #fff }
.foot { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 26px; padding-block: 35px }
.footer-brand { font-size: 21px }
.foot a, .foot p { color: #e0dfdc }
.foot a { display: block; margin-top: 4px }
.foot a:hover { color: #ffad79 }
.foot a:focus-visible { outline-color: #ffad79 }
@media (max-width: 970px) {
  .cards { grid-template-columns: repeat(2,minmax(0,1fr)) }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 38px) }
  .hero { grid-template-columns: 1fr; gap: 0 }
  .hero-copy { padding: 42px 0 5px }
  .directory-layout, .concepts { grid-template-columns: 1fr }
  .directory-controls { position: static }
  .filters { display: flex; flex-wrap: wrap }
  .filters button { border-color: var(--edge) }
  .section { padding-block: 45px }
}
@media (max-width: 460px) {
  html { scroll-padding-top: 112px }
  .bar { padding-block: 9px; flex-wrap: wrap; gap: 8px }
  nav { order: 3; width: 100%; font-size: 14px }
  .hero h1 { font-size: clamp(41px, 11vw, 52px) }
  .cards, .doclist { grid-template-columns: 1fr }
  .foot { grid-template-columns: 1fr 1fr; gap: 18px }
  .foot > :first-child { grid-column: 1/-1 }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  .card, .doc { transition: none }
}

:root {
  color-scheme: dark;
  --bg: #111114;
  --panel: #17171c;
  --edge: #38343a;
  --fg: #fff5ee;
  --muted: #c8bec0;
  --accent: #ffab82;
}
body { min-height: 100vh }
.brand-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background-color: #111114;
  background-image: linear-gradient(#ff80400c 1px, transparent 1px), linear-gradient(90deg, #ff80400c 1px, transparent 1px);
  background-size: 44px 44px;
}
main, footer { position: relative }
header { background: #141417f5; backdrop-filter: blur(12px) }
.brand img { display: block }
#searchJump, .search, .directory-controls { background: #1b191e; border-color: var(--edge) }
.hero-band { background: linear-gradient(110deg, #141417db, #37191161); border-color: #d6602f }
.hero h1 { font-size: clamp(48px, 7vw, 94px) }
  .directory-band { background: #19171bc9 }
.concepts article, .card, .doc, .handbook article { background: #1d1b20f5 }
.card:hover, .doc:hover { border-color: #ff985f; box-shadow: 0 6px 19px #f3693222 }
.filters button:hover { background: #27232a }
.filters button[aria-pressed=true] { background: #48291f; border-color: #b8643a }
footer { background: #161417f2; border-top: 1px solid var(--edge) }
.handbook { border-top: 1px solid var(--edge) }
.handbook-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px }
.handbook article { border: 1px solid var(--edge); border-left: 3px solid var(--orange); border-radius: 7px; padding: 20px }
.handbook article:target { outline: 2px solid var(--accent); outline-offset: 3px }
.handbook p, .handbook dd { color: var(--muted) }
.handbook dt { font-weight: 700; margin-top: 10px }
.handbook dd { margin: 2px 0 0 }
.source-link { display: inline-block; color: var(--accent); text-decoration: underline; font-size: 14px }
@media (max-width: 720px) {
  .handbook-grid { grid-template-columns: 1fr }
}
@media (max-width: 460px) {
  nav { flex-wrap: wrap; gap: 7px 14px }
}

/* Keep the shared background visible while giving text and interactive cards a stable surface. */
#signal { display: block; width: 100%; height: 100%; opacity: .76 }
.hero-band { background: linear-gradient(90deg, #111114ed, #11111475 49%, transparent 75%) }
.hero { display: flex; min-height: clamp(435px, 62vh, 650px) }
.hero-copy { max-width: 650px }
.directory-band { background: #16151ba8 }
.concepts article, .card, .doc, .handbook article { background: #1d1b20ee }
@media (max-width: 720px) {
  #signal { opacity: .43 }
  .hero-band { background: linear-gradient(90deg, #111114b3, #11111424) }
  .hero-copy { padding-block: 48px }
}

/* Keep the introductory copy above the fixed backdrop on the homepage. */
.hero-band {
  background: linear-gradient(180deg, #111114ed 0%, #111114b3 30%, transparent 62%);
}
.hero {
  min-height: max(570px, calc(100svh - 73px));
  justify-content: center;
  align-items: start;
}
.hero-copy {
  text-align: center;
  padding: clamp(26px, 4vh, 48px) 0 40px;
}
.hero h1 {
  font-size: clamp(44px, 6.4vw, 82px);
  margin: 10px 0 12px;
}
.hero p { margin: 0 auto 18px }
.actions { justify-content: center }
.section { padding-block: clamp(46px, 6vw, 78px) }
.section > h2, .section > .lede { text-align: center }
.section > .lede { margin-inline: auto; margin-bottom: 28px }
@media (max-width: 720px) {
  .hero-band { background: linear-gradient(180deg, #111114f0, #111114bf 39%, transparent 68%) }
  .hero { min-height: max(460px, calc(100svh - 106px)); padding-bottom: 0 }
  .hero-copy { padding: 26px 0 32px }
  .hero p { font-size: 16px }
  #signal { opacity: .65 }
}

nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-underline-offset: 7px }
.interior { min-height: 68vh; background: #11111469 }
.interior .section > h1 {
  margin: 0 0 12px;
  text-align: center;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.18;
  letter-spacing: -.05em;
}
#docs .search { max-width: 640px }

.homepage .foot { grid-template-columns: repeat(2, minmax(0, 1fr)) }
@media (max-width: 460px) {
  .homepage .foot { grid-template-columns: 1fr }
}

.hero-subtitle {
  max-width: 620px;
  margin: 0 auto;
  color: #e0dfdc;
  font-size: clamp(16px, 2.1vw, 22px);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: normal;
}

.homepage .hero-band {
  background: radial-gradient(ellipse at 50% 62%, #f2692314, transparent 67%),
    linear-gradient(180deg, #111114be, transparent 52%);
  border-bottom: 1px solid #573427;
}
.homepage .hero {
  min-height: max(520px, calc(100svh - 73px));
}
.homepage .hero-copy {
  max-width: 800px;
  padding: clamp(36px, 8vh, 92px) 0 24px;
}
.homepage .hero h1 {
  font-size: clamp(45px, 7vw, 96px);
  letter-spacing: -.065em;
  line-height: 1.05;
  margin: 0 0 20px;
}
.homepage .hero h1 em { white-space: nowrap }
.homepage .hero-subtitle {
  max-width: 30em;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.65;
  text-wrap: balance;
}
.homepage .foot { padding-block: 26px }
@media (max-width: 460px) {
  .bar nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--edge);
    text-align: center;
  }
  .bar nav a { padding-block: 5px }
  .homepage .hero { min-height: max(450px, calc(100svh - 110px)) }
  .homepage .hero-copy { padding-top: clamp(28px, 6vh, 52px) }
  .homepage .hero h1 { font-size: clamp(32px, 9vw, 43px); margin-bottom: 14px }
}

.homepage {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.homepage main, .homepage .hero-band, .homepage .hero {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.homepage .hero-band { border-bottom: 0 }
.homepage .hero {
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  gap: 4px;
  padding-block: clamp(24px, 5svh, 48px) 8px;
}
.homepage .hero-copy { padding: 0 }
.homepage .hero h1 {
  font-size: clamp(38px, 6vw, 62px);
  margin-bottom: 12px;
  letter-spacing: -.05em;
}
.home-art {
  width: 100%;
  flex: 1 0 125px;
  position: relative;
}
.home-art #signal { position: absolute; inset: 0; opacity: .86 }
.homepage .foot { padding-block: clamp(10px, 2.8svh, 28px) }
@media (max-width: 460px) {
  .homepage .foot { grid-template-columns: 1fr 1fr; gap: 12px }
  .homepage .foot > :first-child { grid-column: auto }
  .homepage .foot a, .homepage .foot p { font-size: 13px }
  .homepage .footer-brand { font-size: 17px }
}

.site-info { max-width: 1000px }
.site-info-card { padding: clamp(18px, 3vw, 30px); border: 1px solid var(--edge); border-radius: 8px; background: #1d1b20ee }
.site-info-card h2 { font-size: 24px; letter-spacing: normal }
.site-info-card p { color: var(--muted) }
.site-info-card:target { border-color: var(--accent) }
.donation-qr { display: block; width: 220px; max-width: 100%; height: auto; margin: 16px 0; border-radius: 8px }
#donation-address { display: block; width: 100%; margin: 6px 0 12px; padding: 8px; background: var(--bg); color: var(--fg); border: 1px solid var(--edge); font: 14px/1.5 var(--mono); overflow-wrap: anywhere; resize: vertical }
#copy-donation { background: transparent; cursor: pointer }
#donation-status:empty { display: none }

.site-info .site-info-card { max-width: 680px; margin-inline: auto }
.site-info-card h1 { margin-top: 0 }
@media (max-width: 460px) { .bar nav a { font-size: 12px } }

@media (min-width: 461px) { .bar nav { gap: clamp(8px, 1.7vw, 28px) } }
.site-info-card section { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--edge) }

.resource-labels { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 11px }
.resource-labels > * { padding: 2px 7px; border: 1px solid var(--edge); border-radius: 4px; color: var(--muted); font-size: 12px }
.resource-labels > span { color: var(--accent) }
.reading-next { margin-top: 24px; color: var(--muted) }
.reading-next a { color: var(--accent); text-decoration: underline }

body:not(.homepage) #signal { opacity: .32 }
.search-toolbar { display: flex; align-items: stretch; gap: 8px }
.search-toolbar .search { flex: 1; min-width: 0 }
#clear-filters { color: var(--accent); padding: 0 10px; border: 1px solid var(--edge); border-radius: 6px; background: var(--panel); white-space: nowrap }
#clear-filters:hover { border-color: var(--accent) }
.filters button { display: flex; align-items: center; justify-content: space-between; gap: 8px }
.filter-count { color: var(--muted); font: 12px var(--mono) }
.docs-filters { display: flex; flex-wrap: wrap; margin-top: 14px }
.docs-filters button { border-color: var(--edge) }
.grouped-results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 25px }
.result-group > h3 { margin: 0 0 10px; color: var(--accent); font-size: 19px }
@media (max-width: 720px) {
  .directory-controls .filters, .docs-filters { display: flex; flex-wrap: nowrap; overflow-x: auto; padding: 3px 4px 8px }
  .filters button { flex: 0 0 auto }
}

.reference-page { max-width: 1000px }
.reference-page .search { max-width: 620px; margin-inline: auto }
.reference-page > .count { text-align: center }
.reference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px }
.privacy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.reference-card a { color: var(--accent); text-decoration: underline }
.reference-card[hidden] { display: none }
.update-list li + li { margin-top: 12px }
@media (max-width: 700px) {
  .reference-grid { grid-template-columns: 1fr }
}

.intro-reference { margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--edge) }
.intro-reference > h2 { font-size: clamp(26px, 4vw, 36px) }
.intro-reference .reference-card h3 { font-size: 20px }
.intro-reference .reference-card:target { border-color: var(--accent) }

.bar .handbook-toc, .handbook-toc { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 22px; font-size: 14px }
.handbook-toc a { padding: 7px 12px; border: 1px solid var(--edge); border-radius: 6px; background: var(--panel); color: var(--accent) }
.handbook-toc a:hover { border-color: var(--accent) }
.payment-states { margin-top: 14px }
.reference-card li + li { margin-top: 8px }


.site-info .buy-card { max-width: 780px }
@media (max-width: 880px) {
  .bar { flex-wrap: wrap; gap: 8px 14px; padding-block: 9px }
  .bar nav { order: 3; width: 100%; justify-content: center; gap: 8px 14px; flex-wrap: wrap }
  html { scroll-padding-top: 122px }
}
@media (max-width: 460px) {
  .bar nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)) }
}

.quote-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 12px; align-items: end }
.quote-form label { display: grid; gap: 5px; color: var(--muted) }
.quote-form select, .quote-form input { width: 100%; min-height: 46px; padding: 8px; color: var(--fg); background: var(--panel); border: 1px solid var(--edge); border-radius: 5px; font: inherit }
.quote-form button:disabled { opacity: .7 }
.quote-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 9px 0; border-top: 1px solid var(--edge) }
.quote-row strong { color: var(--accent) }
@media (max-width: 600px) { .quote-form { grid-template-columns: 1fr } }

.order-form, #order-panel { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--edge) }
.order-form:not([hidden]) { display: grid; gap: 12px }
.order-form > label { display: grid; gap: 5px }
.order-form input:not([type=checkbox]) { min-width: 0; width: 100%; padding: 9px; color: var(--fg); background: var(--panel); border: 1px solid var(--edge); border-radius: 5px; font: inherit }
.order-form .order-eligibility { display: flex; align-items: flex-start; gap: 8px }
.order-eligibility a { color: var(--accent); text-decoration: underline }
.order-form button { justify-self: start }
.quote-row { align-items: center }
.quote-row button, #refresh-order { cursor: pointer }
#order-fields { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 8px 14px }
#order-fields dd { margin: 0; overflow-wrap: anywhere; color: var(--muted) }

#partner-frame iframe { display: block; width: 100%; height: 620px; border: 0; border-radius: 6px }

.swap-pair { grid-column: 1/-1; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 12px; align-items: end }
#reverse-pair { background: var(--panel); cursor: pointer; min-height: 46px; padding-inline: 13px }
.quote-form { grid-template-columns: minmax(0,1fr) auto }
@media (max-width: 600px) {
  .quote-form { grid-template-columns: 1fr }
  .swap-pair { grid-template-columns: minmax(0,1fr) auto; gap: 8px }
  .swap-pair > label:last-child { grid-column: 1/-1 }
}

.swap-mode { grid-column: 1/-1 }
.order-form > label[hidden] { display: none }
#coin-status { font-size: 14px; color: var(--muted) }

.trading-shell { width: min(1240px, calc(100% - 42px)); padding-block: clamp(30px, 5vw, 65px) }
.trading-shell > .lede { max-width: 56ch }
.trading-grid { display: grid; grid-template-columns: minmax(0, 1.23fr) minmax(0, 1fr); gap: 18px; align-items: start }
.trading-grid .buy-card { background: #17161cf7; border-color: #493529; border-radius: 14px; padding: clamp(16px, 2.45vw, 30px) }
.trading-grid .buy-card h2 { margin-bottom: 18px }
.trading-page #signal { opacity: .22 }
.trading-grid .quote-form { gap: 14px }
.trading-grid .swap-pair { grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr); align-items: center; gap: 8px }
.trade-asset { min-width: 0; padding: 12px; border: 1px solid var(--edge); border-radius: 9px; background: #201e25 }
.trade-asset strong { color: var(--fg); font-size: 14px }
.trade-asset input, .trade-asset select { min-width: 0; font-size: 13px }
.trade-provider { margin: 16px 0 0; font-size: 13px; line-height: 1.6 }
.trading-grid .quote-row { margin-top: 7px; padding: 10px; border: 1px solid var(--edge); border-radius: 7px; background: #201e25; font-size: 14px }
.trading-grid .quote-row button { min-height: 35px; padding: 4px 10px; background: transparent }
.trade-offers #quote-status { margin-top: 0 }
.trade-offers #order-form, .trade-offers #order-panel { scroll-margin-top: 16px }
@media (max-width: 920px) { .trading-grid { grid-template-columns: minmax(0, 1fr) } }
@media (max-width: 540px) {
  .trading-grid .swap-pair { grid-template-columns: minmax(0, 1fr); gap: 6px }
  .trading-grid .swap-pair > label:last-child { grid-column: auto }
  .trading-grid #reverse-pair { justify-self: center; min-height: 36px }
}

.trading-grid .swap-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border: 1px solid var(--edge); border-radius: 10px; background: #100f14 }
.swap-mode button, .coin-select, .coin-option, #coin-more, .coin-picker-head button { color: var(--fg); background: #201e25; border: 1px solid var(--edge); border-radius: 7px; cursor: pointer }
.swap-mode button { min-height: 43px; border-color: transparent; background: transparent }
.swap-mode button[aria-pressed=true] { color: #ffd1ad; border-color: #805030; background: #42281a }
.trade-asset { display: grid; gap: 6px }
.coin-select, .coin-option { display: flex; align-items: center; gap: 9px; min-width: 0; text-align: left; padding: 8px }
.coin-select { min-height: 57px; width: 100% }
.coin-select:disabled { opacity: .65 }
.coin-logo { position: relative; flex: 0 0 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: #3a2b26; color: #ffd1ad; font: 700 12px var(--mono) }
.coin-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 50% }
.coin-name { flex: 1; min-width: 0; display: grid; gap: 2px }
.coin-name small { color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis }
.coin-chevron { color: var(--accent) }
#coin-picker { width: min(510px, calc(100% - 28px)); max-height: 85dvh; color: var(--fg); background: #18171d; border: 1px solid #805030; border-radius: 15px; padding: 18px; box-shadow: 0 12px 70px #000a }
#coin-picker::backdrop { background: #09080bc0 }
.coin-picker-head { display: flex; justify-content: space-between; align-items: center; gap: 10px }
.coin-picker-head h2 { margin: 0; font-size: 22px }
.coin-picker-head button, #coin-more { padding: 7px 11px }
.coin-picker-search { display: grid; gap: 4px; margin-top: 12px; color: var(--muted) }
.coin-picker-search input { background: #100f14; color: var(--fg); padding: 9px; border: 1px solid var(--edge); border-radius: 6px; font: inherit }
#coin-picker-count { color: var(--muted); font-size: 13px }
#coin-options { display: grid; gap: 5px }
.coin-option[aria-pressed=true], .coin-option:hover, .coin-select:hover { border-color: var(--accent) }
#coin-more { margin-top: 10px }

.swap-progress { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); max-width: 760px; gap: 8px; padding: 0; margin: 0 auto 20px; list-style: none }
.swap-progress li { padding: 8px 4px; border-bottom: 2px solid var(--edge); text-align: center; color: var(--muted); font-size: 14px }
.swap-progress li[aria-current=step] { color: var(--accent); border-color: var(--accent); font-weight: 700 }
.coin-picker-scroll { max-height: min(52dvh,470px); overflow: auto; padding: 3px }
.coin-network { flex-shrink: 0; max-width: 36%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 6px; border-radius: 5px; font: 11px var(--mono); background: #36271f; color: #ffd1ad }
.coin-group-label { margin: 10px 0 4px; color: var(--muted); font-size: 13px }
.coin-select .coin-name small { white-space: normal }
.offer-provider { min-width: 0; flex: 1 1 120px }
.offer-provider strong, .offer-provider small { display: block }
.offer-provider small { color: var(--muted) }
.order-copy { margin-inline-start: 8px; padding: 2px 6px; border: 1px solid var(--edge); border-radius: 4px; color: var(--accent); background: var(--panel); cursor: pointer }
#change-offer { justify-self: start; background: transparent }

#quote-results { overflow-x: auto }
.offer-table { width: 100%; min-width: 670px; border-collapse: collapse; font-size: 14px }
.offer-table th, .offer-table td { padding: 11px 9px; border-bottom: 1px solid var(--edge); text-align: left; vertical-align: middle }
.offer-table th { color: var(--muted); font-size: 13px; white-space: nowrap }
.offer-table tr:hover td { background: #201e25 }
.offer-table small { display: block; color: var(--muted) }
.offer-table button { padding: 3px 10px; min-height: 34px; background: transparent; cursor: pointer }
.offer-info { margin-inline-start: 4px; color: var(--accent); cursor: help; text-decoration: none }

.trading-grid { grid-template-columns: minmax(310px, .78fr) minmax(0, 1.55fr); gap: 18px }
.trading-grid .buy-card { min-width: 0 }
.trading-grid .trade-input .swap-pair { grid-template-columns: 1fr; gap: 6px }
.trading-grid .trade-input .swap-pair > div { grid-column: auto }
.trading-grid #reverse-pair { justify-self: center; min-height: 34px; padding: 2px 13px }
.trade-input .trade-asset { padding: 8px 10px }
.trade-input .coin-select { min-height: 48px; border: 0; padding: 5px 0; background: transparent }
.trade-input .coin-select:hover .coin-name strong { color: var(--accent) }
.coin-badges { display: flex; align-items: flex-end; flex-direction: column; gap: 4px; flex-shrink: 0; max-width: 42% }
.coin-badges .coin-network { max-width: 100%; font-size: 12px; font-weight: 700 }
.coin-memo-badge { padding: 3px 5px; border: 1px solid #995633; border-radius: 4px; background: #432719; color: #ffd4ad; font-size: 11px; font-weight: 700; white-space: nowrap }
.offer-table { min-width: 540px }
.offer-table th, .offer-table td { padding: 10px 6px }
.offer-table td:nth-child(3), .offer-table td:nth-child(4) { white-space: nowrap }
.order-form .trade-memo:not([hidden]) { padding: 11px; border: 1px solid #a9673e; border-radius: 7px; background: #312117 }
.trade-memo strong { color: #ffd4ad }
.trade-memo strong span { margin-inline-start: 5px; font-size: 12px }
.trade-memo small { color: var(--muted) }
#order-fields .payment-memo-value { color: #ffd4ad; font-weight: 700 }
@media (max-width: 900px) { .trading-grid { grid-template-columns: minmax(0,1fr) } }

.privacy-grade { display: inline-block; white-space: nowrap; padding: 3px 7px; border-radius: 5px; border: 1px solid currentColor; font-size: 12px; font-weight: 700 }
.privacy-grade-a { color: #9ae2ac; background: #1e362a }
.privacy-grade-b { color: #a7cdf9; background: #1e2e45 }
.privacy-grade-c { color: #ffd3a0; background: #3b2a19 }

.privacy-grade-d { color: #e7b8b0; background: #3b2629 }

.order-final-amounts { margin: 0; display: grid; gap: 7px }
.order-final-amounts div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px }
.order-final-amounts dt { color: var(--muted) }
.order-final-amounts dd { margin: 0; font-weight: 700 }
