/* U-Biz Solutions APIT Calculator */
.apit-page{background:#f2f6f8}
.apit-hero{position:relative;overflow:hidden;padding:46px 0 40px;color:#fff;background:radial-gradient(ellipse 48% 95% at 78% -8%,rgba(30,205,196,.28),transparent 70%),linear-gradient(116deg,#061523,#0b2b41 59%,#0b4851)}
.apit-hero:after{content:"";position:absolute;right:-6%;top:-90%;width:520px;height:520px;border-radius:50%;background:radial-gradient(circle,rgba(29,195,205,.13),transparent 68%);filter:blur(26px);pointer-events:none}
.apit-hero .container{position:relative;z-index:1}
.apit-crumb{font-size:11px;color:#9ab5c4;margin-bottom:15px}.apit-crumb a{color:#72e4db}
.apit-hero .eyebrow{color:#7debe1}.apit-hero h1{font-size:clamp(34px,4vw,51px);letter-spacing:-1.8px;line-height:1.08;margin:10px 0 12px;color:#fff}
.apit-hero h1 span{background:linear-gradient(100deg,#42baff,#ecfbff);color:transparent;background-clip:text;-webkit-background-clip:text}
.apit-hero p{max-width:760px;color:#c7dbe4;font-size:14px;margin:0}
.apit-hero-tags{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}.apit-hero-tags span{padding:6px 10px;border:1px solid rgba(114,225,218,.28);border-radius:20px;background:rgba(255,255,255,.06);color:#d6f5f2;font-size:10px;font-weight:800}
.apit-workspace{padding:25px 0 50px}
.apit-note{display:flex;align-items:flex-start;gap:12px;padding:13px 16px;margin-bottom:16px;border:1px solid #cfe9e7;border-radius:12px;background:linear-gradient(110deg,#f4fffd,#f5faff)}
.note-mark{width:24px;height:24px;display:grid;place-items:center;border-radius:50%;background:#d9f8ef;color:#07866f;font-weight:900;flex:0 0 24px}
.apit-note b{display:block;color:#163b50;font-size:12px}.apit-note small{display:block;color:#68808e;font-size:11px;margin-top:3px;line-height:1.5}
.apit-layout{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:14px;align-items:stretch}
.apit-panel{min-width:0;border:1px solid #e1eaf0;border-radius:15px;background:#fff;padding:20px;box-shadow:0 8px 24px rgba(7,34,52,.045)}
.apit-panel-heading{display:flex;align-items:center;gap:11px;margin-bottom:17px}
.apit-panel-heading .step{width:31px;height:31px;border-radius:10px;background:linear-gradient(145deg,#d9fbf5,#c8edff);color:#087e88;font-weight:900;font-size:12px;display:grid;place-items:center;flex:0 0 31px}
.apit-panel-heading h2{margin:0;color:#102e43;font-size:16px;letter-spacing:-.25px}
.apit-panel-heading p{margin:2px 0 0;color:#82929d;font-size:10.5px}
.apit-label{display:block;font-size:11px;font-weight:800;color:#496476;margin:0 0 13px}
.apit-label input,.apit-label select{display:block;width:100%;margin-top:6px;padding:11px 12px;border:1px solid #d8e3e9;border-radius:8px;background:#fff;color:#15384e;font:13px Inter,Arial,sans-serif;outline:none;transition:border .18s,box-shadow .18s}
.apit-label input:focus,.apit-label select:focus{border-color:#27bdb2;box-shadow:0 0 0 3px rgba(27,194,183,.11)}
.apit-label small{display:block;color:#91a0aa;font-size:9px;font-weight:500;margin-top:4px}
.required-star{color:#d92332;font-weight:900}.optional-text{font-size:9px;color:#91a0aa;font-weight:600;margin-left:4px}
.income-period-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.income-period-head .apit-label{margin-bottom:0}
.period-switch{display:inline-flex;gap:3px;padding:4px;background:#edf3f6;border:1px solid #e0e8ed;border-radius:9px}
.period-option{border:0;border-radius:7px;padding:7px 13px;background:transparent;color:#617888;font:800 10px Inter,Arial,sans-serif;cursor:pointer}
.period-option.active{background:linear-gradient(120deg,#20cbbb,#0b9c97);color:#052d3c;box-shadow:0 3px 10px rgba(11,160,150,.15)}
.proposal-banner{display:flex;gap:10px;padding:11px 12px;margin:0 0 14px;border:1px solid #e9d7a9;border-radius:9px;background:#fff9e9}
.proposal-badge{align-self:flex-start;padding:5px 7px;border-radius:6px;background:#f4e1ae;color:#87600b;font-size:8px;font-weight:900;white-space:nowrap;letter-spacing:.4px}
.proposal-banner b{display:block;color:#72500b;font-size:10px}.proposal-banner small{display:block;color:#816f4c;font-size:9px;line-height:1.4;margin-top:3px}
.income-equation{padding:10px 12px;margin:2px 0 15px;border:1px solid #deeaef;border-radius:9px;background:#f7fafb}
.income-equation>div{display:flex;justify-content:space-between;gap:10px;padding:5px 0;font-size:10px}
.income-equation span{color:#748a97}.income-equation b{color:#29475a;font-variant-numeric:tabular-nums}
.income-equation .equation-total{border-top:1px solid #dce7ec;padding-top:9px;margin-top:4px}.income-equation .equation-total span,.income-equation .equation-total b{color:#087f7b;font-weight:900}
.apit-actions{display:flex;gap:8px}
.apit-actions .btn{border:0;border-radius:8px;padding:11px 15px;font:800 11px Inter,Arial,sans-serif;cursor:pointer}
.apit-actions .secondary{background:linear-gradient(120deg,#20cbbb,#0b9c97);color:#052d3c;box-shadow:0 5px 15px rgba(11,160,150,.16)}
.apit-actions .reset-btn{background:#edf3f6;color:#587182;border:1px solid #dfe8ed}
.apit-error{margin-top:12px;padding:10px 12px;border:1px solid #edc4c4;border-radius:8px;background:#fff3f3;color:#b33a3a;font-size:10px;font-weight:750}
.apit-label input.field-invalid,.apit-label select.field-invalid{border:1.8px solid #d92332!important;box-shadow:0 0 0 3px rgba(217,35,50,.10)!important;background:#fff8f8}
.result-placeholder{min-height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:9px;border:1px dashed #cbdde4;border-radius:12px;background:linear-gradient(145deg,#f9fcfd,#f2f8fa);padding:25px}
.placeholder-symbol{width:54px;height:54px;border-radius:16px;display:grid;place-items:center;background:#e0f7f4;color:#0a958c;font-size:27px;font-weight:900}
.result-placeholder b{color:#26485b;font-size:13px}.result-placeholder span{color:#81939d;font-size:10px}
.result-main{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:18px 14px 16px;border-radius:12px;background:radial-gradient(ellipse at 75% 0%,rgba(38,211,195,.23),transparent 62%),linear-gradient(120deg,#071e31,#0c4853);color:#fff;text-align:center}
.result-main>span:first-child{font-size:9px;letter-spacing:1.3px;color:#a9deda;font-weight:900}
.result-main strong{font-size:clamp(27px,3vw,38px);letter-spacing:-1px;margin:5px 0;color:#fff;font-variant-numeric:tabular-nums}
.result-main small{font-size:10px;color:#bed3dc}.result-unit{margin-top:9px;padding:4px 10px;border-radius:20px;background:rgba(48,222,207,.16);border:1px solid rgba(92,228,215,.35);font-size:8px;font-weight:900;letter-spacing:1px;color:#9df5ec}
.result-breakdown{padding:10px 0}
.result-breakdown>div{display:flex;justify-content:space-between;gap:10px;padding:8px 3px;border-bottom:1px solid #edf1f4;font-size:10px}
.result-breakdown span{color:#708593}.result-breakdown b{color:#25465a;font-variant-numeric:tabular-nums;text-align:right}
.result-breakdown .breakdown-total{margin-top:4px;padding:10px;border-radius:8px;background:#edf8f7;border:1px solid #d6eeeb}
.result-breakdown .breakdown-total span,.result-breakdown .breakdown-total b{color:#087f7b;font-weight:900}
.result-actions{display:flex;gap:8px;flex-wrap:wrap}
.result-actions .btn{border:0;border-radius:8px;padding:10px 12px;font:800 10px Inter,Arial,sans-serif;cursor:pointer}
.download-result-btn{background:linear-gradient(120deg,#258fff,#1a73d7);color:#fff;box-shadow:0 5px 15px rgba(37,143,255,.17)}
.print-result-btn{background:#edf3f6;color:#496475;border:1px solid #dae5eb}
.result-actions .btn:hover{transform:translateY(-1px)}
#download-message{margin-top:8px;font-size:10px;font-weight:750}
#download-message.success{color:#14754d}#download-message.error{color:#b33a3a}
.tax-band-panel{margin-top:14px}
.tax-table-wrap{overflow-x:auto;border:1px solid #e4edf1;border-radius:9px}
.tax-band-table{width:100%;border-collapse:collapse;font-size:11px}
.tax-band-table th{padding:10px 12px;background:#f0f6f8;color:#607988;text-align:left;font-size:9px;text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid #dce7ed}
.tax-band-table td{padding:9px 12px;color:#405a6c;border-bottom:1px solid #edf1f4}
.tax-band-table td:last-child{text-align:right;font-weight:900;color:#087f7b}.tax-band-table tr:last-child td{border-bottom:0}
.rate-source-note{margin-top:10px;color:#8496a0;font-size:9px;line-height:1.5}
.apit-disclaimer{margin-top:14px;padding:13px 15px;border-left:3px solid #1bbeb3;border-radius:0 9px 9px 0;background:#edf7f8;color:#617b89;font-size:10px;line-height:1.6}
.apit-disclaimer b{color:#284a5d}
.download-sheet{display:none;width:794px;box-sizing:border-box;margin:0 auto;padding:42px;background:#fff;color:#183548;font-family:Arial,Helvetica,sans-serif}
.sheet-brand{display:flex;align-items:center;gap:11px;padding-bottom:16px;border-bottom:2px solid #0b5b67}
.sheet-mark{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(145deg,#22d4c7,#0b7f83);color:#062a3a;font-size:20px;font-weight:900}
.sheet-brand b{display:block;font-size:19px;color:#13364b}.sheet-brand small{display:block;font-size:8px;letter-spacing:1.3px;color:#728896;font-weight:800}
.sheet-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:24px 0 15px}
.sheet-title h2{margin:0;color:#102f45;font-size:19px;letter-spacing:.5px}.sheet-title span{font-size:8px;font-weight:900;letter-spacing:.8px;color:#0b928b}
.sheet-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px}
.sheet-meta>div{padding:10px;border:1px solid #d9e4e9;border-radius:7px}.sheet-meta b,.sheet-meta span{display:block}.sheet-meta b{font-size:8px;color:#748a97}.sheet-meta span{font-size:10px;color:#1b3e54;font-weight:bold;margin-top:4px}
.sheet-result{padding:22px;border-radius:10px;background:linear-gradient(120deg,#071e31,#0c4853);color:#fff;text-align:center}
.sheet-result small,.sheet-result strong,.sheet-result span{display:block}.sheet-result small{font-size:9px;letter-spacing:1px;color:#a9deda;font-weight:900}.sheet-result strong{font-size:30px;margin:8px 0;color:#fff}.sheet-result span{font-size:8px;color:#9df5ec;letter-spacing:1px}
.sheet-table{width:100%;border-collapse:collapse;margin-top:16px;font-size:10px}.sheet-table td{padding:10px 11px;border:1px solid #d8e3e8}.sheet-table td:last-child{text-align:right;font-weight:bold;font-variant-numeric:tabular-nums}
.sheet-bands{margin-top:15px;padding:12px;border:1px solid #d8e3e8;border-radius:8px;font-size:9px}.sheet-bands b{display:block;color:#183e52;margin-bottom:5px}.sheet-bands span{color:#637d8c;line-height:1.6}
.sheet-disclaimer{margin-top:14px;padding:11px;background:#f0f6f8;border-left:3px solid #19bdb4;color:#5e7582;font-size:9px;line-height:1.55}
.sheet-footer{margin-top:35px;padding-top:10px;border-top:1px solid #d8e3e8;color:#82939d;font-size:8px}
.apit-page .site-footer .footer-bottom{display:flex;justify-content:space-between;gap:12px}
@media(max-width:900px){.apit-layout{grid-template-columns:1fr}.result-placeholder{min-height:230px}}
@media(max-width:600px){.apit-hero{padding:34px 0 30px}.apit-workspace{padding:17px 0 35px}.apit-panel{padding:14px}.apit-panel-heading h2{font-size:14px}.income-period-head{align-items:flex-start;flex-direction:column}.period-switch{width:100%}.period-option{flex:1}.result-actions{display:grid;grid-template-columns:1fr 1fr}.result-actions .btn{min-height:40px}.sheet-meta{grid-template-columns:1fr}.apit-page .site-footer .footer-bottom{flex-direction:column;align-items:flex-start}}
@media print{
 @page{size:A4;margin:12mm}
 body.apit-page{background:#fff!important}
 .site-header,.apit-hero,.apit-workspace,.site-footer{display:none!important}
 .download-sheet{display:block!important;width:100%!important;margin:0!important;padding:0!important;box-shadow:none!important}
}


/* Respect the hidden attribute for conditional notices and result placeholders.
   These explicit rules prevent author display:flex styles from revealing hidden boxes. */
#proposal-banner[hidden],
#result-placeholder[hidden],
#apit-result[hidden]{
  display:none !important;
}

/* APIT result is shown at the top; the progressive band breakdown uses the
   space previously wasted by the still-visible empty placeholder. */
.rate-breakdown-panel{
  margin:12px 0 8px;
  padding:12px 13px;
  border:1px solid #dfe9ee;
  border-radius:10px;
  background:linear-gradient(145deg,#fbfdfe,#f5f9fa);
}
.rate-breakdown-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:9px;
}
.rate-breakdown-heading h3{
  margin:0;
  color:#17394e;
  font-size:12px;
  font-weight:900;
}
.rate-breakdown-heading p{
  margin:3px 0 0;
  color:#80919c;
  font-size:9px;
  line-height:1.4;
}
.annual-basis-label{
  flex:0 0 auto;
  padding:4px 7px;
  border-radius:20px;
  background:#e5f5f3;
  color:#087f78;
  font-size:8px;
  font-weight:900;
  letter-spacing:.6px;
  white-space:nowrap;
}
.rate-breakdown-table-wrap{overflow-x:auto;border:1px solid #e1eaf0;border-radius:7px;background:#fff}
.rate-breakdown-table,.sheet-rate-table{
  width:100%;
  border-collapse:collapse;
  font-size:9px;
}
.rate-breakdown-table th,.sheet-rate-table th{
  padding:8px 8px;
  background:#eef5f7;
  color:#647c8a;
  text-align:left;
  font-size:8px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.35px;
  border-bottom:1px solid #dce7ed;
}
.rate-breakdown-table td,.sheet-rate-table td{
  padding:7px 8px;
  color:#405b6d;
  border-bottom:1px solid #edf1f4;
  font-variant-numeric:tabular-nums;
}
.rate-breakdown-table tr:last-child td,.sheet-rate-table tr:last-child td{border-bottom:0}
.rate-breakdown-table th:nth-child(2),.rate-breakdown-table th:nth-child(3),
.rate-breakdown-table td:nth-child(2),.rate-breakdown-table td:nth-child(3),
.sheet-rate-table th:nth-child(2),.sheet-rate-table th:nth-child(3),
.sheet-rate-table td:nth-child(2),.sheet-rate-table td:nth-child(3){text-align:right}
.rate-breakdown-table td:first-child,.sheet-rate-table td:first-child{font-weight:900;color:#1e4358}
.rate-breakdown-table td:last-child,.sheet-rate-table td:last-child{font-weight:900;color:#087f7b}
.rate-breakdown-table .relief-row td{background:#f7fafb;color:#637c8a}
.rate-breakdown-table .used-band td{background:#fbfefe}
.rate-breakdown-note{
  margin:7px 1px 0;
  color:#81939d;
  font-size:8.5px;
  line-height:1.4;
}
.sheet-rate-table{margin:14px 0 0;border:1px solid #d8e3e8}
.sheet-rate-table th{font-size:8px}
.sheet-rate-table td{padding:8px 9px;font-size:9px}
@media(max-width:600px){
  .rate-breakdown-panel{padding:10px}
  .rate-breakdown-heading{flex-direction:column}
  .rate-breakdown-table{min-width:440px}
}

/* Direct monthly / annual APIT modes */
#annual-bonus-field[hidden],
#bonus-summary-row[hidden],
#res-bonus-row[hidden],
#sheet-bonus-row[hidden]{display:none!important}
