:root{color-scheme:dark;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#0b1120;color:#e8eef9;font-synthesis:none;text-rendering:optimizeLegibility}
*{box-sizing:border-box}
body{margin:0;padding-bottom:calc(82px + env(safe-area-inset-bottom));background:#0b1120}
[hidden]{display:none!important}
main{max-width:1250px;margin:0 auto;padding:34px 28px 28px}
header,.company{display:flex;justify-content:space-between;align-items:center;gap:20px}
header{margin-bottom:28px}
header small,.page-heading small,.scan-intro small{color:#91a0b8;letter-spacing:.13em;font-size:10px;font-weight:750}
h1{font-size:28px;margin:6px 0 0;letter-spacing:-.035em}
header>span{color:#91aaff;font-size:12px}
h2{font-size:26px;letter-spacing:-.035em;margin:6px 0 0}
h3{font-size:15px;margin:0}
p{line-height:1.55}
.page-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:6px 0 20px}
.page-heading .muted{font-size:11px;text-align:right}
.helper-text,.muted{color:#91a0b8;font-size:11px;line-height:1.6}
.helper-text{margin:9px 2px 21px}
form{display:flex;gap:9px;padding:16px;background:#141f32;border:1px solid #263650;border-radius:12px}
input,select,button{border:1px solid #30415d;background:#0d1728;color:#e8eef9;border-radius:8px;padding:12px;font:inherit}
input{flex:1;min-width:120px}
input:focus,select:focus,button:focus-visible{outline:2px solid #8aa5ff;outline-offset:2px}
input#ticker,input#quick-ticker{text-transform:uppercase}
button{background:#8aa5ff;color:#101a30;font-weight:700;cursor:pointer;transition:background .15s ease,border-color .15s ease,transform .15s ease}
button:active{transform:translateY(1px)}
button:disabled{opacity:.55;cursor:wait}
.secondary-button{background:#1a2942;color:#e8eef9;border-color:#405574}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.quick-search{display:flex;align-items:center;gap:10px;padding:9px 10px 9px 15px;border:1px solid #30415d;background:#141f32;border-radius:12px}
.quick-search input{padding:9px 0;border:0;background:transparent;outline:none!important;text-transform:none}
.quick-search button{padding:10px 16px}
.search-glyph{font-size:25px;color:#91a0b8;line-height:1}
.feed-section{margin:29px 0 0}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 13px}
.section-title p{margin:5px 0 0;color:#91a0b8;font-size:11px;line-height:1.45}
.live-dot{width:8px;height:8px;border-radius:50%;background:#39c99a;box-shadow:0 0 0 4px rgba(57,201,154,.12);flex:none}
.stock-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch}
.stock-card{width:100%;min-width:0;min-height:108px;display:grid;grid-template-columns:minmax(64px,.75fr) minmax(0,2fr) minmax(66px,.8fr);align-items:center;gap:9px;padding:12px 14px;text-align:left;background:#141f32;color:#e8eef9;border:1px solid #263650;border-radius:11px}
.stock-card:hover{background:#192840;border-color:#48618a}
.stock-card-left,.stock-card-middle,.stock-card-right{min-width:0}
.stock-card-left{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.stock-ticker{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px;line-height:1.15;font-weight:780;letter-spacing:.01em}
.stock-company{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#91a0b8;font-size:10px;line-height:1.25}
.stock-card-middle{display:flex;min-width:0;flex-direction:column;justify-content:center;gap:4px}
.stock-sparkline{display:block;width:100%;height:48px;overflow:visible}
.stock-sparkline path{fill:none;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.stock-history-line{stroke:#8aa5ff;stroke-width:1.8}
.stock-forecast-line{stroke-width:2;stroke-dasharray:4 3}
.stock-forecast-line.positive{stroke:#39c99a}
.stock-forecast-line.negative{stroke:#e88f8f}
.stock-chart-placeholder{height:48px;display:flex;align-items:center;justify-content:center;color:#71819a;font-size:9px;text-align:center}
.stock-analysis-meta{display:flex;min-width:0;align-items:center;gap:5px 11px;flex-wrap:wrap;line-height:1}
.stock-predicted,.stock-analysis-stat{display:inline-flex;align-items:baseline;gap:3px;white-space:nowrap}
.stock-predicted strong{font-size:10px;font-weight:750;font-variant-numeric:tabular-nums}
.stock-predicted small,.stock-analysis-stat small{font-size:8px;color:#91a0b8}
.stock-predicted.positive strong{color:#39c99a}
.stock-predicted.negative strong{color:#e88f8f}
.stock-analysis-stat strong{font-size:9px;font-weight:650;color:#c0cbe0;font-variant-numeric:tabular-nums}
.stock-card-right{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:5px;text-align:right;white-space:nowrap}
.stock-price{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;font-size:16px;font-weight:760;font-variant-numeric:tabular-nums}
.stock-daily-change{font-size:10px;font-weight:650;font-variant-numeric:tabular-nums}
.stock-daily-change.positive{color:#39c99a}
.stock-daily-change.negative{color:#e88f8f}
.compact-list{display:flex;flex-direction:column;gap:8px;border:0;border-radius:0;overflow:visible;background:transparent}
.empty-feed{padding:16px;color:#91a0b8;font-size:11px;line-height:1.6}
.disclaimer{margin:24px 0 10px;color:#8392aa;font-size:10px;line-height:1.6}
.company{padding:25px 4px 20px}
.company h2{margin-top:5px}
.company strong{font-size:26px;font-variant-numeric:tabular-nums}
.company>div:last-child{text-align:right}
.company>div:last-child p{font-size:12px;margin:5px 0;color:#91a0b8}
.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}
.card,article{background:#141f32;border:1px solid #263650;border-radius:11px;padding:18px}
.card small,.card strong{display:block}
.card small{font-size:11px;color:#91a0b8}
.card strong{font-size:20px;margin-top:9px;font-variant-numeric:tabular-nums}
article{margin:15px 0}
.chart{height:350px;width:100%}
.columns{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.row{display:flex;justify-content:space-between;border-bottom:1px solid #263650;padding:11px 0;font-size:12px;gap:15px}
.row span{color:#91a0b8;text-transform:capitalize}
.row strong{text-align:right;overflow-wrap:anywhere}
.backtest-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0 18px}
.backtest-summary>div{min-width:0;padding:13px;background:#101b2d;border:1px solid #263650;border-radius:9px}
.backtest-summary small,.backtest-summary strong{display:block}
.backtest-summary small{font-size:10px;color:#91a0b8;margin-bottom:6px}
.backtest-summary strong{font-size:14px;line-height:1.4;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;font-size:12px}
td,th{text-align:right;padding:12px;border-bottom:1px solid #263650}
td:first-child,th:first-child{text-align:left}
.scan-panel,.discover-intro{margin:18px 0;padding:20px;background:#141f32;border:1px solid #263650;border-radius:12px}
.discover-intro>p{margin:0 0 17px;color:#aab8ce;font-size:13px;max-width:780px}
.discover-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.discover-stats>div{padding:12px;background:#0f1a2c;border:1px solid #263650;border-radius:9px}
.discover-stats strong,.discover-stats span{display:block}
.discover-stats strong{font-size:19px;font-variant-numeric:tabular-nums}
.discover-stats span{font-size:10px;color:#91a0b8;margin-top:4px}
.source-control{display:flex;flex-direction:column;gap:7px;max-width:360px;margin:16px 0;color:#aab8ce;font-size:12px}
.source-control select{width:100%}
.scan-actions{display:flex;gap:10px;flex-wrap:wrap}
.scan-status,#scan-status{color:#a7b6cc;margin:16px 2px;font-size:12px}
.scan-meta{color:#91a0b8;font-size:11px;margin:18px 2px}
.job-progress{margin:15px 0;padding:14px 15px;background:#141f32;border:1px solid #263650;border-radius:10px}
.progress-track{height:8px;background:#263650;border-radius:99px;overflow:hidden}
.progress-fill{height:100%;width:0;background:#39c99a;border-radius:99px;transition:width .35s ease}
.progress-detail{display:flex;justify-content:space-between;gap:12px;margin-top:10px;font-size:12px}
.progress-detail span{color:#91a0b8;font-variant-numeric:tabular-nums}
.job-progress p{margin:7px 0 0}
.detail-top{display:flex;align-items:center;min-height:40px;margin:0 0 10px}
.back-button{display:inline-flex;align-items:center;gap:9px;background:transparent;color:#dce6f7;border:1px solid #30415d;padding:9px 13px;font-size:12px}
.back-button span{font-size:19px;line-height:12px}
.detail-mode #app-header{display:none}
.detail-mode main{padding-top:14px}
#detail-status{margin:10px 2px 18px;color:#a7b6cc;font-size:12px}
.bottom-nav{position:fixed;z-index:50;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:9px 14px calc(9px + env(safe-area-inset-bottom));background:rgba(11,17,32,.94);border-top:1px solid #263650;backdrop-filter:blur(16px)}
.nav-tab{display:flex;align-items:center;justify-content:center;gap:8px;background:transparent;color:#91a0b8;border:1px solid transparent;border-radius:9px;padding:9px 7px;font-size:12px;font-weight:650}
.nav-tab span{font-size:18px;line-height:1}
.nav-tab.active{background:#1a2942;color:#e8eef9;border-color:#30415d}
@media(min-width:900px){.stock-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.feed-section{margin-top:32px}}
@media(max-width:700px){
  main{padding:22px 14px 24px}
  header{margin-bottom:25px}
  h1{font-size:25px}
  header>span{max-width:135px;text-align:right;font-size:10px}
  .page-heading{margin-top:2px}
  .stock-grid{grid-template-columns:1fr;gap:8px}
  .stock-card{min-height:102px;grid-template-columns:minmax(58px,.72fr) minmax(0,2fr) minmax(68px,.82fr);gap:8px;padding:11px 12px}
  .stock-ticker{font-size:16px}
  .stock-price{font-size:15px}
  .stock-sparkline,.stock-chart-placeholder{height:44px}
  .stock-analysis-meta{gap:4px 8px}
  .stock-analysis-stat strong{font-size:8px}
  .stock-analysis-stat small,.stock-predicted small{font-size:7px}
  form#search{flex-wrap:wrap;padding:12px}
  form#search input{flex-basis:100%}
  form#search select{flex:1;min-width:0}
  form#search button{flex:1}
  .quick-search{gap:8px}
  .quick-search button{padding:9px 12px}
  .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .card{padding:14px}
  .card strong{font-size:18px}
  .columns{grid-template-columns:1fr}.backtest-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .chart{height:290px}
  .discover-intro,.scan-panel{padding:16px}
  .discover-stats{gap:7px}
  .discover-stats>div{padding:10px 8px}
  .discover-stats strong{font-size:16px}
  .discover-stats span{font-size:9px}
  .detail-mode main{padding:12px 14px 24px}
}
@media(max-width:380px){
  .stock-grid{grid-template-columns:1fr}
  .nav-tab{font-size:11px;gap:5px}
}


/* Square, horizontally swipeable stock-card shelves */
.stock-grid,
.compact-list,
#scan-list {
  display: flex;
  flex-flow: row nowrap;
  align-items: stretch;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 12px;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #405574 transparent;
}
.stock-grid > *,
.compact-list > *,
#scan-list > * {
  flex: 0 0 232px;
  min-width: 0;
  scroll-snap-align: start;
}
.stock-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 11px;
  width: 100%;
  min-height: 0;
  height: 224px;
  aspect-ratio: 1.04 / 1;
  padding: 15px;
  border-radius: 13px;
  text-align: left;
}
.stock-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.stock-card-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 4px;
}
.stock-ticker {
  font-size: 21px;
  line-height: 1.12;
}
.stock-company {
  font-size: 10px;
}
.stock-open-arrow {
  flex: none;
  color: #91a0b8;
  font-size: 19px;
  line-height: 1;
}
.stock-card-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}
.stock-price {
  font-size: 20px;
  line-height: 1.15;
}
.stock-daily-change {
  font-size: 11px;
}
.stock-card-chart {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
}
.stock-sparkline,
.stock-chart-placeholder {
  width: 100%;
  height: 76px;
  flex: none;
}
.stock-analysis-meta {
  min-height: 14px;
  gap: 5px 12px;
}
.stock-predicted strong {
  font-size: 11px;
}
.stock-analysis-stat strong {
  font-size: 10px;
}
.stock-predicted small,
.stock-analysis-stat small {
  font-size: 8px;
}
.compact-list {
  border: 0;
  border-radius: 0;
  background: transparent;
}
#scan-list {
  margin: 0 -2px;
}
@media (max-width: 700px) {
  .stock-grid,
  .compact-list,
  #scan-list {
    gap: 10px;
    padding-bottom: 11px;
  }
  .stock-grid > *,
  .compact-list > *,
  #scan-list > * {
    flex-basis: 218px;
  }
  .stock-card {
    height: 214px;
    padding: 14px;
    gap: 10px;
  }
  .stock-ticker { font-size: 20px; }
  .stock-price { font-size: 19px; }
  .stock-sparkline,
  .stock-chart-placeholder { height: 72px; }
}
@media (max-width: 380px) {
  .stock-grid > *,
  .compact-list > *,
  #scan-list > * { flex-basis: 208px; }
  .stock-card { height: 208px; }
}


/* Floating request queue: anchored above the bottom navigation and expands upward. */
.global-queue{position:fixed;right:20px;bottom:calc(76px + env(safe-area-inset-bottom));z-index:1000;width:max-content;font-family:inherit}
.global-queue-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:0 16px;color:#e8eef9;background:#192943;border:1px solid #405574;border-radius:999px;box-shadow:0 8px 26px #050a1499;font:inherit;font-size:12px;font-weight:650;cursor:pointer;-webkit-tap-highlight-color:transparent}
.global-queue-toggle:hover,.global-queue-toggle[aria-expanded="true"]{background:#223653;border-color:#617da7}
.global-queue-toggle:focus-visible{outline:2px solid #91b4ed;outline-offset:3px}
#global-queue-count{display:inline-grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:#304766;color:#e8eef9;font-size:10px;font-variant-numeric:tabular-nums}
#global-queue-count:empty{display:none}
.global-queue-popover{position:absolute;right:0;bottom:calc(100% + 10px);width:min(330px,calc(100vw - 28px));max-height:min(62vh,440px);overflow:auto;padding:10px 13px;background:#111c2e;border:1px solid #30415d;border-radius:12px;box-shadow:0 14px 38px #050a14c7}
.queue-popover-title{margin:1px 2px 7px;color:#aab8ce;font-size:10px;font-weight:700;letter-spacing:.04em}
.queue-job{all:unset;display:block;width:100%;padding:10px 2px;color:#e8eef9;border-top:1px solid #263650;cursor:pointer;box-sizing:border-box}
.queue-job:hover{color:#fff}
.queue-job:focus-visible{outline:1px solid #91b4ed;outline-offset:2px}
.queue-job-top{display:flex;justify-content:space-between;align-items:center;gap:10px}
.queue-job-top strong{font-size:11px;font-weight:650}
.queue-job-top small,.queue-stage{color:#91a0b8;font-size:9px}
.queue-track{display:block;height:3px;margin:7px 0 5px;overflow:hidden;background:#263650;border-radius:99px}
.queue-track>span{display:block;height:100%;background:#79a4e8;transition:width .3s ease}
.queue-stage{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.queue-empty{margin:9px 2px;color:#91a0b8;font-size:10px}
@media(max-width:700px){.global-queue{right:14px;bottom:calc(72px + env(safe-area-inset-bottom))}.global-queue-toggle{min-height:40px;padding:0 14px}.global-queue-popover{width:min(300px,calc(100vw - 20px));max-height:min(58vh,400px)}}
/* Stock autocomplete */
.autocomplete-wrap{position:relative;display:block;flex:1;min-width:0}
.autocomplete-wrap>input{width:100%;min-width:0}
.search-autocomplete-wrap{flex:1 1 360px}
.quick-search .autocomplete-wrap{flex:1;min-width:0}
.autocomplete-dropdown{position:absolute;z-index:120;top:calc(100% + 7px);left:0;right:0;max-height: min(390px,60vh);overflow-y:auto;padding:5px;background:#111c2e;border:1px solid #30415d;border-radius:10px;box-shadow:0 14px 36px #050a14b8}
.autocomplete-option{display:grid;grid-template-columns:70px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;gap:3px 10px;width:100%;padding:10px 11px;text-align:left;background:transparent;border:0;border-radius:6px;color:#e8eef9;cursor:pointer}
.autocomplete-option:hover,.autocomplete-option[aria-selected="true"]{background:#1a2942}
.autocomplete-symbol{grid-row:1 / span 2;font-size:12px;font-weight:750;letter-spacing:.02em}
.autocomplete-company{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:600}
.autocomplete-exchange{font-size:9px;color:#91a0b8}
.autocomplete-message{padding:12px;color:#91a0b8;font-size:11px}
.detail-top{justify-content:space-between;gap:12px}
.detail-rerun{margin-left:auto;white-space:nowrap}
@media(max-width:700px){
 .search-autocomplete-wrap{flex-basis:100%}
 .quick-search .autocomplete-dropdown{left:-30px;right:0}
 .autocomplete-option{padding:11px 9px}
}


/* Consistent top breathing room across every screen, including stock details. */
main,
.detail-mode main {
  padding-top: 30px !important;
}
.app-screen > .page-heading:first-child {
  margin-top: 0;
}
.global-queue {
  position: fixed !important;
  top: auto !important;
  left: auto !important;
  right: 14px !important;
  bottom: calc(66px + env(safe-area-inset-bottom)) !important;
  z-index: 1200 !important;
  width: max-content;
}
.global-queue-popover {
  top: auto !important;
  left: auto !important;
  right: 0 !important;
  bottom: calc(100% + 10px) !important;
  transform: none !important;
}
@media (min-width: 701px) {
  main,.detail-mode main { padding-top: 30px !important; }
}
@media (max-width: 700px) {
  main,.detail-mode main { padding-top: 24px !important; }
  .global-queue {
    right: 12px !important;
    bottom: calc(66px + env(safe-area-inset-bottom)) !important;
  }
}


/* Search tab uses the same compact autocomplete search control as Home. */
form#search.quick-search{display:flex;flex-wrap:nowrap;align-items:center;padding:9px 10px 9px 15px}
form#search.quick-search .autocomplete-wrap{flex:1;min-width:0}
form#search.quick-search input{width:100%;min-width:0;padding:9px 0;border:0;background:transparent;text-transform:none}
.detail-indexer-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:14px}
.detail-indexer-heading h3{margin:0}
.detail-indexer-heading p{margin:5px 0 0}
@media(max-width:700px){.detail-indexer-heading{align-items:flex-start;flex-direction:column}}


/* Hard-rerun menu */
.hard-rerun-wrap{position:relative;margin-left:auto}
.detail-rerun{margin-left:0;padding:8px 11px;font-size:11px;line-height:1.2}
.hard-rerun-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:80;width:min(310px,calc(100vw - 32px));padding:7px;background:#101b2d;border:1px solid #354967;border-radius:11px;box-shadow:0 14px 38px rgba(0,0,0,.38)}
.hard-rerun-menu>[data-rerun-custom]{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:4px;padding:10px 11px;background:transparent;color:#e8eef9;text-align:left;border:0;border-radius:7px}
.hard-rerun-menu>[data-rerun-custom]:hover{background:#1a2942}
.hard-rerun-menu small{color:#91a0b8;font-size:10px;font-weight:500}
.hard-rerun-custom{display:grid;gap:10px;padding:10px;border-top:1px solid #30415d}
.hard-rerun-custom label{display:grid;gap:5px;color:#b9c5d8;font-size:11px}
.hard-rerun-custom select{width:100%;padding:8px;background:#0d1728;color:#e8eef9;border:1px solid #30415d;border-radius:7px}
.hard-rerun-custom-actions{display:flex;justify-content:flex-end}
.hard-rerun-custom-actions button{padding:8px 11px;font-size:11px}
@media(max-width:700px){.hard-rerun-menu{right:0}.detail-rerun{padding:7px 9px}}


/* Watchlist */
.detail-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex-wrap:wrap}
.detail-actions .hard-rerun-wrap{margin-left:0}
.detail-watchlist{padding:8px 11px;font-size:11px;line-height:1.2;white-space:nowrap}
.detail-watchlist.watchlist-added{background:#173d36;color:#a7f0d2;border-color:#2c6a59}
.watchlist-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:14px;margin-top:16px;align-items:stretch}
.watch-card{min-width:0;position:relative;display:flex;flex-direction:column;gap:8px;padding:15px;background:#141f32;border:1px solid #2b3b55;border-radius:13px;transition:border-color .15s ease,background .15s ease}
.watch-card:hover{border-color:#48618a;background:#17243a}
.watch-card-open{display:flex;flex-direction:column;gap:14px;width:100%;padding:0;background:transparent;color:#e8eef9;border:0;text-align:left}
.watch-card-open:hover{background:transparent}
.watch-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;min-width:0}
.watch-card-head>span:first-child{display:flex;flex-direction:column;min-width:0;gap:4px}
.watch-card-ticker{font-size:19px;line-height:1.1;font-weight:800;letter-spacing:.01em}
.watch-card-company{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#91a0b8;font-size:11px}
.watch-card-price{display:flex;flex-direction:column;align-items:flex-end;white-space:nowrap;font-size:19px;font-weight:800;font-variant-numeric:tabular-nums}
.watch-card-daily{font-size:10px;font-weight:650}
.watch-card-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 8px;padding:13px 0;border-top:1px solid #2b3b55;border-bottom:1px solid #2b3b55}
.watch-card-stats>span{display:flex;flex-direction:column;gap:4px;min-width:0}
.watch-card-stats small{color:#91a0b8;font-size:9px;line-height:1.25}
.watch-card-stats strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:750;font-variant-numeric:tabular-nums}
.watch-card-footer{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;color:#91a0b8;font-size:9px;line-height:1.35}
.watch-card-footer span:last-child{text-align:right}
.watch-card-remove{align-self:flex-end;padding:5px 8px;background:transparent;color:#91a0b8;border:1px solid #344762;border-radius:6px;font-size:9px}
.watch-card-remove:hover{background:#2b2934;color:#f0b4b4;border-color:#80535b}
.watchlist-empty{grid-column:1/-1}
#watchlist-status{margin-top:5px;font-size:11px}
@media(max-width:700px){
  .detail-actions{gap:6px}
  .detail-watchlist{padding:7px 9px}
  .watchlist-grid{grid-template-columns:minmax(0,1fr);gap:10px}
  .watch-card{padding:13px}
  .watch-card-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .watch-card-footer{flex-direction:column;gap:3px}
  .watch-card-footer span:last-child{text-align:left}
}


/* Supabase account and email authentication */
.account-button{position:fixed;top:14px;right:18px;z-index:1001;max-width:min(220px,42vw);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:8px 13px;border:1px solid #405574;border-radius:999px;background:#192943;color:#e8eef9;box-shadow:0 6px 20px #050a1466;font-size:11px;font-weight:700}
.account-button.signed-in{background:#182d32;border-color:#38665d;color:#b7eadb}
.auth-modal{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:18px}
.auth-modal[hidden]{display:none}
.auth-backdrop{position:absolute;inset:0;background:#030812c9;backdrop-filter:blur(7px)}
.auth-dialog{position:relative;z-index:1;width:min(100%,420px);padding:30px;background:#111c2e;border:1px solid #344762;border-radius:17px;box-shadow:0 24px 80px #0009}
.auth-close{position:absolute;top:12px;right:12px;width:32px;height:32px;padding:0;background:transparent;color:#aab8ce;border:1px solid #344762;font-size:21px;line-height:1}
.auth-eyebrow{color:#91a0b8;letter-spacing:.14em;font-size:9px;font-weight:800}
.auth-dialog h2{margin:9px 0 5px;font-size:25px}
.auth-dialog .muted{margin:0 0 18px}
.auth-form{display:flex;flex-direction:column;gap:13px;padding:0;background:transparent;border:0}
.auth-form label{display:flex;flex-direction:column;gap:7px;color:#b8c5d9;font-size:11px;font-weight:650}
.auth-form input{width:100%;box-sizing:border-box;background:#0b1525}
.auth-form button{width:100%;margin-top:3px}
.auth-feedback{min-height:18px;margin:12px 0 4px;color:#a8c4f6;font-size:11px;line-height:1.5}
.auth-links{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.auth-links button{padding:5px 0;background:transparent;border:0;color:#9bb5ef;font-size:10px}
.auth-account-email{margin:10px 0;color:#dce6f7;font-size:13px;font-weight:700;overflow-wrap:anywhere}
#auth-signout{width:100%;margin-top:15px}
body.auth-open{overflow:hidden}
.bottom-nav{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:700px){
  .account-button{top:10px;right:12px;padding:7px 10px;font-size:10px}
  .auth-dialog{padding:25px 20px}
  .auth-links{flex-direction:column;align-items:flex-start}
}


/* Settings */
.settings-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.settings-card{display:flex;align-items:center;justify-content:space-between;gap:18px;min-width:0;padding:19px;background:#141f32;border:1px solid #2b3b55;border-radius:12px}
.settings-card-copy{min-width:0}
.settings-eyebrow{color:#91a0b8;font-size:9px;font-weight:800;letter-spacing:.13em}
.settings-card h3{margin:6px 0}
.settings-card p{margin:0}
.settings-account-card button,.settings-appearance-card button{flex:none}
.settings-information{grid-column:1/-1;display:grid;gap:10px;margin-top:3px}
.settings-disclosure{overflow:hidden;background:#141f32;border:1px solid #2b3b55;border-radius:11px}
.settings-disclosure>summary{position:relative;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 18px;color:#e8eef9;font-size:13px;font-weight:700;cursor:pointer;list-style:none}
.settings-disclosure>summary::-webkit-details-marker{display:none}
.settings-disclosure>summary::after{content:"＋";color:#91a0b8;font-size:17px;font-weight:400}
.settings-disclosure[open]>summary::after{content:"−"}
.settings-prose{max-width:880px;padding:0 18px 18px;color:#b9c5d8;font-size:11px;line-height:1.7}
.settings-prose p{margin:9px 0}
.settings-prose h4{margin:17px 0 5px;color:#e8eef9;font-size:11px}
.settings-prose ul{padding-left:19px}
.settings-prose li{margin:6px 0}
.settings-prose a,.settings-links a{color:#9bb5ef;text-decoration:none}
.settings-prose a:hover,.settings-links a:hover{text-decoration:underline}
.settings-updated{color:#91a0b8;font-size:10px}
.settings-links{display:flex;flex-wrap:wrap;gap:10px 20px;margin-top:15px}
.settings-links a{font-size:11px;font-weight:700}
.settings-account-card .signed-in{background:#182d32;border-color:#38665d;color:#b7eadb}

/* Watchlist cards: three-column research summary on the left, chart on the right. */
.watch-card-open{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(170px,.82fr);align-items:stretch;gap:19px}
.watch-card-info{display:flex;min-width:0;flex-direction:column;gap:12px}
.watch-card-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 12px;padding:12px 0}
.watch-card-chart{display:flex;min-width:0;min-height:112px;flex-direction:column;justify-content:center;gap:7px;padding:10px 0 8px 14px;border-left:1px solid #2b3b55}
.watch-card-chart .stock-sparkline{height:104px}
.watch-card-chart .stock-chart-placeholder{height:104px;display:flex;align-items:center;justify-content:center}
.watch-card-chart>small{color:#91a0b8;font-size:8px;line-height:1.3}
.watch-card-remove{margin-top:4px}

/* Light theme */
html[data-theme="light"]{color-scheme:light;background:#f4f6fa;color:#172235}
html[data-theme="light"] body{background:#f4f6fa;color:#172235}
html[data-theme="light"] .page-heading small,html[data-theme="light"] .settings-eyebrow,html[data-theme="light"] .helper-text,html[data-theme="light"] .muted,html[data-theme="light"] .section-title p,html[data-theme="light"] .settings-prose .settings-updated{color:#65738a}
html[data-theme="light"] .settings-card,html[data-theme="light"] .settings-disclosure,html[data-theme="light"] .watch-card,html[data-theme="light"] article,html[data-theme="light"] .card,html[data-theme="light"] .scan-panel,html[data-theme="light"] .discover-intro,html[data-theme="light"] .job-progress{background:#fff;color:#172235;border-color:#dce3ed;box-shadow:0 3px 14px #1b2b4210}
html[data-theme="light"] .watch-card:hover{background:#f9fbff;border-color:#aebed4}
html[data-theme="light"] .watch-card-open,html[data-theme="light"] .settings-disclosure>summary,html[data-theme="light"] .settings-prose h4{color:#172235}
html[data-theme="light"] .watch-card-company,html[data-theme="light"] .watch-card-footer,html[data-theme="light"] .watch-card-chart>small,html[data-theme="light"] .settings-prose{color:#65738a}
html[data-theme="light"] .watch-card-stats,html[data-theme="light"] .watch-card-chart{border-color:#e5eaf1}
html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] .quick-search,html[data-theme="light"] form,html[data-theme="light"] .source-control select{background:#fff;color:#172235;border-color:#d4dce7}
html[data-theme="light"] .quick-search input{background:transparent}
html[data-theme="light"] .secondary-button,html[data-theme="light"] .nav-tab{background:#edf1f7;color:#35445b;border-color:#d2dbe7}
html[data-theme="light"] .nav-tab.active{background:#dce7f8;color:#1c3557;border-color:#b8cbe7}
html[data-theme="light"] .bottom-nav{background:#ffffffed;border-color:#dce3ed}
html[data-theme="light"] .settings-disclosure>summary::after{color:#65738a}
html[data-theme="light"] .row,html[data-theme="light"] td,html[data-theme="light"] th{border-color:#e5eaf1}
html[data-theme="light"] .row span,html[data-theme="light"] .company>div:last-child p{color:#65738a}
html[data-theme="light"] .global-queue-toggle{background:#fff;color:#25334a;border-color:#d4dce7;box-shadow:0 6px 20px #24344b20}
html[data-theme="light"] .global-queue-popover{background:#fff;border-color:#d4dce7;box-shadow:0 14px 38px #24344b24}
html[data-theme="light"] .queue-job{color:#25334a;border-color:#e5eaf1}
html[data-theme="light"] .queue-job-top small,html[data-theme="light"] .queue-stage,html[data-theme="light"] .queue-empty{color:#65738a}
html[data-theme="light"] .queue-track{background:#e5eaf1}
html[data-theme="light"] .hard-rerun-menu,html[data-theme="light"] .autocomplete-dropdown{background:#fff;border-color:#d4dce7;box-shadow:0 14px 36px #24344b24}
html[data-theme="light"] .hard-rerun-menu>[data-rerun-indexer],html[data-theme="light"] .hard-rerun-menu>[data-rerun-custom],html[data-theme="light"] .autocomplete-option{color:#25334a}
html[data-theme="light"] .hard-rerun-menu>[data-rerun-indexer]:hover,html[data-theme="light"] .hard-rerun-menu>[data-rerun-custom]:hover,html[data-theme="light"] .autocomplete-option:hover,html[data-theme="light"] .autocomplete-option[aria-selected="true"]{background:#edf2f8}
html[data-theme="light"] .hard-rerun-menu small,html[data-theme="light"] .autocomplete-exchange,html[data-theme="light"] .autocomplete-message{color:#65738a}
html[data-theme="light"] .hard-rerun-custom{border-color:#e5eaf1}
html[data-theme="light"] .hard-rerun-custom select{background:#fff;color:#172235;border-color:#d4dce7}
html[data-theme="light"] .auth-dialog{background:#fff;color:#172235;border-color:#d4dce7;box-shadow:0 24px 80px #24344b30}
html[data-theme="light"] .auth-dialog h2,html[data-theme="light"] .auth-account-email{color:#172235}
html[data-theme="light"] .auth-form label{color:#35445b}
html[data-theme="light"] .auth-form input{background:#fff;color:#172235;border-color:#d4dce7}
html[data-theme="light"] .auth-prose,html[data-theme="light"] .auth-dialog .muted{color:#65738a}
html[data-theme="light"] .auth-close{color:#65738a;border-color:#d4dce7}
html[data-theme="light"] .settings-links a,html[data-theme="light"] .settings-prose a,html[data-theme="light"] .auth-links button{color:#315f9c}
@media(max-width:900px){
  .settings-layout{grid-template-columns:1fr}
  .settings-information{grid-column:auto}
  .watch-card-open{grid-template-columns:minmax(0,1.3fr) minmax(145px,.8fr);gap:13px}
}
@media(max-width:700px){
  .settings-card{align-items:flex-start;flex-direction:column;gap:12px;padding:16px}
  .settings-card button{width:100%}
  .watchlist-grid{grid-template-columns:minmax(0,1fr)}
  .watch-card{padding:12px}
  .watch-card-open{grid-template-columns:minmax(0,1.3fr) minmax(105px,.72fr);gap:9px}
  .watch-card-info{gap:9px}
  .watch-card-head{gap:7px}
  .watch-card-ticker{font-size:17px}
  .watch-card-price{font-size:16px}
  .watch-card-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px 6px;padding:9px 0}
  .watch-card-stats>span:nth-child(n+4){display:none}
  .watch-card-stats small{font-size:8px}
  .watch-card-stats strong{font-size:10px}
  .watch-card-footer{display:none}
  .watch-card-chart{min-height:70px;padding:4px 0 4px 8px}
  .watch-card-chart .stock-sparkline,.watch-card-chart .stock-chart-placeholder{height:58px}
}
@media(max-width:390px){
  .watch-card-open{grid-template-columns:minmax(0,1fr) 92px;gap:7px}
  .watch-card-chart .stock-sparkline,.watch-card-chart .stock-chart-placeholder{height:48px}
  .watch-card-chart>small{font-size:7px}
  .watch-card-stats strong{font-size:9px}
}


/* Five-tab navigation */
.bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:700px){
  .bottom-nav{
    gap:3px;
    padding:7px 8px calc(7px + env(safe-area-inset-bottom));
  }
  .nav-tab{
    flex-direction:column;
    gap:0;
    min-height:42px;
    padding:7px 2px;
    font-size:0;
    line-height:1;
  }
  .nav-tab span,
  .nav-tab .nav-tab-icon{
    display:grid;
    place-items:center;
    font-size:20px;
    line-height:1;
  }
  .nav-tab svg{width:20px;height:20px}
  .global-queue{
    right:12px!important;
    bottom:calc(74px + env(safe-area-inset-bottom))!important;
    z-index:1200!important;
  }
}


/* Watchlist: compact two-up desktop cards with a chart alongside the metrics. */
@media (min-width: 760px) {
  .watchlist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}
.watch-card {
  gap: 7px;
  padding: 12px;
}
.watch-card-open {
  grid-template-columns: minmax(0, 1.18fr) minmax(112px, .82fr);
  gap: 11px;
}
.watch-card-info {
  gap: 8px;
}
.watch-card-head {
  gap: 7px;
}
.watch-card-ticker {
  font-size: 16px;
}
.watch-card-company {
  font-size: 10px;
}
.watch-card-price {
  font-size: 16px;
}
.watch-card-daily {
  font-size: 9px;
}
.watch-card-stats {
  gap: 7px 8px;
  padding: 8px 0;
}
.watch-card-stats>span {
  gap: 3px;
}
.watch-card-stats small {
  font-size: 8px;
}
.watch-card-stats strong {
  font-size: 10px;
}
.watch-card-chart {
  min-height: 92px;
  gap: 5px;
  padding: 7px 0 6px 10px;
}
.watch-card-chart .stock-sparkline,
.watch-card-chart .stock-chart-placeholder {
  height: 84px;
}
.watch-card-footer {
  font-size: 8px;
}
.watch-card-remove {
  margin-top: 2px;
  padding: 4px 7px;
}
@media (max-width: 900px) and (min-width: 760px) {
  .watch-card-open {
    grid-template-columns: minmax(0, 1.12fr) minmax(96px, .78fr);
    gap: 8px;
  }
  .watch-card-chart { padding-left: 8px; }
}
@media (max-width: 700px) {
  .watchlist-grid { grid-template-columns: minmax(0, 1fr); }
  .watch-card { padding: 11px; }
  .watch-card-open { grid-template-columns: minmax(0, 1.25fr) minmax(94px, .75fr); gap: 8px; }
  .watch-card-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .watch-card-stats>span:nth-child(n+4) { display: none; }
  .watch-card-chart { min-height: 64px; padding: 3px 0 3px 7px; }
  .watch-card-chart .stock-sparkline,
  .watch-card-chart .stock-chart-placeholder { height: 54px; }
}
@media (max-width: 390px) {
  .watch-card-open { grid-template-columns: minmax(0, 1fr) 82px; }
  .watch-card-chart .stock-sparkline,
  .watch-card-chart .stock-chart-placeholder { height: 46px; }
}

/* Complete light palette: carry the selected theme through every app surface. */
html[data-theme="light"] body,
html[data-theme="light"] main {
  background: #f4f6fa !important;
  color: #172235 !important;
}
html[data-theme="light"] .stock-card,
html[data-theme="light"] .watch-card,
html[data-theme="light"] .card,
html[data-theme="light"] article,
html[data-theme="light"] .scan-panel,
html[data-theme="light"] .discover-intro,
html[data-theme="light"] .job-progress,
html[data-theme="light"] .settings-card,
html[data-theme="light"] .settings-link-card,
html[data-theme="light"] .account-settings-panel,
html[data-theme="light"] .account-signed-out-note,
html[data-theme="light"] .settings-disclosure,
html[data-theme="light"] .discover-stats>div,
html[data-theme="light"] .quick-search,
html[data-theme="light"] form:not(.auth-form),
html[data-theme="light"] .auth-dialog,
html[data-theme="light"] .autocomplete-dropdown,
html[data-theme="light"] .hard-rerun-menu {
  background: #ffffff !important;
  color: #172235 !important;
  border-color: #dce3ed !important;
  box-shadow: 0 3px 14px rgba(27,43,66,.06);
}
html[data-theme="light"] .stock-card:hover,
html[data-theme="light"] .watch-card:hover {
  background: #f8faff !important;
  border-color: #afc0d8 !important;
}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .hard-rerun-custom select {
  background: #ffffff !important;
  color: #172235 !important;
  border-color: #cdd7e5 !important;
}
html[data-theme="light"] .quick-search input {
  background: transparent !important;
  border-color: transparent !important;
}
html[data-theme="light"] .secondary-button,
html[data-theme="light"] .nav-tab,
html[data-theme="light"] .back-button {
  background: #edf1f7 !important;
  color: #35445b !important;
  border-color: #d2dbe7 !important;
}
html[data-theme="light"] .nav-tab.active {
  background: #dce7f8 !important;
  color: #1c3557 !important;
  border-color: #b8cbe7 !important;
}
html[data-theme="light"] .bottom-nav {
  background: rgba(255,255,255,.94) !important;
  border-color: #dce3ed !important;
}
html[data-theme="light"] .page-heading small,
html[data-theme="light"] header small,
html[data-theme="light"] .settings-eyebrow,
html[data-theme="light"] .helper-text,
html[data-theme="light"] .muted,
html[data-theme="light"] .section-title p,
html[data-theme="light"] .settings-prose,
html[data-theme="light"] .settings-updated,
html[data-theme="light"] .watch-card-company,
html[data-theme="light"] .watch-card-footer,
html[data-theme="light"] .watch-card-chart>small,
html[data-theme="light"] .stock-company,
html[data-theme="light"] .stock-card .stock-open-arrow,
html[data-theme="light"] .stock-predicted small,
html[data-theme="light"] .stock-analysis-stat small,
html[data-theme="light"] .card small,
html[data-theme="light"] .row span,
html[data-theme="light"] .company>div:last-child p,
html[data-theme="light"] .discover-stats span,
html[data-theme="light"] .source-control,
html[data-theme="light"] .scan-meta,
html[data-theme="light"] .progress-detail span,
html[data-theme="light"] .disclaimer,
html[data-theme="light"] .empty-feed,
html[data-theme="light"] .stock-chart-placeholder {
  color: #66758b !important;
}
html[data-theme="light"] .discover-intro>p,
html[data-theme="light"] .scan-status,
html[data-theme="light"] #scan-status,
html[data-theme="light"] #detail-status,
html[data-theme="light"] .source-control,
html[data-theme="light"] .hard-rerun-custom label,
html[data-theme="light"] .auth-form label,
html[data-theme="light"] .settings-prose h4,
html[data-theme="light"] .settings-disclosure>summary,
html[data-theme="light"] .account-facts dt,
html[data-theme="light"] .account-form label {
  color: #35445b !important;
}
html[data-theme="light"] .card strong,
html[data-theme="light"] .company,
html[data-theme="light"] .company h2,
html[data-theme="light"] .watch-card-open,
html[data-theme="light"] .watch-card-ticker,
html[data-theme="light"] .watch-card-price,
html[data-theme="light"] .watch-card-stats strong,
html[data-theme="light"] .stock-card,
html[data-theme="light"] .stock-ticker,
html[data-theme="light"] .stock-price,
html[data-theme="light"] .account-facts dd {
  color: #172235 !important;
}
html[data-theme="light"] .watch-card-stats,
html[data-theme="light"] .watch-card-chart,
html[data-theme="light"] .row,
html[data-theme="light"] td,
html[data-theme="light"] th,
html[data-theme="light"] .hard-rerun-custom {
  border-color: #e5eaf1 !important;
}
html[data-theme="light"] .progress-track,
html[data-theme="light"] .queue-track {
  background: #e5eaf1 !important;
}
html[data-theme="light"] .hard-rerun-menu>[data-rerun-indexer],
html[data-theme="light"] .hard-rerun-menu>[data-rerun-custom],
html[data-theme="light"] .autocomplete-option,
html[data-theme="light"] .queue-job {
  color: #25334a !important;
}
html[data-theme="light"] .hard-rerun-menu>[data-rerun-indexer]:hover,
html[data-theme="light"] .hard-rerun-menu>[data-rerun-custom]:hover,
html[data-theme="light"] .autocomplete-option:hover,
html[data-theme="light"] .autocomplete-option[aria-selected="true"] {
  background: #edf2f8 !important;
}
html[data-theme="light"] .hard-rerun-menu small,
html[data-theme="light"] .autocomplete-exchange,
html[data-theme="light"] .autocomplete-message {
  color: #65738a !important;
}
html[data-theme="light"] .watch-card-remove {
  color: #52627a !important;
  background: transparent !important;
  border-color: #d2dbe7 !important;
}
html[data-theme="light"] .watch-card-remove:hover {
  background: #fff1f1 !important;
  color: #a43d48 !important;
}
html[data-theme="light"] .settings-link-card strong,
html[data-theme="light"] .account-settings-panel h3,
html[data-theme="light"] .settings-card h3 {
  color: #172235 !important;
}
html[data-theme="light"] .settings-link-card small,
html[data-theme="light"] .account-settings-panel .muted {
  color: #65738a !important;
}
html[data-theme="light"] .danger-button {
  background: #fff0f0 !important;
  color: #9a3440 !important;
  border-color: #efc9cd !important;
}
html[data-theme="light"] .settings-links a,
html[data-theme="light"] .settings-prose a,
html[data-theme="light"] .auth-links button {
  color: #315f9c !important;
}

/* Account settings */
.account-settings-section{margin-top:30px}
.account-signed-out-note{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px;background:#141f32;border:1px solid #2b3b55;border-radius:12px}
.account-signed-out-note strong{font-size:13px}
.account-signed-out-note p{margin:4px 0 0}
.account-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.account-settings-panel{min-width:0;padding:17px;background:#141f32;border:1px solid #2b3b55;border-radius:12px}
.account-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.account-settings-panel h3{margin:6px 0 8px;font-size:14px}
.account-panel-heading h3{margin-bottom:0}
.compact-button{padding:6px 9px;font-size:10px}
.account-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px;margin:16px 0}
.account-facts>div{min-width:0}
.account-facts dt{margin-bottom:3px;color:#91a0b8;font-size:9px}
.account-facts dd{margin:0;overflow-wrap:anywhere;font-size:11px;font-weight:650}
.account-form{display:grid;gap:8px;margin-top:14px;padding:0;background:transparent;border:0}
.account-form label{color:#b9c5d8;font-size:10px;font-weight:650}
.account-form input{width:100%;min-width:0;padding:9px 10px;font-size:11px}
.account-form button,.account-action-stack button{padding:9px 11px;font-size:10px}
.account-form-row{display:flex;align-items:center;gap:8px}
.account-form-row input{flex:1}
.account-form-row button{flex:none}
.account-action-stack{display:flex;flex-direction:column;gap:8px;margin-top:16px}
.danger-button{background:#3c252c;color:#f0b8be;border-color:#74454c}
.account-settings-feedback{min-height:18px;margin:10px 2px 0;color:#8ab4f2;font-size:11px;line-height:1.5}
.account-settings-feedback.is-error{color:#e88f8f}
.settings-information{display:grid;gap:9px;margin-top:30px}
.settings-link-card{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 17px;background:#141f32;border:1px solid #2b3b55;border-radius:11px;color:#e8eef9;text-decoration:none;transition:border-color .15s ease,background .15s ease}
.settings-link-card:hover{background:#192840;border-color:#48618a;text-decoration:none}
.settings-link-card>span:first-child{display:flex;flex-direction:column;gap:4px;min-width:0}
.settings-link-card strong{font-size:12px}
.settings-link-card small{color:#91a0b8;font-size:10px}
.settings-link-card>span:last-child{color:#91a0b8;font-size:16px}
@media(max-width:900px){.account-settings-grid{grid-template-columns:1fr}}
@media(max-width:600px){
 .account-signed-out-note{align-items:flex-start;flex-direction:column}
 .account-signed-out-note button{width:100%}
 .account-form-row{align-items:stretch;flex-direction:column}
 .account-form-row button{width:100%}
 .account-facts{grid-template-columns:1fr 1fr;gap:10px}
}

html[data-theme="light"] .account-signed-out-note,
html[data-theme="light"] .account-settings-panel {
  background: #ffffff !important;
  color: #172235 !important;
  border-color: #dce3ed !important;
}
html[data-theme="light"] .account-settings-panel h3,
html[data-theme="light"] .account-facts dd { color: #172235 !important; }
html[data-theme="light"] .account-form label,
html[data-theme="light"] .account-facts dt { color: #52627a !important; }
html[data-theme="light"] .account-settings-feedback { color: #315f9c; }
html[data-theme="light"] .account-settings-feedback.is-error { color: #a43d48; }

/* Settings uses simple full-width rows rather than nested cards. */
.settings-list-section{margin:28px 0 0}
.settings-list-section>h3{margin:0 0 8px;font-size:12px;font-weight:750;color:var(--text-primary,#e8eef9)}
.settings-list-row{display:flex;align-items:center;justify-content:space-between;gap:18px;min-width:0;padding:13px 2px;border-bottom:1px solid var(--border,#29384e);background:transparent;color:inherit;text-decoration:none}
.settings-list-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.settings-list-copy strong{font-size:12px;font-weight:650}
.settings-list-copy small{font-size:10px;color:var(--muted,#91a0b8);line-height:1.45}
.settings-list-link:hover{background:transparent;text-decoration:none}
.settings-list-link:hover strong{color:var(--accent,#8aa5ff)}
.settings-list-link>span:last-child{color:var(--muted,#91a0b8);font-size:15px}
.settings-action-button{flex:0 0 auto;width:auto!important;min-height:30px;padding:6px 10px!important;border-radius:7px!important;font-size:10px!important;font-weight:650!important;line-height:1.2}
#settings-account-button,#theme-toggle{min-height:30px!important;padding:6px 10px!important;font-size:10px!important}
.account-settings-list{display:block}
.account-profile-row{display:block}
.account-profile-row>.account-facts{max-width:560px}
.account-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 22px;margin:14px 0}
.account-facts dt{font-size:9px;color:var(--muted,#91a0b8)}
.account-facts dd{font-size:11px;overflow-wrap:anywhere}
.account-form{display:flex;align-items:end;gap:8px;max-width:520px;margin-top:10px;padding:0;background:transparent;border:0}
.account-form label{display:grid;gap:5px;flex:1;font-size:10px}
.account-form input,.account-inline-form input{min-width:0;padding:7px 9px;font-size:10px}
.account-form-row{display:flex;flex:1;gap:8px}
.account-form-row input{flex:1}
.account-inline-form{display:flex;align-items:center;justify-content:flex-end;gap:7px;max-width:580px;margin:0;padding:0;background:transparent;border:0}
.account-inline-form input{width:170px}
.account-password-inline input{width:145px}
.settings-row-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}
.account-settings-feedback{margin:10px 0;color:var(--muted,#91a0b8);font-size:10px}
@media(max-width:700px){
 .settings-list-row{align-items:flex-start;flex-wrap:wrap;gap:9px;padding:12px 0}
 .settings-list-copy{flex:1 1 100%}
 .settings-action-button{margin-left:auto}
 .account-inline-form{width:100%;max-width:none;justify-content:flex-start;flex-wrap:wrap}
 .account-inline-form input{flex:1 1 150px;width:auto}
 .account-form{align-items:stretch;flex-direction:column}
 .account-form-row{width:100%}
 .account-form-row input{min-width:0}
 .settings-row-actions{width:100%;justify-content:flex-start}
}
@media(max-width:390px){.account-facts{grid-template-columns:1fr 1fr}.account-password-inline input{flex-basis:100%}}
/* Correct low-contrast blue action and selected-tab styling in light mode. */
html[data-theme="light"] .bottom-nav{background:#fff!important;border-color:#dce3ed!important}
html[data-theme="light"] .nav-tab{background:transparent!important;color:#58677e!important;border-color:transparent!important;box-shadow:none!important}
html[data-theme="light"] .nav-tab.active{background:#edf2f8!important;color:#243a58!important;border-color:#d8e1ed!important;box-shadow:none!important}
html[data-theme="light"] button:not(.danger-button):not(.watch-card-remove):not(.auth-close){background:#e9eef5;color:#27384f;border:1px solid #d3dce8;box-shadow:none}
html[data-theme="light"] button:hover:not(:disabled){filter:brightness(.98)}
html[data-theme="light"] .settings-action-button,html[data-theme="light"] #theme-toggle,html[data-theme="light"] #settings-account-button{background:#edf1f6!important;color:#35445b!important;border-color:#d5deea!important;box-shadow:none!important}
html[data-theme="light"] .settings-list-section>h3,html[data-theme="light"] .settings-list-copy strong{color:#172235}
html[data-theme="light"] .settings-list-copy small{color:#65738a}
html[data-theme="light"] .settings-list-row{border-color:#e1e7ef}
html[data-theme="light"] .settings-list-link:hover strong{color:#315f9c}
html[data-theme="light"] .danger-button{background:#fff0f0!important;color:#963b46!important;border-color:#eccbd0!important}

/* Keep hidden account states hidden despite the row layout declarations. */
.settings-list-row[hidden],.account-settings-list[hidden]{display:none!important}
html[data-theme="light"] button.nav-tab{background:transparent!important;color:#58677e!important;border-color:transparent!important}
html[data-theme="light"] button.nav-tab.active{background:#edf2f8!important;color:#243a58!important;border-color:#d8e1ed!important}

/* Roomier settings list with clearly separated categories and individual rows. */
.settings-list-section{margin:38px 0 0}
.settings-list-section>h3{margin:0 0 12px;padding-bottom:10px;border-bottom:1px solid var(--border,#29384e);font-size:13px;font-weight:750;letter-spacing:.01em}
.settings-subcategory{margin:20px 0 2px;padding:0 2px;color:var(--muted,#91a0b8);font-size:10px;font-weight:750;letter-spacing:.09em;text-transform:uppercase}
.settings-list-row{min-height:68px;align-items:center;gap:22px;padding:16px 12px;border-bottom:1px solid var(--border,#29384e);border-radius:7px}
.settings-list-row:hover{background:rgba(130,150,180,.045)}
.settings-list-copy{gap:6px;flex:1 1 260px}
.settings-list-copy strong{font-size:13px}
.settings-list-copy small{font-size:11px;line-height:1.5;max-width:560px}
.settings-list-link>span:last-child{font-size:10px;white-space:nowrap}
.settings-action-button{min-height:34px!important;padding:8px 13px!important;font-size:11px!important}
#settings-account-button,#theme-toggle{min-height:34px!important;padding:8px 13px!important;font-size:11px!important}
.account-profile-row{padding:18px 12px;display:block}
.account-profile-row>.settings-list-copy{display:flex}
.account-facts{max-width:620px;gap:14px 34px;margin:18px 0}
.account-facts dt{font-size:10px}
.account-facts dd{font-size:12px}
.account-form{max-width:560px;margin-top:16px;gap:10px}
.account-form label{font-size:11px}
.account-form input,.account-inline-form input{padding:9px 11px;font-size:11px}
.account-inline-form{gap:9px;flex-wrap:wrap}
.account-inline-form input{width:190px}
.account-password-inline input{width:170px}
.settings-row-actions{gap:9px}
.account-settings-feedback{font-size:11px;margin:12px 12px}
html[data-theme="light"] .settings-list-section>h3{border-color:#dce3ed;color:#172235}
html[data-theme="light"] .settings-subcategory{color:#66758b}
html[data-theme="light"] .settings-list-row{border-color:#e1e7ef}
html[data-theme="light"] .settings-list-row:hover{background:#f8faff}
@media(max-width:700px){
 .settings-list-section{margin-top:30px}
 .settings-list-row{min-height:unset;padding:15px 8px;gap:12px}
 .settings-list-copy{flex:1 1 100%}
 .settings-action-button{margin-left:0}
 .account-inline-form{width:100%;justify-content:flex-start}
 .account-inline-form input{flex:1 1 180px;width:auto}
 .settings-row-actions{width:100%;justify-content:flex-start}
}


/* Settings: match Home's section rhythm; settings controls are rows, never cards. */
#settings-screen .settings-group{margin-top:30px}
#settings-screen .settings-group .section-title{margin-bottom:9px}
#settings-screen .settings-group .section-title h3{font-size:15px;font-weight:750}
#settings-screen .settings-group .section-title p{font-size:11px}
#settings-screen .settings-row{
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  min-width:0;min-height:62px;padding:13px 2px;
  border:0;border-bottom:1px solid #29384e;border-radius:0;
  background:transparent;color:inherit;text-decoration:none;
}
#settings-screen .settings-row:hover{background:transparent}
#settings-screen .settings-row-copy{display:flex;flex:1 1 260px;min-width:0;flex-direction:column;gap:5px}
#settings-screen .settings-row-copy strong{font-size:12px;font-weight:700}
#settings-screen .settings-row-copy small{max-width:560px;color:#91a0b8;font-size:10px;line-height:1.5}
#settings-screen .settings-row-trailing{flex:none;color:#91a0b8;font-size:10px;white-space:nowrap}
#settings-screen .settings-row-link:hover .settings-row-copy strong{color:#a8baff}
#settings-screen .settings-action-button{
  flex:none;width:auto!important;min-height:32px!important;padding:7px 11px!important;
  border-radius:7px!important;font-size:10px!important;line-height:1.2;
}
#settings-screen .settings-account-controls[hidden],
#settings-screen #account-signed-out-note[hidden]{display:none!important}
#settings-screen .settings-subheading{
  margin:22px 0 0;padding:0 2px 7px;border-bottom:1px solid #29384e;
  color:#91a0b8;font-size:10px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;
}
#settings-screen .settings-profile-row{border-bottom:0}
#settings-screen .account-facts{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 28px;
  max-width:620px;margin:7px 0 15px;padding:0 2px;
}
#settings-screen .account-facts dt{margin-bottom:4px;color:#91a0b8;font-size:9px}
#settings-screen .account-facts dd{margin:0;color:#e8eef9;font-size:11px;font-weight:650;overflow-wrap:anywhere}
#settings-screen .account-form{
  display:flex;align-items:end;gap:9px;max-width:540px;margin:8px 0 17px;padding:0;
  border:0;border-radius:0;background:transparent;
}
#settings-screen .account-form label{display:flex;flex:1;flex-direction:column;gap:5px;color:#b9c5d8;font-size:10px}
#settings-screen .account-form input,
#settings-screen .account-inline-form input{
  min-width:0;padding:8px 10px;font-size:10px;
}
#settings-screen .account-form>input{flex:1}
#settings-screen .account-inline-form{
  display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:0 1 560px;
  min-width:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;
}
#settings-screen .account-inline-form input{width:175px}
#settings-screen .account-password-inline input{width:150px}
#settings-screen .settings-row-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
#settings-screen .account-settings-feedback{min-height:16px;margin:8px 0;color:#91a0b8;font-size:10px}
#settings-screen .account-settings-feedback.is-error{color:#e88f8f}
html[data-theme="light"] #settings-screen .settings-row{border-color:#e1e7ef;background:transparent;color:#172235}
html[data-theme="light"] #settings-screen .settings-row-copy strong{color:#172235}
html[data-theme="light"] #settings-screen .settings-row-copy small,
html[data-theme="light"] #settings-screen .settings-row-trailing,
html[data-theme="light"] #settings-screen .settings-subheading{color:#66758b}
html[data-theme="light"] #settings-screen .settings-subheading{border-color:#dce3ed}
html[data-theme="light"] #settings-screen .account-facts dd{color:#172235}
html[data-theme="light"] #settings-screen .account-facts dt,
html[data-theme="light"] #settings-screen .account-form label{color:#52627a}
html[data-theme="light"] #settings-screen .settings-action-button{background:#edf1f6!important;color:#35445b!important;border:1px solid #d5deea!important;box-shadow:none!important}
html[data-theme="light"] #settings-screen .settings-action-button.danger-button{background:#fff0f0!important;color:#963b46!important;border-color:#eccbd0!important}
@media(max-width:700px){
  #settings-screen .settings-row{align-items:flex-start;flex-wrap:wrap;gap:9px;padding:13px 0}
  #settings-screen .settings-row-copy{flex:1 1 100%}
  #settings-screen .settings-row-actions{justify-content:flex-start;width:100%}
  #settings-screen .account-inline-form{flex:1 1 100%;justify-content:flex-start;flex-wrap:wrap}
  #settings-screen .account-inline-form input{flex:1 1 145px;width:auto}
  #settings-screen .account-form{align-items:stretch;flex-direction:column}
  #settings-screen .account-form>input{width:100%}
  #settings-screen .account-form>button{align-self:flex-start}
  #settings-screen .settings-action-button{margin-left:0}
}
@media(max-width:390px){
  #settings-screen .account-facts{grid-template-columns:1fr 1fr;gap:10px 14px}
}


/* Settings page layout rebuilt around Home's generous section spacing and alignment. */
#settings-screen .settings-home-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  column-gap:48px;row-gap:0;align-items:start;
}
#settings-screen .settings-group{min-width:0;margin:30px 0 0}
#settings-screen .settings-account-group{grid-column:1/-1;margin-top:0}
#settings-screen .section-title{align-items:flex-start;margin:0 0 15px}
#settings-screen .section-title h3{font-size:15px;line-height:1.3;font-weight:750}
#settings-screen .section-title p{margin:5px 0 0;font-size:11px;line-height:1.55}
#settings-screen .settings-row{
  display:flex;align-items:center;justify-content:space-between;gap:24px;
  min-width:0;min-height:76px;padding:17px 4px;
  border:0;border-bottom:1px solid #29384e;border-radius:0;
  background:transparent;color:inherit;text-decoration:none;
}
#settings-screen .settings-row:first-of-type{border-top:1px solid #29384e}
#settings-screen .settings-row:hover{background:transparent}
#settings-screen .settings-row-copy{
  display:flex;flex:1 1 auto;min-width:0;flex-direction:column;gap:6px;
}
#settings-screen .settings-row-copy strong{font-size:13px;line-height:1.35;font-weight:700}
#settings-screen .settings-row-copy small{
  display:block;max-width:600px;color:#91a0b8;font-size:11px;line-height:1.55;
  overflow-wrap:anywhere;
}
#settings-screen .settings-row-trailing{flex:none;padding-left:12px;color:#91a0b8;font-size:11px;white-space:nowrap}
#settings-screen .settings-row-link:hover .settings-row-copy strong{color:#a8baff}
#settings-screen .settings-action-button{
  flex:0 0 auto;width:auto!important;min-height:36px!important;padding:8px 14px!important;
  border-radius:8px!important;font-size:11px!important;line-height:1.25;white-space:nowrap;
}
#settings-screen .settings-account-details{margin-top:14px;border-bottom:1px solid #29384e}
#settings-screen .settings-account-details>summary{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  min-height:58px;padding:13px 4px;color:#e8eef9;font-size:12px;font-weight:700;
  cursor:pointer;list-style:none;border-top:1px solid #29384e;
}
#settings-screen .settings-account-details>summary::-webkit-details-marker{display:none}
#settings-screen .settings-account-details>summary:after{content:"＋";margin-left:auto;color:#91a0b8;font-size:17px;font-weight:400}
#settings-screen .settings-account-details[open]>summary:after{content:"−"}
#settings-screen .settings-account-details>summary span{margin-left:auto;color:#91a0b8;font-size:10px;font-weight:500}
#settings-screen .settings-account-controls[hidden]{display:none!important}
#settings-screen .settings-subheading{
  margin:25px 0 5px;padding:0 4px 9px;border-bottom:1px solid #29384e;
  color:#91a0b8;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;
}
#settings-screen .settings-profile-row{border-top:0!important}
#settings-screen .account-facts{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 28px;
  max-width:100%;margin:16px 4px 22px;padding:0;
}
#settings-screen .account-facts>div{min-width:0}
#settings-screen .account-facts dt{margin-bottom:6px;color:#91a0b8;font-size:10px}
#settings-screen .account-facts dd{margin:0;color:#e8eef9;font-size:12px;font-weight:650;line-height:1.5;overflow-wrap:anywhere}
#settings-screen .account-form{
  display:grid;grid-template-columns:170px minmax(180px,360px) auto;
  align-items:center;gap:12px;max-width:none;margin:0;padding:16px 4px;
  border:0;border-top:1px solid #29384e;border-bottom:1px solid #29384e;
  border-radius:0;background:transparent;
}
#settings-screen .account-form label{color:#e8eef9;font-size:12px;font-weight:650}
#settings-screen .account-form input,
#settings-screen .account-inline-form input{
  width:100%;min-width:0;min-height:38px;padding:9px 11px;font-size:11px;
}
#settings-screen .account-form>input{grid-column:2}
#settings-screen .account-form>button{grid-column:3}
#settings-screen .settings-form-row{align-items:center}
#settings-screen .account-inline-form{
  display:flex;flex:0 1 560px;min-width:0;align-items:center;justify-content:flex-end;
  gap:10px;margin:0;padding:0;border:0;border-radius:0;background:transparent;
}
#settings-screen .account-inline-form input{flex:1 1 170px;width:auto;max-width:230px}
#settings-screen .account-password-inline input{max-width:180px}
#settings-screen .settings-row-actions{display:flex;flex:0 1 auto;flex-wrap:wrap;justify-content:flex-end;gap:10px}
#settings-screen .account-settings-feedback{min-height:18px;margin:10px 4px;color:#91a0b8;font-size:11px;line-height:1.5}
#settings-screen .account-settings-feedback.is-error{color:#e88f8f}
html[data-theme="light"] #settings-screen .settings-row{border-color:#e1e7ef;background:transparent;color:#172235}
html[data-theme="light"] #settings-screen .settings-row-copy strong,
html[data-theme="light"] #settings-screen .settings-account-details>summary,
html[data-theme="light"] #settings-screen .account-form label{color:#172235}
html[data-theme="light"] #settings-screen .settings-row-copy small,
html[data-theme="light"] #settings-screen .settings-row-trailing,
html[data-theme="light"] #settings-screen .settings-account-details>summary span,
html[data-theme="light"] #settings-screen .settings-account-details>summary:after,
html[data-theme="light"] #settings-screen .settings-subheading,
html[data-theme="light"] #settings-screen .account-facts dt{color:#66758b}
html[data-theme="light"] #settings-screen .settings-account-details,
html[data-theme="light"] #settings-screen .settings-account-details>summary,
html[data-theme="light"] #settings-screen .settings-subheading,
html[data-theme="light"] #settings-screen .account-form{border-color:#dce3ed}
html[data-theme="light"] #settings-screen .account-facts dd{color:#172235}
html[data-theme="light"] #settings-screen .settings-action-button{background:#edf1f6!important;color:#35445b!important;border:1px solid #d5deea!important;box-shadow:none!important}
html[data-theme="light"] #settings-screen .settings-action-button.danger-button{background:#fff0f0!important;color:#963b46!important;border-color:#eccbd0!important}
@media(max-width:900px){
  #settings-screen .settings-home-grid{column-gap:30px}
  #settings-screen .account-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
  #settings-screen .settings-form-row{align-items:flex-start;flex-direction:column}
  #settings-screen .account-inline-form{width:100%;max-width:none;justify-content:flex-start}
}
@media(max-width:700px){
  #settings-screen .settings-home-grid{grid-template-columns:minmax(0,1fr);column-gap:0}
  #settings-screen .settings-account-group{grid-column:auto}
  #settings-screen .settings-group{margin-top:28px}
  #settings-screen .settings-account-group{margin-top:0}
  #settings-screen .settings-row{align-items:flex-start;flex-wrap:wrap;gap:12px;padding:16px 2px}
  #settings-screen .settings-row-copy{flex:1 1 100%}
  #settings-screen .settings-action-button{margin:0}
  #settings-screen .settings-row-actions{width:100%;justify-content:flex-start}
  #settings-screen .settings-account-details>summary{flex-wrap:wrap}
  #settings-screen .settings-account-details>summary span{margin-left:0}
  #settings-screen .account-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
  #settings-screen .account-form{grid-template-columns:minmax(0,1fr);gap:9px}
  #settings-screen .account-form>input,#settings-screen .account-form>button{grid-column:1}
  #settings-screen .account-form>button{justify-self:start}
  #settings-screen .account-inline-form{flex-wrap:wrap}
  #settings-screen .account-inline-form input{flex:1 1 180px;max-width:none}
  #settings-screen .settings-row-trailing{padding-left:0}
}

#settings-screen .settings-account-details:has(#account-controls[hidden]){display:none}
@media(max-width:700px){
  #settings-screen .settings-account-details>summary span{flex:1 1 100%}
}


/* Settings rebuild: isolated layout with generous, independent spacing. */
#settings-screen .settings-v2-intro{
  max-width:780px;margin:0 0 30px 2px;color:#91a0b8;
  font-size:12px;line-height:1.7;
}
#settings-screen .settings-v2-layout{
  display:flex;flex-direction:column;gap:42px;
  width:100%;max-width:1040px;padding:0 0 28px;
}
#settings-screen .settings-v2-section{
  min-width:0;margin:0;padding:0 0 8px;
  border-bottom:1px solid #29384e;
}
#settings-screen .settings-v2-heading{
  display:flex;align-items:flex-start;justify-content:space-between;
  gap:20px;margin:0 0 16px;padding:0 2px;
}
#settings-screen .settings-v2-heading h3{
  margin:0;font-size:16px;line-height:1.35;font-weight:760;letter-spacing:-.01em;
}
#settings-screen .settings-v2-heading p{
  margin:6px 0 0;color:#91a0b8;font-size:11px;line-height:1.6;
}
#settings-screen .settings-v2-row{
  display:grid;grid-template-columns:46px minmax(0,1fr) auto;
  align-items:center;gap:17px;min-width:0;min-height:82px;
  margin:0;padding:17px 14px;border:0;border-top:1px solid #29384e;
  border-radius:0;background:transparent;color:inherit;text-decoration:none;
  transition:background .15s ease;
}
#settings-screen .settings-v2-row:last-child{border-bottom:0}
#settings-screen .settings-v2-row:hover,
#settings-screen .settings-v2-link:hover{background:rgba(130,150,180,.055)}
#settings-screen .settings-v2-icon{
  display:grid;place-items:center;align-self:center;
  width:44px;height:44px;padding:10px;flex:none;
  border:1px solid #33445f;border-radius:11px;
  background:#17243a;color:#a9bdf0;font-size:18px;line-height:1;
}
#settings-screen .settings-v2-icon-text{font-size:12px;font-weight:850;letter-spacing:-.04em}
#settings-screen .settings-v2-copy{
  display:flex;flex-direction:column;justify-content:center;
  min-width:0;gap:6px;
}
#settings-screen .settings-v2-copy strong{
  color:#e8eef9;font-size:13px;line-height:1.4;font-weight:720;
}
#settings-screen .settings-v2-copy small{
  display:block;max-width:620px;color:#91a0b8;
  font-size:11px;line-height:1.6;overflow-wrap:anywhere;
}
#settings-screen .settings-v2-button{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:118px;min-height:42px;width:auto!important;
  margin:0;padding:10px 16px!important;border-radius:8px!important;
  font-size:11px!important;line-height:1.35;font-weight:700;
  white-space:normal;text-align:center;
}
#settings-screen .settings-v2-trailing{
  display:inline-flex;align-items:center;gap:10px;
  padding:9px 5px 9px 14px;color:#91a0b8;
  font-size:11px;font-weight:650;white-space:nowrap;
}
#settings-screen .settings-v2-trailing span{
  display:grid;place-items:center;width:30px;height:30px;
  padding:6px;border:1px solid #33445f;border-radius:8px;
  color:#a9bdf0;font-size:15px;
}
#settings-screen .settings-v2-details{
  margin:12px 0 0;border-bottom:1px solid #29384e;
}
#settings-screen .settings-v2-details>summary{
  display:grid;grid-template-columns:46px minmax(0,1fr) 34px;
  align-items:center;gap:17px;min-height:82px;padding:16px 14px;
  border-top:1px solid #29384e;list-style:none;cursor:pointer;
}
#settings-screen .settings-v2-details>summary::-webkit-details-marker{display:none}
#settings-screen .settings-v2-chevron{
  display:grid;place-items:center;width:32px;height:32px;padding:5px;
  border:1px solid #33445f;border-radius:8px;color:#a9bdf0;font-size:17px;
}
#settings-screen .settings-v2-details[open] .settings-v2-chevron{font-size:0}
#settings-screen .settings-v2-details[open] .settings-v2-chevron:before{content:"−";font-size:18px}
#settings-screen .settings-v2-account-controls{padding:6px 0 18px 63px}
#settings-screen .settings-v2-account-controls[hidden]{display:none!important}
#settings-screen .settings-v2-details:has(#account-controls[hidden]){display:none}
#settings-screen .settings-v2-subheading{
  margin:25px 0 5px;padding:0 14px 10px;
  border-bottom:1px solid #29384e;color:#91a0b8;
  font-size:10px;font-weight:820;letter-spacing:.11em;text-transform:uppercase;
}
#settings-screen .settings-v2-facts{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;margin:12px 0;padding:7px 0;border-bottom:1px solid #29384e;
}
#settings-screen .settings-v2-facts>div{
  min-width:0;padding:10px 16px;border-left:1px solid #29384e;
}
#settings-screen .settings-v2-facts>div:first-child{border-left:0}
#settings-screen .settings-v2-facts dt{
  margin:0 0 7px;color:#91a0b8;font-size:10px;line-height:1.4;
}
#settings-screen .settings-v2-facts dd{
  margin:0;color:#e8eef9;font-size:12px;font-weight:680;
  line-height:1.55;overflow-wrap:anywhere;
}
#settings-screen .settings-v2-profile-form{
  display:grid;grid-template-columns:150px minmax(180px,360px) auto;
  align-items:center;gap:13px;margin:0;padding:17px 14px;
  border:0;border-bottom:1px solid #29384e;border-radius:0;background:transparent;
}
#settings-screen .settings-v2-profile-form label{
  color:#c1cadd;font-size:11px;font-weight:680;line-height:1.5;
}
#settings-screen .settings-v2-profile-form input,
#settings-screen .settings-v2-form input{
  min-width:0;width:100%;min-height:42px;padding:10px 12px;
  border:1px solid #33445f;border-radius:8px;background:#0d1728;
  color:#e8eef9;font-size:11px;line-height:1.4;
}
#settings-screen .settings-v2-profile-form button{justify-self:start}
#settings-screen .settings-v2-control-row{
  display:grid;grid-template-columns:46px minmax(190px,.72fr) minmax(320px,1.28fr);
  align-items:center;gap:17px;min-width:0;min-height:96px;
  margin:0;padding:18px 14px;border-top:1px solid #29384e;
}
#settings-screen .settings-v2-form{
  display:flex;align-items:center;justify-content:flex-end;
  flex-wrap:wrap;gap:10px;min-width:0;margin:0;padding:0;
  border:0;border-radius:0;background:transparent;
}
#settings-screen .settings-v2-form input{flex:1 1 170px;max-width:260px}
#settings-screen .settings-v2-password-form input{flex:1 1 145px;max-width:205px}
#settings-screen .settings-v2-actions{
  display:flex;align-items:center;justify-content:flex-end;
  flex-wrap:wrap;gap:10px;min-width:0;
}
#settings-screen .settings-v2-feedback{
  min-height:18px;margin:12px 14px 0;color:#91a0b8;
  font-size:11px;line-height:1.55;
}
#settings-screen .settings-v2-feedback.is-error{color:#e88f8f}
html[data-theme="light"] #settings-screen .settings-v2-section,
html[data-theme="light"] #settings-screen .settings-v2-row,
html[data-theme="light"] #settings-screen .settings-v2-details,
html[data-theme="light"] #settings-screen .settings-v2-details>summary,
html[data-theme="light"] #settings-screen .settings-v2-subheading,
html[data-theme="light"] #settings-screen .settings-v2-facts,
html[data-theme="light"] #settings-screen .settings-v2-facts>div,
html[data-theme="light"] #settings-screen .settings-v2-profile-form,
html[data-theme="light"] #settings-screen .settings-v2-control-row{border-color:#dce3ed}
html[data-theme="light"] #settings-screen .settings-v2-heading p,
html[data-theme="light"] #settings-screen .settings-v2-copy small,
html[data-theme="light"] #settings-screen .settings-v2-trailing,
html[data-theme="light"] #settings-screen .settings-v2-facts dt,
html[data-theme="light"] #settings-screen .settings-v2-subheading,
html[data-theme="light"] #settings-screen .settings-v2-feedback{color:#66758b}
html[data-theme="light"] #settings-screen .settings-v2-heading h3,
html[data-theme="light"] #settings-screen .settings-v2-copy strong,
html[data-theme="light"] #settings-screen .settings-v2-profile-form label,
html[data-theme="light"] #settings-screen .settings-v2-facts dd{color:#172235}
html[data-theme="light"] #settings-screen .settings-v2-icon{
  background:#edf2f8;border-color:#d8e1ed;color:#315f9c;
}
html[data-theme="light"] #settings-screen .settings-v2-trailing span,
html[data-theme="light"] #settings-screen .settings-v2-chevron{
  background:#f5f7fa;border-color:#dce3ed;color:#526782;
}
html[data-theme="light"] #settings-screen .settings-v2-button{
  background:#edf1f6!important;color:#35445b!important;
  border:1px solid #d5deea!important;box-shadow:none!important;
}
html[data-theme="light"] #settings-screen .settings-v2-button.danger-button{
  background:#fff0f0!important;color:#963b46!important;border-color:#eccbd0!important;
}
html[data-theme="light"] #settings-screen .settings-v2-profile-form input,
html[data-theme="light"] #settings-screen .settings-v2-form input{
  background:#fff;color:#172235;border-color:#d4dce7;
}
@media(max-width:980px){
  #settings-screen .settings-v2-account-controls{padding-left:0}
  #settings-screen .settings-v2-control-row{
    grid-template-columns:46px minmax(0,1fr);align-items:start;
  }
  #settings-screen .settings-v2-control-row>.settings-v2-form,
  #settings-screen .settings-v2-control-row>.settings-v2-actions{
    grid-column:2;justify-content:flex-start;width:100%;
  }
  #settings-screen .settings-v2-form input{max-width:none}
}
@media(max-width:700px){
  #settings-screen .settings-v2-intro{margin-bottom:24px}
  #settings-screen .settings-v2-layout{gap:34px}
  #settings-screen .settings-v2-heading{margin-bottom:12px}
  #settings-screen .settings-v2-row{
    grid-template-columns:42px minmax(0,1fr);gap:13px;
    min-height:76px;padding:15px 9px;
  }
  #settings-screen .settings-v2-icon{width:40px;height:40px;padding:9px}
  #settings-screen .settings-v2-row>.settings-v2-button{
    grid-column:2;justify-self:start;margin-top:2px;
  }
  #settings-screen .settings-v2-link .settings-v2-trailing{
    grid-column:2;justify-self:start;margin-top:-2px;padding:0;
  }
  #settings-screen .settings-v2-details>summary{
    grid-template-columns:42px minmax(0,1fr) 32px;
    gap:13px;min-height:76px;padding:14px 9px;
  }
  #settings-screen .settings-v2-details>summary .settings-v2-icon{
    width:40px;height:40px;
  }
  #settings-screen .settings-v2-account-controls{padding:2px 0 12px}
  #settings-screen .settings-v2-subheading{margin-top:22px;padding-left:8px}
  #settings-screen .settings-v2-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
  #settings-screen .settings-v2-facts>div{padding:12px 10px}
  #settings-screen .settings-v2-facts>div:nth-child(odd){border-left:0}
  #settings-screen .settings-v2-profile-form{
    grid-template-columns:minmax(0,1fr);gap:9px;padding:16px 9px;
  }
  #settings-screen .settings-v2-profile-form input{width:100%}
  #settings-screen .settings-v2-profile-form button{justify-self:start}
  #settings-screen .settings-v2-control-row{
    grid-template-columns:42px minmax(0,1fr);gap:13px;min-height:0;padding:16px 9px;
  }
  #settings-screen .settings-v2-control-row>.settings-v2-form,
  #settings-screen .settings-v2-control-row>.settings-v2-actions{grid-column:2}
  #settings-screen .settings-v2-form{flex-direction:column;align-items:stretch}
  #settings-screen .settings-v2-form input{max-width:none;min-height:44px}
  #settings-screen .settings-v2-actions{justify-content:flex-start}
  #settings-screen .settings-v2-feedback{margin:10px 9px}
}
@media(max-width:390px){
  #settings-screen .settings-v2-button{min-width:0;padding:10px 12px!important}
  #settings-screen .settings-v2-facts>div{padding:10px 8px}
  #settings-screen .settings-v2-copy strong{font-size:12px}
}

/* Watchlist: one compact horizontal line per stock. */
#watchlist-screen .watchlist-intro{max-width:820px;margin:8px 2px 12px;line-height:1.5}
#watchlist-screen .watchlist-toolbar{display:flex;align-items:center;justify-content:space-between;min-height:23px;margin:0 2px 5px}
#watchlist-screen #watchlist-status{margin:0;font-size:10px;line-height:1.4}
#watchlist-screen .watchlist-v2-list{
  display:flex;flex-direction:column;gap:0;width:100%;margin:0;padding:0;
  border-top:1px solid var(--border,#293a55);
}
#watchlist-screen .watchlist-v2-item{
  display:grid;
  grid-template-columns:fit-content(170px) max-content minmax(140px,190px) minmax(0,1fr) 23px;
  align-items:center;gap:14px;min-width:0;min-height:76px;padding:7px 8px;
  border:0;border-bottom:1px solid var(--border,#293a55);border-radius:0;
  background:transparent;color:inherit;box-shadow:none;transition:background .14s ease;
}
#watchlist-screen .watchlist-v2-item:hover{background:rgba(130,150,180,.045)}
#watchlist-screen .watchlist-v2-open{
  appearance:none;display:flex;flex-direction:column;justify-content:center;
  min-width:0;min-height:0;width:100%;margin:0;padding:0 2px;border:0!important;
  border-radius:0!important;background:transparent!important;color:inherit;
  box-shadow:none!important;text-align:left;white-space:normal;cursor:pointer;transform:none!important;
}
#watchlist-screen .watchlist-v2-open:hover{background:transparent!important;color:inherit;filter:none;transform:none!important}
#watchlist-screen .watchlist-v2-open:focus-visible,
#watchlist-screen .watchlist-v2-remove:focus-visible{outline:2px solid var(--accent,#6d9cff);outline-offset:3px}
#watchlist-screen .watchlist-v2-identity{grid-column:1;grid-row:1;align-items:flex-start;gap:3px}
#watchlist-screen .watchlist-v2-ticker{
  display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:var(--text,#edf2fc);font-size:20px;line-height:1.1;font-weight:790;letter-spacing:-.025em;
}
#watchlist-screen .watchlist-v2-company{
  display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:var(--muted,#91a0b8);font-size:10px;line-height:1.3;
}
#watchlist-screen .watchlist-v2-quote{grid-column:2;grid-row:1;align-items:flex-end;gap:3px;text-align:right}
#watchlist-screen .watchlist-v2-price{
  display:block;color:var(--text,#edf2fc);font-size:16px;line-height:1.15;
  font-weight:760;font-variant-numeric:tabular-nums;white-space:nowrap;
}
#watchlist-screen .watchlist-v2-daily{
  color:var(--muted,#91a0b8);font-size:9px;line-height:1.25;
  font-weight:720;font-variant-numeric:tabular-nums;white-space:nowrap;
}
#watchlist-screen .watchlist-v2-daily.positive{color:#28b987}
#watchlist-screen .watchlist-v2-daily.negative{color:#dc777b}
#watchlist-screen .watchlist-v2-chart{grid-column:3;grid-row:1;align-items:center;min-width:0;padding:0 2px}
#watchlist-screen .watchlist-v2-chart .stock-sparkline{display:block;width:100%;height:43px;min-height:43px;overflow:visible}
#watchlist-screen .watchlist-v2-chart .stock-chart-placeholder{
  display:flex;align-items:center;justify-content:center;width:100%;height:43px;min-height:43px;
  color:var(--muted,#91a0b8);font-size:8px;border:0;background:transparent;
}
#watchlist-screen .watchlist-v2-stats{
  grid-column:4;grid-row:1;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));
  align-items:center;gap:0 8px;min-width:0;margin:0;padding:0;border:0;overflow:hidden;
}
#watchlist-screen .watchlist-v2-stat{
  display:flex;flex-direction:column;justify-content:center;gap:2px;
  min-width:0;min-height:0;padding:0 4px 0 0;border:0;overflow:hidden;
}
#watchlist-screen .watchlist-v2-stat small{
  display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:var(--muted,#91a0b8);font-size:8px;line-height:1.2;
}
#watchlist-screen .watchlist-v2-stat strong{
  display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:var(--text,#edf2fc);font-size:12px;line-height:1.2;
  font-weight:740;font-variant-numeric:tabular-nums;
}
#watchlist-screen .watchlist-v2-stat strong.positive{color:#28b987}
#watchlist-screen .watchlist-v2-stat strong.negative{color:#dc777b}
#watchlist-screen .watchlist-v2-no-stats{grid-column:1/-1;color:var(--muted,#91a0b8);font-size:9px;white-space:nowrap}
#watchlist-screen .watchlist-v2-remove{
  grid-column:5;grid-row:1;justify-self:end;align-self:center;display:grid;place-items:center;
  width:23px;min-width:23px;height:23px;margin:0;padding:0;border:1px solid transparent;
  border-radius:5px;background:transparent;color:var(--muted,#91a0b8);font-size:16px;line-height:1;box-shadow:none;
}
#watchlist-screen .watchlist-v2-remove:hover{border-color:#b85f67;background:rgba(184,95,103,.09);color:#dc777b}
#watchlist-screen .watchlist-empty{width:100%;padding:24px 12px}
html[data-theme="light"] #watchlist-screen .watchlist-v2-list,
html[data-theme="light"] #watchlist-screen .watchlist-v2-item{border-color:#e2e7ef}
html[data-theme="light"] #watchlist-screen .watchlist-v2-item:hover{background:#f7f9fc}
html[data-theme="light"] #watchlist-screen .watchlist-v2-ticker,
html[data-theme="light"] #watchlist-screen .watchlist-v2-price,
html[data-theme="light"] #watchlist-screen .watchlist-v2-stat strong{color:#172235}
html[data-theme="light"] #watchlist-screen .watchlist-v2-company,
html[data-theme="light"] #watchlist-screen .watchlist-v2-daily:not(.positive):not(.negative),
html[data-theme="light"] #watchlist-screen .watchlist-v2-stat small,
html[data-theme="light"] #watchlist-screen .watchlist-v2-chart .stock-chart-placeholder{color:#65738a}
html[data-theme="light"] #watchlist-screen .watchlist-v2-remove{color:#65738a}
@media(max-width:1050px){
  #watchlist-screen .watchlist-v2-item{
    grid-template-columns:fit-content(145px) max-content minmax(105px,140px) minmax(0,1fr) 21px;
    gap:10px;min-height:70px;padding:6px 4px;
  }
  #watchlist-screen .watchlist-v2-ticker{font-size:17px}
  #watchlist-screen .watchlist-v2-price{font-size:14px}
  #watchlist-screen .watchlist-v2-stats{grid-template-columns:repeat(6,minmax(0,1fr));gap:0 4px}
  #watchlist-screen .watchlist-v2-stat:nth-child(n+7){display:none}
  #watchlist-screen .watchlist-v2-stat small{font-size:6px}
  #watchlist-screen .watchlist-v2-stat strong{font-size:9px}
}
@media(max-width:760px){
  #watchlist-screen .watchlist-v2-item{
    grid-template-columns:fit-content(115px) max-content minmax(78px,105px) minmax(0,1fr) 20px;
    gap:7px;min-height:64px;padding:5px 2px;
  }
  #watchlist-screen .watchlist-v2-ticker{font-size:15px}
  #watchlist-screen .watchlist-v2-company{font-size:8px}
  #watchlist-screen .watchlist-v2-price{font-size:12px}
  #watchlist-screen .watchlist-v2-daily{font-size:8px}
  #watchlist-screen .watchlist-v2-chart .stock-sparkline,
  #watchlist-screen .watchlist-v2-chart .stock-chart-placeholder{height:34px;min-height:34px}
  #watchlist-screen .watchlist-v2-stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:0 3px}
  #watchlist-screen .watchlist-v2-stat:nth-child(n+5){display:none}
  #watchlist-screen .watchlist-v2-stat small{font-size:6px}
  #watchlist-screen .watchlist-v2-stat strong{font-size:8px}
  #watchlist-screen .watchlist-v2-remove{width:20px;min-width:20px;height:20px}
}
@media(max-width:520px){
  #watchlist-screen .watchlist-v2-item{
    grid-template-columns:fit-content(90px) max-content minmax(58px,75px) minmax(0,1fr) 18px;
    gap:5px;min-height:58px;padding:4px 1px;
  }
  #watchlist-screen .watchlist-v2-ticker{font-size:13px}
  #watchlist-screen .watchlist-v2-company{font-size:7px}
  #watchlist-screen .watchlist-v2-price{font-size:10px}
  #watchlist-screen .watchlist-v2-daily{font-size:7px}
  #watchlist-screen .watchlist-v2-chart .stock-sparkline,
  #watchlist-screen .watchlist-v2-chart .stock-chart-placeholder{height:28px;min-height:28px}
  #watchlist-screen .watchlist-v2-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 2px}
  #watchlist-screen .watchlist-v2-stat:nth-child(n+3){display:none}
  #watchlist-screen .watchlist-v2-stat small{font-size:5px}
  #watchlist-screen .watchlist-v2-stat strong{font-size:7px}
  #watchlist-screen .watchlist-v2-remove{width:18px;min-width:18px;height:18px;font-size:14px}
}


/* -------------------------------------------------------------------------
   Stock Analyser design-system layer
   Centralised visual rules. Keep screen-specific layout and data density
   intact while making typography, controls, surfaces and spacing consistent.
   ------------------------------------------------------------------------- */
:root {
  --sa-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sa-text-xs: 10px;
  --sa-text-sm: 12px;
  --sa-text-md: 14px;
  --sa-text-lg: 16px;
  --sa-title-sm: 20px;
  --sa-title-md: 25px;
  --sa-title-lg: 30px;
  --sa-weight-regular: 400;
  --sa-weight-medium: 500;
  --sa-weight-semibold: 600;
  --sa-weight-bold: 700;
  --sa-leading-tight: 1.2;
  --sa-leading-normal: 1.5;
  --sa-leading-loose: 1.65;
  --sa-radius-control: 10px;
  --sa-radius-surface: 12px;
  --sa-radius-panel: 14px;
  --sa-radius-pill: 999px;
  --sa-space-1: 4px;
  --sa-space-2: 8px;
  --sa-space-3: 12px;
  --sa-space-4: 16px;
  --sa-space-5: 20px;
  --sa-space-6: 24px;
  --sa-focus: #91b4ed;
}
html { font-family: var(--sa-font); }
body { font-size: var(--sa-text-md); line-height: var(--sa-leading-normal); }
h1, h2, h3,
.page-heading h1, .page-heading h2, .section-title h3,
.detail-indexer-heading h3, .settings-v2-heading h3 {
  font-family: var(--sa-font);
  letter-spacing: -.025em;
  line-height: var(--sa-leading-tight);
}
h1 { font-size: var(--sa-title-lg); font-weight: var(--sa-weight-bold); }
h2 { font-size: var(--sa-title-md); font-weight: var(--sa-weight-bold); }
h3 { font-size: var(--sa-text-lg); font-weight: var(--sa-weight-bold); }
p { line-height: var(--sa-leading-normal); }
.page-heading { align-items: center; margin-bottom: 22px; }
.page-heading > div > small,
header small, .page-heading small, .scan-intro small {
  font-size: var(--sa-text-xs);
  line-height: 1.4;
  font-weight: var(--sa-weight-semibold);
  letter-spacing: .09em;
}
.page-heading .muted { font-size: var(--sa-text-sm); }
.section-title { gap: 16px; margin-bottom: 14px; }
.section-title h3 { font-size: var(--sa-text-lg); font-weight: var(--sa-weight-bold); }
.section-title p,
.helper-text, .muted, .settings-v2-intro {
  font-size: var(--sa-text-sm);
  line-height: var(--sa-leading-loose);
}
.helper-text { margin-top: 10px; }
label, .source-control { font-size: var(--sa-text-sm); font-weight: var(--sa-weight-semibold); }

/* Controls share a single height, type treatment and corner radius. */
button, input, select, textarea {
  font-family: var(--sa-font);
  font-size: var(--sa-text-sm);
  line-height: 1.35;
  border-radius: var(--sa-radius-control);
}
button {
  min-height: 40px;
  padding: 9px 14px;
  font-weight: var(--sa-weight-semibold);
  letter-spacing: 0;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--sa-focus);
  outline-offset: 3px;
}
button:disabled { cursor: not-allowed; }
input, select, textarea {
  min-height: 42px;
  padding: 10px 12px;
  font-weight: var(--sa-weight-regular);
}
.quick-search input, form#search.quick-search input {
  min-height: 36px;
  padding: 7px 0;
}
.quick-search button { min-height: 38px; padding: 8px 14px; }
.secondary-button { font-weight: var(--sa-weight-semibold); }
.back-button, .detail-watchlist, .detail-rerun { min-height: 40px; font-size: var(--sa-text-sm); }
.settings-v2-button {
  min-height: 42px !important;
  padding: 9px 14px !important;
  border-radius: var(--sa-radius-control) !important;
  font-size: var(--sa-text-sm) !important;
  line-height: 1.35 !important;
  font-weight: var(--sa-weight-semibold) !important;
}
.nav-tab {
  min-height: 44px;
  padding: 9px 12px;
  border-radius: var(--sa-radius-control);
  font-size: var(--sa-text-sm);
  font-weight: var(--sa-weight-semibold);
}
.global-queue-toggle {
  min-height: 42px;
  padding: 0 15px;
  border-radius: var(--sa-radius-control);
  font-size: var(--sa-text-sm);
  font-weight: var(--sa-weight-semibold);
}
#global-queue-count { border-radius: var(--sa-radius-pill); }

/* Surfaces use a restrained radius scale; list rows remain unboxed. */
.card, article, .scan-panel, .discover-intro, .job-progress,
.autocomplete-dropdown, .global-queue-popover, .hard-rerun-menu {
  border-radius: var(--sa-radius-panel);
}
.stock-card, form, .quick-search, .discover-stats > div {
  border-radius: var(--sa-radius-surface);
}
.progress-track, .progress-fill, .queue-track { border-radius: var(--sa-radius-pill); }
.stock-card { padding: 15px; }
.card, article { padding: 18px; }
.scan-panel, .discover-intro { padding: 20px; }
.discover-stats > div { padding: 14px; }
.card small { font-size: var(--sa-text-sm); line-height: 1.4; font-weight: var(--sa-weight-medium); }
.card strong { font-size: var(--sa-title-sm); line-height: var(--sa-leading-tight); font-weight: var(--sa-weight-bold); }
article > h3, article h3 { font-size: var(--sa-text-lg); font-weight: var(--sa-weight-bold); }
.row { font-size: var(--sa-text-sm); line-height: var(--sa-leading-normal); }
table { font-size: var(--sa-text-sm); }
td, th { padding: 12px 14px; line-height: 1.45; }
th { font-weight: var(--sa-weight-semibold); }

/* Settings rows and descriptions use the same text hierarchy as other pages. */
.settings-v2-heading h3 { font-size: var(--sa-text-lg) !important; font-weight: var(--sa-weight-bold) !important; }
.settings-v2-heading p, .settings-v2-copy small,
.settings-v2-feedback, .settings-v2-intro {
  font-size: var(--sa-text-sm) !important;
  line-height: var(--sa-leading-loose) !important;
}
.settings-v2-copy strong { font-size: var(--sa-text-md) !important; font-weight: var(--sa-weight-semibold) !important; }
.settings-v2-subheading { font-size: var(--sa-text-xs) !important; font-weight: var(--sa-weight-semibold) !important; }
.settings-v2-facts dt { font-size: var(--sa-text-xs) !important; }
.settings-v2-facts dd { font-size: var(--sa-text-sm) !important; font-weight: var(--sa-weight-semibold) !important; }

/* Dense market data stays compact, but avoids unreadably tiny labels. */
.stock-ticker, .watchlist-v2-ticker { font-weight: var(--sa-weight-bold); }
.stock-company, .watchlist-v2-company { font-size: var(--sa-text-xs); line-height: 1.35; }
.stock-price, .watchlist-v2-price { font-weight: var(--sa-weight-bold); font-variant-numeric: tabular-nums; }
.stock-daily-change, .watchlist-v2-daily { font-size: var(--sa-text-xs); font-weight: var(--sa-weight-semibold); }
.stock-analysis-stat small, .stock-predicted small { font-size: var(--sa-text-xs); }
.stock-analysis-stat strong, .stock-predicted strong { font-size: var(--sa-text-xs); font-weight: var(--sa-weight-semibold); }
.watchlist-v2-stat small { font-size: var(--sa-text-xs) !important; line-height: 1.3; }
.watchlist-v2-stat strong { font-size: var(--sa-text-sm) !important; font-weight: var(--sa-weight-semibold); }
#watchlist-screen #watchlist-status { font-size: var(--sa-text-xs); }
.watchlist-v2-remove { width: 28px; min-width: 28px; height: 28px; border-radius: 8px; font-size: 16px; }

/* Predictable focus and motion behaviour across interactive elements. */
a { text-underline-offset: 3px; }
button:hover:not(:disabled) { filter: brightness(1.04); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
@media (max-width: 700px) {
  h1 { font-size: 27px; }
  h2 { font-size: 23px; }
  h3, .section-title h3, .settings-v2-heading h3 { font-size: 16px; }
  .page-heading { margin-bottom: 18px; }
  .stock-card { padding: 14px; }
  .scan-panel, .discover-intro { padding: 16px; }
  .card, article { padding: 15px; }
  .settings-v2-copy strong { font-size: 14px !important; }
  #watchlist-screen .watchlist-v2-ticker { font-size: 16px; }
  #watchlist-screen .watchlist-v2-company { font-size: 10px; }
  #watchlist-screen .watchlist-v2-price { font-size: 13px; }
  #watchlist-screen .watchlist-v2-daily { font-size: 10px; }
  #watchlist-screen .watchlist-v2-stat small { font-size: 9px !important; }
  #watchlist-screen .watchlist-v2-stat strong { font-size: 10px !important; }
}
@media (max-width: 520px) {
  #watchlist-screen .watchlist-v2-ticker { font-size: 14px; }
  #watchlist-screen .watchlist-v2-company { font-size: 9px; }
  #watchlist-screen .watchlist-v2-price { font-size: 11px; }
  #watchlist-screen .watchlist-v2-daily { font-size: 9px; }
  #watchlist-screen .watchlist-v2-stat small { font-size: 8px !important; }
  #watchlist-screen .watchlist-v2-stat strong { font-size: 9px !important; }
}


/* Icon consistency and always-visible account settings */
#settings-screen .settings-v2-layout{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
  gap:34px 44px;
  max-width:1120px;
}
#settings-screen .settings-v2-section{min-width:0}
#settings-screen .settings-v2-section[aria-labelledby="settings-account-heading"]{grid-column:1/-1}
#settings-screen .settings-v2-section[aria-labelledby="settings-about-heading"]{grid-column:1/-1}
#settings-screen .settings-v2-icon{
  display:grid;
  place-items:center;
  box-sizing:border-box;
  width:42px;
  height:42px;
  min-width:42px;
  padding:0;
  border-radius:12px;
  line-height:0;
}
#settings-screen .settings-v2-icon svg{
  display:block;
  width:19px;
  height:19px;
  flex:none;
  overflow:visible;
}
#settings-screen .settings-v2-trailing span{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  padding:0;
}
#settings-screen .settings-v2-trailing svg{
  display:block;
  width:15px;
  height:15px;
}
#settings-screen .settings-v2-account-block{
  margin-top:12px;
  border-top:1px solid #29384e;
}
#settings-screen .settings-v2-account-block:has(#account-controls[hidden]){
  display:none;
}
#settings-screen .settings-v2-account-heading{
  display:grid;
  grid-template-columns:46px minmax(0,1fr);
  align-items:center;
  gap:17px;
  min-height:78px;
  padding:15px 14px;
  border-bottom:1px solid #29384e;
}
#settings-screen .settings-v2-account-heading .settings-v2-copy strong{
  font-size:13px;
  font-weight:700;
}
#settings-screen .settings-v2-account-heading .settings-v2-copy small{
  font-size:11px;
  line-height:1.5;
}
#settings-screen .settings-v2-account-controls{
  display:block;
  padding:4px 0 12px 63px;
}
#settings-screen .settings-v2-account-controls[hidden]{
  display:none!important;
}
#settings-screen .settings-v2-subheading{
  margin-top:20px;
}
#settings-screen .settings-v2-control-row{
  grid-template-columns:46px minmax(180px,.72fr) minmax(280px,1.28fr);
}
html[data-theme="light"] #settings-screen .settings-v2-account-block,
html[data-theme="light"] #settings-screen .settings-v2-account-heading{
  border-color:#dce3ed;
}
@media(max-width:980px){
  #settings-screen .settings-v2-layout{
    grid-template-columns:minmax(0,1fr);
    gap:30px;
  }
  #settings-screen .settings-v2-section[aria-labelledby="settings-account-heading"],
  #settings-screen .settings-v2-section[aria-labelledby="settings-about-heading"]{
    grid-column:auto;
  }
  #settings-screen .settings-v2-account-controls{padding-left:0}
}
@media(max-width:700px){
  #settings-screen .settings-v2-account-heading{
    grid-template-columns:42px minmax(0,1fr);
    gap:13px;
    min-height:72px;
    padding:13px 9px;
  }
  #settings-screen .settings-v2-account-controls{padding:2px 0 10px}
  #settings-screen .settings-v2-icon{width:40px;height:40px;min-width:40px}
  #settings-screen .settings-v2-icon svg{width:18px;height:18px}
  #settings-screen .settings-v2-control-row{
    grid-template-columns:42px minmax(0,1fr);
  }
}


/* Settings alignment refinement: keep the expanded account controls on the
   same content grid as the rest of Settings, without a separate inset panel. */
#settings-screen .settings-v2-account-block{
  margin-top:12px;
}
#settings-screen .settings-v2-account-controls{
  padding:4px 0 12px;
}
#settings-screen .settings-v2-subheading{
  padding-left:77px;
}
#settings-screen .settings-v2-facts{
  width:calc(100% - 77px);
  margin-left:77px;
}
#settings-screen .settings-v2-profile-form{
  padding-left:77px;
}
#settings-screen .settings-v2-feedback{
  margin-left:77px;
}
#settings-screen .settings-v2-control-row{
  padding-left:14px;
}
html[data-theme="light"] #settings-screen .settings-v2-profile-form input,
html[data-theme="light"] #settings-screen .settings-v2-form input{
  background:#f4f6fa!important;
  border-color:#d8e1eb!important;
  color:#172235!important;
  box-shadow:none!important;
}
html[data-theme="light"] #settings-screen .settings-v2-profile-form input:focus,
html[data-theme="light"] #settings-screen .settings-v2-form input:focus{
  background:#f8f9fc!important;
  border-color:#9aafd0!important;
  outline:2px solid rgba(70,112,174,.18);
  outline-offset:1px;
}
@media(max-width:700px){
  #settings-screen .settings-v2-subheading{
    padding-left:64px;
  }
  #settings-screen .settings-v2-facts{
    width:calc(100% - 64px);
    margin-left:64px;
  }
  #settings-screen .settings-v2-profile-form{
    width:calc(100% - 64px);
    margin-left:64px;
    padding:14px 0;
  }
  #settings-screen .settings-v2-feedback{
    margin-left:64px;
  }
}
@media(max-width:390px){
  #settings-screen .settings-v2-subheading{padding-left:60px}
  #settings-screen .settings-v2-facts{
    width:calc(100% - 60px);
    margin-left:60px;
  }
  #settings-screen .settings-v2-profile-form{
    width:calc(100% - 60px);
    margin-left:60px;
  }
  #settings-screen .settings-v2-feedback{margin-left:60px}
}


/* Remove decorative pale icon tiles; keep consistent icon alignment only. */
#settings-screen .settings-v2-layout{
  width:100%;
  max-width:none;
}
#settings-screen .settings-v2-icon{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  border-radius:0!important;
}
#settings-screen .settings-v2-trailing span{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  border-radius:0!important;
}


/* Settings account form correction: forms are layout wrappers, not white panels. */
#settings-screen #account-profile-form,
#settings-screen #account-email-form,
#settings-screen #account-password-form{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  outline:0;
}
#settings-screen #account-profile-form input,
#settings-screen #account-email-form input,
#settings-screen #account-password-form input{
  box-sizing:border-box;
  min-height:42px;
  border:1px solid #33445f!important;
  border-radius:8px!important;
  background:#111d30!important;
  color:#e8eef9!important;
  box-shadow:none!important;
}
#settings-screen #account-profile-form input::placeholder,
#settings-screen #account-email-form input::placeholder,
#settings-screen #account-password-form input::placeholder{
  color:#8493aa;
  opacity:1;
}
html[data-theme="light"] #settings-screen #account-profile-form,
html[data-theme="light"] #settings-screen #account-email-form,
html[data-theme="light"] #settings-screen #account-password-form{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
html[data-theme="light"] #settings-screen #account-profile-form input,
html[data-theme="light"] #settings-screen #account-email-form input,
html[data-theme="light"] #settings-screen #account-password-form input{
  background:#edf2f8!important;
  border-color:#d3dce8!important;
  color:#172235!important;
}
html[data-theme="light"] #settings-screen #account-profile-form input::placeholder,
html[data-theme="light"] #settings-screen #account-email-form input::placeholder,
html[data-theme="light"] #settings-screen #account-password-form input::placeholder{
  color:#718097;
}
#settings-screen .settings-v2-icon{
  display:grid;
  place-items:center;
  box-sizing:border-box;
  width:42px;
  height:42px;
  min-width:42px;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#9aafd0;
}
#settings-screen .settings-v2-icon svg{
  display:block;
  width:19px;
  height:19px;
  min-width:19px;
  min-height:19px;
  overflow:visible;
}
#settings-screen .settings-v2-trailing span{
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#settings-screen .settings-v2-trailing span svg{
  display:block;
  width:16px;
  height:16px;
}
.nav-tab-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  flex:0 0 20px;
  line-height:0;
}
.nav-tab-icon svg{
  display:block;
  width:18px;
  height:18px;
  overflow:visible;
}
@media(max-width:700px){
  .nav-tab-icon{width:18px;height:18px;flex-basis:18px}
  .nav-tab-icon svg{width:17px;height:17px}
}


/* Account settings: keep every form and its surrounding layout wrappers clear
   in light mode. Only the actual input controls receive a filled surface. */
#settings-screen .settings-v2-account-block,
#settings-screen .settings-v2-account-controls,
#settings-screen .settings-v2-profile-form,
#settings-screen .settings-v2-form,
#settings-screen .settings-v2-control-row {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-theme="light"] #settings-screen .settings-v2-account-block,
html[data-theme="light"] #settings-screen .settings-v2-account-controls,
html[data-theme="light"] #settings-screen .settings-v2-profile-form,
html[data-theme="light"] #settings-screen .settings-v2-form,
html[data-theme="light"] #settings-screen .settings-v2-control-row,
html[data-theme="light"] #settings-screen #account-profile-form,
html[data-theme="light"] #settings-screen #account-email-form,
html[data-theme="light"] #settings-screen #account-password-form {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-theme="light"] #settings-screen #account-profile-form input,
html[data-theme="light"] #settings-screen #account-email-form input,
html[data-theme="light"] #settings-screen #account-password-form input {
  background: #edf2f8 !important;
  border: 1px solid #d3dce8 !important;
  color: #172235 !important;
  box-shadow: none !important;
}


/* Settings spacing pass: one consistent content edge and predictable row rhythm. */
#settings-screen .settings-v2-layout{
  column-gap:40px;
  row-gap:28px;
}
#settings-screen .settings-v2-section{
  min-width:0;
}
#settings-screen .settings-v2-heading{
  margin:0 0 14px;
}
#settings-screen .settings-v2-account-block{
  margin-top:10px;
}
#settings-screen .settings-v2-account-heading{
  min-height:72px;
  padding:14px 14px;
  gap:14px;
}
#settings-screen .settings-v2-account-controls{
  padding:4px 0 8px;
}
#settings-screen .settings-v2-subheading{
  margin:20px 0 8px;
  padding:0 0 9px 77px;
}
#settings-screen .settings-v2-facts{
  width:calc(100% - 77px);
  margin:10px 0 12px 77px;
  padding:4px 0 8px;
}
#settings-screen .settings-v2-facts>div{
  padding:9px 14px;
}
#settings-screen .settings-v2-profile-form{
  width:calc(100% - 77px);
  margin:0 0 4px 77px;
  padding:12px 0 16px;
  grid-template-columns:190px minmax(180px,360px) auto;
  gap:12px 14px;
}
#settings-screen .settings-v2-control-row{
  min-height:0;
  padding:15px 14px;
  gap:14px;
  grid-template-columns:46px minmax(190px,.72fr) minmax(280px,1.28fr);
}
#settings-screen .settings-v2-form{
  justify-content:flex-start;
  gap:9px 11px;
}
#settings-screen .settings-v2-form input{
  flex:1 1 190px;
  max-width:260px;
}
#settings-screen .settings-v2-password-form input{
  flex-basis:160px;
  max-width:205px;
}
#settings-screen .settings-v2-actions{
  justify-content:flex-start;
  gap:9px;
}
#settings-screen .settings-v2-feedback{
  margin:8px 0 0 77px;
}
#settings-screen .settings-v2-row{
  min-height:70px;
  padding:13px 12px;
  gap:14px;
}
@media(max-width:980px){
  #settings-screen .settings-v2-layout{row-gap:26px}
  #settings-screen .settings-v2-control-row{
    grid-template-columns:46px minmax(0,1fr);
    gap:12px 14px;
    padding:14px 12px;
  }
  #settings-screen .settings-v2-control-row>.settings-v2-form,
  #settings-screen .settings-v2-control-row>.settings-v2-actions{
    grid-column:2;
    width:100%;
  }
  #settings-screen .settings-v2-form input{max-width:300px}
}
@media(max-width:700px){
  #settings-screen .settings-v2-layout{row-gap:24px}
  #settings-screen .settings-v2-heading{margin-bottom:10px}
  #settings-screen .settings-v2-account-heading{
    min-height:68px;
    padding:12px 8px;
    gap:12px;
  }
  #settings-screen .settings-v2-account-controls{padding:2px 0 6px}
  #settings-screen .settings-v2-subheading{
    margin:18px 0 7px;
    padding:0 0 8px 60px;
  }
  #settings-screen .settings-v2-facts{
    width:calc(100% - 60px);
    margin:8px 0 10px 60px;
  }
  #settings-screen .settings-v2-facts>div{padding:9px 8px}
  #settings-screen .settings-v2-profile-form{
    width:calc(100% - 60px);
    margin:0 0 4px 60px;
    padding:10px 0 14px;
    grid-template-columns:minmax(0,1fr);
    gap:8px;
  }
  #settings-screen .settings-v2-profile-form input{width:100%;max-width:none}
  #settings-screen .settings-v2-control-row{
    grid-template-columns:40px minmax(0,1fr);
    gap:10px 12px;
    padding:13px 8px;
  }
  #settings-screen .settings-v2-control-row>.settings-v2-form,
  #settings-screen .settings-v2-control-row>.settings-v2-actions{
    grid-column:2;
  }
  #settings-screen .settings-v2-form{
    flex-direction:column;
    align-items:stretch;
    gap:9px;
  }
  #settings-screen .settings-v2-form input{
    width:100%;
    max-width:none;
    min-height:44px;
  }
  #settings-screen .settings-v2-actions{flex-direction:column;align-items:stretch}
  #settings-screen .settings-v2-feedback{margin:8px 0 0 60px}
  #settings-screen .settings-v2-row{
    min-height:0;
    padding:12px 8px;
    gap:10px 12px;
  }
}
@media(max-width:390px){
  #settings-screen .settings-v2-subheading{padding-left:56px}
  #settings-screen .settings-v2-facts,
  #settings-screen .settings-v2-profile-form{
    width:calc(100% - 56px);
    margin-left:56px;
  }
  #settings-screen .settings-v2-feedback{margin-left:56px}
}


/* Final Settings spacing system: one shared grid, no accumulated nested offsets. */
#settings-screen .settings-v2-intro {
  margin: -6px 0 24px;
  max-width: 720px;
}
#settings-screen .settings-v2-layout {
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  column-gap: 40px;
  row-gap: 32px;
}
#settings-screen .settings-v2-section {
  min-width: 0;
  margin: 0;
  padding: 0;
}
#settings-screen .settings-v2-section[aria-labelledby="settings-account-heading"],
#settings-screen .settings-v2-section[aria-labelledby="settings-about-heading"] {
  grid-column: 1 / -1;
}
#settings-screen .settings-v2-heading {
  margin: 0 0 12px;
  padding: 0 0 10px;
}
#settings-screen .settings-v2-heading p {
  margin: 5px 0 0;
}
#settings-screen .settings-v2-row,
#settings-screen .settings-v2-control-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  row-gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 13px 0;
}
#settings-screen .settings-v2-row + .settings-v2-row,
#settings-screen .settings-v2-control-row + .settings-v2-control-row {
  border-top: 1px solid #29384e;
}
html[data-theme="light"] #settings-screen .settings-v2-row + .settings-v2-row,
html[data-theme="light"] #settings-screen .settings-v2-control-row + .settings-v2-control-row {
  border-color: #e1e7ef;
}
#settings-screen .settings-v2-copy {
  min-width: 0;
  margin: 0;
  gap: 4px;
}
#settings-screen .settings-v2-copy strong,
#settings-screen .settings-v2-copy small {
  display: block;
  margin: 0;
}
#settings-screen .settings-v2-icon {
  display: grid;
  width: 42px;
  height: 42px;
  min-width: 42px;
  margin: 0;
  padding: 0 !important;
  place-items: center;
}
#settings-screen .settings-v2-account-block {
  margin: 14px 0 0;
  padding: 0;
  border-top: 1px solid #29384e;
}
#settings-screen .settings-v2-account-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 0;
  margin: 0;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid #29384e;
}
html[data-theme="light"] #settings-screen .settings-v2-account-heading,
html[data-theme="light"] #settings-screen .settings-v2-account-block {
  border-color: #e1e7ef;
}
#settings-screen .settings-v2-account-controls {
  display: block;
  margin: 0;
  padding: 0;
}
#settings-screen .settings-v2-account-controls[hidden] { display: none !important; }
#settings-screen .settings-v2-subheading {
  margin: 22px 0 8px;
  padding: 0 0 7px;
}
#settings-screen .settings-v2-facts {
  display: grid;
  width: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 14px 0 18px 56px;
  padding: 0;
}
#settings-screen .settings-v2-profile-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px 12px;
  width: auto;
  max-width: 620px;
  margin: 0 0 18px 56px;
  padding: 0;
}
#settings-screen .settings-v2-profile-form label {
  grid-column: 1 / -1;
  margin: 0;
}
#settings-screen .settings-v2-profile-form input { min-width: 0; width: 100%; }
#settings-screen .settings-v2-feedback {
  min-height: 0;
  margin: 10px 0 0 56px;
}
#settings-screen .settings-v2-control-row {
  grid-template-columns: 42px minmax(180px, .8fr) minmax(0, 1.2fr);
  padding: 14px 0;
}
#settings-screen .settings-v2-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 10px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#settings-screen .settings-v2-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#settings-screen .settings-v2-form input {
  width: 100%;
  min-width: 0;
  max-width: none;
}
#settings-screen .settings-v2-password-form {
  grid-template-columns: minmax(0, 1fr);
}
#settings-screen .settings-v2-form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
#settings-screen .settings-v2-form-fields input {
  width: 100%;
  min-width: 0;
  max-width: none;
}
#settings-screen .settings-v2-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
#settings-screen .settings-v2-form button,
#settings-screen .settings-v2-actions button {
  flex: 0 0 auto;
}
#settings-screen .settings-v2-link {
  text-decoration: none;
}
#settings-screen .settings-v2-link:hover {
  background: transparent;
}
#settings-screen .settings-v2-trailing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
#settings-screen #account-profile-form,
#settings-screen #account-email-form,
#settings-screen #account-password-form {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
@media (max-width: 980px) {
  #settings-screen .settings-v2-layout {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 26px;
  }
  #settings-screen .settings-v2-section[aria-labelledby="settings-account-heading"],
  #settings-screen .settings-v2-section[aria-labelledby="settings-about-heading"] {
    grid-column: auto;
  }
  #settings-screen .settings-v2-control-row {
    grid-template-columns: 42px minmax(150px, .7fr) minmax(0, 1.3fr);
  }
}
@media (max-width: 700px) {
  #settings-screen .settings-v2-intro { margin-bottom: 20px; }
  #settings-screen .settings-v2-layout { row-gap: 24px; }
  #settings-screen .settings-v2-row {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 12px 0;
  }
  #settings-screen .settings-v2-row > .settings-v2-button,
  #settings-screen .settings-v2-row > button {
    grid-column: 2;
    justify-self: start;
  }
  #settings-screen .settings-v2-account-heading {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 0;
  }
  #settings-screen .settings-v2-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
  #settings-screen .settings-v2-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    margin: 12px 0 16px 48px;
  }
  #settings-screen .settings-v2-profile-form {
    grid-template-columns: minmax(0, 1fr);
    margin: 0 0 16px 48px;
  }
  #settings-screen .settings-v2-profile-form label { grid-column: auto; }
  #settings-screen .settings-v2-profile-form button { justify-self: start; }
  #settings-screen .settings-v2-feedback { margin-left: 48px; }
  #settings-screen .settings-v2-control-row {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 13px 0;
  }
  #settings-screen .settings-v2-control-row > .settings-v2-form,
  #settings-screen .settings-v2-control-row > .settings-v2-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
  #settings-screen .settings-v2-form input {
    flex: 1 1 100%;
    width: 100%;
  }
  #settings-screen .settings-v2-form button,
  #settings-screen .settings-v2-actions button {
    flex: 0 1 auto;
  }
  #settings-screen .settings-v2-subheading { margin-top: 18px; }
}
@media (max-width: 420px) {
  #settings-screen .settings-v2-facts {
    grid-template-columns: minmax(0, 1fr);
  }
  #settings-screen .settings-v2-actions {
    align-items: stretch;
    flex-direction: column;
  }
  #settings-screen .settings-v2-actions button { width: 100%; }
}


/* Settings: a single vertical list with consistently aligned account controls. */
#settings-screen .settings-v2-layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 30px;
}
#settings-screen .settings-v2-section {
  width: 100%;
  max-width: none;
}
#settings-screen .settings-v2-section[aria-labelledby="settings-account-heading"],
#settings-screen .settings-v2-section[aria-labelledby="settings-about-heading"] {
  grid-column: auto;
}
#settings-screen .settings-v2-profile-form {
  display: grid;
  grid-template-columns: 42px minmax(180px, .8fr) minmax(260px, 1.2fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 14px 0 24px;
  border: 0;
  border-top: 1px solid var(--border, #29384e);
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}
#settings-screen .settings-v2-profile-form .settings-v2-copy label {
  display: block;
  margin: 0;
  padding: 0;
  color: inherit;
  font: inherit;
}
#settings-screen .settings-v2-profile-form .settings-v2-copy strong {
  font-size: 13px;
  font-weight: 700;
}
#settings-screen .settings-v2-profile-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
#settings-screen .settings-v2-profile-fields input {
  width: 100%;
  min-width: 0;
  max-width: none;
}
#settings-screen .settings-v2-profile-fields button {
  white-space: nowrap;
}
#settings-screen .settings-v2-subheading {
  display: none;
}
#settings-screen .settings-v2-control-row {
  grid-template-columns: 42px minmax(180px, .8fr) minmax(260px, 1.2fr);
  padding: 14px 0;
}
#settings-screen .settings-v2-row {
  padding-left: 0;
  padding-right: 0;
}
#settings-screen .settings-v2-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}
#settings-screen .settings-v2-heading {
  margin-bottom: 10px;
}
@media (max-width: 700px) {
  #settings-screen .settings-v2-layout { gap: 24px; }
  #settings-screen .settings-v2-profile-form {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 12px 0 22px;
  }
  #settings-screen .settings-v2-profile-form > .settings-v2-profile-fields {
    grid-column: 2;
    width: 100%;
  }
  #settings-screen .settings-v2-profile-fields input {
    flex: 1 1 auto;
    max-width: none;
  }
  #settings-screen .settings-v2-control-row {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px 12px;
  }
  #settings-screen .settings-v2-control-row > .settings-v2-form,
  #settings-screen .settings-v2-control-row > .settings-v2-actions {
    grid-column: 2;
    width: 100%;
  }
  #settings-screen .settings-v2-link {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 12px;
  }
}
@media (max-width: 420px) {
  #settings-screen .settings-v2-profile-fields {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  #settings-screen .settings-v2-profile-fields button {
    justify-self: end;
  }
  #settings-screen .settings-v2-form-actions {
    justify-content: flex-end;
  }
}


.stock-card-heading-right{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex:none;min-width:0}
.stock-risk-label{display:inline-flex;align-items:center;white-space:nowrap;padding:3px 6px;border:1px solid currentColor;border-radius:999px;font-size:8px;font-weight:700;line-height:1.2}
.stock-risk-label.risk-lower{color:#5bd6a1}
.stock-risk-label.risk-moderate{color:#e6b75d}
.stock-risk-label.risk-higher,.stock-risk-label.risk-unrated{color:#f08b8b}
html[data-theme="light"] .stock-risk-label.risk-lower{color:#16865a}
html[data-theme="light"] .stock-risk-label.risk-moderate{color:#95630b}
html[data-theme="light"] .stock-risk-label.risk-higher,html[data-theme="light"] .stock-risk-label.risk-unrated{color:#b33d3d}

.detail-index-choice{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;padding:10px 0}
.detail-index-choice-copy{display:grid;gap:3px;min-width:0}
.detail-index-choice-copy strong{font-size:13px;font-weight:650}
.detail-index-choice-copy small{font-size:11px;line-height:1.4}
.detail-index-choice-controls{display:flex;align-items:center;gap:8px}
.detail-index-choice-controls button{white-space:nowrap}
@media(max-width:600px){.detail-index-choice{align-items:flex-start;flex-direction:column}.detail-index-choice-controls{width:100%}.detail-index-choice-controls button{flex:1}}

.detail-index-choice-controls button[aria-pressed="true"]{border-color:#79a4e8;background:rgba(121,164,232,.16);color:inherit}
