@font-face {
  font-family: Metropolis;
  src: url('/fonts/Metropolis-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --paper: #f5f2e9;
  --paper-strong: #fffdf8;
  --ink: #111;
  --muted: #5e5c56;
  --line: #c7c5bd;
  --blue: #154cff;
  --sans: Metropolis, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color: var(--ink); background: var(--paper); }
body { margin: 0; background: var(--paper); font: 400 16px/1.6 var(--sans); }
a { color: var(--blue); text-underline-offset: 4px; }
button, input, select { font: inherit; border-radius: 0; }
button, select { cursor: pointer; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.skip-link { position: absolute; z-index: 10; left: 12px; top: -100px; padding: 10px 16px; background: var(--paper-strong); }
.skip-link:focus { top: 8px; }
.app-header { display: flex; align-items: center; gap: 24px; min-height: 76px; padding: 10px 32px; background: #050505; color: white; }
.brand { flex: 0 0 auto; color: white; text-decoration: none; font: 400 22px/1 Arial, sans-serif; }
.top-nav { display: flex; align-items: center; gap: 3px; margin-left: auto; min-width: 0; }
.top-nav a { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; color: #cececa; text-decoration: none; font-size: 14px; white-space: nowrap; }
.top-nav a:hover { color: white; text-decoration: underline; }
.top-nav a.active { color: var(--ink); background: var(--paper-strong); }
.avatar { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid #888; border-radius: 50%; color: white; text-decoration: none; }
.discover-main { max-width: 1184px; margin: 0 auto; padding: 52px 32px 28px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; margin-bottom: 30px; }
h1, h2, h3, p { margin: 0; }
h1 { font: 400 clamp(32px, 4vw, 44px)/1.08 Georgia, serif; letter-spacing: -0.035em; margin-bottom: 14px; }
.page-heading p { max-width: 690px; color: var(--muted); }
.page-heading > a { margin-top: 8px; flex-shrink: 0; }
.primary-btn, .outline-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 11px 20px; border: 1px solid var(--blue); color: white; background: var(--blue); font-size: 14px; font-weight: 600; line-height: 1.35; text-decoration: none; }
.primary-btn:hover { background: #103bcc; border-color: #103bcc; }
.outline-btn { color: var(--ink); border-color: var(--line); background: transparent; }
.outline-btn:hover { border-color: var(--ink); }
button:disabled { cursor: default; opacity: .5; }
.text-btn { min-height: 44px; padding: 8px 0; color: var(--blue); background: none; border: 0; text-decoration: underline; text-underline-offset: 4px; font-size: 14px; }
.search-form { padding: 24px; border: 1px solid var(--line); background: var(--paper-strong); }
.search-form label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; }
.search-row { display: flex; gap: 10px; }
.search-row input { flex: 1; min-width: 0; }
input, select { min-height: 46px; padding: 10px 12px; border: 1px solid #8d8b84; background: var(--paper-strong); color: var(--ink); font-size: 16px; }
input::placeholder { color: #6c6a66; opacity: 1; }
.filter-row { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-top: 18px; }
.filter-row > div { flex: 0 1 260px; min-width: 0; }
.filter-row input, .filter-row select { width: 100%; }
.helper { color: var(--muted); font-size: 14px; line-height: 1.6; }
.search-form .helper { margin-top: 14px; }
#discover-live-search-state { padding: 22px 0 8px; }
#search-status { font-size: 14px; color: var(--muted); }
.constraint-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.constraint-row:empty { display: none; }
.constraint-row button { border: 1px solid var(--line); padding: 8px 12px; min-height: 40px; background: transparent; color: var(--ink); font-size: 14px; }
.constraint-row button:hover { border-color: var(--blue); }
.notice, #search-clarification { padding: 14px 18px; border-left: 3px solid var(--blue); background: #eef1fc; font-size: 14px; margin-top: 18px; }
.clarification-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.results-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--ink); padding: 12px 0 15px; }
.results-heading h2 { font-size: 19px; font-weight: 600; }
.result-count { font-size: 14px; color: var(--muted); }
.trade-row { padding: 26px 0; border-bottom: 1px solid var(--line); }
.trade-row-header { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.trade-row h3 { font-size: 20px; line-height: 1.4; max-width: 800px; }
.trade-row h3 a { color: inherit; text-decoration: none; }
.trade-row h3 a:hover { text-decoration: underline; }
.trade-kind { color: var(--muted); white-space: nowrap; font-size: 14px; }
.trade-meta { margin-top: 5px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.exchange-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 20px 0 16px; border: 1px solid var(--line); background: var(--paper-strong); }
.exchange-side { padding: 18px 22px; min-width: 0; }
.exchange-side + .exchange-side { border-left: 1px solid var(--line); }
.exchange-side-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.exchange-label { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.exchange-flexibility { color: var(--muted); font-size: 14px; }
.exchange-obligations { margin: 0; padding-left: 19px; overflow-wrap: anywhere; }
.exchange-obligations li { padding: 2px 0; font-size: 14px; }
.exchange-obligations li:first-child { font-size: 17px; line-height: 1.5; }
.trade-details { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; }
.trade-facts { display: grid; gap: 5px; margin: 0; font-size: 14px; min-width: 0; }
.trade-facts div { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 8px; }
.trade-facts dt { color: var(--muted); }
.trade-facts dd { margin: 0; overflow-wrap: anywhere; }
.trade-details > a { flex-shrink: 0; }
.state-panel { padding: 44px 24px; background: var(--paper-strong); margin-top: 20px; border: 1px solid var(--line); }
.state-panel h3 { font-size: 21px; margin-bottom: 8px; }
.state-panel p { color: var(--muted); max-width: 750px; }
.state-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 22px; font-size: 14px; }
.discover-footer { display: grid; gap: 9px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; }
@media(max-width:1050px) {
  .app-header { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px 24px 0; }
  .top-nav { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; width: 100%; margin: 0; padding-bottom: 8px; }
  .avatar { grid-column: 2; grid-row: 1; }
}
@media(max-width:600px) {
  .app-header { padding: 12px 16px 0; }
  .brand { font-size: 20px; }
  .top-nav a { padding: 8px 12px; font-size: 14px; }
  .discover-main { padding: 30px 16px 24px; }
  .page-heading { display: block; margin-bottom: 22px; }
  .page-heading p { font-size: 14px; }
  .page-heading > a { margin-top: 18px; }
  .search-form { padding: 16px; }
  .search-row { flex-wrap: wrap; }
  .search-row input { flex-basis: 100%; width: 100%; }
  .search-row button { width: 100%; }
  .filter-row { gap: 14px; }
  .filter-row > div { flex: 1 1 100%; }
  .results-heading { display: block; }
  .result-count { margin-top: 6px; }
  .trade-row-header { display: block; }
  .trade-kind { display: block; margin-top: 6px; }
  .exchange-grid { grid-template-columns: 1fr; }
  .exchange-side { padding: 16px; }
  .exchange-side + .exchange-side { border-left: 0; border-top: 1px solid var(--line); }
  .trade-details { display: block; }
  .trade-details > a { display: flex; margin-top: 18px; }
  .trade-facts div { grid-template-columns: 80px minmax(0,1fr); }
  .state-panel { padding: 24px 16px; }
  .pagination { gap: 10px; flex-wrap: wrap; }
}

.discover-views { display:flex; flex-wrap:wrap; gap:24px; margin:0 0 22px; border-bottom:1px solid var(--line); }
.discover-views a { padding:12px 0; color:inherit; text-decoration:none; }
.discover-views [aria-current="page"] { border-bottom:3px solid var(--blue, #3158ff); font-weight:700; }
