/* SuperToolZone Classic Calculator UI v3.2
   Simple, compact calculator presentation. Calculation logic and fields are unchanged. */

:root{
  --stz-classic-blue:#356b9f;
  --stz-classic-green:#4d8b25;
  --stz-classic-border:#c7cdd1;
  --stz-classic-soft:#f1f2f2;
}

/* Remove oversized visual treatment from the calculator itself. */
.stz-advanced-calculator{
  max-width:100%;
  margin:10px 0 0!important;
}
.stz-calc-workspace{
  display:grid!important;
  grid-template-columns:minmax(360px, .9fr) minmax(420px, 1.25fr)!important;
  align-items:start!important;
  gap:18px!important;
}
.stz-input-panel,
.stz-output-panel{
  min-width:0!important;
  padding:0!important;
  background:#fff!important;
  border:1px solid var(--stz-classic-border)!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
.stz-input-panel{grid-column:1!important;grid-row:1!important}
.stz-output-panel{grid-column:2!important;grid-row:1!important;position:static!important}

/* Simple panel headings. */
.stz-panel-head{
  min-height:39px!important;
  margin:0!important;
  padding:7px 10px!important;
  border-bottom:1px solid var(--stz-classic-border)!important;
  background:var(--stz-classic-blue)!important;
  color:#fff!important;
}
.stz-panel-head h3,
.stz-panel-head .stz-kicker{
  margin:0!important;
  color:#fff!important;
}
.stz-panel-head h3{font-size:1rem!important;line-height:1.25!important}
.stz-panel-head .stz-kicker{display:none!important}
.stz-print-link{
  min-height:28px!important;
  padding:3px 8px!important;
  color:#083b69!important;
  background:#fff!important;
  border:1px solid #b6c2cc!important;
  border-radius:2px!important;
  font-size:.75rem!important;
}

/* Location settings remain available but use compact rows. */
.stz-global-preferences{
  margin:0!important;
  padding:8px 10px!important;
  background:#f8fafb!important;
  border:0!important;
  border-bottom:1px solid var(--stz-classic-border)!important;
  border-radius:0!important;
}
.stz-global-preferences-head{display:none!important}
.stz-global-preferences-grid{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:5px!important;
}
.stz-global-preferences-grid label,
.stz-input-panel .stz-calc-grid>label{
  display:grid!important;
  grid-template-columns:minmax(128px, 46%) minmax(130px, 54%)!important;
  align-items:center!important;
  gap:8px!important;
  margin:0!important;
  min-height:34px!important;
  font-size:.82rem!important;
  line-height:1.2!important;
  color:#111!important;
}
.stz-global-preferences-grid label>span,
.stz-input-panel .stz-calc-grid>label>span{
  min-width:0!important;
  overflow-wrap:anywhere!important;
  font-weight:500!important;
}
.stz-global-preferences-grid select,
.stz-input-panel .stz-calc-grid input,
.stz-input-panel .stz-calc-grid select{
  width:100%!important;
  min-width:0!important;
  height:32px!important;
  min-height:32px!important;
  padding:3px 7px!important;
  border:1px solid #7a9ab8!important;
  border-radius:2px!important;
  background:#fff!important;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.08)!important;
  color:#111!important;
  font-size:.86rem!important;
  line-height:1.15!important;
}
.stz-currency-note{
  margin:5px 0 0!important;
  font-size:.66rem!important;
  line-height:1.3!important;
  color:#53636f!important;
}
.stz-calc-grid{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:3px!important;
  padding:9px 10px 4px!important;
}

/* Compact primary actions. */
.stz-calc-actions{
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  gap:7px!important;
  margin:0!important;
  padding:9px 10px!important;
  border-top:1px solid #e1e4e6!important;
  background:var(--stz-classic-soft)!important;
}
.stz-calc-actions button{
  min-height:34px!important;
  padding:5px 14px!important;
  border-radius:1px!important;
  font-size:.82rem!important;
}
.stz-calc-actions button:first-child{
  min-width:105px!important;
  background:var(--stz-classic-green)!important;
}

/* Put precision/scenario helpers below, without large cards. */
.stz-input-panel .stz-precision-row,
.stz-input-panel .stz-scenario-controls{
  margin:0!important;
  padding:6px 10px!important;
  border-top:1px solid #e2e5e7!important;
  background:#fff!important;
}

/* Result heading resembles a concise result banner. */
.stz-primary-result{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:12px!important;
  margin:0!important;
  padding:8px 11px!important;
  border-radius:0!important;
  background:var(--stz-classic-green)!important;
  box-shadow:none!important;
}
.stz-primary-result span{
  color:#fff!important;
  font-size:1.05rem!important;
  line-height:1.15!important;
  font-weight:500!important;
}
.stz-primary-result strong{
  color:#fff!important;
  font-size:1.38rem!important;
  line-height:1!important;
  font-weight:600!important;
  text-align:right!important;
  white-space:nowrap!important;
}
.stz-result-list,
.stz-output-panel .stz-result-grid{
  padding:4px 10px 7px!important;
}
.stz-calc-result{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:start!important;
  gap:12px!important;
  min-height:32px!important;
  padding:6px 0!important;
  border-bottom:0!important;
  background:transparent!important;
}
.stz-calc-result span{
  color:#111!important;
  font-size:.84rem!important;
  line-height:1.25!important;
}
.stz-calc-result strong{
  max-width:none!important;
  color:#111!important;
  font-size:.85rem!important;
  line-height:1.25!important;
  font-weight:500!important;
  text-align:right!important;
  white-space:nowrap!important;
}
.stz-result-note{
  margin:0!important;
  padding:5px 10px 8px!important;
  font-size:.67rem!important;
  line-height:1.35!important;
}

/* Advanced badges/actions stay available but no longer dominate the page. */
.stz-v2-status{
  margin:6px 0!important;
  gap:4px!important;
}
.stz-v2-badge{padding:3px 6px!important;font-size:.62rem!important}
.stz-v2-quick-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  margin:6px 0!important;
  padding:5px!important;
  gap:4px!important;
  border-radius:3px!important;
}
.stz-v2-action{min-height:28px!important;padding:3px 7px!important;font-size:.64rem!important}

/* Analysis follows beneath the two-column calculator. */
.stz-analysis{
  grid-column:1 / -1!important;
  margin-top:12px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:#fff!important;
}
.stz-tabs{
  margin:0 0 8px!important;
  padding:0!important;
  border-bottom:1px solid #9ba8b1!important;
  gap:12px!important;
}
.stz-tabs button{
  min-height:30px!important;
  padding:4px 2px!important;
  border-radius:0!important;
  background:transparent!important;
  color:#075189!important;
  font-size:.8rem!important;
  font-weight:600!important;
}
.stz-tabs button[aria-selected="true"],.stz-tabs button.active{
  border-bottom:2px solid var(--stz-classic-blue)!important;
}
.stz-chart-grid{grid-template-columns:1fr 1fr!important;gap:15px!important}
.stz-chart-grid article{
  padding:8px!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.stz-chart-grid h3{font-size:.95rem!important;margin:0 0 6px!important;text-align:center!important}
.stz-chart-grid canvas{min-height:180px!important;max-height:245px!important}
.stz-table-wrap{border:1px solid #b8c0c6!important;border-radius:0!important}
.stz-data-table{font-size:.78rem!important}
.stz-data-table th{background:var(--stz-classic-blue)!important;color:#fff!important}
.stz-data-table th,.stz-data-table td{padding:5px 7px!important;border-color:#c5cbd0!important}
.stz-steps,.stz-formula{
  padding:9px!important;
  border-radius:0!important;
  font-size:.78rem!important;
  box-shadow:none!important;
}
.stz-utility-bar{
  margin:8px 0 0!important;
  padding:5px!important;
  gap:4px!important;
  border-radius:2px!important;
}
.stz-utility-bar button{min-height:29px!important;padding:4px 8px!important;font-size:.67rem!important}

/* Keep the surrounding page, article and sidebar untouched. */
@media (max-width:980px){
  .stz-calc-workspace{grid-template-columns:minmax(320px,.95fr) minmax(350px,1.05fr)!important;gap:12px!important}
}
@media (max-width:760px){
  .stz-calc-workspace{grid-template-columns:1fr!important;gap:10px!important}
  .stz-input-panel{grid-column:1!important;grid-row:1!important}
  .stz-output-panel{grid-column:1!important;grid-row:2!important}
  .stz-analysis{grid-column:1!important;grid-row:3!important}
  .stz-chart-grid{grid-template-columns:1fr!important}
}
@media (max-width:480px){
  .stz-global-preferences-grid label,
  .stz-input-panel .stz-calc-grid>label{
    grid-template-columns:minmax(0,1fr) minmax(112px,45%)!important;
    gap:6px!important;
    min-height:32px!important;
  }
  .stz-global-preferences-grid select,
  .stz-input-panel .stz-calc-grid input,
  .stz-input-panel .stz-calc-grid select{
    height:31px!important;
    min-height:31px!important;
    font-size:16px!important;
  }
  .stz-primary-result span{font-size:.92rem!important}
  .stz-primary-result strong{font-size:1.25rem!important}
  .stz-calc-result{min-height:29px!important;padding:5px 0!important}
  .stz-calc-result span,.stz-calc-result strong{font-size:.77rem!important}
}
@media print{
  .stz-calc-workspace{grid-template-columns:1fr 1.15fr!important;gap:10px!important}
  .stz-v2-status,.stz-v2-quick-actions,.stz-utility-bar{display:none!important}
}

/* v3.3 loan schedule upgrade */
.stz-schedule-panel{margin-top:14px;border:1px solid var(--stz-border,#d9e1dd);border-radius:10px;background:#fff;overflow:hidden}
.stz-schedule-panel .stz-table-toolbar{display:flex;gap:14px;align-items:flex-end;justify-content:space-between;padding:12px 14px;background:#f7faf8;border-bottom:1px solid #d9e1dd;flex-wrap:wrap}
.stz-schedule-panel .stz-table-toolbar h3{margin:0 0 2px;font-size:1.05rem}
.stz-schedule-panel .stz-table-toolbar p{margin:0;color:#5f6c66;font-size:.82rem}
.stz-schedule-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.stz-schedule-tabs{display:inline-flex;border:1px solid #b8c8c0;border-radius:7px;overflow:hidden;background:#fff}
.stz-schedule-tabs button{min-height:34px;padding:6px 12px;border:0;border-right:1px solid #d5dfda;background:#fff;color:#145d49;font-weight:700;cursor:pointer}
.stz-schedule-tabs button:last-child{border-right:0}
.stz-schedule-tabs button.active{background:#146b50;color:#fff}
.stz-schedule-actions>button{min-height:34px;padding:6px 10px;font-size:.78rem}
.stz-schedule-panel .stz-table-scroll{max-height:470px;overflow:auto}
.stz-schedule-panel .stz-data-table{width:100%;border-collapse:collapse;min-width:620px}
.stz-schedule-panel th,.stz-schedule-panel td{padding:8px 10px;text-align:right;border-bottom:1px solid #e5ebe8;font-variant-numeric:tabular-nums}
.stz-schedule-panel th:first-child,.stz-schedule-panel td:first-child{text-align:left}
.stz-schedule-panel thead th{position:sticky;top:0;z-index:1;background:#176b52;color:#fff}
.stz-schedule-panel tbody tr:nth-child(even){background:#f8faf9}
.stz-schedule-summary{margin:0;padding:9px 14px;color:#5a6861;font-size:.8rem;border-top:1px solid #e1e8e4}
@media(max-width:700px){.stz-schedule-panel .stz-table-toolbar{align-items:stretch}.stz-schedule-actions{display:grid;grid-template-columns:1fr 1fr}.stz-schedule-tabs{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}.stz-schedule-tabs button{width:100%}.stz-schedule-panel .stz-table-scroll{max-height:390px}}
@media print{body.stz-print-schedule *{visibility:hidden!important}body.stz-print-schedule .stz-schedule-panel,body.stz-print-schedule .stz-schedule-panel *{visibility:visible!important}body.stz-print-schedule .stz-schedule-panel{position:absolute;left:0;top:0;width:100%;border:0}body.stz-print-schedule .stz-schedule-actions{display:none!important}body.stz-print-schedule .stz-table-scroll{max-height:none!important;overflow:visible!important}}
