@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  font-family: "DM Sans", sans-serif;
  background: #10131b;
  color: #eef0f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 75% -15%, rgb(44 79 74 / 28%), transparent 48%),
    #10131b;
}

.shell { width: min(100% - 48px, 1000px); margin: 0 auto; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #252a35; }
.brand { color: #f0f3f5; font-size: 15px; font-weight: 700; letter-spacing: .12em; text-decoration: none; }
.brand span { margin-left: 7px; color: #75d7a4; font-family: "DM Mono", monospace; font-size: 11px; }
.source, .eyebrow, label, .stat-label, .live-dot { color: #828b9c; font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: .09em; }
.intro { padding: 66px 0 34px; }
.eyebrow { margin: 0 0 12px; color: #75d7a4; }
h1 { margin: 0; font-size: clamp(32px, 6vw, 48px); line-height: 1.1; letter-spacing: -.045em; }
.subtitle { margin: 13px 0 0; color: #a0a7b5; font-size: 15px; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; padding: 4px; border: 1px solid #292f3b; border-radius: 8px; background: #141821; }
.tab { padding: 10px 15px; border: 0; border-radius: 5px; background: transparent; color: #929aaa; font: inherit; font-size: 13px; cursor: pointer; }
.tab:hover { color: #eef0f5; }
.tab.active { background: #29333a; color: #9ce5bb; }
.search-panel, .stat-card, .chart-card { border: 1px solid #292f3b; border-radius: 10px; background: #171b25; }
.search-panel { padding: 19px 20px 11px; }
.search-panel > label { display: block; margin-bottom: 10px; }
.search-row { display: flex; align-items: center; gap: 12px; }
.search-wrap { position: relative; flex: 1; }
input, select { width: 100%; height: 46px; border: 1px solid #343b49; border-radius: 6px; outline: none; background: #11151e; color: #f1f3f7; font: inherit; }
input { padding: 0 14px; }
select { width: 138px; padding: 0 10px; cursor: pointer; }
input:focus, select:focus { border-color: #75d7a4; box-shadow: 0 0 0 2px rgb(117 215 164 / 12%); }
.period-label { margin-left: 5px; }
.status { min-height: 17px; margin: 9px 0 0; color: #7e8797; font-size: 12px; }
.status.error { color: #ff8e8e; }
.search-results { position: absolute; z-index: 3; top: calc(100% + 6px); left: 0; width: 100%; max-height: 260px; overflow-y: auto; padding: 5px; border: 1px solid #343b49; border-radius: 7px; background: #1c222d; box-shadow: 0 12px 30px rgb(0 0 0 / 32%); }
.search-results button { display: block; width: 100%; padding: 10px; border: 0; border-radius: 4px; background: transparent; color: #e8ebf0; text-align: left; cursor: pointer; }
.search-results button:hover, .search-results button:focus { outline: none; background: #29333a; }
.price-view { padding-top: 37px; }
.item-heading, .chart-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
h2 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.wiki-link { color: #8dbaa1; font-size: 12px; text-decoration: none; }
.wiki-link:hover { color: #a5e8c1; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 14px; }
.stat-card { display: flex; flex-direction: column; min-height: 113px; padding: 17px 18px; }
.stat-card strong { margin-top: 7px; font-family: "DM Mono", monospace; font-size: 24px; font-weight: 500; }
.stat-note { margin-top: 4px; color: #858e9e; font-size: 11px; }
.chart-card { padding: 19px 20px 15px; }
h3 { margin: 0; font-size: 15px; font-weight: 600; }
.chart-heading p { margin: 5px 0 0; color: #838c9c; font-size: 11px; }
.live-dot { color: #75d7a4; font-size: 10px; }
.chart-container { position: relative; height: 340px; margin-top: 18px; }
.disclaimer { margin: 10px 0 0; color: #707989; font-size: 11px; line-height: 1.6; }
.risk-note { margin: 12px 0 0; padding: 11px 13px; border: 1px solid #765338; border-radius: 6px; background: #30251d; color: #f0bf88; font-size: 12px; line-height: 1.5; }
.flips-panel { padding: 21px 20px; border: 1px solid #292f3b; border-radius: 10px; background: #171b25; }
.recommendations-panel { padding: 21px 20px; border: 1px solid #292f3b; border-radius: 10px; background: #171b25; }
.recommendations-list { display: grid; gap: 10px; margin-top: 16px; }
.recommendation-card { padding: 15px; border: 1px solid #292f3b; border-radius: 8px; background: #141821; }
.recommendation-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.recommendation-item-button { padding: 0; border: 0; background: transparent; color: #9ce5bb; font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
.recommendation-item-button:hover { color: #c1f3d4; text-decoration: underline; }
.recommendation-item-button:focus-visible { outline: 2px solid #75d7a4; outline-offset: 3px; }
.recommendation-confidence, .recommendation-updated { color: #858e9e; font-size: 11px; }
.recommendation-card > p { margin: 10px 0 0; color: #cbd0d9; font-size: 13px; line-height: 1.5; }
.recommendation-card > .recommendation-updated { color: #858e9e; font-size: 10px; }
.flip-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.flip-heading h2 { font-size: 22px; }
.flip-description { margin: 8px 0 0; color: #929aaa; font-size: 12px; }
.refresh-button { padding: 9px 12px; border: 1px solid #3c5449; border-radius: 5px; background: #1c2a25; color: #9ce5bb; font: inherit; font-size: 12px; cursor: pointer; }
.refresh-button:hover { background: #263a31; }
.flip-controls { display: grid; grid-template-columns: minmax(150px, 1.5fr) repeat(2, minmax(130px, 1fr)) minmax(160px, 1.2fr) auto auto; align-items: end; gap: 10px; margin-top: 17px; }
.flip-control { display: flex; min-width: 0; flex-direction: column; gap: 7px; color: #858e9e; font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .04em; }
.flip-control input, .flip-control select { height: 38px; min-width: 0; padding: 0 9px; font-family: "DM Sans", sans-serif; font-size: 12px; letter-spacing: normal; }
.sort-direction, .clear-filters { height: 38px; padding: 0 10px; border: 1px solid #343b49; border-radius: 6px; background: #11151e; color: #cbd0d9; font: inherit; font-size: 11px; white-space: nowrap; cursor: pointer; }
.sort-direction:hover, .clear-filters:hover { border-color: #75d7a4; color: #9ce5bb; }
.flip-results-count { margin: 10px 0 0; color: #858e9e; font-size: 11px; }
.table-wrap { overflow-x: auto; margin-top: 15px; border: 1px solid #292f3b; border-radius: 7px; }
#flips-panel table { width: 100%; min-width: 760px; table-layout: fixed; border-collapse: collapse; text-align: right; }
th { padding: 0; background: #1d222d; }
th:first-child, td:first-child { text-align: left; }
.sort-header { width: 100%; padding: 10px 6px; border: 0; background: transparent; color: #858e9e; font-family: "DM Mono", monospace; font-size: 9px; font-weight: 400; letter-spacing: .04em; text-align: right; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
th:first-child .sort-header { text-align: left; }
.sort-header:hover, th[aria-sort="ascending"] .sort-header, th[aria-sort="descending"] .sort-header { color: #9ce5bb; }
.sort-indicator { color: #75d7a4; }
td { padding: 9px 6px; border-top: 1px solid #282e39; color: #cbd0d9; font-family: "DM Mono", monospace; font-size: 10px; overflow-wrap: anywhere; }
.rank-cell { width: 36px; color: #737c8c; }
.table-item { max-width: 100%; margin-left: 4px; padding: 0; border: 0; background: none; color: #e7ebf1; font: 500 11px "DM Sans", sans-serif; text-align: left; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
.table-item:hover { color: #9ce5bb; text-decoration: underline; }
.profit-cell { color: #81dba9; }
tbody tr:hover { background: rgb(255 255 255 / 2%); }
.flips-empty { padding: 28px 16px; color: #929aaa; text-align: center; font-size: 13px; }
footer { margin-top: 48px; padding: 18px 0 24px; border-top: 1px solid #252a35; color: #737c8c; font-size: 11px; }
footer span { padding: 0 4px; color: #75d7a4; }

@media (max-width: 620px) {
  .shell { width: min(100% - 30px, 1000px); }
  .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab { padding: 9px 5px; font-size: 11px; }
  .intro { padding-top: 48px; }
  .search-row { flex-wrap: wrap; }
  .search-wrap { flex-basis: 100%; }
  .period-label { margin-left: 0; }
  select { flex: 1; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .stat-card { min-height: 100px; padding: 14px; }
  .stat-card strong { font-size: 19px; }
  .chart-card { padding: 16px 12px 12px; }
  .chart-container { height: 270px; }
  .item-heading { align-items: flex-end; }
  .wiki-link { text-align: right; }
  .flips-panel { padding: 16px 12px; }
  .flip-heading { align-items: center; }
  .recommendations-panel { padding: 16px 12px; }
  .recommendation-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .flip-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flip-control:first-child { grid-column: span 2; }
}

@media (max-width: 480px) {
  #flips-panel th, #flips-panel td { padding-right: 3px; padding-left: 3px; font-size: 9px; }
  #flips-panel .sort-header { padding-right: 3px; padding-left: 3px; font-size: 8px; }
  #flips-panel .table-item { font-size: 10px; }
}
