:root {
  --black: #090c0a;
  --green: #83ef47;
  --white: #ffffff;
  --ink: #101510;
  --muted: #536053;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--white);
  background: var(--black);
  font-synthesis: none;
  accent-color: #287b12;
}
* { box-sizing: border-box; }
body { margin: 0; border-top: 5px solid var(--green); }
main { max-width: 1080px; margin: auto; padding: 28px 32px; }
header, .section-head, .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
header { padding: 4px 0 27px; border-bottom: 1px solid #ffffff29; }
.brand { font-size: 28px; font-weight: 800; text-decoration: none; color: var(--white); letter-spacing: -1.2px; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 9px; background: var(--green); color: var(--black); border-radius: 9px; font-size: 27px; vertical-align: middle; }
.brand-accent { color: var(--green); }
.tag { color: #c3ccc0; font-size: 13px; letter-spacing: .3px; }
.intro { padding: 53px 0 39px; position: relative; }
.eyebrow { display: flex; align-items: center; gap: 9px; font-size: 11px; letter-spacing: 2.5px; font-weight: 800; color: var(--green); }
.eyebrow::before { content: ''; width: 7px; height: 7px; background: var(--green); border-radius: 50%; }
h1 { font-size: clamp(42px, 6.4vw, 76px); line-height: 1.04; letter-spacing: -3.5px; font-weight: 800; margin: 22px 0; }
h1 span { color: var(--green); }
h2 { font-size: 24px; letter-spacing: -.8px; margin: 0; font-weight: 800; }
h3 { font-size: 17px; letter-spacing: -.3px; }
p { line-height: 1.65; }
.intro > p:not(.eyebrow) { max-width: 600px; color: #e0e6dd; margin: 10px 0; }
.intro > .muted { color: #9ba796 !important; font-size: 13px; }
.panel { position: relative; border: 1px solid #fff; border-radius: 16px; background: var(--white); color: var(--ink); padding: 30px; margin: 0 0 22px; box-shadow: 0 14px 36px #00000026; }
.panel::before { content: ''; position: absolute; top: 29px; left: -1px; width: 5px; height: 28px; border-radius: 0 3px 3px 0; background: #338a18; }
.section-head { margin-bottom: 20px; }
.pill { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; padding: 8px 12px; background: #e8f9df; border: 1px solid #cbe9bb; border-radius: 6px; color: #235a12; }
label { display: block; font-size: 12px; font-weight: 700; }
input, select { font: inherit; border: 1px solid #c5cdc2; border-radius: 7px; padding: 12px 14px; width: 100%; margin: 8px 0; color: var(--ink); background: #fff; min-width: 0; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #367f1e; outline-offset: 3px; }
.row > input { flex: 1; min-width: 140px; }
#symbol { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 700; letter-spacing: 1px; }
button { border: 1px solid var(--green); border-radius: 7px; background: var(--green); color: #102008; padding: 13px 20px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; white-space: nowrap; transition: background .15s, border-color .15s; }
button:hover { background: #72da39; border-color: #72da39; }
.secondary { background: var(--white); color: var(--ink); border-color: #b5c0af; }
.secondary:hover { background: #edf5e8; border-color: #7a9270; }
.quote { margin-top: 18px; background: #0d140e; color: #c9d5c4; border-left: 3px solid var(--green); border-radius: 8px; padding: 22px 24px; white-space: pre-line; line-height: 1.9; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.quote strong { color: var(--green); font-size: 36px; letter-spacing: -1.5px; display: block; line-height: 1.4; margin-bottom: 8px; }
.panel > p { font-size: 14px; color: var(--muted); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
fieldset { border: 0; padding: 16px 0; margin: 0; }
legend { font-size: 12px; font-weight: 700; padding-top: 20px; }
.days { display: flex; gap: 14px; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 8px; margin: 10px 0 22px; }
.check input, .days input { width: auto; }
.days label { font-weight: 500; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #0d140e; color: #d7e6ce; padding: 20px; border-radius: 8px; font-size: 13px; line-height: 1.8; }
#runs p { font-size: 13px; border-top: 1px solid #dce4d8; padding-top: 12px; }
.muted { color: var(--muted); font-size: 13px; }
footer { padding: 15px 0 24px; text-align: center; color: #9ba796; font-size: 12px; letter-spacing: .2px; }
button:disabled { opacity: .5; cursor: wait; }
[hidden] { display: none !important; }
@media (max-width: 560px) {
  main { padding: 22px 18px; }
  header { padding-bottom: 22px; }
  .brand { font-size: 25px; }
  .brand-mark { width: 30px; height: 30px; }
  .panel { padding: 24px 20px; border-radius: 12px; }
  .panel::before { top: 24px; }
  .tag { display: none; }
  .intro { padding-top: 32px; padding-bottom: 29px; }
  h1 { letter-spacing: -2px; }
  h2 { font-size: 22px; }
  .grid { grid-template-columns: 1fr; }
  .row { gap: 9px; }
  .quote { padding: 18px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }

/* Market explorer, adapted from the supplied ranking sample. */
main { max-width: 1500px; padding-inline: 36px; }
.header-actions { display: flex; align-items: center; gap: 30px; }
.auth-menu { position: relative; }
.login-button { padding: 9px 21px; font-size: 12px; border-radius: 6px; }
.login-panel { position: absolute; z-index: 20; top: calc(100% + 17px); right: 0; width: 340px; padding: 26px; border: 1px solid #d8e2d3; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 18px 60px #0008; }
.login-panel .eyebrow { color: #287b12; font-size: 10px; margin-top: 0; }
.login-panel h2 { font-size: 24px; }
.login-panel p { font-size: 13px; }
.login-panel button { width: 100%; margin-top: 8px; }
.login-panel input { margin: 9px 0 12px; }
.login-panel .optional { font-weight: 400; color: #64705d; }
.intro { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding-block: 37px 33px; }
.intro h1 { font-size: clamp(38px, 4.5vw, 64px); margin-block: 18px; letter-spacing: -2.8px; }
.intro > div > p:not(.eyebrow) { font-size: 14px; color: #b9c7b2; }
.edition { padding: 12px 0 12px 25px; border-left: 2px solid var(--green); min-width: 200px; }
.edition > span { font-size: 9px; letter-spacing: 1.4px; font-weight: 700; color: #b0bfa9; }
.edition strong { display: block; font-family: ui-monospace, monospace; font-size: 27px; margin-top: 10px; color: var(--green); }
.edition p { margin: 8px 0; font-size: 12px !important; }
.market-cards { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; margin-bottom: 27px; }
.market-card { padding: 18px 20px; background: #131b11; border: 1px solid #2a3725; border-radius: 9px; }
.market-card > span { display: block; font-size: 11px; color: #bdcab6; }
.market-card strong { display: block; font-size: 26px; margin: 7px 0 3px; font-variant-numeric: tabular-nums; letter-spacing: -.7px; }
.market-card small { font-size: 10px; color: #99a991; }
.market-card .positive { color: var(--green); }
.market-card .negative { color: #ff9f94; }
.section-kicker { margin: 0 0 6px; font-size: 9px; font-weight: 800; letter-spacing: 1.8px; color: #40752b; }
.ranking-panel { padding: 27px 0 0; overflow: hidden; }
.ranking-panel .section-head, .ranking-toolbar, .ranking-caption, .ranking-footnote { margin-inline: 27px; }
.ranking-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding-top: 2px; }
.ranking-toolbar label { font-size: 10px; color: #65705f; }
.search-label { flex: 1; min-width: 200px; max-width: 410px; }
.ranking-toolbar input { font-size: 13px; margin-bottom: 0; padding-block: 10px; }
.ranking-toolbar select { display: block; margin-top: 8px; border: 1px solid #c5cdc2; border-radius: 7px; background: #fff; padding: 11px; font: inherit; font-size: 12px; color: var(--ink); }
.ranking-toolbar > span { margin-left: auto; font-size: 11px; padding-top: 17px; }
.ranking-caption { font-size: 11px !important; margin-block: 17px; }
.table-scroll { width: 100%; max-height: 700px; overflow: auto; }
.stock-table { width: 100%; min-width: 1080px; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.stock-table th { position: sticky; top: 0; z-index: 1; background: #f4f7f1; color: #5d6b55; font-size: 9px; text-transform: uppercase; letter-spacing: .5px; padding: 13px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid #ccd9c3; }
.stock-table td { text-align: right; padding: 10px 12px; border-bottom: 1px solid #e5ebdf; white-space: nowrap; }
.stock-table .align-left { text-align: left; }
.stock-row:hover, .stock-row.is-expanded { background: #f0f9e9; }
.stock-table .rank-number { color: #457c2d; font-weight: 800; font-size: 12px; }
.stock-name { min-width: 170px; }
.stock-open { display: block; padding: 0; border: 0; border-radius: 2px; background: transparent; font-size: 13px; font-weight: 800; color: #111b0d; }
.stock-open::after { content: ' +'; color: #4a8c2c; }
.stock-open[aria-expanded=true]::after { content: ' −'; }
.stock-open:hover { background: transparent; color: #287b12; }
.company-name { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; color: #718066; font-size: 10px; margin-top: 3px; }
.price-cell { font-weight: 700; }
.positive { color: #247414; }
.negative { color: #b5352a; }
.score-badge { display: inline-block; padding: 5px 8px; color: #286b15; background: #e7f6dc; border-radius: 5px; font-weight: 800; }
.stock-table .stock-divider td { background: #10200c; color: #bef69b; text-align: left; padding: 8px 20px; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.stock-divider ~ .stock-divider td { background: #e9f1e3; color: #345a24; }
.sparkline { display: block; width: 105px; height: 32px; margin-left: auto; }
.chart-line { stroke: #3d9521; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart-grid { stroke: #d7e2cf; stroke-width: 1; }
.chart-large { display: block; width: 100%; max-width: 480px; height: auto; }
.stock-table .stock-detail td { background: #f5f9f1; text-align: left; white-space: normal; padding: 24px 28px; }
.detail-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 30px; }
.detail-grid h3 { margin: 4px 0 10px; }
.detail-grid .muted { font-size: 10px; }
.detail-reason { font-size: 12px; max-width: 420px; line-height: 1.6; }
.chart-label { color: #587149; font-size: 10px; margin-top: 19px; }
.factor-row { display: grid; grid-template-columns: 85px 1fr 25px; align-items: center; gap: 9px; margin: 12px 0; font-size: 10px; }
.factor-row b { text-align: right; }
.factor-row meter { width: 100%; height: 12px; accent-color: #3d9521; }
.ranking-footnote { font-size: 10px !important; color: #68775e; margin-block: 16px; }
.empty-state { text-align: center !important; padding: 40px !important; color: #6c7b61; }
.ranking-extras { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin: 0 0 25px; }
.highlight-card { background: #f9fcf6; color: var(--ink); padding: 22px; border-radius: 11px; }
.highlight-card h3 { margin: 0; font-size: 16px; }
.highlight-card > p { font-size: 10px; margin: 5px 0 19px; }
.highlight-row { display: grid; grid-template-columns: 55px 1fr 30px; gap: 10px; padding: 10px 0; border-top: 1px solid #e0e9d9; font-size: 11px; align-items: center; }
.highlight-row span { color: #6a785f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.highlight-row strong { color: #347a1a; text-align: right; }
.lower-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.lower-grid .panel { padding: 26px; min-width: 0; }
.lower-grid h2 { font-size: 22px; }
.lower-grid .pill { font-size: 8px; }
.methodology { padding: 20px 3px; max-width: 1050px; }
.methodology h2 { font-size: 18px; color: #d9e6d2; }
.methodology p { color: #9dae93; font-size: 11px; line-height: 1.8; }
@media(max-width:1000px) {
  main { padding-inline: 22px; }
  .market-cards { gap: 8px; }
  .market-card { padding: 15px 12px; }
  .market-card strong { font-size: 23px; }
  .edition { display: none; }
  .lower-grid { grid-template-columns: 1fr; }
  .highlight-card { padding: 18px; }
}
@media(max-width:650px) {
  main { padding-inline: 16px; }
  .header-actions { gap: 8px; }
  .tag { display: none; }
  .login-panel { width: min(340px,calc(100vw - 32px)); }
  .intro h1 { font-size: 42px; letter-spacing: -2px; }
  .intro { padding-block: 25px; }
  .intro .eyebrow { font-size: 8px; letter-spacing: 1.7px; }
  .market-cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .market-card:last-child { grid-column: 1 / -1; }
  .market-card strong { font-size: 25px; }
  .ranking-extras { grid-template-columns: 1fr; gap: 12px; }
  .ranking-panel .section-head, .ranking-toolbar, .ranking-caption, .ranking-footnote { margin-inline: 20px; }
  .ranking-toolbar > span { margin-left: 0; padding-top: 0; }
  .ranking-toolbar { gap: 12px; }
  .search-label { min-width: 100%; }
  .ranking-panel .section-head { gap: 14px; }
  .lower-grid .panel { padding: 23px 20px; }
}

/* Full dark mode: black canvas and green surfaces, with no white cards. */
.theme-toggle { background: transparent; color: #cce9bc; border-color: #456239; padding: 9px 14px; font-size: 12px; }
.theme-toggle:hover { background: #1b3013; border-color: #83ef47; }
[data-theme=dark] { --ink: #e0f1d8; --muted: #a3b89a; color-scheme: dark; }
[data-theme=dark] .brand { color: #f4fff0; }
[data-theme=dark] .panel, [data-theme=dark] .login-panel, [data-theme=dark] .highlight-card { background: #102016; border-color: #2b4a32; color: #e0f1d8; }
[data-theme=dark] .panel::before { background: #83ef47; }
[data-theme=dark] .section-kicker, [data-theme=dark] .login-panel .eyebrow { color: #96dc73; }
[data-theme=dark] .pill, [data-theme=dark] .score-badge { background: #1d3b24; color: #b0f08a; border-color: #355b36; }
[data-theme=dark] input, [data-theme=dark] select, [data-theme=dark] .ranking-toolbar select { background: #0b170f; color: #e0f1d8; border-color: #3b5940; }
[data-theme=dark] input::placeholder { color: #98ad8e; }
[data-theme=dark] .secondary { background: #152b1a; color: #d8efcd; border-color: #48683d; }
[data-theme=dark] .secondary:hover { background: #24432a; border-color: #83ef47; }
[data-theme=dark] .stock-table th { background: #172c1b; color: #aaca9b; border-color: #35543a; }
[data-theme=dark] .stock-table td { border-color: #29452e; }
[data-theme=dark] .stock-row:hover, [data-theme=dark] .stock-row.is-expanded { background: #1a3520; }
[data-theme=dark] .stock-open { color: #c0f5a6; }
[data-theme=dark] .stock-open::after { color: #83ef47; }
[data-theme=dark] .stock-open:hover { color: #a0ff65; background: transparent; }
[data-theme=dark] .company-name, [data-theme=dark] .ranking-toolbar label, [data-theme=dark] .ranking-caption, [data-theme=dark] .ranking-footnote, [data-theme=dark] .chart-label, [data-theme=dark] .highlight-row span, [data-theme=dark] .login-panel .optional { color: #a3b89a; }
[data-theme=dark] .stock-table .stock-divider td { background: #24422a; color: #b9f397; }
[data-theme=dark] .stock-divider ~ .stock-divider td { background: #19331f; color: #a6ce93; }
[data-theme=dark] .stock-table .stock-detail td { background: #0c1a10; }
[data-theme=dark] .chart-line { stroke: #83ef47; }
[data-theme=dark] .chart-grid { stroke: #2b4530; }
[data-theme=dark] .factor-row meter { accent-color: #83ef47; }
[data-theme=dark] .positive, [data-theme=dark] .highlight-row strong { color: #96ed6d; }
[data-theme=dark] .negative { color: #ffab9d; }
[data-theme=dark] .highlight-row, [data-theme=dark] #runs p { border-color: #2b4530; }
[data-theme=dark] input:focus-visible, [data-theme=dark] button:focus-visible, [data-theme=dark] a:focus-visible, [data-theme=dark] select:focus-visible { outline-color: #83ef47; }
@media(max-width:650px) { .header-actions { gap: 8px; } .theme-toggle { padding: 9px 10px; font-size: 11px; } .login-button { padding: 9px 13px; } }

.refresh-badge{font-size:.72rem;max-width:17rem;color:var(--green);border:1px solid currentColor;border-radius:999px;padding:.4rem .65rem;line-height:1.3}

.signup-link{color:var(--green);font-weight:700;white-space:nowrap}.signup-panel{margin-top:24px}.signup-panel input{display:block;width:100%;margin:.4rem 0 1rem}.signup-panel[hidden]{display:none}
@media(max-width:650px){.header-actions{flex-wrap:wrap;width:100%;justify-content:flex-end}.refresh-badge{flex-basis:100%;max-width:none;text-align:center;order:2}}
