/* Archivo (SIL Open Font License 1.1, see fonts/OFL.txt), served from this site */
@font-face{font-family:"Archivo Variable";font-style:normal;font-display:swap;font-weight:100 900;font-stretch:62% 125%;
  src:url(fonts/archivo-latin-wdth-normal.woff2) format("woff2-variations"),url(fonts/archivo-latin-wdth-normal.woff2) format("woff2");}

:root{
  --paper:#E8ECE9; --surface:#F7F9F7; --surface2:#EFF3F0; --ink:#16242E; --muted:#5A6970; --rule:#C8D0CC;
  --accent:#1F5F8B; --accent-rgb:31 95 139;
  --gain-rgb:36 138 84; --loss-rgb:196 70 58; --gold:#B07D0C;
  --etf:#1F5F8B; --stock:#B5651D; --lev:#9C2F6B; --inc:#5E7480;
  /* map group colors, in slot order; checked for all-pairs color-blind separation against each other, the accent,
     gold and muted gray (map-groups.js caps a selection at 8) */
  --g1:#78b31c; --g2:#6a34ab; --g3:#cd86fe; --g4:#8b3f03; --g5:#a864a2; --g6:#526ee3; --g7:#08b6af; --g8:#e68485;
  /* search matches: a highlighter yellow, the one hue that stays apart from every color above for all three kinds of
     color-blindness, in both themes; --on-hit is the dark that outlines it on the map and is the text on it */
  --hit:#FFEB3B; --hit-rgb:255 235 59; --on-hit:#16242E; --hit-tint:.32;
  --heat:0.62; --band:.28;   /* opacity of a benchmark band drawn behind a line (SPY behind a ticker) */
  box-sizing:border-box; padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px);
  color-scheme:light;
}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]){
  --paper:#10181D; --surface:#172229; --surface2:#1D2A32; --ink:#E1E8E5; --muted:#8E9FA6; --rule:#2B3A42;
  --accent:#6FA8D4; --accent-rgb:111 168 212; --gain-rgb:72 190 125; --loss-rgb:232 108 92; --gold:#E0B54A;
  --etf:#6FA8D4; --stock:#E09A55; --lev:#D775AE; --inc:#93A8B3; --heat:0.55; --band:.45; color-scheme:dark;
  --g1:#85a30b; --g2:#864ad2; --g3:#d4acfe; --g4:#a35b45; --g5:#c85ca4; --g6:#247ef8; --g7:#00897a; --g8:#fc7a76;
  --hit-tint:.16;   /* the search color itself is the same in both themes */
}}
:root[data-theme="dark"]{
  --paper:#10181D; --surface:#172229; --surface2:#1D2A32; --ink:#E1E8E5; --muted:#8E9FA6; --rule:#2B3A42;
  --accent:#6FA8D4; --accent-rgb:111 168 212; --gain-rgb:72 190 125; --loss-rgb:232 108 92; --gold:#E0B54A;
  --etf:#6FA8D4; --stock:#E09A55; --lev:#D775AE; --inc:#93A8B3; --heat:0.55; --band:.45; color-scheme:dark;
  --g1:#85a30b; --g2:#864ad2; --g3:#d4acfe; --g4:#a35b45; --g5:#c85ca4; --g6:#247ef8; --g7:#00897a; --g8:#fc7a76;
  --hit-tint:.16;   /* the search color itself is the same in both themes */
}
*,*::before,*::after{box-sizing:border-box}
html{height:100%;scroll-padding-top:env(safe-area-inset-top,0px)}
body{height:100%;margin:0;background:var(--paper);color:var(--ink);
  font-family:"Archivo Variable","Arial Narrow",system-ui,-apple-system,"Segoe UI",sans-serif;font-size:14px;line-height:1.45;
  font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased}
button,input,select{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
a{color:var(--accent)}
#app{height:100%;display:grid;grid-template-rows:auto auto 1fr;grid-template-columns:minmax(0,1fr);min-height:0}

/* ---------- header ---------- */
header.top{display:flex;align-items:flex-end;gap:28px;padding:14px 22px 0;border-bottom:1px solid var(--rule);background:var(--paper);flex-wrap:wrap}
.brand{display:flex;align-items:baseline;gap:12px;padding-bottom:10px}
.brand h1{margin:0;font-size:28px;line-height:1;font-weight:820;font-stretch:125%;letter-spacing:-0.01em}
.brand h1 a{color:inherit;text-decoration:none}
.brand .month{font-size:13px;color:var(--muted);font-stretch:85%}
nav.tabs{display:flex;gap:2px;margin-left:auto;overflow-x:auto}
/* the site's nav, the same on every page (site-nav.js). The app marks the current tab at runtime; the site pages in HTML. */
nav.tabs a{display:block;padding:9px 14px 11px;color:var(--muted);font-weight:560;font-stretch:90%;text-decoration:none;
  border-bottom:3px solid transparent;white-space:nowrap}
nav.tabs a:hover{color:var(--ink)}
nav.tabs a[aria-current]{color:var(--ink);border-bottom-color:var(--accent)}
/* Explore the Data and Learn are menus: the name links to the first page, and its chevron button (or hovering, on a wide
   screen) opens the list. On a page in one the name adds it, "Explore the Data › Tree Map", and the underline runs under the
   chevron too. */
.navmenu{position:relative;z-index:20;display:flex;align-items:stretch}
nav.tabs .navhead{padding-right:2px}
.navcur:empty{display:none}
.navcur::before{content:"›";margin:0 6px;color:var(--muted)}
.navmore{border:0;border-bottom:3px solid transparent;background:none;padding:0 12px 3px 6px;cursor:pointer;color:var(--muted)}
.navmore::before{content:"";display:block;width:6px;height:6px;border:solid currentColor;border-width:0 1.6px 1.6px 0;transform:translateY(-2px) rotate(45deg)}
.navmore:hover,.navmenu.open .navmore{color:var(--ink)}
.navmenu.on .navmore{border-bottom-color:var(--accent);color:var(--ink)}
.navpop{display:none;position:absolute;top:100%;right:0;min-width:190px;margin:0;padding:6px;list-style:none;
  background:var(--surface);border:1px solid var(--rule);border-radius:8px;box-shadow:0 8px 28px rgb(0 0 0 / .18)}
nav.tabs .navpop a{padding:8px 12px;border:0;border-radius:5px;color:var(--ink)}
nav.tabs .navpop a:hover,nav.tabs .navpop a:focus-visible{background:var(--surface2);color:var(--accent)}
nav.tabs .navpop a[aria-current]{background:var(--surface2);box-shadow:inset 3px 0 0 var(--accent);font-weight:680}
.navmenu.open .navpop{display:block}
/* the tabs scroll sideways only where they might not fit; elsewhere the menu hangs below the header */
@media (min-width:861px){
  nav.tabs{overflow:visible}
  @media (hover:hover){.navmenu:not(.shut):hover .navpop{display:block}}
}
/* narrow screens: the tabs scroll, which would clip the menu, so it opens across the window under them (site-nav.js sets the top) */
@media (max-width:860px){.navpop{position:fixed;top:var(--navtop,120px);left:14px;right:14px;min-width:0}}
main{min-height:0;min-width:0;display:flex;flex-direction:column}
.page{display:none;min-height:0;min-width:0;flex:1}
.page.on{display:flex;flex-direction:column}
.scroll{overflow:auto;flex:1;min-height:0}

/* ---------- toolbar ---------- */
.toolbar{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:center;padding:12px 22px;background:var(--surface);border-bottom:1px solid var(--rule)}
.search{position:relative}
.search input{width:190px;padding:7px 10px 7px 30px;border:1px solid var(--rule);border-radius:6px;background:var(--paper)}
.search svg{position:absolute;left:9px;top:50%;transform:translateY(-50%);opacity:.55}
.seg{display:inline-flex;border:1px solid var(--rule);border-radius:6px;overflow:hidden}
.seg button{border:0;background:var(--paper);padding:6px 11px;cursor:pointer;font-stretch:90%;color:var(--muted)}
.seg button+button{border-left:1px solid var(--rule)}
.seg button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}
.seg button:disabled{opacity:.4;cursor:default}
.gpick{position:relative}
.gbtn{padding:6px 26px 6px 8px;border:1px solid var(--rule);border-radius:6px;background:var(--paper);max-width:230px;cursor:pointer;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;text-align:left}
.gbtn::after{content:"";position:absolute;right:10px;top:calc(50% - 5px);width:6px;height:6px;border:solid var(--muted);border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
.gbtn:disabled{opacity:.35;cursor:default}
.gpop{position:absolute;top:calc(100% + 6px);left:0;z-index:10;width:min(340px,calc(100vw - 32px));max-height:min(62vh,460px);overflow:auto;
  background:var(--surface);border:1px solid var(--rule);border-radius:8px;box-shadow:0 8px 28px rgb(0 0 0 / .18);padding:6px 12px 10px}
/* Clear floats at the top right with no height of its own, so the first heading shares its line */
.gpophead{display:flex;justify-content:flex-end;height:0;position:sticky;top:-6px;z-index:1}
.gnote{margin:4px 0 0;font-size:12px;color:var(--muted);line-height:1.35}
.gclear{margin-top:6px;border:0;background:var(--surface);color:var(--accent);cursor:pointer;padding:2px 0;font-stretch:90%}
.gclear:disabled{color:var(--muted);opacity:.5;cursor:default}
.gpop fieldset{border:0;margin:0;padding:6px 0 2px}
.gpop legend{padding:6px 0 2px;font-size:11.5px;font-weight:650;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.gpop label{display:flex;align-items:center;gap:7px;padding:4px 2px;cursor:pointer;font-stretch:92%}
.gpop label:has(input:disabled){color:var(--muted);cursor:default}
.gsw{width:9px;height:9px;border-radius:50%;flex:none}
.gcount{margin-left:auto;padding-left:12px;color:var(--muted);font-size:12.5px}
/* a month picker's option: a row like the checkbox rows above, with a radio's dot, since it picks one month */
.mopt{display:flex;align-items:center;gap:7px;width:100%;padding:4px 2px;border:0;background:none;text-align:left;cursor:pointer;font-stretch:92%}
.mopt::before{content:"";width:13px;height:13px;flex:none;border:1.5px solid var(--muted);border-radius:50%}
.mopt[aria-pressed="true"]::before{border-color:var(--accent);background:radial-gradient(var(--accent) 0 3px,transparent 3.5px)}
/* the search's match note sits just before the count; while empty it takes no room */
.qnote{margin-left:auto;color:var(--muted);font-stretch:85%}
.qnote + .count{margin-left:0}
.count{color:var(--muted);font-stretch:85%;margin-left:auto;white-space:nowrap}
.views{display:flex;gap:6px;flex-wrap:wrap;padding:10px 22px 0;background:var(--surface)}
.views button{border:1px solid var(--rule);background:var(--paper);border-radius:999px;padding:4px 12px;cursor:pointer;font-stretch:88%;color:var(--muted)}
.views button[aria-pressed="true"]{border-color:var(--accent);color:var(--accent);background:rgb(var(--accent-rgb) / .08);font-weight:600}
.viewnote{padding:6px 22px 10px;background:var(--surface);color:var(--muted);font-size:12.5px;border-bottom:1px solid var(--rule);font-stretch:92%}
.viewnote b{color:var(--ink);font-weight:600}
.key{display:inline-flex;align-items:center;gap:5px;margin-left:12px}
.key i{display:inline-block;width:18px;height:10px;border-radius:2px}

/* ---------- table ---------- */
.tablewrap{overflow:auto;flex:1;min-height:0;background:var(--surface)}
table.grid{width:100%;border-collapse:separate;border-spacing:0;font-stretch:78%;font-size:13.5px}
table.grid th{position:sticky;top:0;z-index:2;background:var(--surface2);text-align:right;font-weight:600;padding:8px 9px 7px;
  border-bottom:1px solid var(--rule);white-space:nowrap;cursor:pointer;user-select:none;vertical-align:bottom;color:var(--muted)}
table.grid th .sub{display:block;font-weight:400;font-size:11px;color:var(--muted);opacity:.8}
table.grid th.sorted{color:var(--ink)}
table.grid th.sorted::after{content:attr(data-dir);margin-left:3px;color:var(--accent)}
table.grid th.l,table.grid td.l{text-align:left}
table.grid td{height:30px;padding:0 9px;text-align:right;white-space:nowrap;border-bottom:1px solid rgb(128 128 128 / .12)}
table.grid tbody tr.row{cursor:pointer}
table.grid tbody tr.row:hover td{box-shadow:inset 0 0 0 999px rgb(var(--accent-rgb) / .07)}
table.grid .sym{position:sticky;left:36px;z-index:1;background:var(--surface);font-weight:700;font-stretch:95%;text-align:left;min-width:92px}
table.grid th.sym{z-index:3;background:var(--surface2);color:var(--ink)}
td.sym .dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:7px;vertical-align:1px}
/* a search match lifted to the top: its ticker cell tinted (kept opaque, since the cell is pinned) and the matched
   letters highlighted; a rule under the last match parts the matches from the rest */
table.grid tr.hit td.sym{background:linear-gradient(rgb(var(--hit-rgb) / var(--hit-tint)), rgb(var(--hit-rgb) / var(--hit-tint))), var(--surface)}
td.sym mark{background:var(--hit);color:var(--on-hit);border-radius:2px;padding:0 1px}
/* a lifted match's name beside its symbol, kept to one line (rows are a fixed height) */
td.sym .nm{display:inline-block;max-width:24ch;margin-left:8px;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;font-weight:400;color:var(--muted)}
table.grid tr.hitlast td{border-bottom:2px solid var(--muted)}
/* visually hidden: read by screen readers only */
.vh{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* pinned beside the ticker, so the star stays in reach when the table is scrolled sideways */
table.grid .star{position:sticky;left:0;z-index:1;background:var(--surface);width:36px;min-width:36px;max-width:36px;padding:0 0 0 8px;text-align:center}
table.grid th.star{z-index:3;background:var(--surface2)}
.foldbtn{border:0;background:none;cursor:pointer;color:var(--muted);font-size:12px;padding:0 4px 0 0}
/* the ⓘ after a header's label; on touch screens its hit area grows without moving the header */
.infobtn{border:0;background:none;cursor:pointer;color:var(--muted);padding:0 0 0 3px;line-height:0;vertical-align:-1px;opacity:.75}
.infobtn:hover,.infobtn:focus-visible,.infobtn[aria-expanded="true"]{color:var(--accent);opacity:1}
@media (pointer:coarse){ .infobtn{padding:6px 6px 6px 7px;margin:-6px -6px -6px -4px} }
/* a column's definition, opened from its ⓘ: the picker popover's material, fixed to the window */
.colinfo{position:fixed;z-index:60;width:min(320px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;
  background:var(--surface);color:var(--ink);border:1px solid var(--rule);border-radius:8px;box-shadow:0 8px 28px rgb(0 0 0 / .18);
  padding:12px 14px;font-size:13px;line-height:1.45;text-align:left;white-space:normal}
.colinfo:focus{outline:none}
.colinfo h4{margin:0;font-size:14.5px;font-weight:680}
.colinfo p{margin:2px 0 0}
.colinfo .cititle{color:var(--muted);margin:0 0 4px}
.colinfo .cipart{margin-top:9px}
.colinfo .cipart b{display:block;font-size:11px;font-weight:650;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.scale{display:inline-flex;flex-direction:column;gap:2px;width:140px;vertical-align:middle;margin-top:3px}
.scale .scalebar{width:100%;margin:0;border:1px solid var(--rule)}
.scalev{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.starbtn{border:0;background:none;cursor:pointer;font-size:15px;line-height:1;color:var(--rule);padding:4px}
th .starbtn{color:var(--muted)}
.starbtn[aria-pressed="true"]{color:var(--gold)}
td.grp{color:var(--muted);max-width:150px;overflow:hidden;text-overflow:ellipsis}
td.nil{color:var(--muted);opacity:.45}
.strip{display:inline-flex;gap:1px;vertical-align:middle}
.strip i{display:block;width:8px;height:16px;border-radius:1px;background:rgb(128 128 128 / .12)}
.empty{padding:40px 22px;color:var(--muted)}

/* ---------- map ---------- */
.mapwrap{display:grid;grid-template-columns:1fr 280px;flex:1;min-height:0}
.canvasbox{position:relative;min-height:360px;background:var(--surface)}
.canvasbox canvas{position:absolute;inset:0;width:100%;height:100%;cursor:crosshair}
.tip{position:absolute;pointer-events:none;background:var(--ink);color:var(--paper);padding:7px 10px;border-radius:6px;font-size:12.5px;
  font-stretch:88%;line-height:1.35;white-space:nowrap;z-index:5;display:none;box-shadow:0 4px 18px rgb(0 0 0 / .18)}
.tip b{font-size:14px;font-stretch:100%}
.side{border-left:1px solid var(--rule);overflow:auto;background:var(--surface);padding:16px 16px 24px}
.side h3{margin:0 0 4px;font-size:15px;font-stretch:110%;font-weight:750}
.side p{margin:0 0 12px;color:var(--muted);font-size:12.5px}
.flist{list-style:none;margin:0;padding:0;font-stretch:85%}
.flist li{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;padding:5px 4px;border-bottom:1px solid rgb(128 128 128 / .12);cursor:pointer}
.flist li:hover{background:rgb(var(--accent-rgb) / .07)}
.flist .g{color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
/* the Selected list above the edge: each row with a remove button, and Clear beside the heading */
.sidehead{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.sidehead .gclear{margin-top:0}
.flist.picks{margin-bottom:4px}
.flist.picks li{grid-template-columns:auto 1fr auto auto;padding-top:2px;padding-bottom:2px}
.flist .g.off{font-style:italic}
.pickdel{border:0;background:none;cursor:pointer;color:var(--muted);font-size:17px;line-height:1;min-width:28px;min-height:28px;border-radius:4px}
.pickdel:hover{color:rgb(var(--loss-rgb))}
.legend{display:flex;gap:12px;flex-wrap:wrap;font-size:12.5px;color:var(--muted);font-stretch:90%}
.legend span{display:inline-flex;align-items:center;gap:5px}
.legend i{width:9px;height:9px;border-radius:50%;display:inline-block}
.legend i.ring{background:none;border:2px solid var(--gold)}
.legend i.ctx{background:var(--muted);opacity:.45;width:7px;height:7px}
.legend i.hit{background:var(--hit);box-shadow:0 0 0 1.5px var(--on-hit)}
.legend i.pick{background:none;border:2px solid var(--ink)}
/* the playback's path so far: two faded lines in two of the legend's colours (--p1, --p2, set by app.js), since each
   ticker's path is drawn in its own colour, fading with age */
.legend i.path,.mapctl .legend i.path{width:14px;height:6px;border-radius:0;
  background:linear-gradient(to right,transparent,var(--p1)) top/100% 2px no-repeat,linear-gradient(to right,transparent,var(--p2)) bottom/100% 2px no-repeat}
.side .sidemonth{color:var(--ink);font-weight:650}   /* the playback's month, above the side lists */
.pbbar .pbplay[data-playing="true"] ~ .pbview{display:none}   /* "View this month" shows only while paused */

/* ---------- market & guide pages ---------- */
.doc{max-width:1180px;margin:0 auto;padding:26px 22px 60px}
.doc h2{font-size:26px;font-stretch:118%;font-weight:800;margin:0 0 6px;letter-spacing:-0.01em;line-height:1.15}
.doc h3{font-size:17px;font-stretch:108%;font-weight:720;margin:0 0 4px}
.doc .lede{color:var(--muted);max-width:68ch;margin:0 0 26px}
.panel{background:var(--surface);border:1px solid var(--rule);border-radius:10px;padding:18px 18px 14px;margin-bottom:22px}
.panel .head{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;margin-bottom:10px}
.panel .head p{margin:0;color:var(--muted);font-size:13px;max-width:70ch}
.two{display:grid;grid-template-columns:1fr 1fr;gap:22px}
.chart{width:100%;position:relative}
.chart svg{display:block;width:100%;overflow:visible}
.chart .axis{fill:var(--muted);font-size:11px;font-stretch:85%}
.chart .gridl{stroke:var(--rule);stroke-width:1}
.chart .zero{stroke:var(--muted);stroke-width:1;stroke-dasharray:3 3;opacity:.7}
.chart .hover{stroke:var(--muted);stroke-width:1;opacity:0}
.chart .ctip{position:absolute;top:0;pointer-events:none;background:var(--ink);color:var(--paper);font-size:12px;padding:6px 9px;border-radius:6px;
  display:none;white-space:nowrap;font-stretch:88%;line-height:1.4;z-index:3}
.chart .ctip i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:5px}
.clegend{display:flex;gap:4px 14px;flex-wrap:wrap;font-size:12.5px;color:var(--muted);margin-top:6px;font-stretch:90%}
.clegend button{border:0;background:none;padding:2px 0;cursor:pointer;color:var(--muted);display:inline-flex;align-items:center;gap:6px}
.clegend button[aria-pressed="false"]{opacity:.4;text-decoration:line-through}
.clegend i{width:14px;height:3px;border-radius:2px;display:inline-block}
.clegend i.band{height:9px;border-radius:5px}
table.plain{border-collapse:collapse;width:100%;font-stretch:82%;font-size:13.5px}
table.plain th{text-align:right;color:var(--muted);font-weight:600;padding:6px 8px;border-bottom:1px solid var(--rule);white-space:nowrap;vertical-align:bottom}
table.plain td{text-align:right;padding:5px 8px;border-bottom:1px solid rgb(128 128 128 / .12);white-space:nowrap}
table.plain .l{text-align:left}
.tick{border:0;background:none;padding:0 3px;cursor:pointer;color:var(--accent);font-weight:600;font-stretch:90%}
.tick:hover{text-decoration:underline}
.chip{display:inline-block;padding:1px 8px;border-radius:999px;font-size:12px;border:1px solid var(--rule);color:var(--muted);font-stretch:88%}
.notes{margin:10px 0 0;padding:0 0 0 18px;color:var(--muted);font-size:13px}
details.more summary{cursor:pointer;color:var(--accent);font-size:13px;margin-top:8px}
details.more pre{font-size:12px;overflow:auto;color:var(--muted);background:var(--surface2);padding:10px;border-radius:6px}
.hscroll{overflow-x:auto}
#groupTable{width:auto}
#groupTable td.l{white-space:nowrap}

.guide .block{display:grid;grid-template-columns:240px 1fr;gap:18px;padding:22px 0;border-top:1px solid var(--rule)}
.guide .block h3{font-size:19px}
.guide .block .sum{color:var(--muted);font-size:13px;margin-top:6px}
.guide dl{margin:0;display:grid;grid-template-columns:minmax(150px,210px) 1fr;gap:10px 18px}
.guide dt{font-weight:680;font-stretch:92%}
.guide dt small{display:block;font-weight:400;color:var(--muted);font-size:12px}
/* a formula title, typeset: KaTeX sets its own size, so give it room and keep it from widening the column */
.guide dt small .math[data-done]{display:block;overflow-x:auto;overflow-y:hidden;padding:2px 0}
/* ...in the page's own font and size, not KaTeX's serif at 1.21em. Only the text-like faces are swapped: the big
   parentheses and symbols keep KaTeX's own fonts, and its layout (fraction bars, subscripts) is unchanged. */
.guide dt small .math .katex{font-size:1em}
.guide dt small .katex,.guide dt small .katex .mathnormal,.guide dt small .katex .mathit,
.guide dt small .katex .mathrm,.guide dt small .katex .textrm{font-family:inherit}
.guide dd{margin:0;max-width:72ch}
.guide dd .c{display:block;color:var(--muted);font-size:12.5px;margin-top:2px}
.scalebar{display:inline-block;width:70px;height:8px;border-radius:2px;vertical-align:middle;margin-right:8px}
.logbox{background:var(--surface);border:1px solid var(--rule);border-radius:10px;padding:16px 18px;margin:0 0 26px;max-width:80ch}
.logbox table{border-collapse:collapse;margin-top:8px;font-stretch:88%}
.logbox td,.logbox th{padding:3px 14px 3px 0;text-align:left}
.logbox th{color:var(--muted);font-weight:600}

/* the how-to guides: cards on the Guide page, and each guide as a page of its own */
.guidelib{margin:0 0 34px}
.guidecards{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.guidecards a{display:block;height:100%;padding:14px 16px;background:var(--surface);border:1px solid var(--rule);border-radius:10px;
  color:var(--ink);text-decoration:none}
.guidecards a:hover{border-color:var(--accent)}
.guidecards b{display:block;color:var(--accent);font-size:15px;font-weight:700;font-stretch:104%;margin-bottom:4px}
.guidecards span{display:block;color:var(--muted);font-size:13px}
.guideback{margin:0 0 14px;font-size:13px}
.guideback a,.guidepager a{text-decoration:none}
.guideback a:hover,.guidepager a:hover{text-decoration:underline}
.guidearticle h2:focus{outline:none}
.guidenote{max-width:72ch;margin:4px 0 20px;padding:7px 12px;border:1px solid var(--rule);border-radius:8px;background:var(--surface);color:var(--muted);font-size:12.5px}
.guidearticle figure{margin:0 0 22px;max-width:900px}
/* the pictures are white-backed charts; in the dark theme the frame keeps them from glaring at the edges */
.guidearticle figure img{display:block;max-width:100%;height:auto;border:1px solid var(--rule);border-radius:8px;background:#fff}
.guidearticle figcaption{color:var(--muted);font-size:12.5px;margin-top:6px}
.guidebody{font-size:15px;line-height:1.6}
.guidebody>:not(figure){max-width:72ch}
.guidebody h3{margin:24px 0 8px}
.guidebody h4{margin:18px 0 6px;font-size:15px}
.guidebody p{margin:0 0 12px}
.guidebody ol,.guidebody ul{margin:0 0 16px;padding-left:1.6em}
.guidebody li{margin:0 0 14px}
.guidebody li>p{margin:0 0 8px}
.guidebody ul li{margin-bottom:6px}
.guidebody li>ul,.guidebody li>ol{margin:8px 0 0}
.guidebody ol>li::marker{color:var(--accent);font-weight:700}
.guidebody code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.86em;padding:.08em .35em;
  border:1px solid var(--rule);border-radius:4px;background:var(--surface)}
.guidebody pre{max-width:88ch;margin:0 0 18px;padding:12px 14px;overflow-x:auto;border:1px solid var(--rule);border-radius:8px;
  background:var(--surface);font-size:13px;line-height:1.55}
.guidebody pre code{padding:0;border:0;background:none;font-size:inherit}
/* formulas: TeX text until typeset.js replaces it; a display one scrolls sideways rather than widening the page */
.guidebody .math{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.9em}
.guidebody .math[data-done]{font-family:inherit;font-size:1em}
.guidebody .math[data-done] .katex{font-size:1.08em}
.guidebody .math.display{max-width:88ch;margin:0 0 18px;padding:6px 0;overflow-x:auto;overflow-y:hidden;text-align:center}
.guidebody .math.display[data-done]{font-size:1.1em}
.guideerr{color:rgb(var(--loss-rgb))}
.guidepager{max-width:72ch;display:flex;flex-wrap:wrap;gap:10px 18px;margin-top:30px;padding-top:14px;border-top:1px solid var(--rule)}
.guidepager a[rel="next"]{margin-left:auto;text-align:right}

/* ---------- drawer ---------- */
.scrim{position:fixed;inset:0;background:rgb(0 0 0 / .28);z-index:20;display:none}
.drawer{position:fixed;top:0;right:0;bottom:0;width:min(760px,100%);background:var(--paper);z-index:21;overflow:auto;
  transform:translateX(100%);transition:transform .22s ease,visibility .22s;visibility:hidden;
  padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
.drawer.open{transform:none;visibility:visible;box-shadow:-10px 0 40px rgb(0 0 0 / .15)}
.scrim.open{display:block}
@media (prefers-reduced-motion:reduce){.drawer{transition:none}}
.dhead{position:sticky;top:0;z-index:4;background:var(--paper);padding:18px 22px 14px;border-bottom:1px solid var(--rule);display:flex;gap:14px;align-items:flex-start}
.dhead h2{margin:0;font-size:40px;line-height:1;font-weight:830;font-stretch:125%;letter-spacing:-0.01em}
.dhead .dname{margin:6px 0 0;font-size:15px;font-weight:600;color:var(--ink)}
.dhead .meta{color:var(--muted);font-size:13px;margin-top:6px;display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center}
.dhead .actions{margin-left:auto;display:flex;gap:6px;align-items:center}
.btn{white-space:nowrap;border:1px solid var(--rule);background:var(--surface);border-radius:6px;padding:6px 11px;cursor:pointer;font-stretch:90%}
.btn[aria-pressed="true"]{border-color:var(--gold);color:var(--gold)}
.dbody{padding:18px 22px 50px}
.dsec{margin-bottom:26px}
.dsec h3{margin:0 0 3px;font-size:16px;font-stretch:108%;font-weight:720}
.dsec .why{margin:0 0 10px;color:var(--muted);font-size:12.5px}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:6px}
.tile{border-radius:7px;padding:8px 10px 7px;background:var(--surface);border:1px solid var(--rule);position:relative;overflow:hidden}
.tile .v{font-size:19px;font-weight:700;font-stretch:88%;line-height:1.1;position:relative}
.tile .n{font-size:11.5px;color:var(--muted);font-stretch:88%;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tile .bg{position:absolute;inset:0}
.tile.big .v{font-size:24px}
.rank{font-size:13px;color:var(--muted);margin-top:8px}
/* signed out: the month and compare pickers end with one line for the earlier months, never a list of them */
.gpoplock{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-top:6px;padding-top:9px;border-top:1px solid var(--rule);font-size:12.5px;color:var(--muted)}
/* signed out: a link to an earlier month opened the newest one instead */
.locklink{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;margin:0;padding:8px 22px;background:var(--surface);border-bottom:1px solid var(--rule);font-size:13px;color:var(--ink)}
.locklink[hidden]{display:none}
.locklink .gclear{margin:0 0 0 auto;min-height:36px;background:none}
@media (max-width:860px){ .locklink{padding:8px 14px} }
/* signed out: the earlier months an account unlocks, under a history that covers only the recent ones */
.locknote{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:12px 0 0;font-size:13px;color:var(--muted)}
/* in a lock note, the "Sign in or create an account" words open the sign-in dialog: a link in the sentence, not a button */
:is(.locknote,.gpoplock,.locklink,.herolock) .alink{font-weight:inherit}
.locknote[hidden]{display:none}
.pbbar .locknote{margin:0}
.rank b{color:var(--ink)}
table.mini{border-collapse:separate;border-spacing:2px;font-stretch:82%;font-size:12.5px}
table.mini th{color:var(--muted);font-weight:600;padding:2px 6px;text-align:right;white-space:nowrap}
table.mini th.l{text-align:left}
table.mini td{padding:4px 7px;text-align:right;border-radius:3px;white-space:nowrap;min-width:52px}
.bars{display:grid;grid-template-columns:78px 1fr 1fr 64px 64px;gap:3px 8px;align-items:center;font-stretch:85%;font-size:12.5px}
.bars .h{color:var(--muted);font-weight:600}
.bars .neg{display:flex;justify-content:flex-end}
.bars .neg i,.bars .pos i{display:block;height:12px;border-radius:2px}
.bars .neg i{background:rgb(var(--loss-rgb) / .75)}
.bars .pos i{background:rgb(var(--gain-rgb) / .75)}
.bars .num{text-align:right}
.bars .mk{color:var(--muted)}
/* a screener (makeScreener): it fills the Screener tab, or sits in a page section in a box that scrolls on its own */
.screener{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0}
.screener.inline{flex:none;border:1px solid var(--rule);border-radius:6px}
.screener.inline > :first-child{border-radius:6px 6px 0 0}
.screener.inline .tablewrap{flex:none;max-height:min(70vh,640px);border-radius:0 0 6px 6px}
.screener.inline .toolbar,.screener.inline .viewsbar,.screener.inline .viewnote{padding-left:12px;padding-right:12px}
.screener.inline .toolbar{padding-top:10px;padding-bottom:10px}
.screener.nostar table.grid .sym{left:0}

@media (max-width:860px){
  header.top{padding:10px 14px 0;gap:6px}
  .brand h1{font-size:22px}
  nav.tabs{margin-left:0;width:100%}
  nav.tabs a{padding:8px 10px 10px}
  .views{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}
  .views button{flex:none}
  .toolbar,.views,.viewnote{padding-left:14px;padding-right:14px}
  /* the group list spans the toolbar, wherever the button wrapped to */
  .toolbar{position:relative} .gpick{position:static} .gpop{left:14px;right:14px;width:auto;top:auto;margin-top:6px}
  .mapwrap{grid-template-columns:1fr;grid-template-rows:max-content max-content;overflow:auto}   /* the canvas height is set under "map playback" */
  .side{border-left:0;border-top:1px solid var(--rule);overflow:visible}   /* grows to its content, so the page scrolls to it instead of squeezing it */
  .two{grid-template-columns:1fr}
  .guide .block{grid-template-columns:1fr}
  .guide dl{grid-template-columns:1fr}
  .guidecards{grid-template-columns:1fr}
  .guidebody{font-size:14.5px}
  .dhead h2{font-size:32px}
  .bars{grid-template-columns:64px 1fr 1fr 52px 52px}
  .count{margin-left:0}
}

/* ---------- multi-month additions ---------- */
[hidden]{display:none !important}
.disclaimer{margin:0;padding:5px 22px;font-size:12px;color:var(--muted);background:var(--surface2);border-bottom:1px solid var(--rule);font-stretch:92%}
.disclaimer a{color:var(--muted)}
@media (max-width:860px){.disclaimer{padding:5px 14px}}
#listGrid{max-height:520px;overflow:auto;margin-top:12px}
.monthctl{display:flex;align-items:center;gap:6px;padding-bottom:10px;flex-wrap:wrap}
.monthctl > .gpick .gbtn{font-weight:650;font-stretch:95%}
.iconbtn{border:1px solid var(--rule);background:var(--paper);border-radius:6px;width:30px;align-self:stretch;cursor:pointer;font-size:17px;line-height:1;color:var(--ink)}
.iconbtn:disabled,.iconbtn[aria-disabled="true"]{opacity:.35;cursor:default}
.cmp{display:inline-flex;align-items:center;gap:6px;margin-left:8px}
.cmp > span{color:var(--muted);font-size:13px;font-stretch:90%}
.cmp .gpop{left:auto;right:0}   /* opens leftward, so it stays on screen while the tabs wrap below the header */
.status{padding:60px 22px;color:var(--muted);text-align:center;font-size:15px}
.status h2{color:var(--ink);font-stretch:110%;font-weight:760;margin:0 0 8px}
.status code{background:var(--surface2);padding:1px 5px;border-radius:4px}
.viewsbar{display:flex;align-items:center;gap:10px;background:var(--surface);padding:10px 22px 0;flex-wrap:wrap}
.viewsbar .views{padding:0;background:none;flex:1}
.newtag{display:inline-block;margin-left:6px;padding:0 5px;border-radius:3px;font-size:10.5px;font-weight:600;background:rgb(var(--accent-rgb) / .14);color:var(--accent);vertical-align:1px}
td.delta{font-size:12.5px}
.mgrid{border-collapse:separate;border-spacing:2px;font-stretch:82%;font-size:12.5px}
.mgrid th{color:var(--muted);font-weight:600;padding:2px 4px;white-space:nowrap}
.mgrid th.cur{color:var(--accent)}
.mgrid td{width:22px;height:18px;border-radius:3px;background:rgb(128 128 128 / .08)}
.mgrid td.on{background:var(--accent)}
.mgrid td.on.cur{background:var(--gold)}
.mgrid td.l{width:auto;background:none;padding-right:8px;text-align:left;white-space:nowrap}
.movers{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:8px}
.movers h4{margin:0 0 6px;font-size:13.5px;font-weight:680}
.movers .tick{margin:0 4px 4px 0;padding:2px 7px;border:1px solid var(--rule);border-radius:999px;font-weight:600}
.hist td.lab{text-align:left;color:var(--muted);font-weight:600;background:none;padding-left:0}
.hist th.cur{color:var(--accent)}
@media (max-width:860px){ .monthctl{order:2;width:100%;padding-bottom:6px;position:relative} .monthctl .gpop{left:0;right:0} .cmp{margin-left:0} .movers{grid-template-columns:1fr} .viewsbar{padding-left:14px;padding-right:14px} }

/* ---------- notice popup ---------- */
dialog#notice{width:min(520px,calc(100% - 32px));max-height:calc(100% - 32px);overflow:auto;padding:0;
  background:var(--paper);color:var(--ink);border:1px solid var(--rule);border-radius:6px;
  box-shadow:0 2px 6px rgb(0 0 0 / .10),0 24px 60px -12px rgb(0 0 0 / .35)}
dialog#notice::backdrop{background:rgb(16 24 29 / .55)}
dialog#notice[open]{animation:noticein .28s cubic-bezier(.16,1,.3,1)}
@keyframes noticein{from{opacity:0;transform:translateY(8px)}}
@media (prefers-reduced-motion:reduce){dialog#notice[open]{animation:none}}
dialog#notice h2{margin:0;padding:24px 28px 18px;font-size:30px;line-height:1.05;font-weight:820;font-stretch:125%;letter-spacing:-0.01em;text-wrap:balance}
dialog#notice ul{margin:0;padding:0 28px;list-style:none}
dialog#notice li{padding:13px 0;border-top:1px solid var(--rule);font-size:14px;line-height:1.5;max-width:62ch;color:var(--muted)}
dialog#notice li strong{color:var(--ink);font-weight:660;font-stretch:95%}
.noticeactions{padding:20px 28px 24px;border-top:1px solid var(--rule);display:flex;justify-content:flex-end}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--surface);padding:10px 20px;font-weight:620;border-radius:5px}
.btn.primary:hover{filter:brightness(1.1)}
.btn.primary.danger{background:rgb(var(--loss-rgb));border-color:rgb(var(--loss-rgb))}
@media (max-width:520px){
  dialog#notice h2{font-size:24px;padding:20px 20px 14px}
  dialog#notice ul{padding:0 20px}
  .noticeactions{padding:16px 20px 20px}
  .noticeactions .btn{width:100%}
}

/* ---------- account: the header control and the sign-in dialog (account-ui.js) ---------- */
/* The tabs and the control sit together at the end of the header and wrap to a new row together. The pair is
   measured as the tabs plus "Sign in" when the header decides whether it fits, then grows into the room left, so a
   long email shortens with an ellipsis (the menu shows it whole) instead of pushing the control onto its own row. */
.topend{flex:1 1 420px;min-width:0;display:flex;align-items:flex-end;justify-content:flex-end;gap:12px}
.topend nav.tabs{flex:none}
.acct{display:flex;align-items:center;padding-bottom:10px;position:relative;min-width:0}
.acct .gpick{min-width:0;max-width:min(240px,46vw)}
.acctin{padding:6px 14px;font-weight:600}
.acctbtn{display:block;width:100%;max-width:none}
.acct .gpop{left:auto;right:0;width:max-content;min-width:220px;max-width:min(340px,calc(100vw - 32px));padding:10px 6px 8px}
.acctwho{margin:0 6px 8px;padding-bottom:9px;border-bottom:1px solid var(--rule);font-size:12.5px;color:var(--muted);line-height:1.35}
.acctwho strong{display:block;color:var(--ink);font-weight:620;font-size:13.5px;overflow-wrap:anywhere}
.aitem{display:block;width:100%;padding:7px 8px;border:0;border-radius:5px;background:none;text-align:left;cursor:pointer;font-stretch:92%}
.aitem:hover{background:rgb(var(--accent-rgb) / .08)}
.acct .gnote:empty{display:none}
.acct .gnote{margin:6px 8px 0}

dialog#account{width:min(440px,calc(100% - 32px));max-height:calc(100% - 32px);overflow:auto;padding:0;position:fixed;
  background:var(--paper);color:var(--ink);border:1px solid var(--rule);border-radius:6px;
  box-shadow:0 2px 6px rgb(0 0 0 / .10),0 24px 60px -12px rgb(0 0 0 / .35)}
dialog#account::backdrop{background:rgb(16 24 29 / .55)}
dialog#account[open]{animation:noticein .28s cubic-bezier(.16,1,.3,1)}
@media (prefers-reduced-motion:reduce){dialog#account[open]{animation:none}}
dialog#account h2{margin:0;padding:24px 64px 6px 28px;font-size:28px;line-height:1.05;font-weight:820;font-stretch:125%;letter-spacing:-0.01em;text-wrap:balance}
dialog#account h2:focus{outline:none}
.aclose{position:absolute;top:14px;right:14px;width:36px;height:36px;border:0;border-radius:6px;background:none;color:var(--muted);
  font-size:24px;line-height:1;cursor:pointer}
.aclose:hover{color:var(--ink);background:var(--surface2)}
.alede,.abody{margin:0;padding:6px 28px 0;color:var(--muted);font-size:14px;line-height:1.5;max-width:62ch}
.aform{padding:18px 28px 0;display:flex;flex-direction:column;gap:14px}
.aform .abody{padding:0}
.afield{display:flex;flex-direction:column;gap:5px}
.afield label{font-weight:640;font-size:13px;font-stretch:95%}
/* 16px text keeps phones from zooming in on focus */
.afield input{width:100%;padding:10px 12px;font-size:16px;border:1px solid var(--rule);border-radius:6px;background:var(--surface)}
.afield input:focus-visible{outline:2px solid var(--accent);outline-offset:0;border-color:var(--accent)}
.ahint{margin:0;color:var(--muted);font-size:12.5px;line-height:1.4}
/* an error reads in ink beside a red rule, so it keeps full contrast in both themes */
.amsg{margin:0;padding:2px 0 2px 11px;border-left:3px solid rgb(var(--loss-rgb));font-size:13.5px;line-height:1.45}
.anote{margin:0;padding:2px 0 2px 11px;border-left:3px solid rgb(var(--gain-rgb));font-size:13.5px;line-height:1.45}
.amsg:empty,.anote:empty,.ahelps:empty{display:none}
.ahelps{display:flex;gap:8px;flex-wrap:wrap}
.aactions{display:flex;justify-content:flex-end;gap:8px}
.aform .aactions .btn{width:100%;padding:10px 20px}
dialog#account > div > .aactions{padding:20px 28px 0}
.aform[aria-busy="true"] .aactions .btn{opacity:.6;cursor:progress}
/* the line under a form that leads to another screen; the dialog ends with it, or with a bottom margin */
.aside{margin:6px -28px 0;padding:14px 28px 0;border-top:1px solid var(--rule);color:var(--muted);font-size:13.5px}
#accountBody{padding-bottom:22px}
.alink{border:0;background:none;padding:0;color:var(--accent);cursor:pointer;font-weight:600;text-decoration:underline;text-underline-offset:2px}
@media (max-width:520px){
  dialog#account h2{font-size:24px;padding:20px 60px 6px 20px}
  .alede,.abody{padding-left:20px;padding-right:20px}
  .aform{padding-left:20px;padding-right:20px}
  .aside{margin-left:-20px;margin-right:-20px;padding-left:20px;padding-right:20px}
  dialog#account > div > .aactions{padding:18px 20px 0}
  dialog#account > div > .aactions .btn{width:100%}
}
/* on a narrow screen the control shares the brand's row, above the tabs */
@media (max-width:860px){
  .topend{display:contents}
  nav.tabs{order:1}
  .acct{margin-left:auto;padding-bottom:8px}
}

/* ---------- portfolio page ---------- */
/* 16px text keeps phones from zooming in on focus */
.pfrows input{padding:7px 9px;font-size:16px;border:1px solid var(--rule);border-radius:6px;background:var(--paper);color:var(--ink);font-stretch:90%}
.pfrows input:focus-visible{outline:2px solid var(--accent);outline-offset:0;border-color:var(--accent)}
.pfrows input[aria-invalid="true"]{border-color:rgb(var(--loss-rgb))}
.pfrows .pfsym{width:16ch}
.pfrows .pfpct{width:8ch;text-align:right;font-variant-numeric:tabular-nums}
.pfrows td{vertical-align:top}
/* holds the hidden "Remove" header inside the scroll box, so it can't widen the page */
.pfrows th{position:relative}
/* sized to its rows, with the group column a steady width so typing doesn't shift the table */
table.plain.pfrows{width:auto}
.pfrows td.pfinfo{white-space:normal;width:36ch;min-width:18ch;padding-top:12px}
.pfrows tfoot th{color:var(--ink);font-weight:640;padding-top:12px;vertical-align:top;border-bottom:0}
.pfrows tfoot td{border-bottom:0}
.pfnone{color:var(--muted)}
/* a broken rule reads in ink beside a red rule, as the account dialog's errors do */
.pfmsg{display:block;margin-top:4px;padding-left:8px;border-left:3px solid rgb(var(--loss-rgb));font-size:12.5px;line-height:1.4;color:var(--ink);overflow-wrap:anywhere}
.pfmsg:empty{display:none}
.pfdel{border:0;background:none;cursor:pointer;color:var(--muted);font-size:18px;line-height:1;min-width:32px;min-height:32px;border-radius:4px}
.pfdel:hover{color:rgb(var(--loss-rgb))}
.pfacts{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.pftotal{margin:0 0 8px;font-weight:640;font-variant-numeric:tabular-nums}
.pfsent{margin:8px 0 0;color:var(--muted);font-size:13px;overflow-wrap:anywhere}
.pfsent:empty{display:none}
@media (max-width:520px){
  .pfrows .pfsym{width:12ch}
  .pfrows .pfpct{width:6ch}
  .pfrows td.pfinfo{width:auto;min-width:12ch}
  .pfrows th,.pfrows td{padding-left:4px;padding-right:4px}
}
.pfnote{margin:0 0 10px;color:var(--muted);font-size:13px;max-width:70ch}
.pfstatus{margin:8px 0 0;font-size:13.5px;line-height:1.45}
.pfstatus:empty{display:none}
/* the Portfolio tab: the mark while a request is out or ready, and the result area */
nav.tabs .mark{display:inline-block;width:7px;height:7px;margin-left:6px;border-radius:50%;vertical-align:middle;border:1.5px solid var(--muted)}
nav.tabs .mark[data-mark="ready"]{background:var(--accent);border-color:var(--accent)}
.pfres:empty{display:none}
.pfchanged{color:var(--ink);padding-left:8px;border-left:3px solid var(--accent)}
.pflog{margin:16px 0}
.pflog summary{cursor:pointer;color:var(--muted);font-size:13.5px}
.pflog pre{margin:8px 0 0;padding:12px;overflow:auto;max-height:420px;font-size:12px;line-height:1.5;background:var(--paper);border:1px solid var(--rule);border-radius:6px;white-space:pre-wrap;overflow-wrap:anywhere}
/* the Portfolio result: the views and their charts */
.pfview h4{margin:22px 0 4px;font-size:14px;font-stretch:105%;font-weight:700}
.pfview h5{margin:0 0 8px;font-size:13.5px;font-weight:650}
.pfview .head .seg{flex-shrink:0}
.pfchart{margin:0;min-width:0}
.pfchart figcaption{font-size:13.5px;font-weight:650;margin-bottom:6px}
.pfview .canvasbox.pfcbox{min-height:0;height:320px;border:1px solid var(--rule);border-radius:6px;overflow:hidden;touch-action:pan-y}
.pfkey{display:flex;flex-wrap:wrap;gap:4px 14px;margin:8px 0 4px;padding:0;list-style:none;font-size:12.5px;color:var(--muted)}
.pfglyph{display:inline-block;width:1.3em;color:var(--ink)}
.pfgroup{min-width:0}
.pfname{color:var(--ink)}
/* the ticker picker: the closest tickers to what was typed, under the input in use */
.pflist{position:fixed;z-index:30;margin:0;padding:4px;list-style:none;max-height:min(340px,60vh);overflow-y:auto;
  background:var(--paper);border:1px solid var(--rule);border-radius:8px;box-shadow:0 8px 24px rgb(0 0 0 / .18)}
.pflist li{display:grid;grid-template-columns:7ch minmax(0,1fr) auto;gap:10px;align-items:baseline;padding:7px 9px;border-radius:5px;cursor:pointer;font-size:14px}
.pflist li:hover{background:rgb(var(--accent-rgb) / .07)}
.pflist li[aria-selected="true"]{background:rgb(var(--accent-rgb) / .14)}
.pflist .pfosym{font-weight:700;font-stretch:95%}
.pflist .pfoname{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink)}
.pflist .pfogroup{color:var(--muted);font-size:12.5px;white-space:nowrap}
.pflist mark{background:var(--hit);color:var(--on-hit);border-radius:2px;padding:0 1px}
@media (max-width:520px){ .pflist li{grid-template-columns:6ch minmax(0,1fr)} .pflist .pfogroup{display:none} }
.pfpick{border:0;background:none;padding:0 2px;cursor:pointer;color:var(--accent);font:inherit;font-weight:600;text-align:left}
.pfpick:hover{text-decoration:underline}
.pftiers{margin:0}
.pftiers>div{display:grid;grid-template-columns:5.5em 1fr;gap:8px;padding:5px 0;border-top:1px solid var(--rule);font-size:13px}
.pftiers dt{color:var(--muted)}
.pftiers dd{margin:0;display:flex;flex-wrap:wrap;gap:2px 10px}
.pfchip{white-space:nowrap}
.pfshare{margin-left:2px;color:var(--muted);font-size:12px}
.pfnone{color:var(--muted)}
.pfpairs{margin:0;padding:0;list-style:none;font-size:13px}
.pfpairs li{padding:6px 0;border-top:1px solid var(--rule);line-height:1.8}
.pfk{color:var(--muted)}
@media (max-width:520px){
  .pfview .canvasbox.pfcbox{height:280px}
  .pfview .head .seg{width:100%}
  .pfview .head .seg button{flex:1}
  .pftiers>div{grid-template-columns:4.5em 1fr}
}
/* the Portfolio tab: trend curves of one holding */
.pfcurve{margin:20px 0}
.pfcurve h3{margin:0 0 4px;font-size:18px}
.pfcurve .pfpick{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0}
.pfcurve .pfpick select{min-height:36px;max-width:100%}
.pfcurve .pfgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));gap:12px}
.pfcurve figure{margin:0;padding:10px 12px;background:var(--surface);border:1px solid var(--rule);border-radius:6px}
.pfcurve figcaption{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 12px;font-size:13px;color:var(--muted)}
.pfcurve figcaption b{color:var(--ink);font-size:14px}
.pfcurve .pfkey i{display:inline-block;width:14px;height:0;margin:0 4px 2px 8px;border-top:2px solid var(--ink);vertical-align:middle}
.pfcurve .pfkey i.p{border-top:2px dashed var(--accent)}
.pfcurve .pfkey i.b{height:8px;border:0;background:rgb(var(--accent-rgb) / .2)}
.pfcurve .pfcv{position:relative;height:190px}
.pfcurve canvas{position:absolute;inset:0;width:100%;height:100%}
/* the Portfolio result: summary, suggested tickers, new portfolio, compare table */
.pfh{margin:22px 0 8px;font-size:15px}
.pfsum{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 12px}
.pfsum .pfstat{display:flex;flex-direction:column;min-width:110px;padding:8px 12px;border:1px solid var(--rule);border-radius:6px;background:var(--surface)}
.pfsum .pfstat span{color:var(--muted);font-size:12.5px}
.pfsum .pfstat b{font-size:20px;font-weight:600}
.pfplain{padding:0 3px}
.pfclock{color:var(--muted)}
.pfchips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 22px}
.pfchip{display:inline-block;padding:2px 9px;border:1px solid var(--rule);border-radius:999px;font-weight:600;color:var(--muted)}
button.pfchip{color:var(--accent);background:none;cursor:pointer}
table.pfnew{width:auto;min-width:min(100%,360px)}
.pfcsv{margin-top:10px;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
@media (max-width:520px){.pfsum .pfstat{flex:1 1 90px} .screener .sctl .search{flex:1 1 100%;max-width:none}}

/* ---------- narrow screens: a tighter header and toolbar ---------- */
.filtbtn{display:none}
.filters{display:contents}
.accticon{display:none}
@media (max-width:860px){
  /* month and comparison share one line */
  .monthctl{flex-wrap:nowrap;gap:4px}
  .monthctl .gbtn{max-width:none}
  .cmp{flex:1 1 0;min-width:0;margin-left:6px;gap:4px}
  .cmp > span{font-size:12px;white-space:nowrap}
  .cmp .gpick{flex:1 1 0;min-width:0}
  .cmp .gbtn{width:100%}
  /* search and one Filters button on a row; the controls open beneath */
  .toolbar{gap:8px}
  .search{flex:1 1 0;min-width:0;max-width:200px}
  .search input{width:100%}
  .filtbtn{display:block;flex:none;padding-right:26px}
  .filters{display:none;flex-basis:100%;flex-wrap:wrap;gap:8px}
  .filters.open{display:flex}
  /* the search note takes its own line right under the search box, so it never squeezes the box; the filters open below it */
  .qnote{order:1;flex-basis:100%;margin-left:0}
  .qnote:empty{display:none}
  .filters{order:2}
  .count{order:3;margin-left:auto}
  /* the account is an icon */
  .acct .gpick{max-width:none}
  .acctbtn{width:auto;padding:7px 9px}
  .acctbtn::after{display:none}
  .accticon{display:block}
  .acctemail{display:none}
}

/* ---------- map controls ---------- */
.mapctl{padding-bottom:10px;border-bottom:1px solid var(--rule);align-items:center}
.optbtn{display:none}
.optpop{display:contents}
.mapchk{font-size:13px;color:var(--muted);display:inline-flex;gap:6px;align-items:center}
.mapctl .legend{margin-left:auto}
.mapopts{display:contents}
@media (max-width:860px){
  /* one line: an options button plus the legend scrolling beside it; every control lives in the popover, which spans the page width */
  .views.mapctl{position:relative;flex-wrap:nowrap;overflow:visible;gap:10px;padding-bottom:6px;align-items:center}
  .mapopts{display:block;flex:none}
  .mapctl .optbtn{display:block;padding:5px 26px 5px 10px;font-size:12px;border-radius:6px;background:var(--paper);color:var(--ink)}   /* beats .views button's pill padding */
  .optpop{display:none;position:absolute;top:calc(100% + 4px);left:14px;right:14px;z-index:20;flex-direction:column;align-items:stretch;gap:10px;
    padding:12px;background:var(--surface);border:1px solid var(--rule);border-radius:8px;box-shadow:0 8px 28px rgb(0 0 0 / .18)}
  .optpop.open{display:flex}
  .optpop .seg{display:flex}
  .optpop .seg button{flex:1;padding:7px 6px;font-size:13px;border-radius:0}
  .mapchk{font-size:13px;gap:6px;padding:3px 0}
  .mapctl .legend{margin-left:0;flex:1 1 0;min-width:0;flex-wrap:nowrap;overflow-x:auto;gap:10px;font-size:11px;white-space:nowrap;scrollbar-width:none}
  .mapctl .legend::-webkit-scrollbar{display:none}
  .mapctl .legend span{flex:none;gap:3px}
  .mapctl .legend i{width:7px;height:7px}
}

/* ---------- map playback ---------- */
.mapmain{display:flex;flex-direction:column;min-width:0;min-height:0}
.mapmain .canvasbox{flex:1}
.mapctl .pbopen{border-radius:6px;padding:4px 11px;background:var(--paper);color:var(--ink);font-stretch:90%}   /* beats .views button's pill */
.mapctl .pbopen[aria-expanded="true"]{border-color:var(--accent);color:var(--accent);background:rgb(var(--accent-rgb) / .08)}
.mapctl .pbopen[aria-disabled="true"]{opacity:.4;cursor:default}
.pbbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;padding:8px 22px;border-top:1px solid var(--rule);background:var(--surface)}
.pbbar[hidden]{display:none}
.pbbar .btn{display:inline-flex;align-items:center;gap:6px}
.pbbar .btn:disabled,.pbbar .seg button:disabled{opacity:.4;cursor:default}
.pbbar .btn svg{flex:none}
.pbbar .pbicon{padding:6px 8px}
/* the scrubber's track: signed out, the locked earlier months come first as one hatched segment, then the open months */
.pbtrack{flex:1 1 200px;min-width:140px;display:flex;align-items:center;gap:6px}
.pbscrub{flex:1 1 auto;min-width:60px;margin:0;accent-color:var(--accent)}
.pblockslot{flex:0 0 34%;min-width:0;display:flex;align-self:stretch}
.pblockslot[hidden]{display:none}
.pblocked{flex:1;min-width:0;min-height:30px;display:flex;align-items:center;justify-content:center;gap:5px;padding:0 6px;
  border:1px dashed var(--rule);border-radius:6px;background:repeating-linear-gradient(135deg,var(--surface2) 0 5px,var(--paper) 5px 10px);
  color:var(--muted);font:inherit;font-size:12px;font-stretch:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
button.pblocked{cursor:pointer}
button.pblocked:hover{color:var(--ink);border-style:solid}
.pblocked .pbshort{display:none}
.pblocked svg{flex:none;width:12px;height:12px}
.pbmonth{min-width:8.5em;font-weight:650;font-stretch:92%}
.pbnote{flex-basis:100%;margin:0;font-size:13px;color:var(--muted)}
.pbnote.amsg{color:var(--ink)}
.pbnote.pbwhy{flex:none;order:0;padding:6px 22px 0}   /* under the map controls, in the page's column: not the bar's row rules */
.pbwhy[hidden]{display:none}
@media (max-width:860px){
  .pbnote.pbwhy{padding:6px 14px 0}
  /* the canvas and the playback bar share the canvas's old height, so opening the bar keeps it on screen */
  .mapmain{height:max(360px,62vh)}
  .mapmain .canvasbox{min-height:0}
  /* the toolbar button keeps its look beside "Chart options"; its hit area grows to the 36px touch size */
  .mapctl .pbopen{flex:none;padding:5px 10px;font-size:12px;position:relative}
  .mapctl .pbopen::after{content:'';position:absolute;inset:-4px -2px}
  /* two rows: play, previous, scrubber, month, next; then the speed, "View this month" and close. Every control is 36px
     or more. The month sits beside the scrubber because the second row has no room left for it while paused. */
  .pbbar{padding:8px 14px;gap:4px 8px}
  .pbbar::after{content:'';order:1;flex-basis:100%}
  .pbspeed,.pbview,#pbClose,.pbnote{order:2}
  .pbbar .btn,.pbbar .seg button{min-height:36px;min-width:36px;justify-content:center}
  .pbbar .seg button{padding:0 9px}
  .pbtrack{flex:1 1 0;min-width:0}
  .pbscrub{min-width:40px;height:36px}
  .pblocked{min-height:36px}
  .pblocked .pblong{display:none} .pblocked .pbshort{display:inline}
  .pbmonth{flex:none}
}
.pbmonth .pbshort{display:none}
@media (max-width:520px){
  /* the month in short ("Nov ’26"), as the month picker shows it here, and a little less padding, so both rows fit
     down to 360px */
  .pbmonth{min-width:3.6em}
  .pbmonth .pblong{display:none}
  .pbmonth .pbshort{display:inline}
  .pbbar{column-gap:6px}
  .pbbar .seg button{padding:0 7px}
  .pbbar .pbview,.pbbar #pbClose{padding:6px 9px}
}

/* ---------- tree map ---------- */
/* the Tree map tab's controls, legend and note */
.tmctl{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:10px 22px;background:var(--surface);border-bottom:1px solid var(--rule)}
.tmpick{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--muted)}
.tmpick select{padding:5px 8px;border:1px solid var(--rule);border-radius:6px;background:var(--paper);color:var(--ink)}
.tmlegend{margin-left:auto;align-items:center}
.tmlegend .scale{width:150px;margin-top:0;align-items:stretch}   /* not centered, as .legend span would have it, so the stops spread under the bar */
.tmkey{color:var(--ink)}
.tmnote{margin:0;flex-basis:100%;font-size:12.5px;color:var(--muted)}
#page-treemap{overflow-y:auto}   /* on a short screen the map keeps its least height and the page scrolls */
.tmbox{position:relative;flex:1 0 auto;min-height:360px;margin:10px 22px 16px;overflow:hidden;background:var(--surface);border-radius:4px}
.tmbox .empty{margin:0}
/* the renderer's elements, wherever it draws (drawTreeMap in app.js) */
.tm{position:absolute;inset:0}
.tmgroup{position:absolute}
.tmgroup:focus-visible{outline:none}
/* a gap of page color around each group, and the focus ring over its tiles */
.tmgroup::after{content:"";position:absolute;inset:0;border:1.5px solid var(--paper);pointer-events:none;z-index:1}
.tmgroup:focus-visible::after{border:2.5px solid var(--accent);z-index:5}
.tmhead{position:absolute;left:0;right:0;top:0;padding:2px 6px;font-size:11px;line-height:14px;font-weight:650;font-stretch:90%;color:var(--ink);
  background:var(--surface2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* no padding on the tile itself, so a sliver keeps the size the layout gave it */
/* the label sits in the middle, its font sized to the tile by drawTreeMap (TreeMap.labelFit) */
.tmtile{position:absolute;overflow:hidden;border:.5px solid var(--paper);font-size:11px;line-height:13px;color:var(--ink);
  font-stretch:88%;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.tmtile.plain{cursor:default}
.tml{display:block;max-width:100%;padding:0 4px;font-weight:700;line-height:1.15;letter-spacing:-.01em;white-space:nowrap;overflow:hidden}
.tmv{display:block;max-width:100%;padding:0 4px;font-weight:550;line-height:1.15;white-space:nowrap;overflow:hidden;opacity:.85}
.tmtag{font-size:.7em;font-weight:600;color:var(--accent)}
/* a search match: highlighter yellow around the tile and behind its symbol, as on the map and the screener */
.tmtile.hit{box-shadow:0 0 0 2px var(--hit),0 0 0 3px var(--on-hit);z-index:2}
.tmtile.hit .tml{background:var(--hit);color:var(--on-hit);border-radius:2px}
.tmtile.on{box-shadow:inset 0 0 0 2px var(--ink);z-index:3}
/* a group holding a search match too small to draw: the same yellow around the group and on its name */
.tmgroup.hit::after{border:2px solid var(--hit);box-shadow:inset 0 0 0 1px var(--on-hit);z-index:2}
.tmgroup.hit .tmhead{background:var(--hit);color:var(--on-hit)}
.tmtile:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;z-index:4}
/* the hover window: one for every tree map, placed by TreeMap.place on screen and off the hovered tile */
.tmtip{position:fixed;z-index:25;max-width:calc(100vw - 16px);padding:8px 10px;background:var(--surface);color:var(--ink);
  border:1px solid var(--rule);border-radius:8px;box-shadow:0 8px 28px rgb(0 0 0 / .18);font-size:12px;font-stretch:90%;line-height:1.35;pointer-events:none}
.tmtip[hidden]{display:none}
.tmtip p{margin:0}
.tmtip .tmthead{margin-bottom:5px;color:var(--muted)}
.tmthead b{color:var(--ink);font-size:13.5px;font-stretch:100%}
.tmtip table{border-collapse:collapse}
.tmtip th,.tmtip td{padding:2px 6px;text-align:right;white-space:nowrap}
.tmtip th{font-weight:600;color:var(--muted);border-bottom:1px solid var(--rule)}
.tmtip .l{text-align:left}
.tmtip .nm{max-width:18ch;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}
.tmtip tr.on{background:rgb(var(--accent-rgb) / .10)}
.tmtip tr.on td{font-weight:700;color:var(--ink)}
.tmtip tr.on td:first-child{box-shadow:inset 3px 0 0 var(--accent)}
.tmtip tr.hit td:first-child b{background:var(--hit);color:var(--on-hit);border-radius:2px;padding:0 2px}
.tmtip .tmmore,.tmtip .tmhint{margin-top:4px;color:var(--muted)}
@media (max-width:860px){
  .tmctl{padding:8px 14px;gap:8px 12px}
  .tmlegend{margin-left:0}
  .tmbox{margin:8px 14px 12px}
}
/* phones: the window takes the screen's width, set tighter, and the name takes what room is left, cut short with an
   ellipsis, so every column still fits at 320px */
@media (max-width:520px){
  .tmtip{width:calc(100vw - 16px);padding:7px 5px;font-size:10.5px;font-stretch:80%}
  .tmtip table{width:100%}
  .tmtip th,.tmtip td{padding:2px 1.5px}
  .tmtip th{white-space:normal;vertical-align:bottom}
  .tmtip .nm{width:100%;max-width:0;min-width:4ch}
}
/* the Portfolio result's tree map: the same renderer in a box of fixed height inside the result's column */
.pftmctl{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:0 0 8px}
.pftmctl .tmlegend .scale{width:180px}
.tmbox.pftmbox{flex:none;height:420px;min-height:0;margin:0 0 6px}
@media (max-width:860px){ .tmbox.pftmbox{margin:0 0 6px} }
@media (max-width:520px){
  .pftmctl .seg{flex:1 1 100%}
  .pftmctl .seg button{flex:1}
  .pftmctl .tmlegend .scale{width:100%}
  .pftmctl .tmlegend{flex:1 1 100%}
  .tmbox.pftmbox{height:340px}
}
