:root {
  --bg: #FFFFFF; --ink: #121318; --muted: #5B5E6B; --line: #E4E5EA; --line2: #EEEFF3; --soft: #F3F3F7;
  --accent: #4A44F2; --link: #3530D9; --up: #0B7A3E; --down: #B42318; --new: #3530D9; --flat: #6B6E7B;
  --mast: #121318; --mast-fg: #FFFFFF; --mast-muted: #B9BCC8; --mast-field: #23252E;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0F13; --ink: #ECEDF2; --muted: #9A9DAB; --line: #262833; --line2: #1E2029; --soft: #171920;
    --accent: #7B76FF; --link: #A3A0FF; --up: #3DCB7F; --down: #FF7A6B; --new: #A3A0FF; --flat: #8A8D9A;
    --mast: #08090C; --mast-field: #1B1D25;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 24px; } }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: "Space Grotesk", Inter, sans-serif; letter-spacing: -0.02em; }

/* masthead */
.mast { background: var(--mast); color: var(--mast-fg); }
.mast .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.logo { color: var(--mast-fg); text-decoration: none; font: 700 34px/1 "Space Grotesk", sans-serif; letter-spacing: -0.03em; }
.logo span { color: var(--accent); }
.tag { color: var(--mast-muted); font-size: 15px; }
.tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upd { display: inline-flex; align-items: center; gap: 8px; color: var(--mast-muted); font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3DDC84; }
.search { display: flex; align-items: center; gap: 8px; background: var(--mast-field); border-radius: 8px; padding: 0 12px; height: 44px; color: var(--mast-muted); }
.search input { background: transparent; border: 0; color: var(--mast-fg); font: inherit; font-size: 15px; width: 240px; outline: none; }
.search input::placeholder { color: var(--mast-muted); }
@media (max-width: 600px) { .tools, .search { width: 100%; } .search input { width: 100%; } .upd { order: 2; } }

/* tabs */
.tabs { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.tabs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs ul::-webkit-scrollbar { display: none; }
.tabs a { display: block; padding: 14px 12px 11px; white-space: nowrap; text-decoration: none; font-size: 15px; font-weight: 500; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }

main { padding-top: 28px; padding-bottom: 56px; }
main > section + section, main > section.nl { margin-top: 44px; }
h2 { font-size: 26px; margin: 0 0 4px; }
.lede { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.hrow { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hrow .lede { margin: 0; }
.ph { margin-bottom: 22px; }
.ph h1 { font-size: clamp(30px, 4.5vw, 44px); margin: 0 0 6px; line-height: 1.1; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }

/* #1 tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.tile1 { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 12px; background: var(--soft); text-decoration: none; color: var(--ink); min-height: 150px; }
.tile1:hover { outline: 2px solid var(--line); }
.tile1 .lbl { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.one { display: flex; align-items: center; gap: 14px; }
.one .n { font: 700 56px/1 "Space Grotesk", sans-serif; letter-spacing: -0.04em; color: var(--accent); }
.one .t, .movers .t { display: flex; flex-direction: column; min-width: 0; }
.one strong { font-size: 18px; line-height: 1.25; }
.one .t span, .movers .t span { font-size: 14px; color: var(--muted); }
.tile1 .note { font-size: 13px; color: var(--muted); }

/* artwork */
.art { flex: none; border-radius: 9px; object-fit: cover; background: var(--soft); display: block; }
.art.wide { border-radius: 6px; }
.art.tile { display: grid; place-items: center; background: var(--tint); color: #fff; font-weight: 700; font-size: 15px; }
.one .art.tile { font-size: 20px; border-radius: 12px; }

/* chart cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 0; display: flex; flex-direction: column; min-width: 0; }
.card header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.card h3 { margin: 0; font: 600 17px/1.3 Inter, sans-serif; letter-spacing: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.prov { font-size: 12px; color: var(--muted); text-align: right; }
.card .all { margin-top: auto; padding: 12px 0; border-top: 1px solid var(--line2); font-size: 14px; font-weight: 600; text-decoration: none; }
.na { color: var(--muted); padding: 16px 0; margin: 0; }

/* rows */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 26px 44px auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line2); }
.rk { font: 700 18px/1 "Space Grotesk", sans-serif; font-variant-numeric: tabular-nums; }
.mv { font-size: 12px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mv.up { color: var(--up); } .mv.down { color: var(--down); } .mv.new { color: var(--new); } .mv.flat { color: var(--flat); }
.nm { min-width: 0; display: flex; flex-direction: column; }
.nm > a { color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm > a:hover { text-decoration: underline; color: var(--link); }
.sb { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; }
.card .row .st { display: none; }
.card .row { grid-template-columns: 26px 40px auto minmax(0, 1fr); }
.full .row { padding: 12px 0; grid-template-columns: 34px 48px auto minmax(0, 1fr) auto; gap: 12px; }
.full .rk { font-size: 20px; }
.full .nm > a { font-size: 16px; white-space: normal; }
.full .sb { white-space: normal; }
.news { font-size: 13px; text-decoration: none; margin-top: 2px; }
.news:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .full .row { grid-template-columns: 28px 40px auto minmax(0, 1fr); }
  .full .st { grid-column: 4; align-items: flex-start; flex-direction: row; gap: 10px; }
}

/* chart page layout */
.layout { display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-start; }
.layout .main { flex: 999 1 560px; min-width: 0; }
.layout .side { flex: 1 1 300px; min-width: 0; }
.side section + section { margin-top: 28px; }
.side h2 { font-size: 19px; margin-bottom: 8px; }
.side p { margin: 0; color: var(--muted); font-size: 15px; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.links a { display: block; padding: 10px 0; border-top: 1px solid var(--line2); text-decoration: none; font-weight: 500; }
.filter input { width: 100%; font: inherit; font-size: 15px; padding: 0 14px; height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); margin-bottom: 8px; }

/* movers */
.movers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.movers a { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.movers a:hover { border-color: var(--muted); }
.jump { font: 700 22px/1 "Space Grotesk", sans-serif; color: var(--up); flex: none; }
.movers strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* newsletter */
.nl { background: var(--mast); color: var(--mast-fg); border-radius: 14px; padding: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.nl h2 { color: var(--mast-fg); }
.nl p { margin: 0; color: var(--mast-muted); font-size: 15px; }
.nl form { display: flex; gap: 8px; flex-wrap: wrap; position: relative; }
.nl input[type=email] { font: inherit; font-size: 15px; padding: 0 14px; height: 48px; border-radius: 8px; border: 0; width: 260px; max-width: 100%; background: #fff; color: #121318; }
.nl button { font: inherit; font-weight: 600; font-size: 15px; height: 48px; padding: 0 20px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; cursor: pointer; }
.nl button:disabled { opacity: .7; cursor: wait; }
.nl .msg { flex-basis: 100%; min-height: 1em; font-size: 14px; }
.nl .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.side .nl { padding: 20px; flex-direction: column; align-items: stretch; }
.side .nl input[type=email] { width: 100%; }
.side .nl button { width: 100%; }

.about p, .prose p, .prose li { color: var(--muted); max-width: 70ch; }
.about h2 { font-size: 20px; }
.prose h1 { font-size: 36px; margin: 0 0 16px; }
.plain { padding-left: 20px; }
.plain li + li { margin-top: 8px; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer .wrap { padding-top: 20px; padding-bottom: 32px; display: grid; gap: 10px; }
footer nav { display: flex; gap: 6px 18px; flex-wrap: wrap; }
footer nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14px; }
footer p { margin: 0; max-width: 80ch; }
