* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  background: #f5f5f7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mono {
  font-family: "SF Mono", "Menlo", "Monaco", "Consolas", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.card {
  background: #fff;
  border-radius: 28px;
  padding: 32px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

.seg {
  display: inline-flex;
  background: #e8e8ed;
  border-radius: 9px;
  padding: 2px;
  max-width: 100%;
}

.seg button {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  background: transparent;
  color: #86868b;
  font-family: inherit;
  white-space: nowrap;
}

.seg button.on {
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 980px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1.5px solid #d2d2d7;
  user-select: none;
  background: #fff;
  color: #86868b;
  font-family: inherit;
  max-width: 100%;
  min-width: 0;
}

.chip:hover {
  border-color: #aeaeb2;
}

.chip.active {
  border-color: currentColor;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.08);
  transition: box-shadow 0.15s ease;
  margin-top: -12px;
}

input[type="range"]::-webkit-slider-thumb:active {
  box-shadow: 0 2px 6px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.1);
}

input[type="range"]::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
}

input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.08);
}

.msc {
  background: #f5f5f7;
  border-radius: 18px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  margin-bottom: 8px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.sb {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(3,161,14,0.1);
  color: #03a10e;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
}

.row {
  display: grid;
  gap: 6px;
  align-items: center;
  padding: 4px 0;
  font-size: 12px;
}

.milestone-scroll {
  overflow-x: auto;
  margin-inline: -4px;
  padding-inline: 4px;
  -webkit-overflow-scrolling: touch;
}

.milestone-grid {
  min-width: 520px;
}

.loan-toolbar {
  min-width: 0;
}

.loan-selector {
  min-width: 0;
}

.loan-toolbar-actions {
  flex-shrink: 0;
}

.sep {
  border-top: 0.5px solid rgba(60,60,67,0.1);
  margin: 6px 0;
}

.lbl {
  color: #86868b;
  font-size: 11px;
  white-space: normal;
}

.tb {
  padding: 6px 12px;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  background: #e8e8ed;
  color: #86868b;
  font-family: inherit;
}

.tb.on {
  background: #1d1d1f;
  color: #fff;
}

@media (max-width: 720px) {
  .card {
    border-radius: 22px;
    padding: 24px 18px;
  }

  .msc {
    padding: 16px;
  }

  .loan-selector {
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
  }
}

@media (max-width: 480px) {
  .card {
    border-radius: 20px;
    padding: 20px 14px;
  }

  .chip {
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .tb {
    padding-inline: 10px;
  }

  .msc {
    border-radius: 16px;
    padding: 14px;
  }

  .milestone-grid {
    min-width: 480px;
  }
}
