/* Presentation tokens shared by every route. Existing palette remains authoritative. */
:root{--font-xs:12px;--font-sm:13px;--font-md:15px;--font-lg:17px;--font-xl:20px;--font-2xl:26px;--font-money:30px;--weight-normal:400;--weight-medium:500;--weight-semibold:600;--weight-bold:700;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:20px;--space-6:24px;--radius-sm:8px;--radius-md:12px;--radius-lg:16px}
body{font-size:var(--font-md);line-height:1.45;font-weight:400;overflow-x:clip}body.route-ui .content{max-width:1240px;padding:0 16px calc(80px + env(safe-area-inset-bottom));margin:auto;width:100%;min-width:0}body.route-ui #wealth-summary{display:none}body.route-ui .topbar{min-height:44px;padding:6px 16px;font-size:12px}body.route-ui .top-actions{gap:4px}body.route-ui #clock{display:none}body.route-ui .top-actions button{min-height:32px;font-size:12px;padding:4px 8px}body.route-ui .top-actions #install-app,body.route-ui .top-actions #account-settings{display:none}
.route-page{min-width:0;color:var(--text,#172d26);font-size:15px;line-height:1.45;overflow-wrap:anywhere}.route-page *{box-sizing:border-box;min-width:0}.route-page h1{font-size:20px;margin:0;font-weight:700}.route-page h2,.route-page h3{font-size:17px;margin:12px 0 8px;color:inherit}.route-page h4{font-size:15px;color:inherit}.route-page p{font-weight:400;margin:8px 0}.route-page small,.route-page .meta{font-size:12px;line-height:1.3;color:var(--muted,#69756f)}.route-page .numeric{font-variant-numeric:tabular-nums}.route-header{height:48px;display:flex;align-items:center;gap:8px;margin-bottom:8px}.route-header button{width:44px;height:44px;flex:none;border:0;background:transparent;font-size:26px}.route-header .route-tools{margin-left:auto}.route-page a{color:inherit;text-decoration:none}.route-page button,.route-page select{min-height:44px}.route-page select,.route-page input,.route-page textarea{max-width:100%;width:100%;font-size:16px}.route-page .panel{padding:12px;margin:0 0 12px;border-radius:12px;box-shadow:none}.route-summary{height:112px;padding:12px;background:#fff;border:1px solid #e1e7e0;border-radius:12px;display:grid;grid-template-columns:1fr 1fr;gap:4px 12px;margin-bottom:12px}.route-summary .main{grid-column:1/-1;display:flex;align-items:baseline;justify-content:space-between;gap:8px}.route-summary .money{font-size:26px;font-weight:600}.route-summary b{font-size:15px;font-weight:600;display:block}.route-list{background:#fff;border:1px solid #e1e7e0;border-radius:12px;overflow:hidden;margin-bottom:12px}.route-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #e5e9e3;padding:12px;min-height:52px;background:#fff}.route-row:last-child{border-bottom:0}.route-row.account-row{height:80px}.route-row.holding-row{height:80px}.route-row .name{font-size:17px;line-height:1.25;font-weight:600;display:block}.route-row .price{font-size:20px;font-weight:600;display:block}.route-row small{display:block;margin-top:3px}.route-row .right{text-align:right;flex-shrink:0;max-width:46%}.route-row .daily{font-size:13px;font-weight:600;display:block}.route-sort{height:44px;margin-bottom:8px}.route-sort select{height:44px}.route-position{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.route-position>div{min-height:64px;padding:8px 12px;background:#fff;border:1px solid #e1e7e0;border-radius:8px}.route-position b{display:block;font-size:17px;font-weight:600}.route-security-price{font-size:26px;font-weight:600}.route-chart{min-height:200px;margin:12px 0}.route-chart svg{height:180px;width:100%}.route-chart .dv-chart{margin:0}.route-chart .dv-chart svg{max-height:200px}.route-chart small{font-size:12px}.route-transaction{min-height:56px}.route-transaction .side{font-weight:600}.route-decision{padding:12px;background:#fff;border-radius:12px;margin-bottom:12px}.route-decision .action{font-size:20px;font-weight:700}.route-decision .reason{font-size:13px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.route-research-card{display:block;background:#fff;border:1px solid #e1e7e0;border-radius:12px;padding:12px;margin-bottom:12px;height:156px;overflow:hidden}.route-research-card .answer{font-size:15px;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.route-research-card .question,.route-research-card .reason{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}.route-research-card .question{color:var(--muted,#69756f)}.route-research-card .name{font-size:17px;font-weight:600}.route-page pre{white-space:pre-wrap;word-break:break-word;font-size:13px}.route-page table{width:100%;font-size:13px}.route-page th,.route-page td{padding:6px;overflow-wrap:anywhere}.route-page .route-metadata{font-size:13px}.route-page .route-metadata summary{min-height:44px;padding:12px 0}.route-page .empty{padding:16px;background:#fff;border-radius:12px}.route-page .benchmark-selector{display:grid;grid-template-columns:1fr 1fr;gap:8px}.route-page .benchmark-selector input{grid-column:1/-1}.route-page .route-prose{max-width:760px}.route-page ul{padding-left:20px}.route-page li{margin-bottom:8px}.route-page .nav-chevron{font-size:20px;color:var(--muted,#69756f)}
body.route-ui .mobile-nav{height:calc(64px + env(safe-area-inset-bottom));padding:0 8px env(safe-area-inset-bottom);grid-template-columns:repeat(5,minmax(0,1fr));bottom:0;position:fixed;left:0;right:0;transform:none}body.route-ui .mobile-nav button{min-height:48px;height:56px;font-size:23px}body.route-ui .mobile-nav span{font-size:12px;font-weight:600}.route-ui #view-research.route-root>.pagehead,.route-ui #view-research.route-root>#research-list{display:none}.route-ui #view-research.route-child>:not(#route-research){display:none!important}.route-ui #view-research.route-root #research-intake{padding:12px;margin-bottom:12px}.route-ui #view-research.route-root #research-intake h2{font-size:17px}.route-ui #view-research.route-root #ri-text{min-height:72px}.route-ui #view-research.route-root #research-intake .muted{font-size:12px}.route-ui .v2-owned>:not(.v2-root):not(.route-page){display:none}
@media(min-width:768px){.route-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:start}.route-summary{max-width:720px}.route-research-list{display:grid;grid-template-columns:1fr 1fr;gap:12px}.route-page .route-row{max-width:100%}.route-ui .topbar{padding:12px 24px}.route-ui .route-page{padding-bottom:24px}}
@media(min-width:1200px){body.route-ui .content{max-width:1240px}.route-prose{max-width:800px}}
/* Route root owns spacing; legacy grid gaps must not inflate the mobile page. */
.route-page.v2-root{display:block;gap:0}.route-page .route-header h1{margin:0}.route-page .route-summary small{white-space:normal}.route-page .route-summary b small{display:block}.route-page .route-position small{display:block}.route-page .route-row small{color:#68746f}
.route-ui #view-research.route-root>:not(#route-research){display:none!important}.route-ui #view-research.route-root #research-intake{display:block;margin-bottom:12px}.route-ui #view-research.route-root #ri-text{height:84px;min-height:84px}.route-ui #view-research.route-root #research-intake .ri-hint{display:none}.route-ui #view-research .route-page .toolbar{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.route-ui .route-page .toolbar input,.route-ui .route-page .toolbar select{width:100%}.route-ui #view-research .route-header{margin-bottom:8px}.route-page .route-decision{display:block}.route-page .route-research-card .name{color:#172d26}
.route-row>span:first-child{overflow:hidden}.route-row .name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.route-row.account-row .right{max-width:60%}.route-row .price{white-space:nowrap}.route-summary>div>small{display:block}

/* Dated quotes add lines. Financial text must stay inside its own holding. */
.route-row.holding-row,.route-row.account-row{height:auto;min-height:80px;align-items:flex-start}
.route-row.holding-row>span:first-child{flex:1}
.route-row.holding-row .right{display:grid;gap:3px;flex-basis:50%;max-width:50%;line-height:1.35}
.route-row.holding-row .price{font-size:18px;line-height:1.25;white-space:normal;overflow-wrap:normal}
.route-row.holding-row small{margin-top:0;line-height:1.35}
.route-row.holding-row .quote-session{white-space:nowrap}
.route-row.holding-row .daily{line-height:1.35}
.route-summary{height:auto;min-height:112px}

.route-header .route-record-trade{width:auto;min-width:104px;height:44px;font-size:13px;padding:8px;border-radius:8px;background:var(--green,#163f34);color:#fff;white-space:nowrap}.route-header h1{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.route-header .route-tools{display:flex;align-items:center;gap:8px;flex-shrink:0}.route-header .currency-control{font-size:0;display:block;margin:0}.route-header #route-currency{width:82px;min-height:44px;height:44px;font-size:13px;padding:4px;border-radius:8px}

/* Research Detail action menu, delete confirmation, deleted-link page (ADR-0065) */
.route-menu-wrap{position:relative;display:inline-flex}
.route-menu-button{min-width:44px;min-height:44px;border:0;background:transparent;color:inherit;font-size:22px;line-height:1;border-radius:10px;cursor:pointer}
.route-menu-button:focus-visible,.route-menu button:focus-visible{outline:2px solid var(--accent,#1d6b52);outline-offset:2px}
.route-menu{position:absolute;right:0;top:100%;z-index:30;display:flex;flex-direction:column;min-width:168px;padding:6px;background:var(--surface,#fff);border:1px solid var(--line,#d9e2dd);border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.14)}
.route-menu[hidden]{display:none}
.route-menu button{min-height:44px;padding:0 12px;border:0;background:transparent;color:inherit;font:inherit;text-align:left;border-radius:8px;cursor:pointer;white-space:nowrap}
.route-menu button.danger,.route-confirm .button.danger{color:#b3261e}
.route-confirm{width:min(92vw,360px);border:0;border-radius:16px;padding:20px;background:var(--surface,#fff);color:var(--text,#172d26)}
.route-confirm::backdrop{background:rgba(0,0,0,.45)}
.route-confirm h3{margin:0 0 8px;font-size:17px}.route-confirm p{margin:0 0 16px;line-height:1.5}
.route-confirm-error{color:#b3261e}
.route-confirm-actions{display:flex;justify-content:flex-end;gap:10px}
.route-confirm-actions .button{min-height:44px;min-width:84px}
.route-confirm .button.danger{background:#b3261e;border-color:#b3261e;color:#fff}
.route-deleted{padding:32px 16px;text-align:center}.route-deleted p{margin:0 0 16px;font-size:16px}

/* The per-page question box is retired; questions go through Research and the top-bar discussion list. */
.route-ui .discussion-panel{display:none !important}
