/* Ducky's shared reading system: one typeface, compact radii and navigation (colours: tokens.css).
   Keep this final layer limited to presentation; dates, source states and amounts are unchanged. */
:root:is(:not([data-tg]),[data-tg=web]) body:is(.page-app,.page-index,body){
 --font:Manrope,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
 --mono:var(--font);--r-sm:4px;--r-md:6px;--r-lg:8px;--radius:8px;
 background:var(--bg);font-family:var(--font);font-variant-numeric:tabular-nums lining-nums;
}
body.page-app .app-view{max-width:1440px}
body.page-app:is([data-route=watchlist],[data-route=calendar],[data-route=today]) .app-view{max-width:1640px}
body.page-app .app-main{--workspace-inset:22px;padding-top:var(--workspace-inset)}
body.page-app .app-top{min-height:56px;padding-block:calc(6px + var(--safe-top)) 6px}
body.page-app .app-top .avatar-mark{width:32px;height:32px}
body.page-app .app-nav>a{border-radius:6px}
body.page-app .app-nav>a.on{color:var(--accent-text);background:var(--surface-2);box-shadow:none}
body.page-app .app-foot{margin-top:20px;padding-top:12px;border-top:1px solid var(--border)}
body.page-app .app-view .card{border-radius:8px;box-shadow:none}
body.page-app :is(.btn,.input){border-radius:6px}
body.page-app .btn{font-weight:600}
body.page-app .btn-ghost{background:transparent;border-color:var(--control-border,var(--border))}
body.page-app .btn-ghost:hover{background:var(--surface-2)}
body.page-app :is(a,button,summary){-webkit-tap-highlight-color:transparent}
body.page-app :is(a,button,summary):active{opacity:.82}
body.page-app .input{background:var(--surface);border-color:var(--control-border,var(--border))}
body.page-app :is(.watch-compact-table,.season-comparison,.stock-metrics-table) {font-variant-numeric:tabular-nums lining-nums}
body.page-app .watch-compact-table tbody tr{background:var(--surface)}
body.page-app .watch-compact-table tbody tr:nth-child(even){background:color-mix(in srgb,var(--surface-2) 38%,var(--surface))}
body.page-app .watch-compact-table tbody tr:hover{background:var(--surface-2)}
body.page-app .watch-compact-table :is(th,td){border-color:var(--border)}
body.page-app .watch-compact-table .watch-company{font-size:12px}
body.page-app .watch-compact-table .watch-stock-actions>a{font-size:11px}
body.page-app .watch-compact-table .watch-stock-actions{flex-wrap:nowrap;gap:0;margin-left:-36px}
/* Indicators (owner request 2026-10-25): every column takes its content's width, so a header or a pill never breaks
   inside a word or a number; the table scrolls inside .watch-table-scroll and the page never scrolls sideways. The widths
   below are minimums. Secondary lines (the latest filing, the fund, a state note, the quote clock) take their column's
   width instead of setting it, and wrap or end in an ellipsis there. */
body.page-app .watch-indicators-table{table-layout:auto;width:max-content;min-width:100%}
body.page-app .watch-indicators-table.watch-selectable tr>:first-child{width:184px}
body.page-app .watch-indicators-table tr>:nth-child(2){width:108px}
body.page-app .watch-indicators-table tr>:is(.watch-help-col,.watch-metric-cell){width:86px}
body.page-app .watch-indicators-table tr>:is(.watch-signal-col,.watch-signal-cell){width:132px}
body.page-app .watch-indicators-table tr>.watch-cap-col{width:80px}
body.page-app .watch-indicators-table :is(th .watch-sort-label,.watch-signal-net,.watch-wall,.watch-support-reference){white-space:nowrap}
body.page-app .watch-indicators-table .watch-signal-net{overflow:visible;text-overflow:clip}
/* The cell's button bleeds 6 px into the cell padding on each side (its negative margins): at least the cell's width plus
   those 12 px, and as wide as its pill. width:100% left its content 12 px narrower than the column it sized. */
body.page-app .watch-indicators-table button.watch-signal{width:auto;max-width:none;min-width:calc(100% + 12px)}
body.page-app .watch-indicators-table :is(.watch-signal-event,.watch-signal>.watch-metric-note,.watch-quote-cell>small){display:block;width:0;min-width:100%}
body.page-app .watch-indicators-table tbody>:is(tr)>:is(th,td){padding-block:8px}
body.page-app .watch-indicators-table .watch-metric{gap:3px}
/* Direct children of long workspaces stay in the one existing app scrollport.
   No nested vertical scroll region; opaque paint and focus clearance protect the content below. */
body.page-app .watchlist-view>.watch-modes,
body.page-app .radar-activity-workspace .radar-sidebar,
body.page-app .stock-workspace-tabs,
body.page-app .explore-primary-tools{
 position:sticky;top:calc(-1 * var(--workspace-inset, 0px));z-index:12;background:var(--bg);isolation:isolate;
 box-shadow:0 6px 0 var(--bg);
}
body.page-app:is([data-route=watchlist],[data-route=boards],[data-route=stock],[data-route=explore]) .app-main{scroll-padding-top:88px}
body.page-app .watchlist-view>.watch-modes{margin:0 0 8px;border-radius:6px}
body.page-app .watchlist-view .watch-modes .btn{min-height:64px;padding:8px 14px;gap:3px;border-bottom-width:2px}
body.page-app .watchlist-view .watch-mode-title{font-size:15px;font-weight:650}
body.page-app .watchlist-view .watch-mode-purpose{font-size:12px}
body.page-app .watchlist-view .watch-controls{margin:8px 0;gap:8px}
body.page-app .watchlist-view .watch-controls .watch-search{grid-row:1}
body.page-app .watchlist-view .watch-controls>button{grid-row:1}
body.page-app .watchlist-view .watch-capacity{padding:8px 12px;margin:8px 0;border-left-width:2px;font-size:12px}
body.page-app .watchlist-view .watch-session{margin:8px 0;font-size:12px}
body.page-app .watch-research-card{border-radius:6px}
body.page-app .watch-research-heading{padding:12px 14px 10px}
body.page-app .watch-reference-strip{padding:8px 14px}
body.page-app .watch-research-price .watch-price-link{font-size:18px}
body.page-app .radar-activity-workspace .radar-sidebar{margin-bottom:8px}
body.page-app .radar-activity-workspace .radar-categories{gap:0;border:1px solid var(--border);border-radius:6px;overflow:hidden}
body.page-app .radar-activity-workspace .radar-categories .radar-category{min-height:64px;padding:8px 12px;border:0;border-bottom:2px solid transparent;border-radius:0;gap:8px}
body.page-app .radar-activity-workspace .radar-category+.radar-category{border-left:1px solid var(--border)}
body.page-app .radar-activity-workspace .radar-categories [aria-pressed=true]{border-bottom-color:var(--accent);background:var(--surface-2)}
body.page-app .radar-category-copy{gap:3px}
body.page-app .radar-category-copy>strong{font-size:15px;font-weight:650}
body.page-app .radar-category-copy>span{font-size:12px}
body.page-app .radar-activity-workspace .radar-activity-record{border-radius:6px;box-shadow:none;margin-bottom:6px}
body.page-app .radar-activity-workspace .radar-activity-toggle{padding:10px 12px 6px;gap:6px}
body.page-app .radar-activity-workspace .radar-activity-links{padding-inline:12px;gap:20px}
body.page-app .radar-activity-workspace .radar-record-title{line-height:1.5}
body.page-app .radar-activity-workspace .radar-filters{border-radius:6px;padding:8px;margin-bottom:8px}
body.page-app .radar-activity-workspace .radar-day{margin:14px 0 6px}
body.page-app .explore-primary-tools{gap:0;margin:8px 0 12px;border:1px solid var(--border);border-radius:6px}
body.page-app .explore-primary-tools>a{border:0;border-radius:0;min-height:44px;padding:8px 12px;border-bottom:2px solid transparent}
body.page-app .explore-primary-tools>a+a{border-left:1px solid var(--border)}
body.page-app .explore-primary-tools>a[aria-current=page]{border-bottom-color:var(--accent);background:var(--surface-2);color:var(--accent-text)}
/* Categories remain pinned on activity pages; the destination row scrolls away
   so two independently sticky rows cannot overlap or consume the phone viewport. */
body.page-app .radar-activity-workspace>.explore-primary-tools{position:static}
body.page-app .explore-destination-copy{gap:3px}
body.page-app .explore-destination-copy>strong{font-size:15px;font-weight:650}
body.page-app .explore-destination-copy>span{display:none}
body.page-app .explore-entry-arrow{display:none}
body.page-app .explore-primary-tools .app-icon{width:18px;height:18px}
body.page-app .explore-mention-count{font-size:20px}

body.page-app .stock-metric-section{padding:12px;border-radius:6px}
body.page-app .stock-workspace-tabs{border-radius:0;padding-top:4px;margin-top:8px}
body.page-app .cal-grid .cal-cell{border-radius:6px}
body.page-app .season-comparison th:first-child{color:var(--text)}
body.page-app .season-comparison td{text-align:right}
body.page-app .season-comparison thead th:not(:first-child){text-align:right}
body.page-app .season-extreme{justify-content:flex-end}
@media(min-width:1000px){
 body.page-app .app-shell{grid-template-columns:184px minmax(0,1fr)}
 body.page-app .app-nav{padding:16px 10px;gap:2px}
 body.page-app .app-nav>a{font-size:14px;padding:8px 12px;gap:10px}
 body.page-app .app-main{--workspace-inset:20px;padding:var(--workspace-inset) 24px 28px}
 body.page-app .cal-grid .cal-cell{min-height:104px}
 body.page-app .radar-insider-workspace .radar-toolbar{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(320px,1fr);gap:10px;align-items:start;margin-bottom:8px}
 body.page-app .radar-insider-workspace .insider-quick{grid-template-columns:auto minmax(0,1fr);align-items:start;gap:6px 10px;margin:0}
 body.page-app .radar-insider-workspace .insider-cap-range{grid-column:1/-1}
 body.page-app .radar-insider-workspace .radar-filters{padding:0;margin:0;border:0;background:none}
}
@media(max-width:760px){
 body.page-app .app-top{min-height:52px;padding-block:calc(4px + var(--safe-top)) 4px}
 body.page-app .app-main{--workspace-inset:8px;padding-top:var(--workspace-inset);padding-inline:12px}
 body.page-app .app-view .route-page{--app-caption:12px}
 body.page-app .watchlist-view .watch-modes .btn,
 body.page-app .radar-activity-workspace .radar-categories .radar-category{min-height:44px;padding:6px 3px;gap:0;text-align:center;justify-content:center}
 body.page-app .watchlist-view .watch-mode-title,
 body.page-app .radar-category-copy>strong{font-size:12px}
 body.page-app .watchlist-view .watch-mode-purpose,.radar-category-copy>span{display:none}
 body.page-app .radar-category-copy .radar-category-short{display:block}
 body.page-app .radar-activity-workspace .radar-category>.app-icon{display:none}
 body.page-app .radar-activity-workspace .radar-filters{padding:0;margin-bottom:6px;gap:6px}
 body.page-app .radar-activity-workspace .radar-day{margin:8px 0 4px}
 body.page-app .watchlist-view .watch-session{font-size:11px;margin-block:4px}
 body.page-app .watch-compact-table .watch-company{font-size:11px}
 body.page-app .watch-indicators-table.watch-selectable tr>:first-child{width:150px}
 body.page-app .watch-indicators-table tbody>:is(tr)>:is(th,td){padding-block:5px}
 body.page-app .watch-research-heading{padding:8px 10px}
 body.page-app .explore-primary-tools{margin:4px 0 8px}
 body.page-app .explore-primary-tools>a{min-height:44px;padding:6px 3px}
 body.page-app .explore-destination-copy>strong{font-size:12px}
 body.page-app .explore-destination-copy>span,body.page-app .explore-primary-tools .app-icon{display:none}
 body.page-app:is([data-route=watchlist],[data-route=boards],[data-route=stock],[data-route=explore]) .app-main{scroll-padding-top:60px}

}
@media(min-width:1000px) and (max-width:1279px){
 body.page-app .radar-insider-workspace .radar-toolbar{grid-template-columns:minmax(0,1fr)}
}
/* Public pages share the same typeface. */
body:not(.page-app) :is(.mono,.tag){font-family:var(--font);letter-spacing:0}
@media(forced-colors:active){body.page-app .ticker-symbol{color:CanvasText;background:Canvas}}

/* Market overview: charts and exact legends fit alongside their source clocks. The market mood card leads the readings
   and the five tiles sit beside it, three over two (below it on a phone), inside one hairline frame. */
body.page-app .today-macro.has-current-dashboard{padding:12px 16px 6px;border-radius:8px}
body.page-app .today-dashboard-readings{display:grid;grid-template-columns:minmax(260px,340px) minmax(0,1fr);margin:10px 0 12px;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
body.page-app .today-dashboard-readings>.k-mood{padding:12px 16px 12px 0;border-right:1px solid var(--border)}
body.page-app .today-dashboard-metrics{margin:0;border:0;grid-template-columns:repeat(6,minmax(0,1fr))}
body.page-app .today-dashboard-metric{grid-column:span 2;padding:10px 12px;gap:4px;border-right:1px solid var(--border);border-top:0}
body.page-app .today-dashboard-metric:nth-child(n+4){grid-column:span 3;border-top:1px solid var(--border)}
body.page-app .today-dashboard-metric:is(:nth-child(3),:nth-child(5)){border-right:0}
body.page-app .today-dashboard-metric .today-macro-value{font-size:24px}
body.page-app .today-dashboard-chart .today-lines{max-height:180px}
body.page-app .today-dashboard-charts{gap:16px}
body.page-app .change-card>summary{padding:10px 12px;gap:6px 12px}
body.page-app .today-updates .change-list{gap:6px}
body.page-app .change-card{border-radius:6px}
@media(min-width:1200px){
 body.page-app .today-updates .change-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.page-app .today-updates .change-list>:not(.change-card),body.page-app .today-updates .change-list>.change-card[open]{grid-column:1/-1}
}
body.page-app .today-lines-line:is(.is-liquidity,.is-yield){stroke:var(--accent-text)}
body.page-app .today-lines-dot:is(.is-liquidity,.is-yield){fill:var(--accent-text)}
body.page-app :is(.today-lines-key,.today-lines-tip-row):is(.is-liquidity,.is-yield) i{background:var(--accent-text)}
body:not(.page-app) :is(button,input,select,textarea){font-family:var(--font)}
body:not(.page-app) :is(.btn,.chip-btn){border-radius:6px}
body:not(.page-app) .page-track{padding-top:24px}
body:not(.page-app) #ledger :is(th,td){padding:10px 12px}
@media(max-width:760px){
 body.page-app .today-macro.has-current-dashboard{padding:10px}
 body.page-app .has-current-dashboard .today-session-head{gap:4px}
 body.page-app .has-current-dashboard .today-session-head>span:last-child{font-size:11px}
 body.page-app .today-dashboard-readings{grid-template-columns:minmax(0,1fr);margin:8px 0 10px}
 body.page-app .today-dashboard-readings>.k-mood{padding:10px 0 12px;border-right:0;border-bottom:1px solid var(--border)}
 body.page-app .today-dashboard-metric{padding:8px;gap:3px}
 body.page-app .today-dashboard-metric .today-macro-value{font-size:22px}
 body.page-app .today-dashboard-chart .today-lines{max-height:150px}
 body:not(.page-app) :is(.btn,.chip-btn,.track-record-details>summary,.outcome-review>summary){min-height:44px}
 body:not(.page-app) :is(input,select,textarea){font-size:16px}
}

/* The narrowest phones keep every tile label readable: two tiles a row, the last one across. */
@media(max-width:350px){
 body.page-app .today-dashboard-metric:nth-child(n){grid-column:span 3;border-right:1px solid var(--border)}
 body.page-app .today-dashboard-metric:is(:nth-child(even),:nth-child(5)){border-right:0}
 body.page-app .today-dashboard-metric:nth-child(5){grid-column:1/-1}
 body.page-app .today-dashboard-metric:nth-child(n+3){border-top:1px solid var(--border)}
}

body.page-app .today-lines-line.is-qqq{stroke:var(--blue)}
body.page-app .today-lines-dot.is-qqq{fill:var(--blue)}
body.page-app :is(.today-lines-key,.today-lines-tip-row).is-qqq i{background:var(--blue)}

body :is(button,input,select,textarea,svg text){font-family:var(--font)}

/* Small question-mark glyphs retain a full touch target without growing the cards. */
body.page-app .today-metric-heading{display:flex;align-items:flex-start;gap:2px;width:100%;min-height:20px}
body.page-app .today-metric-heading .today-macro-label{flex:1;min-width:0}
body.page-app .today-metric-heading .today-macro-help{position:static;transform:none;flex:0 0 44px;width:44px;height:44px;min-height:44px;margin:-12px -10px -12px -6px;border:0;background:transparent;color:var(--muted);display:grid;place-items:center;padding:0}
body.page-app .today-metric-heading .today-macro-help span{display:grid;place-items:center;width:18px;height:18px;border:1px solid currentColor;border-radius:50%;font-size:11px;font-weight:650;line-height:1}
body.page-app .today-metric-heading .today-macro-help:hover,body.page-app .today-metric-heading .today-macro-help:focus-visible{color:var(--accent-text)}
body.page-app .today-metric-heading .today-macro-help:focus-visible{outline:2px solid var(--accent-text);outline-offset:-3px;border-radius:6px}
body.page-app .today-metric-heading .today-macro-help:active span{background:var(--surface-2)}
