@import url("tokens.css?v=15");

/* Thanford style as thanford.com wears it (TBrand docs/site/shared/site.css): a bright 星际天宫 scene, dark navy ink on
   frosted marble panels, gold kept to the belts, rules and primary buttons. Every colour is mixed from the four tokens,
   except the down colour, which takes the palaces' own vermilion (朱红). */
:root {
  --ink: color-mix(in oklab, var(--blue) 86%, black);
  --ink-2: color-mix(in oklab, var(--blue) 72%, var(--marble));
  --gold-ink: color-mix(in oklab, var(--yellow) 58%, black);
  --paper: color-mix(in oklab, var(--marble) 80%, transparent);
  --paper-strong: color-mix(in oklab, var(--marble) 94%, transparent);
  --rule: color-mix(in oklab, var(--blue) 16%, transparent);
  --rule-soft: color-mix(in oklab, var(--blue) 8%, transparent);
  --up: color-mix(in oklab, var(--jade) 78%, black);
  --vermilion: #b8432f;
  --down: var(--vermilion);
  --gutter: clamp(16px, 3vw, 40px);
  --belt: repeating-linear-gradient(to bottom, var(--yellow) 0 1px, transparent 1px 3px);
}

* { box-sizing: border-box; }
html { background: var(--night); }
body { margin: 0; min-height: 100vh; color: var(--ink); font: 15px/1.55 var(--text); overflow-x: hidden; display: flex; flex-direction: column; }
#app { flex: 1 0 auto; }  /* a short page still puts the footer on the window's bottom edge (Hubert 2026-10-09, bookmarks) */
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--gold-ink); }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* The scene: night sky with the moon, a white cloud sea, two palaces with flowing light belts. It stays put; pages scroll over it. */
/* The sky is thanford.com's (TBrand shared/sky.js): ESO's Milky Way photograph on a slowly swaying sphere with twinkling
   stars, drawn on #sky. Until WebGL draws, the CSS star tile stands in. */
#sky { position: fixed; inset: 0; z-index: -2; width: 100vw; height: 100vh; display: block; }
.scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: url("scene/sky-still.webp?v=23c15882") left top / cover no-repeat, var(--night); }
.webgl-sky .scene { background: none; }
.scene .moon { position: absolute; top: 7vh; right: 9vw; width: clamp(90px, 11vw, 170px); filter: drop-shadow(0 0 30px color-mix(in oklab, var(--marble) 40%, transparent)); }
.scene .cloud { position: absolute; left: 0; right: 0; background-repeat: repeat-x; background-position: bottom center; }
.scene .cloud.far { bottom: 0; height: 42vh; background-image: url("scene/cloud-far.webp"); background-size: auto 100%; opacity: .85; animation: drift 240s linear infinite; }
.scene .cloud.near { bottom: -2vh; height: 26vh; background-image: url("scene/cloud-near.webp"); background-size: auto 100%; animation: drift 150s linear infinite reverse; }
@keyframes drift { from { background-position-x: 0; } to { background-position-x: 1365px; } }
/* 星际 buildings (Hubert 2026-10-09): thanford.com's floating palaces. Light flows along the belts painted on each building,
   bright streaks run down its waterfalls (TBrand site.css .dl-bld), each island bobs slowly, and a faint starship-blue glow
   rims it. */
.scene .bld { position: absolute; bottom: 4vh; filter: drop-shadow(0 0 22px var(--glow-blue)); animation: bob 11s var(--ease) infinite; }
.scene .bld img { display: block; width: 100%; }
.scene .bld i { position: absolute; inset: 0; -webkit-mask: var(--m) 0 0 / 100% 100% no-repeat; mask: var(--m) 0 0 / 100% 100% no-repeat; }
.scene .bld i.belt { --m: var(--belts); mix-blend-mode: screen; animation: belt-flow 7s linear infinite;
  background: linear-gradient(105deg, transparent 38%, color-mix(in oklab, var(--marble) 60%, var(--yellow)) 47%, color-mix(in oklab, var(--belt-blue) 80%, white) 53%, transparent 62%) 0 0 / 320% 100%; }
.scene .bld i.fall { --m: var(--falls); mix-blend-mode: screen; opacity: .85; animation: fall .7s linear infinite;
  background: repeating-linear-gradient(to bottom, transparent 0 9px, color-mix(in oklab, white 70%, transparent) 9px 12px, transparent 12px 20px) 0 0 / 100% 20px; }
.scene .bld.right i.fall, .scene .bld.f2 i.fall { animation-duration: .85s; }
.scene .bld.left { left: -3vw; width: clamp(240px, 28vw, 450px); }
.scene .bld.right { right: -2vw; width: clamp(190px, 23vw, 370px); bottom: 7vh; animation-delay: -4s; }
.scene .bld.far { bottom: auto; filter: saturate(.85) brightness(.9) drop-shadow(0 0 14px var(--glow-blue)); opacity: .9; animation-duration: 14s; }
.scene .bld.f1 { top: 30vh; left: 19vw; width: clamp(90px, 8vw, 140px); animation-delay: -6s; }
.scene .bld.f2 { top: 34vh; right: 21vw; width: clamp(110px, 10vw, 170px); animation-delay: -2s; }
@keyframes belt-flow { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes fall { to { background-position: 0 20px; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes breathe { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

/* Header: a marble bar, navy type, the gold underline of the current page. */
.hd { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 9px var(--gutter);
  background: url("scene/marble.webp") 0 0 / 512px 512px; box-shadow: 0 1px 0 var(--rule), 0 10px 24px -18px color-mix(in oklab, var(--blue) 60%, transparent); }
.hd .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.hd .brand img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 1px var(--gold-ink); }
.hd .brand b { font: 600 14px/1 var(--caps); letter-spacing: .24em; }
.hd nav { display: flex; gap: 22px; }
.hd nav a { color: var(--ink-2); font-weight: 500; padding: 6px 0; }
.hd nav a:hover, .hd nav a[aria-current] { color: var(--blue); background: var(--belt) left bottom / 100% 4px no-repeat; }
.hd .search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.hd .search input { width: 100%; padding: 8px 12px 8px 34px; background: color-mix(in oklab, white 70%, transparent); border: 1px solid var(--rule); outline: none; color: var(--ink); }
.hd .search input:focus { border-color: var(--gold-ink); box-shadow: 0 0 0 3px color-mix(in oklab, var(--yellow) 28%, transparent); }
.hd .search::before { content: "⌕"; position: absolute; left: 11px; top: 50%; transform: translateY(-52%); color: var(--gold-ink); font-size: 18px; }
.hd .tools { display: flex; align-items: center; gap: 6px; }
.icon-btn { background: none; border: 1px solid transparent; padding: 6px 9px; cursor: pointer; color: var(--ink-2); position: relative; }
.icon-btn:hover { color: var(--blue); border-color: var(--rule); }
.icon-btn .dot { position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; border-radius: 8px; background: var(--yellow);
  color: var(--blue); font: 600 10px/15px var(--text); text-align: center; padding: 0 3px; box-shadow: 0 0 0 1px var(--gold-ink); }
.suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--paper-strong); backdrop-filter: blur(10px); border: 1px solid var(--rule);
  box-shadow: 0 18px 40px -20px color-mix(in oklab, var(--blue) 60%, transparent); max-height: 60vh; overflow: auto; z-index: 30; }
.suggest a { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; padding: 8px 12px; color: var(--ink); border-bottom: 1px solid var(--rule-soft); }
.suggest a:hover, .suggest a.on { background: color-mix(in oklab, var(--yellow) 18%, transparent); }
.suggest .sym { font: 500 13px/1.4 var(--mono); color: var(--blue); }
.suggest .ex { color: var(--ink-2); font-size: 12px; }
.suggest .foot { display: block; padding: 8px 12px; font-size: 13px; }

/* Layout */
main { padding: 28px var(--gutter) 34vh; }
.page-title { display: inline-flex; align-items: center; gap: 14px; margin: 0 0 6px; padding: 6px 16px 6px 0; font: 500 clamp(28px, 3.4vw, 42px)/1.15 var(--display);
  color: var(--marble); text-shadow: 0 2px 18px var(--night); }
.page-title::before { content: ""; width: 36px; height: 5px; flex: none; background: repeating-linear-gradient(to bottom, var(--belt-gold) 0 1px, transparent 1px 2px); filter: drop-shadow(0 0 4px var(--glow-gold)); }
.lead { margin: 0 0 22px; color: color-mix(in oklab, var(--marble) 85%, transparent); text-shadow: 0 1px 10px var(--night); }
.lead a { color: var(--yellow); }
h2 { margin: 0 0 12px; font: 600 12.5px/1.3 var(--caps); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-ink); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.grid > *, .acct > * { min-width: 0; }

/* Panels: frosted marble, a gold belt on top, no hairline box. */
/* Panels: polished 和田玉 as on thanford.com (TBrand site.css, Hubert 2026-10-05 11:42): a celadon-milk marble body, a soft
   inner glow and a broad waxy highlight; the gold belt sits on top. */
.panel { position: relative; padding: 20px 22px 18px;
  background:
    repeating-linear-gradient(to bottom, var(--yellow) 0 1px, transparent 1px 3px) top / 100% 5px no-repeat,
    radial-gradient(120% 90% at 30% 15%, color-mix(in oklab, white 42%, transparent), transparent 55%),
    linear-gradient(160deg, color-mix(in oklab, var(--jade) 6%, transparent), transparent 45%, color-mix(in oklab, var(--jade) 16%, transparent)),
    url("scene/marble.webp") 0 0 / 512px 512px;
  box-shadow: inset 0 0 28px color-mix(in oklab, white 55%, transparent), inset 0 -10px 24px -12px color-mix(in oklab, var(--jade) 22%, transparent),
    0 1px 0 color-mix(in oklab, white 70%, transparent) inset, 0 20px 44px -28px color-mix(in oklab, var(--blue) 70%, transparent); }
.panel-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.panel-head h2 { margin: 0; }
.panel-head .more { margin-left: auto; font-size: 13px; }
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }

/* Index tiles */
.idx { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; cursor: pointer; color: var(--ink); }
.idx .nm { font: 600 12px/1.3 var(--caps); letter-spacing: .14em; color: var(--gold-ink); }
.idx .px { font: 500 28px/1.1 var(--display); color: var(--ink); }
.idx .ch { align-self: end; font: 500 14px var(--mono); }
.idx svg { grid-column: 1 / -1; width: 100%; height: 46px; margin-top: 6px; }
.up { color: var(--up); }
.down { color: var(--down); }

/* Motto: one saying a visit, in the page's language */
.motto blockquote { margin: 0; min-height: 3.2em; }
.motto blockquote p { margin: 0; font: 500 clamp(18px, 1.7vw, 22px)/1.5 var(--display); color: var(--blue); }
.motto blockquote footer { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.motto blockquote footer::before { content: "\2014\00a0"; }

/* Tables */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
/* One name style: a table column header, a section title and a fact label on the stock page all wear `colname`. */
th, .colname { font: 600 10.5px/1.3 var(--caps); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
th { text-align: left;
  padding: 9px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; cursor: pointer; user-select: none; }
th.num, td.num { text-align: right; }
th[data-sort]::after { content: " ↕"; color: var(--rule); }
th.asc::after { content: " ↑"; color: var(--blue); }
th.desc::after { content: " ↓"; color: var(--blue); }
.sort-rank { margin-left: 4px; color: var(--blue); font-variant-numeric: tabular-nums; }
.sort-note { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
th:not([data-sort]) { cursor: default; }
#hist .tbl-wrap { overflow-x: auto; }
/* The history's level switch sits right of its title, as the chart's does (Hubert 2026-11-19). */
.hlev { flex-wrap: wrap; }
#vg .tipped { cursor: help; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 12px; }
.pager button[disabled] { opacity: .35; cursor: default; }
#hist tbody tr { cursor: pointer; }
#hist .goto { all: unset; cursor: pointer; font: inherit; color: inherit; }
#hist .goto:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
#hist .chainlink { margin-right: 6px; white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--rule-soft); white-space: nowrap; }
td.num { font-family: var(--mono); font-size: 13px; }
tbody tr:hover { background: color-mix(in oklab, var(--yellow) 14%, transparent); }
tbody tr[data-sym] { cursor: pointer; }
td .sym { font: 600 13px var(--mono); color: var(--blue); }
td .nm { color: var(--ink-2); max-width: 260px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: bottom; }
#att td .nm { max-width: 170px; }

/* Badges */
.sig { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; font: 600 10.5px/1.7 var(--caps); letter-spacing: .1em; }
.sig.buy { color: var(--up); background: color-mix(in oklab, var(--jade) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--jade) 55%, transparent); }
.sig.sell { color: var(--down); background: color-mix(in oklab, var(--vermilion) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--vermilion) 50%, transparent); }
.sig.forming { opacity: .6; box-shadow: inset 0 0 0 1px currentColor; background: none; border: 1px dashed transparent; }
.grade { display: inline-block; min-width: 26px; text-align: center; padding: 1px 6px; font: 600 12px/1.6 var(--caps); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); }
.grade.A, .grade.B { color: var(--blue); background: var(--yellow); box-shadow: none; }
.grade.C { color: var(--ink); }
.tag { display: inline-block; padding: 1px 7px; font-size: 11.5px; box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); }

/* Buttons and form */
.btn { border: 0; padding: 12px 24px; background: var(--yellow); color: var(--blue); font: 600 12px/1 var(--caps); letter-spacing: .18em; cursor: pointer;
  box-shadow: 0 0 0 1px var(--gold-ink), 0 6px 18px -8px var(--gold-ink); transition: box-shadow .4s var(--ease); }
.btn:hover { box-shadow: 0 0 0 1px var(--gold-ink), 0 0 22px 2px var(--glow-gold); }
.btn.ghost { background: none; color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.btn.ghost:hover { background: color-mix(in oklab, var(--blue) 8%, transparent); }
.btn.sm { padding: 7px 12px; font-size: 11px; }
.btn.link { background: none; box-shadow: none; color: var(--ink-2); padding: 7px 8px; letter-spacing: .1em; }
.btn.link:hover { color: var(--blue); }
.btn:disabled { opacity: .4; cursor: default; }
label.f { display: grid; gap: 5px; font-size: 13px; color: var(--ink-2); }
.agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.agree input { margin-top: 2px; }
input.in, select.in { width: 100%; padding: 9px 11px; background: color-mix(in oklab, white 72%, transparent); border: 1px solid var(--rule); outline: none; color: var(--ink); }
input.in:focus, select.in:focus { border-color: var(--gold-ink); box-shadow: 0 0 0 3px color-mix(in oklab, var(--yellow) 25%, transparent); }
.err { color: var(--down); font-size: 13px; min-height: 1em; }
.ok { color: var(--up); font-size: 13px; }

/* Auth */
.auth { min-height: calc(100vh - 90px); display: grid; place-items: center; padding: 40px 16px 30vh; }
.auth .panel { width: min(440px, 100%); padding: 34px 32px; }
/* What GaRyu is, public under the sign-in form (Google's brand check, card 82 c1309). */
.auth .about { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid currentColor; border-top-color: rgba(127, 127, 127, .25); color: var(--ink-2); font-size: 12px; line-height: 1.55; text-align: center; }
.ft .about { flex-basis: 100%; margin: 0 0 6px; }
.auth h1 { margin: 10px 0 4px; font: 500 36px/1.1 var(--display); text-align: center; color: var(--ink); }
.auth .logo { display: block; width: 68px; height: 68px; margin: 0 auto; border-radius: 50%; box-shadow: 0 0 0 1px var(--gold-ink), 0 0 26px var(--glow-gold); }
.auth form { display: grid; gap: 14px; margin-top: 20px; }
.auth .alt { text-align: center; font-size: 13px; color: var(--ink-2); margin-top: 14px; }

/* Advanced search: the filters sit in one panel above full-width results (Hubert 2026-10-09); the value ranges fold away. */
.filters { margin-bottom: 14px; padding-bottom: 12px; }
.filters fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; min-width: 0; }
.filters legend { font: 600 10.5px/1.3 var(--caps); letter-spacing: .14em; color: var(--gold-ink); text-transform: uppercase; margin-bottom: 6px; padding: 0; }
.frow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 26px; }
.frow .w { min-width: 240px; }
.frow .acts { margin-left: auto; display: flex; gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; padding: 8px 0; }
.more { margin-top: 12px; border-top: 1px solid var(--rule-soft); padding-top: 8px; }
.more summary { cursor: pointer; list-style: none; font: 600 10.5px/1.3 var(--caps); letter-spacing: .14em; text-transform: uppercase; color: var(--blue); padding: 4px 0; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "▸"; color: var(--gold-ink); margin-right: 8px; display: inline-block; transition: transform .25s var(--ease); }
.more[open] summary::before { transform: rotate(90deg); }
.ranges { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 18px; margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; border: 0; box-shadow: inset 0 0 0 1px var(--rule); background: color-mix(in oklab, white 50%, transparent); cursor: pointer; font-size: 13px; color: var(--ink-2); }
.chip.on { color: var(--blue); background: var(--yellow); box-shadow: inset 0 0 0 1px var(--gold-ink); }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.range input { padding: 7px 9px; }

/* Bookmarks */
/* Bookmarks: the folders are a Chrome-style bar of chips above a full-width table (Hubert 2026-10-09 16:22). */
.fbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 12px 14px 10px; margin-bottom: 14px; }
.fbar .sp { flex: 1; }
.fchip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 0; background: none; color: var(--ink-2); cursor: pointer; font-size: 14px; white-space: nowrap; }
.fchip:hover { color: var(--blue); background: color-mix(in oklab, var(--blue) 6%, transparent); }
.fchip.on { color: var(--blue); font-weight: 500; background: color-mix(in oklab, var(--yellow) 24%, transparent); box-shadow: inset 0 -2px 0 var(--gold-ink); }
.fchip.drop { box-shadow: inset 0 0 0 1px var(--gold-ink); }
.fchip .ct { font: 12px var(--mono); color: var(--ink-2); }
.fchip .dd { margin-left: -2px; padding: 0 2px 0 4px; color: var(--gold-ink); font-size: 11px; }
.fchip .dd:hover { color: var(--blue); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.toolbar .sp { flex: 1; }
.crumbs { color: var(--ink-2); font-size: 13px; }
.crumbs b { color: var(--ink); font-weight: 600; }
.menu { position: absolute; z-index: 40; min-width: 220px; background: var(--paper-strong); backdrop-filter: blur(12px); border: 1px solid var(--rule);
  box-shadow: 0 18px 40px -16px color-mix(in oklab, var(--blue) 50%, transparent); padding: 6px 0; color: var(--ink); }
.menu label, .menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 6px 14px; background: none; border: 0; text-align: left; cursor: pointer; font-size: 13.5px; color: var(--ink); }
.menu label:hover, .menu button:hover { background: color-mix(in oklab, var(--yellow) 16%, transparent); }
.menu hr { border: 0; border-top: 1px solid var(--rule-soft); margin: 6px 0; }

.star { background: none; border: 0; cursor: pointer; font-size: 18px; color: var(--ink-2); padding: 0 4px; line-height: 1; }
.star.on { color: var(--gold-ink); text-shadow: 0 0 10px var(--glow-gold); }

/* Popover (Chrome-style "Bookmark added") */
.pop { position: absolute; z-index: 50; width: 320px; padding: 18px; background: var(--paper-strong); backdrop-filter: blur(12px); color: var(--ink);
  box-shadow: 0 0 0 1px var(--gold-ink), 0 24px 50px -18px color-mix(in oklab, var(--blue) 60%, transparent); display: grid; gap: 12px; }
.pop h3 { margin: 0; font: 500 21px/1.2 var(--display); }
.pop .row { display: flex; gap: 8px; justify-content: flex-end; }

/* Stock page */
.stock-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 24px; margin-bottom: 18px; color: var(--marble); text-shadow: 0 2px 14px var(--night); }
.stock-head .sym { font: 500 15px var(--mono); color: var(--yellow); letter-spacing: .06em; }
.stock-head h1 { margin: 0; font: 500 clamp(28px, 3.4vw, 42px)/1.1 var(--display); }
.stock-head .px { font: 500 36px/1 var(--display); }
.stock-head .up { color: color-mix(in oklab, var(--jade) 50%, var(--marble)); }
.stock-head .down { color: color-mix(in oklab, var(--vermilion) 60%, var(--marble)); }
.stock-head .muted { color: color-mix(in oklab, var(--marble) 75%, transparent); }
.stock-head .acts { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.stock-head .star { color: var(--marble); }
.stock-head .star.on { color: var(--yellow); }
.chart { width: 100%; height: 480px; display: block; }
#chart { position: relative; cursor: grab; touch-action: pan-y; user-select: none; }
#chart.dragging { cursor: grabbing; }
.chart text { font: 11px var(--mono); fill: var(--ink-2); }
.seg { display: inline-flex; box-shadow: inset 0 0 0 1px var(--rule); }
.seg button { background: none; border: 0; padding: 6px 12px; cursor: pointer; color: var(--ink-2); font-size: 13px; }
.seg button.on { background: var(--yellow); color: var(--blue); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 22px; margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 13px; text-align: right; }
.kv dd .tipped, .cmp td .tipped { display: block; cursor: help; white-space: nowrap; }
.kv dd .tipped .num, .cmp td .tipped .num { font-weight: 600; }
.kv dt.colname { color: var(--gold-ink); }
.cmp th[scope=row] { text-align: left; white-space: normal; border-bottom: 1px solid var(--rule-soft); }
.cmp td.num { text-align: right; }
.cmp tr.grp th { text-align: left; padding-top: 16px; font: 600 12px/1.4 var(--caps); letter-spacing: .12em; color: var(--ink-2); border-bottom: 1px solid var(--rule); }
/* With comparison stocks a text cell (the SIC name) wraps, so the SIC median column stays in view. */
.cmp td:has(> .searchlink) { white-space: normal; }
.cmp .drop { all: unset; cursor: pointer; padding: 0 4px; color: var(--ink-2); }
.cmp .drop:hover, .cmp .drop:focus-visible { color: var(--down); }
.cmpadd { position: relative; width: min(100%, 260px); }
.cmpadd input { width: 100%; }
.caption { margin: 10px 0 0; }
.searchlink { color: var(--blue); text-decoration: underline dotted; text-underline-offset: 3px; }
.searchlink:hover { color: var(--gold-ink); text-decoration: underline; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; align-items: center; }
.legend i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-right: 6px; }
.legend .hint { margin-left: auto; }
.legend.key { margin-top: 4px; }
.legend b.up { color: var(--up); } .legend b.down { color: var(--down); }
.legend button.layer { background: none; border: 1px solid transparent; padding: 2px 6px; color: inherit; font: inherit; cursor: pointer; }
.legend button.layer:hover { border-color: var(--rule); }
.legend button.layer:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.legend button.layer.off { opacity: .45; text-decoration: line-through; }
.legend .pin { background: none; border: 1px solid var(--gold-ink); color: var(--ink); font: inherit; padding: 2px 8px; margin-right: 6px; cursor: pointer; }
.legend .pin:hover { background: var(--yellow); color: var(--blue); }
.seg { flex-wrap: wrap; }

/* Account */
.acct { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.side a { display: block; padding: 9px 14px; color: var(--ink-2); }
.side a[aria-current] { color: var(--blue); font-weight: 500; background: color-mix(in oklab, var(--yellow) 22%, transparent); box-shadow: inset 3px 0 0 var(--gold-ink); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; max-width: 760px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }


/* Alerts */
.notes { position: absolute; right: var(--gutter); top: 58px; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; z-index: 40; color: var(--ink);
  background: var(--paper-strong); backdrop-filter: blur(12px); border: 1px solid var(--rule); box-shadow: 0 24px 50px -18px color-mix(in oklab, var(--blue) 60%, transparent); }
.notes .item { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 12px 14px; border-bottom: 1px solid var(--rule-soft); cursor: pointer; }
.notes .item:hover { background: color-mix(in oklab, var(--yellow) 14%, transparent); }
.notes .lvl { font-size: 12px; font-weight: 600; color: var(--blue); }
.notes .item.unread { box-shadow: inset 3px 0 0 var(--gold-ink); }

/* The GaRyu logo loop floats over the page as Glyphew's does on thanford.com, and moves nothing. */
/* No z-index and before #app: the orb flies behind the panels (opaque marble) and over the sky between them, so it
   never hides a table or chart (Seven, card 76 c1249 item 3). */
.orb { position: fixed; left: 0; top: 0; width: clamp(110px, 12vw, 170px); aspect-ratio: 1; cursor: default; border: 0; padding: 0; background: none; }
/* The loop's canvas is wider than the orb so the dragon can fly large around a logo that keeps the orb's size. */
.orb canvas { position: absolute; width: 280%; height: 280%; left: -90%; top: -90%; display: block; pointer-events: none; }
.orb .mark { display: none; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 1px var(--gold-ink), 0 0 22px var(--glow-gold); }
.orb.still canvas { display: none; }
.orb.still .mark { display: block; }
html.tab-hidden .scene, html.tab-hidden .scene * { animation-play-state: paused; }

.ft { position: relative; padding: 16px var(--gutter) 22px; background: var(--paper); backdrop-filter: blur(10px); color: var(--ink-2); font-size: 12.5px;
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.ft::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--belt); }
.ft .credit { margin-left: auto; }
.ft .legal { display: flex; gap: 12px; flex-wrap: wrap; }
.ft .legal a { color: var(--ink-2); text-decoration: underline; }
.ft .credit a { color: var(--ink-2); text-decoration: underline; }
.ft .belts { width: 60px; height: 5px; background: repeating-linear-gradient(to bottom, var(--gold-ink) 0 1px, transparent 1px 2px); }
.loading { color: var(--ink-2); font-size: 13px; padding: 12px 0; }
.loading::after { content: ""; display: inline-block; width: 40px; height: 2px; margin-left: 10px; vertical-align: middle;
  background: linear-gradient(90deg, transparent, var(--gold-ink), transparent); animation: sweep 1.4s infinite linear; background-size: 200% 100%; }
#chart .chart-wait { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); margin: 0; pointer-events: none;
  padding: 4px 10px; background: color-mix(in oklab, var(--paper) 88%, transparent); }
@keyframes sweep { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) { .scene .cloud, .scene .bld, .scene .bld i { animation: none; } }
@media (max-width: 900px) {
  .acct { grid-template-columns: 1fr; }
  .frow .acts { margin-left: 0; }
  .hd { flex-wrap: wrap; }
  .hd .search { order: 3; max-width: none; flex-basis: 100%; }
  .hd nav { gap: 14px; }
  .scene .bld.right, .scene .bld.far { display: none; }
}
@media (max-width: 560px) {
  .hd nav { order: 4; flex-basis: 100%; overflow-x: auto; gap: 18px; }
  .fbar { flex-wrap: nowrap; overflow-x: auto; }
  .fbar .sp { display: none; }
  .chart { height: 350px; }
  .scene .bld.left { width: 60vw; opacity: .7; }
}

/* Thanford kit elements for every control (Hubert 2026-10-09: "all elements in webpage should follow thanford style").
   Dialog: Marble Letter (kit 1.7.27). Select: Gold Chevron with a Custom List (kit 1.7.16). Checkbox: Gold Square; switch:
   Jade Switch (kit 1.7.17). Native prompt(), confirm() and option lists are not used anywhere. */
dialog.letter { width: min(420px, calc(100vw - 32px)); padding: 26px 26px 22px; border: 0; color: var(--blue);
  background: url("scene/marble.webp") 0 0 / 512px 512px, var(--marble);
  box-shadow: 0 0 0 1px var(--gold-ink), 0 0 0 5px color-mix(in oklab, var(--yellow) 22%, transparent), 0 30px 60px -24px var(--night); }
dialog.letter::backdrop { background: color-mix(in oklab, var(--night) 55%, transparent); backdrop-filter: blur(4px); }
dialog.letter::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--belt); }
dialog.letter h3 { margin: 0 0 6px; font: 600 26px/1.2 var(--display); }
dialog.letter p { margin: 0 0 16px; font: italic 400 17px/1.45 var(--display); color: var(--ink-2); }
dialog.letter form { display: grid; gap: 16px; }
dialog.letter footer { display: flex; justify-content: flex-end; gap: 10px; }

select.in { appearance: none; padding-right: 34px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23946f00' stroke-width='1.4'%3E%3Cpath d='M.5.5 5 5 9.5.5'/%3E%3C/svg%3E") right 12px center no-repeat, color-mix(in oklab, white 72%, transparent); }
.pick { position: relative; display: block; min-width: 0; }
.pick select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.pick > button { width: 100%; text-align: left; padding: 9px 34px 9px 11px; border: 1px solid var(--rule); color: var(--ink); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23946f00' stroke-width='1.4'%3E%3Cpath d='M.5.5 5 5 9.5.5'/%3E%3C/svg%3E") right 12px center no-repeat, color-mix(in oklab, white 72%, transparent); }
.pick > button:focus-visible, .pick.open > button { border-color: var(--gold-ink); box-shadow: 0 0 0 3px color-mix(in oklab, var(--yellow) 25%, transparent); outline: none; }
.pick ul { position: absolute; z-index: 60; left: 0; min-width: 100%; top: calc(100% + 4px); margin: 0; padding: 5px 0; list-style: none; max-height: 280px; overflow: auto;
  background: url("scene/marble.webp") 0 0 / 512px 512px, var(--marble); box-shadow: 0 0 0 1px var(--gold-ink), 0 18px 40px -16px color-mix(in oklab, var(--blue) 60%, transparent); display: none; }
.pick.open ul { display: block; }
.pick li { padding: 8px 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.pick li:hover, .pick li.hl { color: var(--blue); background: color-mix(in oklab, var(--yellow) 22%, transparent); }
.pick li[aria-selected="true"] { color: var(--blue); font-weight: 500; box-shadow: inset 3px 0 0 var(--gold-ink); }

input[type="checkbox"] { appearance: none; width: 18px; height: 18px; margin: 0; flex: none; border: 1px solid var(--gold-ink); display: inline-grid; place-content: center;
  background: color-mix(in oklab, white 60%, transparent); cursor: pointer; transition: background .2s; }
input[type="checkbox"]::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
input[type="checkbox"]:checked { background: var(--yellow); }
input[type="checkbox"]:checked::after { opacity: 1; }
input[type="checkbox"]:disabled { opacity: .45; cursor: default; }
input[type="checkbox"]:focus-visible { outline: 1px solid var(--gold-ink); outline-offset: 3px; }
.switch input[type="checkbox"] { width: 40px; height: 22px; border-radius: 999px; border: 1px solid var(--rule); background: color-mix(in oklab, var(--blue) 10%, transparent); position: relative; display: block; transition: background .3s, border-color .3s; }
.switch input[type="checkbox"]::after { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border: 0; border-radius: 50%; transform: none; opacity: 1; background: var(--ink-2); transition: transform .3s var(--ease), background .3s; }
.switch input[type="checkbox"]:checked { background: var(--jade); border-color: color-mix(in oklab, var(--jade) 70%, black); }
.switch input[type="checkbox"]:checked::after { transform: translateX(18px); background: var(--marble); }
::selection { background: color-mix(in oklab, var(--yellow) 55%, transparent); color: var(--blue); }
* { scrollbar-color: color-mix(in oklab, var(--gold-ink) 70%, transparent) transparent; scrollbar-width: thin; }

/* Instant tips on chart controls: shown on hover and keyboard focus, never on touch taps that move on. */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; z-index: 30; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 260px; padding: 6px 9px; background: var(--ink); color: var(--marble);
  font-size: 12px; line-height: 1.35; text-align: left; text-decoration: none; white-space: normal; pointer-events: none;
}
.legend [data-tip]:hover::after, .legend [data-tip]:focus-visible::after { top: auto; bottom: calc(100% + 6px); }
#tf [data-tip]:last-child:hover::after, #tf [data-tip]:last-child:focus-visible::after { left: auto; right: 0; transform: none; }
/* Column and title tips are the same ::after. They open downward onto the rows so
   .tbl-wrap's scrollport does not clip a tip that would have opened above the header.
   Edge columns pin to the inner edge, the same way the last timeframe button does. */
th[data-tip], dt[data-tip], h2[data-tip] { cursor: help; }
th[data-tip]:hover::after, th[data-tip]:focus-visible::after,
dt[data-tip]:hover::after, dt[data-tip]:focus-visible::after,
h2[data-tip]:hover::after, h2[data-tip]:focus-visible::after { top: calc(100% + 6px); bottom: auto; z-index: 40; }
th[data-tip]:first-child:hover::after, th[data-tip]:first-child:focus-visible::after,
th[data-tip]:nth-child(2):hover::after, th[data-tip]:nth-child(2):focus-visible::after { left: 0; right: auto; transform: none; }
th[data-tip]:last-child:hover::after, th[data-tip]:last-child:focus-visible::after { left: auto; right: 0; transform: none; }
/* A value cell's tip lists its dates on separate lines and opens leftward from the right-aligned number. */
.kv dd .tipped:hover::after, .kv dd .tipped:focus-visible::after, .cmp td .tipped:hover::after, .cmp td .tipped:focus-visible::after { left: auto; right: 0; transform: none; z-index: 40; white-space: pre-line; }
.kv dd .tipped:focus-visible, .cmp td .tipped:focus-visible { outline: 1px solid var(--gold-ink); outline-offset: 2px; }
th[data-tip]:focus-visible, dt[data-tip]:focus-visible, h2[data-tip]:focus-visible { outline: 1px solid var(--gold-ink); outline-offset: 2px; }

/* The chart's explanation card: a marble panel with the gold belt on top, the label in its own colour, a small drawing. */
.explain { position: fixed; z-index: 40; width: 300px; padding: 14px 16px 10px; pointer-events: none;
  background: var(--belt) top / 100% 5px no-repeat, var(--paper-strong); backdrop-filter: blur(12px);
  border: 1px solid var(--rule); box-shadow: 0 22px 48px -22px color-mix(in oklab, var(--blue) 70%, transparent); color: var(--ink); }
.explain .ex-head { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--hair); }
.explain .ex-head b { font: 600 20px/1.1 var(--caps); }
.explain .ex-head span { font: 500 15px/1.25 var(--display); }
.explain svg { display: block; margin: 0 auto 6px; }
.explain p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.45; }
.explain p + p { color: var(--ink-2); }
#cs [data-x] { cursor: help; }
/* Signal history as trades (Hubert 2026-11-18): one trade per row, each cell price / mark and time / time to the next cell. */
.trk-sum { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 18px; margin: 4px 0 12px; }
.trk-chip { display: flex; flex-direction: column; min-width: 64px; }
.trk-chip[data-tip] { cursor: help; }
.trk-chip small { font-size: 11px; letter-spacing: .04em; color: var(--ink-2); text-transform: uppercase; }
.trk-v { font-size: 15px; font-variant-numeric: tabular-nums; }
.trk-vs { display: flex; align-items: flex-end; gap: 8px; padding: 4px 10px; border-radius: 6px; background: color-mix(in oklab, var(--gold-ink) 9%, transparent); }
.trk-vs > i { font-style: normal; font-size: 11px; color: var(--ink-2); padding-bottom: 2px; }
.trk-wrap { overflow-x: auto; }
.trk { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.trk [data-tip]:hover::after, .trk [data-tip]:focus-visible::after, .trk-sum [data-tip]:hover::after, .trk-sum [data-tip]:focus-visible::after { white-space: pre-line; }
.trk th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-ink); text-align: left; font-weight: 600; padding: 4px 8px 6px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.trk td { padding: 1px 8px; vertical-align: top; border: 0; }
.trk-t { border-bottom: 1px solid var(--rule); }
.trk-t > tr:first-child > td { padding-top: 8px; }
.trk-t > tr:last-child > td { padding-bottom: 6px; }
.trk-c { min-width: 128px; }
.trk-px { font-size: 17px; font-weight: 400; color: var(--ink); line-height: 1.2; cursor: help; }
.trk-pt { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.trk-g { vertical-align: middle; }
.trk-gap { display: flex; align-items: center; gap: 6px; height: 18px; color: var(--ink-2); white-space: nowrap; }
.trk-gap i { flex: 1; min-width: 18px; height: 0; border-top: 1px solid color-mix(in oklab, var(--ink-2) 45%, transparent); position: relative; }
.trk-gap i::after { content: ""; position: absolute; right: -1px; top: -4px; border: 3.5px solid transparent; border-left-color: color-mix(in oklab, var(--ink-2) 60%, transparent); }
.trk-dur { font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.trk-dur > span { font-size: 14px; color: var(--ink); margin-left: 1px; }
.trk-dur > span:first-child { margin-left: 0; }
.trk-mk { display: inline-flex; align-items: center; gap: 3px; padding: 1px 4px 1px 2px; border: 0; border-radius: 4px; background: none; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.trk-mk small { font-weight: 400; font-size: 12px; margin-left: 2px; }
.trk-mk.buy, .trk-mk.up { color: var(--up); }
.trk-mk.sell, .trk-mk.down { color: var(--down); }
button.trk-mk:hover, button.trk-mk:focus-visible { background: color-mix(in oklab, var(--yellow) 25%, transparent); }
.trk-tri { width: 14px; height: 11px; overflow: visible; }
.trk-mid { vertical-align: middle; }
.trk-mid > div { display: flex; flex-wrap: wrap; gap: 2px 4px; width: 170px; }
.trk-ret { font-size: 16px; white-space: nowrap; vertical-align: middle; }
.trk-held { white-space: nowrap; color: var(--ink-2); vertical-align: middle; }
.trk-empty { color: var(--ink-2); }
.trk-train td { background: color-mix(in oklab, var(--ink-2) 8%, transparent); }
.trk-split td { padding: 6px 8px; font-size: 12px; color: var(--gold-ink); background: color-mix(in oklab, var(--gold-ink) 12%, transparent); border-bottom: 1px solid var(--rule); }
.trk-split span + span { margin-left: 18px; }
.trk-latest td { background: color-mix(in oklab, var(--yellow) 8%, transparent); }
.trk-note { margin-top: 8px; font-size: 12px; color: var(--ink-2); }
