:root {
  color-scheme: light;
  --bg: #f5f6ef;
  --panel: #fff;
  --text: #19251f;
  --muted: #4f6257;
  --border: #dce3da;
  --soft: #eef2ea;
  --brand: #245846;
  --brand-ink: #fff;
  --buy: #176444;
  --buy-bg: #e6f4ea;
  --hold: #744f12;
  --hold-bg: #faf0d7;
  --sell: #8e3c36;
  --sell-bg: #fbece7;
  --radius: 16px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { color-scheme: dark; --bg: #151d19; --panel: #1d2822; --text: #f1f5ee; --muted: #b0c1b6; --border: #37473e; --soft: #25342b; --brand: #9ed5b9; --brand-ink: #172820; --buy: #a7e4c1; --buy-bg: #253f33; --hold: #f3d288; --hold-bg: #493c24; --sell: #f5bfb5; --sell-bg: #492e2b; }
}
:root[data-theme="dark"] { color-scheme: dark; --bg: #151d19; --panel: #1d2822; --text: #f1f5ee; --muted: #b0c1b6; --border: #37473e; --soft: #25342b; --brand: #9ed5b9; --brand-ink: #172820; --buy: #a7e4c1; --buy-bg: #253f33; --hold: #f3d288; --hold-bg: #493c24; --sell: #f5bfb5; --sell-bg: #492e2b; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.top { background: var(--panel); border-bottom: 1px solid var(--border); }
.top-inner, main { width: min(1190px, calc(100% - 64px)); margin-inline: auto; }
.top-inner { min-height: 70px; display: flex; align-items: center; gap: 48px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; text-decoration: none; font-size: 17px; font-weight: 560; }
.brand svg { color: var(--brand); flex: none; }
nav { display: flex; align-items: center; gap: 26px; font-size: 14px; align-self: stretch; }
nav a { display: grid; align-items: center; border-bottom: 2px solid var(--brand); text-decoration: none; font-weight: 650; }
.link-button { background: none; border: 0; color: var(--muted); padding: 8px 0; font-size: inherit; }
.link-button:hover { color: var(--text); text-decoration: underline; }
.top-actions { margin-left: auto; display: flex; gap: 10px; }
.button, select, input { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; min-height: 40px; }
.button, select { white-space: nowrap; font-size: 14px; }
.button:hover { background: var(--soft); }
.button.primary { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); }
button:disabled { opacity: .65; cursor: wait; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 46px 0 24px; }
.eyebrow { margin: 0 0 7px; color: var(--brand); font-size: 12px; letter-spacing: .11em; text-transform: uppercase; font-weight: 750; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.4rem, 5vw, 4.1rem); line-height: 1.04; letter-spacing: -.075em; font-weight: 680; }
.intro-copy { color: var(--muted); margin-top: 12px; max-width: 56ch; }
.freshness { color: var(--muted); display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.dot { height: 7px; width: 7px; background: var(--brand); border-radius: 100%; }
.notice { padding: 11px 15px; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); background: var(--soft); margin-bottom: 18px; font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { display: flex; flex-direction: column; align-items: start; text-align: left; background: var(--panel); border: 1px solid var(--border); padding: 17px 18px 16px; border-radius: var(--radius); min-width: 0; }
.stat:hover, .stat[aria-pressed="true"] { border-color: var(--signal); }
.stat span, .pill { font-size: 12px; font-weight: 720; border-radius: 20px; padding: 3px 9px; background: var(--tint, var(--soft)); color: var(--signal, var(--muted)); white-space: nowrap; }
.buy { --signal: var(--buy); --tint: var(--buy-bg); }
.hold { --signal: var(--hold); --tint: var(--hold-bg); }
.sell { --signal: var(--sell); --tint: var(--sell-bg); }
.stat strong { font-size: 32px; font-weight: 670; letter-spacing: -.035em; margin-top: 4px; }
.stat small { color: var(--muted); font-size: 12px; }
.listing { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); overflow: clip; }
.listing-head { padding: 17px 19px; display: flex; align-items: center; justify-content: space-between; gap: 13px; }
h2 { font-size: 19px; letter-spacing: -.026em; }
#result-count { color: var(--muted); font-size: 13px; }
.controls, .form-actions { display: flex; gap: 8px; }
.search { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); padding-left: 9px; }
.search:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.search input { border: 0; outline: none; min-height: 38px; width: 12.5rem; padding-left: 7px; font-size: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
thead { background: var(--soft); color: var(--muted); font-size: 12px; }
th, td { padding: 12px 12px; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; padding-left: 19px; white-space: normal; }
th:nth-child(2), td:nth-child(2) { text-align: left; }
th:last-child, td:last-child { padding-right: 19px; }
tbody tr:not(:last-child) { border-bottom: 1px solid var(--border); }
.stock { padding: 0; border: 0; background: none; text-align: left; font-weight: 680; }
.stock:hover { text-decoration: underline; }
.ticker { display: block; color: var(--muted); font-size: 12px; }
.empty { padding: 28px 19px; color: var(--muted); }
footer { display: flex; justify-content: space-between; gap: 10px; margin: 22px 0 26px; font-size: 12px; color: var(--muted); }
dialog { width: min(520px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); color: var(--text); }
dialog::backdrop { background: #101d17a1; }
dialog h2 { margin-bottom: 12px; padding-right: 65px; }
dialog p + p { margin-top: 10px; }
.dialog-close { float: right; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 15px; }
dt { font-weight: 660; }
dd { margin: 0; }
#login form:not(.dialog-close) { display: grid; gap: 8px; margin: 17px 0; }
#login .primary { justify-self: start; }
#auth-feedback { min-height: 1.5em; color: var(--muted); }
@media (max-width: 760px) {
  .top-inner, main { width: calc(100% - 30px); }
  .top-inner { gap: 14px; flex-wrap: wrap; padding-top: 10px; }
  nav { order: 3; width: 100%; min-height: 36px; }
  .intro { padding-top: 30px; align-items: start; flex-direction: column; gap: 10px; }
  .stats { gap: 7px; }
  .stat { padding: 10px; border-radius: 10px; }
  .stat strong { font-size: 25px; }
  .listing-head { align-items: stretch; flex-direction: column; padding: 12px; }
  .search { flex: 1; min-width: 0; }
  .search input { width: 100%; }
  th, td { padding-inline: 9px; }
  th:first-child, td:first-child { min-width: 126px; padding-left: 12px; }
  th:last-child, td:last-child { padding-right: 12px; }
}
