/* JB Retire Calculator — scoped frontend styles */
.jbrc-wrap *          { box-sizing: border-box; margin: 0; padding: 0; }
.jbrc-wrap            { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 15px; color: #1a1a1a; max-width: 860px; margin: 0 auto; padding: 1rem 4px; line-height: 1.55; }

/* tabs */
.jbrc-tabs            { display: flex; gap: 2px; border-bottom: 1.5px solid #d0d8e4; margin-bottom: 1.4rem; overflow-x: auto; }
.jbrc-tab             { padding: 8px 18px; font-size: 13px; font-weight: 500; background: none; border: none; border-bottom: 2.5px solid transparent; color: #666; cursor: pointer; margin-bottom: -1.5px; transition: color .15s, border-color .15s; white-space: nowrap; }
.jbrc-tab.active,
.jbrc-tab:hover       { color: #1a3a5c; }
.jbrc-tab.active      { border-bottom-color: #1a3a5c; }

/* panels */
.jbrc-panel           { display: none; }
.jbrc-panel.active    { display: block; }

/* section label */
.jbrc-section-label   { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: #7a8a9a; margin: 1.3rem 0 .65rem; }
.jbrc-section-label:first-child { margin-top: 0; }

/* input grid */
.jbrc-grid            { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.jbrc-field           { display: flex; flex-direction: column; gap: 5px; }
.jbrc-field label     { font-size: 12px; color: #555; }
.jbrc-field select    { padding: 6px 10px; border: 1px solid #c8d3df; border-radius: 6px; font-size: 13px; background: #fff; color: #1a1a1a; cursor: pointer; width: 100%; }
.jbrc-field select:focus { outline: 2px solid #2471a3; outline-offset: 1px; }

/* sliders */
.jbrc-slider-row      { display: flex; align-items: center; gap: 10px; }
.jbrc-slider-row input[type=range] { flex: 1; height: 4px; cursor: pointer; accent-color: #1a3a5c; }
.jbrc-val             { font-size: 13px; font-weight: 600; color: #1a3a5c; min-width: 72px; text-align: right; }

/* metric cards */
.jbrc-metrics         { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 1.2rem; }
.jbrc-metric          { background: #f4f7fb; border-radius: 8px; padding: 10px 13px; }
.jbrc-metric-label    { font-size: 10.5px; color: #7a8a9a; margin-bottom: 3px; }
.jbrc-metric-value    { font-size: 17px; font-weight: 600; color: #1a3a5c; line-height: 1.2; }
.jbrc-metric-sub      { font-size: 10px; color: #aab; margin-top: 2px; }
.jbrc-pos             { color: #1a7a5a !important; }
.jbrc-neg             { color: #c0392b !important; }
.jbrc-warn            { color: #b7770d !important; }

/* charts */
.jbrc-chart-wrap      { position: relative; width: 100%; height: 270px; margin-bottom: 1.2rem; }

/* legend */
.jbrc-legend          { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; font-size: 12px; color: #555; }
.jbrc-legend span     { display: flex; align-items: center; gap: 6px; }
.jbrc-dot             { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* info box */
.jbrc-info-box        { background: #eef3fa; border-left: 3px solid #2471a3; padding: 9px 13px; font-size: 12px; color: #444; border-radius: 0 4px 4px 0; margin: 0; line-height: 1.6; }

/* divider */
.jbrc-divider         { height: 1px; background: #d8e2ed; margin: 1.6rem 0; }

/* email block */
.jbrc-email-block     { margin-bottom: 1.5rem; }
.jbrc-email-intro     { font-size: 13.5px; color: #444; margin-bottom: .8rem; }
.jbrc-email-row       { display: flex; gap: 10px; flex-wrap: wrap; }
.jbrc-email-row input[type=email] { flex: 1; min-width: 220px; padding: 10px 14px; border: 1.5px solid #c8d3df; border-radius: 8px; font-size: 14px; color: #1a1a1a; transition: border-color .15s; }
.jbrc-email-row input[type=email]:focus { outline: none; border-color: #1a3a5c; }
#jbrc-submit          { padding: 10px 22px; background: #1a3a5c; color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, transform .1s; white-space: nowrap; }
#jbrc-submit:hover    { background: #1f4d7a; }
#jbrc-submit:active   { transform: scale(.97); }
#jbrc-submit:disabled { background: #8aa4be; cursor: not-allowed; }
.jbrc-msg             { margin-top: .6rem; font-size: 13px; min-height: 1.4em; }
.jbrc-msg.success     { color: #1a7a5a; }
.jbrc-msg.error       { color: #c0392b; }

@media (max-width: 520px) {
  .jbrc-email-row     { flex-direction: column; }
  .jbrc-grid          { grid-template-columns: 1fr; }
}
