/* Site typography: IBM Plex Sans for text, IBM Plex Mono for figures and tickers. Chinese falls back to system CJK fonts. */
:root,body,button,input,select,textarea{font-family:"IBM Plex Sans","PingFang SC","Microsoft YaHei","Noto Sans CJK SC",Arial,sans-serif!important}
body{font-variant-numeric:tabular-nums}
#sheet td,#sheet input,.inputs td,.inputs input,.capital input,.pk-table td.num,.result-meta b,.eps-fields input,.financial-grid input{font-family:"IBM Plex Mono","PingFang SC","Microsoft YaHei",monospace!important;font-size:14.5px!important}
#sheet th:first-child,.inputs th{font-size:15.5px!important;font-weight:500}
#sheet thead th,.inputs thead th,.pk-table>thead>tr>th{font-variant:all-small-caps;letter-spacing:.06em;font-size:14px!important;color:var(--muted)}
.pk-table{font-size:14.5px!important}
.pk-table>thead .pk-sort{font-variant:inherit;letter-spacing:inherit;font-size:inherit}
.pk-ticker{font-family:"IBM Plex Mono",monospace!important;font-weight:600!important;color:var(--ink)!important;text-underline-offset:4px}
.pk-ticker:hover,.pk-ticker[aria-expanded=true]{color:var(--blue)!important}
/* The top three rows of the current order are marked in gold, no underline. */
.pk-ticker.is-top{color:#a37408!important;text-decoration:none!important}
:root[data-theme=dark] .pk-ticker.is-top{color:var(--gold,#f0c05a)!important}
.market-card strong,.quote-line strong,.market-stats dd{font-family:"IBM Plex Sans",sans-serif!important;font-weight:600}

/* ===== Dark mode: carry the Navy & Gold palette into surfaces that still used the old gray hex values ===== */
:root[data-theme=dark] thead th,:root[data-theme=dark] #sheet thead,:root[data-theme=dark] #sheet thead tr,:root[data-theme=dark] #sheet thead th,:root[data-theme=dark] #sheet thead th:first-child{background:#0f1b2d}
:root[data-theme=dark] #sheet .section-row th:first-child,:root[data-theme=dark] #sheet .section-row td{background:#0d1828;color:#9fb3cc}
:root[data-theme=dark] .page-dcf{--editable-fill:#14233a;--editable-border:#2f4466}
:root[data-theme=dark] .notice{background:#0f1b2e;border-color:#243a5a;color:#c3d0e0}
:root[data-theme=dark] .page-picks main,:root[data-theme=dark] .page-growth main{--pk-pass-bg:#0f2a2a;--pk-fail-bg:#2b2414;--pk-open:#0e1a2c}
:root[data-theme=dark] input::placeholder{color:#6f829b}
:root[data-theme=dark] .avatar,:root[data-theme=dark] .company-logo{background:#e6edf6;border-color:transparent}
:root[data-theme=dark] .insight-chart rect{opacity:.85}

.chart-wrap text.scale-note{font-size:12.5px;letter-spacing:.04em;opacity:.8}

/* ===== Polish layer: shared rhythm, motion and states for every page ===== */
:root{--ease:cubic-bezier(.2,.7,.2,1);--lift:0 1px 2px rgba(15,34,56,.05),0 8px 24px -14px rgba(15,34,56,.22)}
:root[data-theme=dark]{--lift:0 1px 2px rgba(0,0,0,.35),0 10px 28px -16px rgba(0,0,0,.7)}
::selection{background:rgba(201,151,31,.28)}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
*{scrollbar-width:thin;scrollbar-color:rgba(116,128,142,.45) transparent}
main{animation:iev-rise .45s var(--ease) backwards}
@keyframes iev-rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.title-row h1,main>h1{letter-spacing:-.028em;font-weight:600}
h2,h3{letter-spacing:-.012em}
/* Sidebar: icons, gold active marker, no underlines on any page */
.site-nav a{position:relative;display:flex;align-items:center;gap:11px;text-decoration:none!important;transition:background-color .18s var(--ease),color .18s var(--ease)}
.site-nav a::before{content:"";width:18px;height:18px;flex:none;background:currentColor;-webkit-mask:var(--icon) center/contain no-repeat;mask:var(--icon) center/contain no-repeat;opacity:.8;transition:opacity .18s,transform .18s var(--ease)}
.site-nav a:hover::before{opacity:1;transform:translateX(1px)}
.site-nav a[aria-current]{font-weight:600;box-shadow:none!important}
.site-nav a[aria-current]::before{opacity:1}
.site-nav a[aria-current]::after{content:"";position:absolute;left:0;top:11px;bottom:11px;width:3px;border-radius:0 3px 3px 0;background:var(--gold,#c9971f)}
.site-nav a:is([href="/"],[href^="/?"],[href^="/markets"]){--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17l6-6 4 4 8-8'/%3E%3Cpath d='M15 7h6v6'/%3E%3C/svg%3E")}
.site-nav a[href^="/earnings/"]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4M8 14h2M14 14h2M8 17.5h2'/%3E%3C/svg%3E")}
.site-nav a[href^="/dashboard/"]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='8' height='8' rx='1.5'/%3E%3Crect x='13' y='3' width='8' height='5' rx='1.5'/%3E%3Crect x='13' y='10' width='8' height='11' rx='1.5'/%3E%3Crect x='3' y='13' width='8' height='8' rx='1.5'/%3E%3C/svg%3E")}
.site-nav a[href^="/us-macro/"]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='2 12 6 12 9 5 14 19 17 12 22 12'/%3E%3C/svg%3E")}
.site-nav a[href^="/sectors/"]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.07-2.14-.22-4.05 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.15.43-2.29 1-3a2.5 2.5 0 0 0 2.5 2.5z'/%3E%3C/svg%3E")}
.site-nav a[href^="/options/"]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 20h18'/%3E%3Cpath d='M3 15h7l9-10'/%3E%3Cpath d='M15 5h4v4'/%3E%3C/svg%3E")}
.site-nav a[href^="/portfolio/"]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M3 13h18'/%3E%3C/svg%3E")}
.site-nav a[href^="/superinvestors/"]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.2'/%3E%3Cpath d='M3 20c0-3.3 2.7-6 6-6s6 2.7 6 6'/%3E%3Ccircle cx='17' cy='9' r='2.6'/%3E%3Cpath d='M16.5 14.2c2.6.4 4.5 2.7 4.5 5.8'/%3E%3C/svg%3E")}
.site-nav a[href^="/dcf/"]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M8 7h8M8 12h2M14 12h2M8 16h2M14 16h2'/%3E%3C/svg%3E")}
.site-nav a[href^="/analyzer/"]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 20V11M12 20V4M19 20v-6M3 20h18'/%3E%3C/svg%3E")}
.site-nav a[href^="/eps/"]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3C/svg%3E")}
.site-nav a[href^="/insights/"]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.6 10.8c.6.5 1.1 1.3 1.1 2.2h5c0-.9.5-1.7 1.1-2.2A6 6 0 0 0 12 3z'/%3E%3C/svg%3E")}
.site-nav a[href^="/picks/"]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9z'/%3E%3Cpath d='M19 16l.8 2.2L22 19l-2.2.8L19 22l-.8-2.2L16 19l2.2-.8z'/%3E%3C/svg%3E")}
.site-nav a[href^="/growth/"]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20c4-1 7-4 9-8l3-7 3 3-7 3c-4 2-7 5-8 9z'/%3E%3Cpath d='M14 4h6v6'/%3E%3C/svg%3E")}
@media(max-width:700px){.site-nav a::before{display:none}.site-nav a[aria-current]::after{left:12px;right:12px;top:auto;bottom:3px;width:auto;height:2px;border-radius:2px}}
/* Controls: one motion curve, visible keyboard focus, tactile press */
button,select,input,textarea,.outline,.primary,summary{transition:background-color .16s var(--ease),border-color .16s var(--ease),color .16s var(--ease),box-shadow .16s var(--ease),transform .12s var(--ease)}
button:not(:disabled):active{transform:translateY(1px)}
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:2px solid var(--blue);outline-offset:2px}
:where(input,select,textarea):focus{border-color:var(--blue)!important;box-shadow:0 0 0 3px rgba(27,77,137,.16)}
:root[data-theme=dark] :where(input,select,textarea):focus{box-shadow:0 0 0 3px rgba(138,184,236,.2)}
summary{cursor:pointer}
/* Cards lift slightly; data rows tint on hover without replacing status colors */
.panel,.import-panel,.db-card,.movers,.macro-news,.earnings-news,.market-panel,.pk-panel{box-shadow:var(--lift)}
main table:not(#sheet) tbody tr:hover>td{box-shadow:inset 0 0 0 999px rgba(27,77,137,.045)}
:root[data-theme=dark] main table:not(#sheet) tbody tr:hover>td{box-shadow:inset 0 0 0 999px rgba(138,184,236,.06)}
.research-links a{transition:transform .2s var(--ease),box-shadow .2s var(--ease),border-color .2s}
.research-links a:hover{transform:translateY(-2px);box-shadow:var(--lift);border-color:var(--gold,#c9971f)}
/* DCF valuation inputs: rows align even when labels wrap; units never overlap placeholders */
.capital{align-items:end;row-gap:16px}
.capital .input-unit input{padding-right:34px}
.capital input::placeholder{font-size:13px;letter-spacing:0}
/* Footer: readable, branded */
footer{font-size:13.5px!important;display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;padding:28px 0 40px!important;margin-top:36px}
footer .author-credit{font-weight:500;color:var(--muted)}
footer>b{font-weight:600;color:var(--ink);display:inline-flex;align-items:center;gap:7px}
footer>b::before{content:"";width:15px;height:15px;background:url(/favicon.svg?v=2) center/contain no-repeat}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}
@media(min-width:701px) and (max-width:1100px){.site-nav a{font-size:15px;gap:8px;padding:10px 9px}.site-nav a::before{width:16px;height:16px}}
/* Picks tables fit 1440px screens without clipping the score column */
@media(max-width:1600px){.pk-name{max-width:12.5em}}
/* EPS scenario headers keep label and multiple apart at tablet widths */
.result-top{gap:10px}
/* Labels sit above their control, left-aligned (DCF forecast base, Insights period/history) */
.period-controls label{flex-direction:column;align-items:flex-start;gap:6px;font-size:13.5px}
/* Empty company badge in dark mode matches the surface instead of a white tile */
:root[data-theme=dark] .avatar:not(:has(img)){background:var(--raised);color:var(--muted);border-color:var(--line)}
.page-sources{font-size:13px;line-height:1.8;color:var(--muted);width:100%;margin:0}

/* Sidebar nav (tablet and desktop): never wrap into a second column. In a short window (iPad landscape with Safari's
   toolbars, Split View) wrapped links landed outside the sidebar, hidden under the page; tighter rows keep all links in view. */
@media(min-width:701px){.site-nav{flex-wrap:nowrap!important}}
@media(min-width:701px) and (max-height:760px){.site-nav{gap:2px}.site-nav a{padding-top:8px;padding-bottom:8px;min-height:0}}

.site-nav a[href^="/stock/"]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='10' cy='10' r='6'/%3E%3Cpath d='m15 15 6 6'/%3E%3C/svg%3E")}
@media(min-width:701px) and (max-height:680px){.site-nav{top:105px;gap:1px}.site-nav a{padding-top:6px;padding-bottom:6px;font-size:14px}header{padding-top:22px;padding-bottom:18px;gap:12px}}
.site-nav a[href^="/pro/"]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3v4M7 15v6M17 3v6M17 17v4'/%3E%3Crect x='4.5' y='7' width='5' height='8' rx='1'/%3E%3Crect x='14.5' y='9' width='5' height='8' rx='1'/%3E%3C/svg%3E")}
/* After the type scale: ticker buttons stay on one line; the status text wraps beside them */
@media(min-width:701px){.import-panel form{flex:0 0 auto}.import-panel .ticker-controls{flex-wrap:nowrap}}
/* Larger table text: company/industry columns give way so the score column stays visible at 1440px */
@media(max-width:1600px){.pk-name{max-width:10.5em}}
/* Desktop sidebar rows follow sidebar.js so all links fit above the bottom controls */
@media(min-width:701px){.site-nav{gap:2px}.site-nav a{padding-top:var(--nav-pad,10px)!important;padding-bottom:var(--nav-pad,10px)!important;min-height:0!important;line-height:1.3}}
/* Phones: sub-pixel text rounding must never create a sideways wiggle (tables scroll inside their own boxes) */
@media(max-width:700px){main{overflow-x:clip}}
