/* Trading homepage. Shared shell tokens keep display preferences intact. */
.market-home {
  --home-radius: 12px;
  padding-block: clamp(24px, 3.6vw, 54px) 0;
}
.market-home a { text-decoration: none; }
.market-home a:focus-visible, .home-discord:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.home-panel, .home-empty {
  border: 1px solid var(--line);
  border-radius: var(--home-radius);
  background: var(--surface);
  min-width: 0;
}
.home-icon { width: 1.4em; height: 1.4em; flex: none; }
.market-home-hero { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); gap: clamp(18px, 3vw, 40px); align-items: center; }
.home-brand {
  isolation: isolate;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 255px;
  padding: 8px 0 52px;
}
.home-brand::after {
  content: "";
  z-index: -1;
  position: absolute;
  inset: auto -10% -59% -44%;
  height: 73%;
  border-radius: 50%;
  transform: rotate(13deg);
  background:
    radial-gradient(ellipse at 64% 0%, color-mix(in srgb, var(--chart-accent) 33%, transparent), transparent 31%),
    radial-gradient(ellipse at 40% 0%, var(--surface), var(--canvas) 42%);
  box-shadow: inset 0 2px 9px color-mix(in srgb, var(--chart-accent) 42%, transparent),
    0 -5px 30px color-mix(in srgb, var(--chart-accent) 15%, transparent);
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
.home-brand h1 {
  margin: 0;
  font-size: clamp(70px, 9vw, 146px);
  line-height: 1;
  font-weight: 850;
  letter-spacing: -.095em;
}
.home-brand p {
  margin: 13px 0 0;
  color: var(--text-soft);
  font-size: clamp(16px, 2.05vw, 29px);
  font-weight: 700;
  letter-spacing: -.045em;
}
.home-brand h1 span, .home-section h2 em { color: var(--accent-text); font-style: normal; }
.home-chart { padding: clamp(13px, 2vw, 25px); }
.home-chart > header { display: flex; align-items: center; gap: 12px; }
.home-chart > header .home-icon { width: 36px; height: 36px; color: var(--accent-text); border: 1px solid var(--control-accent-border); padding: 7px; border-radius: 8px; }
.home-chart h2, .home-sales-strip h2 { font-size: clamp(14px, 1.35vw, 19px); margin: 0; letter-spacing: -.025em; }
.home-chart header p { color: var(--muted); font-size: .8rem; margin: 2px 0 0; }
.home-chart .home-empty { margin-top: 18px; }
.home-chart .dashboard-plot-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px 10px; margin-block: 23px 14px; }
.home-chart .dashboard-y { display: flex; flex-direction: column; justify-content: space-between; text-align: right; }
.home-chart .dashboard-y, .home-chart .dashboard-x { font: 500 .69rem var(--mono); color: var(--text-soft); }
.home-chart .dashboard-x { grid-column: 2; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); text-align: center; }
.home-chart .dashboard-x span { overflow: visible; white-space: nowrap; }
.home-chart .dashboard-x span:not(:nth-child(4n + 2)) { visibility: hidden; }
.home-chart .dashboard-plot { position: relative; height: clamp(102px, 10vw, 150px); color: var(--chart-accent); }
.home-chart .dashboard-plot svg { display: block; width: 100%; height: 100%; }
.home-chart .dashboard-bar { fill: currentColor; }
.home-chart .dashboard-bar-partial { opacity: .55; }
.home-chart .dashboard-gridlines { fill: none; stroke: var(--line); stroke-width: 1; }
.home-chart .dashboard-plot:focus-within { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.home-chart .market-inspect { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: crosshair; touch-action: pan-y; }
.home-chart .market-guide { position: absolute; inset-block: 0; width: 1px; background: var(--accent-text); pointer-events: none; }
.home-chart .market-reading { position: absolute; inset: 5px 5px auto auto; max-width: calc(100% - 10px); padding: 6px 8px; border-radius: 6px; background: var(--canvas); color: var(--ink); border: 1px solid var(--line); font-size: .72rem; pointer-events: none; }
.home-chart-total { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; color: var(--text-soft); font-size: .8rem; }
.home-chart-total strong { font-size: 1.35rem; color: var(--ink); }
.home-chart-total small { color: var(--muted); }
.home-sales-strip { display: flex; align-items: center; gap: 14px; min-height: 62px; margin-top: 16px; padding: 7px clamp(12px, 1.5vw, 20px); }
.home-sales-strip h2 { display: flex; align-items: center; gap: 9px; font-size: .91rem; }
.home-sales-strip h2 .home-icon { color: var(--accent-text); }
.home-sales-strip ul { flex: 1; display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; padding: 0; margin: 0; list-style: none; }
.home-sales-strip li { border-inline-start: 1px solid var(--line); }
.home-sales-strip a:not(.home-more) { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: clamp(4px, 1vw, 12px); font-size: .85rem; white-space: nowrap; }
.home-sales-strip .home-art { width: 35px; }
.home-sales-strip p { margin: 0 auto 0 0; color: var(--muted); font-size: .85rem; }
.home-sales-strip abbr { text-decoration: none; }
.home-more { color: var(--accent-text); display: inline-flex; gap: 7px; align-items: center; min-height: 44px; font-weight: 700; font-size: .86rem; white-space: nowrap; }
.home-more:hover, .home-sales-strip a:not(.home-more):hover, .home-item:hover strong, .home-releases a:hover strong { text-decoration: underline; }
.home-search {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(22px, 3vw, 36px);
  padding: 13px 17px;
  min-height: 64px;
  border: 1px solid var(--control-accent-border);
  border-radius: var(--home-radius);
  background: var(--soft);
  color: var(--text-soft);
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 650;
}
.home-search:hover { color: var(--ink); background: var(--surface); }
.home-section { margin-top: clamp(32px, 4.25vw, 64px); }
.market-home-heading { display: flex; align-items: center; justify-content: space-between; column-gap: 12px; margin-bottom: 16px; }
.home-section h2 { font-size: clamp(25px, 3.45vw, 44px); letter-spacing: -.045em; line-height: 1.13; font-weight: 750; margin: 0; }
.market-home-heading p { color: var(--text-soft); font-size: clamp(.82rem, 1.22vw, .98rem); margin: 6px 0 0; }
.home-empty { margin: 0; padding: 22px 16px; text-align: center; color: var(--text-soft); font-size: .88rem; }
.home-value-table { width: 100%; border-spacing: 0; text-align: left; overflow: hidden; }
.home-value-table thead { background: var(--soft); color: var(--text-soft); font-size: .81rem; }
.home-value-table :is(td,th) { padding: 10px clamp(10px, 2vw, 27px); }
.home-value-table tbody :is(td,th) { border-top: 1px solid var(--line); }
.home-value-table td strong, .home-mover-values { font-variant-numeric: tabular-nums; }
.home-value-table td > small { display: none; }
.home-art { flex: none; width: 48px; aspect-ratio: 1; display: grid; place-items: center; color: var(--muted); }
.home-art img { width: 100%; height: 100%; object-fit: contain; }
.home-item { display: flex; gap: 12px; align-items: center; min-height: 44px; overflow-wrap: anywhere; font-size: .9rem; }
.home-item small { display: block; color: var(--muted); font-size: .74rem; margin-top: 3px; }
.home-change-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.home-change-link > span { font-size: .76rem; color: var(--muted); }
.home-change-link:hover > span { color: var(--accent-text); }
.home-delta { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 4px 7px; color: var(--text-soft); font-size: .79rem; font-variant-numeric: tabular-nums; }
.home-delta[data-direction="up"] { color: var(--positive); border-color: color-mix(in srgb, var(--positive) 42%, var(--line)); }
.home-delta[data-direction="down"] { color: var(--negative); border-color: color-mix(in srgb, var(--negative) 42%, var(--line)); }
.home-movers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.home-mover h3 { display: flex; align-items: center; gap: 9px; margin: 0; padding: 13px 16px; font-size: 1rem; }
.home-mover h3 svg { color: var(--accent-text); }
.home-mover:last-child h3 svg { color: var(--negative); }
.home-mover :is(ul,ol) { list-style: none; margin: 0; padding: 0; }
.home-mover li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 8px 13px; }
.home-mover .home-art { width: 38px; }
.home-mover-values { display: flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: .77rem; }
.home-mover-values strong { color: var(--ink); }
.home-mover .home-empty { border-width: 1px 0 0; border-radius: 0; }
#home-trades .native-trade-list { margin: 0; }
.native-trade-preview { border-radius: var(--home-radius); }
.native-trade-preview .native-trade-exchange {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  gap: 10px;
  padding: 12px clamp(12px, 2.5vw, 20px);
}
.native-trade-preview .native-trade-side h3 { margin-bottom: 6px; color: var(--muted); }
.native-trade-preview .native-trade-side ul { gap: 6px; }
.native-trade-preview .native-trade-side a {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  min-height: 44px;
  gap: 8px;
  padding: 5px 8px 5px 5px;
}
.native-trade-preview .native-trade-divider { align-self: start; margin-top: 34px; }
.native-trade-preview .native-trade-divider::before { display: none; }
.native-trade-preview .native-trade-divider span { width: 28px; height: 28px; font-size: 1rem; }
.native-trade-preview .native-trade-meta {
  padding: 8px clamp(12px, 2.5vw, 20px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
}
.native-trade-preview .native-trade-source { color: var(--text-soft); font-weight: 650; }
.home-releases { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.home-releases a { display: grid; justify-items: center; gap: 4px; height: 100%; text-align: center; padding: 12px 8px; overflow-wrap: anywhere; }
.home-releases .home-art { width: 64px; margin-bottom: 3px; }
.home-releases strong { font-size: .86rem; }
.home-releases :is(small,time) { font-size: .7rem; color: var(--muted); }
#home-news h2 { font-size: clamp(20px, 2.3vw, 27px); }
#home-news .news-list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
#home-news .news-list li { border-top: 1px solid var(--line); }
#home-news .news-list a {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 2px 20px; min-height: 44px; padding: 10px 4px;
  line-height: 1.4; text-decoration: none; overflow-wrap: anywhere;
}
#home-news .news-list a:hover strong, #home-news .news-list a:focus-visible strong { text-decoration: underline; }
#home-news .news-meta { color: var(--muted); font-size: .82rem; }
.home-tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.home-tool-grid a { display: flex; flex-direction: column; padding: clamp(14px, 2vw, 24px); color: var(--ink); }
.home-tool-grid a:hover, .home-releases a:hover { border-color: var(--control-accent-border); }
.home-tool-grid strong { display: flex; align-items: center; gap: 10px; font-size: 1rem; }
.home-tool-grid .home-icon, .home-tool-grid strong span { color: var(--accent-text); }
.home-tool-grid strong span { margin-left: auto; }
.home-tool-preview { aspect-ratio: 16 / 10; display: grid; place-items: center; margin-top: 12px; overflow: hidden; background: #101621; border: 1px solid var(--line); border-radius: 8px; }
.home-tool-preview img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.home-tool-grid p { margin: 10px 0; color: var(--text-soft); font-size: .86rem; }
.home-tool-grid small { margin-top: auto; color: var(--muted); }
.home-page .site-footer { margin-top: clamp(32px, 4.25vw, 64px); }
.home-footer-action { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.site-footer .home-discord { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-text); font-weight: 750; min-height: 44px; margin-top: 8px; }
.home-discord svg { fill: #7288ff; width: 22px; height: 22px; flex: none; }

@media (max-width: 850px) {
  .home-mover li { grid-template-columns: 1fr auto; }
  .home-mover .home-item { grid-column: 1 / -1; }
  .home-sales-strip a:not(.home-more) { font-size: .76rem; }
}
@media (max-width: 680px) {
  .market-home-hero { grid-template-columns: 1fr; gap: 10px; }
  .home-brand { min-height: 167px; padding-block: 3px 39px; }
  .home-brand h1 { font-size: clamp(70px, 17vw, 100px); }
  .home-brand p { margin-top: 8px; }
  .home-sales-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; }
  .home-sales-strip ul { grid-row: 2; grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .home-sales-strip li + li { border-inline-start: 1px solid var(--line); }
  .home-sales-strip li:first-child { border: 0; }
  .home-sales-strip p { grid-row: 2; grid-column: 1 / -1; padding-bottom: 8px; }
  .home-sales-strip .home-art { width: 26px; }
  .home-sales-strip .home-more { grid-column: 2; grid-row: 1; }
  .market-home-heading { flex-wrap: wrap; }
  .home-value-table, .home-value-table tbody { display: block; }
  .home-value-table thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; white-space: nowrap; overflow: hidden; }
  .home-value-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; padding: 7px 11px; gap: 3px 6px; align-items: center; }
  .home-value-table tr + tr { border-top: 1px solid var(--line); }
  .home-value-table tbody th { grid-column: 1 / -1; }
  .home-value-table tbody :is(td,th) { padding: 0; border: 0; }
  .home-value-table td > small { display: block; color: var(--muted); font-size: .7rem; }
  .home-value-table td > strong { display: block; font-size: .84rem; overflow-wrap: anywhere; }
  .home-value-table .home-art { width: 38px; }
  .home-movers, .home-tool-grid { grid-template-columns: 1fr; gap: 10px; }
  .home-mover li { grid-template-columns: minmax(0, 1fr) auto; }
  .home-releases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .native-trade-preview .native-trade-exchange { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .native-trade-preview .native-trade-divider { margin-top: 0; }
  .native-trade-preview .native-trade-divider::before { display: block; }
}
@media (max-width: 400px) {
  .market-home { width: calc(100% - 28px); }
  .home-chart .dashboard-x span:not(:nth-child(6n + 2)) { visibility: hidden; }
  .home-chart .dashboard-x span:nth-child(6n + 2) { visibility: visible; }
  .home-chart .dashboard-x { font-size: .63rem; }
}
