/* :root variable definitions moved to dark_mode.css/light_mode.css --
   exactly one of those two files is loaded at a time (index.php),
   supplying every --variable this file and others reference.

   This file has 271 separate var(--...) references throughout it --
   nearly the entire visual system (colors, borders, radii) depends on
   one of those two files actually being loaded alongside this one and
   BEFORE it. If index.php's theme <link> tag isn't present, or
   dark_mode.css/light_mode.css aren't deployed to the server, every one
   of those 271 references silently resolves to nothing at once --
   producing widespread, seemingly-unrelated breakage (layout falling
   apart, min-widths disappearing, canvas elements rendering empty) that
   looks like it's this file's fault, but is really a missing dependency.

   A fallback @import was tried here and deliberately removed: importing
   dark_mode.css directly into this file would have inserted its :root
   rules into the cascade AFTER wherever this file itself loads --
   meaning dark_mode.css's values would always win, even when
   light_mode.css was the actively selected theme, silently breaking
   theme-switching every time this file was present. Correctness here
   depends on deployment, not a workaround: index.php, main_app.css, AND
   whichever of dark_mode.css/light_mode.css is active all need to ship
   together. */



*,
*::before,
*::after {
    box-sizing: border-box;
}


BODY.logged_out .logo {
    background-image: url(../images/dark_mode/willowbie_logo_white.png);
    background-size: contain;
    background-repeat: no-repeat;
}

.time-bar-hash {
    stroke: var(--timebar-hash);
    stroke-width: 1;
}



.time-bar-fill {
    fill: var(--timebar-fill);
}



.time-bar-track {
    fill: var(--timebar-track);
}


DIV.account_items .theme div:first-child {
    flex: 20 !important;
    display: flex;
    align-items: center;
}


.main .theme-rest-of-us {
    background-image: url(../images/backgrounds/couple_sunset.jpg);
    background-size: cover;
    background-position: bottom center;
}

DIV.truth-matrix-container div {
    background: #000000b0;
    margin: 0 0.5rem;
    border-radius: 0.6rem;
    padding: 1.5rem 2.8rem;
    border: 1px solid #0b0b0b;
}



DIV.truth-matrix-container div p {
    color: #e5e5e5;
    font-size: 1.1em;
}


.main .theme-sandbox-capabilities {    
    background-image: url(../images/backgrounds/your_sandbox_blue.jpg);
    background-size: cover;
    background-position: bottom center;
}

.main .theme-self-directed-proof {
    background-image: url(../images/backgrounds/self_directed.jpg);
    background-size: cover;
    background-position: bottom center;
}


/* Age-label row (task B) -- centered on each hash mark's x-position via
   text-anchor:middle, matching timebar.js's own "JS computes positions,
   CSS decides how it looks" division used everywhere else in this file. */

.time-bar-label-text {
    fill: var(--timebar-hash, #ffffff);
    text-anchor: middle;
}

.time-bar-label-row {
    opacity: 0.85;
    cursor: default !important;
    border: none !important;
}



svg.time-bar-label-svg {
    background-color: transparent !important;
    background: none !important;
}



/* BUGFIX: svg.time-bar-label-svg's own transparency wasn't enough on its
   own -- the SVG sits inside a .time_bar div, and .wizard-canvas .time_bar
   (the general rule every real time bar uses, for its own dark track)
   gives that wrapper a solid black background. The SVG being transparent
   just let that black div show through underneath it. This targets the
   actual wrapper (.time_bar_labels, the second class buildTimeBarLabelRow()
   gives it specifically for this purpose) to override that inherited
   black background directly. */

.time_bar.time_bar_labels {
    background: none !important;
}



/* BUGFIX: .time-bar-label-row:hover alone has the EXACT SAME specificity
   as .wizard-row:hover (one class + one pseudo-class each) -- when two
   rules tie on specificity, the one written LATER in the file wins,
   regardless of which one looks more specific to the eye. .wizard-row:hover
   is defined much later in this file (main wizard-row section), so it was
   always going to win the tie, even with the earlier space-before-:hover
   typo fixed. The real fix combines BOTH classes in one selector
   (.wizard-row.time-bar-label-row:hover), which has genuinely higher
   specificity (two classes + one pseudo-class) -- this wins no matter
   where either rule sits in the file, not by luck of ordering. */

.wizard-row.time-bar-label-row:hover {
    background: none !important;
    border: none !important;
    cursor: default !important;
}

:root {
    --mono: 'IBM Plex Mono', monospace;
    --sans: 'IBM Plex Sans', sans-serif;
}



body {
    color: var(--text);
    font-family: var(--sans);
}



.property_wizard .more_choices {
    flex: 3;
}


#account_settings .account_items {
    /*! background: red; */
    max-height: calc(100vh - 30rem);
    min-height: 30rem;
    overflow-y: auto;
    /*! min-width: 800px; */
    padding-right: 2.0rem;
}

.account_items .two_col div.label {
    flex: 2;
    font-weight: bold;
}

div, span, label, p {
    font-family: var(--sans);
}

span.not_bold {
    font-weight: normal;
}


div.prop_title input {
    border: 1px solid var(--dialog_border);
}

.content-block {
    display: flex;
}



div.register {
    color: rgb(35, 35, 35);
}


.capability-feature-grid .header {
    display: flex;
    align-items: flex-end;
}



div.input_label {
    display: flex;
    align-items: center;
}



#property .more_choices {
    flex: 7;
}

.single_scenario {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}



.scenario_name {
    flex: 0 0 auto;
}



#single_scenario {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    overflow: hidden;
}



.scenario_tab_header {
    flex: 0 0 auto;
}



.scenario_detail {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
}



.tab_header .spacer {
    flex: 1;
    border-bottom: 1px solid var(--border);
}



body {
    /*! overflow-y: hidden; */
}

.no_scroll {
    overflow-y: hidden;
}


.scenario_info {
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom-left-radius: 0.8rem;
    border-bottom-right-radius: 0.8rem;
    background: var(--detail_header_bar_bg);
    border-right: 1px solid var(--border);
    overflow-y: auto;
}



.border_box {
    background: var(--border_box_bg);
    border-radius: 0.6rem;
    border: 1px solid var(--border_box_border);
}









::-webkit-scrollbar-track {
    background: var(--surface);
}



::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 0.3rem;
}



/* ── Topbar ── */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.33);
    border-bottom: 1px solid #0009;
    position: sticky;
    top: 0;
    z-index: 100;
    position: fixed;
    width: 100%;
}

.topbar .main_menu ul {
    list-style: none;
}

.topbar .main_menu ul li {
        font-weight: bold;
        margin: 0;
    color: rgb(227, 227, 227);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    box-sizing: border-box;
    
}


.topbar .main_menu ul li div {
    padding: 0.4rem 1.0rem;
    margin: 0.2rem -0.2rem;
    border: 0.2rem solid #0000;
    font-size: 1.1rem;
}

.topbar .main_menu ul li div span {
    padding: 0.4rem 0;
    margin: 0.2rem 0;
    border: 0.2rem solid #0000;
}

.topbar .main_menu ul li.selected div span {
    border-bottom: 0.2rem solid red;
}



.topbar .main_menu ul li div:hover {
    background: rgba(0, 0, 0, 0.6);
        color: rgb(255 255 220);
}

BODY.logged_in .topbar .main_menu {
    display: none;
}



.dialogProperty .ui-dialog-titlebar {
    margin-top: 0;
    padding-top: 0.7rem !important;
    padding-bottom: 0.7rem !important;
}


.dialogProperty  {
    padding-left: 1.0rem !important;
    padding-right: 1.0rem !important;
}
.dialogProperty .prop_title  {
    margin-bottom: 1.0rem;
}

.dialogProperty h3  {
    margin-top: 1.0rem;
}


.dialogProperty .ui-dialog-titlebar .object_title p {
    padding-left: 0.4rem;
}

BODY.logged_in .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /*! background: var(--header); */
    /*! border-bottom: 1px solid var(--border); */
    /*! position: sticky !important; */
    /*! top: 0; */
    z-index: 100;
    /*! position: static !important; */
    /*! min-height: 30px; */
    /*! position: unset; */
    border: 1px solid #0000;
    background: none;
}

BODY.logged_in {
    margin-top: 4.7rem;
}



.logo {
    font-family: var(--mono);
    font-weight: 500;
    letter-spacing: -.0.3rem;
}

.logo span {
    /*! color: var(--accent); */
}



.logo span {
    /*! color: var(--accent); */
}



.topbar-right {
    display: flex;
    align-items: center;
}



.user-badge {
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    position: relative;
}



.user-badge.paid {
    color: var(--accent);
    border-color: var(--accent);
}



.user-menu {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    z-index: 500;
    display: none;
    overflow: hidden;
    box-shadow: 0 0.8rem 20.4rem rgba(0, 0, 0, .4);
}



.user-menu.open {
    display: block;
}



.user-menu-item {
    cursor: pointer;
    color: var(--muted);
    transition: background .12s;
}



.user-menu-item:hover {
    background: var(--surface2);
    color: var(--text);
}



.user-menu-item.danger {
    color: var(--red);
}



.conn-dot {
    border-radius: 50%;
    background: var(--border2);
    display: inline-block;
}



.conn-dot.live {
    background: var(--green);
}



.conn-dot.sim {
    background: var(--amber);
}



/* ── Layout ── */

.app {
    display: flex;
    overflow: hidden;
}



.sidebar {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}



#landing_page {
    background: #0f0e30;
    color: #ffffff;
    align-items: center;
}

/* Scoped to #landing_page specifically (spec addendum) -- the shared
   .btn-primary rule elsewhere in this file still correctly uses
   var(--accent), since every OTHER primary button in the app should
   still follow whichever theme is active. Only the landing page's own
   buttons (an anonymous visitor, with no theme preference of their own
   yet) need a fixed, hardcoded color regardless of whatever theme file
   happens to be loaded -- same reasoning as #authView's own hardcoded
   colors above. */
#landing_page .btn-primary {
    background: #3d7eff;
    border-color: #3d7eff;
    color: #ffffff;
}

#landing_page .btn-primary:hover {
    background: #2960d4;
}









.main {
    flex: 1;
    overflow-y: auto;
}

#why_we_matter_page {
    background: linear-gradient(to bottom, #b5b5b5 0%,#ffffff 26%);
}

#faqs_page {
    background-image: url(../images/backgrounds/faqs_bg.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top center;
    min-height: 50vh;
}

.faqs_container .two_col div {
    align-items: center;
    display: flex;
    align-content: center;
}



.why_we_matter {
    padding: 24vh 15vw !important;
}

#why_we_matter_page .graphic {
    background-image: url(../images/pyramid.svg);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    min-height: 50vh;
}

#why_we_matter_page .column1 {
    min-width: 30vw;
}
#why_we_matter_page .column1 {
    min-width: 30vw;
    display: flex;
    align-items: center;
}
#why_we_matter_page .column1 p {
    margin: 1.5rem 0;
}

.ad-sidebar {
    background: var(--ad-sidebar-bg);
    flex-shrink: 0;
    flex-direction: column;
}



.ad-sidebar.visible {
    display: flex;
}



.ad-slot {
    background: var(--ad-bg-color);
    border: 1px dashed var(--border2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}



.ad-slot-label {
    color: var(--muted);
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: .06em;
}



.ad-slot-note {
    color: var(--ad-text-color);
    text-align: center;
}



.ad-upsell {
    background: rgba(61, 126, 255, .07);
    border: 1px solid rgba(61, 126, 255, .2);
    border-radius: var(--radius-lg);
    color: var(--muted);
}



.ad-upsell strong {
    color: var(--accent);
    display: block;
}



/* ── Sidebar nav ── */



.sidebar-label {
    font-family: var(--mono);
    letter-spacing: .08em;
    color: var(--muted);
    text-transform: uppercase;
}



#config_json {
    position: absolute;
    bottom: 1.0rem;
    right: 2.0rem;
    background: var(--input_bg);
    padding: 0.5rem;
    font-weight: bold;
}

#config_json p {
      font-size: 1.0rem;
    font-weight: bold;
}



.nav-item {
    display: flex;
    align-items: center;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--muted);
    transition: background .12s, color .12s;
    user-select: none;
    display: block;
    background-repeat: no-repeat;
    background-position: 0.8rem center;
}



.nav-item:hover {
    background-color: var(--text-hover-bg);
    background-color: var(--nav_item_hover_bg);
    color: var(--nav_item_hover_color);
}



.sidebar-section .tax {
    background-image: var(--icon_tax);
    background-size: 2.4rem 2.4rem;
}

.sidebar-section .debt {
    background-image: var(--icon_debt);
    background-size: 2.4rem 2.4rem;
}

.sidebar-section .life_expenses {
    background-image: var(--icon_expense);
    background-size: 2.3rem 2.4rem;
}

.sidebar-section .income {
    background-image: var(--icon_income);
    background-size: 2.5rem 2.4rem;
}

.sidebar-section .assets {
    background-image: var(--icon_assets);
    background-size: 2.5rem 2.4rem;
}



.sidebar-section .property {
    background-image: var(--icon_property);
    background-size: 2.8rem 2.4rem;
    background-position: 0.6rem center;
}



.sidebar-section .vehicles {
    background-image: var(--icon_vehicles);
    background-size: 2.5rem 2.4rem;
    background-position: 0.7rem center;
}



.sidebar-footer .review {
    background-image: var(--icon_review);
    background-size: 2.5rem 2.4rem;
}



.sidebar-footer .dashboard {
    background-image: var(--icon_dashboard);
    background-size: 2.5rem 2.2rem;
}



.sidebar-footer .save {
    background-image: var(--icon_save);
    background-size: 2.3rem 2.4rem;
    background-position: 1.0rem center;
}



.sidebar-footer .copy {
    background-image: var(--icon_copy);
    background-size: 2.0rem 2.4rem;
    background-position: 1.1rem center;
}



.nav-item.active {
    background: rgba(61, 126, 255, .12);
    color: var(--accent);
}



.nav-icon {
    text-align: center;
    flex-shrink: 0;
}



.sidebar-footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-family: var(--mono);
}



/* ── Screens ── */

.screen {
    display: none;
}



.off_screen {
    display: block;
    position: absolute;
    top: -1240.4rem;
}



.screen.active {
    display: block;
}





.page-title {
    font-weight: 600;
}



.page-sub {
    color: var(--muted);
}



/* ── Cards ── */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}



.card-title {
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    font-family: var(--mono);
}



/* ── Forms ── */





.form-row label {
    display: block;
    color: var(--muted);
    font-family: var(--mono);
}



input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=time],
input[type=date],
select,
textarea {
    background: var(--input_bg);
    border: 1px solid var(--input_border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--sans);
    outline: none;
    transition: border-color .15s;
}



.border_box .percent-slider-display,
.border_box select,
.border_box input {
    background: var(--input_box_bg);
}

.account_items input {
    background-color: var(--wizard-tile-bg);
    font-weight: bold;
}


.account_items .wizard-tile {
    border: none;
    background: var(--text) !important;
    color: var(--header) !important;
    opacity: 0.85;
    cursor: pointer;
}

.account_items .wizard-tile:hover {
    opacity: 1;
}











#scenarioNameField {
    border: none;
    background: none;
    font-weight: bold;
    border-bottom: 0.2rem dashed rgb(50 50 50);
    color: rgb(250 250 220);
}





input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
}



select option {
    background: var(--bg);
}



.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}



.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}



/* ── Buttons ── */

.btn {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-family: var(--sans);
    cursor: pointer;
    transition: all .12s;
    font-weight: 500;
}



.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}



.btn-primary:hover {
    background: var(--accent-d);
}



.btn-primary:disabled {
    opacity: .5;
    cursor: not-allowed;
}



.btn-ghost {
    background: transparent;
    color: var(--muted);
    border-color: var(--border);
}



.btn-ghost:hover {
    background: var(--surface2);
    color: var(--text);
    border-color: var(--border2);
}



.btn-danger {
    background: transparent;
    color: var(--red);
    border-color: rgba(239, 68, 68, .4);
}



.btn-danger:hover {
    background: rgba(239, 68, 68, .1);
}



.btn-amber {
    background: rgba(245, 158, 11, .12);
    color: var(--amber);
    border-color: rgba(245, 158, 11, .4);
}



.btn-amber:hover {
    background: rgba(245, 158, 11, .2);
}





#user-badge-label,
#logoutBtn {
    display: none;
}



#user-badge-label {
    color: #a0a0a0;
}



#user-badge-label span {
    font-weight: bold;
    color: var(--text);
}



/* ── Badges ── */

.badge {
    display: inline-block;
    font-family: var(--mono);
    border-radius: 0.3rem;
    font-weight: 500;
}



.badge-blue {
    background: rgba(61, 126, 255, .15);
    color: var(--accent);
}



.badge-green {
    background: rgba(34, 197, 94, .15);
    color: var(--green);
}



.badge-amber {
    background: rgba(245, 158, 11, .15);
    color: var(--amber);
}



.badge-red {
    background: rgba(239, 68, 68, .15);
    color: var(--red);
}



.badge-gray {
    background: var(--surface2);
    color: var(--muted);
}



.badge-lock {
    background: rgba(239, 68, 68, .1);
    color: var(--red);
}



/* ── Tables ── */

.data-table {
    border-collapse: collapse;
}



.data-table th {
    text-align: left;
    font-family: var(--mono);
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}



.data-table td {
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}



.data-table tr:last-child td {
    border-bottom: none;
}



.data-table tr:hover td {
    background: var(--surface2);
}



/* ── Stop rows ── */

.stop-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    justify-content: space-between;
}



.stop-row:last-child {
    border-bottom: none;
}



.stop-num {
    border-radius: 50%;
    background: var(--surface2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    color: var(--muted);
    flex-shrink: 0;
}



.stop-info {
    flex: 6;
}



.stop-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



.stop-loc {
    color: var(--muted);
}



.stop-meta {
    font-family: var(--mono);
    color: var(--muted);
    text-align: right;
    flex: 3;
}



.stop_time_info {
    font-family: var(--mono);
    color: var(--muted);
    white-space: nowrap;
    text-align: left;
    flex: 6;
}



.stop-del {
    color: var(--red);
    background: none;
    border: none;
    cursor: pointer;
    opacity: .4;
    transition: opacity .12s;
}



.stop-del:hover {
    opacity: 1;
}



/* ── Dashboard depot tabs ── */

.depot-tabs {
    display: flex;
    flex-wrap: wrap;
}



.depot-tab {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: none;
    cursor: pointer;
    color: var(--muted);
    font-family: var(--sans);
    transition: all .12s;
    white-space: nowrap;
}



.depot-tab:hover {
    background: var(--surface2);
    color: var(--text);
}



.depot-tab.active {
    background: rgba(61, 126, 255, .12);
    color: var(--accent);
    border-color: var(--accent);
}



.depot-panel {
    display: none;
}



.depot-panel.active {
    display: block;
}



/* ── Plan cards on dashboard ── */

.plan-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
}



.plan-card.locked {
    opacity: .75;
}



.plan-card-info {
    flex: 1;
}



.plan-card-name {
    font-weight: 500;
}



.plan-card-meta {
    color: var(--muted);
    font-family: var(--mono);
}



.plan-card-actions {
    display: flex;
    flex-shrink: 0;
}



/* ── Progress stages ── */

.stage-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
}



.stage-row:last-child {
    border-bottom: none;
}



.stage-dot {
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--border2);
    transition: background .3s, box-shadow .3s;
}



.stage-dot.active {
    background: var(--accent);
    box-shadow: 0 0 0.8rem rgba(61, 126, 255, .5);
}



.stage-dot.done {
    background: var(--green);
}



.stage-dot.failed {
    background: var(--red);
}



.stage-info {
    flex: 1;
}



.stage-name {
    font-weight: 500;
}



.stage-detail {
    color: var(--muted);
    font-family: var(--mono);
}



.stage-pct {
    font-family: var(--mono);
    text-align: right;
    color: var(--muted);
}



.mini-bar-bg {
    background: var(--border);
    border-radius: 0.2rem;
    overflow: hidden;
}



.mini-bar-fill {
    border-radius: 0.2rem;
    transition: width .45s;
}



/* ── Route cards ── */

.route-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}



.route-plan-map {
    position: relative;
    overflow: hidden;
}



.map-marker-label {
    color: #FFFFFF !important;
    font-weight: bold !important;
    font-family: Roboto, Arial, sans-serif !important;
    text-shadow: 0 0 0.2rem #000 !important;
}



.route-card-head {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background .12s;
}



.route-card-head-map,
.route-card-head-data {
    flex: 1;
}





.route-card-head:hover {
    background: rgba(255, 255, 255, .025);
}



.driver-circle {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-weight: 500;
    flex-shrink: 0;
}



.route-meta {
    flex: 1;
}



.route-name {
    font-weight: 500;
}



.route-stats {
    color: var(--muted);
    font-family: var(--mono);
}



.route-body {
    border-top: 1px solid var(--border);
    display: none;
}



/* ── Map placeholder ── */

.map-ph {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}





.map-ph-icon {
    opacity: .25;
}



/* ── Stats ── */

.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}



.stat-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}



.stat-val {
    font-family: var(--mono);
    font-weight: 500;
}



.stat-lbl {
    color: var(--muted);
    font-family: var(--mono);
}



/* ── Upload zone ── */

.upload-zone {
    border: 0.2rem dashed var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}



.upload-zone:hover,
.upload-zone.over {
    border-color: var(--accent);
    background: rgba(61, 126, 255, .04);
}



.upload-icon {
    opacity: .4;
}



/* ── Alerts ── */

.alert {
    border-radius: var(--radius);
    border: 1px solid;
}



#login-modal .alert {
    border-top-color: currentcolor;
    border-right-color: currentcolor;
    border-bottom-color: currentcolor;
    border-left-color: currentcolor;
    display: none;
}

}

.alert-amber {
    background: rgba(245, 158, 11, .07);
    border-color: rgba(245, 158, 11, .25);
    color: var(--amber);
}



.alert-green {
    background: rgba(34, 197, 94, .07);
    border-color: rgba(34, 197, 94, .25);
    color: var(--green);
}



.alert-red {
    background: rgba(239, 68, 68, .07);
    border-color: rgba(239, 68, 68, .25);
    color: var(--red);
}



.alert-blue {
    background: rgba(61, 126, 255, .07);
    border-color: rgba(61, 126, 255, .25);
    color: var(--accent);
}



/* ── Tab strip ── */

.tab-strip {
    display: flex;
    border-bottom: 1px solid var(--border);
}



.tab-item {
    color: var(--muted);
    cursor: pointer;
    border-bottom: 0.2rem solid transparent;
    transition: color .12s, border-color .12s;
}



.tab-item:hover {
    color: var(--text);
}



.tab-item.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}



/* ── Preview box ── */

.preview-box {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}



.preview-box .pv-label {
    font-family: var(--mono);
    color: var(--muted);
}



.preview-box .pv-val {
    font-family: var(--mono);
    color: var(--accent);
}



/* ── Column map ── */

.colmap-row {
    display: flex;
    align-items: center;
    border-bottom: .0.5rem solid var(--border);
}



.colmap-row:last-child {
    border-bottom: none;
}



.colmap-src {
    font-family: var(--mono);
    color: var(--muted);
}



.colmap-arrow {
    color: var(--border2);
}



.colmap-sel {
    flex: 1;
}





/* ── Modal ── */

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    z-index: 400;
    display: none;
    align-items: center;
    justify-content: center;
}



.overlay.open {
    display: flex;
}



.modal {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
}



.modal-title {
    font-weight: 600;
}



.modal-footer {
    display: flex;
    justify-content: flex-end;
}



/* ── Address picker modal ── */

.addr-picker-list {
    overflow-y: auto;
}



.addr-picker-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}



.addr-picker-row:last-child {
    border-bottom: none;
}



.addr-picker-row:hover {
    background: var(--surface2);
    border-radius: var(--radius);
}



.addr-picker-name {
    font-weight: 500;
    flex: 1;
}



.addr-picker-loc {
    color: var(--muted);
}



/* ── Locked banner ── */

.locked-banner {
    background: rgba(239, 68, 68, .07);
    border: 1px solid rgba(239, 68, 68, .25);
    border-radius: var(--radius-lg);
    color: var(--red);
    display: flex;
    align-items: center;
}



/* ── Mobile ── */

.mob-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text);
}



.account-icon-btn {
    background: none;
    background-image: var(--icon_account);
    background-size: 2.0rem 2.0rem;
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}

.topbar-right button.account-icon-btn {
    display: none;
}

.logged_in .topbar-right button.account-icon-btn {
    display: block;
}

/* Demo mode (spec addendum) -- same app-shell layout as a real login
   (logged_in, above), but no real account exists, so "My Account" has
   nothing legitimate to do here -- its own actions call auth-required
   endpoints that would fail for an anonymous demo visitor. Higher
   specificity than the .logged_in rule above (extra body.demo_mode
   qualifier), so this correctly wins for a demo session even though it
   also carries the logged_in class. */
BODY.demo_mode .topbar-right button.account-icon-btn {
    display: none;
}

.account-icon-btn:hover {
    background-color: var(--text-hover-bg);
}



@media (max-width:70rem) {
    .sidebar {
        display: none;
        position: fixed;
        top: 4.8rem;
        left: 0;
        bottom: 0;
        z-index: 200;
    }



    .sidebar.open {
        display: flex;
    }



    .mob-btn {
        display: flex !important;
    }



    .ad-sidebar {
        display: none !important;
    }



    .stat-row {
        grid-template-columns: 1fr 1fr;
    }



    .form-grid,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }





    .plan-card-actions {
        flex-direction: column;
    }
}





label {
    display: block;
}



.prop_title .two_col .input_label {
    flex: 0.1;
}

.prop_title .two_col .input_label p {
    white-space: nowrap;
}



.prop_title .two_col .item input {
    font-weight: bold;
}



.object_title {
    background: var(--title_bar_bg);
    color: var(--title_bar_color);
}


.baseDialog .object_title {
    border: none;
    padding: 0rem 1.5rem 0 0.3rem;
    margin: 0;
}

.baseDialog .ui-dialog-titlebar {
    margin-bottom: 0;
    padding-bottom: 0;
}

#authView .object_title {
    background: rgb(255 255 255);
    color: rgb(0 0 0);
}



#authView {
    background: rgb(240 240 240);
    color: rgb(40 40 40);
}

#demos_page {
    background-image: url(../images/backgrounds/technology.jpg);
    background-size: cover;
    background-position: center top;
        background-repeat: no-repeat;
    min-height: 100vh;
    color: white;
    text-shadow: 0 0 2px #000;
}

#demos_page h1 {
    
    font-size: 4rem;
}

#demos_page p.h2 {
    
    font-size: 1.3rem;
    background: rgba(255, 255, 210, 0.88);
    border-radius: 0.6rem;
    padding: 1.5rem 2rem;
    margin: 2rem 0 4rem 0;
    line-height: 2.1rem;
    color: #000;
    text-shadow: none;
    border: 1px solid rgb(160 220 255);
}

#register_account {
    color: black;
    background-image: url(../images/backgrounds/register_account.jpg);
    background-size: cover;
    background-position: center bottom;
        background-repeat: no-repeat;
}

#authView input,
#authView textarea,
div.home textarea,
div.home input {
    background: rgb(223, 221, 221);
    color: rgb(40 40 40);
    border: 1px solid rgb(184, 184, 184);
    font-weight: bold;
    border-radius: 0.6rem;
    padding: 0.8rem 1.4rem;
}


div.home button,
BODY.logged_out .topbar-right a,
#authView button {
    background: rgb(218, 218, 218);
    border: 1px solid rgb(171, 171, 171);
    color: rgb(40 40 40);
}



BODY.logged_out .topbar-right a:hover,
#authView button:hover {
    background: rgb(43, 43, 43);
    border: 1px solid rgb(97, 96, 96);
    color: rgb(160, 225, 255);
}



#authView button.register_account {
    float: right;
}



#full_screen_review .object_title {
    border-radius: 0;
}



.object_title p {
    font-weight: bold;
}



span.bold {
    color: var(--bold_text);
}



input,
textarea {
    box-sizing: border-box;
}



textarea {
    font-family: monospace;
}



button {
    cursor: pointer;
    background: var(--button_bg);
    border-radius: 0.5rem;
    border: 1px solid var(--button_border);
    color: var(--button_color);
    font-weight: bold;
}

button.demo-btn {
    background: #291f70;
    padding: 0.6rem 3rem;
    position: relative;
    top: -1rem;
    margin-top: -0.5rem;
    border: 1px solid #ffffff7a;
    font-size: 1.2rem;
}


button.demo-btn:hover {
    background: #ffffffd9;
    color: black;
    border: 1px solid #000;
    box-shadow: 0px 0 8px #ffffff8a;
    text-shadow: 0 0 3px #fff;
}

#demos_page .two_col {
    margin-top: -1rem;
    position: relative;
    top: -0.5rem;
}

button:hover {
    color: var(--button_hover_color);
    background: var(--button_hover_bg);
    border: 1px solid var(--button_hover_border);
    box-shadow: 0 0 0.5rem #ffffff69;
}



button.ui-button {
    display: none;
}



.error {
    color: #b00020;
}



.ok {
    color: #087f23;
}



.banner {
    background: #fff8e1;
    border: 1px solid #f0c14b;
    border-radius: 0.4rem;
}



/* Task: each scenario is now a numbered swatch (the number sits INSIDE
   the circle, text color chosen per-swatch via getContrastingTextColor()
   in app.js -- dark swatches get white numbers, light swatches get
   black ones) with its name below it, rather than the number and name
   sitting side by side. inline-flex still wraps naturally within
   #scenarioList when there are many scenarios; flex-direction:column
   (not the previous default row) is what stacks the swatch above the
   name within each individual item now. */

ul#scenarioList {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    /* align-items: stretch is the flex default -- deliberately not
       overridden here. This is what makes every <li> in the same
       wrapped row naturally match the tallest one in that row, with no
       JS measurement or hardcoded height at all (replaces the former
       equalizeScenarioListHeights(), app.js -- removed entirely, along
       with its own known gap: it measured the tallest item across the
       WHOLE list and forced every item to that one height, even across
       unrelated rows; native row-stretch only matches siblings that
       actually share a row). */
}

ul#scenarioList li {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    border: 1px solid var(--border2);
    cursor: pointer;
    background: var(--header);
    box-sizing: border-box;
}

ul#scenarioList li:hover {
    background: var(--surface);
}

.scenario-list-swatch {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.scenario-list-name {
    font-weight: 500;
    text-align: center;
    word-break: break-word;
}



/* Bespoke dialog chrome — overrides jQuery UI's default titlebar look
     entirely (assets/js/dialog.js hollows out the generated .ui-dialog-titlebar
     and injects this markup instead). No buttons option is ever passed to
     .dialog(), so jQuery UI never creates a buttonpane footer at all —
     nothing to override there. */



.bespoke-titlebar button.bespoke-close {
    display: none;
}



.ui-dialog {
    border-radius: 0.6rem;
    overflow: hidden;
    z-index: 1000;
}



.ui-widget.ui-widget-content {
    border: 1px solid var(--dialog_border);
    background: var(--dialog_bg);
}

#share_this_account {
    padding: 1rem 3rem 2rem 3rem !important;
}

#share_this_account p {
    margin: 1rem 0;
}

.ui-widget-content {
    border: 1px solid var(--dialog_header_border);
}

.ui-widget-content a {
    color: var(--dialog_font_color);
}



.opac0 {
    opacity: 0.001;
}

#assets {
    padding-left: 2rem;
    padding-right: 2rem;
}

.ui-dialog .ui-dialog-content {
    background: var(--dialog_bg);
    z-index: 1000;
    overflow-x: hidden !important;
}

#full_screen_review {
    background: var(--surface);
}

#newScenario {
    min-height: calc(100vh - 24rem) !important;
}

#life_expenses .more_choices {
    flex: 2.5;
}



.ui-dialog {
    box-shadow: 0 0 1.3rem #00000038 !important;
}

#single_scenario legend {
    float: left;
}



#vehicles .more_choices {
    margin-left: 2rem;
    flex: 4;
}
#vehicles button.dialog-close {
    margin: 2rem 0 1rem 0;
}


legend {
    font-weight: bold;
    letter-spacing: -0.02em;
}



/* Income wizard tile palette — draggable tiles, droppable canvas */

.wizard-canvas-scroll,
.wizard-palette {
    overflow-y: auto;
}

.wizard-canvas-scroll {
    background: var(--surface);
}

.wizard-palette {
    flex-wrap: wrap;
    background: var(--wizard_palette_bg);
    border-radius: 0.5rem;
    border: 1px solid var(--wizard_canvas_border);
}



#debt .two_col div.name {
    flex: 7;
    text-align: left;
}

#debt .two_col div.value {
    flex: 7;
    text-align: right;
    font-weight: bold;
}



.wizard-tile {
    background: var(--wizard-tile-bg);
    border: 1px solid var(--wizard-title-border);
    border-radius: 0.4rem;
    user-select: none;
    background-color: var(--wizard-tile-bg-hover);
}



.ui-dialog-content .wizard-tile {
    background-color: var(--wizard-tile-bg);
    background-size: 1.4rem 1.4rem;
}

.ui-dialog-content .wizard-tile:hover {
    background-color: var(--wizard-tile-bg-hover);
    background-image: var(--wizard-tile-background-image);
    background-size: 1.4rem 1.4rem;
    background-position: left center;
    background-repeat: no-repeat;
}



.ui-dialog-content .wizard-canvas {
    background: rgba(0,0,0,0.2);
}



.property-cost-canvas, .property-cost-palette {
    overflow-y: auto;
}



.wizard-tile.ui-draggable-dragging {
    opacity: 0.6;
}



.wizard-canvas {
    border: 1px solid var(--wizard_canvas_border);
    border-radius: 0.6rem;
    background: var(--surface) !important;
}



/* Age-label row + scrolling item rows (this round's task) --
   .wizard-canvas above stays the outer, bordered wrapper exactly as
   before (unchanged, so every existing selector targeting it, like
   .wizard-canvas .time_bar below, still matches correctly); these two
   new inner divs split its content into a non-scrolling label row and a
   separately-scrolling row list beneath it. Its max-height/overflow/
   background now live in the shared .wizard-canvas-scroll rule earlier
   in this file (task f), not duplicated here. */



/* Restored -- this rule was missing from the uploaded file (only its
   :hover variant remained), and nothing else in the file replaced its
   job: a visual separator between the non-scrolling label row above and
   the scrolling item rows below. Its absence looked like an accidental
   loss while experimenting with the hover rule, not a deliberate
   removal -- flagging this openly rather than silently guessing. */



.property_wizard .wizard-palette,
.property_wizard .wizard-canvas {
    background: none;
    border: none;
    border-radius: none;
}



.wizard-canvas.drop-hover {
    border-color: #2b3a55;
    background: #f5f8fc;
}



.wizard-row {
    border-radius: 0.4rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    border: 1px solid #fbfbfb00;
}


.wizard-row span.job_name {
    font-weight: bold;
}



.wizard-row .job_name span:last-child {
    float: right;
}

#vehiclesCanvas .job_name span:last-child {
    float: none;
}



.wizard-row:hover {
    background: var(--wizard_row_hover_bg);
    border: 1px solid var(--wizard_row_hover_border);
}



#mask {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
    display: block;
    top: 0;
    left: 0;
}



.ui-dialog .heading p {
    font-weight: bold;
    color: var(--heading_para_color);
}

.ui-widget-overlay {
    z-index: 1000;
}



.show_me {
    display: block !important;
}



.hide_me {
    display: none !important;
}



.three_col,
.two_col {
    display: flex;
}

#newScenario div.row2 {
    margin: 1.5rem 0 0 0;
    padding: 0;
}

#newScenario div.row2 div {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    max-height: 2.1rem !important;
}



.input_row .owner {
    flex: 4 !important;
}



.input_row .account_nickname {
    flex: 23 !important;
}



.three_col div {
    background: #00000078;
    padding: 2rem 2rem;
    border-radius: 0.6rem;
    border: 1px solid #ffffff78;
    text-align: center;
}


.demo-profile-card {
    background: #00000078;
    padding: 1rem 2rem;
    border-radius: 0.6rem;
    border: 1px solid #ffffff82;
    text-align: center;
}

.demo-profile-card p {
    padding: 3rem 0;
    position: relative;
}


.demo-profile-card div.age p {
    position: relative;
    top: -0.5rem;
    font-weight: normal;
}


.demo-profile-card:nth-child(1) {
    margin-right: 1rem;
}

.demo-profile-card:nth-child(2) {
    margin: 0 0.5rem;
}

.demo-profile-card:nth-child(3) {
    margin-left: 1rem;
}


.property_cost_items .more_choices {
    flex: 2;
}





.age_span .item {
    position: relative;
    top: -0.2rem;
}



.wage .column1 {
    flex: 10;
}





.wage .column2 {
    flex: 8;
}



.job_widget .column1 {
    flex: 14;
}



.wizard-canvas .time_bar {
    background: black;
    border-radius: 0.3rem;
    overflow: hidden;
}



.wizard-canvas .time_bar .job_time {
    background: rgb(160 220 250);
}



.wage .column1 {
    flex: 10;
}



.job_widget .column3 {
    flex: 11;
}

.two_col div {
    flex: 4;
}

#property .job-info span:nth-child(2) {
    font-weight: bold;
}

#debt_form .selection {
    flex: 10;
}
#demos_page div.age {
    flex: 2;
    white-space: nowrap;
    margin-right:1rem;
    font-weight: bold;
    text-transform: uppercase;
    font-weight: bold;
}


#demos_page div.age span {
    font-size: 4.6rem;
    position: relative;
    top: 0.5rem;
    font-weight:bold;
    letter-spacing: -0.1rem;
}

#demos_page div.snapshot {
    text-align: left;
    padding-left: 2rem;
    display: flex;
    align-items: center;
}

#demos_page div.snapshot p {
    font-size: 1.2rem;
}


#newScenario div.investment .field-tooltip-icon {
    left: 2rem !important;
}

#income .more_choices {
    flex: 4;
}


#newScenario div.lead_in {
    background: var(--tooltip_bg);
    border-radius: 0.6rem;
    border: 1px solid var(--tooltip_border);
    padding: 1.5rem;
    margin-top: 1.5rem;
    color: var(--tooltip_color);
}



.tab_header .tab {
    background: var(--detail_header_bar_bg);
    border-top-left-radius: 0.8rem;
    border-top-right-radius: 0.8rem;
    border-bottom: 1px solid #fff0;
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-left: 1px solid var(--border);
    font-weight: bold;
}



#header_table {
    display: flex;
}



.tab_header .inactive {
    color: var(--inactive_tab_color);
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--inactive_tab_bg);
}



.tab_header .inactive:hover {
    border-left: 1px solid var(--tab_hover_border);
    border-right: 1px solid var(--tab_hover_border);
    border-top: 1px solid var(--tab_hover_border);
    background: var(--tab_hover_bg);
    color: var(--tab_hover_color);
}

#taxFilingStatus {
    width: 19rem;
    
}

.two_col .item {
    flex: 1;
    white-space: nowrap;
}

div.taxState {
    position: relative;
    left: -1.5rem;
}

#tax button.field-tooltip-icon {
    left: 0.8rem;
}

.vehiclePopup .co .nickname {
    margin-right: 2rem;
    flex: 22;
}

.vehiclePopup .co .startAge {
    margin-right: 2rem;
}
.vehiclePopup p.age {
    margin-bottom: 0.5rem;
}

.vehiclePopup .co button.field-tooltip-icon {
    top: 0.4rem;
    left: 1rem;
}

.vehiclePopup .co {
}
span.fr {
    float: right;
    top: -10.5rem;
    position: relative;
}



#account_settings div.item {
    flex: 3;
    align-content: center;
}





.two_col .check {
    flex: 2;
}



.two_col .growth_rates {
    flex: 6;
}


.two_col .last_resort_card {
    flex: 3;
    padding-left: 1.5rem;
}


#assets .row2 p {
    position: relative;
    top: 1.6rem;
}



#assets .two_col .selection {
    flex: 13;
}



.assetsCanvas .wizard-row span:last-child {
    font-weight: bold;
}


#assets .two_col .more_choices {
    flex: 6;
}



.two_col .item_chooser .more_choices {
    flex: 5;
    border: 1px solid #676768;
    border-radius: 0.5rem;
}



.two_col .wizard-tips {
    flex: 4;
}



.wizard-tips p {
    color: #a0a0a0;
}



.chart-container {
    position: relative;
}

.chart-row {
    display: flex;
    align-items: center;
    position: relative;
}

.chart-label {
    position: absolute;
    left: -11rem;
    text-align: right;
}

.bar-wrapper {
    background-color: var(--risk_bar_track);
    position: relative;
}



.bar {
    background-color: var(--risk_bar);
    position: absolute;
    left: 0;
    top: 0;
}

/* Style the jQuery UI Resizable handles */

.ui-resizable-e {
    cursor: e-resize;
    right: -0.6rem;
    top: 0;
    border-top-right-radius: 0.3rem;
    cursor: ew-resize;
    border-bottom-right-radius: 0.3rem;
    background: var(--risk_bar_handle);
}

.percentage-display {
    position: absolute;
    right: -3.8rem;
}



/* Field tooltips (assets/js/tooltip.js) -- structural positioning only;
   colors/fine styling are yours to retune. */

icon {
    display: inline-flex;
    border-radius: 50%;
    border: 1px solid var(--border2, #666);
    cursor: pointer;
    vertical-align: middle;
    background-image: var(--icon_info);
    background-size: contain;
}



icon:hover {
    background-image: var(--icon_info_hover);
}

icon.add-vehicle-cost,
icon.new-scenario-btn {
    background-image: var(--icon-new-scenario);
    border: none;
}

.vehiclePopup .expenses {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.vehiclePopup .ui-dialog-titlebar {
    margin-left: -2.6rem;
    margin-right: -2.6rem;
    margin-top: -1rem;
}

.vehiclePopup .ui-dialog-titlebar .object_title p {
    padding-left: 1.5rem;
}

.vehiclePopup {
    padding: 1.0rem 2.6rem 1rem 2.6rem !important;
}

.vehiclePopup div.cost_button {
    flex: 1;
    text-align: right;
    position: relative;
    top: -0.2rem;
}

icon.add-vehicle-cost:hover,
icon.new-scenario-btn:hover {
    background-image: var(--icon-new-scenario-hover);
}

.field-tooltip-balloon {
    position: absolute;
    z-index: 10000;
    background: var(--tooltip_bg);
    border: 1px solid var(--tooltip_border);
    border-radius: var(--radius, 0.6rem);
    color: var(--tooltip_color);
}

.field-tooltip-caret {
    position: absolute;
    top: -0.6rem;
    left: 1.2rem;
    background: var(--tooltip_bg);
    border-left: 1px solid var(--tooltip_border);
    border-top: 1px solid var(--tooltip_border);
    transform: rotate(45deg);
}



/* Wizard tour (assets/js/tour.js) */

.wizard-tour-offer {
    position: fixed;
    top: 2.0rem;
    right: 2.0rem;
    z-index: 20000;
    background: var(--surface2, #1f2436);
    border: 1px solid var(--accent, #3d7eff);
    border-radius: var(--radius, 0.6rem);
    box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.25);
    animation: flyInFromRight 0.35s ease-out;
}

.wizard-tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
}

.wizard-tour-callout {
    position: absolute;
    z-index: 10002;
    background: var(--surface2, #1f2436);
    border: 1px solid var(--accent, #3d7eff);
    border-radius: var(--radius, 0.6rem);
}

.wizard-tour-highlight {
    position: relative;
    z-index: 10002;
    outline: 0.2rem solid var(--accent, #3d7eff);
    outline-offset: 0.2rem;
}



/* Calculation results table (assets/js/calculation-table.js) -- basic
   structure only, yours to style further. */

#single_scenario_table_data {
    overflow: auto;
    box-sizing: border-box;
    overflow-x: hidden;
}

.calc-results-table {
    border-collapse: collapse;
    table-layout: fixed;
}



tr.calc-detail-row td {
    background: var(--calc_detail_row) !important;
}



.calc-results-table th,
.calc-results-table td {
    text-align: right;
    white-space: nowrap;
}

.calc-summary-row td {
    border-top: none;
    border-bottom: none;
}





.calc-results-table tr.even {
    background: var(--table_row_even);
    border-bottom: 1px solid var(--table_bottom_border);
}



.calc-results-table tr.odd {
    background: var(--table_row_odd);
    border-bottom: 1px solid var(--table_bottom_border);
}



.calc-results-table th {
    background: var(--detail_header_bar_bg);
}



.calc-detail-row td {
    border-bottom: 1px solid var(--border, #2a2f42);
}

.calc-results-table th:first-child,
.calc-results-table td:first-child {
    text-align: left;
}

.calc-results-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid var(--border, #2a2f42);
}

.calc-error {
    color: var(--red, #ef4444);
}



.rt {
    text-align: right;
}

.calc-summary-row {
    cursor: pointer;
}

.calc-summary-row.expanded {
    background: var(--surface2, #1f2436);
}

.calc-detail-row td {
    background: var(--surface2, #1f2436);
}

.calc-year-detail {
    display: flex;
    flex-direction: column;
}

.calc-detail-groups-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.calc-cashflow-row {
    display: flex;
}

/* Cash Inflows/Outflows pie charts -- structure only, yours to style
   further. */

.cashflow-section {
    display: flex;
    align-items: flex-start;
}

.cashflow-pie-container {
    flex-shrink: 0;
}

.cashflow-swatch {
    display: inline-block;
    border-radius: 0.2rem;
    vertical-align: middle;
}

.calc-detail-section {
    flex-shrink: 0;
}

.calc-detail-section h4 {
    color: var(--title2);
}



p.title {
    color: var(--title2);
    font-weight: bold;
}

/* Task C: shared line-item structure (assets/js/calculation-table.js's
   buildDetailLineItem()) -- a description/amount row, replacing the
   earlier <li> list with the same .two_col pattern used throughout the
   rest of this app. */

.detail-line-item {
    justify-content: space-between;
}



/* Three-column variant (nickname | type | amount) -- used when
   buildDetailLineItem() is passed a typeLabel (Income, Savings &
   Investments), so two same-type items (two wage jobs, two retirement
   withdrawals draining different buckets) are still distinguishable by
   their own nickname, not just their shared type. */

.detail-line-item-typed {
    display: flex;
    justify-content: space-between;
}

.detail-line-item-typed .item_type p {
    opacity: 0.7;
    font-style: italic;
}







.detail-line-item .item_value p {
    text-align: right;
}



/* Task D: each property gets its own separate, visually distinct box
   within the Property group, rather than one flat combined list. */

.line_items,
.calc-property-detail {
    border: 1px solid var(--border, #2a2f42);
    border-radius: var(--radius, 0.6rem);
    background: var(--calc_prop_detail);
}



/* Percent-slider widget (assets/js/percent-slider.js) -- structural
   positioning/sizing only; colors and fine styling are yours to retune. */

.percent-slider-display {
    display: inline-block;
    border: 1px solid var(--border2, #363d54);
    border-radius: var(--radius, 0.6rem);
    cursor: pointer;
    text-align: center;
    background: var(--input_bg);
}

.percent-slider-popup {
    background: var(--surface2, #1f2436);
    border: 1px solid var(--accent, #3d7eff);
    border-radius: var(--radius, 0.6rem);
}

.percent-slider-dialog {
    z-index: 10010 !important;
}

.percent-slider-caret {
    position: absolute;
    background: var(--surface2, #1f2436);
    border-left: 1px solid var(--accent, #3d7eff);
    border-top: 1px solid var(--accent, #3d7eff);
}

.percent-slider-value {
    text-align: center;
    font-weight: bold;
}

.percent-slider-track {
    background: #494949;
    border: 1px solid #05a205 !important;
}

.percent-slider-labels {
    display: flex;
    justify-content: space-between;
    color: var(--muted, #a4accf);
}

.percent-slider-custom-btn {
    display: block;
}

.percent-custom-error {
    color: var(--red, #ef4444);
}



button.field-tooltip-icon {
    border: none;
    background-color: none;
    border-radius: 50%;
    background-image: var(--icon_info);
    background-size: contain;
    position: relative;
    top: 10.3rem;
}




.job_widget .field-tooltip-icon {
    top: -0.5rem;
    left: 0.5rem;
}



button.field-tooltip-icon:hover {
    background-image: var(--icon_info_hover);
}



/* Collapsible detail rows (assets/js/calculation-table.js) -- task H */

.calc-collapse-all-btn {
    background-image: url(../images/icon_collapse.png);
    background-repeat: no-repeat;
    background-size: 10.4rem 10.4rem;
    background-position: center;
}

.calc-collapse-all-btn:hover {
    background-image: url(../images/icon_collapse_black.png) !important;
}



@keyframes flyInFromRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}



/* Charts (assets/js/charts.js) -- structure only, yours to style further.
   Task (vi): switched from flex to a plain block container with
   text-align:center -- inline-block children (below) wrap naturally on
   their own, no flex-wrap needed, and this sidesteps the whole
   min-height:0 flexbox gotcha entirely (inline-block elements don't
   participate in flexbox's special sizing algorithm, so there's no
   flex-item "won't shrink below content" behavior to guard against in
   the first place). Matches the same approach already in place for the
   dashboard comparison charts (#scenarioComparison .chart-container). */

#single_scenario_charts_and_graphs {
    text-align: center;
}

.charts_and_graphs .chart-container {
    position: relative;
    aspect-ratio: 12 / 11;
    display: inline-block;
    vertical-align: top;
    overflow: hidden;
}



/* Protected-account note (wizard-assets.js/wizard-debt.js) -- structure
   only, yours to style further. */

.protected-account-note {
    color: var(--muted, #a4accf);
}



/* Tour button (task a) -- icon-only, no visible text, matching the
   sidebar's own icon-button convention (.sidebar-footer .save etc.). */

.wizard-tour-btn {
    background-image: var(--icon_tour_hover);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    background-color: transparent;
    cursor: pointer;
}

.wizard-tour-btn:hover {
    background-image: var(--icon_tour_hover);
    background-color: rgb(160 220 255);
    border-radius: 50% !important;
}



/* Copy Scenario wizard -- structure only, yours to style further. */

.copy-scenario-section-header {
    font-weight: bold;
    border: 1px solid var(--border2);
    background: var(--surface);
    border-radius: 0.5rem;
    color: var(--ad-text-color);
}

.copy-item-subheader {
    font-weight: bold;
    border-bottom: 0.2rem solid var(--border);
}

.copy-item-subheader-nested {
    font-weight: normal;
    font-style: italic;
}

.copy-scenario-row {
    display: flex;
    align-items: center;
}

.copy-label {
    flex: 2;
}

.copy-current {
    flex: 1;
    opacity: 0.7;
}

.copy-future {
    flex: 1;
}



#copyScenarioTable {
    overflow-y: auto;
}



/* Dashboard scenario comparison -- structure only, yours to style further. */

/* BUGFIX: the existing .chart-container sizing rule is scoped as
   .charts_and_graphs .chart-container -- it only applies inside the
   single-scenario view's own charts tab. These dashboard charts sit
   inside #scenarioComparison, not a .charts_and_graphs descendant at
   all, so they were getting NO sizing CSS whatsoever -- falling back to
   Chart.js/the browser's own canvas defaults, which is what compressed
   the plot area down to a near-flat line. A fixed height here
   (not aspect-ratio, unlike the single-scenario rule) specifically
   because the dashboard column's actual width is unpredictable -- an
   aspect-ratio would still produce a short chart in a narrow column,
   the same problem in a different shape. */

#scenarioComparison .chart-container {
    position: relative;
    display: inline-block;
    aspect-ratio: 6 / 5;
    overflow: hidden;
}

#scenarioComparison .chart-container h3 {
    text-align: center;
}



/* Same-subtype overlap confirmation (income/property) -- structure only,
   yours to style further. */



/* Full-Screen Review -- structure only, yours to style further.
   Rough per-row height estimate (~31px: 0.6rem+0.6rem padding + ~19px line
   height) used to stack the three sticky header rows without them
   overlapping each other -- if all three had top:0, row 2 and row 3
   would sit on top of row 1 instead of stacking beneath it. */

.review-table {
    border-collapse: separate;
    border-spacing: 0;
}

.review-table th,
.review-table td {
    text-align: right;
    white-space: nowrap;
}



.review-table td {
    border-bottom: 1px solid var(--table_bottom_border);
}

.review-table .review-row-header-cell {
    position: sticky;
    left: 0;
    background: var(--surface);
    text-align: left;
    font-weight: bold;
}

/* Same odd/even convention as #single_scenario_table_data
   (.calc-results-table, same --table_row_even/--table_row_odd
   variables) -- explicitly excludes .review-row-header-cell (the sticky
   Age column) via :not(), since a plain "tr td" selector would otherwise
   out-specificity the rule above and make the sticky column alternate
   color while scrolling vertically, which would look inconsistent for a
   column that's meant to stay visually fixed while everything else
   scrolls past it. */

.review-table tbody tr.even td:not(.review-row-header-cell) {
    background: var(--table_row_even);
}

.review-table tbody tr.odd td:not(.review-row-header-cell) {
    background: var(--table_row_odd);
}

.review-table thead th {
    position: sticky;
    background: var(--surface);
    z-index: 2;
}

/* top offsets for these three rows are set dynamically by
   positionStickyHeaderRows() (wizard-full-screen-review.js), not
   hardcoded here -- a fixed pixel guess goes stale the moment padding or
   font-size changes (exactly what happened once already). */

/* Task (d): Section row (row 1) labels centered -- Group/Item rows stay
   right-aligned like every other cell, only Section needed this. */

.review-table thead tr:nth-child(1) th {
    background: var(--surface);
    text-align: left;
    
}

/* The corner cells (Age column's own header cells) are sticky in BOTH
   directions at once -- need to out-rank plain sticky-top OR
   sticky-left cells scrolling underneath them either way. */

.review-table thead .review-row-header-cell {
    z-index: 3;
}

/* Task (e): alternating background per SECTION (not per column) -- every
   header cell belonging to the same section (all three rows) shares one
   of two colors, alternating Property/Income/Debt/Life Expenses so
   adjacent sections are visually distinguishable at a glance. Applied
   via a section-index data attribute set in JS (wizard-full-screen-
   review.js), since CSS alone has no way to know which columns belong
   to which section. */

.review-table thead th[data-section-parity="0"] {
    background: var(--review-header-alt-bg-2);
}

.review-table thead th[data-section-parity="1"] {
    background: var(--review-header-alt-bg);
    color: var(--review-header-alt-color);
}



.review-table tr:nth-child(3) th {
    text-align: center;
}



/* Task (f): long group labels (e.g. "Monthly Mortgage Payment") were
   forcing wide columns -- without table-layout: fixed, a table's
   columns expand to fit their longest UNBROKEN content, and these
   labels have no natural break point on their own. Constraining this
   row's own max-width and allowing normal wrapping (word-wrap/
   overflow-wrap as a fallback for any single long word) lets these
   labels wrap onto a second line instead, so the columns beneath them
   only need to be as wide as their actual DATA requires, not as wide as
   the longest label happens to be. */

.review-table thead tr:nth-child(2) th {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

icon.account-icon-btn,
icon.save,
icon.delete {
    width: 2.0rem;
  height: 2.0rem;
    min-width: 2.0rem;
  min-height: 2.0rem;
    border-radius: 0.4rem !important;
    border: none;
    opacity: 0.8;
}


icon.account-icon-btn {
    background-image: var(--icon_account);
}

body.logged_out icon.account-icon-btn,
body.logged_out icon.new-scenario-btn {
    display: none;
}

icon.save {
    background-image: var(--icon_save);
}

icon.delete {
    background-image: var(--icon_delete);
}



icon.account-icon-btn:hover,
icon.save:hover,
icon.delete:hover {
    opacity: 1;
    background-color: none;
}



/* Task (a): TRULY full-screen now (edge to edge), not just near-full --
   95vw/90vh with margins was still leaving a visible border of page
   behind it. */

.ui-dialog:has(#full_screen_review) {
    top: 0 !important;
    left: 0 !important;
}

.dialogDetailedDataReview {
    border-radius: 0 !important;
    border: none !important;;
}

.dialogDetailedDataReview .ui-dialog-titlebar {
    display: none;
}

#fullReviewTitle {
    font-weight: bold;
    font-size: 2rem;
    margin-top: -0.7rem;
    margin-bottom: 0.5rem;
}

.ui-dialog:has(#full_screen_review) .ui-dialog-content {
    overflow: auto;
}

/* BUGFIX: #reviewTableContainer never had a constrained height/overflow
   of its own -- the table's natural size (many columns wide, 40+ rows
   tall) just kept growing the DIALOG itself past the viewport, and with
   nothing to stop that, the whole PAGE scrolled to accommodate it. This
   container is now the actual scrolling ancestor -- required not just
   to contain the scroll, but for position:sticky above to have
   something real to stick WITHIN in the first place. */

#reviewTableContainer {
    overflow: auto;
}

/* Task (b): a real, always-visible close button in the header itself --
   jQuery UI's own default titlebar X exists, but a full-screen dialog's
   content can be much taller than the viewport, and this is meant to
   never depend on that default styling being reliably visible. */

.full-review-close-btn {
    background: none;
    border: none;
    cursor: pointer;
}

icon.dialog-close {
    background-image: var(--icon_close);
    background-size: cover;
}

icon.dialog-close:hover {
    background-image: var(--icon_close_hover);
}

.dialogDetailedDataReview icon.dialog-close {
    margin-left: -0.5rem;
    margin-top: -1rem;
}
/* Fly-in notifications (spec addendum, direct instruction) -- replaces
   inline <p class="error"> messages scattered across every dialog with
   a single, shared, animated notification instead, matching the kind
   of transient toast Claude's own client uses. See
   showFlyInNotification() (assets/js/dialog.js) for the JS side. */

#flyInNotificationContainer {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none; /* the container itself never blocks clicks -- only individual notifications (below) are actually interactive */
    max-width: 22rem;
}

.fly-in-notification {
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius);
    padding: 0.85rem 1.1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    pointer-events: auto;
    border-left: 4px solid var(--red);
    font-size: 0.95rem;
    line-height: 1.4;

    /* Starts off-screen and transparent; .fly-in-visible (added a tick
       after insertion, so the browser has something to transition FROM)
       animates it into view. Removing .fly-in-visible later reverses
       the same transition for the slide-out. */
    transform: translateX(130%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.fly-in-notification.fly-in-visible {
    transform: translateX(0);
    opacity: 1;
}

.fly-in-notification.fly-in-success {
    border-left-color: var(--green);
}

/* FAQs page (spec addendum, direct instruction) -- category tab bar
   mirrors .tab_header/.tab's own established look (border/radius/color
   conventions), just applied to a dynamically-generated, N-wide row of
   category tabs rather than a fixed 2. */

.faq_search_row {
    margin-bottom: 1.2rem;
}

.faqs_container .row1 div:first-child {
    flex: 50
}

div.faqs {
    padding-top: 9vh;
}

.faqs .row1 p {
    position: relative;
    top: -0.5rem;
}

.faqs .row1 {
    margin-bottom: 2rem;
}
.faqs h1 {
    position: relative;
    top: -2rem;
}
.faq_search_row input {
    min-width: 30rem;
    box-sizing: border-box;
    padding: 0.6rem 0.9rem;
    border-radius: 0.4rem;;
    font-size: 1rem;
    
    background: #c9c9c9;
    border: 1px solid #979797;
    color: black;
    font-weight: bold;
}

.faq_tab_header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.2rem;
}

.faq_tab {
    padding: 1.3rem 1.6rem;
    border-radius: 0.8rem;
    cursor: pointer;
    font-weight: bold;
    align-items: center;
    align-content: center;
    cursor: pointer;
    color: #1a1a1a;
    background: #d8d8d81c;
    border: 1px solid #b6b6b6;
}


.faq_tab:hover {
    color: black;
    background: #cdcdcd54;
    border: 1px solid #a9a9a9;
}

.faq_tab.selected {
    background: #323232;
    color: #fff;
    border: 1px solid black; /* visually merges with the accordion content below it */
    text-shadow: 0 0 3px #000;
}

/* Accordion -- collapsed by default, one open at a time (JS-enforced in
   faqs.js's wireFaqAccordionContainer()). Same item shape used for both
   the normal, category-scoped view and the flat search-results list. */

.faq_item {
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    margin-bottom: 0.6rem;
    overflow: hidden;
}

.faq_question {
    padding: 0.9rem 1.1rem;
    cursor: pointer;
    background: #ffffff4a;
    /*! border-radius: 0.5rem; */
    border: 1px solid #00000024;
}

.faq_question:hover {
    background: var(--wizard_row_hover_bg, var(--surface));
}

.faq_answer {
    padding: 0.9rem 1.1rem;
    /*! border-top: 1px solid var(--border2); */
    line-height: 1.5;
    background: #fff;
    margin-left: 4rem;
    font-weight: bold;
}

#faqNoResults {
    color: var(--muted);
    font-style: italic;
}

/* Section-title legend (spec addendum) -- slightly de-emphasized
   relative to the bold section title text itself, since it's
   supplementary reference info, not the primary label. */
.review-section-legend {
    font-weight: normal;
    font-size: 0.85em;
    /*! opacity: 0.85; */
    font-weight: bold;
}

span.review-section-title {
    font-size: 1.8rem;
    margin-right: 1.5rem;
}
