/* ==========================================================================
   App workspaces (Dashboard, Budget, Investing, Learn).
   Same layout, data and colours; drops decorative gradients and blobs and
   keeps status colour as a thin rule instead of a thick accent bar.
   ========================================================================== */

/* Decoration out */
header.topbar::before{display:none!important}
.plan-hero::after,.savings-hero::after,.education-hero::after,[class*="-hero"]::after{display:none!important}
.metric-card::before,.blue-command::before,.violet-command::before,.gold-command::before{background:currentColor!important;opacity:.0!important}

/* Progress bars: one solid colour */
.goal-progress-track i{background:#0f766e!important}
.setup-progress-track i,.factor-meter i{background:var(--accent,#0f766e)!important}
.pathway-progress-track strong{background:#6b4fc8!important}

/* Result highlight: flat tint, no wash */
.result-highlight{background:#f4f9ff!important;box-shadow:none!important}

/* Status cards: keep good/warn/bad colour, as a thin rule */
article.good,article.warn,article.bad,div.suggestion-card,article.timeline-item,article.thesis-card{border-left-width:2px!important}

/* Calmer panels */
.metric-card,.compact-card{box-shadow:none!important}
.sp-site-logo-badge{background:none!important;border:1px solid currentColor!important;color:#1a9e6e!important;border-radius:2px!important;font-family:var(--sp-font-mono)!important;font-weight:500!important;letter-spacing:0.08em!important}
.sp-site-header{border-bottom:1px solid #e4e7ed}

/* Challenge shortcuts: white label on the solid button (was unreadable) */
.savings-score-card a[href="/budget-challenge"],.savings-score-card a[href="/daily-challenge"]{color:#fff!important;height:36px;display:flex!important;align-items:center;justify-content:center;padding:0 14px!important}
.savings-score-card a[href="/budget-challenge"]:hover{background:#1d4ed8!important}
.savings-score-card a[href="/daily-challenge"]:hover{background:#b91c1c!important}

/* Subject tiles: line icon, no tinted bubble */
.duo-subject-icon{background:none!important;color:#12805c!important;border-radius:0!important;box-shadow:none!important}
.duo-subject-card.active .duo-subject-icon{color:inherit!important}

/* ---------- Polish pass: one radius, no washes, phone layouts that fully collapse ---------- */
.empire-panel,.command-card,.command-hero,.experience-toggle,.weekly-action-strip,.help-launcher,.surface-card,.data-quality-banner,.live-data-pill,.account-widget{border-radius:6px!important}
.command-hero,.empire-panel,.command-card,.experience-toggle,.mode-button.active{background-image:none!important}
.command-card::before{display:none!important}
.copilot-card,.ask-pilot-output,.api-status-card{border-radius:2px!important;box-shadow:none!important}
.ask-pilot-output{border-left-width:3px!important}
body.command-mode .copilot-report-panel,body.command-mode .services-panel{border-style:solid!important}
.live-data-pill.connected > span{box-shadow:none!important}
.data-quality-banner{box-shadow:none!important}
.data-quality-banner strong{color:#6f4609!important}
.save-status{margin-bottom:10px}
.copilot-report-panel .section-title,.weekly-snapshot-panel .section-title{margin-bottom:14px!important;gap:12px}

/* Mode tabs: flat underline tabs */
.mode-switcher{box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:#fff!important;border-radius:4px!important}
.mode-button,.mode-button.active,.mode-button.command-mode-button.active,.mode-button.plan-mode-button.active,.mode-button.savings-mode-button.active,.mode-button.education-mode-button.active,.mode-button.goals-mode-button.active{background:none!important;box-shadow:none!important;border-color:transparent!important;border-radius:2px!important;transform:none!important}
.mode-button.active{box-shadow:inset 0 -2px 0 currentColor!important}
.mode-button.active::before,.investing-tab.active::before,.savings-tab.active::before,.education-tab.active::before,.learning-area-tab.active::before{display:none!important}

@media(max-width:700px){
  .mode-switcher{grid-template-columns:none!important;grid-auto-flow:column;grid-auto-columns:max-content;overflow-x:auto;scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 32px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 32px),transparent)}
  .mode-switcher::-webkit-scrollbar{display:none}
  .mode-button{flex:none!important;min-width:0!important}
  .weekly-action-strip{grid-template-columns:1fr!important}
  .api-command-panel div:has(> div > #apiStatusGrid){flex-direction:column!important;align-items:flex-start!important;gap:12px!important}
  .api-command-panel div:has(> #apiStatusGrid){width:100%!important;gap:10px!important;flex-direction:column!important;align-items:flex-start!important}
  #apiStatusGrid{display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important}
  #apiStatusGrid > *{min-width:0!important;min-height:0!important;width:auto!important;margin:0!important}
}

/* ---------- Round 2: cards with a status rule are square, empty containers collapse ---------- */
.professor-demo-card,.settings-data-source-grid article,.weekly-snapshot-card,.copilot-action,.plan-sprint-card,.freshness-card,.pulse-card,.journal-entry-card,.timeline-item,.cloud-readiness-grid article,.term-card,.ratio-tile,.recommendation-panel li,.compact-card,.dna-hero,.quote-card,.market-alert-card,.suggestion-card,.professional-report-card,.verdict-panel,.check-panel li,.thesis-card,.comprehension-check,.professor-readiness-card,.copilot-next-actions,.setup-step-card{border-radius:2px!important}
body.command-mode .weekly-snapshot-panel{border-style:solid!important}
.segment.active{background-image:none!important;background-color:#1a9e6e!important;border-color:#1a9e6e!important;color:#fff!important;font-weight:600!important}
#copilotNextActions:not(:has(*)),#weeklyReportGrid:not(:has(*)),#weeklyActionStrip:not(:has(*)){display:none!important}
#copilotReportGrid > :only-child,#weeklyReportGrid > :only-child{grid-column:1/-1}
.data-quality-banner{margin-top:16px!important}
@media(min-width:701px){
  .api-command-panel div:has(> #apiStatusGrid){flex:1 1 auto;min-width:0}
  #apiStatusGrid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px!important;width:100%}
  #apiStatusGrid > *{min-width:0!important;width:auto!important;margin:0!important}
}

/* ==========================================================================
   Section header: each workspace stands on its own (Budget, Investing, Learn).
   Calm and compact, like the Virtual Market and Bullpen chrome: a coloured
   section badge in the nav, one quiet intro row, underline tabs.
   ========================================================================== */
:root{--sp-sec:#1a9e6e}
.sp-site-header .sp-site-logo-badge{color:var(--sp-sec)!important;border-color:currentColor!important}

body[class] header.topbar{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:"intro acct" "live acct";
  column-gap:40px!important;row-gap:14px!important;align-items:center!important;justify-content:stretch!important;
  margin:0 0 20px!important;padding:8px 2px 24px!important;
  background:none!important;border:none!important;border-bottom:1px solid #e4e7ed!important;border-radius:0!important;box-shadow:none!important;
}
body header.topbar::after{display:none!important}
body header.topbar > div:first-child{grid-area:intro;display:block!important;min-width:0}
body header.topbar .eyebrow{display:flex!important;align-items:center;gap:9px;margin:0 0 10px!important;font-family:var(--sp-font-mono)!important;font-size:11.5px!important;font-weight:500!important;letter-spacing:.08em!important;text-transform:uppercase!important;color:#5a6478!important}
body header.topbar .eyebrow::before{content:"";flex:none;width:7px;height:7px;background:var(--sp-sec)}
body header.topbar h2,body header.topbar #workspaceTitle{margin:0!important;font-size:22px!important;line-height:1.25!important;letter-spacing:-.02em!important;font-weight:650!important;color:#12161f!important;max-width:680px}
body header.topbar .topbar-copy{margin:6px 0 0!important;font-size:14.5px!important;line-height:1.55!important;color:#5a6478!important;max-width:620px}
body header.topbar #liveDataPill{grid-area:live;display:flex!important;align-items:center!important;gap:9px!important;margin:0!important;padding:0!important;max-width:none!important;background:none!important;border:none!important;box-shadow:none!important;border-radius:0!important;order:0!important}
body header.topbar #liveDataPill > span{flex:none;width:7px!important;height:7px!important;border-radius:0!important;box-shadow:none!important}
body header.topbar #liveDataPill > div{display:flex!important;flex-wrap:wrap;align-items:baseline;gap:2px 8px}
body header.topbar #liveDataPill strong{font-size:12.5px!important;font-weight:600!important;color:#12161f!important}
body header.topbar #liveDataPill small{font-family:var(--sp-font-mono);font-size:11.5px!important;font-weight:400!important;color:#6b7383!important}
body header.topbar #accountWidget{grid-area:acct;display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;justify-content:flex-end!important;gap:6px 12px!important;max-width:none!important;margin:0!important;padding:0!important;background:none!important;border:none!important;box-shadow:none!important;text-align:left!important}
body header.topbar #accountStatus{font-family:var(--sp-font-mono)!important;font-size:11px!important;font-weight:500!important;letter-spacing:.08em!important;text-transform:uppercase!important;color:#6b7383!important}
body header.topbar #accountName{font-size:13.5px!important;font-weight:600!important;color:#12161f!important}
body header.topbar .account-widget-actions{display:flex!important;gap:6px!important;margin-left:4px}
body header.topbar .account-widget-actions .small-button{height:34px!important;padding:0 12px!important;border-radius:3px!important;font-size:13px!important}

/* Section tabs: underline tabs in the section colour */
.invest-nav,.learning-area-tabs,.savings-section-nav{background:#fff!important;border:1px solid #e4e7ed!important;border-radius:6px!important;box-shadow:none!important}
.invest-nav{padding:0 8px!important;margin-bottom:20px!important}
.invest-nav-header{display:flex!important;align-items:center!important;gap:6px!important;min-height:0!important;padding:0!important;border:none!important;background:none!important}
.invest-nav-label{flex:none;padding:0 14px 0 8px!important;margin-right:4px;border-right:1px solid #e4e7ed;font-family:var(--sp-font-mono)!important;font-size:11px!important;font-weight:500!important;letter-spacing:.08em!important;color:#6b7383!important}
.invest-nav-tabs{display:flex!important;gap:0!important;overflow-x:auto;scrollbar-width:none;flex:1;min-width:0}
.invest-nav-tabs::-webkit-scrollbar{display:none}
.invest-tab,.learning-area-tab,.savings-section-nav .savings-tab{flex:none!important;display:inline-flex!important;align-items:center!important;gap:8px!important;height:50px!important;min-height:0!important;padding:0 14px!important;margin:0!important;background:none!important;border:none!important;border-radius:0!important;box-shadow:none!important;color:#5a6478!important;font-size:14.5px!important;font-weight:500!important;transform:none!important}
.invest-tab svg{width:15px!important;height:15px!important;stroke-width:1.8!important;opacity:.8}
.invest-tab:hover,.learning-area-tab:hover,.savings-section-nav .savings-tab:hover{color:#12161f!important}
.invest-tab.active,.learning-area-tab.active,.savings-section-nav .savings-tab.active{color:#12161f!important;font-weight:600!important;box-shadow:inset 0 -2px 0 var(--sp-sec)!important;background:none!important}
.savings-section-nav{display:flex!important;gap:0!important;padding:0 8px!important;overflow-x:auto;scrollbar-width:none;grid-template-columns:none!important}
.savings-section-nav::-webkit-scrollbar{display:none}
.savings-section-nav .duo-subject-icon{display:none!important}
.savings-section-nav .duo-subject-info small,.savings-section-nav .duo-subject-info span{display:none!important}
.savings-section-nav .duo-subject-info strong,.savings-section-nav .duo-subject-card.savings-tab.active .duo-subject-info strong{font-size:14.5px!important;font-weight:inherit!important;color:inherit!important}
.savings-section-nav .duo-subject-card.savings-tab,.savings-section-nav .duo-subject-card.savings-tab.active{border:none!important;outline:none!important;background:none!important}
.savings-section-nav .duo-subject-card.savings-tab.active{color:#12161f!important;box-shadow:inset 0 -2px 0 var(--sp-sec)!important}
.learning-area-tabs{padding:0 8px!important;overflow-x:auto;scrollbar-width:none}
.learning-area-tabs::-webkit-scrollbar{display:none}

@media(max-width:700px){
  body[class] header.topbar{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"intro" "live" "acct";row-gap:14px!important;padding:4px 0 18px!important}
  body header.topbar h2,body header.topbar #workspaceTitle{font-size:19px!important}
  body header.topbar .topbar-copy{font-size:14px!important}
  body header.topbar #accountWidget{justify-content:flex-start!important;padding-top:14px!important;border-top:1px solid #eef1f5!important}
  body header.topbar .account-widget-actions{margin-left:auto}
  .invest-nav,.learning-area-tabs,.savings-section-nav{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}
  .invest-nav-label{padding:0 10px 0 6px!important}
  .invest-tab,.learning-area-tab,.savings-section-nav .savings-tab{height:46px!important;padding:0 12px!important;font-size:14px!important}
}

/* Site nav on the workspaces: quiet grey links, the current section underlined in its colour */
#sp-nav-center a{color:#5a6478!important}
#sp-nav-center a:hover{color:#12161f!important}
#sp-nav-center a[aria-current="page"]{color:#12161f!important;text-decoration-color:var(--sp-sec)!important}
#sp-mobile-menu a{color:#12161f!important}
#sp-mobile-menu a[aria-current="page"]{color:var(--sp-sec)!important}

/* Term Guide: one quiet line under the header */
body[class] .help-launcher{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;flex-wrap:wrap;gap:8px 12px!important;margin:0 0 18px!important;padding:0!important;background:none!important;border:none!important;box-shadow:none!important;border-radius:0!important;text-align:left!important}
body[class] .help-launcher .primary-button{width:auto!important;flex:none!important;height:32px!important;padding:0 12px!important;border:1px solid #e4e7ed!important;border-radius:3px!important;background:#fff!important;color:#12161f!important;font-size:13px!important;font-weight:600!important;box-shadow:none!important}
body[class] .help-launcher .primary-button:hover{border-color:#12161f!important}
body[class] .help-launcher span{font-size:13px!important;color:#6b7383!important;padding:0!important}

/* Section heroes inside the workspaces: same content, calmer size */
.savings-hero h2,.education-hero h2,.plan-hero h2{font-size:clamp(26px,3.2vw,40px)!important;line-height:1.08!important;letter-spacing:-.03em!important}
@media(max-width:700px){.savings-hero h2,.education-hero h2,.plan-hero h2{font-size:27px!important}}

/* Dialogs (setup, learning notice, account, settings)
   - sit above the site header and the Share button, in the same order as before
   - scroll inside the dim backdrop when the card is taller than the screen
   - one clear close button in the card's top-right corner */
.onboarding-overlay{z-index:10010!important}
.educational-overlay,.account-overlay,.settings-overlay{z-index:10020!important}
.onboarding-overlay,.educational-overlay,.account-overlay,.settings-overlay{overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;place-items:start center!important;padding:24px 16px!important}
.onboarding-overlay>.onboarding-card,.educational-overlay>.educational-card,.account-overlay>.account-card,.settings-overlay>.settings-card{margin-block:auto!important}
.educational-card,.account-card,.settings-card{max-height:none!important;overflow:visible!important}
.onboarding-card,.account-card,.settings-card{position:relative!important}
.onboarding-card .onboarding-title{padding-right:48px}
body .info-close{position:relative;display:inline-grid!important;place-items:center;width:32px!important;height:32px!important;padding:0!important;border:1px solid #e4e7ed!important;border-radius:6px!important;background:#fff!important;color:#12161f!important;font-size:0!important;line-height:0!important;cursor:pointer;transition:border-color .15s,background-color .15s}
body .info-close::before{content:'';width:12px;height:12px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.5 1.5l9 9m0-9l-9 9' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.5 1.5l9 9m0-9l-9 9' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat}
body .info-close:hover{border-color:#12161f!important;background:#f6f7f9!important;color:#12161f!important}
body .info-close:focus-visible{outline:2px solid #1a9e6e;outline-offset:2px}
#skipOnboardingButton,#closeAccountButton,#closeSettingsButton{position:absolute!important;top:14px;right:14px;width:40px!important;height:40px!important;z-index:1}
.account-card>.section-title,.settings-card>.section-title{padding-right:48px}

/* Phones and short screens: the setup card is a compact sheet that fits one screen.
   Steps swipe sideways, the two main buttons stay pinned at the bottom of the card. */
@media(max-width:640px){
  .onboarding-overlay,.educational-overlay,.account-overlay,.settings-overlay{padding:12px!important}
  .educational-card,.account-card,.settings-card{padding:20px 18px!important}
  #closeAccountButton,#closeSettingsButton{top:10px;right:10px}
}
@media(max-width:640px),(max-height:560px){
  .onboarding-overlay{padding:12px!important}
  .onboarding-overlay>.onboarding-card{display:flex!important;flex-direction:column;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;padding:18px 18px 0!important}
  #skipOnboardingButton{top:10px;right:10px}
  .onboarding-card .onboarding-title{padding-right:52px;flex:none}
  .onboarding-card .eyebrow{font-size:11px!important;margin:0 0 6px!important}
  .onboarding-card h2{font-size:20px!important;line-height:1.15!important;margin:0!important}
  .onboarding-card .onboarding-title .table-note{display:block;margin-top:6px;font-size:13px!important;line-height:1.45!important}
  .onboarding-steps{display:flex!important;flex:none;gap:8px!important;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding:0 18px;margin:14px -18px 12px!important;padding:0 18px!important;scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 18px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 18px),transparent)}
  .onboarding-steps::-webkit-scrollbar{display:none}
  .onboarding-steps article{flex:0 0 min(74%,250px);scroll-snap-align:start;display:grid!important;grid-template-columns:24px minmax(0,1fr);column-gap:10px;align-items:start;align-content:start;padding:12px!important}
  .onboarding-steps article>span{grid-row:1/3;width:24px!important;height:24px!important;font-size:12px!important}
  .onboarding-steps article>strong{margin-top:2px!important;font-size:14px!important;line-height:1.3}
  .onboarding-steps article>p{grid-column:2;margin-top:3px!important;font-size:12.5px!important;line-height:1.4!important}
  .onboarding-route-grid{flex:none;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin:0 0 10px!important}
  .onboarding-route-grid button{padding:10px 12px!important}
  .onboarding-route-grid strong{font-size:14px!important;line-height:1.3}
  .onboarding-route-grid span{font-size:12px!important;margin-top:2px!important}
  .onboarding-card>.helper-text{order:4;margin:0 0 12px!important;font-size:12px!important;line-height:1.4}
  .onboarding-actions{order:5;position:sticky;bottom:0;z-index:1;flex:none;align-self:stretch;width:auto!important;max-width:none!important;flex-wrap:nowrap!important;gap:8px!important;margin:auto -18px 0!important;padding:12px 18px!important;background:#fff;border-top:1px solid #eef1f5}
  .onboarding-actions>button{flex:1 1 0;min-width:0;height:44px!important;padding:0 10px!important;white-space:nowrap}
}
@media(max-height:560px) and (min-width:641px){
  .onboarding-overlay>.onboarding-card{width:min(720px,100%)!important;max-width:720px!important}
  .onboarding-route-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(min-width:900px){.onboarding-card{width:min(760px,100%)!important;max-width:760px!important;padding:28px!important}}
