/* EverydayAnalyst — the site is a spreadsheet: grid paper, a formula bar, rows, and one selected cell. */
:root {
  --paper: #ffffff;
  --gridline: #e4eae7;
  --head-cell: #f3f6f4;
  --line: #cfd8d3;
  --ink: #0e1a2b;
  --ink-2: #4c5866;
  --ink-3: #6b7682;
  --select: #16b35e;      /* selected-cell outline */
  --go: #0e7f43;          /* download button, AA contrast with white */
  --go-hover: #0b6a38;
  --link: #1a66cc;
  --comment: #ff4438;     /* used only as the comment-corner marker */
  --cell-h: 44px;
  --radius: 3px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --max: 1232px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
main:focus, main:focus-visible { outline: none; }
a { color: var(--link); text-underline-offset: 2px; }
img { display: block; }
:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 10;
  background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--radius);
}
.skip:focus { top: 12px; }

/* ---------- Masthead with sheet-tab navigation ---------- */
.masthead { border-bottom: 1px solid var(--line); background: var(--paper); }
.masthead__inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  min-height: 68px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink); text-decoration: none; align-self: center;
}
.brand__logo { width: 70px; height: auto; }
.brand__name { font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; }

.tabs { display: flex; gap: 2px; margin-bottom: -1px; }
.tab {
  padding: 10px 16px 9px;
  color: var(--ink-2); text-decoration: none; font-size: 0.95rem;
  border: 1px solid transparent; border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--head-cell);
}
.tab:hover { color: var(--ink); background: #e9eeeb; }
.tab.is-active {
  background: var(--paper); color: var(--ink); font-weight: 600;
  border-color: var(--line);
  box-shadow: inset 0 3px 0 var(--select);
}

/* ---------- Hero: grid paper + formula bar ---------- */
.hero {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--gridline) 1px, transparent 1px),
    linear-gradient(90deg, var(--gridline) 1px, transparent 1px);
  background-size: 96px 32px;
  background-position: -1px -1px;
  border-bottom: 1px solid var(--line);
}
.hero__inner { max-width: var(--max); margin: 0 auto; padding: 72px 24px 56px; }
.hero__copy { display: inline-block; background: var(--paper); padding: 10px 28px 6px 0; margin: -10px 0 0; }
.hero__title {
  margin: 0; max-width: 17ch;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.08; font-weight: 600; letter-spacing: -0.025em;
}
.hero__lede { max-width: 52ch; margin: 20px 0 0; color: var(--ink-2); font-size: 1.1rem; }
.hero .fxbar { margin-top: 32px; }

.fxbar {
  display: grid; grid-template-columns: 96px 44px 1fr; align-items: stretch;
  max-width: 720px; height: 56px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.fxbar:focus-within { border-color: var(--select); box-shadow: 0 0 0 1px var(--select); }
.fxbar__name {
  display: flex; align-items: center; padding: 0 12px;
  border-right: 1px solid var(--line);
  font: 500 0.9rem var(--mono); color: var(--ink-2);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.fxbar__fx {
  display: flex; align-items: center; justify-content: center;
  border-right: 1px solid var(--line);
  font: italic 500 1rem Georgia, "Times New Roman", serif; color: var(--ink-3);
}
.fxbar__fx i { font-style: italic; }
.fxbar__input {
  min-width: 0; border: 0; outline: none; background: transparent;
  padding: 0 16px; font: 400 1.05rem var(--font); color: var(--ink);
}
.fxbar__input::placeholder { color: var(--ink-3); }
.fxbar__input::-webkit-search-cancel-button { cursor: pointer; }
.hero__meta { margin: 12px 0 0; font-size: 0.9rem; color: var(--ink-3); background: var(--paper); display: inline-block; }

/* ---------- Company list as spreadsheet rows ---------- */
.sheet-wrap { max-width: var(--max); margin: 0 auto; padding: 32px 24px 72px; }
.sheet { border: 1px solid var(--line); border-radius: var(--radius); }
.row--head { border-radius: var(--radius) var(--radius) 0 0; }
.row:last-child .cell--rank { border-bottom-left-radius: var(--radius); }
.row {
  position: relative;
  display: grid; grid-template-columns: 48px 72px minmax(140px, 1fr) 128px 98px 74px 108px 120px 104px 104px;
  min-height: var(--cell-h);
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--gridline);
}
.row:last-child { border-bottom: 0; }
.cell {
  display: flex; align-items: center; padding: 0 14px; min-width: 0;
  border-right: 1px solid var(--gridline);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.cell:last-child { border-right: 0; }
.cell--rank {
  justify-content: center; padding: 0;
  background: var(--head-cell); color: var(--ink-3); font: 400 0.8rem var(--mono);
}
.row--head { min-height: 44px; background: var(--head-cell); border-bottom: 1px solid var(--line); }
.row--head .cell { font-size: 0.85rem; color: var(--ink-2); font-weight: 500; }
.cell--ticker { font: 500 0.95rem var(--mono); }
.cell--name { font-weight: 500; }
.cell--sector { color: var(--ink-2); font-size: 0.95rem; }
.cell--cap { justify-content: flex-end; font: 400 0.92rem var(--mono); color: var(--ink-2); }
.row--head .cell--cap { font-family: var(--font); }
.cell--rank { font-variant-numeric: tabular-nums; }
.tier { font-size: 0.88rem; color: var(--ink-2); }
.tier--free { color: var(--go); font-weight: 600; }
.tier-inline { display: none; }
.status { font-size: 0.88rem; color: var(--ink-3); }
.status--ready { color: var(--go); font-weight: 600; }

/* the selected cell: green outline plus Excel's fill handle */
a.row:hover, a.row.is-selected, a.row:focus-visible { background: #f4fbf7; outline: none; }
a.row:hover::after, a.row.is-selected::after, a.row:focus-visible::after {
  content: ""; position: absolute; inset: -1px -1px -1px 52px;
  border: 2px solid var(--select); pointer-events: none;
}
a.row:hover::before, a.row.is-selected::before, a.row:focus-visible::before {
  content: ""; position: absolute; right: -4px; bottom: -4px; width: 7px; height: 7px; z-index: 1;
  background: var(--select); box-shadow: 0 0 0 1.5px var(--paper);
}
a.row:hover .cell--rank, a.row.is-selected .cell--rank, a.row:focus-visible .cell--rank {
  background: #dcefe4; color: var(--ink); font-weight: 500;
}
.sheet__empty { padding: 28px 20px; color: var(--ink-2); }
.sheet-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.sheet-note { margin: 0; font-size: 0.88rem; color: var(--ink-3); }
.sortsel { display: none; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--ink-2); }
.sortsel select { font: inherit; color: var(--ink); padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }

/* sortable headers */
.row--head .cell { padding: 0; }
.sortbtn {
  display: flex; align-items: center; gap: 6px; width: 100%; height: 100%; padding: 0 14px;
  border: 0; background: transparent; cursor: pointer;
  font: 500 0.85rem var(--font); color: var(--ink-2); text-align: left; white-space: nowrap;
}
.sortbtn:hover { background: #e9eeeb; color: var(--ink); }
.sortbtn.is-on { color: var(--ink); font-weight: 600; }
.sortbtn:focus-visible { outline: 2px solid var(--select); outline-offset: -2px; }
.row--head .cell--rank .sortbtn { justify-content: center; padding: 0 4px; }
.row--head .cell--cap .sortbtn, .row--head .cell--downloads .sortbtn { justify-content: flex-end; }
.sortbtn span:first-child { white-space: normal; line-height: 1.2; padding: 6px 0; }
.sortbtn small { display: block; font-size: 0.72rem; font-weight: 400; color: var(--ink-3); }
.row--head { min-height: 44px; }
.arrow { flex: none; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.arrow--asc { border-bottom: 5px solid currentColor; }
.arrow--desc { border-top: 5px solid currentColor; }
.arrow--none { border-top: 4px solid #c3ccc7; opacity: 0; }
.sortbtn:hover .arrow--none { opacity: 1; }
.cell--lastEarn, .cell--nextEarn { font-size: 0.9rem; color: var(--ink-2); gap: 6px; }
.blank { color: var(--ink-3); }
.est { font-size: 0.75rem; color: var(--ink-3); border: 1px solid var(--line); border-radius: 2px; padding: 0 4px; line-height: 1.4; }
.cell--downloads { justify-content: flex-end; font: 400 0.92rem var(--mono); color: var(--ink-2); }
.more { margin-top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Free / Premium ---------- */
.plans { border-bottom: 1px solid var(--line); }
.plans__inner { max-width: var(--max); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1fr 1fr; }
.plan { padding: 22px 24px 22px 0; }
.plan + .plan { padding-left: 24px; border-left: 1px solid var(--line); }
.plan__name { margin: 0 0 4px; font-weight: 600; font-size: 1.05rem; }
.plan--free .plan__name { color: var(--go); }
.plan__desc { margin: 0; color: var(--ink-2); max-width: 46ch; }

/* ---------- Generic page ---------- */
.page { max-width: var(--max); margin: 0 auto; padding: 56px 24px 88px; }
.page.narrow { max-width: 760px; }
.h1 { margin: 0 0 12px; font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; }
.h2 { margin: 0 0 10px; font-size: 1.3rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.h2.spaced { margin-top: 56px; }
.lede { margin: 0 0 32px; max-width: 60ch; color: var(--ink-2); font-size: 1.15rem; }
.lede--sm { font-size: 1rem; margin-bottom: 20px; }
.prose p { max-width: 66ch; margin: 0 0 18px; }
.prose .h2 { margin-top: 40px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius);
  font: 600 1rem var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
}
.btn:hover { background: var(--head-cell); }
.btn--go { background: var(--go); border-color: var(--go); color: #fff; }
.btn--go:hover { background: var(--go-hover); }
.btn--off { background: var(--head-cell); color: var(--ink-3); cursor: not-allowed; }

/* ---------- Company page ---------- */
.back { display: inline-block; margin-bottom: 28px; font-size: 0.95rem; }
.back::before { content: "‹ "; }
.company__head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.namebox {
  font: 500 1rem var(--mono); padding: 6px 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--head-cell); color: var(--ink-2);
}
.company__name { margin: 0; font-size: clamp(2.1rem, 4.5vw, 3rem); line-height: 1.1; font-weight: 600; letter-spacing: -0.025em; }
.company__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr); gap: 56px; align-items: start; }
.company__desc { margin: 0 0 28px; max-width: 58ch; font-size: 1.1rem; }

.facts { margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts__row { display: grid; grid-template-columns: 170px 1fr; border-bottom: 1px solid var(--gridline); }
.facts__row:last-child { border-bottom: 0; }
.facts dt, .facts dd { margin: 0; padding: 11px 14px; }
.facts dt { background: var(--head-cell); color: var(--ink-2); font-size: 0.92rem; border-right: 1px solid var(--gridline); }
.company__links { margin: 0; font-size: 0.95rem; }

/* download panel = the selected cell, with a comment marker in its corner */
.dl {
  position: relative; padding: 28px 28px 24px;
  border: 2px solid var(--select); border-radius: 0; background: var(--paper);
}
.dl::before {
  content: ""; position: absolute; top: 0; right: 0;
  border-style: solid; border-width: 0 16px 16px 0; border-color: transparent var(--comment) transparent transparent;
}
.dl::after {
  content: ""; position: absolute; right: -6px; bottom: -6px; width: 10px; height: 10px;
  background: var(--select); box-shadow: 0 0 0 2px var(--paper);
}
.dl__tier { margin: 0 0 6px; }
.dl__count { margin: 12px 0 0; font-size: 0.85rem; color: var(--ink-2); }
.btn--wide { width: 100%; }

/* ---------- Sign-in dialog ---------- */
.dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 2px solid var(--select); border-radius: 0; color: var(--ink); }
.dialog::backdrop { background: rgba(14, 26, 43, 0.45); }
.auth { position: relative; padding: 28px 28px 24px; }
.auth__close {
  position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; background: transparent;
  font-size: 1.5rem; line-height: 1; color: var(--ink-3); cursor: pointer; border-radius: var(--radius);
}
.auth__close:hover { background: var(--head-cell); color: var(--ink); }
.auth__title { margin: 0 32px 8px 0; font-size: 1.3rem; font-weight: 600; }
.auth__text { margin: 0 0 20px; color: var(--ink-2); }
.auth__links { display: flex; gap: 20px; flex-wrap: wrap; margin: 14px 0 0; }
.field { display: block; margin: 0 0 14px; }
.field__label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: 500; }
.field__input {
  width: 100%; height: 46px; padding: 0 12px; font: 400 1rem var(--font); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
}
.field__input:focus { outline: none; border-color: var(--select); box-shadow: 0 0 0 1px var(--select); }
.field__input[aria-invalid="true"] { border-color: #c2362c; }
.field__input--code { font: 500 1.3rem var(--mono); letter-spacing: 0.3em; }
.field__error { margin: -6px 0 14px; color: #b3261e; font-size: 0.9rem; }
.linkbtn { padding: 0; border: 0; background: none; font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.note {
  margin: 18px 0 0; padding: 10px 12px; font-size: 0.88rem; color: var(--ink-2);
  background: #fff8e6; border-left: 3px solid #e0a800;
}
.note .code { font: 600 1rem var(--mono); letter-spacing: 0.15em; color: var(--ink); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 20px);
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: var(--radius);
  background: var(--ink); color: #fff; font-size: 0.95rem; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Profile ---------- */
.profile { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: start; max-width: 960px; }
.member { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.member--premium { border: 2px solid var(--select); border-radius: 0; }
.member__label { margin: 0 0 4px; font-size: 0.88rem; color: var(--ink-3); }
.member__status { margin: 0 0 8px; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.01em; }
.member--premium .member__status { color: var(--go); }
.member__desc { margin: 0 0 18px; color: var(--ink-2); max-width: 46ch; }
.acct .facts { margin-bottom: 16px; }
.facts--tight .facts__row { grid-template-columns: 120px 1fr; }
.row.row--dl { grid-template-columns: 220px 96px minmax(0, 1fr) 170px; }
.sheet--dl { max-width: 960px; }
.sheet__empty--box { max-width: 960px; border: 1px dashed var(--line); border-radius: var(--radius); }
.dl__title { margin: 0 0 8px; font-size: 1.2rem; font-weight: 600; }
.dl__desc { margin: 0 0 22px; color: var(--ink-2); }
.dl .btn { width: 100%; }
.dl__file { margin: 10px 0 0; font-size: 0.88rem; color: var(--ink-3); }
.dl__fine { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--gridline); font-size: 0.85rem; color: var(--ink-3); }

/* ---------- How it works ---------- */
.steps { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; max-width: 860px; }
.steps__row { display: grid; grid-template-columns: 52px 1fr; border-bottom: 1px solid var(--gridline); }
.steps__row:last-child { border-bottom: 0; }
.steps__num {
  display: flex; justify-content: center; padding-top: 22px;
  background: var(--head-cell); color: var(--ink-3); font: 400 0.85rem var(--mono);
  border-right: 1px solid var(--gridline);
}
.steps__body { padding: 18px 22px 20px; }
.steps__title { margin: 0 0 4px; font-size: 1.1rem; font-weight: 600; }
.steps__body p { margin: 0; color: var(--ink-2); max-width: 64ch; }

.preview { margin: 0 0 28px; max-width: 900px; }
.preview img { width: 100%; height: auto; border-radius: var(--radius); }
.tabsdoc { margin: 0; max-width: 900px; border: 1px solid var(--line); border-radius: var(--radius); }
.tabsdoc__row { display: grid; grid-template-columns: 200px 1fr; border-bottom: 1px solid var(--gridline); }
.tabsdoc__row:last-child { border-bottom: 0; }
.tabsdoc dt { margin: 0; padding: 14px 16px; background: var(--head-cell); border-right: 1px solid var(--gridline); }
.tabsdoc dt .sheettab { display: inline-block; border-top: 1px solid var(--line); border-radius: var(--radius); }
.tabsdoc dd { margin: 0; padding: 14px 18px; color: var(--ink-2); max-width: 70ch; }

.fineprint { margin-top: 40px; padding: 20px 22px 6px; border: 2px solid var(--comment); border-radius: var(--radius); }
.prose .fineprint .h2 { margin-top: 0; }
.fineprint p { color: var(--ink); }

.sheettabs {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 0 0 0 8px; max-width: 860px;
  border-top: 1px solid var(--line);
}
.sheettab {
  padding: 8px 16px; font-size: 0.92rem; color: var(--ink-2);
  background: var(--head-cell); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}
.sheettab.is-active { background: var(--paper); color: var(--go); font-weight: 600; box-shadow: inset 0 -3px 0 var(--select); }

.faq { margin: 0; max-width: 760px; }
.faq__item { padding: 16px 0; border-bottom: 1px solid var(--gridline); }
.faq__item:first-child { padding-top: 4px; }
.faq dt { font-weight: 600; margin-bottom: 4px; }
.faq dd { margin: 0; color: var(--ink-2); max-width: 64ch; }
.cta-line { margin-top: 40px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--head-cell); }
.footer__inner {
  max-width: var(--max); margin: 0 auto; padding: 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px;
  font-size: 0.85rem; color: var(--ink-3);
}
.footer p { margin: 0; max-width: 70ch; }

/* ---------- Small screens ---------- */
@media (max-width: 1180px) and (min-width: 761px) {
  .row { grid-template-columns: 44px 66px minmax(140px, 1fr) 96px 70px 120px 100px; }
  .cell--sector, .cell--downloads, .cell--lastEarn { display: none; }
  .group { grid-column: 4 / span 2; }
  a.row:hover::after, a.row.is-selected::after, a.row:focus-visible::after { left: 48px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .masthead__inner { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 16px 0; min-height: 0; }
  .brand__logo { width: 56px; }
  .brand__name { font-size: 1.1rem; }
  .tabs { overflow-x: auto; }
  .tab { padding: 9px 12px 8px; font-size: 0.9rem; white-space: nowrap; }
  .hero__inner { padding: 40px 16px 36px; }
  .fxbar { grid-template-columns: 0 40px 1fr; height: 52px; }
  .fxbar__name { padding: 0; border-right: 0; }
  .sheet-wrap { padding: 20px 16px 56px; }
  .row { grid-template-columns: 40px 84px minmax(0, 1fr) 104px; }
  .cell { padding: 0 10px; }
  .cell--sector { display: none; }
  .row { grid-template-columns: 44px 72px minmax(0, 1fr) 100px; }
  .cell--cap, .cell--tier, .cell--downloads, .cell--lastEarn, .cell--nextEarn, .cell--sector, .cell--pe { display: none; }
  .row--group { display: none; }
  .sortsel { display: flex; }
  .sortbtn { padding: 0 8px; gap: 4px; }
  .row { grid-template-columns: 44px 78px minmax(0, 1fr) 100px; }
  .sheet-bar { flex-direction: column; align-items: flex-start; }
  .profile { grid-template-columns: 1fr; }
  .row.row--dl { grid-template-columns: 110px 64px minmax(0, 1fr); }
  .row--dl .cell:first-child { white-space: normal; font-size: 0.85rem; line-height: 1.3; }
  .tier-inline { display: block; font-size: 0.78rem; font-weight: 500; color: var(--ink-3); }
  .tier-inline--free { color: var(--go); }
  .cell--name { flex-direction: column; align-items: flex-start; justify-content: center; }
  a.row:hover::after, a.row.is-selected::after, a.row:focus-visible::after { left: 44px; }
  .plans__inner { grid-template-columns: 1fr; padding: 0 16px; }
  .plan { padding: 16px 0; }
  .plan + .plan { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .tabsdoc__row { grid-template-columns: 1fr; }
  .tabsdoc dt { border-right: 0; border-bottom: 1px solid var(--gridline); padding: 10px 14px; }
  .cell--name { white-space: normal; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }
  .status { font-size: 0.82rem; }
  .dl { order: -1; }
  .hero__copy { padding-right: 12px; }
  .page { padding: 36px 16px 64px; }
  .company__grid { grid-template-columns: 1fr; gap: 36px; }
  .facts__row { grid-template-columns: 130px 1fr; }
  .dl { padding: 22px 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

a.row.row--dl:hover::after, a.row.row--dl:focus-visible::after { left: -1px; }
a.row.row--dl:hover::before, a.row.row--dl:focus-visible::before { display: none; }
.row--head.row--dl .cell { padding: 0 14px; font-size: 0.85rem; }
.page > .note { max-width: 960px; }
.row--head .cell--cap .sortbtn span:first-child, .row--head .cell--downloads .sortbtn span:first-child { text-align: right; }

.vp { max-width: 66ch; margin: 0 0 18px; padding-left: 1.2em; }
.vp > li { margin: 0 0 8px; padding-left: 4px; }
.vp > li::marker { color: var(--select); }
.vp ul { margin: 8px 0 4px; padding-left: 1.3em; color: var(--ink-2); list-style: circle; }
.vp ul li { margin: 2px 0; }

/* ---------- table: wrap instead of cutting text off ---------- */
.cell { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }
.cell--ticker, .cell--cap, .cell--pe, .cell--downloads, .cell--rank { white-space: nowrap; }
.sortbtn { padding: 0 10px; }
.cell { padding-left: 10px; padding-right: 10px; }
.cell--pe { justify-content: flex-end; font: 400 0.92rem var(--mono); color: var(--ink-2); }
.row--head .cell--pe .sortbtn { justify-content: flex-end; }

/* merged "as of" cell over Market cap + P/E */
.row--group { min-height: 0; border-bottom: 1px solid var(--line); background: var(--paper); }
a.row.row--group::after { display: none; }
.group {
  grid-column: 5 / span 2; padding: 5px 10px; text-align: center;
  font-size: 0.78rem; color: var(--ink-2); background: var(--head-cell);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}

/* ---------- brand details: fill-handle bullets, comment-corner titles ---------- */
.vp { list-style: none; padding-left: 0; }
.vp > li { position: relative; padding-left: 22px; }
.vp > li::before {
  content: ""; position: absolute; left: 2px; top: 0.5em; width: 8px; height: 8px;
  background: linear-gradient(135deg, #1fa84a, #2dbe57); box-shadow: 0 0 0 1.5px var(--paper), 0 0 0 2.5px #1fa84a33;
}
.vp ul { list-style: none; padding-left: 4px; }
.vp ul li { position: relative; padding-left: 18px; }
.vp ul li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border: 1.5px solid #1fa84a;
}
.h2 { position: relative; display: table; padding-right: 6px; }
.h2::after {
  content: ""; position: absolute; top: -3px; right: -8px;
  border-style: solid; border-width: 0 9px 9px 0; border-color: transparent var(--comment) transparent transparent;
}
/* page titles get the comment corner too, a little larger */
.h1, .company__name { position: relative; display: table; padding-right: 8px; }
.h1::after, .company__name::after {
  content: ""; position: absolute; top: -2px; right: -10px;
  border-style: solid; border-width: 0 13px 13px 0; border-color: transparent var(--comment) transparent transparent;
}

/* ===== comment corner on page titles ===== */
.h1 { position: relative; display: table; padding-right: 8px; }
.h1::after {
  content: ""; position: absolute; top: -2px; right: -10px;
  border-style: solid; border-width: 0 13px 13px 0; border-color: transparent var(--comment) transparent transparent;
}

/* ===== active tab = selected cell ===== */
.tab { position: relative; }
.tab.is-active {
  box-shadow: none;
  border: 2px solid var(--select); border-bottom: 0;
  padding: 9px 15px 9px;
  margin-bottom: 0;
}
.tab.is-active::after {
  content: ""; position: absolute; right: -5px; bottom: -4px; width: 8px; height: 8px; z-index: 2;
  background: var(--select); box-shadow: 0 0 0 1.5px var(--paper);
}

/* ===== search bar = selected cell ===== */
.fxbar { position: relative; border-radius: 0; }
.fxbar:focus-within { border: 2px solid var(--select); box-shadow: none; }
.fxbar:focus-within::after {
  content: ""; position: absolute; right: -6px; bottom: -6px; width: 10px; height: 10px;
  background: var(--select); box-shadow: 0 0 0 2px var(--paper);
}
.hero__title { position: relative; display: table; padding-right: 10px; }
.hero__title::after {
  content: ""; position: absolute; top: 0; right: -10px;
  border-style: solid; border-width: 0 18px 18px 0; border-color: transparent var(--comment) transparent transparent;
}

/* titles in the logo's blue: gradient on page titles, solid blue on section titles */
.hero__title, .h1, .company__name {
  color: #1466d2;
  background: linear-gradient(100deg, #1466d2 0%, #1f80ea 55%, #2e96ff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.h2 { color: #1a6fdc; }

/* Premium on the company page matches the company title's blue (the home table stays neutral) */
.dl__tier.tier--premium, .tier--premium, .tier-inline--premium, .plan:not(.plan--free) .plan__name {
  font-weight: 600; color: #1466d2;
  background: linear-gradient(100deg, #1466d2, #2e96ff); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dl__tier.tier--premium, .tier--premium { display: inline-block; }
.cell--name .tier-inline { display: none; }
@media (max-width: 760px) { .cell--name .tier-inline { display: block; } }
.member--premium .member__status { color: #1a6fdc; }

/* Free in black, Premium in blue */
.tier--free, .tier-inline--free, .plan--free .plan__name, .dl__tier.tier--free { color: var(--ink); font-weight: 600; }

/* ===== Free in grey, black section titles, no corner on company name ===== */
/* Free reads like "Coming soon": grey, regular weight */
.tier--free, .tier-inline--free, .dl__tier.tier--free { color: var(--ink-3); font-weight: 400; }
/* company name on a stock page: blue title, no comment corner */
.company__name::after { display: none; }
/* section titles: bold black, keep the red comment corner; only page titles are blue */
.h2 { color: var(--ink); font-weight: 600; }

/* ===== blue page titles without the comment corner ===== */
.hero__title::after, .h1::after, .company__name::after { display: none; }
.plan--free .plan__name { font-weight: 400; color: var(--ink-3); }
/* bullets: plain green squares, no ring */
.vp > li::before { box-shadow: none; background: #1fa84a; }
.vp ul li::before { border: 0; background: #1fa84a; width: 6px; height: 6px; }
/* sub-bullets as green outline squares (no ring) */
.vp ul li::before { background: transparent; border: 1.5px solid #1fa84a; width: 7px; height: 7px; box-sizing: border-box; box-shadow: none; }

.lede--strong { font-weight: 600; color: var(--ink); }

.footer a { color: inherit; }

/* company page: version line and earlier quarters */
.dl__ver { margin: 0 0 14px; font-weight: 600; }
.dl__ver span { display: block; font-weight: 400; font-size: 0.88rem; color: var(--ink-3); }
.vers { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--gridline); }
.vers__title { margin: 0 0 8px; font-size: 0.88rem; color: var(--ink-3); }
.vers__list { list-style: none; margin: 0; padding: 0; }
.vers__row { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 8px 0; border-bottom: 1px solid var(--gridline); }
.vers__row:last-child { border-bottom: 0; }
.vers__q { font-weight: 500; }
.vers__d { grid-column: 1; font-size: 0.85rem; color: var(--ink-3); }
.vers__dl { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
@media (max-width: 760px) { .row--dl .cell:nth-child(4) { display: none; } }
