.tax-metric {
  border: 1px solid rgba(10, 32, 76, 0.1);
  border-radius: 14px;
  padding: 0.8rem 0.95rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 40, 74, 0.03);
}

.tax-metric--compact {
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
}

.tax-result-main {
  border: 1px solid rgba(10, 32, 76, 0.06);
  border-radius: 16px;
  background: #fff;
  padding: 1rem 1.05rem;
}

.tax-result-main__label {
  color: #4c5c76;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 0.2rem;
}

.tax-result-main__value {
  color: #10284a;
  font-size: clamp(2.2rem, 4.4vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.tax-summary-band {
  border: 1px solid rgba(10, 32, 76, 0.06);
  border-radius: 12px;
  background: #fcfdff;
  padding: 0.62rem 0.78rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.tax-summary-band__item {
  min-width: 0;
}

.tax-summary-band__label {
  display: block;
  color: #6d7b92;
  font-size: 0.73rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
  letter-spacing: 0.01em;
}

.tax-summary-band__value {
  display: block;
  color: #10284a;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
}

.tax-summary-band__value--tax {
  color: #f07d24;
}

.tax-detail-stack {
  display: grid;
  gap: 0.75rem;
}

.tax-detail-group {
  border: 1px solid rgba(10, 32, 76, 0.08);
  border-radius: 12px;
  background: #fff;
  padding: 0.64rem 0.78rem;
}

.tax-detail-group__title {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #10284a;
}

.tax-detail-list {
  margin: 0;
  display: grid;
  gap: 0;
}

.tax-detail-list__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.38rem 0;
  border-bottom: 1px solid rgba(10, 32, 76, 0.08);
}

.tax-detail-list__row:last-child {
  border-bottom: none;
}

.tax-detail-list__row dt {
  margin: 0;
  color: #5f6e86;
  font-size: 0.82rem;
  font-weight: 600;
}

.tax-detail-list__row dd {
  margin: 0;
  color: #10284a;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: right;
}

.tax-metric__label {
  color: #657289;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.tax-metric__value {
  color: #10284a;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
}

.tax-metric__value--primary {
  color: #f07d24;
}

.tax-bar-item {
  margin-bottom: 0.62rem;
}

.tax-scale-bars__title {
  margin: 0 0 0.62rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #10284a;
}

.tax-bar-item__top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 0.28rem;
}

.tax-bar-item__top span {
  color: #3f4f68;
  font-weight: 600;
}

.tax-bar-item__top strong {
  color: #23344f;
  font-weight: 700;
}

.tax-bar-item__track {
  height: 0.42rem;
  border-radius: 999px;
  background: #e8edf5;
  overflow: hidden;
}

.tax-bar-item__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f7933a 0%, #f07d24 100%);
  border-radius: 999px;
  transition: width 220ms ease;
}

.tax-flat-indicator {
  border: 1px solid rgba(10, 32, 76, 0.07);
  border-radius: 14px;
  padding: 0.72rem;
  background: #fff;
}

.tax-flat-indicator__top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.tax-flat-indicator__track {
  height: 0.56rem;
  border-radius: 999px;
  background: #e8edf5;
  overflow: hidden;
}

.tax-flat-indicator__fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f7933a 0%, #f07d24 100%);
  border-radius: 999px;
}

.ui-tax-breakdown {
  border: 1px solid rgba(10, 32, 76, 0.07);
  border-radius: 12px;
  padding: 0.56rem 0.72rem;
  background: #fff;
}

.ui-tax-breakdown > summary {
  cursor: pointer;
  color: #10284a;
  font-weight: 600;
}

.tax-legal-micro {
  font-size: 0.76rem;
}

.tax-legal-micro a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tax-how-list {
  margin: 0;
  padding-left: 1rem;
  color: #43526c;
}

.tax-how-list li {
  margin-bottom: 0.28rem;
}

.tax-how-list li:last-child {
  margin-bottom: 0;
}

.tax-mini-table-wrap .table th,
.tax-mini-table-wrap .table td {
  padding: 0.42rem 0.5rem;
}

@media (max-width: 768px) {
  .ui-tool-hero-actions {
    gap: 0.75rem 0.5rem;
    width: 100%;
  }

  .ui-tool-hero-actions .btn {
    margin-right: 0 !important;
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    font-size: 0.96rem;
    line-height: 1.2;
    white-space: normal;
  }

  .ui-tool-hero-actions .btn-fit-target,
  .ui-tool-hero-actions .btn-fit-target .btn-label {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .ui-section .ui-hero-title {
    font-size: clamp(2rem, 9vw, 2.75rem);
    line-height: 1.08;
  }
}

.tax-reference-table .table th,
.tax-reference-table .table td {
  padding-top: 0.32rem;
  padding-bottom: 0.32rem;
}

.tax-reference-table .table thead th {
  background: rgba(10, 32, 76, 0.025);
}

@media (max-width: 576px) {
  .tax-summary-band {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .tax-bar-item__top {
    font-size: 0.85rem;
    flex-direction: column;
    align-items: flex-start;
  }
}
