.market-page { padding-top: 3.5rem; padding-bottom: 2.5rem; min-width: 0; }
.market-intro { max-width: 780px; margin-bottom: 1.8rem; }
.market-intro h1 { margin: .35rem 0 1rem; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.12; letter-spacing: -.04em; }
.market-intro p { line-height: 1.7; }
.market-muted { color: var(--dim, #94a3b8); font-size: .9rem; }
.market-notice { border: 1px solid var(--border, #334155); background: var(--panel, #152033); border-radius: .7rem; padding: 1rem 1.15rem; margin: 1rem 0; line-height: 1.6; overflow-wrap: anywhere; }
.market-notice.is-warning { border-color: #a47c3c; }
.market-notice.is-error, .market-form-error { color: #963c30; border-color: #b67169; }
.market-controls, .market-form { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: end; margin: 1.7rem 0; }
.market-field { min-width: 0; flex: 0 1 250px; }
.market-field label { display: block; margin-bottom: .45rem; font-weight: 600; font-size: .9rem; }
.market-field input, .market-field output { display: block; width: 100%; box-sizing: border-box; padding: .7rem .8rem; min-height: 46px; border: 1px solid var(--border, #334155); border-radius: .45rem; background: var(--bg, #0c1422); color: var(--text, #edf2f7); font: inherit; }
.market-field output { background: var(--panel, #152033); }
.market-field input[aria-invalid="true"] { border-color: #963c30; }
.market-button { padding: .7rem 1rem; min-height: 46px; color: var(--text, #edf2f7); border: 1px solid var(--border, #334155); background: var(--panel, #152033); border-radius: .45rem; font: inherit; font-weight: 600; cursor: pointer; }
.market-button:disabled { opacity: .6; cursor: wait; }
.market-page :is(a, button, input):focus-visible, .market-table-scroll:focus-visible { outline: 2px solid var(--green, #1b624b); outline-offset: 4px; }
.market-controls > p { margin: 0 0 .7rem; }
.market-table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--border, #334155); border-radius: .7rem; -webkit-overflow-scrolling: touch; }
.market-table { width: 100%; border-collapse: collapse; text-align: right; font-size: .875rem; }
.market-table caption { text-align: left; padding: 1rem; color: var(--dim, #94a3b8); font-size: .82rem; }
.market-table th, .market-table td { padding: .85rem 1rem; white-space: nowrap; border-bottom: 1px solid var(--border, #334155); }
.market-table thead th { color: var(--dim, #94a3b8); font-size: .8rem; }
.market-table :is(th, td):first-child { text-align: left; }
.market-table tbody th { font-weight: 650; }
.market-table tbody tr:last-child > * { border-bottom: 0; }
.market-table tbody tr:hover > * { background: var(--panel, #152033); }
.market-table th button { color: inherit; font: inherit; font-weight: 650; background: none; border: 0; padding: .3rem 0; cursor: pointer; min-height: 40px; }
.market-table th[aria-sort="ascending"] button::after { content: " ↑"; }
.market-table th[aria-sort="descending"] button::after { content: " ↓"; }
.market-value { display: block; font-variant-numeric: tabular-nums; }
.market-value.is-positive { color: #216243; }
.market-value.is-negative { color: #963c30; }
.market-detail { display: block; font-size: .75rem; color: var(--dim, #94a3b8); padding-top: .2rem; }
.market-unavailable { color: var(--dim, #94a3b8); font-size: .8rem; }
.market-method { margin-top: 3rem; max-width: 850px; line-height: 1.8; }
.market-method h2 { font-size: 1.5rem; }
.market-method li { margin-bottom: .6rem; }
.market-footer { border-top: 1px solid var(--border, #334155); color: var(--dim, #94a3b8); padding-top: 1.5rem; padding-bottom: 2rem; font-size: .8rem; line-height: 1.7; }
.market-form { padding: 1.3rem; border: 1px solid var(--border, #334155); border-radius: .7rem; background: var(--panel, #152033); }
.market-form .market-field { flex: 1 1 190px; }
.market-form-error { min-height: 1.5rem; font-size: .9rem; }
.market-archived { max-width: 1000px; }
.market-source { font-size: .8rem; }
@media (max-width: 600px) {
  .market-page { padding-top: 2rem; }
  .market-controls { gap: 1rem; }
  .market-controls .market-field { flex: 1 1 100%; }
  .market-controls > p { flex: 1 1 100%; }
  .market-form { padding: 1rem; }
  .market-form .market-field { flex-basis: 100%; }
  .market-table th, .market-table td { padding: .75rem; }
}
